![]() |
MechSys
1.0
Computing library for simulations in continuum and discrete mechanics
|
#include <node.h>
Public Member Functions | |
Node (Mesh::Vertex const &TheVert) | |
void | AddDOF (char const *StrU, char const *StrF) |
Add DOF if it doesn't exist. Ex.: StrU="ux uy", StrF="fx fy". | |
size_t | NDOF () const |
Get the number of DOFs. | |
double | U (char const *UKey) const |
Get U value. | |
double | F (char const *FKey) const |
Get F value. | |
double & | U (String const &UKey) |
Get/Set U value. | |
double & | F (String const &FKey) |
Get/Set F value. | |
double & | U (char const *UKey) |
Get/Set U value. | |
double & | F (char const *FKey) |
Get/Set F value. | |
double & | V (size_t IdxDOF) |
Get/Set V value given IdxDOF. | |
double & | U (size_t IdxDOF) |
Get/Set U value given IdxDOF. | |
double & | F (size_t IdxDOF) |
Get/Set F value given IdxDOF. | |
double | UOrZero (String const &UKey) const |
U value or zero if U key does not exist. | |
double | VOrZero (String const &UKey) const |
V value or zero if U key does not exist. | |
double | FOrZero (String const &FKey) const |
F value or zero if F key does not exist. | |
void | TrySetU (String const &UKey, double Val) |
Try to set U if key exists. | |
void | TrySetF (String const &FKey, double Val) |
Try to set F if key exists. | |
int | Eq (char const *UKey) const |
Get Equation number. | |
int | Eq (String const &UKey) const |
Get Equation number. | |
int | Eq (size_t IdxDOF) const |
Get Equation number given index of DOF. | |
int & | Eq (size_t IdxDOF) |
Get/Set Equation number given index of DOF. | |
String const & | UKey (size_t IdxDOF) const |
Get U key. | |
String const & | FKey (size_t IdxDOF) const |
Get F key. | |
bool | pU (size_t IdxDOF) const |
Prescribed U ? | |
void | SetUF (Vec_t const &UVec, Vec_t const &FVec) |
Set internal U and F values given global vectors. | |
void | SetUVF (Vec_t const &UVec, Vec_t const &VVec, Vec_t const &FVec) |
Set internal U, V and F values given global vectors. | |
void | GetUF (Vec_t &UVec, Vec_t &FVec) |
Get U and F values and store into UVec and FVec vectors. | |
void | Clear () |
Clear all values but keep structure of DOFs. | |
void | ClearU () |
Clear U values only. | |
void | SetPU (String const &UKey, double Val, BCFuncs *BCF=NULL) |
Set prescribed U. | |
void | SetMPU (size_t IdxPU, BCFuncs *BCF=NULL) |
Set multiplier to PU. | |
size_t | NPU () const |
Get number of prescribed U. | |
int | EqPU (size_t IdxPU) const |
Get Eq number corresponding to prescribed U. | |
void | DelPUs () |
Delete PU structure. | |
String const & | PUKey (size_t IdxPU) const |
Get PU key. | |
double | PU (size_t IdxPU, double Time) const |
Get prescribed U value given index to PU. | |
double | PV (size_t IdxPU, double Time) const |
Get prescribed V=dUdt value given index to PU. | |
double | PA (size_t IdxPU, double Time) const |
Get prescribed A=d2Udt2 value given index to PU. | |
double | PUIdxDOF (size_t IdxDOF, double Time) const |
Get prescribed U given index of DOF. | |
double | PVIdxDOF (size_t IdxDOF, double Time) const |
Get prescribed V given index of DOF. | |
double | PAIdxDOF (size_t IdxDOF, double Time) const |
Get prescribed A given index of DOF. | |
void | AddToPF (String const &FKey, double Val, BCFuncs *BCF=NULL) |
Add value to prescribed F. | |
void | SetMPF (size_t IdxPF, BCFuncs *BCF=NULL) |
Set multiplier to PF. | |
size_t | NPF () const |
Get number of prescribed F. | |
int | EqPF (size_t IdxPF) const |
Get Eq number corresponding to prescribed F. | |
void | DelPFs () |
Delete PF structure. | |
String const & | PFKey (size_t IdxPF) const |
Get PF key. | |
double | PF (size_t IdxPF, double Time) const |
Get prescribed F value given index to PF. | |
double | PFOrZero (size_t IdxDOF, double Time) const |
Get prescribed F given index of DOF. | |
void | AccumPF () |
Accumulate prescribed F (to calculate Reactions later). Copy from _PF into _aPF. | |
void | Reactions (std::map< String, double > &R) const |
Calculate reactions. | |
void | SetPin (Array< Node * > const &ConnectedNodes) |
Set Pin. | |
void | SetLagPin (int &EqLag, Sparse::Triplet< double, int > &A) const |
Set A matrix with the equations for the Lagrangian multipliers corresponding to pins. Will increment EqLag. | |
void | ClrRPin (int &EqLag, Vec_t &R) const |
Clear R components corresponding pins. Will inclined EqLag. | |
void | SetIncSup (double Alpha) |
Set inclined support. | |
void | DelIncSup () |
Delete inclined support. | |
bool | HasIncSup () const |
Has inclined support ? | |
void | SetLagIncSup (int &EqLag, Sparse::Triplet< double, int > &A) const |
Set A matrix with the equations for the Lagrangian multipliers corresponding to inclined supports. Will increment EqLag. | |
void | ClrRIncSup (int &EqLag, Vec_t &R) const |
Clear R components corresponding to inclined supports. Will inclined EqLag. | |
Public Attributes | |
Mesh::Vertex const & | Vert |
Geometric information: ID, Tag, coordinates. | |
long | NShares |
Number of active elements sharing this node. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, Node const &N) |
FEM::Node::Node | ( | Mesh::Vertex const & | TheVert | ) | [inline] |
void FEM::Node::AccumPF | ( | ) | [inline] |
Accumulate prescribed F (to calculate Reactions later). Copy from _PF into _aPF.
void FEM::Node::AddDOF | ( | char const * | StrU, |
char const * | StrF | ||
) | [inline] |
Add DOF if it doesn't exist. Ex.: StrU="ux uy", StrF="fx fy".
void FEM::Node::AddToPF | ( | String const & | FKey, |
double | Val, | ||
BCFuncs * | BCF = NULL |
||
) | [inline] |
Add value to prescribed F.
void FEM::Node::Clear | ( | ) | [inline] |
Clear all values but keep structure of DOFs.
void FEM::Node::ClearU | ( | ) | [inline] |
Clear U values only.
void FEM::Node::ClrRIncSup | ( | int & | EqLag, |
Vec_t & | R | ||
) | const [inline] |
Clear R components corresponding to inclined supports. Will inclined EqLag.
void FEM::Node::ClrRPin | ( | int & | EqLag, |
Vec_t & | R | ||
) | const [inline] |
Clear R components corresponding pins. Will inclined EqLag.
void FEM::Node::DelIncSup | ( | ) | [inline] |
Delete inclined support.
void FEM::Node::DelPFs | ( | ) | [inline] |
Delete PF structure.
void FEM::Node::DelPUs | ( | ) | [inline] |
Delete PU structure.
int FEM::Node::Eq | ( | char const * | UKey | ) | const [inline] |
Get Equation number.
int FEM::Node::Eq | ( | String const & | UKey | ) | const [inline] |
Get Equation number.
int FEM::Node::Eq | ( | size_t | IdxDOF | ) | const [inline] |
Get Equation number given index of DOF.
int& FEM::Node::Eq | ( | size_t | IdxDOF | ) | [inline] |
Get/Set Equation number given index of DOF.
int FEM::Node::EqPF | ( | size_t | IdxPF | ) | const [inline] |
Get Eq number corresponding to prescribed F.
int FEM::Node::EqPU | ( | size_t | IdxPU | ) | const [inline] |
Get Eq number corresponding to prescribed U.
double FEM::Node::F | ( | char const * | FKey | ) | const [inline] |
Get F value.
double& FEM::Node::F | ( | String const & | FKey | ) | [inline] |
Get/Set F value.
double& FEM::Node::F | ( | char const * | FKey | ) | [inline] |
Get/Set F value.
double& FEM::Node::F | ( | size_t | IdxDOF | ) | [inline] |
Get/Set F value given IdxDOF.
String const& FEM::Node::FKey | ( | size_t | IdxDOF | ) | const [inline] |
Get F key.
double FEM::Node::FOrZero | ( | String const & | FKey | ) | const [inline] |
F value or zero if F key does not exist.
void FEM::Node::GetUF | ( | Vec_t & | UVec, |
Vec_t & | FVec | ||
) | [inline] |
Get U and F values and store into UVec and FVec vectors.
bool FEM::Node::HasIncSup | ( | ) | const [inline] |
Has inclined support ?
size_t FEM::Node::NDOF | ( | ) | const [inline] |
Get the number of DOFs.
size_t FEM::Node::NPF | ( | ) | const [inline] |
Get number of prescribed F.
size_t FEM::Node::NPU | ( | ) | const [inline] |
Get number of prescribed U.
double FEM::Node::PA | ( | size_t | IdxPU, |
double | Time | ||
) | const [inline] |
Get prescribed A=d2Udt2 value given index to PU.
double FEM::Node::PAIdxDOF | ( | size_t | IdxDOF, |
double | Time | ||
) | const [inline] |
Get prescribed A given index of DOF.
double FEM::Node::PF | ( | size_t | IdxPF, |
double | Time | ||
) | const [inline] |
Get prescribed F value given index to PF.
String const& FEM::Node::PFKey | ( | size_t | IdxPF | ) | const [inline] |
Get PF key.
double FEM::Node::PFOrZero | ( | size_t | IdxDOF, |
double | Time | ||
) | const [inline] |
Get prescribed F given index of DOF.
bool FEM::Node::pU | ( | size_t | IdxDOF | ) | const [inline] |
Prescribed U ?
double FEM::Node::PU | ( | size_t | IdxPU, |
double | Time | ||
) | const [inline] |
Get prescribed U value given index to PU.
double FEM::Node::PUIdxDOF | ( | size_t | IdxDOF, |
double | Time | ||
) | const [inline] |
Get prescribed U given index of DOF.
String const& FEM::Node::PUKey | ( | size_t | IdxPU | ) | const [inline] |
Get PU key.
double FEM::Node::PV | ( | size_t | IdxPU, |
double | Time | ||
) | const [inline] |
Get prescribed V=dUdt value given index to PU.
double FEM::Node::PVIdxDOF | ( | size_t | IdxDOF, |
double | Time | ||
) | const [inline] |
Get prescribed V given index of DOF.
void FEM::Node::Reactions | ( | std::map< String, double > & | R | ) | const [inline] |
Calculate reactions.
void FEM::Node::SetIncSup | ( | double | Alpha | ) | [inline] |
Set inclined support.
void FEM::Node::SetLagIncSup | ( | int & | EqLag, |
Sparse::Triplet< double, int > & | A | ||
) | const [inline] |
Set A matrix with the equations for the Lagrangian multipliers corresponding to inclined supports. Will increment EqLag.
void FEM::Node::SetLagPin | ( | int & | EqLag, |
Sparse::Triplet< double, int > & | A | ||
) | const [inline] |
Set A matrix with the equations for the Lagrangian multipliers corresponding to pins. Will increment EqLag.
void FEM::Node::SetMPF | ( | size_t | IdxPF, |
BCFuncs * | BCF = NULL |
||
) | [inline] |
Set multiplier to PF.
void FEM::Node::SetMPU | ( | size_t | IdxPU, |
BCFuncs * | BCF = NULL |
||
) | [inline] |
Set multiplier to PU.
void FEM::Node::SetPin | ( | Array< Node * > const & | ConnectedNodes | ) | [inline] |
Set Pin.
void FEM::Node::SetPU | ( | String const & | UKey, |
double | Val, | ||
BCFuncs * | BCF = NULL |
||
) | [inline] |
Set prescribed U.
void FEM::Node::SetUF | ( | Vec_t const & | UVec, |
Vec_t const & | FVec | ||
) | [inline] |
Set internal U and F values given global vectors.
void FEM::Node::SetUVF | ( | Vec_t const & | UVec, |
Vec_t const & | VVec, | ||
Vec_t const & | FVec | ||
) | [inline] |
Set internal U, V and F values given global vectors.
void FEM::Node::TrySetF | ( | String const & | FKey, |
double | Val | ||
) | [inline] |
Try to set F if key exists.
void FEM::Node::TrySetU | ( | String const & | UKey, |
double | Val | ||
) | [inline] |
Try to set U if key exists.
double FEM::Node::U | ( | char const * | UKey | ) | const [inline] |
Get U value.
double& FEM::Node::U | ( | String const & | UKey | ) | [inline] |
Get/Set U value.
double& FEM::Node::U | ( | char const * | UKey | ) | [inline] |
Get/Set U value.
double& FEM::Node::U | ( | size_t | IdxDOF | ) | [inline] |
Get/Set U value given IdxDOF.
String const& FEM::Node::UKey | ( | size_t | IdxDOF | ) | const [inline] |
Get U key.
double FEM::Node::UOrZero | ( | String const & | UKey | ) | const [inline] |
U value or zero if U key does not exist.
double& FEM::Node::V | ( | size_t | IdxDOF | ) | [inline] |
Get/Set V value given IdxDOF.
double FEM::Node::VOrZero | ( | String const & | UKey | ) | const [inline] |
V value or zero if U key does not exist.
std::ostream& operator<< | ( | std::ostream & | os, |
Node const & | N | ||
) | [friend] |
long FEM::Node::NShares |
Number of active elements sharing this node.
Mesh::Vertex const& FEM::Node::Vert |
Geometric information: ID, Tag, coordinates.