20 TPZGraphMesh(cmesh,dimension,matids,scalarnames,vecnames) {
27 int type = ce->
Type();
35 int nnodes = gel->
NNodes();
37 if(nnodes==3 && dimension==2)
fElementType =
"triangles";
96 if(matids.size() == 0) {
97 cout <<
"TPZMVGraphMesh no material found\n";
100 set<int>::iterator iter = matids.begin();
105 int firsttype[4] = {1,2,4,0}, lasttype[4] = {2,4,5,0};
106 int numnod[] = {0,2,4,3,8};
107 std::string elname[] = {
"noname",
"lines",
"quads",
"triangles",
"cubes"};
113 (
fOutFile) <<
"object " <<
object <<
" class array type float rank 1 shape 3 items " 114 << nn <<
" data follows"<< endl;
116 (
fOutFile) <<
"attribute \"dep\" string \"positions\"" << endl;
124 for(it=firsttype[dim1]; it<lasttype[dim1]; it++) {
130 (
fOutFile) <<
"object " <<
object <<
" class array type int rank 1 shape " 133 <<
NElements(type) <<
" data follows"<<endl;
137 (
fOutFile) <<
"attribute \"element type\" string ";
138 (
fOutFile) <<
"\"" << elname[it] <<
"\"" << endl;
139 (
fOutFile) <<
"attribute \"ref\" string \"positions\"" << endl;
152 if(matids.size() == 0) {
153 cout <<
"TPZMVGraphMesh no material found\n";
156 set<int>::iterator iter = matids.begin();
172 for(n=0; n<numscal; n++) {
175 for(n=0; n<numvec; n++) {
180 cout <<
"TPZDXGraphMesh.DrawSolution step = " << step <<
" time = " << time << endl;
183 for(n=0; n<numscal; n++) {
185 << numpoints <<
" data follows " << endl;
186 scal[0] = scalind[n];
192 (
fOutFile) <<
"attribute \"dep\" string \"positions\"" << endl;
204 << step << (0) <<
"\"" << endl;
229 << step << (0) <<
"\"" << endl;
235 for(n=0; n<numvec; n++) {
238 << numpoints <<
" data follows " << endl;
245 (
fOutFile) <<
"attribute \"dep\" string \"positions\"" << endl;
255 << step << (0) <<
"\"" << endl;
266 << step << (0) <<
"\"" << endl;
276 << step << (1) <<
"\"" << endl;
286 << step << (0) <<
"\"" << endl;
304 cout <<
"DxMesh finalizing\n";
305 for(n=0; n<numscal; n++) {
310 int64_t FVRval = FVR[ist]+icon;
312 <<
" value " << FVRval << endl;
318 for(n=0; n<numvec; n++) {
323 int64_t FVRval = FVR[ist]+icon;
325 <<
" value " << FVRval << endl;
331 (
fOutFile) <<
"object \"ALL\" class group\n";
332 for(n=0; n<numscal; n++) {
335 for(n=0; n<numvec; n++) {
356 if(matids.size() == 0) {
357 cout <<
"TPZMVGraphMesh no material found\n";
360 set<int>::iterator iter = matids.begin();
373 (
fOutFile) <<
"attribute \"dep\" string \"positions\"" << endl;
413 for(i=0; i<numnorm; i++) {
Represents a graphical mesh used for post processing purposes. Post processing.
virtual void SetFileName(const std::string &filename)
Sets the name of the output file.
virtual MElementType Type()
Return the type of the element.
TPZVec< std::string > fScalarNames
Vectors of the variables names (scalar, vectorial, and tensorial)
void DrawSolution(int solutionid, TPZDrawStyle st=EDXStyle)
Draw solution on the current connect for solutionid variable.
Implements the interface of the graphmesh to the OpenDX graphics package. Post processing.
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
virtual void DrawConnectivity(MElementType type)
Draw the connectivity information.
Contains declaration of TPZCompEl class which defines the interface of a computational element...
TPZVec< std::string > VecNames()
Return vectorial variable names.
virtual int VariableIndex(const std::string &name)
Returns the variable index associated with the name.
virtual int Dimension() const =0
Returns the integrable dimension of the material.
Contains the TPZGraphEl class which implements the graphical one-, two- and three-dimensional element...
Contains the TPZGraphNode class which implements the graphical node.
int64_t NElements() const
Access method to query the number of elements of the vector.
TPZCompEl * FindFirstInterpolatedElement(TPZCompMesh *mesh, int dimension)
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
std::set< int > MaterialIds()
Get material ids.
This abstract class defines the behaviour which each derived class needs to implement.
virtual void DrawNodes()
Draw the graphical nodes information.
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...
TPZStack< int > fFirstFieldValues[3]
int fDimension
Dimension of the graphical mesh.
void Push(const T object)
Pushes a copy of the object on the stack.
virtual ~TPZDXGraphMesh()
Default destructor.
virtual void DrawSolution(TPZBlock< REAL > &Sol)
Draw solution as dx file.
TPZDrawStyle fStyle
Style of the graphical file.
void DrawNormals(int numnormals)
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Contains TPZMatrixclass which implements full matrix (using column major representation).
int fNumConnectObjects[8]
TPZMaterial * FindMaterial(int id)
Find the material with identity id.
Contains the TPZGraphElT class which implements the graphical triangular element. ...
int fElConnectivityObject[8]
TPZVec< std::string > fVecNames
TPZAdmChunkVector< TPZConnect > & ConnectVec()
Return a reference to the connect pointers vector.
Contains declaration of TPZCompMesh class which is a repository for computational elements...
virtual void DrawMesh(int numcases)
Draw mesh as dx file.
virtual void SetFileName(const std::string &filename)
Sets the filename to output of graph.
virtual int NNodes() const =0
Returns the number of nodes of the element.
TPZAdmChunkVector< TPZGraphNode > fNodeMap
Vector of graphical nodes (connects)
TPZGeoEl * Reference() const
Return a pointer to the corresponding geometric element if such exists, return 0 otherwise.
virtual int NSolutionVariables(int var)
Returns the number of variables associated with the variable indexed by var.
Implements block matrices. Matrix utility.
MElementType
Define the element types.
TPZVec< std::string > ScalarNames()
Return scalar variable names.
Implements computational mesh. Computational Mesh.
int NNodes()
Number of nodes.
Contains declaration of TPZInterpolatedElement class which implements computational element of the in...
void Fill(const T ©, const int64_t from=0, const int64_t numelem=-1)
Will fill the elements of the vector with a copy object.
int64_t NElements(MElementType type)
int64_t NElements() const
Returns the number of elements of the vector.
TPZCompMesh * fCompMesh
Computational mesh associated.
std::set< int > fMaterialIds
Set of material ids being post-processed.
Contains the TPZDXGraphMesh class which implements the interface of the graphmesh to the OpenDX graph...
int64_t NPoints()
Number of points to drawing, depending on the resolution.
Defines the interface of a computational element. Computational Element.
To export a graphical node. Post processing.
TPZDXGraphMesh(TPZCompMesh *mesh, int dimension, const std::set< int > &matids, const TPZVec< std::string > &scalarnames, const TPZVec< std::string > &vecnames)
Constructor for output in DX format.
std::string ElementName()