NeoPZ
tpzhierarquicalgrid.h
Go to the documentation of this file.
1 /*
2  <one line to give the program's name and a brief idea of what it does.>
3  Copyright (C) 2014 <copyright holder> <email>
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 
20 #ifndef TPZHIERARQUICALGRID_H
21 #define TPZHIERARQUICALGRID_H
22 
23 class TPZGeoMesh;
24 #include "pzstack.h"
25 #include <fstream>
26 #include <iostream>
27 #include "pzmatrix.h"
28 #include "tpzautopointer.h"
29 #include "pzfunction.h"
30 
32 {
33 
37  REAL fThickness;
38 
43 
47  bool fIsQuad;
48 
52  bool fIsPrism;
53 
58 
63 
68 
72  std::string fFileName;
73 
78 
83 
88 
91 
92 
93 public:
94 
99 
104 
109 
114 
123 
131  bool operator==(const TPZHierarquicalGrid& other) const;
132 
136  void PrintGeneratedMesh(std::ostream &out = std::cout);
137 
144  fBase = gmesh;
145  }
146 
153  {
154  fParametricFunction = fp;
155  }
156 
166  TPZGeoMesh * ComputeExtrusion(REAL t, REAL dt, int n);
167 
168  void SetFrontBackMatId(int front, int back) {ffrontMatID = front; fbackMatID = back;}
169 
170  void SetTriangleExtrusion() {fIsQuad = false;}
171 
172  void SetTetrahedonExtrusion() {fIsTetrahedron = true;}
173 
174  void SetPrismExtrusion() {fIsPrism = true;}
175 
176  void SetNonAffineExtrusion() { fNonAffineQ = true;}
177 
178  void SetGridFileName(std::string &FileName) {fFileName = FileName;}
179 
180  void CreateGeometricElement(int n, int iel, int eldim, int elmatid, int &elid);
181 
182 };
183 
184 #endif // TPZHIERARQUICALGRID_H
void SetFrontBackMatId(int front, int back)
bool operator==(const TPZHierarquicalGrid &other) const
TPZAutoPointer< TPZGeoMesh > fBase
A geometric mesh generated from other sources.
TPZAutoPointer< TPZFunction< REAL > > fParametricFunction
Pointer to parametric function of t parameter.
int fbackMatID
Extrusion back material id.
bool fIsQuad
2d extrusion is based on quadrilaterals
void SetGeometricMesh(TPZGeoMesh *gmesh)
std::string fFileName
Name of the fine mesh to be extended.
This class implements a simple vector storage scheme for a templated class T. Utility.
Definition: pzgeopoint.h:19
void CreateGeometricElement(int n, int iel, int eldim, int elmatid, int &elid)
TPZGeoMesh * ComputeExtrusion(REAL t, REAL dt, int n)
Contains declaration of the TPZAutoPointer class which has Increment and Decrement actions are mutexe...
TPZGeoMesh * fComputedGeomesh
A geometric mesh being computed.
A simple stack.
Contains TPZMatrix<TVar>class, root matrix class.
void PrintGeneratedMesh(std::ostream &out=std::cout)
Prints the generated mesh.
TPZVec< TPZAutoPointer< TPZGeoMesh > > fSubBases
Vector of n bases to be connected to the original base.
bool fIsPrism
3d extrusion is based on prisms
void SetGridFileName(std::string &FileName)
This class implements a geometric mesh for the pz environment. Geometry.
Definition: pzgmesh.h:48
REAL fThickness
Thickness of the mesh (+ or -)
bool fIsTetrahedron
3d extrusion is based on tetrahedrons
int ffrontMatID
Extrusion front material id.
void SetParametricFunction(TPZAutoPointer< TPZFunction< REAL > > fp)
TPZHierarquicalGrid & operator=(const TPZHierarquicalGrid &other)
bool fNonAffineQ
Non affine 2D and 3D extrusion.