9 #ifndef __PZ__TPZTriangleTorus__ 10 #define __PZ__TPZTriangleTorus__ 44 std::map<int64_t,int64_t> & gl2lcNdMap) :
TPZGeoTriangle(cp,gl2lcNdMap), fR(cp.fR), fr(cp.fr), fOrigin(cp.fOrigin), fPhiTheta(cp.fPhiTheta)
60 TPZGeoTriangle::operator=(cp);
71 if (phitheta.
Rows() != 2 || phitheta.
Cols() != 3) {
98 static std::string
TypeName() {
return "Wavy";}
107 toro[0] = (fR + fr*
cos(result[0]))*
cos(result[1]);
108 toro[1] = (fR + fr*
cos(result[0]))*
sin(result[1]);
109 toro[2] = fr*
sin(result[0]);
121 DxDphi(0,0) = -
cos(ft[1]) *
sin(ft[0]);
122 DxDphi(0,1) = -(3. +
cos(ft[0])) *
sin(ft[1]);
123 DxDphi(1,0) = -
sin(ft[1]) *
sin(ft[0]);
124 DxDphi(1,1) =
cos(ft[1]) * (3. +
cos(ft[0]));
125 DxDphi(2,0) =
cos(ft[0]);
127 DxDphi.Multiply(gradphi, gradx);
147 result[0] = (fR + fr*
cos(resloc[0]))*
cos(resloc[1]);
148 result[1] = (fR + fr*
cos(resloc[0]))*
sin(resloc[1]);
149 result[2] = fr*
sin(resloc[0]);
167 fPhiTheta.
Read(buf,0);
175 fPhiTheta.
Write(buf, 0);
void Read(TPZStream &buf, void *context) override
read objects from the stream
static REAL cornerco[8][3]
static std::string TypeName()
Returns the type name of the element.
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
static void X(const TPZFMatrix< REAL > &nodes, TPZVec< T > &loc, TPZVec< T > &x)
TPZTriangleTorus(const TPZTriangleTorus &cp, std::map< int64_t, int64_t > &gl2lcNdMap)
Constructor with node map.
TPZTriangleTorus(const TPZTriangleTorus &cp)
Copy constructor.
void SetOrigin(TPZVec< REAL > &origin)
void SetDataRadius(const REAL &R, const REAL &r)
void X(TPZFMatrix< REAL > &coord, TPZVec< T > &loc, TPZVec< T > &result) const
TPZManVector< REAL > fOrigin
TPZTriangleTorus(const TPZTriangleTorus &cp, TPZGeoMesh &)
Copy constructor.
void Read(TPZStream &buf, void *context) override
read objects from the stream
static void InsertExampleElement(TPZGeoMesh &gmesh, int matid, TPZVec< REAL > &lowercorner, TPZVec< REAL > &size)
virtual void Write(const bool val)
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.
#define DebugStop()
Returns a message to user put a breakpoint in.
TPZTriangleTorus & operator=(const TPZTriangleTorus &cp)
int64_t Rows() const
Returns number of rows.
void GradX(TPZFMatrix< REAL > &cornerco, TPZVec< T > &par, TPZFMatrix< T > &gradx) const
TPZFNMatrix< 12, REAL > fPhiTheta
Implements the geometry of a triangle element. Geometry.
void X(const TPZFMatrix< REAL > &nodes, TPZVec< T > &loc, TPZVec< T > &result) const
This class implements a geometric mesh for the pz environment. Geometry.
void SetDataPhiTheta(const TPZFMatrix< REAL > &phitheta)
void Read(TPZStream &buf, void *context) override
Creates a geometric element according to the type of the father element.
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
int64_t Cols() const
Returns number of cols.
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.
int ClassId() const override
Creates a geometric element according to the type of the father element.
Groups all classes which model the geometry.
TPZFlopCounter cos(const TPZFlopCounter &orig)
Returns the cosine in radians and increments the counter of the Cosine.
TPZTriangleTorus()
Empty constructor.
TPZTriangleTorus(TPZVec< int64_t > &nodeindexes)
Constructor with list of nodes.
virtual void Read(bool &val)