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

Class for single-element plane geometries. More...

#include <ElementBlock.h>

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

Public Member Functions

 PlaneBlock (const Vec3 &X0, const Vec3 &X1, const Vec3 &X2)
 The constructor defines a plane from three 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 single-element plane geometries.

This class is used to create visualization of rigid contact planes.

Constructor & Destructor Documentation

◆ PlaneBlock()

PlaneBlock::PlaneBlock ( const Vec3 X0,
const Vec3 X1,
const Vec3 X2 
)

The constructor defines a plane from three points.

Parameters
[in]X0First corner
[in]X1Second corner
[in]X2Third corner

References ElementBlock::resize(), ElementBlock::setCoor(), ElementBlock::setElmId(), and ElementBlock::setNode().


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