BEM++
2.0
|
Grid factory. More...
#include </home/wojtek/Projects/BEM/bempp-sven/bempp/lib/grid/grid_factory.hpp>
Static Public Member Functions | |
static shared_ptr< Grid > | createStructuredGrid (const GridParameters ¶ms, const arma::Col< double > &lowerLeft, const arma::Col< double > &upperRight, const arma::Col< unsigned int > &nElements) |
Construct a regular structured grid. More... | |
static shared_ptr< Grid > | importGmshGrid (const GridParameters ¶ms, const std::string &fileName, bool verbose=false, bool insertBoundarySegments=false) |
Import grid from a file in Gmsh format. More... | |
static shared_ptr< Grid > | importGmshGrid (const GridParameters ¶ms, const std::string &fileName, std::vector< int > &boundaryId2PhysicalEntity, std::vector< int > &elementIndex2PhysicalEntity, bool verbose=true, bool insertBoundarySegments=false) |
Import grid from a file in Gmsh format. More... | |
static shared_ptr< Grid > | createGridFromConnectivityArrays (const GridParameters ¶ms, const arma::Mat< double > &vertices, const arma::Mat< int > &elementCorners, const std::vector< int > &domainIndices=std::vector< int >()) |
Create a grid from connectivity arrays. More... | |
Grid factory.
This class provides static member functions to construct grids on the fly and to import grids from existing files.
|
static |
Create a grid from connectivity arrays.
[in] | params | Parameters of the grid to be constructed. |
[in] | vertices | 2D array whose (i, j)th element contains the ith component of the jth vertex. |
[in] | elementCorners | 2D array whose (i, j)th element contains the index of the ith vertex of the jth element. |
[in] | domainIndices | (Optional) Vector whose ith element contains the domain index of the ith element. By default, this argument is set to an empty vector, in which case all elements are taken to belong to domain 0. |
References Bempp::toString(), and Bempp::GridParameters::TRIANGULAR.
|
static |
Construct a regular structured grid.
[in] | params | Parameters of the grid to be constructed. |
[in] | lowerLeft | Coordinates of the lower left corner of the grid. |
[in] | upperRight | Coordinates of the upper right corner of the grid. |
[in] | nElements | Number of grid subdivisions in each direction. |
This function constructs a regular structured grid. Its dimension, dimGrid
, and the dimension of the surrounding space, dimWorld
, are determined from the parameter params
. The constructed grid covers the dimGrid-dimensional
cube
[lowerLeft(0) upperRight(0)] x [lowerLeft(1) upperRight(1)] x ... x [lowerLeft(dimGrid-1), upperRight(dimGrid-1)].
The last dimWorld
- dimGrid
dimensions of all grid points are set to zero.
Each side of the cube parallel to the nth coordinate axis is subdivided into nElements(n) segments.
References Dune::BemppStructuredGridFactory< GridType >::createSimplexGrid(), and Bempp::GridParameters::TRIANGULAR.
|
static |
Import grid from a file in Gmsh format.
[in] | params | Parameters of the grid to be constructed. |
[in] | fileName | Name of the Gmsh file. |
[in] | verbose | Output diagnostic information. |
[in] | insertBoundarySegments |
References Bempp::GridParameters::TETRAHEDRAL, and Bempp::GridParameters::TRIANGULAR.
|
static |
Import grid from a file in Gmsh format.
[in] | params | Parameters of the grid to be constructed. |
[in] | fileName | Name of the Gmsh file. |
[in] | boundaryId2PhysicalEntity | |
[in] | elementIndex2PhysicalEntity | |
[in] | verbose | Output diagnostic information. |
[in] | insertBoundarySegments |
References Bempp::GridParameters::TETRAHEDRAL, and Bempp::GridParameters::TRIANGULAR.