21 int nconnects = fMesh->ConnectVec().NElements();
23 for(ic=0; ic<nconnects; ic++) {
33 int nelem = fMesh->ElementVec().NElements();
35 for(el=0; el<nelem; el++) {
42 for(
int side=0; side<ns; side++) {
44 for (
int ic=0; ic<nsc; ic++)
47 if(index == connect) {
65 int blsize = fMesh->Block().Size(seqnum);
66 if (blsize != dofsize) {
82 *fOut <<
"Connect " << connect <<
" has dependency but no large element\n";
87 *fOut <<
"Connect " << connect <<
" has no dependency but has large element\n";
92 BuildDependList(connect,deplist);
95 for(
id=0;
id<ndep;
id++) {
100 (*fOut) <<
"VerifyConnect of connect " << connect << std::endl;
101 (*fOut) <<
"deplist = " << deplist <<
" deplist[id] = " << deplist[id] << std::endl;
102 (*fOut) <<
"Connect index of connect which is restrained deplist[id] = " << deplist[id] << std::endl;
103 TPZConnect &c = fMesh->ConnectVec()[deplist[id]];
104 c.
Print(*fMesh,(*fOut));
105 (*fOut) <<
"Element/side which contains deplist[id] side = " << smalll.
Side() <<
"\n";
107 (*fOut) <<
"VerifyConnect of " << connect <<
" inconsistent\n";
113 for(icl=0; icl<ncl; icl++) {
118 (*fOut) <<
"VerifyConnect of " << connect <<
" inconsistent\n";
126 (*fOut) <<
"DependencyReport for connect " << connect << endl;
128 DependencyReport(connect, large);
137 for(is=0; is<nsmall; is++) {
138 int conind = smalll[is].Element()->ConnectIndex(smalll[is].Side());
139 (*fOut) <<
"Connect " << conind <<
" may depend on " << connect << endl;
148 for(eq=0; eq<neq; eq++) equal[eq].HigherDimensionElementList(highdim,1,0);
152 for(ih=0; ih<nhigh; ih++) {
153 DependencyReport(connect,highdim[ih]);
159 int ncon = fMesh->NConnects();
162 for (i=0; i<ncon; i++){
164 if (!VerifyConnect(i) || !VerifyCompatibilityBetweenNShapesAndBlockSize(i)) {
166 (*fOut) <<
"Check failed for connect: " << i << endl;
174 check = CheckElementShapeDimension();
175 int check2 = CheckConstraintDimension();
176 return (check || check2);
181 int nelem = fMesh->ElementVec().NElements();
183 for(el=0; el<nelem; el++) {
184 TPZCompEl *cel = fMesh->ElementVec()[el];
190 for(ic=0; ic<nc; ic++) {
194 if (c.
NShape() != nshape) {
195 cout <<
"TPZCheckMesh::CheckElement.. el = " << el <<
" connect = " 196 << cind <<
" nshape = " << nshape <<
" c.NShape " << c.
NShape() << endl;
200 int seqnum = fMesh->ConnectVec()[cind].SequenceNumber();
201 int blsize = fMesh->Block().Size(seqnum);
202 if(nshape*fNState != blsize) {
203 cout <<
"TPZCheckMesh::CheckElement.. el = " << el <<
" connect = " 204 << cind <<
" nshape = " << nshape <<
" blsize " << blsize << endl;
216 int ncon = fMesh->ConnectVec().NElements();
217 std::set<int64_t> badcon;
218 for(int64_t ic=0; ic<ncon; ic++) {
224 int iblsize = fMesh->Block().Size(iseqnum);
231 TPZConnect &jcon = fMesh->ConnectVec()[jcind];
233 int jblsize = fMesh->Block().Size(jseqnum);
234 if(r*fNState != iblsize || c*fNState != jblsize) {
236 cout <<
"TPZCheckMesh::CheckConstraintDi.. ic = " << ic
237 <<
" depends on " << jcind <<
" r " << r <<
" iblsize " 238 << iblsize <<
" c " << c <<
" jblsize " << jblsize << endl;
247 for (int64_t el=0; el<nelem; el++) {
253 for (
int ic=0; ic<nc; ic++) {
255 if (connecttoel[cindex] == -1) {
256 connecttoel[cindex] = el;
260 std::set<int64_t> badelements;
261 for (std::set<int64_t>::iterator it = badcon.begin(); it != badcon.end(); it++) {
263 if (connecttoel[*it] == -1) {
264 std::cout <<
"Connect " << *it <<
" has dependency but does not belong to an element\n";
266 TPZCompEl *cel = fMesh->Element(connecttoel[*it]);
269 std::cout <<
"I dont understand\n";
273 for (
int ic = 0; ic<nc; ic++) {
280 std::cout <<
"I dont understand\n";
287 std::cout <<
"Connect index " << *it <<
" belongs to element " << connecttoel[*it] <<
" and is restrained by element ";
288 for(
int i=0; i< equal.
size(); i++) std::cout << equal[i].Element()->Index() <<
" ";
289 std::cout << std::endl;
293 std::set<int64_t> largecon;
294 for (
int icl=0; icl< nclarge; icl++) {
302 std::cout <<
"The connect " << *it <<
" belongs to element " << connecttoel[*it] <<
" as connect " << ic << std::endl;
303 std::cout <<
"The element is restrained along this side to element " << large.
Element()->
Index() << std::endl;
304 std::cout <<
"The connect " << *it <<
" depends on connect " << dep->
fDepConnectIndex <<
" The connect of the large element are ";
305 for (
int ic=0; ic<nclarge; ic++) {
308 std::cout << std::endl;
315 for (std::set<int64_t>::iterator it=badelements.begin(); it != badelements.end(); it++) {
316 fMesh->Element(*it)->Print();
323 int nel = fMesh->ElementVec().NElements();
324 int nstate = (fMesh->MaterialVec().begin()->second)->NStateVariables();
326 for(iel = 0; iel<nel; iel++) {
327 TPZCompEl *cel = fMesh->ElementVec()[iel];
336 for(ic = 0; ic<nc; ic++) {
340 cout <<
"TPZCheckMesh inconsistent dependency" << endl;
355 int64_t numindepconnect = 0;
356 int64_t nconnect = fMesh->NConnects();
357 for (int64_t ic=0; ic<nconnect; ic++) {
363 if (numindepconnect == 0) {
366 for (int64_t ic=0; ic<nconnect; ic++) {
370 if (seqnum < numindepconnect && seqnum != -1) {
371 *fOut <<
"Connect index " << ic <<
" has inconsistent sequence number " << seqnum <<
" nindependent connects " << numindepconnect << std::endl;
376 if (wrong ==
false) {
int CheckConnectSeqNumberConsistency()
This method verifies if the sequence numbers of dependent connects and/or condensed connect are order...
void BuildDependList(int connect, TPZStack< int > &dependlist)
This method will build a list of all connect indices which depend on the connect passed in the argume...
TPZCompElSide LowerLevelElementList(int onlyinterpolated)
Returns all connected elements which have level lower to the current element.
Implements computational element and a side. Computational Element.
Represents a set of shape functions associated with a computational element/side. Computational Eleme...
Contains declaration of TPZGeoElSide class which represents an element and its side, and TPZGeoElSideIndex class which represents an TPZGeoElSide index.
void DependencyReport(int connect)
This method will write a report to the std::ostream about all connects which potentially depend on th...
virtual int NConnectShapeF(int icon, int order) const =0
Returns the number of shapefunctions associated with a connect.
int CheckConnectOrderConsistency()
This method will verify whether the fSiderOrder data structure is in sink with the Order of the Conne...
TPZGeoElSide Reference() const
Reference to the geometric element.
virtual void Print(std::ostream &out=std::cout) const override
Prints the relevant data of the element to the output stream.
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 NSides() const =0
Returns the number of connectivities of the element.
void EqualLevelCompElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Returns all connected computational elements which have equal level to the current element...
int CheckDependency(int nshape, TPZCompMesh *mesh, int nstate)
int CheckConstraintDimension()
int VerifyAllConnects()
Loop over all connects verifying dependency and the compatibility between number of shapes in connect...
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.
int VerifyConnect(int connect)
This method will verify if the connects which depend on the connect passed in the argument list will ...
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.
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...
Structure to reference dependency.
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
unsigned int NShape() const
int64_t Rows() const
Returns number of rows.
int HasDependency() const
Returns whether exist dependecy information.
TPZCompElSide FindElement(int connect)
This method will search in the mesh for an element/side which corresponds to the connect index passed...
Contains declaration of TPZCheckMesh class which verifies the consistency of the datastructure of a T...
int Exists() const
Verifies if the object is non null (initialized)
int64_t Index() const
Returns element index of the mesh fELementVec list.
virtual int NConnects() const override=0
Returns the number of connect objects of the element.
virtual TPZConnect & Connect(int i) const
Returns a pointer to the ith node.
virtual int CheckElementConsistency()
Checks element data structure consistancy.
unsigned char NState() const
Number of state variables associated with the connect.
virtual int64_t ConnectIndex(int i) const =0
Returns the index of the ith connectivity of the element.
virtual int NConnects() const =0
Returns the number of nodes of the element.
TPZFNMatrix< 50, REAL > fDepMatrix
TPZCompEl * Element() const
Gives a pointer to the reference computational element.
TPZDepend * HasDepend(int64_t DepConnectIndex)
TPZGeoEl * Reference() const
Return a pointer to the corresponding geometric element if such exists, return 0 otherwise.
virtual int NSideConnects(int iside) const override=0
Returns the number of dof nodes along side iside.
int Dimension() const
the dimension associated with the element/side
int64_t SideConnectIndex(int icon, int is) const
Returns the index of the c th connect object along side is.
TPZDepend * FirstDepend()
Implements computational mesh. Computational Mesh.
int CheckElementShapeDimension()
virtual void Print(std::ostream &out=std::cout) const
Prints element data.
int NElConnected() const
Returns fNElConnected.
Contains declaration of TPZInterpolatedElement class which implements computational element of the in...
int Side() const
Returns the side index.
int64_t Cols() const
Returns number of cols.
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.
TPZCheckMesh(TPZCompMesh *mesh, std::ostream *out)
Constructor.
void Print(const TPZCompMesh &mesh, std::ostream &out=std::cout)
Print the information for the connect element.
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.
Implements computational element based on an interpolation space. Computational Element.
int VerifyCompatibilityBetweenNShapesAndBlockSize(int connect)
This method will verify if the number of shape functions in connect is compatible with the size of th...