37 m_invJcomputed (false),
40 m_nodeSharingCells({})
66 "nullptr node, so we can not deduce the node with minimal index"
104 "Trying to get jacobian matrix of element with global index #"
115 "Trying to get jacobian matrix of element with global index #"
132 "Determinant of geometrical element #" <<
getGlobalIndex () <<
"is non-positive."
184 std::copy(nodes, nodes + nNodes,
m_nodes.begin ());
206 "Passed cell is nullptr"
CepsCellType
Enum for different shapes of cells.
#define CEPS_ABORT_IF(condition, message)
Stops the execution with a message if condition is true. If testing is enabled, only throws a runtime...
CepsGlobalIndex CepsCellGlobalIndex
Indices of cells.
std::set< _Type, _Compare, _Alloc > CepsSet
C++ set.
std::vector< _Type, _Alloc > CepsVector
C++ vector.
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
float CepsReal
Need single precision floating point.
Eigen::Matrix< CepsScalar, 3, 1 > CepsMathVertex
Vertex, eigen format.
CepsGlobalIndex CepsNodeGlobalIndex
Indices of nodes.
CepsArray3< CepsReal > CepsReal3D
Three real scalars, used like this for compatibility in polynomials.
CepsStandardArgs getStandardArgsFrom(GeomCell *cell)
Returns a CepsStandardArgs structure with data from given cell.
CepsReal3D & getCoordinates()
Get three coordinates, read & write.
Abstract class for geometrical cell. On top of index and attributes managament, the cell has informat...
JacobianMatrixType m_jacobian
Jacobian Matrix.
void setNodeSharingCellsIndices(const CepsSet< CepsCellGlobalIndex > &nCellIds)
Cells that share at least one node with self.
InverseJacobianMatrixType m_invJacobian
Inverse of Jacobian Matrix.
virtual CepsUInt getNumberOfNodes() const =0
Volume for 3D, area for 2D, length for 1D, 0 for points.
CepsBool m_invJcomputed
Flag to trigger computation of invJ.
void initialize(CepsUInt dim, CepsCellType cellType, CepsUInt nNodes)
internal init method
Eigen::Matrix< CepsReal, 3, Eigen::Dynamic > JacobianMatrixType
Typedef for jaccobian matrix.
virtual void computeJacobianMatrix()=0
Compute geometrical Jacobian matrix.
const CepsCellType & getCellType() const
Get the type of cell.
CepsMathVertex getNormal() const
Sets the normal vector, (useful for boundary cells only)
Eigen::Matrix< CepsReal, Eigen::Dynamic, 3 > InverseJacobianMatrixType
Typedef for inverse jaccobian matrix.
virtual void reset()
Wipes content.
GeomCell()
default constructor
CepsReal getJacobianDeterminant() const
Jacobian of geometrical deformation from reference cell.
virtual CepsBool checkJacobianDeterminant()=0
Tells if determinant is negative, tries to swap points to make it positive.
const CepsSet< CepsCellGlobalIndex > & getNodeSharingCellsIndices() const
Cells that share at least one node with self.
virtual void initializeNodes(GeomNode *const *nodes, CepsUInt nNodes)
internal init method
CepsReal m_detJacobian
determinant of Jacobian matrix
virtual const JacobianMatrixType & getJacobianMatrix()
Jacobian Matrix of deformation from reference cell (3 rows for R^3, element dimension columns)
CepsReal getDiameter()
Size of cell.
CepsSet< CepsCellGlobalIndex > m_nodeSharingCells
IDs of cells that have a node in common.
virtual const InverseJacobianMatrixType & getInverseJacobianMatrix()
Jacobian Matrix of deformation from reference cell (3 rows for R^3, element dimension columns)
CepsReal m_diameter
Size of cell.
virtual void refresh()
Recomputes jacobian matrix and determinant.
virtual void computeInverseJacobianMatrix()=0
Compute inverse of geometrical Jacobian matrix.
CepsMathVertex m_normal
For boundary cells, outward normal vector.
void setNormal(CepsMathVertex n)
Sets the normal vector, (useful for boundary cells only)
virtual void computeJacobianDeterminant()=0
Compute geometrical Jacobian determinant.
void computeDiameter()
Computes size of cell (max edge length)
CepsCellType m_cellType
Cell type.
GeomNode * getNodeWithMinimalIndex() const
Returns node with smallest index (used eg to determine ownership)
Base class for nodes used in meshes.
void reset()
Equivalent to HoldsAttributes::clear()
CepsSet< CepsAttribute > & getAttributes()
Returns the attributes of the entity.
void reset()
Sets the entity as NOT being on boundary.
void reset()
Equivalent to HoldsCells::clearCells.
void setDimension(const CepsUInt &dim)
Set the dimension of the object.
const CepsUInt & getDimension() const
Get the dimension of the object.
void reset()
Set the dimension of the object to 0.
const CepsGlobalIndex & getGlobalIndex() const
Get the index
CepsGlobalIndex m_globalIndex
the index
void reset()
Set the index to 0u.
CepsVector< GeomNode * > m_nodes
The node pointers.
void reset()
Equivalent to HoldsNodes::clearNodes.
GeomNode * getNodeAt(const CepsUInt &i)
Pointer to the i-th node.
void reset()
Gives ownership to rank(), removes halos.
CepsBool isValidPtr(_Type *ptr)
Tells if pointer is not null.
const _Type & max(const CepsVector< _Type, _Alloc > &vec)
Returns the maximum of the vector, const version.
CepsBool isNullPtr(_Type *ptr)
Tells if passed pointer is null.
Structure used to pass arguments to SAFunc (see pde directory) The flags of the SAFunc allows extract...
CepsSet< CepsAttribute > attr
attributes
CepsCellGlobalIndex cellId
cell index