|
dune-grid 2.10
|
Loading...
Searching...
No Matches
gmshreader.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
79 GmshReaderQuadraticBoundarySegment ( const GlobalVector &p0_, const GlobalVector &p1_, const GlobalVector &p2_)
178 GmshReaderQuadraticBoundarySegment (Dune::FieldVector<double,3> p0_, Dune::FieldVector<double,3> p1_,
278 return local[0]*(gamma*local[0]-(sqrt2-gamma-sqrt2*alpha)*local[1]-alpha*gamma)/(gamma*(1-alpha));
290 return local[1]*(beta*(1-gamma/sqrt2)-local[0]*(beta-gamma/sqrt2)-local[1]*(1-gamma/sqrt2))/((1-gamma/sqrt2)*(beta-1));
407 if( (version_number < 2.0) || (version_number >= 2.20001) ) // 2.2 is not representable as float and leads to problems on i386
420 if (verbose) std::cout << "file contains " << number_of_names << " physical entities" << std::endl;
504 if (verbose) std::cout << "number of boundary elements = " << boundary_element_count << std::endl;
620 = (BoundarySegment<dim,dimWorld>*) new GmshReaderQuadraticBoundarySegment< 3, 3 >( v[0], v[1], v[2],
645 && (elementDim[elm_type] == dim || elementDim[elm_type] == (dim-1) ) ) ) // real element or boundary element?
752 = (BoundarySegment<dim,dimWorld>*) new GmshReaderQuadraticBoundarySegment< 2, dimWorld >(v[0], v[1], v[2]);
762 DUNE_THROW(Dune::IOError, "GmshReader does not support using element-type " << elm_type << " for boundary segments");
937 static std::unique_ptr<Grid> read (const std::string& fileName, bool verbose = true, bool insertBoundarySegments=true)
1183 << "Please enable reading element data by passing the option 'Gmsh::ReaderOpts::readElementData' "
1200 << "Please enable reading boundary data by passing the option 'Gmsh::ReaderOpts::readBoundaryData' "
1212 void readGridFile (const std::string& fileName, GridFactory<Grid>& factory, Gmsh::ReaderOptions options)
Dune::ParameterTree options
Base class for grid boundary segments of arbitrary geometry.
iterator end()
iterator begin()
static std::string formatString(const std::string &s, const T &... args)
DiagonalRowVectorConst * operator&()
virtual void operator()()=0
#define DUNE_THROW(E, m)
LocalIndex & local()
ReaderOptions
Option for the Gmsh mesh file reader.
Definition gmshreader.hh:791
@ verbose
@ readBoundaryData
@ readElementData
@ insertBoundarySegments
constexpr ReaderOptions operator|(ReaderOptions a, ReaderOptions b)
composition operator for reader options
Definition gmshreader.hh:799
Include standard header files.
FieldTraits< value_type >::real_type two_norm() const
derived_type & axpy(const field_type &a, const DenseVector< Other > &x)
int rank() const
int barrier() const
Base class for classes implementing geometries of boundary segments.
Definition boundarysegment.hh:94
Communication comm() const
Return the Communication used by the grid factory.
Definition common/gridfactory.hh:258
Provide a generic factory class for unstructured grids.
Definition common/gridfactory.hh:275
virtual std::unique_ptr< GridType > createGrid()
Finalize grid creation and hand over the grid.
Definition common/gridfactory.hh:333
@ secondOrder
quadratic boundary approximation.
Definition gmshreader.hh:44
std::vector< std::string > & physicalEntityNames()
Returns the names of the gmsh physical entities (0-based index)
Definition gmshreader.hh:373
void pass1HandleElement(FILE *file, const int elm_type, std::map< int, unsigned int > &renumber, const std::vector< GlobalVector > &nodes)
Process one element during the first pass through the list of all elements.
Definition gmshreader.hh:545
std::vector< int > & boundaryIdMap()
Definition gmshreader.hh:361
void readfile(FILE *file, int cnt, const char *format,...)
Definition gmshreader.hh:331
std::vector< int > & elementIndexMap()
Returns a map for the gmsh physical entity id (1-based index) for each entity of codim 0.
Definition gmshreader.hh:367
unsigned int number_of_real_vertices
Definition gmshreader.hh:308
void boundarysegment_insert(const std::vector< FieldVector< double, 3 > > &nodes, const E &elementDofs, const V &vertices)
Definition gmshreader.hh:608
GmshReaderParser(Dune::GridFactory< GridType > &_factory, bool v, bool i)
Definition gmshreader.hh:358
std::vector< int > element_index_to_physical_entity
Definition gmshreader.hh:316
virtual void pass2HandleElement(FILE *file, const int elm_type, std::map< int, unsigned int > &renumber, const std::vector< GlobalVector > &nodes, const int physical_entity)
Process one element during the second pass through the list of all elements.
Definition gmshreader.hh:633
FieldVector< double, dimWorld > GlobalVector
Definition gmshreader.hh:325
std::vector< std::string > physical_entity_names
Definition gmshreader.hh:317
int boundary_element_count
Definition gmshreader.hh:309
void boundarysegment_insert(const V &, const E &, const V2 &)
Definition gmshreader.hh:597
std::vector< int > boundary_id_to_physical_entity
Definition gmshreader.hh:315
bool insert_boundary_segments
Definition gmshreader.hh:307
static std::unique_ptr< Grid > read(const std::string &fileName, std::vector< int > &boundarySegmentToPhysicalEntity, std::vector< int > &elementToPhysicalEntity, bool verbose=true, bool insertBoundarySegments=true)
Read Gmsh file, possibly with data.
Definition gmshreader.hh:966
const std::vector< int > & elementData() const
Access element data (maps element index to Gmsh physical entity)
Definition gmshreader.hh:1118
static void read(Dune::GridFactory< Grid > &factory, const std::string &fileName, DataFlagArg boundarySegmentData, DataArg elementData, bool verbose=true)
read Gmsh file, possibly with data
Definition gmshreader.hh:1016
static std::unique_ptr< Grid > read(const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
Definition gmshreader.hh:937
static void read(Dune::GridFactory< Grid > &factory, const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
Definition gmshreader.hh:983
std::unique_ptr< Grid > createGrid()
Create the grid.
Definition gmshreader.hh:1162
std::vector< int > extractBoundaryData()
Erase boundary data from reader and return the data.
Definition gmshreader.hh:1154
static void read(Dune::GridFactory< Grid > &factory, const std::string &fileName, std::vector< int > &boundarySegmentToPhysicalEntity, std::vector< int > &elementToPhysicalEntity, bool verbose, bool insertBoundarySegments)
Read Gmsh file, possibly with data.
Definition gmshreader.hh:1053
bool hasElementData() const
If element data is available.
Definition gmshreader.hh:1135
bool hasBoundaryData() const
If boundary data is available.
Definition gmshreader.hh:1142
GmshReader(const std::string &fileName, GridFactory< Grid > &factory, Gmsh::ReaderOptions options=defaultOpts)
Construct a Gmsh reader object from a file name and a grid factory.
Definition gmshreader.hh:1111
GmshReader(const std::string &fileName, Gmsh::ReaderOptions options=defaultOpts)
Construct a Gmsh reader object (alternatively use one of the static member functions)
Definition gmshreader.hh:1097
std::vector< int > extractElementData()
Erase element data from reader and return the data.
Definition gmshreader.hh:1146
const std::vector< int > & boundaryData() const
Access boundary data (maps boundary segment index to Gmsh physical entity)
Definition gmshreader.hh:1125
Provide a generic factory class for unstructured grids.
T assign(T... args)
T beta(T... args)
T c_str(T... args)
T clear(T... args)
T endl(T... args)
T fgetc(T... args)
T find_first_of(T... args)
T find_last_of(T... args)
T resize(T... args)
T sqrt(T... args)
T substr(T... args)
T swap(T... args)
T vfscanf(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8