70 static std::string
TypeName() {
return "Hexahedron";}
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 != 8){
132 std::cout <<
"Objects of incompatible lengths, gradient cannot be computed." << std::endl;
133 std::cout <<
"nodes matrix must be 3x8." << std::endl;
141 for(
int i = 0; i <
NNodes; 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);
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
static void InsertExampleElement(TPZGeoMesh &gmesh, int matid, TPZVec< REAL > &lowercorner, TPZVec< REAL > &size)
create an example element based on the topology
static std::string TypeName()
Returns the type name of the element.
TPZGeoCube(TPZVec< int64_t > &nodeindexes)
Constructor with list of nodes.
Templated vector implementation.
TPZGeoCube()
Empty constructor.
TPZGeoCube(const TPZGeoCube &cp, std::map< int64_t, int64_t > &gl2lcNdMap)
Constructor with node map.
TPZGeoCube(const TPZGeoCube &cp, TPZGeoMesh &)
Copy constructor.
Defines enum MElementType and contains the implementation of MElementType_NNodes(...) functions.
static bool IsLinearMapping(int side)
int Zero() override
Makes Zero all the elements.
Defines the topology of the hexahedron element. Topology Sides 0 to 7 are vertices, sides 8 to 19 are lines, 20 to 25 are quadrilaterals and side 26 is the hexahedra (cube).
Groups all classes defining the structure of the master element.
TPZCube()
Default constructor.
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
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.
Implements ... Geometry Topology.
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 ClassId() const override
Define the class id associated with the class.
void Read(TPZStream &buf, void *context) override
read objects from the stream
This class implements a geometric mesh for the pz environment. Geometry.
static void X(const TPZFMatrix< REAL > &nodecoordinates, TPZVec< T > &loc, TPZVec< T > &x)
Compute x mapping from element nodes and local parametric coordinates.
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.
Contains the TPZCube class which defines the topology of the hexahedron element.
Groups all classes which model the geometry.
Implements the geometry of hexahedra element. 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.
TPZGeoCube(const TPZGeoCube &cp)
Copy constructor.
static void GradX(const TPZFMatrix< REAL > &nodecoordinates, TPZVec< T > &loc, TPZFMatrix< T > &gradx)
Compute gradient of x mapping from element nodes and local parametric coordinates.
Non abstract class which implements full matrices with preallocated storage with (N+1) entries...