Feel++
0.91.4
|
#include <gmsh.hpp>
Classes | |
struct | Factory |
Public Types | |
enum | DomainType { GMSH_REFERENCE_DOMAIN = 0, GMSH_REAL_DOMAIN } |
Public Member Functions | |
Constructors, destructor | |
Gmsh (int nDim=1, int nOrder=GMSH_ORDER_ONE) | |
Gmsh (Gmsh const &__g) | |
virtual | ~Gmsh () |
Accessors | |
int | dimension () const |
GMSH_ORDER | order () const |
std::string | version () const |
std::string | prefix () const |
std::vector< std::pair< double, double > > const & | boundingBox () const |
double | xmin () const |
double | xmax () const |
double | ymin () const |
double | ymax () const |
double | zmin () const |
double | zmax () const |
double const & | h () const |
std::string | description () const |
bool | addMidPoint () const |
bool | usePhysicalNames () const |
WorldComm const & | worldComm () const |
int | numberOfPartitions () const |
bool | mshFileByPartition () const |
GMSH_PARTITIONER | partitioner () const |
double | shear () const |
get the shear | |
bool | recombine () const |
return true if recombine, false otherwise | |
Mutators | |
Gmsh & | setDimension (int dim) |
Gmsh & | ref () |
Gmsh & | h (double _h) |
void | setOrder (int o) |
void | setVersion (std::string version) |
void | setDescription (std::string const &desc) |
void | setPrefix (std::string const &name) |
virtual void | setX (std::pair< double, double > const &x) |
virtual void | setY (std::pair< double, double > const &y) |
virtual void | setZ (std::pair< double, double > const &z) |
virtual void | setReferenceDomain () |
the gmsh generator to generate a reference domain | |
virtual void | setCharacteristicLength (double _h) |
set the characteristic length to h | |
void | setAddMidPoint (bool add) |
void | usePhysicalNames (bool option) |
void | setWorldComm (WorldComm const &_worldcomm) |
set the communicator | |
void | setNumberOfPartitions (int n) |
set the number of partitions | |
void | setMshFileByPartition (bool p) |
set save msh file by partitions | |
void | setPartitioner (GMSH_PARTITIONER const &p) |
set the partitioner | |
void | setShear (double _shear) |
shear the domain | |
void | setRecombine (bool _recombine) |
recombine simplices into quads | |
Methods | |
std::string | generate (std::string const &name) const |
std::string | generate (std::string const &name, std::string const &geo, bool const forceRebuild=false, bool const parametric=false, bool const modifGeo=true) const |
std::string | refine (std::string const &name, int level=1, bool const parametric=false) const |
std::string | preamble () const |
std::string | getDescriptionFromFile (std::string const &file) const |
Protected Member Functions | |
virtual std::string | getDescription () const |
bool | generateGeo (std::string const &name, std::string const &geo, bool const modifGeo=true) const |
Protected Attributes | |
WorldComm | M_worldComm |
communicator | |
int | M_dimension |
mesh dimension | |
int | M_order |
mesh order | |
std::string | M_version |
std::string | M_name |
std::string | M_desc |
std::vector< std::pair< double, double > > | M_I |
bounding box | |
double | M_h |
characteristic length | |
bool | M_addmidpoint |
mid point | |
bool | M_usePhysicalNames |
add physical names to msh files | |
GMSH_PARTITIONER | M_partitioner |
partitioner type | |
int | M_partitions |
number of partitions | |
bool | M_partition_file |
save msh file by partition | |
double | M_shear |
shear | |
bool | M_recombine |
recombine simplices into hypercubes |
Operator overloads | |
Gmsh & | operator= (Gmsh const &__g) |
static boost::shared_ptr< Gmsh > | New (po::variables_map const &vm) |
static boost::shared_ptr< Gmsh > | New (std::string const &shape, uint16_type d=2, uint16_type o=1, std::string const &ct="simplex") |
Additional Inherited Members |
Gmsh Mesh Generator.
The Gmsh
class helps with the generation of meshes using the program gmsh
. Typically one would generate a .geo std::string for example and pass it to
generate()
along with the prefix name
of the .geo and
.msh files to create/generate.
|
inline |
add the mid point of the domain
References M_addmidpoint.
|
inline |
References M_I.
|
inline |
References getDescription().
|
inline |
std::string Feel::Gmsh::generate | ( | std::string const & | name | ) | const |
generate a Gmsh msh file from name
std::string Feel::Gmsh::generate | ( | std::string const & | name, |
std::string const & | geo, | ||
bool const | forceRebuild = false , |
||
bool const | parametric = false , |
||
bool const | modifGeo = true |
||
) | const |
name | filename prefix to create the geo and msh file from geo |
geo | gmsh geometry description |
forceRebuild | if true, rebuild the mesh even if geofile is unchanged if false, rebuild only if geo file has changed. Useful if generateGeo has been called outside or if gmsh lybrary has changed. |
gmsh
(with the
.msh extension)
|
protected |
name | filename prefix to create the geo |
geo | gmsh geometry description |
|
inlineprotectedvirtual |
sublass must provide the geo description
Reimplemented in Feel::GmshEllipsoidDomain.
Referenced by description().
std::string Feel::Gmsh::getDescriptionFromFile | ( | std::string const & | file | ) | const |
file
in a std::string
|
inline |
References M_h.
|
inline |
set the characteristic length
h | the characteristic length |
References setCharacteristicLength().
|
inline |
References M_partition_file.
|
inline |
References M_partitions.
assignment operator
__g | another Gmsh object instance |
References M_addmidpoint, M_dimension, M_order, M_shear, and M_usePhysicalNames.
|
inline |
get the order of the elements of the mesh
References M_order.
|
inline |
References M_partitioner.
std::string Feel::Gmsh::preamble | ( | ) | const |
|
inline |
|
inline |
the gmsh generator to generate a reference domain
References setReferenceDomain().
std::string Feel::Gmsh::refine | ( | std::string const & | name, |
int | level = 1 , |
||
bool const | parametric = false |
||
) | const |
refine the mesh uniformly by splitting
name | name of the gmsh mesh file |
level | the number of refinements |
Referenced by Feel::BOOST_PARAMETER_FUNCTION().
|
inline |
if add is true, set M_addmidpoint to true, false otherwise
References M_addmidpoint.
|
inline |
set the description of the geometry
|
inline |
set the dimension
References M_dimension.
|
inline |
set the order of the elements of the mesh it can be either GMSH_ORDER_ONE (order 1/linear) or GMSH_ORDER_TWO(order 2/quadratic)
o | order of the elements |
References M_order.
|
inline |
set the prefix of the Gmsh files
|
inline |
set the file format version
References version().
|
inline |
References M_usePhysicalNames.
|
inline |
Set the use of physical names to describe the boundaries of the domain: if option
is set to true then the generator will generate a PhysicalNames Section and replace numerical id by strings for the Physical boundaries
References M_usePhysicalNames.
|
inline |
Referenced by setVersion().
|
inline |
References M_worldComm.