40 template<
class T,
int N>
42 template<
class T,
int N>
77 virtual int ClassId()
const override;
101 std::map<int64_t,int64_t> & gl2lcConMap,
102 std::map<int64_t,int64_t> & gl2lcElMap)
const = 0;
134 if(fReferenceIndex == -1)
return 0.;
166 fReferenceIndex = referenceindex;
176 return materialids.find(gel->
MaterialId()) != materialids.end();
185 int64_t
Index()
const;
253 virtual void Print(std::ostream &out = std::cout)
const;
284 virtual void PrintTitle(
const char *VarName,std::ostream &out);
310 virtual bool HasMaterial(
const std::set<int> &materialids)
const;
354 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" - Method not implemented.\n";
368 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" - Method not implemented.\n";
388 if(indices.
size() != 0)
434 std::list<TPZOneShapeRestraint> loc;
463 std::cout <<
"Imposed for Hdiv solution ";
518 virtual void BuildConnectList(std::set<int64_t> &indepconnectlist, std::set<int64_t> &depconnectlist);
595 std::cout <<
"TPZCompEl::InitializeIntegrationRule should not be called\n";
606 std::cout <<
"TPZCompEl::SetIntegrationRule should not be called\n";
678 operator bool()
const 688 int Side()
const {
return fSide;}
694 void SetSide(
int side);
716 void HigherDimensionElementList(
TPZStack<TPZCompElSide> &elsidevec,
int onlyinterpolated,
int removeduplicates);
786 std::cout <<
"TPZCompEl::CreateGraphicalElement called\n";
787 this->
Print(std::cout);
791 std::cout <<
"TPZCompEl::Assemble is called." << std::endl;
795 std::cout <<
"TPZCompEl::CalcStiff(*,*) is called." << std::endl;
799 std::cout <<
"TPZCompEl::ProjectFlux is called." << std::endl;
804 return (other.
Element() != Element() || other.
Side() != Side());
809 return (other.
Element() == Element() && other.
Side() == Side());
815 out <<
"Side = " << celside.
Side()
virtual TPZVec< STATE > IntegrateSolution(int var) const
Compute the integral of a variable.
virtual void InitializeIntegrationRule()
virtual void ResetShapeRestraints()
Return a list with the shape restraints.
Represents a graphical mesh used for post processing purposes. Post processing.
static void SetgOrder(int order)
Sets the value of the default interpolation order.
REAL Volume()
Return the volume of the element.
Contains declaration of the TPZSavable class which defines the interface to save and restore objects ...
virtual void BuildCornerConnectList(std::set< int64_t > &connectindexes) const =0
adds the connect indexes associated with base shape functions to the set
Implements computational element and a side. Computational Element.
TPZCompEl()
Simple Constructor.
Represents a set of shape functions associated with a computational element/side. Computational Eleme...
bool operator!=(const TPZCompElSide &other)
Overlapping operator not equal.
virtual void ForcePrepareIntPtIndices()
PrepareIntPtIndices initializes the material damage varibles memory in the proper material class...
virtual MElementType Type()
Return the type of the element.
Implements a vector class which allows to use external storage provided by the user. Utility.
virtual void PrintCoordinate(TPZVec< REAL > &point, int CoordinateIndex, std::ostream &out)
Prints one coordinate index corresponding to the point to the output stream.
virtual void SetConnectIndex(int inode, int64_t index)=0
Set the index i to node inode.
int MaterialId() const
Returns the material index of the element.
virtual void BuildConnectList(std::set< int64_t > &indepconnectlist, std::set< int64_t > &depconnectlist)
Builds the list of all connectivities related to the element including the connects pointed to by dep...
virtual void EvaluateError(std::function< void(const TPZVec< REAL > &loc, TPZVec< STATE > &val, TPZFMatrix< STATE > &deriv)> func, TPZVec< REAL > &errors, bool store_error)
Performs an error estimate on the elemen.
virtual void resize(const int64_t newsize)
virtual void PrintSolution(TPZVec< REAL > &point, const char *VarName, std::ostream &out)
Prints the solution - sol - for the variable "VarName" at point specified in terms of the master elem...
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
bool operator!=(const TinyFad< Num, T > &x, const TinyFad< Num, T > &y)
virtual void SetCreateFunctions(TPZCompMesh *mesh)
Sets create function in TPZCompMesh to create elements of this type.
virtual int Dimension() const =0
Dimension of the element.
virtual bool NeedsComputing(const std::set< int > &materialids)
return true if the element has a variational statement associated with the material ids ...
virtual void CalcStiff(TPZElementMatrix &ek, TPZElementMatrix &ef)
Computes the element stifness matrix and right hand side.
virtual void ReduceInternalNodes()
Domain Decomposition. This method will eliminate the nodes which are internal to the element from the...
TPZGeoEl * GetRefElPatch()
Returns the reference geometric element patch. Look for a geometric element which refers to a comput...
TPZCompElSide()
Simple Constructor.
Definition of the retraint associated with the top of the pyramid.
virtual void CreateGraphicalElement(TPZGraphMesh &graphmesh, int dimension)
Creates corresponding graphical element(s) if the dimension matches graphical elements are used to ge...
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
virtual int NEquations()
Returns the number of equations of the element.
Defines enum MElementType and contains the implementation of MElementType_NNodes(...) functions.
bool operator==(const TPZCompElSide &other)
Overlapping operator equal.
virtual void PrintTitle(const char *VarName, std::ostream &out)
Prints the variables names associated with the element material.
This class implements a simple vector storage scheme for a templated class T. Utility.
REAL val(STATE &number)
Returns value of the variable.
static int StaticClassId()
TPZCompElSide(int zero)
Constructor which allows us to create a vector of objects.
friend std::ostream & operator<<(std::ostream &s, TPZCompEl &el)
Output device operator.
Contains TPZBlockDiagonal class which defines block diagonal matrices.
virtual TPZCompEl * ClonePatchEl(TPZCompMesh &mesh, std::map< int64_t, int64_t > &gl2lcConMap, std::map< int64_t, int64_t > &gl2lcElMap) const =0
Method for creating a copy of the element in a patch mesh.
virtual void CalcBlockDiagonal(TPZStack< int64_t > &connectlist, TPZBlockDiagonal< STATE > &block)
Calculates the diagonal block.
Contains the TPZTransfer class which implements a rectangular sparse block matrix.
virtual void LoadElementReference()
Loads the geometric element reference.
void SetElement(TPZCompEl *el)
Sets computational element pointer.
static int gOrder
Default interpolation order.
virtual void ProjectFlux(TPZElementMatrix &ek, TPZElementMatrix &ef)
Projects the flux function on the finite element space.
void SetMesh(TPZCompMesh *mesh)
Sets the grid of the element.
virtual void TransferMultiphysicsElementSolution()
virtual int ClassId() const override
Define the class id associated with the class.
Abstract class defining integration rules. Numerical Integration.
virtual int IsInterface()
This abstract class defines the behaviour which each derived class needs to implement.
virtual TPZMaterial * Material() const
Identify the material object associated with the element.
int64_t size() const
Returns the number of elements of the vector.
virtual TPZCompEl * Clone(TPZCompMesh &mesh) const =0
Method for creating a copy of the element.
Contains declaration of TPZMesh class which defines a geometrical mesh and contains a corresponding l...
void Read(TPZStream &buf, void *context) override
Read the element data from a stream.
virtual void Divide(int64_t index, TPZVec< int64_t > &subindex, int interpolate=0)
Divide the computational element. If interpolate = 1, the solution is interpolated to the sub element...
virtual void LoadSolution()
Loads the solution within the internal data structure of the element.
virtual void SetIntegrationRule(int order)
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
TPZCompElSide(const TPZCompElSide &celside)
Creates a computational element side from an object TPZCompElSide.
virtual bool HasMaterial(const std::set< int > &materialids) const
Verifies if the material associated with the element is contained in the set.
Contains TPZMatrixclass which implements full matrix (using column major representation).
virtual void SetIntegrationRule(TPZIntPoints *intrule)
Method to set a dynamically allocated integration rule.
#define DebugStop()
Returns a message to user put a breakpoint in.
This class defines the boundary condition for TPZMaterial objects.
TPZCompMesh * Mesh() const
Return a pointer to the grid of the element.
virtual int ComputeIntegrationOrder() const
void SetReference(int64_t referenceindex)
void SetIndex(int64_t index)
Sets element index of the mesh fELementVec list.
virtual void ComputeError(int errorid, TPZVec< REAL > &error)
ComputeError computes the element error estimator.
virtual void Integrate(int variable, TPZVec< STATE > &value)
Integrates a variable over the element.
virtual void AddShapeRestraint(TPZOneShapeRestraint restraint)
Add a shape restraint (meant to fit the pyramid to restraint.
static int GetgOrder()
Set the default value of the interpolation order.
int64_t fReferenceIndex
Index of reference element.
int Exists() const
Verifies if the object is non null (initialized)
TPZIntPoints * fIntegrationRule
Integration rule established by the user.
int64_t Index() const
Returns element index of the mesh fELementVec list.
Contains the TPZMaterialData class which implements an interface between TPZCompEl::CalcStiff and TPZ...
virtual void ComputeSolution(TPZVec< REAL > &qsi, TPZMaterialData &data)
virtual TPZConnect & Connect(int i) const
Returns a pointer to the ith node.
int fSide
Index of the object side.
virtual int64_t ConnectIndex(int i) const =0
Returns the index of the ith connectivity of the element.
Computes the contribution over an interface between two discontinuous elements. Computational Element...
Contains TPZMatrix<TVar>class, root matrix class.
This class associates an element matrix with the coeficients of its contribution in the global stiffn...
virtual void Assemble()
Computes the element stifness matrix and right hand side in an internal data structure. Used for initializing condensed element data structures.
virtual int NConnects() const =0
Returns the number of nodes of the element.
bool operator==(const TinyFad< Num, T > &x, const TinyFad< Num, T > &y)
virtual std::list< TPZOneShapeRestraint > GetShapeRestraints() const
Return a list with the shape restraints.
virtual void PrepareIntPtIndices()
Prepare the vector of the material withmem with the correct integration point indexes.
REAL LesserEdgeOfEl()
Will return the smallest distance between two nodes of the reference element.
TPZCompEl * Element() const
Gives a pointer to the reference computational element.
virtual void CalcResidual(TPZElementMatrix &ef)
Computes the element right hand side.
virtual void SetMemoryIndices(TPZVec< int64_t > &indices)
Set the indices of the vector of element memory associated with the integration points.
TPZGeoEl * Reference() const
Return a pointer to the corresponding geometric element if such exists, return 0 otherwise.
Implements a geometric node in the pz environment. Geometry.
virtual void SetMultiphysicsElementSolution()
MElementType
Define the element types.
This class implements a stack object. Utility.
virtual void SetFreeIntPtIndices()
Frees the material damage varibles memory in the proper material class.
Implements computational mesh. Computational Mesh.
Contains the functions to create different computational elements (one- two- three-dimensional).
virtual void Print(std::ostream &out=std::cout) const
Prints element data.
TPZCompEl * fEl
Pointer to the computational element.
virtual void Solution(TPZVec< REAL > &qsi, int var, TPZVec< STATE > &sol)
Calculates the solution - sol - for the variable var at point qsi, where qsi is expressed in terms of...
void Fill(const T ©, const int64_t from=0, const int64_t numelem=-1)
Will fill the elements of the vector with a copy object.
int Side() const
Returns the side index.
void Write(TPZStream &buf, int withclassid) const override
Save the element data to a stream.
Defines the interface for saving and reading data. Persistency.
Contains the declaration of TPZFlopCounter class and TPZCounter struct.
virtual const TPZIntPoints & GetIntegrationRule() const
virtual REAL VolumeOfEl()
Returns the volume of the geometric element associated.
virtual ~TPZCompEl()
Simple destructor.
static void Chebyshev(REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Implements of the orthogonal Chebyshev functions.
virtual int NumberOfCompElementsInsideThisCompEl()
Return the size of the elementvec in multiphysics, if it is not multiphysics, just return 1...
REAL MaximumRadiusOfEl()
Will return the maximum distance between the nodes of the reference element.
TPZCompElSide(TPZCompEl *cel, int side)
Creates an computational element side given a computational element and the side index.
virtual int PressureConnectIndex() const
Returns the index of the pressure connect.
This class defines the interface to save and restore objects from TPZStream objects. Persistency.
Defines the interface of a computational element. Computational Element.
virtual REAL CompareElement(int var, char *matname)
This method computes the norm of the difference of a post processed variable with @ the same post pro...
virtual int HasDependency()
Returns 1 if the element has at least one dependent node. Returns 0 otherwise.
int64_t fIndex
Element index into mesh element vector.
Implements computational element based on an interpolation space. Computational Element.
static void SetOrthogonalFunction(void(*orthogonal)(REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi))
Sets the orthogonal function which will be used throughout the program by default this function is th...
#define PZError
Defines the output device to error messages and the DebugStop() function.
TPZCompMesh * fMesh
Computational mesh to which the element belongs.
virtual void GetMemoryIndices(TPZVec< int64_t > &indices) const
Get the indices of the vector of element memory associated with the integration points.