47 static LoggerPtr logger(Logger::getLogger(
"pz.mesh.tpzcompel"));
48 static LoggerPtr loggerSide(Logger::getLogger(
"pz.mesh.tpzcompelside"));
56 ek.ApplyConstraints();
58 int numblock = ek.fConstrConnect.NElements();
61 for(b=0; b<numblock; b++) blocksize[b] = ek.fConstrBlock.Size(b);
64 connectlist = ek.fConstrConnect;
66 for(b=0; b<numblock; b++) {
67 int blsize = blocksize[b];
68 int64_t conind = ek.fConstrConnect[b];
69 TPZConnect &con = Mesh()->ConnectVec()[conind];
77 for(r=0; r<blsize; r++) {
78 for(c=0; c<blsize; c++) {
79 ekbl(r,c) = (mbl)(b,b,r,c);
85 int numblock = ek.fConnect.NElements();
88 for(b=0; b<numblock; b++) blocksize[b] = ek.fBlock.Size(b);
91 connectlist = ek.fConnect;
93 for(b=0; b<numblock; b++) {
94 int blsize = blocksize[b];
97 int64_t conind = ek.fConnect[b];
98 TPZConnect &con = Mesh()->ConnectVec()[conind];
104 for(r=0; r<blsize; r++) {
105 for(c=0; c<blsize; c++) {
107 ekbl(r,c) = (mbl)(b,b,r,c);
130 int64_t index = copy.
fIndex;
131 if(index >= 0) mesh.
ElementVec()[index] =
this;
142 if(index >= 0) mesh.
ElementVec()[index] =
this;
153 if (gl2lcElMap.find(copy.
fIndex) == gl2lcElMap.end())
155 std::stringstream sout;
156 sout <<
"ERROR in - " << __PRETTY_FUNCTION__
157 <<
" original element index: " << copy.
fIndex <<
" is not mapped!\n" 159 std::map<int64_t,int64_t>::iterator it;
160 for (it=gl2lcElMap.begin();it!=gl2lcElMap.end();it++) sout <<
" ( " << it->first <<
" | " << it->second <<
" ) ;";
164 int64_t index = gl2lcElMap[copy.
fIndex];
165 if(index >= 0) mesh.
ElementVec()[index] =
this;
174 int64_t index =
Index();
223 for(in=0;in<totalconnects;in++)
224 maxdep = (maxdep < dependenceorder[in]) ? dependenceorder[in] : maxdep;
225 int current_order = maxdep-1;
226 while(current_order >= 0) {
227 for(in=0; in<totalconnects; in++) {
228 if(dependenceorder[in] != current_order)
continue;
232 int nvar = block.
Size(bl);
233 int numstate = dfn->
NState();
237 for(iv=0; iv<nvar; iv++) MeshSol(blpos+iv, 0) = 0.;
242 int numdepvar = block.
Size(depseq);
243 int64_t depseqpos = block.
Position(depseq);
244 for(iv=0; iv<nvar; iv+=numstate) {
245 for(jv=0; jv<numdepvar; jv+=numstate) {
246 coef = dep->
fDepMatrix(iv/numstate,jv/numstate);
247 for(idf=0; idf<numstate; idf++) MeshSol(blpos+iv+idf,0) += coef*MeshSol(depseqpos+jv+idf,0);
256 for (std::list<TPZOneShapeRestraint>::iterator it = mylist.begin(); it != mylist.end(); it++)
258 int64_t connectdest = it->fFaces[0].first;
259 int64_t seqnumdest =
Mesh()->
ConnectVec()[connectdest].SequenceNumber();
260 int destidf = it->fFaces[0].second;
261 REAL mult = -1./it->fOrient[0];
263 STATE prevval =
Mesh()->
Block()(seqnumdest,0,destidf,0);
265 Mesh()->
Block()(seqnumdest,0,destidf,0) = 0.;
266 for (
int i=1; i<4; i++) {
267 int64_t connectindex = it->fFaces[i].first;
268 int64_t seqnum =
Mesh()->
ConnectVec()[connectindex].SequenceNumber();
269 int idf = it->fFaces[i].second;
271 REAL multorig = it->fOrient[i];
272 Mesh()->
Block()(seqnumdest,0,destidf,0) += mult*multorig*val;
275 STATE finalval =
Mesh()->
Block()(seqnumdest,0,destidf,0);
284 LOGPZ_ERROR(logger,
"TPZCompEl.SetMesh called with zero pointer.");
291 std::stringstream sout;
292 sout << __PRETTY_FUNCTION__ <<
" mesh address " << (
void *)
fMesh <<
" this address " << (
void *)
this;
302 if(connectindex >= 0) {
305 LOGPZ_ERROR(logger,
"TPZCompEl::Connect called for noninitialized connect\n");
312 LOGPZ_FATAL(logger,
"Connect called for an element without mesh\n");
324 out <<
"\nOutput for a computable element index: " <<
fIndex;
328 out <<
"\nCenter coordinate: ";
332 this->
Reference()->
X(centerMaster,centerEuclid);
337 out <<
"\nMaterial id " << this->
Material()->
Id() <<
"\n";
340 out <<
"\nNo material\n";
343 out <<
"Number of connects = " <<
NConnects();
344 out<<
"\nConnect indexes : ";
361 if(!georef || !mat) {
362 LOGPZ_WARN(logger,
"Exiting PrintSolution should not be called for an element which doesnt have a geometric reference or material");
369 LOGPZ_WARN(logger,
"Exiting PrintSolution should not be called for an element which has unknown variable index");
375 for(int64_t i=0; i<sol.
NElements(); i++) {
383 LOGPZ_WARN(logger,
"Exiting PrintCoordinate should not be called on an element which doesnt have a geometric reference");
389 s << X[CoordinateIndex] <<
'\t';
395 if(!georef || !mat) {
396 LOGPZ_WARN(logger,
"Exiting PrintTitle should not be called for an element which doesnt have a material");
400 if(varindex == -1)
return;
402 if(numvar == 0)
return;
404 s << varname <<
'\t';
407 for(
int i=0; i<numvar; i++) s << varname <<
'_' << i <<
'\t';
412 LOGPZ_WARN(logger,
"TPZCompEl::Divide called");
417 LOGPZ_WARN(logger,
"EvaluateError is called.");
436 std::set<int64_t> &depconnectlist) {
438 for(
int i = 0; i < ncon; i++) {
443 for (std::list<TPZOneShapeRestraint>::iterator it = mylist.begin(); it != mylist.end(); it++) {
444 for (
int i=0; i<4; i++) {
445 int64_t conind = it->fFaces[i].first;
455 std::sort(&connectlist[0], &connectlist[0]+ncon);
460 bool hasdependency =
false;
462 connectlist.
Resize(nconloc);
463 for(int64_t i = 0; i < nconloc; i++) {
465 if (connectlist[i] == -1)
continue;
467 hasdependency =
true;
470 if (hasdependency ==
false && rest.size() == 0) {
473 std::sort(&connectlist[0], &connectlist[0]+nconloc);
478 for(int64_t i = 0; i < nconloc; i++) {
481 hasdependency =
true;
485 std::sort(&localcon[0], &localcon[0]+nconloc);
488 std::set<int64_t> buf;
489 if (ncon > 0 && nconloc > 0)
491 std::set_union(&connectlist[0],&connectlist[0]+ncon,&localcon[0],&localcon[0]+nconloc,std::inserter(buf, buf.begin()));
495 buf = std::set<int64_t>(&connectlist[0],&connectlist[0]+ncon);
499 buf = std::set<int64_t>(&localcon[0],&localcon[0]+nconloc);
501 std::set<int64_t> buf2;
503 for (std::list<TPZOneShapeRestraint>::iterator it = mylist.begin(); it != mylist.end(); it++) {
504 for (
int i=0; i<4; i++) {
505 buf2.insert(it->fFaces[i].first);
509 for(int64_t i = 0; i < nconloc; i++) {
521 if (buf.size() != connectlist.
size())
523 connectlist.
Resize(buf.size());
524 std::copy(buf.begin(), buf.end(), &connectlist[0]);
531 for(int64_t i = 0; i < nconloc; i++) {
535 std::sort(&localcon[0], &localcon[0]+nconloc);
538 std::set<int64_t> buf;
541 std::set_union(connectlist.begin(),connectlist.end(),&localcon[0],&localcon[0]+nconloc,std::inserter(buf, buf.begin()));
547 std::set<int64_t> buf2;
549 for (std::list<TPZOneShapeRestraint>::iterator it = mylist.begin(); it != mylist.end(); it++) {
550 for (
int i=0; i<4; i++) {
551 buf2.insert(it->fFaces[i].first);
554 for(std::set<int64_t>::iterator it=buf.begin(); it != buf.end(); it++) {
594 cout <<
"TPZCompEl::CompareElement called!\n";
622 std::stringstream sout;
623 if (logger->isDebugEnabled())
625 sout <<
"Obtendo elemento geometrico de referencia para elemento " <<
Index() << endl;
626 sout <<
"Impressao dos ancestrais\n";
630 if (logger->isDebugEnabled())
649 for (j=0; j<larger->
NSides(); j++){
651 if(sidedimension == 0){
667 LOGPZ_DEBUG(logger,
"Exit GetRefElPatch - Element is its own patch");
678 REAL maxdist = 0.0,
dist=0.0;
682 for(i=0;i<nvertices;i++){
683 for(j=i+1;j<nvertices;j++){
687 point0[k] = node0->
Coord(k);
688 point1[k] = node1->
Coord(k);
702 REAL mindist = 1000.0,
dist=0.0;
706 for(i=0;i<nvertices;i++){
707 for(j=i+1;j<nvertices;j++){
711 point0[k] = node0->
Coord(k);
712 point1[k] = node1->
Coord(k);
750 LOGPZ_WARN(loggerSide,
"Exiting Reference - non initialized side element reached");
762 int onlyinterpolated,
int removeduplicates) {
765 LOGPZ_WARN(loggerSide,
"Exiting HigherLevelElementList - null reference reached");
772 int onlyinterpolated,
int removeduplicates) {
775 LOGPZ_WARN(loggerSide,
"Exiting EqualLevelElementList - null reference reached");
782 int onlyinterpolated,
int removeduplicates) {
785 LOGPZ_INFO(loggerSide,
"Entering HigherDimensionElementList - null reference reached");
789 if(removeduplicates) RemoveDuplicates(elsidevec);
794 RemoveConnectDuplicates(elvec);
796 for(i=0; i<nelem; i++) {
798 if(!geli.
Exists())
continue;
800 for(j=i+1; j<nelem; j++) {
802 if(!gelj.
Exists())
continue;
805 LOGPZ_ERROR(loggerSide,
"case not identified by RemoveConnectDuplicates");
806 for(k=j;k<nelem-1;k++) elvec[k] = elvec[k+1];
816 int onlyinterpolated,
int removeduplicates) {
817 TPZCompElSide father = LowerLevelElementList(onlyinterpolated);
819 EqualLevelElementList(ellist,onlyinterpolated,removeduplicates);
820 HigherLevelElementList(ellist,onlyinterpolated,removeduplicates);
827 LOGPZ_WARN(loggerSide,
"Exiting LowerLevelElementList - null reference reached");
838 LOGPZ_WARN(loggerSide,
"Exiting ExpandConnected - null reference reached");
845 for (int64_t i=0;i<exnel;i++) {
849 for (
int k=0;k<smallsides.
NElements();k++) {
853 while(compsidenext.
Exists()) {
856 TPZCompElSide lowid = LowerIdElementList(compside,onlyinterpolated);
860 expandvec.
Push(lowid);
864 compside = compsidenext;
873 LOGPZ_WARN(loggerSide,
"Exiting LowerIdElementList - empty list");
879 neighbourset.
Push(gelside);
881 int lowid = gelside.
Id();
882 int in = 0, nneigh = neighbourset.
NElements()-1;
884 TPZCompEl *ref = neighbourset[in].Reference().Element();
885 if(neighbourset[in].Id() < lowid && ref && (!onlyinterpolated || dynamic_cast<TPZInterpolatedElement*>(ref) )) {
886 lowidneigh = neighbourset[in];
887 lowid = lowidneigh.
Id();
898 for(i=0;i<nelems;i++) locexpand.
Push(expandvec[i]);
900 for(k=0;k<nelems;k++){
904 int kside = locexpand[k].Side();
909 int iside = locexpand[i].Side();
918 if(connecta == connectb)
926 for(i=0;i<nelems;i++)
927 if(locexpand[i].Element()) expandvec.
Push(locexpand[i]);
951 return fEl->ConnectIndex(fSide);
974 return materialids.find(mat_id) != materialids.end();
987 std::cout << __PRETTY_FUNCTION__ <<
" is not implemented - bailing out\n";
1008 std::cout << __PRETTY_FUNCTION__ <<
" is not implemented - bailing out\n";
1024 std::cout << __PRETTY_FUNCTION__ <<
" is not implemented - bailing out\n";
1037 for (
int ic=0; ic<ncon ; ic++) {
1072 int npoints = intrule->
NPoints();
1073 for (
int ip =0; ip<npoints; ip++) {
1075 intrule->
Point(ip, xi, weight);
1076 gel->
Jacobian(xi, jac, axes, detjac, jacinv);
1077 celnotconst->
Solution(xi, var, sol);
1078 for (
int i=0; i <nvar; i++) {
1079 result[i] += weight*
fabs(detjac)*sol[i];
1094 if (matids.find(
id) != matids.end())
1097 if (varindex != -1) {
1125 return Hash(
"TPZCompEl");
void HigherLevelCompElementList2(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Returns all connected computational elements which have level higher to the current element if onlyi...
TPZFMatrix< STATE > & ElementSolution()
Access method for the element solution vectors.
virtual TPZVec< STATE > IntegrateSolution(int var) const
Compute the integral of a variable.
TPZGeoMesh * Reference() const
Returns a pointer to the geometrical mesh associated.
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ fabs
int AllocateNewElement()
Makes more room for new elements.
static void(* fOrthogonal)(REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Pointer to function which returns num orthogonal functions at the point x.
Contains the TPZInt1d, TPZIntTriang, TPZIntQuad, TPZIntCube3D, TPZIntTetra3D, TPZIntPyram3D and TPZIn...
int Position(const int block_diagonal) const
Returns the position of first element block dependent on matrix diagonal.
virtual int NPoints() const =0
Returns number of points for the cubature rule related.
void SetAllCreateFunctionsContinuous()
virtual void LowerDimensionSides(int side, TPZStack< int > &smallsides) const =0
TPZCompElSide LowerLevelElementList(int onlyinterpolated)
Returns all connected elements which have level lower to the current element.
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...
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.
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 MElementType Type()
Return the type of the element.
virtual void PrintCoordinate(TPZVec< REAL > &point, int CoordinateIndex, std::ostream &out)
Prints one coordinate index corresponding to the point to the output stream.
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 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...
REAL Coord(int i) const
Returns i-th coordinate of the current node.
TPZCompElSide LowerIdElementList(TPZCompElSide &expandvec, int onlyinterpolated)
Returns the element with lowest id of all direct neighbours of expandvec.
virtual void SetCreateFunctions(TPZCompMesh *mesh)
Sets create function in TPZCompMesh to create elements of this type.
TPZGeoElSide Reference() const
Reference to the geometric element.
static REAL Distance(TPZVec< REAL > ¢el, TPZVec< REAL > ¢face)
Contains declaration of TPZCompEl class which defines the interface of a computational element...
virtual int Dimension() const =0
Dimension of the element.
virtual int VariableIndex(const std::string &name)
Returns the variable index associated with the name.
virtual void CalcStiff(TPZElementMatrix &ek, TPZElementMatrix &ef)
Computes the element stifness matrix and right hand side.
TPZGeoEl * GetRefElPatch()
Returns the reference geometric element patch. Look for a geometric element which refers to a comput...
TPZCompElSide LowerLevelCompElementList2(int onlyinterpolated)
return the element/side pair which contains this/side and has a computational element associated ...
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.
virtual void PrintTitle(const char *VarName, std::ostream &out)
Prints the variables names associated with the element material.
REAL val(STATE &number)
Returns value of the variable.
#define LOGPZ_WARN(A, B)
Define log for warnings.
static int StaticClassId()
virtual int NSides() const =0
Returns the number of connectivities of the element.
friend std::ostream & operator<<(std::ostream &s, TPZCompEl &el)
Output device operator.
static TPZSavable * GetInstance(const int64_t &objId)
Contains TPZBlockDiagonal class which defines block diagonal matrices.
virtual int SideDimension(int side) const =0
Return the dimension of side.
virtual void CalcBlockDiagonal(TPZStack< int64_t > &connectlist, TPZBlockDiagonal< STATE > &block)
Calculates the diagonal block.
void EqualLevelCompElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Returns all connected computational elements which have equal level to the current element...
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
Contains the TPZTransfer class which implements a rectangular sparse block matrix.
virtual void LoadElementReference()
Loads the geometric element reference.
static int gOrder
Default interpolation order.
Contains TPZShapeLinear class which implements the shape functions of a linear one-dimensional elemen...
void SetMesh(TPZCompMesh *mesh)
Sets the grid of the element.
void SetSide(int side)
Sets the side index.
#define LOGPZ_FATAL(A, B)
Define log for fatal errors (cout)
virtual int ClassId() const override
Define the class id associated with the class.
Abstract class defining integration rules. Numerical Integration.
This abstract class defines the behaviour which each derived class needs to implement.
Contains declaration of TPZElementMatrix struct which associates an element matrix with the coeficien...
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...
int64_t ConnectIndex() const
Returns the index of the middle side connect alon fSide.
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...
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
virtual TPZMaterial * Material() const
Identify the material object associated with the element.
unsigned char LagrangeMultiplier() const
Access method to return the indication whether the connect is associated with a pressure lagrange mul...
void HigherLevelElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Returns all connected elements which have level higher to the current 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...
int64_t SequenceNumber() const
Returns the Sequence number of the connect object.
void Read(TPZStream &buf, void *context) override
Read the element data from a stream.
void Push(const T object)
Pushes a copy of the object on the stack.
void EqualLevelElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Returns all connected elements which have equal level to the current element This method will not put...
#define LOGPZ_INFO(A, B)
Define log for informations.
void AllNeighbours(TPZStack< TPZGeoElSide > &allneigh)
Returns the set of neighbours which can directly be accessed by the datastructure.
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 Write(const bool val)
Structure to reference dependency.
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
static void RemoveConnectDuplicates(TPZStack< TPZCompElSide > &expandvec)
Remove entries of the vector which share a connect along the side This should be equivalent to Remove...
int64_t Index() const
Returns the index of the element within the element vector of the mesh.
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.
Contains declaration of TPZInterfaceElement class which computes the contribution over an interface b...
void HigherDimensionElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated)
Pushes all connected computational elements which have higher dimension than the current element/side...
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
TPZCompMesh * Mesh() const
Return a pointer to the grid of the element.
Contains declaration of TPZConnect class which represents a set of shape functions associated with a ...
static void RemoveDuplicates(TPZStack< TPZCompElSide > &elvec)
Will remove elements which are direct neighbours from elvec (and elsides)
Free store vector implementation.
virtual int ComputeIntegrationOrder() const
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 ...
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 SetIndex(int64_t index)
Sets element index of the mesh fELementVec list.
int HasDependency() const
Returns whether exist dependecy information.
TPZManVector< TNode > fBlock
Nodes vector.
const TPZBlock< STATE > & Block() const
Access the block structure of the solution vector.
int64_t fReferenceIndex
Index of reference element.
int Exists() const
Verifies if the object is non null (initialized)
Contains declaration of TPZCompelDisc class which implements a computational element for discontinuou...
TPZIntPoints * fIntegrationRule
Integration rule established by the user.
TPZAdmChunkVector< TPZConnect > & ConnectVec()
Return a reference to the connect pointers vector.
int64_t Index() const
Returns element index of the mesh fELementVec list.
void BuildConnectList(int64_t index, std::set< int64_t > &indepconnectlist, std::set< int64_t > &depconnectlist, TPZCompMesh &mesh)
Builds the list of all connectivities related to ConnectIndex including the connects pointed to by de...
#define LOGPZ_ERROR(A, B)
Define log for errors (cout)
void AddBlock(int64_t i, TPZFMatrix< TVar > &block)
Adds a block to current matrix.
virtual void ComputeSolution(TPZVec< REAL > &qsi, TPZMaterialData &data)
Contains declaration of TPZCompMesh class which is a repository for computational elements...
virtual TPZConnect & Connect(int i) const
Returns a pointer to the ith node.
unsigned char NState() const
Number of state variables associated with the connect.
int32_t Hash(std::string str)
virtual int64_t ConnectIndex(int i) const =0
Returns the index of the ith connectivity of the element.
Contains TPZMatrix<TVar>class, root matrix class.
virtual int NNodes() const =0
Returns the number of nodes of the element.
This class associates an element matrix with the coeficients of its contribution in the global stiffn...
virtual int NConnects() const =0
Returns the number of nodes of the element.
void ApplyConstraints()
Apply the constraints applied to the nodes by transforming the tangent matrix and right hand side...
TPZGeoEl * Element() const
TPZFNMatrix< 50, REAL > fDepMatrix
void Initialize(const TPZVec< int > &blocksize)
Initializes current matrix based on blocksize.
virtual std::list< TPZOneShapeRestraint > GetShapeRestraints() const
Return a list with the shape restraints.
REAL LesserEdgeOfEl()
Will return the smallest distance between two nodes of the reference element.
T Pop()
Retrieve an object from the stack.
virtual int Dimension() const =0
Returns the dimension of the element.
TPZCompEl * Element() const
Gives a pointer to the reference computational element.
REAL dist(TPZVec< T1 > &vec1, TPZVec< T1 > &vec2)
virtual void CalcResidual(TPZElementMatrix &ef)
Computes the element right hand side.
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 int NSolutionVariables(int var)
Returns the number of variables associated with the variable indexed by var.
TPZCompElSide Reference() const
Returns a pointer to the elementside referenced by the geometric elementside.
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...
MElementType
Define the element types.
TPZDepend * FirstDepend()
Implements computational mesh. Computational Mesh.
static void BuildDependencyOrder(TPZVec< int64_t > &connectlist, TPZVec< int > &DependenceOrder, TPZCompMesh &mesh)
This method builds the vector DependenceOrder which indicates in which order constrained nodes need t...
int Size(const int block_diagonal) const
Returns block dimension.
TPZAdmChunkVector< TPZCompEl * > & ElementVec()
Returns a reference to the element pointers vector.
Contains TPZSolver class which defines a abstract class of solvers which will be used by matrix class...
virtual void Print(std::ostream &out=std::cout) const
Prints element data.
static int sidedimension[27]
Vector of the dimension for each side.
int NElConnected() const
Returns fNElConnected.
void SetReference(TPZCompEl *elp)
Make the current element reference 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...
Contains declaration of TPZInterpolatedElement class which implements computational element of the in...
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.
int64_t Cols() const
Returns number of cols.
void SetFree(int index)
Indicate an element as free.
void Write(TPZStream &buf, int withclassid) const override
Save the element data to a stream.
Defines the interface for saving and reading data. Persistency.
int NeighbourExists(const TPZGeoElSide &neighbour) const
Returns 1 if neighbour is a neighbour of the element along side.
int64_t NElements() const
Returns the number of elements of the vector.
void HigherDimensionElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Pushes all element/sides which have higher dimension than the current element/side.
void ConnectedElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Returns all connected elements to the current element.
virtual TPZIntPoints * Clone() const =0
Make a clone of the related cubature rule.
virtual ~TPZCompEl()
Simple destructor.
REAL MaximumRadiusOfEl()
Will return the maximum distance between the nodes of the reference element.
virtual int PressureConnectIndex() const
Returns the index of the pressure connect.
virtual void Print(std::ostream &out=std::cout)
Print all relevant data of the element to cout.
Defines the interface of a computational element. Computational Element.
bool IsCondensed() const
Access method to return the indication whether the connect is condensed or not.
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...
void ExpandConnected(TPZStack< TPZCompElSide > &expandvec, int onlyinterpolated)
Find the list element/side of the current element restrict nodes and elements.
TPZGeoEl * Father() const
Computes the normal vectors needed for forming HDiv vector valued shape functions.
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.
TPZFMatrix< STATE > & Solution()
Access the solution vector.
static void WritePointer(const TPZSavable *obj, TPZStream *stream)
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...
virtual void Point(int i, TPZVec< REAL > &pos, REAL &w) const =0
Returns i-th point at master element and related weight.
TPZCompMesh * fMesh
Computational mesh to which the element belongs.
virtual void Read(bool &val)
virtual int MidSideConnectLocId(int is) const
Returns the local id of the connect in the middle of the side.
TPZAdmChunkVector< TPZGeoEl * > & ElementVec()
Methods for handling pzlists.