6 #ifndef TPZGEOTRIANGLEH 7 #define TPZGEOTRIANGLEH 75 static std::string
TypeName() {
return "Triangle";}
84 int space = nodes.
Rows();
86 for(
int i = 0; i < space; i++) {
88 for(
int j = 0; j < 3; j++) {
89 x[i] += phi(j,0)*nodes.
GetVal(i,j);
152 int space = nodes.
Rows();
153 int ncol = nodes.
Cols();
160 std::cout <<
"Objects of incompatible lengths, gradient cannot be computed." << std::endl;
161 std::cout <<
"nodes matrix must be 3x3." << std::endl;
169 for(
int i = 0; i < 3; i++)
171 for(
int j = 0; j < space; j++)
173 gradx(j,0) += nodes.
GetVal(j,i)*dphi(0,i);
174 gradx(j,1) += nodes.
GetVal(j,i)*dphi(1,i);
void Read(TPZStream &buf, void *context) override
read objects from the stream
static void VectorialProduct(TPZVec< REAL > &v1, TPZVec< REAL > &v2, TPZVec< REAL > &result)
TPZGeoTriangle()
Empty constructor.
static void X(const TPZFMatrix< REAL > &nodes, TPZVec< T > &loc, TPZVec< T > &x)
static bool IsLinearMapping(int side)
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.
Templated vector implementation.
Defines the topology of a triangle element. Topology Sides 0 to 2 are vertices, sides 3 to 5 are line...
int ClassId() const override
Define the class id associated with the class.
pztopology::TPZTriangle Top
void Jacobian(const TPZFMatrix< REAL > &coord, TPZVec< REAL > ¶m, TPZFMatrix< REAL > &jacobian, TPZFMatrix< REAL > &axes, REAL &detjac, TPZFMatrix< REAL > &jacinv)
TPZTriangle()
Default constructor.
TPZGeoTriangle(const TPZGeoTriangle &cp, std::map< int64_t, int64_t > &gl2lcNdMap)
Constructor with node map.
Defines enum MElementType and contains the implementation of MElementType_NNodes(...) functions.
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.
Contains the TPZTriangle class which defines the topology of a triangle.
int Zero() override
Makes Zero all the elements.
Groups all classes defining the structure of the master element.
static void ComputeNormal(TPZVec< REAL > &p1, TPZVec< REAL > &p2, TPZVec< REAL > &p3, TPZVec< REAL > &result)
Compute the jacoabina associated to the x mapping from local parametric coordinates.
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.
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.
TPZGeoTriangle(const TPZGeoTriangle &cp)
Copy constructor.
Implements ... Geometry Topology.
Implements the geometry of a triangle element. Geometry.
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.
TPZGeoTriangle(TPZVec< int64_t > &nodeindexes)
Constructor with list of nodes.
Defines the interface for saving and reading data. Persistency.
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
Groups all classes which model the geometry.
TPZGeoTriangle(const TPZGeoTriangle &cp, TPZGeoMesh &)
Copy constructor.
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.