IFEM  90A354
Public Member Functions | List of all members
CylinderBlock Class Reference

Class for cylinder geometries. More...

#include <ElementBlock.h>

Inheritance diagram for CylinderBlock:
Inheritance graph
[legend]
Collaboration diagram for CylinderBlock:
Collaboration graph
[legend]

Public Member Functions

 CylinderBlock (const Vec3 &X0, const Vec3 &X1, double R, size_t nTheta=180)
 The constructor defines a cylinder along an axis through 2 points. 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 Vec3getCoord (size_t i) const
 Returns the coordinate of a given node.
 
const RealgetParam (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< Vec3coord
 Vector of nodal coordinates.
 
std::vector< Prm3param
 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.
 

Detailed Description

Class for cylinder geometries.

This class is used to create cylinder shapes in the model, for visualization of rigid contact objects, etc.

Constructor & Destructor Documentation

◆ CylinderBlock()

CylinderBlock::CylinderBlock ( const Vec3 X0,
const Vec3 X1,
double  R,
size_t  nTheta = 180 
)

The constructor defines a cylinder along an axis through 2 points.

Parameters
[in]X0First end point
[in]X1Second end point
[in]RCylinder diameter
[in]nThetaNumber of elements in circular direction

References ElementBlock::setCoor(), ElementBlock::setNode(), and ElementBlock::unStructResize().


The documentation for this class was generated from the following files: