|
IFEM
90A354
|
Class for sphere geometries. More...
#include <ElementBlock.h>


Public Member Functions | |
| SphereBlock (const Vec3 &X0, double R, size_t nTheta=180, size_t nPhi=60) | |
| The constructor defines a sphere centered at the specified point. More... | |
Public Member Functions inherited from ElementBlock | |
| ElementBlock (size_t nenod=8) | |
| The constructor defines the number of nodes per element nenod. | |
| virtual | ~ElementBlock ()=default |
| Empty destructor. | |
| void | resize (size_t nI, size_t nJ=1, size_t nK=1) |
| Reallocates the internal arrays to fit a structured grid. More... | |
| void | unStructResize (size_t nEl, size_t nPts, size_t nMNPC=0) |
| Reallocates the internal arrays to fit an unstructured grid. More... | |
| bool | setCoor (size_t i, size_t j, Real x) |
| Defines the j'th coordinate of node i. | |
| bool | setCoor (size_t i, const Vec3 &X) |
| Defines the coordinates of node i. | |
| bool | setCoor (size_t i, Real x, Real y, Real z) |
| Defines the coordinates of node i. | |
| bool | setParams (size_t i, Real u, Real v, Real w=Real(0)) |
| Defines the parameter values for node i. | |
| bool | setNode (size_t i, int nodeNumb) |
| Defines the global number of element node i. | |
| bool | endOfElm (size_t &i) |
| Marks the end of current element for unstructured grids. | |
| bool | addLine (Real x1, Real y1, Real z1, Real x2, Real y2, Real z2) |
| Adds a line element to the grid, assuming nen is equal to two. | |
| size_t | addLine (size_t i1, const Vec3 &X2, int elmId=-1) |
| Adds a line element to the grid, assuming nen is equal to two. More... | |
| void | setElmId (size_t i, int iel) |
| Assigns an external ID to an element. | |
| int | getElmId (size_t i) const |
| Returns the external ID of an element. | |
| size_t | getElmIndex (size_t i) const |
| Returns the internal index of an element in case of mixed types. | |
| size_t | getNoNodes () const |
| Returns the total number of nodes in the block. | |
| size_t | getNoElms () const |
| Returns the total number of elements in the block. | |
| size_t | getNoElmNodes () const |
| Returns the number of nodes per element. | |
| void | setNoElmNodes (size_t nenod) |
| Sets the number of nodes per element. | |
| void | merge (const ElementBlock *other, std::vector< int > &nodeNums, bool uniqNodes=true) |
| Merges another element block into this one. | |
| void | merge (const ElementBlock &other, bool uniqNodes=true) |
| Merges another element block into this one. | |
| void | transform (const Matrix &Tlg) |
| Applies a transformation matrix from local to global system. | |
| std::vector< Vec3 >::const_iterator | begin_XYZ () const |
| Returns the beginning of the coordinate array. | |
| std::vector< Vec3 >::const_iterator | end_XYZ () const |
| Returns the end of the coordinate array. | |
| const Vec3 & | getCoord (size_t i) const |
| Returns the coordinate of a given node. | |
| const Real * | getParam (size_t i) const |
| Returns a pointer to the parameter values of a given node. | |
| const int * | getElements () const |
| Returns a pointer to the element connectivity array. | |
| bool | getElements (std::vector< int > &mnpc, size_t nenod) const |
| Get element connectivity array for elements with nenod nodes. | |
| utl::Point | getCenter (size_t i) const |
| Returns the coordinates of the center of the given element. | |
| void | removeElement (int iel) |
| Removes all elements with the specified external ID. | |
Additional Inherited Members | |
Static Public Attributes inherited from ElementBlock | |
| static double | eps = 0.0 |
| Element shrinkage factor. | |
Protected Types inherited from ElementBlock | |
| using | Prm3 = std::array< Real, 3 > |
| Convenience type. | |
Protected Attributes inherited from ElementBlock | |
| std::vector< Vec3 > | coord |
| Vector of nodal coordinates. | |
| std::vector< Prm3 > | param |
| Vector of parameter values of the nodal points. | |
| std::vector< int > | MMNPC |
| Matrix of Matrices of Nodal Point Correspondance. | |
| std::vector< int > | MINEX |
| Matrix of Internal to External element numbers. | |
| size_t | nen |
| Number of Element Nodes. | |
Class for sphere geometries.
This class is used to create sphere shapes in the model, for visualization of single-point elements, rigid contact objects, etc.
| SphereBlock::SphereBlock | ( | const Vec3 & | X0, |
| double | R, | ||
| size_t | nTheta = 180, |
||
| size_t | nPhi = 60 |
||
| ) |
The constructor defines a sphere centered at the specified point.
| [in] | X0 | Center of the sphere |
| [in] | R | Sphere diameter |
| [in] | nTheta | Number of elements around equator |
| [in] | nPhi | Number of elements from pole to pole |
References ElementBlock::setCoor(), ElementBlock::setNode(), ElementBlock::unStructResize(), Vec3::x, Vec3::y, and Vec3::z.