6 #ifndef TPZGEOTETRAHEDRAH 7 #define TPZGEOTETRAHEDRAH 77 static std::string
TypeName() {
return "Tetrahedron";}
112 int space = nodes.
Rows();
114 for(
int i = 0; i < space; i++) {
116 for(
int j = 0; j <
NNodes; j++) {
117 x[i] += phi(j,0)*nodes.
GetVal(i,j);
128 int nrow = nodes.
Rows();
129 int ncol = nodes.
Cols();
131 if(nrow != 3 || ncol != 4){
132 std::cout <<
"Objects of incompatible lengths, gradient cannot be computed." << std::endl;
133 std::cout <<
"nodes matrix must be 3x4." << std::endl;
141 for(
int i = 0; i < 4; i++)
143 for(
int j = 0; j < 3; j++)
145 gradx(j,0) += nodes.
GetVal(j,i)*dphi(0,i);
146 gradx(j,1) += nodes.
GetVal(j,i)*dphi(1,i);
147 gradx(j,2) += nodes.
GetVal(j,i)*dphi(2,i);
TPZGeoTetrahedra(const TPZGeoTetrahedra &cp, TPZGeoMesh &)
Copy constructor.
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
Templated vector implementation.
static void GradX(const TPZFMatrix< REAL > &nodes, TPZVec< T > &loc, TPZFMatrix< T > &gradx)
Compute gradient of x mapping from element nodes and local parametric coordinates.
static void InsertExampleElement(TPZGeoMesh &gmesh, int matid, TPZVec< REAL > &lowercorner, TPZVec< REAL > &size)
create an example element based on the topology
Defines enum MElementType and contains the implementation of MElementType_NNodes(...) functions.
int ClassId() const override
Define the class id associated with the class.
void Read(TPZStream &buf, void *context) override
read objects from the stream
TPZGeoTetrahedra(const TPZGeoTetrahedra &cp, std::map< int64_t, int64_t > &gl2lcNdMap)
Constructor with node map.
Contains the TPZTetrahedron class which defines the topology of the tetrahedron element.
static std::string TypeName()
Returns the type name of the element.
static void TShape(const TPZVec< T > &loc, TPZFMatrix< T > &phi, TPZFMatrix< T > &dphi)
Compute the shape being used to construct the x mapping from local parametric coordinates.
int Zero() override
Makes Zero all the elements.
Groups all classes defining the structure of the master element.
static bool IsLinearMapping(int side)
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
TPZGeoTetrahedra(TPZVec< int64_t > &nodeindexes)
Constructor with list of nodes.
Contains TPZMatrixclass which implements full matrix (using column major representation).
#define DebugStop()
Returns a message to user put a breakpoint in.
int64_t Rows() const
Returns number of rows.
Contains the TPZNodeRep class which implements ... Clase intermediaria que guarda.
pztopology::TPZTetrahedron Top
Implements ... Geometry Topology.
static void X(const TPZFMatrix< REAL > &nodes, TPZVec< T > &loc, TPZVec< T > &x)
Compute x mapping from element nodes and local parametric coordinates.
Implements the geometry of a tetrahedral element. Geometry.
Defines the topology of the tetrahedron element. Topology Sides 0 to 3 are vertices, sides 4 to 9 are lines, sides 10 to 13 are triangles and side 14 is the tetrahedra.
TPZGeoTetrahedra(const TPZGeoTetrahedra &cp)
Copy constructor.
This class implements a geometric mesh for the pz environment. Geometry.
int64_t Cols() const
Returns number of cols.
int Resize(const int64_t newRows, const int64_t wCols) override
Redimension a matrix, but maintain your elements.
Defines the interface for saving and reading data. Persistency.
TPZGeoTetrahedra()
Empty constructor.
Groups all classes which model the geometry.
const TVar & GetVal(const int64_t row, const int64_t col) const override
Get values without bounds checking This method is faster than "Get" if DEBUG is defined.
TPZTetrahedron()
Default constructor.
Non abstract class which implements full matrices with preallocated storage with (N+1) entries...