![]() |
MechSys
1.0
Computing library for simulations in continuum and discrete mechanics
|
#include <grid2d.h>
Public Member Functions | |
Grid2D (double xMin, double yMin, size_t nRow, size_t nCol, double Lx, double Ly, ptIsFixed pIsFixed) | |
size_t | nNodes () const |
Return the number of nodes = nRow*nCol. | |
size_t | nCells () const |
Return the number of cells = (nRow-1)*(nCol-1) | |
bool | IsInside (Vector3D const &P, bool WithBorder=false) |
Check if a given point (P) is inside the grid. | |
void | ClearState (bool CurrentCoords=true) |
Reset all state values in the grid, such as mass, velocity, momentum, etc. | |
void | SetFixed (size_t i, FixType Type) |
Set fixed node # i. | |
void | SetLoading (size_t i, Vector3D const &Fe) |
Set external force (loading) on node # i. | |
void | FixNodes (Array< Vector3D > *VelOrDqDt) |
Fix nodes by clearing v (velocities) or dqdt (rate of momentum) | |
void | ApplyLoadings (double M) |
Apply loading using data on loaded nodes and scaling by the multiplier M. | |
void | Refine () |
Refine the grid (bi-section) | |
size_t | LBN (Vector3D const &P, bool MPM=false) |
Left-bottom node. | |
bool | IsFixed (size_t n, size_t iD) const |
Check if node n is fixed along iD dimension. | |
double | xMin () const |
Returns Min x. | |
double | yMin () const |
Returns Min y. | |
double | xMax () const |
Returns Max x. | |
double | yMax () const |
Returns Max y. | |
size_t | nRow () const |
Returns Num of rows. | |
size_t | nCol () const |
Returns Num of columns. | |
double | L (size_t iComp) const |
Returns Cell-length 0=>x, 1=>y. | |
Vector3D const & | L () const |
Returns Cell-length 0=>x, 1=>y. | |
Array< Vector3D > const & | X () const |
Access all nodes (Undeformed coordinates) | |
Array< Vector3D > const & | x () const |
Access all nodes (Current coordinates) | |
Vector3D const & | X (size_t i) const |
Returns access to a node position - Undeformed (read) | |
Vector3D const & | x (size_t i) const |
Returns access to a node position - Current (read) | |
Vector3D & | x (size_t i) |
Returns access to a node position - Current (write) | |
Connec2D const & | C (size_t i) const |
Returns access to a connectivity (read) | |
size_t | nFix () const |
Returns the number of fixed nodes. | |
Vector3D const & | FixN (size_t i) const |
Access a fixed node (Undeformed coordinates) | |
FixType | FixT (size_t i) const |
Access the type of a fixed node. | |
size_t | nLd () const |
Returns the number of loaded nodes. | |
Vector3D const & | LdN (size_t i) const |
Access a loaded node (Undeformed coordinates) | |
Vector3D const & | Ld (size_t i) const |
Access a loading. | |
double & | m (size_t i) |
Nodes masses. | |
Vector3D & | q (size_t i) |
Nodes momenta (x,y comps) | |
Vector3D & | v (size_t i) |
Nodes velocities (x,y comps) | |
Vector3D & | fe (size_t i) |
Nodes external forces (x,y comps) | |
Vector3D & | fi (size_t i) |
Nodes internal forces (x,y comps) | |
Vector3D & | dqdt (size_t i) |
Rate of nodes momenta (x,y comps) | |
Array< Vector3D > & | q () |
Nodes momenta (x,y comps) | |
Array< Vector3D > & | v () |
Nodes velocities (x,y comps) | |
Array< Vector3D > & | dqdt () |
Rate of nodes momenta (x,y comps) | |
double const & | m (size_t i) const |
Nodes masses. | |
Vector3D const & | q (size_t i) const |
Nodes momenta (x,y comps) | |
Vector3D const & | v (size_t i) const |
Nodes velocities (x,y comps) | |
Vector3D const & | fe (size_t i) const |
Nodes external forces (x,y comps) | |
Vector3D const & | fi (size_t i) const |
Nodes internal forces (x,y comps) | |
Vector3D const & | dqdt (size_t i) const |
Rate of nodes momenta (x,y comps) |
MPM::Grid2D::Grid2D | ( | double | xMin, |
double | yMin, | ||
size_t | nRow, | ||
size_t | nCol, | ||
double | Lx, | ||
double | Ly, | ||
ptIsFixed | pIsFixed | ||
) | [inline] |
void MPM::Grid2D::ApplyLoadings | ( | double | M | ) | [inline] |
Apply loading using data on loaded nodes and scaling by the multiplier M.
Connec2D const& MPM::Grid2D::C | ( | size_t | i | ) | const [inline] |
Returns access to a connectivity (read)
void MPM::Grid2D::ClearState | ( | bool | CurrentCoords = true | ) | [inline] |
Reset all state values in the grid, such as mass, velocity, momentum, etc.
Vector3D& MPM::Grid2D::dqdt | ( | size_t | i | ) | [inline] |
Rate of nodes momenta (x,y comps)
Array<Vector3D>& MPM::Grid2D::dqdt | ( | ) | [inline] |
Rate of nodes momenta (x,y comps)
Vector3D const& MPM::Grid2D::dqdt | ( | size_t | i | ) | const [inline] |
Rate of nodes momenta (x,y comps)
Vector3D& MPM::Grid2D::fe | ( | size_t | i | ) | [inline] |
Nodes external forces (x,y comps)
Vector3D const& MPM::Grid2D::fe | ( | size_t | i | ) | const [inline] |
Nodes external forces (x,y comps)
Vector3D& MPM::Grid2D::fi | ( | size_t | i | ) | [inline] |
Nodes internal forces (x,y comps)
Vector3D const& MPM::Grid2D::fi | ( | size_t | i | ) | const [inline] |
Nodes internal forces (x,y comps)
Vector3D const& MPM::Grid2D::FixN | ( | size_t | i | ) | const [inline] |
Access a fixed node (Undeformed coordinates)
void MPM::Grid2D::FixNodes | ( | Array< Vector3D > * | VelOrDqDt | ) | [inline] |
Fix nodes by clearing v (velocities) or dqdt (rate of momentum)
FixType MPM::Grid2D::FixT | ( | size_t | i | ) | const [inline] |
Access the type of a fixed node.
bool MPM::Grid2D::IsFixed | ( | size_t | n, |
size_t | iD | ||
) | const [inline] |
Check if node n is fixed along iD dimension.
bool MPM::Grid2D::IsInside | ( | Vector3D const & | P, |
bool | WithBorder = false |
||
) | [inline] |
Check if a given point (P) is inside the grid.
double MPM::Grid2D::L | ( | size_t | iComp | ) | const [inline] |
Returns Cell-length 0=>x, 1=>y.
Vector3D const& MPM::Grid2D::L | ( | ) | const [inline] |
Returns Cell-length 0=>x, 1=>y.
size_t MPM::Grid2D::LBN | ( | Vector3D const & | P, |
bool | MPM = false |
||
) | [inline] |
Left-bottom node.
Vector3D const& MPM::Grid2D::Ld | ( | size_t | i | ) | const [inline] |
Access a loading.
Vector3D const& MPM::Grid2D::LdN | ( | size_t | i | ) | const [inline] |
Access a loaded node (Undeformed coordinates)
double& MPM::Grid2D::m | ( | size_t | i | ) | [inline] |
Nodes masses.
double const& MPM::Grid2D::m | ( | size_t | i | ) | const [inline] |
Nodes masses.
size_t MPM::Grid2D::nCells | ( | ) | const [inline] |
Return the number of cells = (nRow-1)*(nCol-1)
size_t MPM::Grid2D::nCol | ( | ) | const [inline] |
Returns Num of columns.
size_t MPM::Grid2D::nFix | ( | ) | const [inline] |
Returns the number of fixed nodes.
size_t MPM::Grid2D::nLd | ( | ) | const [inline] |
Returns the number of loaded nodes.
size_t MPM::Grid2D::nNodes | ( | ) | const [inline] |
Return the number of nodes = nRow*nCol.
size_t MPM::Grid2D::nRow | ( | ) | const [inline] |
Returns Num of rows.
Vector3D& MPM::Grid2D::q | ( | size_t | i | ) | [inline] |
Nodes momenta (x,y comps)
Array<Vector3D>& MPM::Grid2D::q | ( | ) | [inline] |
Nodes momenta (x,y comps)
Vector3D const& MPM::Grid2D::q | ( | size_t | i | ) | const [inline] |
Nodes momenta (x,y comps)
void MPM::Grid2D::Refine | ( | ) | [inline] |
Refine the grid (bi-section)
void MPM::Grid2D::SetFixed | ( | size_t | i, |
FixType | Type | ||
) | [inline] |
Set fixed node # i.
void MPM::Grid2D::SetLoading | ( | size_t | i, |
Vector3D const & | Fe | ||
) | [inline] |
Set external force (loading) on node # i.
Vector3D& MPM::Grid2D::v | ( | size_t | i | ) | [inline] |
Nodes velocities (x,y comps)
Array<Vector3D>& MPM::Grid2D::v | ( | ) | [inline] |
Nodes velocities (x,y comps)
Vector3D const& MPM::Grid2D::v | ( | size_t | i | ) | const [inline] |
Nodes velocities (x,y comps)
Array<Vector3D> const& MPM::Grid2D::X | ( | ) | const [inline] |
Access all nodes (Undeformed coordinates)
Array<Vector3D> const& MPM::Grid2D::x | ( | ) | const [inline] |
Access all nodes (Current coordinates)
Vector3D const& MPM::Grid2D::X | ( | size_t | i | ) | const [inline] |
Returns access to a node position - Undeformed (read)
Vector3D const& MPM::Grid2D::x | ( | size_t | i | ) | const [inline] |
Returns access to a node position - Current (read)
Vector3D& MPM::Grid2D::x | ( | size_t | i | ) | [inline] |
Returns access to a node position - Current (write)
double MPM::Grid2D::xMax | ( | ) | const [inline] |
Returns Max x.
double MPM::Grid2D::xMin | ( | ) | const [inline] |
Returns Min x.
double MPM::Grid2D::yMax | ( | ) | const [inline] |
Returns Max y.
double MPM::Grid2D::yMin | ( | ) | const [inline] |
Returns Min y.