To store and treat finite element geometric information. More...
#include <Domain.h>
Public Member Functions | |
Domain () | |
Constructor of a null domain. More... | |
Domain (const string &file) | |
Constructor with an input file. More... | |
~Domain () | |
Destructor. | |
void | setFile (string file) |
Set file containing Domain data. | |
void | setDim (size_t d) |
Set space dimension. | |
size_t | getDim () const |
Return space dimension. | |
void | setNbDOF (size_t n) |
Set number of degrees of freedom. | |
size_t | getNbDOF () const |
Return number of degrees of freedom. | |
size_t | getNbVertices () const |
Return number of vertices. | |
size_t | getNbLines () const |
Return number of lines. | |
size_t | getNbContours () const |
Return number of contours. | |
size_t | getNbHoles () const |
Return number of holes. | |
size_t | getNbSubDomains () const |
Return number of sub-domains. | |
int | get () |
Read domain data interactively. | |
void | get (const string &file) |
Read domain data from a data file. More... | |
Mesh & | getMesh () const |
Return reference to generated Mesh instance. | |
void | genGeo (string file) |
Generate geometry file. | |
void | genMesh () |
Generate 2-D mesh. | |
void | genMesh (const string &file) |
Generate 2-D mesh and save in file (OFELI format) More... | |
void | genMesh (string geo_file, string bamg_file, string mesh_file) |
Generate 2-D mesh and save geo, bamg and mesh file (OFELI format) More... | |
void | generateMesh () |
Generate 2-D mesh using the BAMG mesh generator. | |
Domain & | operator*= (real_t a) |
Operator *= More... | |
void | insertVertex (real_t x, real_t y, real_t h, int code) |
Insert a vertex. More... | |
void | insertVertex (real_t x, real_t y, real_t z, real_t h, int code) |
Insert a vertex (3-D case) More... | |
void | insertLine (size_t n1, size_t n2, int c) |
Insert a straight line. More... | |
void | insertLine (size_t n1, size_t n2, int dc, int nc) |
Insert a straight line. More... | |
void | insertCircle (size_t n1, size_t n2, size_t n3, int c) |
Insert a circluar arc. More... | |
void | insertCircle (size_t n1, size_t n2, size_t n3, int dc, int nc) |
Insert a circluar arc. More... | |
void | insertRequiredVertex (size_t v) |
Insert a required (imposed) vertex. More... | |
void | insertRequiredEdge (size_t e) |
Insert a required (imposed) edge (or line) More... | |
void | insertSubDomain (size_t n, int code) |
Insert subdomain. More... | |
void | insertSubDomain (size_t ln, int orient, int code) |
Insert subdomain. More... | |
void | setNbDOF (int nb_dof) |
Set Number of degrees of freedom per node. | |
Point< real_t > | getMinCoord () const |
Return minimum coordinates of vertices. | |
Point< real_t > | getMaxCoord () const |
Return maximum coordinates of vertices. | |
real_t | getMinh () const |
Return minimal value of mesh size. | |
void | setOutputFile (string file) |
Define output mesh file. More... | |
Detailed Description
To store and treat finite element geometric information.
This class is essentially useful to construct data for mesh generators.
- Copyright
- GNU Lesser Public License
Constructor & Destructor Documentation
◆ Domain() [1/2]
Domain | ( | ) |
Constructor of a null domain.
This constructor assigns maximal values of parameters.
◆ Domain() [2/2]
Domain | ( | const string & | file | ) |
Constructor with an input file.
- Parameters
-
[in] file Input file in the XML format defining the domain
Member Function Documentation
◆ genMesh() [1/2]
void genMesh | ( | const string & | file | ) |
Generate 2-D mesh and save in file (OFELI format)
- Parameters
-
[in] file File where the generated mesh is saved
◆ genMesh() [2/2]
void genMesh | ( | string | geo_file, |
string | bamg_file, | ||
string | mesh_file | ||
) |
Generate 2-D mesh and save geo, bamg and mesh file (OFELI format)
- Parameters
-
[in] geo_file Geo file [in] bamg_file Bamg file [in] mesh_file File where the generated mesh is saved
◆ get()
void get | ( | const string & | file | ) |
Read domain data from a data file.
- Parameters
-
[in] file Input file in Domain XML format
◆ insertCircle() [1/2]
void insertCircle | ( | size_t | n1, |
size_t | n2, | ||
size_t | n3, | ||
int | c | ||
) |
Insert a circluar arc.
- Parameters
-
[in] n1 Label of vertex defining the first end of the arc [in] n2 Label of vertex defining the second end of the arc [in] n3 Label of vertex defining the center of the arc [in] c Code to associate to created nodes (Dirichlet) or sides (Neumann) if < 0
◆ insertCircle() [2/2]
void insertCircle | ( | size_t | n1, |
size_t | n2, | ||
size_t | n3, | ||
int | dc, | ||
int | nc | ||
) |
Insert a circluar arc.
- Parameters
-
[in] n1 Label of vertex defining the first end of the arc [in] n2 Label of vertex defining the second end of the arc [in] n3 Label of vertex defining the center of the arc [in] dc Code to associate to created nodes (Dirichlet) [in] nc Code to associate to created sides (Neumann)
◆ insertLine() [1/2]
void insertLine | ( | size_t | n1, |
size_t | n2, | ||
int | c | ||
) |
Insert a straight line.
- Parameters
-
[in] n1 Label of the first vertex of line [in] n2 Label of the second vertex of line [in] c Code to associate to created nodes (Dirichlet) or sides (Neumann) if < 0
◆ insertLine() [2/2]
void insertLine | ( | size_t | n1, |
size_t | n2, | ||
int | dc, | ||
int | nc | ||
) |
Insert a straight line.
- Parameters
-
[in] n1 Label of the first vertex of line [in] n2 Label of the second vertex of line [in] dc Code to associate to created nodes (Dirichlet) [in] nc Code to associate to created sides (Neumann)
◆ insertRequiredEdge()
void insertRequiredEdge | ( | size_t | e | ) |
Insert a required (imposed) edge (or line)
- Parameters
-
[in] e Label of line
◆ insertRequiredVertex()
void insertRequiredVertex | ( | size_t | v | ) |
Insert a required (imposed) vertex.
- Parameters
-
[in] v Label of vertex
◆ insertSubDomain() [1/2]
void insertSubDomain | ( | size_t | ln, |
int | orient, | ||
int | code | ||
) |
Insert subdomain.
- Parameters
-
[in] ln Line label [in] orient Orientation (1 or -1) [in] code Subdomain code or reference
◆ insertSubDomain() [2/2]
void insertSubDomain | ( | size_t | n, |
int | code | ||
) |
Insert subdomain.
- Parameters
-
[in] n [in] code
◆ insertVertex() [1/2]
Insert a vertex.
- Parameters
-
[in] x x-coordinate of vertex [in] y y-coordinate of vertex [in] h mesh size around vertex [in] code code of coordinate
◆ insertVertex() [2/2]
Insert a vertex (3-D case)
- Parameters
-
[in] x x-coordinate of vertex [in] y y-coordinate of vertex [in] z z-coordinate of vertex [in] h mesh size around vertex [in] code code of coordinate
◆ operator*=()
Operator *=
Rescale domain coordinates by myltiplying by a factor
- Parameters
-
[in] a Value to multiply by
◆ setOutputFile()
void setOutputFile | ( | string | file | ) |
Define output mesh file.
- Parameters
-
[in] file String defining output mesh file