6 #ifndef TPZElementGroupH 7 #define TPZElementGroupH 33 TPZCompEl(mesh,0,index), fElGroup(), fConnectIndexes()
51 virtual void Print(std::ostream &out = std::cout)
const override 53 out << __PRETTY_FUNCTION__ << std::endl;
55 out <<
"comp and geom indexes :";
56 int nel = fElGroup.
size();
57 for (
int el=0; el<nel; el++) {
58 int64_t cindex = fElGroup[el]->Index();
59 TPZGeoEl *gel = fElGroup[el]->Reference();
61 if(gel) gindex = gel->
Index();
62 out <<
" " << cindex <<
"|" << gindex;
66 out <<
"End of " << __PRETTY_FUNCTION__ << std::endl;
76 int nel = fElGroup.
size();
77 for (
int el = 0; el<nel; el++) {
78 int eldim = fElGroup[el]->Dimension();
79 dimension = dimension < eldim ? eldim :
dimension;
95 return fConnectIndexes.
size();
101 int nel = fElGroup.
size();
102 for (
int el=0; el<nel; el++) {
103 fElGroup[el]->BuildCornerConnectList(connectindexes);
114 return fConnectIndexes[i];
138 int nel = fElGroup.
size();
139 for (
int el=0; el<nel; el++) {
140 fElGroup[el]->LoadSolution();
146 int nel = fElGroup.
size();
147 for (
int el=0; el<nel; el++) {
148 fElGroup[el]->LoadElementReference();
158 int nel = fElGroup.
size();
159 for (
int el=0; el<nel; el++) {
161 locres = fElGroup[el]->IntegrateSolution(varname, matids);
162 if (!result.
size()) {
164 }
else if(result.
size() && result.
size() == locres.
size())
166 int nvar = result.
size();
167 for (
int iv = 0; iv<nvar; iv++) {
168 result[iv] += locres[iv];
185 int nel = fElGroup.
size();
186 for (
int el=0; el<nel; el++) {
188 locres = fElGroup[el]->IntegrateSolution(var);
189 if (!result.
size()) {
191 }
else if(result.
size() && result.
size() == locres.
size())
193 int nvar = result.
size();
194 for (
int iv = 0; iv<nvar; iv++) {
195 result[iv] += locres[iv];
209 int nel = fElGroup.
size();
210 for (
int el=0; el<nel; el++) {
211 fElGroup[el]->TransferMultiphysicsElementSolution();
228 std::map<int64_t,int64_t> & gl2lcConMap,
229 std::map<int64_t,int64_t> & gl2lcElMap)
const override;
241 int nel = fElGroup.
size();
242 for (
int el=0; el<nel; el++) {
243 fElGroup[el]->CreateGraphicalElement(graphmesh,dimension);
249 int nel = fElGroup.
size();
250 for (
int el=0; el<nel; el++) {
251 fElGroup[el]->Integrate(variable,value);
273 virtual bool HasMaterial(
const std::set<int> &materialids)
const override;
282 std::cout <<
"This method should not be called. " << __PRETTY_FUNCTION__ << std::endl;
288 virtual int ClassId()
const override;
Represents a graphical mesh used for post processing purposes. Post processing.
TPZStack< TPZCompEl *, 5 > GetElGroup()
virtual void Integrate(int variable, TPZVec< STATE > &value) override
Integrates a variable over the element.
virtual int64_t ConnectIndex(int i) const override
Returns the index of the ith connectivity of the element.
void Unwrap()
put the elements in the element group back in the mesh and delete the element group ...
TPZVec< STATE > IntegrateSolution(const std::string &varname, const std::set< int > &matids) override
Compute the integral of a variable defined by the string if the material id is included in matids...
TPZStack< TPZCompEl *, 5 > fElGroup
virtual int NConnects() const override
Returns the number of nodes of the element.
virtual void EvaluateError(std::function< void(const TPZVec< REAL > &loc, TPZVec< STATE > &val, TPZFMatrix< STATE > &deriv)> func, TPZVec< REAL > &errors, bool store_error) override
Performs an error estimate on the elemen.
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
TPZManVector< int64_t, 27 > fConnectIndexes
Contains declaration of TPZCompEl class which defines the interface of a computational element...
virtual void CalcResidual(TPZElementMatrix &ef) override
Computes the element right hand side.
Class which groups elements to characterize dense matrices.
REAL val(STATE &number)
Returns value of the variable.
Contains TPZMatRed class which implements a simple substructuring of a linear system of equations...
virtual void TransferMultiphysicsElementSolution() override
virtual ~TPZElementGroup()
virtual TPZCompEl * Clone(TPZCompMesh &mesh) const override
Method for creating a copy of the element.
int ComputeIntegrationOrder() const override
Contains declaration of TPZElementMatrix struct which associates an element matrix with the coeficien...
virtual void LoadElementReference() override
Loads the geometric element reference.
virtual void BuildCornerConnectList(std::set< int64_t > &connectindexes) const override
adds the connect indexes associated with base shape functions to the set
int64_t size() const
Returns the number of elements of the vector.
TPZElementGroup(TPZCompMesh &mesh, int64_t &index)
virtual TPZVec< STATE > IntegrateSolution(int var) const override
Compute the integral of a variable defined by the string if the material id is included in matids...
virtual int Dimension() const override
Dimension of the element.
virtual TPZCompEl * ClonePatchEl(TPZCompMesh &mesh, std::map< int64_t, int64_t > &gl2lcConMap, std::map< int64_t, int64_t > &gl2lcElMap) const override
Method for creating a copy of the element in a patch mesh.
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
int64_t Index() const
Returns the index of the element within the element vector of the mesh.
virtual void Print(std::ostream &out=std::cout) const override
Prints element data.
#define DebugStop()
Returns a message to user put a breakpoint in.
Free store vector implementation.
This class associates an element matrix with the coeficients of its contribution in the global stiffn...
virtual void SetConnectIndex(int inode, int64_t index) override
Set the index i to node inode.
virtual void CreateGraphicalElement(TPZGraphMesh &graphmesh, int dimension) override
Creates corresponding graphical element(s) if the dimension matches graphical elements are used to ge...
virtual void CalcStiff(TPZElementMatrix &ek, TPZElementMatrix &ef) override
Computes the element stifness matrix and right hand side.
virtual void LoadSolution() override
Loads the solution within the internal data structure of the element.
virtual int ClassId() const override
Define the class id associated with the class.
Implements computational mesh. Computational Mesh.
virtual void Print(std::ostream &out=std::cout) const
Prints element data.
void InitializeElementMatrix(TPZElementMatrix &ek, TPZElementMatrix &ef) const
Initialize the datastructure of ek and ef based on the connect information.
Defines the interface of a computational element. Computational Element.
virtual void AddElement(TPZCompEl *cel)
add an element to the element group
bool NeedsComputing(const std::set< int > &matids) override
Verifies if any element needs to be computed corresponding to the material ids.
virtual bool HasMaterial(const std::set< int > &materialids) const override
Verifies if the material associated with the element is contained in the set.
std::map< int64_t, TPZOneShapeRestraint > fRestraints