41 int side, nsides, nnodes;
46 for(side = nnodes; side < nsides; side++)
53 while(neighside != gelside)
71 std::list< TPZAutoPointer<TPZRefPattern> >::iterator gelReflistIt;
73 for(gelReflistIt = gelReflist.begin(); gelReflistIt != gelReflist.end(); gelReflistIt++)
76 for(side = nnodes; side < nsides; side++)
81 if(GelSideRefPattern && NeighSideRefPattern)
83 if( !( (
TPZRefPattern &)GelSideRefPattern == NeighSideRefPattern) )
93 refs.push_back(*gelReflistIt);
100 std::map<int,int> > > &neighCorresp)
102 neighCorresp.clear();
105 int nnodes = gel->
NNodes();
106 int nsides = gel->
NSides();
108 bool neigh_isrefined, topolAreCompatibles;
111 std::list< TPZAutoPointer<TPZRefPattern> >::iterator it;
114 for(it = candidates.begin(); it != candidates.end(); it++)
117 for(side = nnodes; side < nsides; side++)
122 neigh_isrefined =
false;
123 topolAreCompatibles =
false;
129 neigh_isrefined =
true;
130 topolAreCompatibles =
false;
134 else if(neighside == gelside && side == nsides-1)
139 while(neighside != gelside)
143 neigh_isrefined =
true;
147 if(neighRefp && modelsideRefp)
152 std::map<int, int> pairedNodes;
155 topolAreCompatibles = CompareTopologies(neighRefp, modelsideRefp, transBetweenNeigh, pairedNodes);
157 if(topolAreCompatibles)
159 neighCorresp[side] = make_pair(neighside.
Element(), pairedNodes);
166 if( (neigh_isrefined && !topolAreCompatibles) || (gelside.
Dimension() == 1 && !neigh_isrefined && modelPat->
SideRefPattern(side)) )
168 neighCorresp.clear();
189 std::list<TPZAutoPointer<TPZRefPattern> > patlist, perfectmatch;
194 std::list<TPZAutoPointer<TPZRefPattern> >::iterator it;
195 for(it = patlist.begin(); it != patlist.end(); it++)
201 TPZGeoEl * gelTemp = (*it)->Element(0);
203 int nsides = gelTemp->
NSides();
210 for(is = ncorners; is < nsides; is++)
212 if( sidestorefine[is] != (*it)->NSideNodes(is) )
219 perfectmatch.push_back(*it);
225 if (perfectmatch.size() == 1) {
226 return *perfectmatch.begin();
227 }
else if(perfectmatch.size() > 1)
232 for (
auto it=perfectmatch.begin(); it!= perfectmatch.end(); it++) {
237 patlist.push_back(*it);
241 patlist.push_back(*it);
244 if (patlist.size() != 1) {
245 for (
auto it2=patlist.begin(); it2 != patlist.end(); it2++) {
246 (*it2)->fRefPatternMesh.Print();
250 return *patlist.begin();
262 GenerateGMeshFromElementVec(realMeshElementVec,refGMesh);
268 ModifyElementsBasedOnRefpFound(refpFound,refp,realMeshElementVec);
282 std::map<int64_t,int64_t> gl2lcNdIdx;
283 std::map<int64_t,int64_t> gl2lcElIdx;
286 for(
int el = 0; el < elementVec.
NElements(); el++)
289 gl2lcElIdx[gel->
Index()] = el;
291 for(
int el = 0; el < elementVec.
NElements(); el++)
298 if(gl2lcNdIdx.find(nodeindex) != gl2lcNdIdx.end())
306 int oldSize = refGMesh.
NNodes();
308 refGMesh.
NodeVec()[oldSize].SetCoord(sonNodeCoord);
309 refGMesh.
NodeVec()[oldSize].SetNodeId(oldSize);
311 gl2lcNdIdx[nodeindex] = oldSize;
325 std::map<int64_t,int64_t> Node_RefpFound2Refp;
326 for(int64_t n = 0; n < refpGMesh.
NNodes(); n++)
329 refpGMesh.
NodeVec()[n].GetCoordinates(coord);
338 Node_RefpFound2Refp[nodeIndex] = n;
342 for(int64_t el=1; el < refpGMesh.
NElements(); el++)
345 std::set<int64_t> nodeindicesRefp;
346 refpGMesh.
ElementVec()[el]->GetNodeIndices(nodeIndicesVecRefp);
349 int sz = nodeIndicesVecRefp.
size();
350 int64_t *zero = &nodeIndicesVecRefp[0];
351 nodeindicesRefp.insert(zero,zero+sz);
361 for(el2 = 1; el2 < refpFoundGMesh.
NElements(); el2++)
363 refpFoundGMesh.
ElementVec()[el2]->GetNodeIndices(nodeIndicesVecRefpFound);
364 std::set<int64_t> nodeindicesRefpFound;
365 for(
int n = 0; n < nodeIndicesVecRefpFound.
NElements(); n++)
368 if(Node_RefpFound2Refp.find(nodeIndicesVecRefpFound[n]) == Node_RefpFound2Refp.end())
374 nodeindicesRefpFound.insert(Node_RefpFound2Refp[nodeIndicesVecRefpFound[n]]);
376 if(nodeindicesRefp == nodeindicesRefpFound)
385 subels[el2-1] = elementVec[el];
389 for(int64_t n = 0; n < refpFoundGMesh.
ElementVec()[el2]->NNodes(); n++)
391 std::map<int64_t,int64_t>::iterator it = Node_RefpFound2Refp.find(refpFoundGMesh.
ElementVec()[el2]->NodeIndex(n));
392 if(it == Node_RefpFound2Refp.end())
396 int newNodeIndex = -1;
397 for(
int nn = 0; nn < refpGMesh.
ElementVec()[el]->NNodes(); nn++)
399 if(refpGMesh.
ElementVec()[el]->NodeIndex(nn) == it->second)
405 if(newNodeIndex == -1)
409 newTopol[n] = elementVec[el]->NodeIndex(newNodeIndex);
411 for(int64_t n = 0; n < elementVec[el]->NNodes(); n++)
413 elementVec[el]->SetNodeIndex(n,newTopol[n]);
417 for(int64_t el = 1; el < elementVec.
NElements(); el++)
419 elementVec[el] = subels[el-1];
434 if(!thereIsAnyNeighbourRefined)
443 std::map<int, std::pair<TPZGeoEl *, std::map<int,int> > > neighCorresp;
452 std::cout <<
"\nModelRefPattern NOT FOUND in " << __PRETTY_FUNCTION__ << std::endl;
453 std::cout <<
"You should create it and add in Refinement Patterns Folder!" << std::endl;
454 std::cout <<
"Open file ModelRefPatternNOTFOUND.vtk in Paraview to see the neighbourhood\n";
456 std::ofstream outNotFound(
"ModelRefPatternNOTFOUND.vtk");
469 std::map<int,int> > > &neighCorresp)
472 int nnodes = gel->
NNodes();
473 int nsides = gel->
NSides();
475 for(
int side = nnodes; side < nsides; side++)
477 std::map<int, std::pair<TPZGeoEl *, std::map<int,int> > >::iterator correspIt = neighCorresp.find(side);
478 if(correspIt == neighCorresp.end())
482 TPZGeoEl * neighStored = correspIt->second.first;
486 while(neighside != gelside)
488 if(neighside.
Element() == neighStored)
498 std::map<int, int> pairedNodes = correspIt->second.second;
501 std::map<int, int> pairSideNodes;
503 std::map<int, int>::iterator it, jt;
504 for(it = pairedNodes.begin(); it != pairedNodes.end(); it++)
506 TPZVec<REAL> NodeCoord(3,0.), sideNodeCoord(3,0.), neighNodeCoord(3,0.);
509 transBetweenNeigh.
Apply(neighNodeCoord, sideNodeCoord);
510 transBetweenSides.
Apply(sideNodeCoord, NodeCoord);
512 jt = pairSideNodes.find(it->second);
513 if(jt != pairSideNodes.end())
515 int gNode = jt->second;
516 for(
int n = 0; n < 3; n++)
537 return modelPat_copy;
543 std::map<int, int> &pairedNodes)
563 std::map<MElementType, std::list<TPZGeoEl*> > eltypeA, eltypeB;
564 for(
int el = 1; el < meshA.
NElements(); el++)
569 eltypeA[gelA->
Type()].push_back(gelA);
570 eltypeB[gelB->
Type()].push_back(gelB);
572 if(eltypeA.size() != eltypeB.size())
577 std::map<MElementType, std::list<TPZGeoEl*> >::iterator eltypeAit, eltypeBit;
578 for(eltypeAit = eltypeA.begin(); eltypeAit != eltypeA.end(); eltypeAit++)
580 eltypeBit = eltypeB.find(eltypeAit->first);
581 if( (eltypeBit == eltypeB.end()) || (eltypeAit->second.size() != eltypeBit->second.size()) )
589 PairMeshesCornerNodesMatchingCoordinates(meshA, meshB, fromAtoB, pairedNodes);
592 int unpairedNNodes = meshA.
NNodes() - pairedNodes.size();
595 if((
int) pairedNodes.size() < fatherA->
NNodes())
597 std::cout <<
"\nThere is something going wrong with meshA and/or meshB in " << __PRETTY_FUNCTION__ << std::endl;
598 std::cout <<
"father->ConnerNodes should be paired at least!!!\n\n";
603 std::map<int, int>::iterator pairedNodesIT;
605 if(unpairedNNodes > 0)
607 for(
int s = fatherA->
NNodes(); s < fatherA->
NSides(); s++)
613 int nodeIniA = pairedNodesIT->first;
614 int nodeIniB = pairedNodesIT->second;
617 int nodeFinA = pairedNodesIT->first;
618 int nodeFinB = pairedNodesIT->second;
621 NodesHunter(meshA, NodesHuntedA, nodeIniA, nodeFinA);
624 NodesHunter(meshB, NodesHuntedB, nodeIniB, nodeFinB);
626 for(
int n = 1; n < NodesHuntedA.
size()-1; n++)
628 int nA = NodesHuntedA[n];
629 int nB = NodesHuntedB[n];
631 if(pairedNodes.find(nA) == pairedNodes.end())
633 pairedNodes[nA] = nB;
646 #define IwantPairedElementsToo 647 #ifdef IwantPairedElementsToo 648 std::map<int, int> pairedElements;
649 pairedElements[0] = 0;
652 std::list<TPZGeoEl*>::iterator elAit, elBit;
653 std::list< std::list<TPZGeoEl*>::iterator > pointedB;
656 std::list< TPZVec<int> > BthatMatch;
657 int pairedNodesCount, unsuccessfulLoop = 0;
658 while(unsuccessfulLoop < 2 && nRemainingSubels > 0)
660 for(eltypeAit = eltypeA.begin(); eltypeAit != eltypeA.end(); eltypeAit++)
662 eltypeBit = eltypeB.find(eltypeAit->first);
663 for(elAit = eltypeAit->second.begin(); elAit != eltypeAit->second.end(); elAit++)
667 pairedNodesCount = 0;
668 for(
int n = 0; n < A->
NNodes(); n++)
671 pairedNodesIT = pairedNodes.find(Anodes[n]);
672 if(pairedNodesIT != pairedNodes.end())
677 if(pairedNodesCount > 1)
681 for(elBit = eltypeBit->second.begin(); elBit != eltypeBit->second.end(); elBit++)
685 for(
int p = 0; p < Bnodes.
NElements(); p++)
687 bool goodCandidate =
true;
688 for(
int n = 0; n < Anodes.
NElements(); n++)
691 int nB = Bnodes[p][n];
693 pairedNodesIT = pairedNodes.find(nA);
694 if(pairedNodesIT != pairedNodes.end() && pairedNodesIT->second != nB)
696 goodCandidate =
false;
702 BthatMatch.push_back(Bnodes[p]);
703 pointedB.push_back(elBit);
708 if(pairedNodesCount > 1 && BthatMatch.size() == 1)
710 for(
int n = 0; n < Anodes.
NElements(); n++)
712 pairedNodesIT = pairedNodes.find(Anodes[n]);
713 if(pairedNodesIT == pairedNodes.end() && unpairedNNodes > 0)
715 pairedNodes[Anodes[n]] = (*BthatMatch.begin())[n];
721 #ifdef IwantPairedElementsToo 722 int Aid = (*(elAit))->Id();
723 int Bid = (*(*(pointedB.begin())))->Id();
724 pairedElements[Aid] = Bid;
727 eltypeAit->second.erase(elAit);
728 eltypeBit->second.erase(*pointedB.begin());
730 unsuccessfulLoop = 0;
738 if(nRemainingSubels == 0 && unpairedNNodes == 0)
750 std::map<int, int> &pairedNodes)
754 int Annodes = meshA.
ElementVec()[0]->NNodes();
755 int Bnnodes = meshB.
ElementVec()[0]->NNodes();
756 for(
int nA = 0; nA < Annodes; nA++)
758 meshA.
NodeVec()[meshA.
ElementVec()[0]->NodeIndex(nA)].GetCoordinates(ANodeCoord);
759 fromAtoB.
Apply(ANodeCoord, BNodeCoord);
762 for(
int nB = 0; nB < Bnnodes; nB++)
765 meshB.
NodeVec()[meshB.
ElementVec()[0]->NodeIndex(nB)].GetCoordinates(BNodeCoord_compare);
766 for(
int c = 0; c < 3; c++)
768 dif +=
fabs(BNodeCoord[c] - BNodeCoord_compare[c]);
774 pairedNodes[nA_Id] = nB_Id;
785 std::map<int, int> &pairedNodes)
789 int Annodes = meshA.
NNodes();
790 int Bnnodes = meshB.
NNodes();
791 for(
int nA = 0; nA < Annodes; nA++)
793 meshA.
NodeVec()[nA].GetCoordinates(ANodeCoord);
794 fromAtoB.
Apply(ANodeCoord, BNodeCoord);
797 for(
int nB = 0; nB < Bnnodes; nB++)
800 meshB.
NodeVec()[nB].GetCoordinates(BNodeCoord_compare);
801 for(
int c = 0; c < 3; c++)
803 dif +=
fabs(BNodeCoord[c] - BNodeCoord_compare[c]);
807 int nA_Id = meshA.
NodeVec()[nA].Id();
808 int nB_Id = meshB.
NodeVec()[nB].Id();
809 pairedNodes[nA_Id] = nB_Id;
819 std::string refpTypeName;
820 std::stringstream rpName;
825 std::cout <<
"Null refpattern parameter on " << __PRETTY_FUNCTION__ << std::endl;
831 int nsides = gel->
NSides();
833 std::string perfix = gel->
TypeName();
834 for(
int i = 0; i < 3; i++)
838 for(
int s = 0; s < nsides; s++)
849 rpName >> refpTypeName;
851 if(refpTypeName.length() == 0)
861 std::string refpTypeName;
862 std::stringstream rpName;
866 std::cout <<
"Null refpattern parameter on " << __PRETTY_FUNCTION__ << std::endl;
872 int nsides = gel->
NSides();
874 std::string perfix = gel->
TypeName();
875 for(
int i = 0; i < 3; i++)
879 for(
int s = 0; s < nsides; s++)
890 rpName >> refpTypeName;
892 if(refpTypeName.length() == 0)
902 std::string refpTypeName =
"";
903 std::stringstream rpName;
907 std::cout <<
"Null geoelement parameter on " << __PRETTY_FUNCTION__ << std::endl;
911 int nsides = gel->
NSides();
914 if(!thereIsAnyNeighbourRefined)
919 std::string perfix = gel->
TypeName();
920 for(
int i = 0; i < 3; i++)
925 for(
int s = 0; s < nsides; s++)
927 rpName << sidesToRefine[s];
929 rpName >> refpTypeName;
931 if(refpTypeName.length() == 0)
941 bool thereIsAnyNeighbourRefined =
false;
944 int nsides = gel->
NSides();
945 sidestoref.
Resize(nsides, 0);
947 for(
int s = ncorners; s < nsides; s++)
955 while(neighside != gelside)
959 thereIsAnyNeighbourRefined =
true;
961 int ns = neighside.
Side();
971 std::cout <<
"An element is refined but the pattern has no side refpattern along side " << ns <<
"\n";
976 elrefpattern->
SideNodes(ns, MidNodesIndexes);
978 sidestoref[s] = MidNodesIndexes.
NElements();
986 return thereIsAnyNeighbourRefined;
996 if(matids.count(matid))
return;
1002 int numrefcorners = 0;
1007 while(gels != neigh)
1009 if(matids.count(neigh.Element()->MaterialId()))
1012 cornerstorefine[in] = 1;
1020 if (numrefcorners == 0) {
1036 sidestorefine[is] = 1;
1040 while(neigh != gels)
1043 if(matids.count(neigh.Element()->MaterialId()))
1045 sidestorefine[is] = 0;
1049 neigh = neigh.Neighbour();
1063 std::cout <<
"ncorners to refine " << numrefcorners <<
" numrefribs " << numrefribs <<
" i dont understand\n";
1083 std::cout <<
"|"; std::cout.flush();
1084 std::ofstream arquivo (
"NotListedPatterns.txt",std::ios::app);
1085 std::list<TPZAutoPointer<TPZRefPattern> >::iterator it;
1086 arquivo <<
"Compatible refinement patterns\n";
1088 arquivo << std::endl;
1089 arquivo <<
"Element Type : " << gel->
Type() <<
' ' << gel->
TypeName() << std::endl;
1090 arquivo <<
"Sides selected for refinement :" << std::endl;
1092 for (i=0 ; i<gel->
NSides() ; i++)
1100 if (sidestorefine[i] == 1) {
1101 arquivo <<
" " << i <<
" " ;
1104 gel->
Print(arquivo);
1106 arquivo << std::endl;
1107 arquivo <<
"Neighbouring information \n";
1108 for(in=0; in<gel->
NSides(); in++)
1110 arquivo <<
"Side : " << in <<
" ";
1112 arquivo <<
"Dim " << gels.
Dimension() <<
" ";
1114 while(gels != neigh)
1116 if(matids.count(neigh.Element()->MaterialId()))
1118 arquivo << neigh.
Element()->
Id() <<
"-l-" << neigh.Side() <<
" ";
1121 arquivo <<
"Teje pego meliante..." << std::endl;
1122 neigh.Element()->Print(arquivo);
1125 neigh = neigh.Neighbour();
1127 arquivo << std::endl;
1129 arquivo << std::endl;
1131 arquivo <<
"Element information : " << gel->
Index() << std::endl;
1132 arquivo <<
"Neighbours of the sides selected for refinement:" << std::endl;
1133 for (i=0 ; i<gel->
NSides() ; i++)
1135 if(cornerstorefine[i] == 1 || sidestorefine[i] == 1)
1139 while (neigh != gelside)
1141 arquivo <<
"*********** my side = " << i <<
" neighside " << neigh.
Side() << std::endl;
1147 arquivo << std::endl << std::endl << std::endl << std::endl;
1156 for (int64_t el=0; el<nel; el++) {
1161 RefineDirectional(gel, matids);
1168 for (int64_t el=0; el<nel; el++) {
1173 RefineDirectional(gel, matids, gelMat);
1186 if(matids.count(matid))
return;
1196 while(gels != neigh)
1198 if(matids.count(neigh.Element()->MaterialId()))
1200 cornerstorefine[in] = 1;
1218 sidestorefine[is] = 1;
1222 while(neigh != gels)
1225 if(matids.count(neigh.Element()->MaterialId()))
1227 sidestorefine[is] = 0;
1231 neigh = neigh.Neighbour();
1251 std::cout <<
"|"; std::cout.flush();
1252 static int nTimes {-1};
1254 std::ofstream arquivo (
"NotListedPatterns"+
std::to_string(nTimes)+
".txt",std::ios::trunc);
1255 std::list<TPZAutoPointer<TPZRefPattern> >::iterator it;
1256 arquivo <<
"Compatible refinement patterns\n";
1258 arquivo << std::endl;
1259 arquivo <<
"Element Type : " << gel->
Type() <<
' ' << gel->
TypeName() << std::endl;
1260 arquivo <<
"Sides selected for refinement :" << std::endl;
1262 for (i=0 ; i<gel->
NSides() ; i++)
1264 if(cornerstorefine[i] == 1)
1266 arquivo <<
" " << i <<
" ";
1268 if (sidestorefine[i] == 1) {
1269 arquivo <<
" " << i <<
" " ;
1272 gel->
Print(arquivo);
1274 arquivo << std::endl;
1276 arquivo <<
"Element information : " << gel->
Index() << std::endl;
1277 arquivo <<
"Neighbours of the sides selected for refinement:" << std::endl;
1278 for (i=0 ; i<gel->
NSides() ; i++)
1280 if(cornerstorefine[i] == 1 || sidestorefine[i] == 1)
1284 while (neigh != gelside)
1286 arquivo <<
"*********** my side = " << i <<
" neighside " << neigh.
Side() << std::endl;
1292 arquivo << std::endl << std::endl << std::endl << std::endl;
1300 int nsides = gel->
NSides();
1301 for(
int s = 0; s < nsides; s++)
1306 while(gelside != neighside)
1308 if(matids.count(neighside.Element()->MaterialId()))
1321 std::cout <<
"Uniform refpattern was not found!" << std::endl;
1322 std::cout <<
"See " << __PRETTY_FUNCTION__ << std::endl;
1326 neighside = neighside.Neighbour();
1338 rule->
Point(0, pt, weight);
1342 gelside.
Jacobian(pt, jacobian, axes , detjac, jacinv);
1344 for(ip=1; ip<np; ip++)
1346 rule->
Point(ip, pt, weight);
1350 gelside.
Jacobian(pt, jacobian2, axes2 , detjac2, jacinv2);
1351 jacobian2 -= jacobian;
1375 int dimfatside,fatside,nsides;
1379 if(Tol < 1.e-10) Tol = 1.e-10;
1383 for(isub=0;isub<nsubs;isub++)
1385 subel = refp->
Element(isub+1);
1386 nsides = subel->
NSides();
1387 for(sd=0; sd<nsides; sd++)
1390 if(!ConstJacobian(subside,1.e-6))
1405 for(ip=0;ip<rule->
NPoints();ip++)
1408 rule->
Point(ip,point,weight);
1416 sidet.
Apply(point,point2);
1419 subel->
X(point2,x1);
1425 fatside = father->
WhichSide(pointparamfather);
1434 trans.
Apply(point,pf);
1438 if(dimfatside < dimfat)
1447 sidetf.
Apply(pf,xpf);
1451 if(
sqrt( (x1[0]-x2[0])*(x1[0]-x2[0]) + (x1[1]-x2[1])*(x1[1]-x2[1]) + (x1[2]-x2[2])*(x1[2]-x2[2]) ) > 1.e-10 )
1453 PZError <<
"\nTransformacao errada\n";
1454 PZError <<
"son = " << (subel->
Id()) << std::endl;
1455 PZError <<
"father = " << (father->
Id()) << std::endl;
1456 PZError <<
"side = " << sd << std::endl << std::endl;
1486 for(
int pos = 0; pos < VecSize; pos++)
1488 if(gMesh.
NodeVec()[pos].Id() == IdIni) posIni = pos;
1489 if(gMesh.
NodeVec()[pos].Id() == IdFin) posFin = pos;
1491 for(
int coord = 0; coord < dim; coord++)
1493 double val = gMesh.
NodeVec()[pos].Coord(coord) - gMesh.
NodeVec()[IdIni].Coord(coord);
1494 VectorialNotation.
PutVal(pos,coord,val);
1499 if(posIni == -1 || posFin == -1)
1501 std::cout <<
"Initial Node index or Final Node index doesn't belong to the given TPZGeoNode TPZVec!\n";
1502 std::cout <<
"See NodesHunter method!\n";
1511 IfromCntoBase(dim-1, dim-1) = 1.;
1515 for(
int coord = 0; coord < dim; coord++)
1517 double val = VectorialNotation.
GetVal(posFin,coord) - VectorialNotation.
GetVal(posIni,coord);
1518 IfromCntoBase.
PutVal(0,coord,val);
1522 for(
int coord = 0; coord < dim; coord++)
1531 for(
int i = 0; i < VecSize; i++)
1534 for(
int j = 0; j < dim; j++)
1537 for(
int k = 0; k < dim; k++)
1539 val += IfromCntoBase.
GetVal(j,k)*VectorialNotation.
GetVal(i,k);
1543 for(
int p = 0; p < dim; p++) VectorialNotation.
PutVal(i,p,temp[p]);
1547 std::map <double,int> mymap;
1548 for(
int h = 0;
h < VecSize;
h++)
1550 if( VectorialNotation.
GetVal(
h,0) >= VectorialNotation.
GetVal(posIni,0) &&
1551 VectorialNotation.
GetVal(
h,0) <= VectorialNotation.
GetVal(posFin,0) &&
1554 std::pair< double , int> Item(VectorialNotation.
GetVal(
h,0), gMesh.
NodeVec()[
h].Id());
1558 NodesHunted.
Resize(mymap.size());
1559 std::map<double, int>::iterator it = mymap.begin();
1561 for(it = mymap.begin(); it!= mymap.end(); it++, i++)
1563 NodesHunted[i] = it->second;
1570 GetElTypePermutations(gel->
Type(), permutation);
1571 for(
int p = 0; p < permutation.NElements(); p++)
1573 for(
int n = 0; n < permutation[p].NElements(); n++)
1576 permutation[p][n] = id;
1583 int nperm, nnodes, p;
1590 permutation.Resize(nperm);
1591 for(p = 0; p < nperm; p++)
1593 permutation[p].Resize(nnodes);
1596 permutation[p][0] = 0; permutation[p][1] = 1; p++;
1597 permutation[p][0] = 1; permutation[p][1] = 0;
1605 permutation.Resize(nperm);
1606 for(p = 0; p < nperm; p++)
1608 permutation[p].Resize(nnodes);
1611 permutation[p][0] = 0; permutation[p][1] = 1; permutation[p][2] = 2; p++;
1612 permutation[p][0] = 1; permutation[p][1] = 2; permutation[p][2] = 0; p++;
1613 permutation[p][0] = 2; permutation[p][1] = 0; permutation[p][2] = 1; p++;
1615 permutation[p][0] = 0; permutation[p][1] = 2; permutation[p][2] = 1; p++;
1616 permutation[p][0] = 2; permutation[p][1] = 1; permutation[p][2] = 0; p++;
1617 permutation[p][0] = 1; permutation[p][1] = 0; permutation[p][2] = 2;
1625 permutation.Resize(nperm);
1626 for(p = 0; p < nperm; p++)
1628 permutation[p].Resize(nnodes);
1631 permutation[p][0] = 0; permutation[p][1] = 1; permutation[p][2] = 2; permutation[p][3] = 3; p++;
1632 permutation[p][0] = 1; permutation[p][1] = 2; permutation[p][2] = 3; permutation[p][3] = 0; p++;
1633 permutation[p][0] = 2; permutation[p][1] = 3; permutation[p][2] = 0; permutation[p][3] = 1; p++;
1634 permutation[p][0] = 3; permutation[p][1] = 0; permutation[p][2] = 1; permutation[p][3] = 2; p++;
1636 permutation[p][0] = 0; permutation[p][1] = 3; permutation[p][2] = 2; permutation[p][3] = 1; p++;
1637 permutation[p][0] = 3; permutation[p][1] = 2; permutation[p][2] = 1; permutation[p][3] = 0; p++;
1638 permutation[p][0] = 2; permutation[p][1] = 1; permutation[p][2] = 0; permutation[p][3] = 3; p++;
1639 permutation[p][0] = 1; permutation[p][1] = 0; permutation[p][2] = 3; permutation[p][3] = 2;
1647 permutation.Resize(nperm);
1648 for(p = 0; p < nperm; p++)
1650 permutation[p].Resize(nnodes);
1653 permutation[p][0] = 0; permutation[p][1] = 1; permutation[p][2] = 2; permutation[p][3] = 3; p++;
1654 permutation[p][0] = 1; permutation[p][1] = 2; permutation[p][2] = 0; permutation[p][3] = 3; p++;
1655 permutation[p][0] = 2; permutation[p][1] = 0; permutation[p][2] = 1; permutation[p][3] = 3; p++;
1657 permutation[p][0] = 0; permutation[p][1] = 2; permutation[p][2] = 1; permutation[p][3] = 3; p++;
1658 permutation[p][0] = 2; permutation[p][1] = 1; permutation[p][2] = 0; permutation[p][3] = 3; p++;
1659 permutation[p][0] = 1; permutation[p][1] = 0; permutation[p][2] = 2; permutation[p][3] = 3; p++;
1661 permutation[p][0] = 0; permutation[p][1] = 1; permutation[p][2] = 3; permutation[p][3] = 2; p++;
1662 permutation[p][0] = 1; permutation[p][1] = 3; permutation[p][2] = 0; permutation[p][3] = 2; p++;
1663 permutation[p][0] = 3; permutation[p][1] = 0; permutation[p][2] = 1; permutation[p][3] = 2; p++;
1665 permutation[p][0] = 0; permutation[p][1] = 3; permutation[p][2] = 1; permutation[p][3] = 2; p++;
1666 permutation[p][0] = 3; permutation[p][1] = 1; permutation[p][2] = 0; permutation[p][3] = 2; p++;
1667 permutation[p][0] = 1; permutation[p][1] = 0; permutation[p][2] = 3; permutation[p][3] = 2; p++;
1669 permutation[p][0] = 0; permutation[p][1] = 3; permutation[p][2] = 2; permutation[p][3] = 1; p++;
1670 permutation[p][0] = 3; permutation[p][1] = 2; permutation[p][2] = 0; permutation[p][3] = 1; p++;
1671 permutation[p][0] = 2; permutation[p][1] = 0; permutation[p][2] = 3; permutation[p][3] = 1; p++;
1673 permutation[p][0] = 0; permutation[p][1] = 2; permutation[p][2] = 3; permutation[p][3] = 1; p++;
1674 permutation[p][0] = 2; permutation[p][1] = 3; permutation[p][2] = 0; permutation[p][3] = 1; p++;
1675 permutation[p][0] = 3; permutation[p][1] = 0; permutation[p][2] = 2; permutation[p][3] = 1; p++;
1677 permutation[p][0] = 3; permutation[p][1] = 1; permutation[p][2] = 2; permutation[p][3] = 0; p++;
1678 permutation[p][0] = 1; permutation[p][1] = 2; permutation[p][2] = 3; permutation[p][3] = 0; p++;
1679 permutation[p][0] = 2; permutation[p][1] = 3; permutation[p][2] = 1; permutation[p][3] = 0; p++;
1681 permutation[p][0] = 3; permutation[p][1] = 2; permutation[p][2] = 1; permutation[p][3] = 0; p++;
1682 permutation[p][0] = 2; permutation[p][1] = 1; permutation[p][2] = 3; permutation[p][3] = 0; p++;
1683 permutation[p][0] = 1; permutation[p][1] = 3; permutation[p][2] = 2; permutation[p][3] = 0;
1691 permutation.Resize(nperm);
1692 for(p = 0; p < nperm; p++)
1694 permutation[p].Resize(nnodes);
1697 permutation[p][0] = 0; permutation[p][1] = 1; permutation[p][2] = 2; permutation[p][3] = 3; permutation[p][4] = 4; p++;
1698 permutation[p][0] = 1; permutation[p][1] = 2; permutation[p][2] = 3; permutation[p][3] = 0; permutation[p][4] = 4; p++;
1699 permutation[p][0] = 2; permutation[p][1] = 3; permutation[p][2] = 0; permutation[p][3] = 1; permutation[p][4] = 4; p++;
1700 permutation[p][0] = 3; permutation[p][1] = 0; permutation[p][2] = 1; permutation[p][3] = 2; permutation[p][4] = 4; p++;
1702 permutation[p][0] = 0; permutation[p][1] = 3; permutation[p][2] = 2; permutation[p][3] = 1; permutation[p][4] = 4; p++;
1703 permutation[p][0] = 3; permutation[p][1] = 2; permutation[p][2] = 1; permutation[p][3] = 0; permutation[p][4] = 4; p++;
1704 permutation[p][0] = 2; permutation[p][1] = 1; permutation[p][2] = 0; permutation[p][3] = 3; permutation[p][4] = 4; p++;
1705 permutation[p][0] = 1; permutation[p][1] = 0; permutation[p][2] = 3; permutation[p][3] = 2; permutation[p][4] = 4;
1713 permutation.Resize(nperm);
1714 for(p = 0; p < nperm; p++)
1716 permutation[p].Resize(nnodes);
1719 permutation[p][0] = 0; permutation[p][1] = 1; permutation[p][2] = 2; permutation[p][3] = 3; permutation[p][4] = 4; permutation[p][5] = 5; p++;
1720 permutation[p][0] = 1; permutation[p][1] = 2; permutation[p][2] = 0; permutation[p][3] = 4; permutation[p][4] = 5; permutation[p][5] = 3; p++;
1721 permutation[p][0] = 2; permutation[p][1] = 0; permutation[p][2] = 1; permutation[p][3] = 5; permutation[p][4] = 3; permutation[p][5] = 4; p++;
1723 permutation[p][0] = 0; permutation[p][1] = 2; permutation[p][2] = 1; permutation[p][3] = 3; permutation[p][4] = 5; permutation[p][5] = 4; p++;
1724 permutation[p][0] = 2; permutation[p][1] = 1; permutation[p][2] = 0; permutation[p][3] = 5; permutation[p][4] = 4; permutation[p][5] = 3; p++;
1725 permutation[p][0] = 1; permutation[p][1] = 0; permutation[p][2] = 2; permutation[p][3] = 4; permutation[p][4] = 3; permutation[p][5] = 5; p++;
1727 permutation[p][0] = 3; permutation[p][1] = 4; permutation[p][2] = 5; permutation[p][3] = 0; permutation[p][4] = 1; permutation[p][5] = 2; p++;
1728 permutation[p][0] = 4; permutation[p][1] = 5; permutation[p][2] = 3; permutation[p][3] = 1; permutation[p][4] = 2; permutation[p][5] = 0; p++;
1729 permutation[p][0] = 5; permutation[p][1] = 3; permutation[p][2] = 4; permutation[p][3] = 2; permutation[p][4] = 0; permutation[p][5] = 1; p++;
1731 permutation[p][0] = 3; permutation[p][1] = 5; permutation[p][2] = 4; permutation[p][3] = 0; permutation[p][4] = 2; permutation[p][5] = 1; p++;
1732 permutation[p][0] = 5; permutation[p][1] = 4; permutation[p][2] = 3; permutation[p][3] = 2; permutation[p][4] = 1; permutation[p][5] = 0; p++;
1733 permutation[p][0] = 4; permutation[p][1] = 3; permutation[p][2] = 5; permutation[p][3] = 1; permutation[p][4] = 0; permutation[p][5] = 2;
1741 permutation.Resize(nperm);
1742 for(p = 0; p < nperm; p++)
1744 permutation[p].Resize(nnodes);
1747 permutation[p][0] = 0; permutation[p][1] = 1; permutation[p][2] = 2; permutation[p][3] = 3; permutation[p][4] = 4; permutation[p][5] = 5; permutation[p][6] = 6; permutation[p][7] = 7; p++;
1748 permutation[p][0] = 1; permutation[p][1] = 2; permutation[p][2] = 3; permutation[p][3] = 0; permutation[p][4] = 5; permutation[p][5] = 6; permutation[p][6] = 7; permutation[p][7] = 4; p++;
1749 permutation[p][0] = 2; permutation[p][1] = 3; permutation[p][2] = 0; permutation[p][3] = 1; permutation[p][4] = 6; permutation[p][5] = 7; permutation[p][6] = 4; permutation[p][7] = 5; p++;
1750 permutation[p][0] = 3; permutation[p][1] = 0; permutation[p][2] = 1; permutation[p][3] = 2; permutation[p][4] = 7; permutation[p][5] = 4; permutation[p][6] = 5; permutation[p][7] = 6; p++;
1752 permutation[p][0] = 0; permutation[p][1] = 3; permutation[p][2] = 2; permutation[p][3] = 1; permutation[p][4] = 4; permutation[p][5] = 7; permutation[p][6] = 6; permutation[p][7] = 5; p++;
1753 permutation[p][0] = 3; permutation[p][1] = 2; permutation[p][2] = 1; permutation[p][3] = 0; permutation[p][4] = 7; permutation[p][5] = 6; permutation[p][6] = 5; permutation[p][7] = 4; p++;
1754 permutation[p][0] = 2; permutation[p][1] = 1; permutation[p][2] = 0; permutation[p][3] = 3; permutation[p][4] = 6; permutation[p][5] = 5; permutation[p][6] = 4; permutation[p][7] = 7; p++;
1755 permutation[p][0] = 1; permutation[p][1] = 0; permutation[p][2] = 3; permutation[p][3] = 2; permutation[p][4] = 5; permutation[p][5] = 4; permutation[p][6] = 7; permutation[p][7] = 6; p++;
1757 permutation[p][0] = 0; permutation[p][1] = 1; permutation[p][2] = 5; permutation[p][3] = 4; permutation[p][4] = 3; permutation[p][5] = 2; permutation[p][6] = 6; permutation[p][7] = 7; p++;
1758 permutation[p][0] = 1; permutation[p][1] = 5; permutation[p][2] = 4; permutation[p][3] = 0; permutation[p][4] = 2; permutation[p][5] = 6; permutation[p][6] = 7; permutation[p][7] = 3; p++;
1759 permutation[p][0] = 5; permutation[p][1] = 4; permutation[p][2] = 0; permutation[p][3] = 1; permutation[p][4] = 6; permutation[p][5] = 7; permutation[p][6] = 3; permutation[p][7] = 2; p++;
1760 permutation[p][0] = 4; permutation[p][1] = 0; permutation[p][2] = 1; permutation[p][3] = 5; permutation[p][4] = 7; permutation[p][5] = 3; permutation[p][6] = 2; permutation[p][7] = 6; p++;
1762 permutation[p][0] = 0; permutation[p][1] = 4; permutation[p][2] = 5; permutation[p][3] = 1; permutation[p][4] = 3; permutation[p][5] = 7; permutation[p][6] = 6; permutation[p][7] = 2; p++;
1763 permutation[p][0] = 4; permutation[p][1] = 5; permutation[p][2] = 1; permutation[p][3] = 0; permutation[p][4] = 7; permutation[p][5] = 6; permutation[p][6] = 2; permutation[p][7] = 3; p++;
1764 permutation[p][0] = 5; permutation[p][1] = 1; permutation[p][2] = 0; permutation[p][3] = 4; permutation[p][4] = 6; permutation[p][5] = 2; permutation[p][6] = 3; permutation[p][7] = 7; p++;
1765 permutation[p][0] = 1; permutation[p][1] = 0; permutation[p][2] = 4; permutation[p][3] = 5; permutation[p][4] = 2; permutation[p][5] = 3; permutation[p][6] = 7; permutation[p][7] = 6; p++;
1767 permutation[p][0] = 1; permutation[p][1] = 2; permutation[p][2] = 6; permutation[p][3] = 5; permutation[p][4] = 0; permutation[p][5] = 3; permutation[p][6] = 7; permutation[p][7] = 4; p++;
1768 permutation[p][0] = 2; permutation[p][1] = 6; permutation[p][2] = 5; permutation[p][3] = 1; permutation[p][4] = 3; permutation[p][5] = 7; permutation[p][6] = 4; permutation[p][7] = 0; p++;
1769 permutation[p][0] = 6; permutation[p][1] = 5; permutation[p][2] = 1; permutation[p][3] = 2; permutation[p][4] = 7; permutation[p][5] = 4; permutation[p][6] = 0; permutation[p][7] = 3; p++;
1770 permutation[p][0] = 5; permutation[p][1] = 1; permutation[p][2] = 2; permutation[p][3] = 6; permutation[p][4] = 4; permutation[p][5] = 0; permutation[p][6] = 3; permutation[p][7] = 7; p++;
1772 permutation[p][0] = 1; permutation[p][1] = 5; permutation[p][2] = 6; permutation[p][3] = 2; permutation[p][4] = 0; permutation[p][5] = 4; permutation[p][6] = 7; permutation[p][7] = 3; p++;
1773 permutation[p][0] = 5; permutation[p][1] = 6; permutation[p][2] = 2; permutation[p][3] = 1; permutation[p][4] = 4; permutation[p][5] = 7; permutation[p][6] = 3; permutation[p][7] = 0; p++;
1774 permutation[p][0] = 6; permutation[p][1] = 2; permutation[p][2] = 1; permutation[p][3] = 5; permutation[p][4] = 7; permutation[p][5] = 3; permutation[p][6] = 0; permutation[p][7] = 4; p++;
1775 permutation[p][0] = 2; permutation[p][1] = 1; permutation[p][2] = 5; permutation[p][3] = 6; permutation[p][4] = 3; permutation[p][5] = 0; permutation[p][6] = 4; permutation[p][7] = 7; p++;
1777 permutation[p][0] = 2; permutation[p][1] = 3; permutation[p][2] = 7; permutation[p][3] = 6; permutation[p][4] = 1; permutation[p][5] = 0; permutation[p][6] = 4; permutation[p][7] = 5; p++;
1778 permutation[p][0] = 3; permutation[p][1] = 7; permutation[p][2] = 6; permutation[p][3] = 2; permutation[p][4] = 0; permutation[p][5] = 4; permutation[p][6] = 5; permutation[p][7] = 1; p++;
1779 permutation[p][0] = 7; permutation[p][1] = 6; permutation[p][2] = 2; permutation[p][3] = 3; permutation[p][4] = 4; permutation[p][5] = 5; permutation[p][6] = 1; permutation[p][7] = 0; p++;
1780 permutation[p][0] = 6; permutation[p][1] = 2; permutation[p][2] = 3; permutation[p][3] = 7; permutation[p][4] = 5; permutation[p][5] = 1; permutation[p][6] = 0; permutation[p][7] = 4; p++;
1782 permutation[p][0] = 2; permutation[p][1] = 6; permutation[p][2] = 7; permutation[p][3] = 3; permutation[p][4] = 1; permutation[p][5] = 5; permutation[p][6] = 4; permutation[p][7] = 0; p++;
1783 permutation[p][0] = 6; permutation[p][1] = 7; permutation[p][2] = 3; permutation[p][3] = 2; permutation[p][4] = 5; permutation[p][5] = 4; permutation[p][6] = 0; permutation[p][7] = 1; p++;
1784 permutation[p][0] = 7; permutation[p][1] = 3; permutation[p][2] = 2; permutation[p][3] = 6; permutation[p][4] = 4; permutation[p][5] = 0; permutation[p][6] = 1; permutation[p][7] = 5; p++;
1785 permutation[p][0] = 3; permutation[p][1] = 2; permutation[p][2] = 6; permutation[p][3] = 7; permutation[p][4] = 0; permutation[p][5] = 1; permutation[p][6] = 5; permutation[p][7] = 4; p++;
1787 permutation[p][0] = 3; permutation[p][1] = 0; permutation[p][2] = 4; permutation[p][3] = 7; permutation[p][4] = 1; permutation[p][5] = 5; permutation[p][6] = 6; permutation[p][7] = 4; p++;
1788 permutation[p][0] = 0; permutation[p][1] = 4; permutation[p][2] = 7; permutation[p][3] = 3; permutation[p][4] = 5; permutation[p][5] = 6; permutation[p][6] = 4; permutation[p][7] = 1; p++;
1789 permutation[p][0] = 4; permutation[p][1] = 7; permutation[p][2] = 3; permutation[p][3] = 0; permutation[p][4] = 6; permutation[p][5] = 4; permutation[p][6] = 1; permutation[p][7] = 5; p++;
1790 permutation[p][0] = 7; permutation[p][1] = 3; permutation[p][2] = 0; permutation[p][3] = 4; permutation[p][4] = 4; permutation[p][5] = 1; permutation[p][6] = 5; permutation[p][7] = 6; p++;
1792 permutation[p][0] = 3; permutation[p][1] = 7; permutation[p][2] = 4; permutation[p][3] = 0; permutation[p][4] = 2; permutation[p][5] = 6; permutation[p][6] = 5; permutation[p][7] = 1; p++;
1793 permutation[p][0] = 7; permutation[p][1] = 4; permutation[p][2] = 0; permutation[p][3] = 3; permutation[p][4] = 6; permutation[p][5] = 5; permutation[p][6] = 1; permutation[p][7] = 2; p++;
1794 permutation[p][0] = 4; permutation[p][1] = 0; permutation[p][2] = 3; permutation[p][3] = 7; permutation[p][4] = 5; permutation[p][5] = 1; permutation[p][6] = 2; permutation[p][7] = 6; p++;
1795 permutation[p][0] = 0; permutation[p][1] = 3; permutation[p][2] = 7; permutation[p][3] = 4; permutation[p][4] = 1; permutation[p][5] = 2; permutation[p][6] = 6; permutation[p][7] = 5; p++;
1797 permutation[p][0] = 4; permutation[p][1] = 5; permutation[p][2] = 6; permutation[p][3] = 7; permutation[p][4] = 0; permutation[p][5] = 1; permutation[p][6] = 2; permutation[p][7] = 3; p++;
1798 permutation[p][0] = 5; permutation[p][1] = 6; permutation[p][2] = 7; permutation[p][3] = 4; permutation[p][4] = 1; permutation[p][5] = 2; permutation[p][6] = 3; permutation[p][7] = 0; p++;
1799 permutation[p][0] = 6; permutation[p][1] = 7; permutation[p][2] = 4; permutation[p][3] = 5; permutation[p][4] = 2; permutation[p][5] = 3; permutation[p][6] = 0; permutation[p][7] = 1; p++;
1800 permutation[p][0] = 7; permutation[p][1] = 4; permutation[p][2] = 5; permutation[p][3] = 6; permutation[p][4] = 3; permutation[p][5] = 0; permutation[p][6] = 1; permutation[p][7] = 2; p++;
1802 permutation[p][0] = 4; permutation[p][1] = 7; permutation[p][2] = 6; permutation[p][3] = 5; permutation[p][4] = 0; permutation[p][5] = 3; permutation[p][6] = 2; permutation[p][7] = 1; p++;
1803 permutation[p][0] = 7; permutation[p][1] = 6; permutation[p][2] = 5; permutation[p][3] = 4; permutation[p][4] = 3; permutation[p][5] = 2; permutation[p][6] = 1; permutation[p][7] = 0; p++;
1804 permutation[p][0] = 6; permutation[p][1] = 5; permutation[p][2] = 4; permutation[p][3] = 7; permutation[p][4] = 2; permutation[p][5] = 1; permutation[p][6] = 0; permutation[p][7] = 3; p++;
1805 permutation[p][0] = 5; permutation[p][1] = 4; permutation[p][2] = 7; permutation[p][3] = 6; permutation[p][4] = 1; permutation[p][5] = 0; permutation[p][6] = 3; permutation[p][7] = 2; p++;
1811 cout <<
"Cant return permutation because MElementType was not found on " << __PRETTY_FUNCTION__ << endl;
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
virtual int NPoints() const =0
Returns number of points for the cubature rule related.
TPZGeoNode * NodePtr(int i) const
Returns a pointer to the ith node of the element.
Implements a vector class which allows to use external storage provided by the user. Utility.
int MaterialId() const
Returns the material index of the element.
const std::list< TPZAutoPointer< TPZRefPattern > > & RefPatternList(MElementType eltype)
Return the complete set of refinement patterns availabe.
bool IsFatherNeighbour(TPZGeoElSide fatherSide, TPZGeoEl *son) const
Verifies the neighbouring relationship between a son and a father's side.
int NSubElements()
return the number of element/side pairs which compose the current set of points
void InsertRefPattern(TPZAutoPointer< TPZRefPattern > &refpat)
Insert the refinement pattern in the list of availabe refinement patterns assigns an Id to refPattern...
TPZGeoEl * Element(int iel)
It returns the element number iel from the stack of elements of the geometric mesh.
virtual int NCornerNodes() const =0
Returns the number of corner nodes of the element.
int64_t NElements() const
Number of elements of the mesh.
void InsertPermuted()
Generate all permuted partitions and insert them in the mesh.
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
clarg::argBool h("-h", "help message", false)
int64_t NElements() const
Access method to query the number of elements of the vector.
REAL val(STATE &number)
Returns value of the variable.
TPZGeoElSide Neighbour() const
TPZGeoMesh * Mesh() const
Returns the mesh to which the element belongs.
virtual int NSides() const =0
Returns the number of connectivities of the element.
TPZTransform Transform(int subElSide, int sub)
It returns the TPZTransform associated with a certain sub-element's side to the father's coordinates...
virtual void Divide(TPZVec< TPZGeoEl *> &pv)
Divides the element and puts the resulting elements in the vector.
virtual int64_t NodeIndex(int i) const =0
Returns the index of the ith node the index is the location of the node in the nodevector of the mesh...
virtual int SideDimension(int side) const =0
Return the dimension of side.
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
TPZAutoPointer< TPZRefPattern > FindRefPattern(TPZAutoPointer< TPZRefPattern > &refpat)
Check whether the refinement pattern already exists.
int WhichSide(TPZVec< int64_t > &SideNodeIds)
Returns the side number which is connected to the SideNodes returns -1 if no side is found...
TPZRefPatternDataBase gRefDBase
External variable to data base of patterns.
TPZGeoNode * FindNode(TPZVec< REAL > &co)
Returns the nearest node to the coordinate. This method is VERY INEFFICIENT.
TPZAutoPointer< TPZRefPattern > SideRefPattern(int side)
Abstract class defining integration rules. Numerical Integration.
virtual std::string TypeName() const
Returns the type of the element as a string.
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...
virtual int NSideSubElements(int side) const =0
Returns the number of subelements as returned by GetSubElements2(side)
TPZGeoElSide LowestFatherSide()
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...
void Resize(const int newsize)
Increase the size of the chunk vector.
TPZAutoPointer< TPZRefPattern > GetUniformRefPattern(MElementType type)
Retrieves the uniform refinement pattern for given element type.
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
TPZGeoEl * Element(int64_t iel)
int64_t Index() const
Returns the index of the element within the element vector of the mesh.
TVar Norm(const TPZFMatrix< TVar > &A)
Returns the norm of the matrix A.
#define DebugStop()
Returns a message to user put a breakpoint in.
int64_t NNodes() const
Number of nodes of the mesh.
virtual void SetOrder(TPZVec< int > &ord, int type=0)=0
Sets the order of the cubature rule.
TPZTransform< REAL > NeighbourSideTransform(const TPZGeoElSide &neighbour)
virtual MElementType Type() const =0
Returns the element type acording to pzeltype.h.
virtual int SideNodeLocIndex(int side, int nodenum) const =0
Returns the local index of a node on a side.
TPZAdmChunkVector< TPZGeoNode > & NodeVec()
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ sqrt
void SideNodes(int fatherSide, TPZVec< int > &vecNodes)
It returns a TPZVec containing the nodes contained in a given father's side.
virtual TPZGeoEl * ClonePatchEl(TPZGeoMesh &DestMesh, std::map< int64_t, int64_t > &gl2lcNdIdx, std::map< int64_t, int64_t > &gl2lcElIdx) const =0
Creates a clone of this element into a new patch mesh.
Contains the TPZRefPattern class which defines the topology of the current refinement pattern to a me...
int NSideNodes(int fatherSide) const
Returns the number of internal nodes of side.
virtual int HasSubElement() const =0
Return 1 if the element has subelements.
virtual int NNodes() const =0
Returns the number of nodes of the element.
TPZGeoEl * Element() const
Contains the TPZRefPatternDataBase class which defines data base of patterns.
virtual int Dimension() const =0
Returns the dimension of the element.
virtual TPZTransform< REAL > SideToSideTransform(int sidefrom, int sideto)=0
Compute the transformation between the master element space of one side of an element to the master e...
Defines the topology of the current refinement pattern to a mesh. Refine.
int64_t Id() const
Returns the Id of the element.
static void PrintGMeshVTKneighbourhood(TPZGeoMesh *gmesh, int64_t elIndex, std::ofstream &file)
Print the elements that surround a givel geoel.
bool ComputeXInverse(TPZVec< REAL > &XD, TPZVec< REAL > &ksi, REAL Tol)
Computes the XInverse and returns true if ksi belongs to master element domain.
Implements a geometric node in the pz environment. Geometry.
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...
This class implements a geometric mesh for the pz environment. Geometry.
MElementType
Define the element types.
TPZGeoMesh & RefPatternMesh()
void Print(std::ostream &out=std::cout) const
Prints the useful information of a Refinement Pattern in a ostream file.
int Dimension() const
the dimension associated with the element/side
void Jacobian(TPZVec< REAL > ¶m, TPZFMatrix< REAL > &jacobian, TPZFMatrix< REAL > &axes, REAL &detjac, TPZFMatrix< REAL > &jacinv) const
Jacobian associated with the side of the element.
string to_string(const string &value)
virtual TPZAutoPointer< TPZRefPattern > GetRefPattern() const
Returns the refinement pattern associated with the element.
static const std::string fNonInitializedName
Name for identifying a non initialized pattern.
void SetMaterialId(int id)
Sets the material index of the element.
void ComputeTransforms()
Calculates the transforms between the parametric coordinates of the sides of the son to the father's ...
virtual void SetRefPattern(TPZAutoPointer< TPZRefPattern >)
Defines the refinement pattern. It's used only in TPZGeoElRefPattern objects.
int64_t NElements() const
Returns the number of elements of the vector.
void GetCoordinates(TPZVec< REAL > &co)
Fill the coordinates of the node.
virtual void Print(std::ostream &out=std::cout)
Print all relevant data of the element to cout.
void GenerateSideRefPatterns()
Generate the refinement patterns associated with the sides of the father element. ...
REAL ZeroTolerance()
Returns the tolerance to Zero value. Actually: .
Contains the TPZVTKGeoMesh class which implements the graphical mesh to VTK environment to geometric ...
int PutVal(const int64_t row, const int64_t col, const TVar &value) override
Put values without bounds checking This method is faster than "Put" if DEBUG is defined.
const TVar & GetVal(const int64_t row, const int64_t col) const override
Get values without bounds checking This method is faster than "Get" if DEBUG is defined.
int64_t SideNodeIndex(int nodenum) const
Returns the index of the nodenum node of side.
virtual void Point(int i, TPZVec< REAL > &pos, REAL &w) const =0
Returns i-th point at master element and related weight.
#define PZError
Defines the output device to error messages and the DebugStop() function.
void ComputePartition()
It computers the partition of the sides of the father element using the sides of the children...
TPZAdmChunkVector< TPZGeoEl * > & ElementVec()
Methods for handling pzlists.