22 static LoggerPtr logger(Logger::getLogger(
"pz.pre.tpzmeshreaderhr"));
37 int nmat = atoi (numberOf.c_str());
40 int nbcs = atoi (numberOf.c_str());
53 std::string aux (buf);
54 int pos = aux.find (
":");
55 if ((pos > -1 && pos < (
int)aux.size()) || !aux.size())
continue;
69 for (c=0;c<3;c++) fInputFile >> coord[c];
119 std::stringstream sout;
121 sout << __PRETTY_FUNCTION__;
123 sout <<
"Nao sei que elemento " << type <<
" eh esse indicado para o elemento " << id;
127 std::cout << sout.str().c_str() << std::endl;
146 for (i = 0; i < NMat; i++) {
148 if (classId == ClassIdOrHash<TPZElasticityMaterial>()) {
149 double e, nu, px, py;
154 }
else if (classId == ClassIdOrHash<TPZMat2dLin>()) {
160 TPZFMatrix<STATE> xk(nstate, nstate, 1.), xc(nstate, nstate, 0.), xf(nstate, 1, 0.);
162 for (ist = 0; ist < nstate; ist++) {
166 for (ist = 0; ist < nstate; ist++) {
167 for (jst = 0; jst < nstate; jst++) {
172 for (ist = 0; ist < nstate; ist++) {
173 for (jst = 0; jst < nstate; jst++) {
181 }
else if (classId == ClassIdOrHash<TPZMatPoisson3d>()) {
189 for (ist = 0; ist < 3; ist++) {
197 std::stringstream sout;
198 sout <<
"Could not identify material of type: " << classId
199 <<
" check material identifier for material " << i;
203 std::cout << sout.str().c_str() << std::endl;
216 std::stringstream sout;
218 sout << __PRETTY_FUNCTION__ <<
" no materials " << std::endl;
220 sout <<
"\tN� encontrei material na malha!";
224 std::cout << sout.str().c_str() << std::endl;
228 std::map<int, TPZMaterial * >::iterator matit = CMesh.
MaterialVec().begin();
232 std::cout <<
" empty material " << std::endl;
241 fInputFile >> val1 (0,0) >> val1(0,1) >> val1(0,2)
242 >> val1 (1,0) >> val1(1,1) >> val1(1,2)
243 >> val1 (2,0) >> val1(2,1) >> val1(2,2);
244 fInputFile >> val2(0,0) >> val2(1,0) >> val2(2,0);
246 bnd = mat->
CreateBC (mat,
id,type,val1,val2);
254 int64_t vid,index,size = nodeVec.
NElements();
255 if (Id < size) index = Id;
256 else index = size - 1;
257 vid = nodeVec[index].Id();
258 if (vid == Id)
return index;
261 for (i=index-1;i>-1;i--)
263 vid = nodeVec[i].Id();
264 if (vid == Id)
return i;
266 std::stringstream sout;
268 sout << __PRETTY_FUNCTION__;
270 sout <<
" N�" << Id <<
" n� encontrado!";
274 std::cout << sout.str().c_str() << std::endl;
283 std::string numberOf;
285 int64_t nnos = atoi (numberOf.c_str());
288 int64_t nelem = atoi (numberOf.c_str());
int AllocateNewElement()
Makes more room for new elements.
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.
virtual void ReadBCs(int NMat, TPZCompMesh &CMesh)
Read the boundary conditions.
virtual TPZGeoEl * CreateGeoElement(MElementType type, TPZVec< int64_t > &cornerindexes, int matid, int64_t &index, int reftype=1)
Generic method for creating a geometric element. Putting this method centrally facilitates the modifi...
virtual ~TPZReadMeshHR()
Default Destructor.
TPZReadMeshHR(const char *inFile)
Default Constructor.
virtual void ReadNodes(int64_t NNos, TPZGeoMesh &GMesh)
Read the nodes data.
Contains declaration of TPZCompEl class which defines the interface of a computational element...
Virtual class that implements the interface for build a computational mesh from a file...
int64_t NElements() const
Access method to query the number of elements of the vector.
#define LOGPZ_WARN(A, B)
Define log for warnings.
Contains the TPZMatPoisson3d class.
virtual void ReadElements(int64_t NElem, TPZGeoMesh &GMesh)
Read the elements data.
#define LOGPZ_FATAL(A, B)
Define log for fatal errors (cout)
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...
void removeComents(std::string &NumberOf)
Remove the coments and return the integer parameter of the first line without comment token...
Contains declaration of TPZMesh class which defines a geometrical mesh and contains a corresponding l...
virtual void SetParameters(STATE diff, REAL conv, TPZVec< REAL > &convdir)
#define DebugStop()
Returns a message to user put a breakpoint in.
TPZGeoMesh * readGeoMesh()
Contains the TPZElasticityMaterial class which implements a two dimensional elastic material in plane...
virtual TPZCompMesh * ReadMesh()
Read and return the mesh from a given file.
TPZAdmChunkVector< TPZGeoNode > & NodeVec()
virtual void AutoBuild(const std::set< int > *MaterialIDs)
Creates the computational elements, and the degree of freedom nodes.
Contains the TPZMat2dLin class which implements a bi-dimensional linear problem.
#define LOGPZ_ERROR(A, B)
Define log for errors (cout)
Contains declaration of TPZCompMesh class which is a repository for computational elements...
void SetMaterial(TPZFMatrix< STATE > &xkin, TPZFMatrix< STATE > &xcin, TPZFMatrix< STATE > &xfin)
virtual void ReadMaterials(int NMat, TPZCompMesh &CMesh)
Read the material data.
std::map< int,TPZMaterial *> & MaterialVec()
Returns a reference to the material pointers vector.
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 TPZReadMeshHR class which reads a mesh in a "human readable" format. ...
Implements a geometric node in the pz environment. Geometry.
int64_t GetNodeIndex(TPZGeoMesh *GMesh, int64_t Id)
Translate a node id to a node index.
This class implements a geometric mesh for the pz environment. Geometry.
MElementType
Define the element types.
Implements a bi-dimensional linear problem.
Implements computational mesh. Computational Mesh.
This class implements a two dimensional elastic material in plane stress or strain.
std::ifstream fInputFile
Input file.