34 #include "pzviscoelastic.h" 58 for (iel = 0; iel<nelem; iel++) {
63 for (c=0; c<nc; c++) {
79 int nummat = 1, neumann = 1, mixed = 2;
81 int dir1 = -1, dir2 = -2, dir3 = -3, neumann1 = -4., neumann2 = -5;
85 STATE ElaE = 1000., poissonE = 0.2;
87 STATE lambdaV = 0, muV = 0, alpha = 0, deltaT = 0;
113 TPZBndCond *bc5 = viscoelast->
CreateBC(viscoelastauto, neumann2, neumann, val1, val2);
150 bool countnodes =
false;
151 bool countelements =
false;
153 ifstream
read (FileName.c_str());
158 read.getline(buf, 1024);
159 std::string str(buf);
160 if(str ==
"Coordinates") countnodes =
true;
161 if(str ==
"end coordinates") countnodes =
false;
162 if(countnodes) numnodes++;
164 if(str ==
"Elements") countelements =
true;
165 if(str ==
"end elements") countelements =
false;
166 if(countelements) numelements++;
172 gMesh -> NodeVec().Resize(numnodes);
176 const int Qnodes = numnodes;
180 int64_t nodeId = 0, elementId = 0, matElId = 1;
183 read.open(FileName.c_str());
185 double nodecoordX , nodecoordY , nodecoordZ ;
188 read.getline(buf, 1024);
189 read.getline(buf, 1024);
190 std::string str(buf);
192 for(in=0; in<numnodes; in++)
198 Node[nodeId-1].SetNodeId(nodeId);
199 Node[nodeId-1].SetCoord(0,nodecoordX);
200 Node[nodeId-1].SetCoord(1,nodecoordY);
201 Node[nodeId-1].SetCoord(2,nodecoordZ);
202 gMesh->
NodeVec()[nodeId-1] = Node[nodeId-1];
207 read.open(FileName.c_str());
209 int l ,
m = numnodes+5;
212 read.getline(buf, 1024);
217 int neumann1 = -4, neumann2 = -5;
219 for(el=0; el<numelements; el++)
222 read >> TopolTetra[0];
223 read >> TopolTetra[1];
224 read >> TopolTetra[2];
225 read >> TopolTetra[3];
241 for(el=0; el<numelements; el++)
249 for (
int i = 0; i < 4; i++)
252 Nodefinder[i] = gMesh->
NodeVec()[pos];
253 Nodefinder[i].GetCoordinates(nodecoord);
254 if (nodecoord[0] == 1.)
257 ncoordzVec.
Resize(sizeOfVec);
258 ncoordzVec[sizeOfVec-1] = pos;
271 for (
int i = 0; i < 4; i++)
274 Nodefinder[i] = gMesh->
NodeVec()[pos];
276 Nodefinder[i].GetCoordinates(nodecoord);
277 if (nodecoord[0] == -1.)
280 ncoordzVec.
Resize(sizeOfVec);
281 ncoordzVec[sizeOfVec-1] = pos;
296 int bcidxyz = -1, bcidyz = -2, bcidz = -3;
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.
void SetStructuralMatrix(TPZAutoPointer< TPZStructMatrix > strmatrix)
Set structural matrix as auto pointer for analysis.
Implements a vector class which allows to use external storage provided by the user. Utility.
clarg::argBool bc("-bc", "binary checkpoints", false)
Timing class. Absolutely copied from GNU time. Take a look at
Contains the TPZDohrSubstruct class which implements sub structure matrices using Dohrman algorithm...
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...
Defines step solvers class. Solver.
void SetSolver(TPZMatrixSolver< STATE > &solver)
Set solver matrix.
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.
virtual void Assemble()
Assemble the stiffness matrix and load vector.
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
Contains declaration of TPZGeoElBC class, it is a structure to help the construction of geometric ele...
int64_t NElements() const
Access method to query the number of elements of 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...
Contains the TPZDohrAssembly class which implements assembling using Dohrmann algorithm.
TPZMatrixSolver< STATE > & Solver()
Get the solver matrix.
int WhichSide(TPZVec< int64_t > &SideNodeIds)
Returns the side number which is connected to the SideNodes returns -1 if no side is found...
Implements a skyline storage format. A Skyline matrix is symmetric so square. Matrix.
Contains the TPZDohrStructMatrix class which implements structural matrix divided in sub structures...
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)
Implements SkyLine Structural Matrices. Structural Matrix.
This abstract class defines the behaviour which each derived class needs to implement.
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
clarg::argInt plevel("-p", "plevel", 1)
int Zero() override
Makes Zero all the elements.
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 ...
Implements the sequence of actions to perform a finite element analysis. Analysis.
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...
Contains the TPZGeoTetrahedra class which implements the geometry of a tetrahedral element...
This class defines the boundary condition for TPZMaterial objects.
Contains the TPZSkylineStructMatrix class which implements SkyLine Structural Matrices.
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.
Contains the TPZPairStructMatrix class.
Contains TPZSkyline class which implements a skyline storage format.
void SetDimModel(int dim)
Set de dimension of the domain of the problem.
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.
Contains the TPZArc3D class which implements three dimensional arc.
Implements a geometric node in the pz environment. Geometry.
This class implements a geometric mesh for the pz environment. Geometry.
Implements computational mesh. Computational Mesh.
TPZAutoPointer< TPZMatrix< TVar > > Matrix() const
Returns a pointer to TPZMatrix<>
Contains TPZStepSolver class which defines step solvers class.
int64_t NElements() const
Returns the number of elements of the vector.
void SetDirect(const DecomposeType decomp)
clarg::argString m("-m", "input matrix file name (text format)", "matrix.txt")
Contains the TPZVTKGeoMesh class which implements the graphical mesh to VTK environment to geometric ...
Non abstract class which implements full matrices with preallocated storage with (N+1) entries...
TPZAdmChunkVector< TPZGeoEl * > & ElementVec()
Methods for handling pzlists.