31 #include "pzviscoelastic.h" 43 #include "pzbfilestream.h" 52 static LoggerPtr loggerconverge(Logger::getLogger(
"pz.converge"));
53 static LoggerPtr logger(Logger::getLogger(
"main"));
61 #include <sys/resource.h> 65 #include "tbb/task_scheduler_init.h" 85 cout <<
"Compute ...." << endl;
86 cout <<
"The application is divided in four main steps: s1, s2, s3 and s4" << endl;
88 cout <<
" Step 1 (mp/mc -> ckpt 1): " << endl;
89 cout <<
" Step 2 (ckpt 1 -> ckpt 2): dohrstruct->Create()" << endl;
90 cout <<
" Step 3 (ckpt 2 -> ckpt 3): dohrstruct->Assemble(), dohrstruct->Preconditioner() " << endl;
91 cout <<
" Step 4 (ckpt 3 -> end ): cg.solve() ..." << endl << endl;
92 cout <<
"Usage: " << prg <<
"starting_point stop_point file [-of output_file]" << endl << endl;
93 cout <<
" starting_point = {-cf1|-cf2|-cf3|-mc|-mp} input_file" << endl;
94 cout <<
" starting_point = {-st1|-st2|-st3}" << endl;
99 clarg::argString cf1(
"-cf1",
"starts execution from checkpoint 1 (read checkpoint file)",
"ckpt1.ckpt");
100 clarg::argString cf2(
"-cf2",
"starts execution from checkpoint 2 (read checkpoint file)",
"ckpt2.ckpt");
101 clarg::argString cf3(
"-cf3",
"starts execution from checkpoint 3 (read checkpoint file)",
"ckpt3.ckpt");
118 clarg::argString mc(
"-mc",
"starts execution from beginning - read a \"malha_cubo\" input file",
120 clarg::argString mp(
"-mp",
"starts execution from beginning - read a \"malha_predio\" input file",
121 "../8andares02.txt");
125 clarg::argInt nt_sm(
"-nt_sm",
"Dohr (l1): number of threads to process the submeshes", 0);
126 clarg::argInt nt_d(
"-nt_d",
"Dohr (l1): number of threads to decompose each submesh", 0);
127 clarg::argInt nt_a(
"-nt_a",
"Pair (l2): number of threads to assemble each submesh (multiply by nt_sm)", 0);
153 #define PERF_START(obj) \ 154 likwid_markerStartRegion(#obj); \ 156 #define PERF_STOP(obj) \ 158 likwid_markerStopRegion(#obj) 160 #define PERF_START(obj) obj.start() 161 #define PERF_STOP(obj) obj.stop() 203 struct likwid_manager_t {
205 std::cout <<
"Calling likwid_markerInit()" << std::endl;
208 ~likwid_manager_t() {
209 likwid_markerClose();
210 std::cout <<
"Calling likwid_markerClose()" << std::endl;
217 int main(
int argc,
char *argv[])
223 likwid_manager_t likwid_manager;
230 task_scheduler_init init;
233 int main_ret = EXIT_SUCCESS;
237 cerr <<
"Error when parsing the arguments!" << endl;
248 # define VERBOSE(level,...) if (level <= verbose) cout << __VA_ARGS__ 251 std::cout <<
"- Arguments -----------------------" << std::endl;
253 std::cout <<
"-----------------------------------" << std::endl;
259 cerr <<
"A \"starting_point\" must be provided!" << endl;
279 bool running =
false;
287 cerr <<
"ERROR: you must select only one of the start modes: " 288 <<
"mp, mc, cf1, cf2 or cf3" << endl;
303 cerr <<
"ERROR: you must select only one of the start modes: " 304 <<
"mp, mc, cf1, cf2 or cf3" << endl;
323 dohrstruct->IdentifyExternalConnectIndexes();
325 VERBOSE(1,
"Substructuring the mesh" << endl);
327 dohrstruct->SubStructure(nsub.
get_value());
331 std::stringstream str;
332 cmeshauto->
Print(str);
344 cmeshauto->
Write(CheckPoint1, 0);
345 dohrstruct->Write(CheckPoint1);
348 if ((gen_sig_ckpt1.
was_set() || chk_sig_ckpt1.
was_set()) && running)
352 cmeshauto->
Write(sig, 0);
353 dohrstruct->Write(sig);
357 cerr <<
"ERROR: MD5 Signature for checkpoint 1 does not match. (ret = " << ret <<
")" << endl;
364 cerr <<
"ERROR when writing ckpt 1 MD5 Signature to file (ret = " << ret <<
"): " 372 if(st1.
was_set()) running =
false;
378 cerr <<
"ERROR: you must select only one of the start modes: mp, mc, cf1, cf2 or cf3" << endl;
391 gmesh->
Read(CheckPoint1, 0);
392 cmeshauto->
Read(CheckPoint1, gmesh);
393 dohrstruct->
Read(CheckPoint1);
397 VERBOSE(1,
"Reading dim from file. new dim = " << dim <<
", old dim = " << dim_arg.
get_value() << endl);
405 matptr = dohrstruct->
Create();
416 cmeshauto->
Write(CheckPoint2, 0);
418 matptr->
Write(CheckPoint2, 1);
420 dohrstruct->
Write(CheckPoint2);
428 cmeshauto->
Write(sig, 0);
429 matptr->
Write(sig, 1);
430 dohrstruct->
Write(sig);
434 cerr <<
"ERROR: MD5 Signature for checkpoint 2 does not match." << endl;
440 cerr <<
"ERROR when writing ckpt 2 MD5 Signature to file: " 448 if(st2.
was_set()) running =
false;
454 cerr <<
"ERROR: you must select only one of the start modes: mp, mc, cf1, cf2 or cf3" << endl;
464 gmesh->
Read(CheckPoint2,0);
467 cmeshauto->
Read(CheckPoint2, &gmesh);
469 matptr =
dynamic_cast<TPZMatrix<STATE> *
>(TPZSavable::Restore(CheckPoint2, 0));
472 dohrstruct->
Read(CheckPoint2);
489 VERBOSE(1,
"dohrstruct->Assemble()" << endl);
506 cmeshauto->
Write(CheckPoint3, 0);
507 matptr->
Write(CheckPoint3, 1);
508 precond->Write(CheckPoint3, 1);
509 rhs->
Write(CheckPoint3, 0);
517 cmeshauto->
Write(sig, 0);
518 matptr->
Write(sig, 1);
519 precond->Write(sig, 1);
524 cerr <<
"ERROR(ret=" << ret <<
") : MD5 Signature for checkpoint 3 does not match." << endl;
530 cerr <<
"ERROR (ret=" << ret <<
") when writing ckpt 3 MD5 Signature to file: " 538 if(st3.
was_set()) running =
false;
544 cerr <<
"ERROR: you must select only one of the start modes: mp, mc, cf1, cf2 or cf3" << endl;
554 VERBOSE(1,
"Reading dim from file. new dim = " << dim <<
", old dim = " << dim_arg.
get_value() << endl);
558 gmesh->
Read(CheckPoint3, 0);
559 cmeshauto->
Read(CheckPoint3, gmesh);
560 matptr =
dynamic_cast<TPZMatrix<STATE> *
>(TPZSavable::Restore(CheckPoint3, 0));
561 precond =
dynamic_cast<TPZMatrix<STATE> *
>(TPZSavable::Restore(CheckPoint3, matptr));
563 rhs->
Read(CheckPoint3, 0);
571 int neq = dohr->Rows();
574 VERBOSE(1,
"Number of equations " << neq << endl);
594 cerr <<
"ERROR: solver do not converged with the limit of iterations." << endl;
613 dohrptr->
Write(sig, 0);
625 cerr <<
"ERROR(ret=" << ret <<
") : MD5 Signature for checkpoint 4 does not match." << endl;
631 cerr <<
"ERROR (ret=" << ret <<
") when writting ckpt 4 MD5 Signature to file: " 638 typedef std::list<TPZAutoPointer<TPZDohrSubstructCondense<STATE> > > subtype;
640 subtype::const_iterator it = sublist.begin();
642 while (it != sublist.end()) {
646 (*it)->UGlobal(subext,subu);
652 std::map<int ,TPZMaterial * > materialmap(submesh->
MaterialVec());
653 std::map<int ,TPZMaterial * >::iterator itmat;
654 for (itmat = materialmap.begin(); itmat != materialmap.end() ; itmat++)
669 std::stringstream sout;
670 diag.Print(
"Resultado do processo iterativo",sout);
677 int nscal = 0, nvec = 0;
689 scalnames[0]=
"state";
693 vecnames[0] =
"state";
695 std::string postprocessname(
"dohrmann_visco.vtk");
696 TPZVTKGraphMesh vtkmesh(cmeshauto.operator->(),dim,mat,scalnames,vecnames);
698 vtkmesh.SetResolution(1);
704 vtkmesh.DrawMesh(numcases);
705 vtkmesh.DrawSolution(istep, 1.);
711 if (gmesh != NULL)
delete gmesh;
739 STATE ElaE = 1000., poissonE = 0.2, ElaV = 100., poissonV = 0.1;
741 STATE lambdaV = 0, muV = 0, alpha = 0, deltaT = 0;
764 int nummat = 1, neumann = 1, mixed = 2;
766 int dir1 = -1, dir2 = -2, dir3 = -3, neumann1 = -4., neumann2 = -5;
769 REAL Ela = 1000, poisson = 0.;
770 REAL lambdaV = 0, muV = 0, alphaT = 0;
794 TPZBndCond *bc5 = viscoelast->
CreateBC(viscoelastauto, neumann2, neumann, val1, val2);
832 bool countnodes =
false;
833 bool countelements =
false;
835 ifstream
read (FileName.c_str());
836 if (!
read.is_open()) {
837 cerr <<
"Could not open file: " << FileName << endl;
844 read.getline(buf, 1024);
845 std::string str(buf);
846 if(str ==
"Coordinates") countnodes =
true;
847 if(str ==
"end coordinates") countnodes =
false;
848 if(countnodes) numnodes++;
850 if(str ==
"Elements") countelements =
true;
851 if(str ==
"end elements") countelements =
false;
852 if(countelements) numelements++;
858 gMesh -> NodeVec().Resize(numnodes);
862 const int Qnodes = numnodes;
866 int64_t nodeId = 0, elementId = 0, matElId = 1;
869 read.open(FileName.c_str());
871 double nodecoordX , nodecoordY , nodecoordZ ;
874 read.getline(buf, 1024);
875 read.getline(buf, 1024);
876 std::string str(buf);
878 for(in=0; in<numnodes; in++)
884 Node[nodeId-1].SetNodeId(nodeId);
885 Node[nodeId-1].SetCoord(0,nodecoordX);
886 Node[nodeId-1].SetCoord(1,nodecoordY);
887 Node[nodeId-1].SetCoord(2,nodecoordZ);
888 gMesh->
NodeVec()[nodeId-1] = Node[nodeId-1];
893 read.open(FileName.c_str());
895 int l ,
m = numnodes+5;
898 read.getline(buf, 1024);
904 for(el=0; el<numelements; el++)
907 read >> TopolTetra[0];
908 read >> TopolTetra[1];
909 read >> TopolTetra[2];
910 read >> TopolTetra[3];
926 for(el=0; el<numelements; el++)
933 for (
int i = 0; i < 4; i++)
936 Nodefinder[i] = gMesh->
NodeVec()[pos];
937 Nodefinder[i].GetCoordinates(nodecoord);
938 if (nodecoord[2] == 0.)
941 ncoordzVec.
Resize(sizeOfVec);
942 ncoordzVec[sizeOfVec-1] = pos;
954 ofstream arg(
"malhaPZ.txt");
956 ofstream predio(
"GeoPredio.vtk");
969 bool countnodes =
false;
970 bool countelements =
false;
972 ifstream
read (FileName.c_str());
973 if (!
read.is_open()) {
974 cerr <<
"Could not open file: " << FileName << endl;
981 read.getline(buf, 1024);
982 std::string str(buf);
983 if(str ==
"Coordinates") countnodes =
true;
984 if(str ==
"end coordinates") countnodes =
false;
985 if(countnodes) numnodes++;
987 if(str ==
"Elements") countelements =
true;
988 if(str ==
"end elements") countelements =
false;
989 if(countelements) numelements++;
995 gMesh -> NodeVec().Resize(numnodes);
999 const int Qnodes = numnodes;
1003 int nodeId = 0, elementId = 0, matElId = 1;
1006 read.open(FileName.c_str());
1008 double nodecoordX , nodecoordY , nodecoordZ ;
1011 read.getline(buf, 1024);
1012 read.getline(buf, 1024);
1013 std::string str(buf);
1015 for(in=0; in<numnodes; in++)
1021 Node[nodeId-1].SetNodeId(nodeId);
1022 Node[nodeId-1].SetCoord(0,nodecoordX);
1023 Node[nodeId-1].SetCoord(1,nodecoordY);
1024 Node[nodeId-1].SetCoord(2,nodecoordZ);
1025 gMesh->
NodeVec()[nodeId-1] = Node[nodeId-1];
1030 read.open(FileName.c_str());
1032 int l ,
m = numnodes+5;
1035 read.getline(buf, 1024);
1040 int neumann1 = -4, neumann2 = -5;
1042 for(el=0; el<numelements; el++)
1045 read >> TopolTetra[0];
1046 read >> TopolTetra[1];
1047 read >> TopolTetra[2];
1048 read >> TopolTetra[3];
1064 for(el=0; el<numelements; el++)
1072 for (
int i = 0; i < 4; i++)
1075 Nodefinder[i] = gMesh->
NodeVec()[pos];
1076 Nodefinder[i].GetCoordinates(nodecoord);
1077 if (nodecoord[0] == 1.)
1080 ncoordzVec.
Resize(sizeOfVec);
1081 ncoordzVec[sizeOfVec-1] = pos;
1086 int lado = tetra->
WhichSide(ncoordzVec);
1094 for (
int i = 0; i < 4; i++)
1097 Nodefinder[i] = gMesh->
NodeVec()[pos];
1099 Nodefinder[i].GetCoordinates(nodecoord);
1100 if (nodecoord[0] == -1.)
1103 ncoordzVec.
Resize(sizeOfVec);
1104 ncoordzVec[sizeOfVec-1] = pos;
1109 int lado = tetra->
WhichSide(ncoordzVec);
1119 int bcidxyz = -1, bcidyz = -2, bcidz = -3;
1131 for (
int ref = 0; ref < nh; ref++ ){
1134 for ( int64_t i = 0; i < n; i++ ){
1146 ofstream arg(
"malhaPZ1BC.txt");
1149 std::ofstream out(
"Cube.vtk");
1163 for (iel = 0; iel<nelem; iel++) {
1168 for (c=0; c<nc; c++) {
1187 for (in=0; in<nnodes; in++) {
1188 REAL z = nodevec[in].Coord(2);
1189 maxz = (maxz < z) ? z : maxz;
1200 for (iel=0; iel<nelem; iel++)
1210 int nsides = gel->
NSides();
1215 int floor = (int) z/height;
1216 nsub = (floor+1) > nsub ? (floor+1) :
nsub;
1217 subindex[iel] = floor;
1227 for (cel=0; cel<nel; cel++) {
1229 if(!compel)
continue;
1234 domaincolor[gel->
Index()] = subindex[cel];
1236 ofstream vtkfile(
"partition.vtk");
1243 for (isub=0; isub<
nsub; isub++)
1246 std::cout <<
'^'; std::cout.flush();
1251 subindex[index] = -1;
1254 for (iel=0; iel<nelem; iel++)
1256 int domindex = subindex[iel];
1264 submeshes[domindex]->TransferElement(cmesh.operator->(),iel);
1268 for (isub=0; isub<
nsub; isub++)
1270 submeshes[isub]->MakeAllInternal();
1271 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.
Calculate the Times. Utility.
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.
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...
void InsertViscoElasticityCubo(TPZAutoPointer< TPZCompMesh > mesh)
clarg::argInt plevel("-p", "plevel", 1)
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 ...
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.
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.
Contains the TPZfTime class which calculates times.
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 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)
std::string ReturnTimeString()
When called, returns the time since the creation of the object in a string.
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.
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 ...
#define VERBOSE(level,...)
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
#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.