NeoPZ
pzcompel.h
Go to the documentation of this file.
1 
6 #ifndef COMPELEMHPP
7 #define COMPELEMHPP
8 
9 #include "pzreal.h"
10 #include <iostream>
11 #include <fstream>
12 #include "pzgmesh.h"
13 #include "pzgeoel.h"
14 #include "TPZSavable.h"
15 #include "pzfmatrix.h"
16 #include "pzmatrix.h"
17 #include "pzblock.h"
18 #include "pzblockdiag.h"
19 #include "pzcreateapproxspace.h"
20 #include "pzmaterialdata.h"
21 #include "TPZOneShapeRestraint.h"
22 #include "pztransfer.h"
23 #include <functional>
24 
25 
26 struct TPZElementMatrix;
27 class TPZCompMesh;
28 class TPZBndCond;
31 class TPZConnect;
32 class TPZMaterial;
33 class TPZGeoEl;
34 class TPZGeoNode;
35 
36 class TPZMaterialData;
37 
38 template<class T>
39 class TPZVec;
40 template<class T, int N>
41 class TPZManVector;
42 template<class T, int N>
43 class TPZStack;
44 
45 class TPZGraphMesh;
46 class TPZIntPoints;
47 
48 template<class T>
49 class TPZTransform;
50 
51 #include "pzeltype.h"
52 
53 #include <set>
54 
59 class TPZCompEl : public virtual TPZSavable {
60 
61 protected:
62 
65 
67  int64_t fIndex;
68 
69 private:
71  int64_t fReferenceIndex;
72 
73 public:
74 
75  static int StaticClassId();
76 
77  virtual int ClassId() const override;
78 
79 
81  TPZCompEl();
82 
84  virtual ~TPZCompEl();
85 
87  virtual TPZCompEl *Clone(TPZCompMesh &mesh) const = 0;
88 
100  virtual TPZCompEl *ClonePatchEl(TPZCompMesh &mesh,
101  std::map<int64_t,int64_t> & gl2lcConMap,
102  std::map<int64_t,int64_t> & gl2lcElMap) const = 0;
103 
104 
106  TPZCompEl(TPZCompMesh &mesh, const TPZCompEl &copy);
107 
109  TPZCompEl(TPZCompMesh &mesh, const TPZCompEl &copy, std::map<int64_t,int64_t> &gl2lcElMap);
110 
112  TPZCompEl(TPZCompMesh &mesh, const TPZCompEl &copy, int64_t &index);
113 
120  TPZCompEl(TPZCompMesh &mesh, TPZGeoEl *gel, int64_t &index);
121 
123  static void SetgOrder( int order );
124 
126  static int GetgOrder();
127 
129  virtual void SetCreateFunctions(TPZCompMesh *mesh);
130 
132  virtual REAL VolumeOfEl()
133  {
134  if(fReferenceIndex == -1) return 0.;
135  return Reference()->Volume();
136  }
137 
139  virtual void LoadElementReference();
140 
147  virtual REAL CompareElement(int var, char *matname);
148 
156  /* the types are listed in parameter : ENoType, EOned, ETriangle, EQuadrilateral, ESubstructure */
157  virtual MElementType Type();
158 
159  virtual int IsInterface() { return 0; }
160 
162  TPZGeoEl *Reference() const;
163 
164  void SetReference(int64_t referenceindex)
165  {
166  fReferenceIndex = referenceindex;
167  }
168 
170  virtual bool NeedsComputing(const std::set<int> &materialids)
171  {
172  TPZGeoEl *gel = Reference();
173  if (!gel) {
174  DebugStop();
175  }
176  return materialids.find(gel->MaterialId()) != materialids.end();
177  }
179  virtual int NConnects() const = 0;
180 
182  virtual int NEquations();
183 
185  int64_t Index() const;
186 
188  void SetIndex(int64_t index);
189 
194  virtual int64_t ConnectIndex(int i) const = 0;
195 
200  virtual TPZConnect &Connect(int i) const;
201 
203  virtual int Dimension() const = 0;
204 
206  virtual TPZMaterial * Material() const;
207 
214 
228  virtual void LoadSolution();
229 
234  void SetMesh(TPZCompMesh *mesh);
235 
237  TPZCompMesh *Mesh() const;
238 
253  virtual void Print(std::ostream &out = std::cout) const;
254 
260  friend std::ostream& operator<<(std::ostream &s,TPZCompEl &el);
261 
269  virtual void PrintSolution(TPZVec<REAL> &point, const char *VarName,std::ostream &out);
270 
277  virtual void PrintCoordinate(TPZVec<REAL> &point,int CoordinateIndex,std::ostream &out);
278 
284  virtual void PrintTitle(const char *VarName,std::ostream &out);
285 
293  static void SetOrthogonalFunction(void (*orthogonal)(REAL x,int num,TPZFMatrix<REAL> & phi,
294  TPZFMatrix<REAL> & dphi));
299  virtual void Assemble();
300 
306  virtual void CalcStiff(TPZElementMatrix &ek,TPZElementMatrix &ef);
307 
308 
310  virtual bool HasMaterial(const std::set<int> &materialids) const;
311 
316  virtual void CalcResidual(TPZElementMatrix &ef);
317 
325  static void Chebyshev(REAL x,int num,TPZFMatrix<REAL> &phi,TPZFMatrix<REAL> &dphi);
326 
334  virtual void Divide(int64_t index, TPZVec<int64_t> &subindex, int interpolate = 0);
335 
341  virtual void ProjectFlux(TPZElementMatrix &ek,TPZElementMatrix &ef);
342 
349  virtual void EvaluateError(std::function<void(const TPZVec<REAL> &loc,TPZVec<STATE> &val,TPZFMatrix<STATE> &deriv)> func,
350  TPZVec<REAL> &errors, bool store_error);
351 
353  virtual void ComputeError(int errorid, TPZVec<REAL> &error){
354  PZError << "Error at " << __PRETTY_FUNCTION__ << " - Method not implemented.\n";
355  }
356 
363  virtual void CreateGraphicalElement(TPZGraphMesh & graphmesh, int dimension);
364 
366  virtual void Integrate(int variable, TPZVec<STATE> & value){
367  value.Fill(0.);
368  PZError << "Error at " << __PRETTY_FUNCTION__ << " - Method not implemented.\n";
369  }
370 
376  virtual void GetMemoryIndices(TPZVec<int64_t> &indices) const
377  {
378  indices.resize(0);
379  }
380 
386  virtual void SetMemoryIndices(TPZVec<int64_t> &indices)
387  {
388  if(indices.size() != 0)
389  {
390  DebugStop();
391  }
392  }
393 
395  virtual void PrepareIntPtIndices(){
396 
397  }
398 
400  virtual void ForcePrepareIntPtIndices(){
401 
402  }
403 
405  virtual void SetFreeIntPtIndices(){
406 
407  }
408 
409 
412  return 1;
413  }
414 
416  {
417  // Nothing to be done here
418  }
419 
421  {
422  DebugStop();
423  }
424 
426  virtual void AddShapeRestraint(TPZOneShapeRestraint restraint)
427  {
428  DebugStop();
429  }
430 
432  virtual std::list<TPZOneShapeRestraint> GetShapeRestraints() const
433  {
434  std::list<TPZOneShapeRestraint> loc;
435  return loc;
436  }
437 
439  virtual void ResetShapeRestraints()
440  {
441  }
450  virtual void Solution(TPZVec<REAL> &qsi,int var,TPZVec<STATE> &sol);
451 
455  virtual TPZVec<STATE> IntegrateSolution(int var) const;
456 
460  virtual TPZVec<STATE> IntegrateSolution(const std::string &varname, const std::set<int> &matids);
461 
462  virtual void ComputeSolution(TPZVec<REAL> &qsi, TPZMaterialData &data) {
463  std::cout <<"Imposed for Hdiv solution ";
464  DebugStop();
465  };
466 
474  virtual void ComputeSolution(TPZVec<REAL> &qsi,
475  TPZSolVec &sol, TPZGradSolVec &dsol,TPZFMatrix<REAL> &axes);
476 
489  virtual void ComputeSolution(TPZVec<REAL> &qsi,
490  TPZVec<REAL> &normal,
491  TPZSolVec &leftsol, TPZGradSolVec &dleftsol,TPZFMatrix<REAL> &leftaxes,
492  TPZSolVec &rightsol, TPZGradSolVec &drightsol,TPZFMatrix<REAL> &rightaxes);
493 
503  virtual void ComputeSolution(TPZVec<REAL> &qsi, TPZFMatrix<REAL> &phi, TPZFMatrix<REAL> &dphix,
504  const TPZFMatrix<REAL> &axes, TPZSolVec &sol, TPZGradSolVec &dsol);
505 
507  virtual void BuildCornerConnectList(std::set<int64_t> &connectindexes) const = 0;
508 
517 //protected:
518  virtual void BuildConnectList(std::set<int64_t> &indepconnectlist, std::set<int64_t> &depconnectlist);
519 public:
527  virtual void BuildConnectList(TPZStack<int64_t> &connectlist) const;
534 //protected:
535  virtual void BuildConnectList(std::set<int64_t> &connectlist);
536 public:
537 
539  virtual int HasDependency();
540 
545  virtual int PressureConnectIndex() const;
546 
554  virtual void ReduceInternalNodes() { }
555 
561  virtual void SetConnectIndex(int inode, int64_t index) = 0;
562 
568  virtual void CalcBlockDiagonal(TPZStack<int64_t> &connectlist, TPZBlockDiagonal<STATE> & block);
569 
571  REAL MaximumRadiusOfEl();
572 
574  REAL LesserEdgeOfEl();
575 
577  void Write(TPZStream &buf, int withclassid) const override;
578 
580  void Read(TPZStream &buf, void *context) override;
581 
582 private:
583 
585  static int gOrder;
586 
587 protected:
588 
591 
592 public:
593 
595  std::cout << "TPZCompEl::InitializeIntegrationRule should not be called\n";
596  DebugStop();
597  }
598 
599 
600  virtual int ComputeIntegrationOrder() const;
601 
603  virtual void SetIntegrationRule(TPZIntPoints *intrule);
604 
605  virtual void SetIntegrationRule(int order) {
606  std::cout << "TPZCompEl::SetIntegrationRule should not be called\n";
607  }
608 
609  virtual const TPZIntPoints &GetIntegrationRule() const
610  {
611  if(fIntegrationRule)
612  return *fIntegrationRule;
613  DebugStop();
614  return *fIntegrationRule;
615  }
616 
617 
618 };
619 
620 
621 class TPZGeoElSide;
622 
633 
636 
638  int fSide;
639 
640 
641 public:
642 
644  TPZCompElSide() : fEl(0), fSide(-1)
645  {
646 
647  }
648 
653  TPZCompElSide(const TPZCompElSide &celside) : fEl(celside.fEl), fSide(celside.fSide)
654  {
655 
656  }
657 
664  TPZCompElSide(TPZCompEl *cel,int side) : fEl(cel), fSide(side)
665  {
666 
667  }
668 
670  TPZCompElSide(int zero) : fEl(0), fSide(-1)
671  {
672  }
673 
675  TPZCompEl *Element() const {return fEl;}
676 
678  operator bool() const
679  {
680  return fEl != 0;
681  }
682 
683 
685  void SetElement(TPZCompEl* el){ fEl = el;}
686 
688  int Side() const {return fSide;}
689 
694  void SetSide(int side);
695 
697  int Exists() const {return fEl != 0;}
698 
700  TPZGeoElSide Reference() const;
701 
708  void HigherLevelElementList(TPZStack<TPZCompElSide> &elsidevec, int onlyinterpolated, int removeduplicates);
709 
716  void HigherDimensionElementList(TPZStack<TPZCompElSide> &elsidevec, int onlyinterpolated, int removeduplicates);
723  void ConnectedElementList(TPZStack<TPZCompElSide> &elsidevec,int onlyinterpolated, int removeduplicates);
724 
732  void EqualLevelElementList(TPZStack<TPZCompElSide> &elsidevec, int onlyinterpolated, int removeduplicates);
733 
739  TPZCompElSide LowerLevelElementList(int onlyinterpolated);
740 
751  static void RemoveDuplicates(TPZStack<TPZCompElSide> &elvec);
752 
753 
759  static void RemoveConnectDuplicates(TPZStack<TPZCompElSide> &expandvec);
760 
766  void ExpandConnected(TPZStack<TPZCompElSide> &expandvec,int onlyinterpolated);
767 
773  TPZCompElSide LowerIdElementList(TPZCompElSide &expandvec,int onlyinterpolated);
774 
776  int64_t ConnectIndex() const;
777 
779  bool operator != (const TPZCompElSide &other);
781  bool operator == (const TPZCompElSide &other);
782 
783 };
784 
786  std::cout << "TPZCompEl::CreateGraphicalElement called\n";
787  this->Print(std::cout);
788 }
789 
790 inline void TPZCompEl::Assemble(){
791  std::cout << "TPZCompEl::Assemble is called." << std::endl;
792 }
793 
795  std::cout << "TPZCompEl::CalcStiff(*,*) is called." << std::endl;
796 }
797 
799  std::cout << "TPZCompEl::ProjectFlux is called." << std::endl;
800 }
801 
803 {
804  return (other.Element() != Element() || other.Side() != Side());
805 }
806 
808 {
809  return (other.Element() == Element() && other.Side() == Side());
810 }
811 
813 inline std::ostream &operator << (std::ostream &out,const TPZCompElSide &celside)
814 {
815  out << "Side = " << celside.Side()
816  << " element: " << celside.Element()->Index()
817  << std::endl;
818  return out;
819 }
820 
821 inline int64_t TPZCompEl::Index() const {
822  return fIndex;
823 }
824 
825 inline void TPZCompEl::SetgOrder( int order )
826 {
827  gOrder = order;
828 }
829 
830 inline int TPZCompEl::GetgOrder( )
831 {
832  return gOrder;
833 }
834 
835 #endif
virtual TPZVec< STATE > IntegrateSolution(int var) const
Compute the integral of a variable.
Definition: pzcompel.cpp:1054
virtual void InitializeIntegrationRule()
Definition: pzcompel.h:594
virtual void ResetShapeRestraints()
Return a list with the shape restraints.
Definition: pzcompel.h:439
Represents a graphical mesh used for post processing purposes. Post processing.
Definition: pzgraphmesh.h:34
static void SetgOrder(int order)
Sets the value of the default interpolation order.
Definition: pzcompel.h:825
REAL Volume()
Return the volume of the element.
Definition: pzgeoel.cpp:1052
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.
Definition: pzcompel.h:632
TPZCompEl()
Simple Constructor.
Definition: pzcompel.cpp:117
Represents a set of shape functions associated with a computational element/side. Computational Eleme...
Definition: pzconnect.h:30
bool operator!=(const TPZCompElSide &other)
Overlapping operator not equal.
Definition: pzcompel.h:802
virtual void ForcePrepareIntPtIndices()
PrepareIntPtIndices initializes the material damage varibles memory in the proper material class...
Definition: pzcompel.h:400
virtual MElementType Type()
Return the type of the element.
Definition: pzcompel.cpp:195
Implements a vector class which allows to use external storage provided by the user. Utility.
Definition: pzquad.h:16
virtual void PrintCoordinate(TPZVec< REAL > &point, int CoordinateIndex, std::ostream &out)
Prints one coordinate index corresponding to the point to the output stream.
Definition: pzcompel.cpp:380
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.
Definition: pzgeoel.h:250
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...
Definition: pzcompel.cpp:435
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.
Definition: pzcompel.cpp:415
virtual void resize(const int64_t newsize)
Definition: pzvec.h:213
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...
Definition: pzcompel.cpp:358
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
bool operator!=(const TinyFad< Num, T > &x, const TinyFad< Num, T > &y)
Definition: tinyfadlog.h:27
virtual void SetCreateFunctions(TPZCompMesh *mesh)
Sets create function in TPZCompMesh to create elements of this type.
Definition: pzcompel.cpp:1133
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 ...
Definition: pzcompel.h:170
virtual void CalcStiff(TPZElementMatrix &ek, TPZElementMatrix &ef)
Computes the element stifness matrix and right hand side.
Definition: pzcompel.h:794
virtual void ReduceInternalNodes()
Domain Decomposition. This method will eliminate the nodes which are internal to the element from the...
Definition: pzcompel.h:554
TPZGeoEl * GetRefElPatch()
Returns the reference geometric element patch. Look for a geometric element which refers to a comput...
Definition: pzcompel.cpp:615
TPZCompElSide()
Simple Constructor.
Definition: pzcompel.h:644
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...
Definition: pzcompel.h:785
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
Definition: pzgeoelside.h:83
virtual int NEquations()
Returns the number of equations of the element.
Definition: pzcompel.cpp:582
Defines enum MElementType and contains the implementation of MElementType_NNodes(...) functions.
bool operator==(const TPZCompElSide &other)
Overlapping operator equal.
Definition: pzcompel.h:807
virtual void PrintTitle(const char *VarName, std::ostream &out)
Prints the variables names associated with the element material.
Definition: pzcompel.cpp:392
This class implements a simple vector storage scheme for a templated class T. Utility.
Definition: pzgeopoint.h:19
REAL val(STATE &number)
Returns value of the variable.
Definition: pzartdiff.h:23
static int StaticClassId()
Definition: pzcompel.cpp:1124
TPZCompElSide(int zero)
Constructor which allows us to create a vector of objects.
Definition: pzcompel.h:670
friend std::ostream & operator<<(std::ostream &s, TPZCompEl &el)
Output device operator.
Definition: pzcompel.cpp:353
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.
Definition: pzcompel.cpp:51
Contains the TPZTransfer class which implements a rectangular sparse block matrix.
virtual void LoadElementReference()
Loads the geometric element reference.
Definition: pzcompel.cpp:601
void SetElement(TPZCompEl *el)
Sets computational element pointer.
Definition: pzcompel.h:685
static int gOrder
Default interpolation order.
Definition: pzcompel.h:585
virtual void ProjectFlux(TPZElementMatrix &ek, TPZElementMatrix &ef)
Projects the flux function on the finite element space.
Definition: pzcompel.h:798
void SetMesh(TPZCompMesh *mesh)
Sets the grid of the element.
Definition: pzcompel.cpp:281
virtual void TransferMultiphysicsElementSolution()
Definition: pzcompel.h:415
virtual int ClassId() const override
Define the class id associated with the class.
Definition: pzcompel.cpp:1129
Abstract class defining integration rules. Numerical Integration.
Definition: tpzintpoints.h:19
virtual int IsInterface()
Definition: pzcompel.h:159
void error(char *string)
Definition: testShape.cc:7
This abstract class defines the behaviour which each derived class needs to implement.
Definition: TPZMaterial.h:39
virtual TPZMaterial * Material() const
Identify the material object associated with the element.
Definition: pzcompel.cpp:959
int64_t size() const
Returns the number of elements of the vector.
Definition: pzvec.h:196
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.
Definition: pzcompel.cpp:736
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...
Definition: pzcompel.cpp:410
virtual void LoadSolution()
Loads the solution within the internal data structure of the element.
Definition: pzcompel.cpp:200
virtual void SetIntegrationRule(int order)
Definition: pzcompel.h:605
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Definition: pzgeoel.h:43
TPZCompElSide(const TPZCompElSide &celside)
Creates a computational element side from an object TPZCompElSide.
Definition: pzcompel.h:653
virtual bool HasMaterial(const std::set< int > &materialids) const
Verifies if the material associated with the element is contained in the set.
Definition: pzcompel.cpp:968
Contains TPZMatrixclass which implements full matrix (using column major representation).
virtual void SetIntegrationRule(TPZIntPoints *intrule)
Method to set a dynamically allocated integration rule.
Definition: pzcompel.cpp:1116
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
This class defines the boundary condition for TPZMaterial objects.
Definition: pzbndcond.h:29
TPZCompMesh * Mesh() const
Return a pointer to the grid of the element.
Definition: pzcompel.cpp:288
virtual int ComputeIntegrationOrder() const
Definition: pzcompel.cpp:1111
void SetReference(int64_t referenceindex)
Definition: pzcompel.h:164
void SetIndex(int64_t index)
Sets element index of the mesh fELementVec list.
Definition: pzcompel.cpp:577
virtual void ComputeError(int errorid, TPZVec< REAL > &error)
ComputeError computes the element error estimator.
Definition: pzcompel.h:353
virtual void Integrate(int variable, TPZVec< STATE > &value)
Integrates a variable over the element.
Definition: pzcompel.h:366
virtual void AddShapeRestraint(TPZOneShapeRestraint restraint)
Add a shape restraint (meant to fit the pyramid to restraint.
Definition: pzcompel.h:426
static int GetgOrder()
Set the default value of the interpolation order.
Definition: pzcompel.h:830
int64_t fReferenceIndex
Index of reference element.
Definition: pzcompel.h:71
int Exists() const
Verifies if the object is non null (initialized)
Definition: pzcompel.h:697
TPZIntPoints * fIntegrationRule
Integration rule established by the user.
Definition: pzcompel.h:590
int64_t Index() const
Returns element index of the mesh fELementVec list.
Definition: pzcompel.h:821
Contains the TPZMaterialData class which implements an interface between TPZCompEl::CalcStiff and TPZ...
virtual void ComputeSolution(TPZVec< REAL > &qsi, TPZMaterialData &data)
Definition: pzcompel.h:462
virtual TPZConnect & Connect(int i) const
Returns a pointer to the ith node.
Definition: pzcompel.cpp:298
int fSide
Index of the object side.
Definition: pzcompel.h:638
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...
Definition: pzelmat.h:30
virtual void Assemble()
Computes the element stifness matrix and right hand side in an internal data structure. Used for initializing condensed element data structures.
Definition: pzcompel.h:790
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)
Definition: tinyfadlog.h:43
virtual std::list< TPZOneShapeRestraint > GetShapeRestraints() const
Return a list with the shape restraints.
Definition: pzcompel.h:432
virtual void PrepareIntPtIndices()
Prepare the vector of the material withmem with the correct integration point indexes.
Definition: pzcompel.h:395
REAL LesserEdgeOfEl()
Will return the smallest distance between two nodes of the reference element.
Definition: pzcompel.cpp:697
TPZCompEl * Element() const
Gives a pointer to the reference computational element.
Definition: pzcompel.h:675
virtual void CalcResidual(TPZElementMatrix &ef)
Computes the element right hand side.
Definition: pzcompel.cpp:610
virtual void SetMemoryIndices(TPZVec< int64_t > &indices)
Set the indices of the vector of element memory associated with the integration points.
Definition: pzcompel.h:386
TPZGeoEl * Reference() const
Return a pointer to the corresponding geometric element if such exists, return 0 otherwise.
Definition: pzcompel.cpp:1137
Implements a geometric node in the pz environment. Geometry.
Definition: pzgnode.h:31
virtual void SetMultiphysicsElementSolution()
Definition: pzcompel.h:420
MElementType
Define the element types.
Definition: pzeltype.h:52
This class implements a stack object. Utility.
Definition: pzcheckmesh.h:14
virtual void SetFreeIntPtIndices()
Frees the material damage varibles memory in the proper material class.
Definition: pzcompel.h:405
Implements computational mesh. Computational Mesh.
Definition: pzcmesh.h:47
Contains the functions to create different computational elements (one- two- three-dimensional).
virtual void Print(std::ostream &out=std::cout) const
Prints element data.
Definition: pzcompel.cpp:322
TPZCompEl * fEl
Pointer to the computational element.
Definition: pzcompel.h:635
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...
Definition: pzcompel.cpp:421
void Fill(const T &copy, const int64_t from=0, const int64_t numelem=-1)
Will fill the elements of the vector with a copy object.
Definition: pzvec.h:460
int Side() const
Returns the side index.
Definition: pzcompel.h:688
void Write(TPZStream &buf, int withclassid) const override
Save the element data to a stream.
Definition: pzcompel.cpp:726
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
Contains the declaration of TPZFlopCounter class and TPZCounter struct.
virtual const TPZIntPoints & GetIntegrationRule() const
Definition: pzcompel.h:609
Implements an affine transformation between points in parameter space. Topology Utility.
Definition: pzmganalysis.h:14
virtual REAL VolumeOfEl()
Returns the volume of the geometric element associated.
Definition: pzcompel.h:132
virtual ~TPZCompEl()
Simple destructor.
Definition: pzcompel.cpp:173
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...
Definition: pzcompel.h:411
REAL MaximumRadiusOfEl()
Will return the maximum distance between the nodes of the reference element.
Definition: pzcompel.cpp:671
TPZCompElSide(TPZCompEl *cel, int side)
Creates an computational element side given a computational element and the side index.
Definition: pzcompel.h:664
virtual int PressureConnectIndex() const
Returns the index of the pressure connect.
Definition: pzcompel.cpp:1032
This class defines the interface to save and restore objects from TPZStream objects. Persistency.
Definition: TPZSavable.h:67
Defines the interface of a computational element. Computational Element.
Definition: pzcompel.h:59
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...
Definition: pzcompel.cpp:593
virtual int HasDependency()
Returns 1 if the element has at least one dependent node. Returns 0 otherwise.
Definition: pzcompel.cpp:565
int64_t fIndex
Element index into mesh element vector.
Definition: pzcompel.h:67
Implements computational element based on an interpolation space. Computational Element.
Definition: pzintel.h:27
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...
Definition: pzcompel.cpp:743
#define PZError
Defines the output device to error messages and the DebugStop() function.
Definition: pzerror.h:15
TPZCompMesh * fMesh
Computational mesh to which the element belongs.
Definition: pzcompel.h:64
virtual void GetMemoryIndices(TPZVec< int64_t > &indices) const
Get the indices of the vector of element memory associated with the integration points.
Definition: pzcompel.h:376