KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
pfem_gid_io.h
Go to the documentation of this file.
1 /*
2 ==============================================================================
3 Kratos
4 A General Purpose Software for Multi-Physics Finite Element Analysis
5 Version 1.0 (Released on march 05, 2007).
6 
7 Copyright 2007
8 Pooyan Dadvand, Riccardo Rossi
9 pooyan@cimne.upc.edu
10 rrossi@cimne.upc.edu
11 CIMNE (International Center for Numerical Methods in Engineering),
12 Gran Capita' s/n, 08034 Barcelona, Spain
13 
14 Permission is hereby granted, free of charge, to any person obtaining
15 a copy of this software and associated documentation files (the
16 "Software"), to deal in the Software without restriction, including
17 without limitation the rights to use, copy, modify, merge, publish,
18 distribute, sublicense and/or sell copies of the Software, and to
19 permit persons to whom the Software is furnished to do so, subject to
20 the following condition:
21 
22 Distribution of this code for any commercial purpose is permissible
23 ONLY BY DIRECT ARRANGEMENT WITH THE COPYRIGHT OWNER.
24 
25 The above copyright notice and this permission notice shall be
26 included in all copies or substantial portions of the Software.
27 
28 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
29 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
31 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
32 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
33 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
34 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 
36 ==============================================================================
37 */
38 
39 //
40 // Project Name: Kratos
41 // Last Modified by: $Author: anonymous $
42 // Date: $Date: 2009-01-15 14:50:24 $
43 // Revision: $Revision: 1.8 $
44 //
45 //
46 
47 #if !defined(KRATOS_PFEM_GID_IO_BASE_H_INCLUDED)
48 #define KRATOS_PFEM_GID_IO_BASE_H_INCLUDED
49 
50 // System includes
51 #include <string>
52 #include <iostream>
53 #include <fstream>
54 #include <sstream>
55 #include <cstddef>
56 
57 
58 // Project includes
59 #include <pybind11/pybind11.h>
60 #include "includes/define.h"
61 #include "includes/define_python.h"
62 
63 //#include "includes/datafile_io.h"
64 #include "includes/gid_io.h"
65 
66 namespace Kratos
67 {
76 
81 class PfemGidGaussPointsContainer
82 {
83 public:
85  PfemGidGaussPointsContainer( const char* gp_title, KratosGeometryFamily geometryFamily,
86  GiD_ElementType gid_element_type,
87  unsigned int number_of_integration_points,
88  std::vector<int> index_container )
89  :mGPTitle(gp_title),mKratosElementFamily(geometryFamily),
90  mGidElementFamily(gid_element_type), mSize(number_of_integration_points),
91  mIndexContainer(index_container) {}
92 
93  bool AddElement( const ModelPart::ElementsContainerType::iterator pElemIt )
94  {
96  if( pElemIt->GetGeometry().GetGeometryFamily() == mKratosElementFamily
97  && pElemIt->GetGeometry().IntegrationPoints(
98  pElemIt->GetIntegrationMethod() ).size() == mSize )
99  {
100  mMeshElements.push_back( *(pElemIt.base() ) );
101  return true;
102  }
103  else return false;
104  KRATOS_CATCH("")
105  }
106 
107  bool AddCondition( const ModelPart::ConditionsContainerType::iterator pCondIt )
108  {
109  KRATOS_TRY
110  if( pCondIt->GetGeometry().GetGeometryFamily() == mKratosElementFamily
111  && pCondIt->GetGeometry().IntegrationPoints().size() == mSize )
112  {
113  mMeshConditions.push_back( *(pCondIt.base() ) );
114  return true;
115  }
116  else return false;
117  KRATOS_CATCH("")
118  }
119 
120  void PrintResults( GiD_FILE ResultFile, Variable<double> rVariable, ModelPart& r_model_part,
121  double SolutionTag, unsigned int value_index = 0 )
122  {
123  if( mMeshElements.size() != 0 || mMeshConditions.size() != 0 )
124  {
125  WriteGaussPoints(ResultFile);
126  GiD_fBeginResult(ResultFile, (char*)(rVariable.Name()).c_str(), "Kratos", SolutionTag,
127  GiD_Scalar, GiD_OnGaussPoints, mGPTitle, NULL, 0, NULL );
128  std::vector<double> ValuesOnIntPoint(mSize);
129  if( mMeshElements.size() != 0 )
130  {
131  for( ModelPart::ElementsContainerType::iterator it = mMeshElements.begin();
132  it != mMeshElements.end(); it++ )
133  {
134  it->GetValueOnIntegrationPoints( rVariable, ValuesOnIntPoint,
135  r_model_part.GetProcessInfo() );
136  for(unsigned int i=0; i<mIndexContainer.size(); i++)
137  {
138  int index = mIndexContainer[i];
139  GiD_fWriteScalar(ResultFile, it->Id(), ValuesOnIntPoint[index] );
140  }
141  }
142  }
143  if( mMeshConditions.size() != 0 )
144  {
145  for( ModelPart::ConditionsContainerType::iterator it = mMeshConditions.begin();
146  it != mMeshConditions.end(); it++ )
147  {
148  it->GetValueOnIntegrationPoints( rVariable, ValuesOnIntPoint,
149  r_model_part.GetProcessInfo() );
150  for(unsigned int i=0; i<mIndexContainer.size(); i++)
151  {
152  int index = mIndexContainer[i];
153  GiD_fWriteScalar(ResultFile, it->Id(), ValuesOnIntPoint[index] );
154  }
155  }
156  }
157  GiD_fEndResult(ResultFile);
158  }
159  }
160 
161  void PrintResults( GiD_FILE ResultFile, Variable<Vector> rVariable, ModelPart& r_model_part,
162  double SolutionTag, unsigned int value_index = 0 )
163  {
164  if( mMeshElements.size() != 0 || mMeshConditions.size() != 0 )
165  {
166  WriteGaussPoints(ResultFile);
167  GiD_fBeginResult(ResultFile, (char *)(rVariable.Name()).c_str(), "Kratos", SolutionTag,
168  GiD_Vector, GiD_OnGaussPoints, mGPTitle, NULL, 0, NULL );
169  std::vector<Vector> ValuesOnIntPoint(mSize);
170  if( mMeshElements.size() != 0 )
171  {
172  for( ModelPart::ElementsContainerType::iterator it = mMeshElements.begin();
173  it != mMeshElements.end(); ++it )
174  {
175  it->GetValueOnIntegrationPoints( rVariable, ValuesOnIntPoint,
176  r_model_part.GetProcessInfo() );
177  for(unsigned int i=0; i<mIndexContainer.size(); i++)
178  {
179  int index = mIndexContainer[i];
180  if( ValuesOnIntPoint[0].size() == 3 )
181  GiD_fWriteVector(ResultFile, it->Id(), ValuesOnIntPoint[index][0],
182  ValuesOnIntPoint[index][1], ValuesOnIntPoint[index][2] );
183  }
184  }
185  }
186  if( mMeshConditions.size() != 0 )
187  {
188  for( ModelPart::ConditionsContainerType::iterator it = mMeshConditions.begin();
189  it != mMeshConditions.end(); it++ )
190  {
191  it->GetValueOnIntegrationPoints( rVariable, ValuesOnIntPoint,
192  r_model_part.GetProcessInfo() );
193  for(unsigned int i=0; i<mIndexContainer.size(); i++)
194  {
195  int index = mIndexContainer[i];
196  if( ValuesOnIntPoint[0].size() == 3 )
197  GiD_fWriteVector(ResultFile, it->Id(), ValuesOnIntPoint[index][0],
198  ValuesOnIntPoint[index][1], ValuesOnIntPoint[index][2] );
199  }
200  }
201  }
202  GiD_fEndResult(ResultFile);
203  }
204  }
205 
206  void PrintResults( GiD_FILE ResultFile, Variable<Matrix> rVariable, ModelPart& r_model_part,
207  double SolutionTag, unsigned int value_index = 0 )
208  {
209  if( mMeshElements.size() != 0 || mMeshConditions.size() != 0 )
210  {
211  WriteGaussPoints(ResultFile);
212  GiD_fBeginResult( ResultFile, (char *)(rVariable.Name()).c_str(), "Kratos", SolutionTag,
213  GiD_Matrix, GiD_OnGaussPoints, mGPTitle, NULL, 0, NULL );
214  std::vector<Matrix> ValuesOnIntPoint(mSize);
215  if( mMeshElements.size() != 0 )
216  {
217  for( ModelPart::ElementsContainerType::iterator it = mMeshElements.begin();
218  it != mMeshElements.end(); ++it )
219  {
220  it->GetValueOnIntegrationPoints( rVariable, ValuesOnIntPoint,
221  r_model_part.GetProcessInfo() );
222  for(unsigned int i=0; i<mIndexContainer.size(); i++)
223  {
224  int index = mIndexContainer[i];
225  if(ValuesOnIntPoint[index].size1() ==3
226  && ValuesOnIntPoint[index].size2() ==3)
227  GiD_fWrite3DMatrix( ResultFile, it->Id(), ValuesOnIntPoint[index](0,0),
228  ValuesOnIntPoint[index](1,1), ValuesOnIntPoint[index](2,2),
229  ValuesOnIntPoint[index](0,1), ValuesOnIntPoint[index](1,2),
230  ValuesOnIntPoint[index](0,2) );
231  if(ValuesOnIntPoint[index].size1() ==1
232  && ValuesOnIntPoint[index].size2() ==6)
233  GiD_fWrite3DMatrix( ResultFile, it->Id(), ValuesOnIntPoint[index](0,0),
234  ValuesOnIntPoint[index](0,1), ValuesOnIntPoint[index](0,2),
235  ValuesOnIntPoint[index](0,3), ValuesOnIntPoint[index](0,4),
236  ValuesOnIntPoint[index](0,5) );
237  }
238  }
239  }
240  if( mMeshConditions.size() != 0 )
241  {
242  for( ModelPart::ConditionsContainerType::iterator it = mMeshConditions.begin();
243  it != mMeshConditions.end(); it++ )
244  {
245  it->GetValueOnIntegrationPoints( rVariable, ValuesOnIntPoint,
246  r_model_part.GetProcessInfo() );
247  for(unsigned int i=0; i<mIndexContainer.size(); i++)
248  {
249  int index = mIndexContainer[i];
250  if(ValuesOnIntPoint[index].size1() ==3
251  && ValuesOnIntPoint[index].size2() ==3)
252  GiD_fWrite3DMatrix( ResultFile, it->Id(), ValuesOnIntPoint[index](0,0),
253  ValuesOnIntPoint[index](1,1), ValuesOnIntPoint[index](2,2),
254  ValuesOnIntPoint[index](0,1), ValuesOnIntPoint[index](1,2),
255  ValuesOnIntPoint[index](0,2) );
256  if(ValuesOnIntPoint[index].size1() ==1
257  && ValuesOnIntPoint[index].size2() ==6)
258  GiD_fWrite3DMatrix( ResultFile, it->Id(), ValuesOnIntPoint[index](0,0),
259  ValuesOnIntPoint[index](0,1), ValuesOnIntPoint[index](0,2),
260  ValuesOnIntPoint[index](0,3), ValuesOnIntPoint[index](0,4),
261  ValuesOnIntPoint[index](0,5) );
262  }
263  }
264  }
265  GiD_fEndResult(ResultFile);
266  }
267  }
268 
269  void PrintResults( GiD_FILE ResultFile, Variable<array_1d<double, 3> > rVariable, ModelPart& r_model_part,
270  double SolutionTag, int value_index = 0 )
271  {
272  }
273 
274  void WriteGaussPoints(GiD_FILE ResultFile)
275  {
276  //setting up gauss points
277  if( mGidElementFamily == GiD_Tetrahedra && mSize == 5 )
278  {
279  GiD_fBeginGaussPoint( ResultFile, mGPTitle, GiD_Tetrahedra, NULL, 4, 0, 0 );
280  GiD_fWriteGaussPoint3D( ResultFile, 1.0/6.0, 1.0/6.0, 1.0/6.0 );
281  GiD_fWriteGaussPoint3D( ResultFile, 1.0/2.0, 1.0/6.0, 1.0/6.0 );
282  GiD_fWriteGaussPoint3D( ResultFile, 1.0/6.0, 1.0/2.0, 1.0/6.0 );
283  GiD_fWriteGaussPoint3D( ResultFile, 1.0/6.0, 1.0/6.0, 1.0/2.0 );
284  GiD_fEndGaussPoint(ResultFile);
285  }
286  else if( mGidElementFamily == GiD_Tetrahedra && mSize == 10 )
287  {
288  GiD_fBeginGaussPoint(ResultFile, "tet10_element_gp", GiD_Tetrahedra, NULL, 4, 0, 0);
289  GiD_fWriteGaussPoint3D( ResultFile, 1.0/14.0, 1.0/14.0, 1.0/14.0 );
290  GiD_fWriteGaussPoint3D( ResultFile, 11.0/14.0, 1.0/14.0, 1.0/14.0 );
291  GiD_fWriteGaussPoint3D( ResultFile, 1.0/14.0, 11.0/14.0, 1.0/14.0 );
292  GiD_fWriteGaussPoint3D( ResultFile, 1.0/14.0, 1.0/14.0, 11.0/14.0 );
293  GiD_fEndGaussPoint(ResultFile);
294  }
295  else
296  {
297  GiD_fBeginGaussPoint(ResultFile, mGPTitle, mGidElementFamily, NULL,
298  mSize, 0, 1);
299  GiD_fEndGaussPoint(ResultFile);
300  }
301  }
302 
303  void Reset()
304  {
305  mMeshElements.clear();
306  mMeshConditions.clear();
307  }
308 
309 protected:
311  const char* mGPTitle;
313  GiD_ElementType mGidElementFamily;
314  unsigned int mSize;
315  std::vector<int> mIndexContainer;
318 };//class PfemGidGaussPointsContainer
319 
325 {
326 public:
329  GiD_ElementType elementType, const char* mesh_title )
330  :mGeometryType(geometryType), mGidElementType(elementType), mMeshTitle(mesh_title) {}
331 
332  bool AddElement( const ModelPart::ElementsContainerType::iterator pElemIt )
333  {
334  KRATOS_TRY
335  if( pElemIt->GetGeometry().GetGeometryType() == mGeometryType )
336  {
337  mMeshElements.push_back( *(pElemIt.base() ) );
338  Geometry<Node >&geom = pElemIt->GetGeometry();
339  for( Element::GeometryType::iterator it = geom.begin(); it != geom.end(); it++)
340  {
341  mMeshNodes.push_back( *(it.base() ) );
342  }
343  return true;
344  }
345  else
346  return false;
347  KRATOS_CATCH("")
348  }
349 
350  bool AddCondition(const ModelPart::ConditionsContainerType::iterator pCondIt)
351  {
352  KRATOS_TRY
353  if( pCondIt->GetGeometry().GetGeometryType() == mGeometryType )
354  {
355  mMeshConditions.push_back( *(pCondIt.base() ) );
356  Geometry<Node >&geom = pCondIt->GetGeometry();
357  for( Condition::GeometryType::iterator it = geom.begin(); it != geom.end(); it++)
358  {
359  mMeshNodes.push_back( *(it.base() ) );
360  }
361  return true;
362  }
363  else
364  return false;
365  KRATOS_CATCH("")
366  }
367 
369  {
370  if( mMeshElements.size() != 0 )
371  {
372  mMeshNodes.Unique();
373  }
374  }
375 
376  void WriteMesh(GiD_FILE MeshFile, bool deformed)
377  {
378  KRATOS_TRY
379  if( mMeshElements.size() != 0 )
380  {
381  if( mMeshElements.begin()->GetGeometry().WorkingSpaceDimension() == 2 )
382  {
383  std::cout << "writing a 2D mesh" << std::endl;
384  GiD_fBeginMesh(MeshFile, "Volume mesh", GiD_2D, mGidElementType,
385  mMeshElements.begin()->GetGeometry().size() );
386  }
387  else if( mMeshElements.begin()->GetGeometry().WorkingSpaceDimension() == 3 )
388  {
389  std::cout << "writing a 3D mesh" << std::endl;
390  GiD_fBeginMesh(MeshFile, "Volume mesh", GiD_3D, mGidElementType,
391  mMeshElements.begin()->GetGeometry().size() );
392  }
393  else
394  KRATOS_THROW_ERROR(std::logic_error,"check working space dimension of model","");
395  //printing nodes
396  GiD_fBeginCoordinates(MeshFile);
397  for( ModelPart::NodesContainerType::iterator it = mMeshNodes.begin();
398  it != mMeshNodes.end(); ++it )
399  {
400  if( deformed )
401  GiD_fWriteCoordinates(MeshFile, (it)->Id(), (it)->X(),
402  (it)->Y(), (it)->Z());
403  else
404  GiD_fWriteCoordinates(MeshFile, (it)->Id(), (it)->X0(),
405  (it)->Y0(), (it)->Z0());
406  }
407  GiD_fEndCoordinates(MeshFile);
408  //printing elements
409  GiD_fBeginElements(MeshFile);
410  int* nodes_id = new int[mMeshElements.begin()->GetGeometry().size()+1];
411  for( ModelPart::ElementsContainerType::iterator it = mMeshElements.begin();
412  it != mMeshElements.end(); ++it )
413  {
414  for( unsigned int i=0; i<(it)->GetGeometry().size(); i++ )
415  nodes_id[i] = (it)->GetGeometry()[i].Id();
416 
417  //setting the color for either fluid or solid or contact element
418  int n_fl=0;
419  int n_str=0;
420  int n_interf=0;
421  int color=13;
422  for ( unsigned int i=0; i<(it)->GetGeometry().size(); i++ )
423  {
424  n_fl += int(it->GetGeometry()[i].FastGetSolutionStepValue(IS_FLUID));
425  n_str+= int(it->GetGeometry()[i].FastGetSolutionStepValue(IS_STRUCTURE));
426  n_interf+= int(it->GetGeometry()[i].FastGetSolutionStepValue(IS_INTERFACE));
427  }
428  if (n_fl==int((it)->GetGeometry().size()) && n_interf!=30)// && n_str!= (it)->GetGeometry().size() && n_interf!=30)
429  {
430  color=4;
431  }
432  if (n_str==int((it)->GetGeometry().size()))// && n_fl!=(it)->GetGeometry().size())
433  {
434  color=14;
435  }
436  if (n_interf==40)
437  {
438  color=5;
439  }
440 
441 
442  nodes_id[(it)->GetGeometry().size()]= color;
443 
444  GiD_fWriteElementMat(MeshFile, (it)->Id(), nodes_id);
445  }
446  delete [] nodes_id;
447  GiD_fEndElements(MeshFile);
448  GiD_fEndMesh(MeshFile);
449  }
450  if( mMeshConditions.size() != 0 )
451  {
452  KRATOS_WATCH( mMeshConditions.begin()->GetGeometry().WorkingSpaceDimension() )
453 
454  if( mMeshConditions.begin()->GetGeometry().WorkingSpaceDimension() == 3 )
455  {
456  std::cout << "writing a 3D mesh of the faces" << std::endl;
457  GiD_fBeginMesh(MeshFile, "Surface Structure Mesh", GiD_3D, GiD_Triangle, 3);
458  }
459  else
460  KRATOS_THROW_ERROR(std::logic_error,"Check your space dimensions","");
461  //printing nodes
462  GiD_fBeginCoordinates(MeshFile);
463 
464  GiD_fEndCoordinates(MeshFile);
465  //printing elements
466  GiD_fBeginElements(MeshFile);
467  //for every face of tetrahedron we create a list of its nodes
468  int* nodes_id = new int[4];
469 
470 
471  for( ModelPart::ConditionsContainerType::iterator it = mMeshConditions.begin();
472  it != mMeshConditions.end(); ++it )
473  {
474  for( unsigned int i=0; i<(it)->GetGeometry().size(); i++ )
475  nodes_id[i] = (it)->GetGeometry()[i].Id();
476 
477  int n_str=0;
478  int n_free_surf=0;
479 
480  for (unsigned int i=0; i<3; i++)
481  {
482  n_free_surf+=int((it)->GetGeometry()[i].FastGetSolutionStepValue(IS_FREE_SURFACE));
483  n_str+=int((it)->GetGeometry()[i].FastGetSolutionStepValue(IS_STRUCTURE));
484  }
485  if (n_str==int(it->GetGeometry().size()))// && n_free_surf!=it->GetGeometry().size())
486  {
487  nodes_id[3]=3;
488  GiD_fWriteElementMat(MeshFile, (it)->Id(), nodes_id);
489  }
490 
491  }
492  delete [] nodes_id;
493  GiD_fEndElements(MeshFile);
494  GiD_fEndMesh(MeshFile);
495  }
496  if( mMeshConditions.size() != 0 )
497  {
498  KRATOS_WATCH( mMeshConditions.begin()->GetGeometry().WorkingSpaceDimension() )
499  if( mMeshConditions.begin()->GetGeometry().WorkingSpaceDimension() == 3 )
500  {
501  std::cout << "writing a 3D mesh of the faces" << std::endl;
502  GiD_fBeginMesh(MeshFile, "Surface Fluid Mesh", GiD_3D, GiD_Triangle, 3);
503  }
504  else
505  KRATOS_THROW_ERROR(std::logic_error,"Check your space dimensions","");
506 
507  //now writing the fluid surface mesh
508  //printing nodes
509  GiD_fBeginCoordinates(MeshFile);
510 
511  GiD_fEndCoordinates(MeshFile);
512  //printing elements
513  GiD_fBeginElements(MeshFile);
514  //for every face of tetrahedron we create a list of its nodes
515  //int* nodes_id = new int[4];
516 
517 
518  int* nodes_id = new int[4];
519 
520 
521 
522  for( ModelPart::ConditionsContainerType::iterator it = mMeshConditions.begin();
523  it != mMeshConditions.end(); ++it )
524  {
525  for( unsigned int i=0; i<(it)->GetGeometry().size(); i++ )
526  nodes_id[i] = (it)->GetGeometry()[i].Id();
527  int n_fl=0;
528  int n_str=0;
529 
530  for (int i=0; i<3; i++)
531  {
532  n_str+=int((it)->GetGeometry()[i].FastGetSolutionStepValue(IS_STRUCTURE));
533  n_fl+=int((it)->GetGeometry()[i].FastGetSolutionStepValue(IS_FLUID));
534 
535  }
536  //if (n_free_surf==it->GetGeometry().size())
537  // nodes_id[3]=1;
538  if (n_fl==int(it->GetGeometry().size()))
539  {
540  //the color of water
541  nodes_id[3]=6;
542  GiD_fWriteElementMat(MeshFile, (it)->Id(), nodes_id);
543  }
544 
545  }
546  delete [] nodes_id;
547  GiD_fEndElements(MeshFile);
548  GiD_fEndMesh(MeshFile);
549  }
550 
551  KRATOS_CATCH("")
552  }
553 
554  void Reset()
555  {
556  mMeshNodes.clear();
557  mMeshElements.clear();
558  mMeshConditions.clear();
559  }
560 
562  {
563  return mMeshNodes;
564  }
565 
566 
567 private:
569  GeometryData::KratosGeometryType mGeometryType;
570  GiD_ElementType mGidElementType;
572  ModelPart::ElementsContainerType mMeshElements;
573  ModelPart::ConditionsContainerType mMeshConditions;
574  const char* mMeshTitle;
575 };//class PfemGidMeshContainer
576 
577 }// namespace Kratos.
578 
579 
580 #endif // KRATOS_PFEM_GID_IO_BASE_H_INCLUDED defined
KratosGeometryType
Definition: geometry_data.h:110
IntegrationMethod
Definition: geometry_data.h:76
KratosGeometryFamily
Definition: geometry_data.h:91
Geometry base class.
Definition: geometry.h:71
PointsArrayType::iterator iterator
PointsArrayType typedefs.
Definition: geometry.h:213
iterator begin()
Definition: geometry.h:465
iterator end()
Definition: geometry.h:473
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MeshType::ConditionsContainerType ConditionsContainerType
Condintions container. A vector set of Conditions with their Id's as key.
Definition: model_part.h:183
MeshType::ElementsContainerType ElementsContainerType
Element container. A vector set of Elements with their Id's as key.
Definition: model_part.h:168
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
int mSize
Definition: pfem_gid_io.h:306
void PrintResults(GiD_FILE ResultFile, Variable< Matrix > rVariable, ModelPart &r_model_part, double SolutionTag, unsigned int value_index=0)
Definition: pfem_gid_io.h:206
ModelPart::ConditionsContainerType mMeshConditions
Definition: pfem_gid_io.h:309
GiD_ElementType mGidElementFamily
Definition: pfem_gid_io.h:304
void PrintResults(GiD_FILE ResultFile, Variable< array_1d< double, 3 > > rVariable, ModelPart &r_model_part, double SolutionTag, int value_index=0)
Definition: pfem_gid_io.h:269
const char * mGPTitle
member variables
Definition: pfem_gid_io.h:311
KratosGeometryFamily mKratosElementFamily
member variables
Definition: pfem_gid_io.h:303
void Reset()
Definition: pfem_gid_io.h:303
char * mGPTitle
Definition: pfem_gid_io.h:307
bool AddCondition(const ModelPart::ConditionsContainerType::iterator pCondIt)
Definition: pfem_gid_io.h:107
void WriteGaussPoints()
Definition: pfem_gid_io.h:273
bool AddElement(const ModelPart::ElementsContainerType::iterator pElemIt)
Definition: pfem_gid_io.h:93
unsigned int mSize
Definition: pfem_gid_io.h:314
void PrintResults(GiD_FILE ResultFile, Variable< double > rVariable, ModelPart &r_model_part, double SolutionTag, unsigned int value_index=0)
Definition: pfem_gid_io.h:120
std::vector< int > mIndexContainer
Definition: pfem_gid_io.h:305
ModelPart::ElementsContainerType mMeshElements
Definition: pfem_gid_io.h:308
void PrintResults(GiD_FILE ResultFile, Variable< Vector > rVariable, ModelPart &r_model_part, double SolutionTag, unsigned int value_index=0)
Definition: pfem_gid_io.h:161
PfemGidGaussPointsContainer(const char *gp_title, KratosGeometryFamily geometryFamily, GiD_ElementType gid_element_type, unsigned int number_of_integration_points, std::vector< int > index_container)
Constructor.
Definition: pfem_gid_io.h:85
void WriteGaussPoints(GiD_FILE ResultFile)
Definition: pfem_gid_io.h:274
Definition: pfem_gid_io.h:317
void FinalizeMeshCreation()
Definition: pfem_gid_io.h:368
bool AddElement(const ModelPart::ElementsContainerType::iterator pElemIt)
Definition: pfem_gid_io.h:332
ModelPart::NodesContainerType GetMeshNodes()
Definition: pfem_gid_io.h:561
PfemGidMeshContainer(GeometryData::KratosGeometryType geometryType, GiD_ElementType elementType, const char *mesh_title)
Constructor.
Definition: pfem_gid_io.h:328
void Reset()
Definition: pfem_gid_io.h:554
bool AddCondition(const ModelPart::ConditionsContainerType::iterator pCondIt)
Definition: pfem_gid_io.h:350
void WriteMesh(GiD_FILE MeshFile, bool deformed)
Definition: pfem_gid_io.h:376
const std::string & Name() const
Definition: variable_data.h:201
#define KRATOS_THROW_ERROR(ExceptionType, ErrorMessage, MoreInfo)
Definition: define.h:77
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_WATCH(variable)
Definition: define.h:806
#define KRATOS_TRY
Definition: define.h:109
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
GeometryData::IntegrationMethod IntegrationMethodType
Definition: gid_gauss_point_container.h:44
ModelPart::ConditionsContainerType ConditionsArrayType
Definition: gid_gauss_point_container.h:43
ModelPart::NodesContainerType NodesArrayType
Definition: gid_gauss_point_container.h:42
ModelPart::ElementsContainerType ElementsArrayType
Definition: gid_gauss_point_container.h:41
REACTION_CHECK_STIFFNESS_FACTOR int
Definition: contact_structural_mechanics_application_variables.h:75
GeometryData::KratosGeometryFamily KratosGeometryFamily
Definition: gid_gauss_point_container.h:45
color
Definition: all_t_win_vs_m_fixed_error.py:230
integer i
Definition: TensorModule.f:17