34 template<
class T,
int N>
100 this->fNumInterfaces++;
106 this->fNumInterfaces--;
205 std::map<int64_t,int64_t> &gl2lcNdIdx,
206 std::map<int64_t,int64_t> &gl2lcElIdx)
const = 0;
226 virtual int NNodes()
const = 0;
247 virtual int64_t
NodeIndex(
int i)
const = 0;
264 std::cout <<
"ElementType should never be called\n";
287 virtual int NSides()
const = 0;
306 virtual int64_t
SideNodeIndex(
int side,
int nodenum)
const = 0;
340 while(lowFather->
Father())
342 lowFather = lowFather->
Father();
413 virtual void Print(std::ostream & out = std::cout);
456 tr.
Apply(ptin, ptout);
483 if(!father) fFatherIndex = -1;
484 else fFatherIndex = father->
Index();
492 fFatherIndex = fatherindex;
498 if (!gel || fMesh != gel->
fMesh) {
743 PZError <<
"TPZGeoEl::Divide is called.\n";
virtual int64_t SideNodeIndex(int side, int nodenum) const =0
Returns the index of the nodenum node of side.
virtual REAL SmallerEdge()
virtual void ProjectPoint(int sidefrom, TPZVec< REAL > &ptin, int sideto, TPZVec< REAL > &ptout)
Project the point from one side to another. The dimension of the points needs to be configured proper...
virtual TPZGeoElSide Father2(int side) const
Returns the father/side of the father which contains the side of the sub element. ...
REAL Volume()
Return the volume of the element.
Contains declaration of the TPZSavable class which defines the interface to save and restore objects ...
virtual TPZTransform< REAL > GetTransform(int side, int son)=0
virtual void LowerDimensionSides(int side, TPZStack< int > &smallsides) const =0
Implements computational element and a side. Computational Element.
TPZGeoNode * NodePtr(int i) const
Returns a pointer to the ith node of the element.
Contains declaration of TPZGeoElSide class which represents an element and its side, and TPZGeoElSideIndex class which represents an TPZGeoElSide index.
static REAL QuadArea(TPZVec< TPZGeoNode *> &nodes)
Returns the area from a quadrilateral face.
int MaterialId() const
Returns the material index of the element.
clarg::argBool bc("-bc", "binary checkpoints", false)
virtual void SetNeighbourInfo(int side, TPZGeoElSide &neigh, TPZTransform< REAL > &trans)=0
virtual void SetNeighbour(int side, const TPZGeoElSide &neighbour)=0
Fill in the data structure for the neighbouring information.
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
static REAL TriangleArea(TPZVec< TPZGeoNode *> &nodes)
Returns the area from the triangular face.
virtual void RandomPoint(TPZVec< REAL > &pt)=0
Generates a random point in the master domain.
static REAL Distance(TPZVec< REAL > ¢el, TPZVec< REAL > ¢face)
virtual bool IsGeoElMapped() const
Returns if is a TPZGeoElMapped< T > element.
virtual TPZTransform< REAL > BuildTransform2(int side, TPZGeoEl *father, TPZTransform< REAL > &t)
Returns the transformation which maps the parameter side of the element/side into the parameter spac...
TPZTransform< REAL > Projection(int side)
Compute the projection of the point within the interior of the element to the side of the element...
int64_t fFatherIndex
Index of the element from which the element is a subelement.
virtual int NCornerNodes() const =0
Returns the number of corner nodes of the element.
void Write(TPZStream &str, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
virtual TPZGeoNode * SideNodePtr(int side, int nodenum) const
Returns the pointer to the nodenum node of side.
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
Defines enum MElementType and contains the implementation of MElementType_NNodes(...) functions.
This class implements a simple vector storage scheme for a templated class T. Utility.
TPZGeoElSide Neighbour() const
virtual void Initialize()
TPZGeoMesh * Mesh() const
Returns the mesh to which the element belongs.
virtual int NSides() const =0
Returns the number of connectivities of the element.
virtual void Divide(TPZVec< TPZGeoEl *> &pv)
Divides the element and puts the resulting elements in the vector.
virtual int64_t NodeIndex(int i) const =0
Returns the index of the ith node the index is the location of the node in the nodevector of the mesh...
virtual int SideDimension(int side) const =0
Return the dimension of side.
int fMatId
Material index.
void SetIndex(int64_t index)
virtual void GetPermutation(const int &i, TPZVec< int > &permutation) const =0
int WhichSide(TPZVec< int64_t > &SideNodeIds)
Returns the side number which is connected to the SideNodes returns -1 if no side is found...
virtual bool ResetBlendConnectivity(const int64_t &side, const int64_t &index)=0
void CheckSubelDataStructure()
Checks the structure of the Father() and GetSubelement2()
Abstract class defining integration rules. Numerical Integration.
TPZTransform< REAL > ComputeParamTrans(TPZGeoEl *fat, int fatside, int sideson)
virtual void CenterPoint(int side, TPZVec< REAL > &masscent) const =0
It returns the coordinates from the center of the side of the element in the element coordinate space...
void Read(TPZStream &str, void *context) override
read objects from the stream
virtual std::string TypeName() const
Returns the type of the element as a string.
TPZGeoEl * EldestAncestor() const
virtual TPZGeoEl * SubElement(int is) const =0
Returns a pointer to the subelement is.
virtual TPZIntPoints * CreateSideIntegrationRule(int side, int order)=0
Creates an integration rule for the topology of the corresponding side and able to integrate a polyno...
TPZGeoEl * LowestFather()
Returns a pointer to the higher level father.
virtual int NSideSubElements(int side) const =0
Returns the number of subelements as returned by GetSubElements2(side)
int64_t fId
Traditional element number or element id.
friend std::ostream & operator<<(std::ostream &s, TPZGeoEl &el)
Equivalent to Print.
virtual void GetAllSiblings(TPZStack< TPZGeoEl *> &unrefinedSons)
[deprecated] use YoungestChildren
int ClassId() const override
Define the class id associated with the class.
void TransformSonToFather(TPZGeoEl *ancestor, TPZVec< REAL > &ksiSon, TPZVec< REAL > &ksiAncestor)
Compute the map of a paramenter point in the subelement to a parameter point in the super element...
int Level()
Returns the number of ancestors.
virtual TPZCompEl * CreateBCCompEl(int side, int bc, TPZCompMesh &cmesh)
Method which creates a computational boundary condition element based on the current geometric elemen...
int DecrementNumInterfaces()
Decrement number of TPZInterfaceElement pointing to this.
virtual void SetNodeIndex(int i, int64_t nodeindex)=0
Initializes the node i of the element.
int ElementExists(TPZGeoEl *elem, int64_t id)
To test continuity.
int WhichSubel() const
Returns the son number of the sub element gel.
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
virtual void SetFatherIndex(int64_t fatherindex)
Sets the father element index This method is not called SetFather in order to avoid implicit conversi...
int64_t Index() const
Returns the index of the element within the element vector of the mesh.
Contains TPZMatrixclass which implements full matrix (using column major representation).
virtual int FatherSide(int side, int son)
virtual void MidSideNodeIndices(int side, TPZVec< int64_t > &indices) const
Returns the midside node indices along a side of the element.
void ShapePhi1d(REAL x, int num, TPZFMatrix< REAL > &phi)
Computes the values of the "num" one dimensional shapefunctions at point x, using lagrangian interpol...
virtual void GetHigherSubElements(TPZVec< TPZGeoEl *> &unrefinedSons)
TPZCompEl * fReference
Reference to the element currently loaded. Pointer is given as this->Mesh()->Reference()->ElementVec(...
int fNumInterfaces
A counter to indicate how many interface elements are pointing to it.
int NumInterfaces()
Returns number of TPZInterfaceElement pointing to this.
virtual void GetSubElements2(int side, TPZStack< TPZGeoElSide > &subel) const
This method will return a partition of the side of the current element as the union of sub elements/...
virtual MElementType Type() const =0
Returns the element type acording to pzeltype.h.
void Jacobian(TPZVec< REAL > &qsi, TPZFMatrix< REAL > &jac, TPZFMatrix< REAL > &axes, REAL &detjac, TPZFMatrix< REAL > &jacinv) const
Compute a decomposition of the gradient of the mapping function, as a rotation matrix (Jacobian) and ...
virtual int SideNodeLocIndex(int side, int nodenum) const =0
Returns the local index of a node on a side.
TPZCompEl * Reference() const
Return a pointer to the element referenced by the geometric element.
void BuildBlendConnectivity()
Set connectivity information elements with blend geometric map.
int NormalOrientation(int side)
Determine the orientation of the normal vector comparing the ids of the neighbouring elements...
int64_t fIndex
Index of the element in the element vector.
virtual TPZGeoEl * CreateGeoElement(MElementType type, TPZVec< int64_t > &nodeindexes, int matid, int64_t &index)=0
Creates a geometric element according to the type of the father element.
virtual TPZGeoEl * CreateBCGeoEl(int side, int bc)=0
Method which creates a geometric element on the side of an existing element.
void InitializeNeighbours()
To be used after the buid connectivity. If some neighbour isn't initialized.
void ComputePermutationNormals(int side, TPZVec< int > &indexfrom)
Compute the set of normals along a side for defining HDiv approximation spaces.
virtual void HDivDirections(TPZVec< REAL > &pt, TPZFMatrix< REAL > &directions, int RestrainedFace)=0
virtual TPZGeoEl * ClonePatchEl(TPZGeoMesh &DestMesh, std::map< int64_t, int64_t > &gl2lcNdIdx, std::map< int64_t, int64_t > &gl2lcElIdx) const =0
Creates a clone of this element into a new patch mesh.
Creates interpolation, CompMesh and CompElement groups for Doxygen documentation. ...
virtual TPZGeoElSide Neighbour(int side)=0
Returns a pointer to the neighbour and the neighbourside along side of the current element...
void JacobianXYZ(TPZVec< REAL > &qsi, TPZFMatrix< REAL > &jac, TPZFMatrix< REAL > &axes, REAL &detjac, TPZFMatrix< REAL > &jacinv) const
Compute a decomposition of the gradient of the mapping function, as a rotation matrix (Jacobian) and ...
TPZGeoNode & Node(int i) const
Returns the ith node of the element.
void GetNodeIndices(TPZVec< int64_t > &nodeindices)
bool IsSibling(TPZGeoEl *gel)
return true is gel is an ancestor of the current element
virtual int NSideNodes(int side) const =0
Returns the number of nodes for a particular side.
virtual int64_t NeighbourIndex(int side) const =0
Returns the neighbour index for a given side.
virtual void SetSubElement(int i, TPZGeoEl *gel)=0
Sets the subelement of index i.
virtual int HasSubElement() const =0
Return 1 if the element has subelements.
virtual bool IsInParametricDomain(const TPZVec< REAL > &pt, REAL tol=1.e-2)=0
Verifies if the parametric point pt is in the element parametric domain.
virtual int NNodes() const =0
Returns the number of nodes of the element.
virtual bool IsLinearMapping() const
int NeighbourExists(int side, const TPZGeoElSide &gel)
Returns 1 if gel is a neighbour of the element along side.
virtual void HDivDirectionsMaster(TPZFMatrix< REAL > &directions)=0
virtual void PrintTopologicalInfo(std::ostream &out=std::cout)
Prints the coordinates of all nodes (geometric)
virtual void HDivPermutation(int side, TPZVec< int > &permutegather)
Computes the permutation for an HDiv side.
virtual void GradX(TPZVec< REAL > &qsi, TPZFMatrix< REAL > &gradx) const =0
Return the gradient of the transformation at the given coordinate.
virtual int SideIsUndefined(int side)=0
Returns 1 if the side has not been defined by buildconnectivity.
virtual void SetSideDefined(int side)=0
Flags the side as defined, this means no neighbouring element was found.
virtual ~TPZGeoEl()
Destructor.
virtual int Dimension() const =0
Returns the dimension of the element.
virtual TPZTransform< REAL > SideToSideTransform(int sidefrom, int sideto)=0
Compute the transformation between the master element space of one side of an element to the master e...
Defines the topology of the current refinement pattern to a mesh. Refine.
virtual void AllHigherDimensionSides(int side, int targetdimension, TPZStack< TPZGeoElSide > &elsides)=0
int64_t Id() const
Returns the Id of the element.
bool ComputeXInverse(TPZVec< REAL > &XD, TPZVec< REAL > &ksi, REAL Tol)
Computes the XInverse and returns true if ksi belongs to master element domain.
Implements a geometric node in the pz environment. Geometry.
virtual void X(TPZVec< REAL > &qsi, TPZVec< REAL > &result) const =0
Return the coordinate in real space of the point coordinate in the master element space...
virtual REAL RefElVolume()=0
Volume of the master element.
virtual REAL SideArea(int side)
Returns the area from the face.
This class implements a geometric mesh for the pz environment. Geometry.
MElementType
Define the element types.
virtual int ProjectInParametricDomain(TPZVec< REAL > &qsi, TPZVec< REAL > &qsiInDomain)=0
Ortogonal projection from given qsi to a qsiInDomain (all in the element parametric domain) ...
virtual bool IsGeoBlendEl() const
This class implements a stack object. Utility.
void ResetReference()
Reset the element referenced by the geometric element to NULL.
Implements computational mesh. Computational Mesh.
virtual REAL CharacteristicSize()
Computes the set of normals for defining HDiv approximation spaces.
void RemoveConnectivities()
It removes the connectivities of the element.
virtual TPZGeoEl * Clone(TPZGeoMesh &DestMesh) const =0
int GetTransformId2dT(TPZVec< int > &idfrom, TPZVec< int > &idto)
Get the transform id the face to face.
void SetReference(TPZCompEl *elp)
Make the current element reference to the computational element.
virtual TPZAutoPointer< TPZRefPattern > GetRefPattern() const
Returns the refinement pattern associated with the element.
void SetFather(TPZGeoEl *father)
Sets the father element.
void SetMaterialId(int id)
Sets the material index of the element.
static TPZFMatrix< REAL > gGlobalAxes
3x3 unit matrix to be copied to the axes if the geometric element does not have a particular orientat...
void Shape1d(REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Computes the values of the "num" one dimensional shapefunctions and derivatives at point x...
virtual void SetRefPattern(TPZAutoPointer< TPZRefPattern >)
Defines the refinement pattern. It's used only in TPZGeoElRefPattern objects.
void NodesCoordinates(TPZFMatrix< REAL > &cooridnates)
Computes nodes coordinates of the element.
TPZGeoMesh * fMesh
Pointer to the mesh to which the element belongs.
bool VerifyNodeCoordinates(REAL tol=1e-1)
Verify coordinate of element nodes checking if they are coincident to the X mapping of the corner nod...
Defines the interface for saving and reading data. Persistency.
Contains the declaration of TPZFlopCounter class and TPZCounter struct.
virtual REAL ElementRadius()
virtual int NPermutations() const =0
virtual void Print(std::ostream &out=std::cout)
Print all relevant data of the element to cout.
static int StaticClassId()
void SetNeighbourForBlending(int side)
TPZGeoBlend need to find a non-linear neighbour.
This class defines the interface to save and restore objects from TPZStream objects. Persistency.
Defines the interface of a computational element. Computational Element.
virtual void SetSubElementConnectivities()
Initializes the external connectivities of the subelements.
int IncrementNumInterfaces()
Increments number of TPZInterfaceElement pointing to this.
virtual int NSubElements() const =0
Returns the number of subelements of the element independent of the fact whether the element has alr...
TPZGeoEl * Father() const
Computes the normal vectors needed for forming HDiv vector valued shape functions.
virtual void ResetSubElements()=0
Reset all subelements to NULL.
int GetTransformId2dQ(TPZVec< int > &idfrom, TPZVec< int > &idto)
Get the transform id the face to face.
virtual int ProjectBissectionInParametricDomain(TPZVec< REAL > &qsi, TPZVec< REAL > &qsiInDomain)=0
Projection from given qsi to a qsiInDomain (in the element boundary) using bissection method from giv...
#define PZError
Defines the output device to error messages and the DebugStop() function.
virtual void MidSideNodeIndex(int side, int64_t &index) const =0
Returns the midside node index along a side of the element.
virtual void YoungestChildren(TPZStack< TPZGeoEl *> &unrefinedSons)
This method will return all children at the bottom of the refinement tree of the element. i.e. all children that have no subelements.