31 #include "pzviscoelastic.h" 44 #include "pzbfilestream.h" 51 static LoggerPtr loggerconverge(Logger::getLogger(
"pz.converge"));
52 static LoggerPtr logger(Logger::getLogger(
"main"));
60 #include <sys/resource.h> 64 #include "tbb/task_scheduler_init.h" 72 #include "mkl_service.h" 88 cout <<
"Compute ...." << endl;
89 cout <<
"The application is divided in four main steps: s1, s2, s3 and s4" << endl;
91 cout <<
" Step 1 (mp/mc -> ckpt 1): " << endl;
92 cout <<
" Step 2 (ckpt 1 -> ckpt 2): dohrstruct->Create()" << endl;
93 cout <<
" Step 3 (ckpt 2 -> ckpt 3): dohrstruct->Assemble(), dohrstruct->Preconditioner() " << endl;
94 cout <<
" Step 4 (ckpt 3 -> end ): cg.solve() ..." << endl << endl;
95 cout <<
"Usage: " << prg <<
"starting_point stop_point file [-of output_file]" << endl << endl;
96 cout <<
" starting_point = {-cf1|-cf2|-cf3|-mc|-mp} input_file" << endl;
97 cout <<
" starting_point = {-st1|-st2|-st3}" << endl;
102 clarg::argString cf1(
"-cf1",
"starts execution from checkpoint 1 (read checkpoint file)",
"ckpt1.ckpt");
103 clarg::argString cf2(
"-cf2",
"starts execution from checkpoint 2 (read checkpoint file)",
"ckpt2.ckpt");
104 clarg::argString cf3(
"-cf3",
"starts execution from checkpoint 3 (read checkpoint file)",
"ckpt3.ckpt");
121 clarg::argString mc(
"-mc",
"starts execution from beginning - read a \"malha_cubo\" input file",
123 clarg::argString mp(
"-mp",
"starts execution from beginning - read a \"malha_predio\" input file",
124 "../8andares02.txt");
128 clarg::argInt nt_sm(
"-nt_sm",
"Dohr (l1): number of threads to process the submeshes", 0);
129 clarg::argInt nt_d(
"-nt_d",
"Dohr (l1): number of threads to decompose each submesh", 0);
130 clarg::argInt nt_a(
"-nt_a",
"Pair (l2): number of threads to assemble each submesh (multiply by nt_sm)", 0);
156 #define PERF_START(obj) \ 157 likwid_markerStartRegion(#obj); \ 159 #define PERF_STOP(obj) \ 161 likwid_markerStopRegion(#obj) 163 #define PERF_START(obj) obj.start() 164 #define PERF_STOP(obj) obj.stop() 206 struct likwid_manager_t {
208 std::cout <<
"Calling likwid_markerInit()" << std::endl;
211 ~likwid_manager_t() {
212 likwid_markerClose();
213 std::cout <<
"Calling likwid_markerClose()" << std::endl;
219 int main(
int argc,
char *argv[])
223 likwid_manager_t likwid_manager;
231 setenv(
"VECLIB_MAXIMUM_THREADS",
"1",
true);
235 mkl_set_num_threads(1);
238 int main_ret = EXIT_SUCCESS;
242 cerr <<
"Error when parsing the arguments!" << endl;
253 if(number_tbb<=0)number_tbb=1;
254 task_scheduler_init init(number_tbb);
259 # define VERBOSE(level,...) if (level <= verbose) cout << __VA_ARGS__ 262 std::cout <<
"- Arguments -----------------------" << std::endl;
264 std::cout <<
"-----------------------------------" << std::endl;
270 cerr <<
"A \"starting_point\" must be provided!" << endl;
290 bool running =
false;
298 cerr <<
"ERROR: you must select only one of the start modes: " 299 <<
"mp, mc, cf1, cf2 or cf3" << endl;
314 cerr <<
"ERROR: you must select only one of the start modes: " 315 <<
"mp, mc, cf1, cf2 or cf3" << endl;
336 fullstruct.SetNumThreads(nt_a.
get_value());
360 fullstruct.Assemble(rhs_t, 0);
369 VERBOSE(1,
"Substructuring the mesh" << endl);
375 std::stringstream str;
376 cmeshauto->
Print(str);
388 cmeshauto->
Write(CheckPoint1, 0);
389 dohrstruct->
Write(CheckPoint1);
392 if ((gen_sig_ckpt1.
was_set() || chk_sig_ckpt1.
was_set()) && running)
396 cmeshauto->
Write(sig, 0);
397 dohrstruct->
Write(sig);
401 cerr <<
"ERROR: MD5 Signature for checkpoint 1 does not match. (ret = " << ret <<
")" << endl;
408 cerr <<
"ERROR when writing ckpt 1 MD5 Signature to file (ret = " << ret <<
"): " 416 if(st1.
was_set()) running =
false;
422 cerr <<
"ERROR: you must select only one of the start modes: mp, mc, cf1, cf2 or cf3" << endl;
435 gmesh->
Read(CheckPoint1, 0);
436 cmeshauto->
Read(CheckPoint1, gmesh);
437 dohrstruct->
Read(CheckPoint1);
441 VERBOSE(1,
"Reading dim from file. new dim = " << dim <<
", old dim = " << dim_arg.
get_value() << endl);
449 matptr = dohrstruct->
Create();
460 cmeshauto->
Write(CheckPoint2, 0);
462 matptr->
Write(CheckPoint2, 1);
464 dohrstruct->
Write(CheckPoint2);
472 cmeshauto->
Write(sig, 0);
473 matptr->
Write(sig, 1);
474 dohrstruct->
Write(sig);
478 cerr <<
"ERROR: MD5 Signature for checkpoint 2 does not match." << endl;
484 cerr <<
"ERROR when writing ckpt 2 MD5 Signature to file: " 492 if(st2.
was_set()) running =
false;
498 cerr <<
"ERROR: you must select only one of the start modes: mp, mc, cf1, cf2 or cf3" << endl;
508 gmesh->
Read(CheckPoint2,0);
511 cmeshauto->
Read(CheckPoint2, &gmesh);
513 matptr =
dynamic_cast<TPZMatrix<STATE> *
>(TPZSavable::Restore(CheckPoint2, 0));
516 dohrstruct->
Read(CheckPoint2);
531 VERBOSE(1,
"dohrstruct->Assemble()" << endl);
548 cmeshauto->
Write(CheckPoint3, 0);
549 matptr->
Write(CheckPoint3, 1);
550 precond->Write(CheckPoint3, 1);
551 rhs->
Write(CheckPoint3, 0);
559 cmeshauto->
Write(sig, 0);
560 matptr->
Write(sig, 1);
561 precond->Write(sig, 1);
566 cerr <<
"ERROR(ret=" << ret <<
") : MD5 Signature for checkpoint 3 does not match." << endl;
572 cerr <<
"ERROR (ret=" << ret <<
") when writing ckpt 3 MD5 Signature to file: " 580 if(st3.
was_set()) running =
false;
586 cerr <<
"ERROR: you must select only one of the start modes: mp, mc, cf1, cf2 or cf3" << endl;
596 VERBOSE(1,
"Reading dim from file. new dim = " << dim <<
", old dim = " << dim_arg.
get_value() << endl);
600 gmesh->
Read(CheckPoint3, 0);
601 cmeshauto->
Read(CheckPoint3, gmesh);
602 matptr =
dynamic_cast<TPZMatrix<STATE> *
>(TPZSavable::Restore(CheckPoint3, 0));
603 precond =
dynamic_cast<TPZMatrix<STATE> *
>(TPZSavable::Restore(CheckPoint3, matptr));
605 rhs->
Read(CheckPoint3, 0);
609 neq = iterations = 0;
621 VERBOSE(1,
"Number of equations " << neq << endl);
643 cerr <<
"ERROR: solver do not converged with the limit of iterations." << endl;
662 dohrptr->
Write(sig, 0);
674 cerr <<
"ERROR(ret=" << ret <<
") : MD5 Signature for checkpoint 4 does not match." << endl;
680 cerr <<
"ERROR (ret=" << ret <<
") when writting ckpt 4 MD5 Signature to file: " 687 typedef std::list<TPZAutoPointer<TPZDohrSubstructCondense<STATE> > > subtype;
689 subtype::const_iterator it = sublist.begin();
691 while (it != sublist.end()) {
695 (*it)->UGlobal(subext,subu);
701 std::map<int ,TPZMaterial * > materialmap(submesh->
MaterialVec());
702 std::map<int ,TPZMaterial * >::iterator itmat;
703 for (itmat = materialmap.begin(); itmat != materialmap.end() ; itmat++)
719 std::stringstream sout;
720 diag.Print(
"Resultado do processo iterativo",sout);
727 int nscal = 0, nvec = 0;
739 scalnames[0]=
"state";
743 vecnames[0] =
"state";
745 std::string postprocessname(
"dohrmann_visco.vtk");
746 TPZVTKGraphMesh vtkmesh(cmeshauto.operator->(),dim,mat,scalnames,vecnames);
748 vtkmesh.SetResolution(1);
754 vtkmesh.DrawMesh(numcases);
755 vtkmesh.DrawSolution(istep, 1.);
760 cout <<
" -- Execution Data -- " << endl;
768 cout <<
"Nsub : " << nsub.
get_value() << endl;
769 cout <<
"Equations (cmeshauto->NEquations) : " << cmeshauto->
NEquations() << endl;
770 cout <<
"Corner Equations : " << dohrstruct->
NumberCornerEqs() << endl;
771 cout <<
"Equations (dohr->Rows) : " << neq << endl;
772 cout <<
"Iterations (CG) : " << iterations << endl;
774 if (gmesh != NULL)
delete gmesh;
802 STATE ElaE = 1000., poissonE = 0.2, ElaV = 100., poissonV = 0.1;
804 STATE lambdaV = 0, muV = 0, alpha = 0, deltaT = 0;
827 int nummat = 1, neumann = 1, mixed = 2;
829 int dir1 = -1, dir2 = -2, dir3 = -3, neumann1 = -4., neumann2 = -5;
832 REAL Ela = 1000., poisson = 0.;
833 REAL lambdaV = 0, muV = 0, alphaT = 0;
895 bool countnodes =
false;
896 bool countelements =
false;
898 ifstream
read (FileName.c_str());
899 if (!
read.is_open()) {
900 cerr <<
"Could not open file: " << FileName << endl;
907 read.getline(buf, 1024);
908 std::string str(buf);
909 if(str ==
"Coordinates") countnodes =
true;
910 if(str ==
"end coordinates") countnodes =
false;
911 if(countnodes) numnodes++;
913 if(str ==
"Elements") countelements =
true;
914 if(str ==
"end elements") countelements =
false;
915 if(countelements) numelements++;
921 gMesh -> NodeVec().Resize(numnodes);
925 const int Qnodes = numnodes;
929 int64_t nodeId = 0, elementId = 0, matElId = 1;
932 read.open(FileName.c_str());
934 double nodecoordX , nodecoordY , nodecoordZ ;
937 read.getline(buf, 1024);
938 read.getline(buf, 1024);
939 std::string str(buf);
941 for(in=0; in<numnodes; in++)
947 Node[nodeId-1].SetNodeId(nodeId);
948 Node[nodeId-1].SetCoord(0,nodecoordX);
949 Node[nodeId-1].SetCoord(1,nodecoordY);
950 Node[nodeId-1].SetCoord(2,nodecoordZ);
951 gMesh->
NodeVec()[nodeId-1] = Node[nodeId-1];
956 read.open(FileName.c_str());
958 int l ,
m = numnodes+5;
961 read.getline(buf, 1024);
967 for(el=0; el<numelements; el++)
970 read >> TopolTetra[0];
971 read >> TopolTetra[1];
972 read >> TopolTetra[2];
973 read >> TopolTetra[3];
989 for(el=0; el<numelements; el++)
996 for (
int i = 0; i < 4; i++)
999 Nodefinder[i] = gMesh->
NodeVec()[pos];
1000 Nodefinder[i].GetCoordinates(nodecoord);
1001 if (nodecoord[2] == 0.)
1004 ncoordzVec.
Resize(sizeOfVec);
1005 ncoordzVec[sizeOfVec-1] = pos;
1010 int lado = tetra->
WhichSide(ncoordzVec);
1018 ofstream arg(
"malhaPZ.txt");
1020 ofstream predio(
"GeoPredio.vtk");
1033 bool countnodes =
false;
1034 bool countelements =
false;
1036 ifstream
read (FileName.c_str());
1037 if (!
read.is_open()) {
1038 cerr <<
"Could not open file: " << FileName << endl;
1045 read.getline(buf, 1024);
1046 std::string str(buf);
1047 if(str ==
"Coordinates") countnodes =
true;
1048 if(str ==
"end coordinates") countnodes =
false;
1049 if(countnodes) numnodes++;
1051 if(str ==
"Elements") countelements =
true;
1052 if(str ==
"end elements") countelements =
false;
1053 if(countelements) numelements++;
1059 gMesh -> NodeVec().Resize(numnodes);
1063 const int Qnodes = numnodes;
1067 int64_t nodeId = 0, elementId = 0, matElId = 1;
1070 read.open(FileName.c_str());
1072 double nodecoordX , nodecoordY , nodecoordZ ;
1075 read.getline(buf, 1024);
1076 read.getline(buf, 1024);
1077 std::string str(buf);
1079 for(in=0; in<numnodes; in++)
1085 Node[nodeId-1].SetNodeId(nodeId);
1086 Node[nodeId-1].SetCoord(0,nodecoordX);
1087 Node[nodeId-1].SetCoord(1,nodecoordY);
1088 Node[nodeId-1].SetCoord(2,nodecoordZ);
1089 gMesh->
NodeVec()[nodeId-1] = Node[nodeId-1];
1094 read.open(FileName.c_str());
1096 int l ,
m = numnodes+5;
1099 read.getline(buf, 1024);
1104 int neumann1 = -4, neumann2 = -5;
1106 for(el=0; el<numelements; el++)
1109 read >> TopolTetra[0];
1110 read >> TopolTetra[1];
1111 read >> TopolTetra[2];
1112 read >> TopolTetra[3];
1128 for(el=0; el<numelements; el++)
1136 for (
int i = 0; i < 4; i++)
1139 Nodefinder[i] = gMesh->
NodeVec()[pos];
1140 Nodefinder[i].GetCoordinates(nodecoord);
1141 if (nodecoord[0] == 1.)
1144 ncoordzVec.
Resize(sizeOfVec);
1145 ncoordzVec[sizeOfVec-1] = pos;
1150 int lado = tetra->
WhichSide(ncoordzVec);
1158 for (
int i = 0; i < 4; i++)
1161 Nodefinder[i] = gMesh->
NodeVec()[pos];
1163 Nodefinder[i].GetCoordinates(nodecoord);
1164 if (nodecoord[0] == -1.)
1167 ncoordzVec.
Resize(sizeOfVec);
1168 ncoordzVec[sizeOfVec-1] = pos;
1173 int lado = tetra->
WhichSide(ncoordzVec);
1183 int bcidxyz = -1, bcidyz = -2, bcidz = -3;
1195 for (
int ref = 0; ref < nh; ref++ ){
1198 for (
int i = 0; i < n; i++ ){
1210 ofstream arg(
"malhaPZ1BC.txt");
1213 std::ofstream out(
"Cube.vtk");
1227 for (iel = 0; iel<nelem; iel++) {
1232 for (c=0; c<nc; c++) {
1251 for (in=0; in<nnodes; in++) {
1252 REAL z = nodevec[in].Coord(2);
1253 maxz = (maxz < z) ? z : maxz;
1264 for (iel=0; iel<nelem; iel++)
1274 int nsides = gel->
NSides();
1279 int floor = (int) z/height;
1280 nsub = (floor+1) > nsub ? (floor+1) :
nsub;
1281 subindex[iel] = floor;
1291 for (cel=0; cel<nel; cel++) {
1293 if(!compel)
continue;
1298 domaincolor[gel->
Index()] = subindex[cel];
1300 ofstream vtkfile(
"partition.vtk");
1307 for (isub=0; isub<
nsub; isub++)
1310 std::cout <<
'^'; std::cout.flush();
1315 subindex[index] = -1;
1318 for (iel=0; iel<nelem; iel++)
1320 int domindex = subindex[iel];
1328 submeshes[domindex]->TransferElement(cmesh.operator->(),iel);
1332 for (isub=0; isub<
nsub; isub++)
1334 submeshes[isub]->MakeAllInternal();
1335 std::cout <<
'*'; std::cout.flush();
int64_t NElements() const
Number of computational elements allocated.
Contains a class to record running statistics on CSV tables.
RunStatsTable assemble_rst("-ass_rdt", "Assemble statistics raw data table (step 3)")
TPZGeoMesh * Reference() const
Returns a pointer to the geometrical mesh associated.
void Extract(int isub, const TPZFMatrix< TVar > &global, TPZFMatrix< TVar > &local) const
Extract the values from the global matrix into the local matrix.
clarg::argInt nt_a("-nt_a", "Pair (l2): number of threads to assemble each submesh (multiply by nt_sm)", 0)
clarg::argString cf2("-cf2", "starts execution from checkpoint 2 (read checkpoint file)", "ckpt2.ckpt")
static void SetgOrder(int order)
Sets the value of the default interpolation order.
TPZGeoNode * NodePtr(int i) const
Returns a pointer to the ith node of the element.
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.
Contains declaration of the TPZMD5Stream class which implements the interface to write and check md5 ...
Implements a vector class which allows to use external storage provided by the user. Utility.
void Write(TPZStream &buf, int withclassid) const override
Packs the object structure in a stream of bytes.
RunStatsTable total_rst("-tot_rdt", "Whole program (total) statistics raw data table")
clarg::argBool bc("-bc", "binary checkpoints", false)
RunStatsTable create_rst("-cre_rdt", "Create statistics raw data table (step 2)")
Contains the TPZDohrSubstruct class which implements sub structure matrices using Dohrman algorithm...
void values(ostream &os, bool defined_only)
int main(int argc, char *argv[])
void OpenRead(const std::string &fn)
clarg::argInt nsub("-nsub", "number of substructs", 4)
int64_t NEquations()
This computes the number of equations associated with non-restrained nodes.
clarg::argInt verb_level("-v", "verbosity level", 0)
Contains the TPZVTKGraphMesh class which implements the graphical mesh to VTK environment.
Contains declaration of TPZCompEl class which defines the interface of a computational element...
TPZGeoMesh * MalhaPredio()
static TPZSubCompMesh * SubMesh(TPZAutoPointer< TPZCompMesh > compmesh, int isub)
return a pointer to the isub submesh
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
Defines step solvers class. Solver.
virtual int NCornerNodes() const =0
Returns the number of corner nodes of the element.
This class implements a 3D isotropic elasticity material.
Contains the TPZDohrMatrix class which implements a matrix divided into substructures. Also contains the TPZDohrThreadMultData and TPZDohrThreadMultList structs.
To export a graphical mesh to VTK environment. Post processing.
int64_t NElements() const
Number of elements of the mesh.
virtual int NStateVariables() const =0
Returns the number of state variables associated with the material.
clarg::argBool pair_tbb("-pair_tbb", "assemble TPZPairStructMatrix (level 2) using TBB", false)
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
clarg::argString chk_sig_ckpt4("-chk_c4_md5", "compute MD5 signature for checkpoint 4 and check against MD5 at file.", "ckpt4.md5")
Contains declaration of TPZGeoElBC class, it is a structure to help the construction of geometric ele...
virtual void SetDefaultMem(TMEM &defaultMem)
Sets the default memory settings for initialization.
int64_t NElements() const
Access method to query the number of elements of the vector.
void OpenWrite(const std::string &fn)
clarg::argString cf3("-cf3", "starts execution from checkpoint 3 (read checkpoint file)", "ckpt3.ckpt")
clarg::argBool dohr_tbb("-dohr_tbb", "assemble TPZDohrStructMatrix (level 1) using TBB", false)
REAL GetTolerance() const
return the value of tolerance from the solver
virtual int NSides() const =0
Returns the number of connectivities of the element.
void SetPointBC(TPZGeoMesh *gr, TPZVec< REAL > &x, int bc)
Generate a boundary geometric element at the indicated node.
virtual void Divide(TPZVec< TPZGeoEl *> &pv)
Divides the element and puts the resulting elements in the vector.
Implements a matrix divided into substructures. Matrix Sub structure.
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...
Contains the TPZDohrAssembly class which implements assembling using Dohrmann algorithm.
clarg::argBool st1("-st1", "stop at checkpoint 1 (after dump)", false)
clarg::argInt refin("-ref", "refine mesh", 1)
int WhichSide(TPZVec< int64_t > &SideNodeIds)
Returns the side number which is connected to the SideNodes returns -1 if no side is found...
Contains the TPZDohrStructMatrix class which implements structural matrix divided in sub structures...
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
void Read(TPZStream &buf, void *context) override
read objects from the stream
clarg::argBool h("-h", "help message", false)
clarg::argString gen_sig_ckpt1("-gen_c1_md5", "generates MD5 signature for checkpoint 1 and dump into file.", "ckpt1.md5")
RunStatsTable precond_rst("-pre_rdt", "Precond statistics raw data table (step 3)")
TPZGeoNode * FindNode(TPZVec< REAL > &co)
Returns the nearest node to the coordinate. This method is VERY INEFFICIENT.
Contains the TPZElasticity3D class which implements a 3D isotropic elasticity material.
Contains the TPZFStructMatrix class which implements Full Structural Matrices.
void SetDefaultOrder(int order)
clarg::argInt maxlevel("-maxlevel", "maxlevel???", 5)
This abstract class defines the behaviour which each derived class needs to implement.
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...
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
clarg::argInt plevel("-p", "plevel", 1)
int NumberCornerEqs() const
Return the number of cornereqs.
clarg::argString dc3("-dc3", "dump checkpoint 3 to file", "ckpt3.ckpt")
int Zero() override
Makes Zero all the elements.
clarg::argString mp("-mp", "starts execution from beginning - read a \alha_predio\input file", "../8andares02.txt")
TPZAutoPointer< TPZMatrix< STATE > > Preconditioner()
This will return the pointer to the preconditioner AND abandon the pointer.
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...
Contains the TPZGenSubStruct class which is an interface to "feed" the datastructure of the Dohrmann ...
#define VERBOSE(level,...)
int CheckMD5(const std::string &filename)
Check Stream MD5 signature against MD5 signature store on file.
void AssembleTBB(TPZMatrix< STATE > &mat, TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface)
void LoadSolution(const TPZFMatrix< STATE > &sol)
Given the solution of the global system of equations, computes and stores the solution for the restri...
void Write(TPZStream &str, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
void SetCG(const int64_t numiterations, const TPZMatrixSolver< TVar > &pre, const REAL tol, const int64_t FromCurrent)
clarg::argInt dim_arg("-dim", "dim???", 3)
clarg::argString dc2("-dc2", "dump checkpoint 2 to file", "ckpt2.ckpt")
#define LOGPZ_INFO(A, B)
Define log for informations.
Implements reading from and writing to an ascii file. Persistency.
virtual void Print(std::ostream &out=std::cout) const
Print the information of the grid to an ostream.
Implements a generic geometric element which is refined according to a generic refinement pattern...
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
void InsertElasticity(TPZAutoPointer< TPZCompMesh > mesh)
clarg::argString gen_sig_ckpt3("-gen_c3_md5", "generates MD5 signature for checkpoint 3 and dump into file.", "ckpt3.md5")
clarg::argInt sublevel("-sublevel", "sublevel???", 3)
int64_t Index() const
Returns the index of the element within the element vector of the mesh.
Contains the TPZGeoTetrahedra class which implements the geometry of a tetrahedral element...
Implements a group of computational elements as a mesh and an element. Computational Mesh...
#define DebugStop()
Returns a message to user put a breakpoint in.
void Read(TPZStream &buf, void *context) override
Read the element data from a stream.
clarg::argString chk_sig_ckpt2("-chk_c2_md5", "compute MD5 signature for checkpoint 2 and check against MD5 at file.", "ckpt2.md5")
clarg::argInt nt_sm("-nt_sm", "Dohr (l1): number of threads to process the submeshes", 0)
int parse_arguments(int argc, char *argv[])
virtual void SetNumThreads(int n)
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
This class defines the boundary condition for TPZMaterial objects.
Contains the TPZSkylineStructMatrix class which implements SkyLine Structural Matrices.
virtual void SetUpdateMem(bool update=1)
Sets/Unsets the internal memory data to be updated in the next assemble/contribute call...
RunStatsTable solve_rst("-sol_rdt", "Solver statistics raw data table (step 4)")
int Dimension() const
Returns the dimension of the simulation.
clarg::argBool st2("-st2", "stop at checkpoint 2 (after dump)", false)
virtual void ComputeNodElCon()
Compute the number of elements connected to each connect object.
virtual int PushMemItem(int sourceIndex=-1) override
Pushes a new entry in the context of materials with memory.
virtual void Assemble(TPZMatrix< STATE > &mat, TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface, unsigned numthreads_assemble, unsigned numthreads_decompose) override
Assemble the global system of equations into the matrix which has already been created.
TPZMaterial * FindMaterial(int id)
Find the material with identity id.
TPZAdmChunkVector< TPZGeoNode > & NodeVec()
Contains the TPZDohrPrecond class which implements a matrix which computes the preconditioner develop...
virtual void AutoBuild(const std::set< int > *MaterialIDs)
Creates the computational elements, and the degree of freedom nodes.
virtual TPZMatrix< STATE > * Create() override
This will create a DohrMatrix.
Contains the TPZPairStructMatrix class.
void IdentifyExternalConnectIndexes()
Identify the external connects.
clarg::argInt num_it("-num_it", "number limit of iterations to the CG solver", 1000)
void Read(TPZStream &buf, void *context) override
Unpacks the object structure from a stream of bytes.
void AddInternalSolution(TPZFMatrix< TVar > &solution)
Add the solution corresponding to the internal residual.
void arguments_descriptions(ostream &os, string prefix, string suffix)
static void PrintGMeshVTK(TPZGeoMesh *gmesh, std::ofstream &file, bool matColor=true)
Default constructor for graphical mesh with VTK format.
void help(const char *prg)
void Solve(const TPZFMatrix< TVar > &F, TPZFMatrix< TVar > &result, TPZFMatrix< TVar > *residual=0) override
Solves the system of linear equations.
void InsertElasticityCubo(TPZAutoPointer< TPZCompMesh > mesh)
void SetDimModel(int dim)
Set de dimension of the domain of the problem.
void InsertViscoElasticity(TPZAutoPointer< TPZCompMesh > mesh)
std::map< int,TPZMaterial *> & MaterialVec()
Returns a reference to the material pointers vector.
clarg::argString chk_sig_ckpt1("-chk_c1_md5", "compute MD5 signature for checkpoint 1 and check against MD5 at file.", "ckpt1.md5")
virtual int HasSubElement() const =0
Return 1 if the element has subelements.
virtual void SetFileName(const std::string &filename)
Sets the filename to output of graph.
clarg::argInt nt_multiply("-nt_m", "number of threads to multiply", 0)
Implements Full Structural Matrices. Structural Matrix.
Structure to help the construction of geometric elements along side of a given geometric element...
void BuildConnectivity()
Build the connectivity of the grid.
virtual TPZBndCond * CreateBC(TPZMaterial *reference, int id, int typ, TPZFMatrix< STATE > &val1, TPZFMatrix< STATE > &val2)
Creates an object TPZBndCond derived of TPZMaterial.
int InsertMaterialObject(TPZMaterial *mat)
Insert a material object in the datastructure.
int WriteMD5(const std::string &filename)
Write computed MD5 signature to file.
void InitializePZLOG()
Initializes log file for log4cxx with commom name log4cxx.cfg.
virtual void CleanUpUnconnectedNodes()
Delete the nodes which have no elements connected to them.
virtual int Dimension() const =0
Returns the dimension of the element.
Contains the TPZArc3D class which implements three dimensional arc.
int NumIterations()
Number of iterations of last solve.
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.
const SubsList & SubStructures() const
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.
This class implements an isotropic viscoelasticity material.
clarg::argString dc1("-dc1", "dump checkpoint 1 to file", "ckpt1.ckpt")
REAL Height(TPZGeoMesh *gmesh)
Implements computational mesh. Computational Mesh.
const T & get_value() const
TPZAdmChunkVector< TPZCompEl * > & ElementVec()
Returns a reference to the element pointers vector.
clarg::argInt nt_d("-nt_d", "Dohr (l1): number of threads to decompose each submesh", 0)
clarg::argString gen_sig_ckpt2("-gen_c2_md5", "generates MD5 signature for checkpoint 2 and dump into file.", "ckpt2.md5")
void Write(TPZStream &buf, int withclassid) const override
Packs the object structure in a stream of bytes.
Contains TPZStepSolver class which defines step solvers class.
clarg::argString chk_sig_ckpt3("-chk_c3_md5", "compute MD5 signature for checkpoint 3 and check against MD5 at file.", "ckpt3.md5")
Defines the interface for saving and reading data. Persistency.
int64_t NElements() const
Returns the number of elements of the vector.
clarg::argString cf1("-cf1", "starts execution from checkpoint 1 (read checkpoint file)", "ckpt1.ckpt")
clarg::argBool st3("-st3", "stop at checkpoint 3 (after dump)", false)
#define SAVEABLE_STR_NOTE(buf, str)
clarg::argString m("-m", "input matrix file name (text format)", "matrix.txt")
clarg::argString gen_sig_ckpt4("-gen_c4_md5", "generates MD5 signature for checkpoint 4 and dump into file.", "ckpt4.md5")
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
Defines the interface of a computational element. Computational Element.
Contains the TPZVTKGeoMesh class which implements the graphical mesh to VTK environment to geometric ...
void SetMaterialDataHooke(STATE ElaE, STATE poissonE, STATE ElaV, STATE poissonV, STATE alpha, STATE deltaT, TPZVec< STATE > &force)
Set material Data with hooke constants.
int SubStructure(TPZAutoPointer< TPZCompMesh > cmesh, REAL height)
void Read(TPZStream &str, void *context) override
read objects from the stream
clarg::argString mc("-mc", "starts execution from beginning - read a \alha_cubo\input file", "../cube1.txt")
Implements the interface to write and check MD5 files. Persistency.
void Write(TPZStream &buf, int withclassid) const override
Save the element data to a stream.
TPZAutoPointer< TPZDohrAssembly< TVar > > fAssembly
void SubStructure(int nsub)
Partition the mesh in submeshes.
#define SAVEABLE_SKIP_NOTE(buf)
virtual void Print(std::ostream &out=std::cout) const
Prints mesh data.
Implements structural matrix divided in sub structures. Structural Matrix Sub structure.
TPZAdmChunkVector< TPZGeoEl * > & ElementVec()
Methods for handling pzlists.