14 static LoggerPtr logger(Logger::getLogger(
"pz.mesh.tpzintelgen"));
17 template<
class TSHAPE>
30 for(
int i=0;i<TSHAPE::NSides;i++) {
40 template<
class TSHAPE>
47 template<
class TSHAPE>
54 template<
class TSHAPE>
57 std::map<int64_t,int64_t> & gl2lcConMap,
58 std::map<int64_t,int64_t> & gl2lcElMap) :
65 for(i=0;i<TSHAPE::NSides;i++)
69 if (gl2lcConMap.find(glIdx) != gl2lcConMap.end()) lcIdx = gl2lcConMap[glIdx];
72 std::stringstream sout;
73 sout <<
"ERROR in : " << __PRETTY_FUNCTION__
74 <<
" trying to clone the connect index: " << glIdx
75 <<
" wich is not in mapped connect indexes!";
85 template<
class TSHAPE>
91 for(i=0;i<TSHAPE::NSides;i++) {
96 template<
class TSHAPE>
108 int64_t nconnects = connectlist.
size();
109 for (
int ic = 0; ic < nconnects; ic++) {
110 if (connectlist[ic] != -1){
116 template<
class TSHAPE>
118 return TSHAPE::Type();
121 template<
class TSHAPE>
124 if(i<0 || i>= TSHAPE::NSides) {
125 std::cout <<
" TPZIntelGen<TSHAPE>::SetConnectIndex index " << i <<
133 template<
class TSHAPE>
136 if(connect < TSHAPE::NCornerNodes)
return TSHAPE::NConnectShapeF(connect,0);
137 if(order < 0)
return 0;
138 int nshape = TSHAPE::NConnectShapeF(connect, order);
142 nshape = TSHAPE::NConnectShapeF(connect, order);
149 template<
class TSHAPE>
155 template<
class TSHAPE>
157 return TSHAPE::NContainedSides(side);
160 template<
class TSHAPE>
162 return TSHAPE::ContainedSideLocId(side,node);
166 template<
class TSHAPE>
172 template<
class TSHAPE>
174 ord.
Resize(TSHAPE::NSides-TSHAPE::NCornerNodes);
176 for(i=0; i<TSHAPE::NSides-TSHAPE::NCornerNodes; i++) {
182 template<
class TSHAPE>
184 if(side < TSHAPE::NCornerNodes)
return 0;
185 if(side<TSHAPE::NSides) {
189 PZError <<
"TPZIntelgen::PreferredSideOrder called for side = " << side <<
"\n";
194 template<
class TSHAPE>
199 std::cout <<
"TPZIntelgen::ConnectIndex wrong parameter con " << con <<
200 " NSides " << TSHAPE::NSides <<
" NConnects " <<
NConnects() << std::endl;
214 template<
class TSHAPE>
221 template<
class TSHAPE>
223 if(side<0 || side >= TSHAPE::NSides || (side >= TSHAPE::NCornerNodes && order <1)) {
224 PZError <<
"TPZIntelGen::SetSideOrder. Bad paramenter side " << side <<
" order " << order << std::endl;
227 std::stringstream sout;
228 sout << __PRETTY_FUNCTION__ <<
" Bad side or order " << side <<
" order " << order;
233 if(side>= TSHAPE::NCornerNodes) {
240 int previousconnectorder = c.
Order();
241 if (order != previousconnectorder)
248 int nshape = TSHAPE::NConnectShapeF(side, order);
255 int64_t neq = equal.
size();
256 for (int64_t eq=0; eq<neq; eq++) {
262 int neworder = prevorder;
266 if(neworder != prevorder) {
273 template<
class TSHAPE>
275 if(side < TSHAPE::NCornerNodes || side >= TSHAPE::NSides)
return 0;
278 std::stringstream sout ;
279 sout << __PRETTY_FUNCTION__ <<
" side " << side << std::endl;
284 std::cout << sout.str() << std::endl;
292 int order = c.
Order();
293 for (
int is=0; is<lowdim.
size(); is++) {
300 template<
class TSHAPE>
306 template<
class TSHAPE>
309 int nc = TSHAPE::NContainedSides(side);
310 int nn = TSHAPE::NSideNodes(side);
316 int nodloc = TSHAPE::SideNodeLocId(side,n);
320 int conloc = TSHAPE::ContainedSideLocId(side,c);
323 TSHAPE::SideShape(side, point,
id, order, phi, dphi);
326 template<
class TSHAPE>
329 TPZManVector<int, TSHAPE::NSides-TSHAPE::NCornerNodes+1> ord(TSHAPE::NSides-TSHAPE::NCornerNodes,0);
332 for(i=0; i<TSHAPE::NCornerNodes; i++) {
335 for(i=0; i<TSHAPE::NSides-TSHAPE::NCornerNodes; i++) {
342 template<
class TSHAPE>
344 return TSHAPE::TransformSideToElement(side);
348 template<
class TSHAPE>
358 buf.
Write ( &classid, 1 );
362 template<
class TSHAPE>
372 buf.
Read( &classid, 1 );
373 if ( classid != this->
ClassId())
375 std::stringstream sout;
376 sout <<
"ERROR - " << __PRETTY_FUNCTION__
377 <<
" trying to restore an object id " << this->
ClassId() <<
" for an package of id = " << classid;
395 if(dimension == 0) std::cout <<
"A point element has no graphical representation\n";
398 template<
class TSHAPE>
400 if(dimension == TSHAPE::Dimension ) {
401 new typename TSHAPE::GraphElType(
this,&grafgrid);
Represents a graphical mesh used for post processing purposes. Post processing.
Contains TPZShapeTetra class which implements the shape functions of a tetrahedral element...
Contains the TPZGraphElTd class which implements the graphical discontinuous triangular element...
Contains the TPZInt1d, TPZIntTriang, TPZIntQuad, TPZIntCube3D, TPZIntTetra3D, TPZIntPyram3D and TPZIn...
Contains declaration of TPZIntelGen class which implements a generic computational element...
virtual void LowerDimensionSides(int side, TPZStack< int > &smallsides) const =0
virtual int ConnectOrder(int connect) const
Returns the actual interpolation order of the polynomial for a connect.
virtual void SideShapeFunction(int side, TPZVec< REAL > &point, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi) override
Compute the values of the shape function of the side.
int Set(const int index, const int dim, const int pos=-1)
Modifies existing block dimensions or creates a new block with given index.
Represents a set of shape functions associated with a computational element/side. Computational Eleme...
TPZGeoNode * NodePtr(int i) const
Returns a pointer to the ith node of the element.
Contains definitions to LOGPZ_DEBUG, LOGPZ_INFO, LOGPZ_WARN, LOGPZ_ERROR and LOGPZ_FATAL, and the implementation of the inline InitializePZLOG(string) function using log4cxx library or not. It must to be called out of "#ifdef LOG4CXX" scope.
virtual int64_t ConnectIndex(int node) const override
Returns the index of the ith connectivity of the element.
int MaterialId() const
Returns the material index of the element.
void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
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...
void SetOrder(int order, int64_t index)
Set the order of the shapefunction associated with the connect.
virtual int NConnectShapeF(int connect, int order) const override
Returns the number of shapefunctions associated with a connect.
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
groups all classes dedicated to the computation of shape functions
virtual void SetIntegrationRule(int ord) override
virtual void SetPreferredOrder(int order) override
Sets the preferred interpolation order along a side.
int AdjustPreferredSideOrder(int side, int order)
Adjusts the preferredSideOrder for faces.
Contains the TPZPoint class which defines the topology of a point.
Contains the TPZRefQuad class which implements the uniform refinement of a geometric quadrilateral el...
virtual void RemoveSideRestraintsII(MInsertMode mode)
Delete the restraints on the nodes of the connected elements if necessary.
virtual int NStateVariables() const =0
Returns the number of state variables associated with the material.
virtual int ClassId() const override
returns the unique identifier for reading/writing objects to streams
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
virtual void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
virtual int64_t CreateMidSideConnect(int side)
Verify the neighbours of the element and create a node along this side.
void EqualLevelCompElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Returns all connected computational elements which have equal level to the current element...
Contains the TPZTriangle class which defines the topology of a triangle.
Contains TPZShapeLinear class which implements the shape functions of a linear one-dimensional elemen...
Contains the TPZRefPyramid class which implements the uniform refinement of a geometric hexahedral el...
Contains the TPZTetrahedron class which defines the topology of the tetrahedron element.
void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
virtual int NConnects() const override
Returns the number of connect objects of the element.
This abstract class defines the behaviour which each derived class needs to implement.
Contains TPZShapeCube class which implements the shape functions of a hexaedral element.
virtual TPZMaterial * Material() const
Identify the material object associated with the element.
virtual void GetInterpolationOrder(TPZVec< int > &ord) override
Identifies the interpolation order on the interior of the element.
int64_t size() const
Returns the number of elements of the vector.
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object reallocating the necessary storage, copying the existing objects to the new...
Contains the TPZRefPrism class which implements the uniform refinement of a geometric prism element...
unsigned char Order() const
Access function to return the order associated with the connect.
int64_t SequenceNumber() const
Returns the Sequence number of the connect object.
Contains the TPZGraphElT3d class which implements the graphical representation of a tetrahedra elemen...
virtual void Write(const bool val)
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Contains the TPZGraphElQ2dd class which implements the graphical two-dimensional discontinuous elemen...
Contains the TPZGeoTetrahedra class which implements the geometry of a tetrahedral element...
#define DebugStop()
Returns a message to user put a breakpoint in.
virtual TPZConnect & MidSideConnect(int is) const
Returns a reference to the connect in the middle of the side.
Contains the TPZGraphElPrismMapped class which implements the graphical element for a prism using a d...
TPZCompMesh * Mesh() const
Return a pointer to the grid of the element.
void SetNState(int nstate)
Set the number of state variables.
Contains the TPZQuadrilateral class which defines the topology of a quadrilateral element...
void CreateGraphicalElement(TPZGraphMesh &grafgrid, int dimension) override
Creates corresponding graphical element(s) if the dimension matches graphical elements are used to ge...
TPZMaterial * FindMaterial(int id)
Find the material with identity id.
TPZCompEl * Reference() const
Return a pointer to the element referenced by the geometric element.
void Shape(TPZVec< REAL > &pt, TPZVec< int > orders, TPZVec< TPZTransform< REAL > > &transvec, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
virtual void SetInterpolationOrder(int order)
Sets the interpolation order for the interior of the element.
void SetNShape(int nshape)
Set the number of shape functions associated with the connect.
const TPZBlock< STATE > & Block() const
Access the block structure of the solution vector.
virtual void SetConnectIndex(int i, int64_t connectindex) override
Sets the node pointer of node i to nod.
void Shape(TPZVec< REAL > &pt, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi) override
Computes the shape function set at the point x.
Contains the TPZGraphElPyramidMapped class which implements the graphical element for a pyramid using...
TPZAdmChunkVector< TPZConnect > & ConnectVec()
Return a reference to the connect pointers vector.
T * begin() const
Casting operator. Returns The fStore pointer.
Contains TPZShapePoint class which implements the shape function associated with a point...
#define LOGPZ_ERROR(A, B)
Define log for errors (cout)
Contains declaration of TPZCompMesh class which is a repository for computational elements...
Contains TPZShapePiram class which implements the shape functions of a pyramid element. author: Nathan Shauer date: 01/04/2015.
virtual MElementType Type() override
Return the type of the element.
virtual TPZConnect & Connect(int i) const
Returns a pointer to the ith node.
Contains the TPZPyramid class which defines the topology of a pyramid element.
virtual void SetSideOrder(int side, int order) override
Sets the interpolation order of side to order.
Contains the TPZGeoPoint class which implements the geometry of a point element or 0-D element...
Contains TPZShapePrism class which implements the shape functions of a prism element.
Contains the TPZRefTriangle class which implements the uniform refinement of a geometric triangular e...
TPZManVector< int64_t, TSHAPE::NSides > fConnectIndexes
Indexes of the connects associated with the elements.
Contains the TPZRefTetrahedra class which implements the uniform refinement of a geometric tetrahedra...
TPZGeoEl * Reference() const
Return a pointer to the corresponding geometric element if such exists, return 0 otherwise.
MElementType
Define the element types.
void ResetReference()
Reset the element referenced by the geometric element to NULL.
TPZTransform TransformSideToElement(int side) override
Returns the transformation which transform a point from the side to the interior of the element...
Implements computational mesh. Computational Mesh.
TSHAPE::IntruleType fIntRule
Integration rule associated with the topology of the element.
virtual int SideConnectLocId(int node, int side) const override
Returns the local node number of icon along is.
void SetReference(TPZCompEl *elp)
Make the current element reference to the computational element.
Contains the TPZGraphElT2dMapped class which implements a graphical element for a triangle mapped int...
Contains the TPZRefLinear class which implements the uniform refinement of a geometric linear element...
Contains TPZShapePiram class which implements the shape functions of a pyramid element.
Contains the TPZGeoPyramid class which implements the geometry of pyramid element.
int Id() const
Returns the identity of the current node.
Defines the interface for saving and reading data. Persistency.
Contains the TPZGraphEl1dd class which implements the graphical one dimensional discontinuous element...
Contains the TPZGeoPrism class which implements the geometry of a prism element.
Contains the TPZCube class which defines the topology of the hexahedron element.
virtual int PreferredSideOrder(int iside) override
Returns the preferred order of the polynomial along side iside.
virtual void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
Contains the TPZLine class which defines the topology of a line element.
virtual int NSideConnects(int side) const override
Returns the number of dof nodes along side iside.
int fPreferredOrder
Preferred polynomial order.
virtual void AdjustIntegrationRule()
Adjust the integration rule according to the polynomial order of shape functions. ...
Contains the TPZPrism class which defines the topology of a Prism.
Defines the interface of a computational element. Computational Element.
virtual int EffectiveSideOrder(int side) const override
Returns the actual interpolation order of the polynomial along the side.
Contains TPZShapeQuad class which implements the shape functions of a quadrilateral element...
Contains the TPZRefCube class which implements the uniform refinement of a geometric hexahedral eleme...
Contains the TPZGraphElQ3dd class which implements the graphical three dimensional discontinuous elem...
Contains the TPZRefPoint class which implements the uniform refinement of a geometric point element...
Contains TPZShapeTriang class which implements the shape functions of a triangular element...
Implements computational element based on an interpolation space. Computational Element.
Implements an interface to register a class id and a restore function. Persistence.
#define PZError
Defines the output device to error messages and the DebugStop() function.
TPZCompMesh * fMesh
Computational mesh to which the element belongs.
virtual void Read(bool &val)
Implements a generic computational element. Computational Element.