OFELI's Logo

An Object Oriented Finite Element Library

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...
 
MeshgetMesh () 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.
 
Domainoperator*= (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_tgetMinCoord () const
 Return minimum coordinates of vertices.
 
Point< real_tgetMaxCoord () 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.

Author
Rachid Touzani

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]fileInput 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]fileFile 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_fileGeo file
[in]bamg_fileBamg file
[in]mesh_fileFile where the generated mesh is saved

◆ get()

void get ( const string &  file)

Read domain data from a data file.

Parameters
[in]fileInput 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]n1Label of vertex defining the first end of the arc
[in]n2Label of vertex defining the second end of the arc
[in]n3Label of vertex defining the center of the arc
[in]cCode 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]n1Label of vertex defining the first end of the arc
[in]n2Label of vertex defining the second end of the arc
[in]n3Label of vertex defining the center of the arc
[in]dcCode to associate to created nodes (Dirichlet)
[in]ncCode 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]n1Label of the first vertex of line
[in]n2Label of the second vertex of line
[in]cCode 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]n1Label of the first vertex of line
[in]n2Label of the second vertex of line
[in]dcCode to associate to created nodes (Dirichlet)
[in]ncCode to associate to created sides (Neumann)

◆ insertRequiredEdge()

void insertRequiredEdge ( size_t  e)

Insert a required (imposed) edge (or line)

Parameters
[in]eLabel of line

◆ insertRequiredVertex()

void insertRequiredVertex ( size_t  v)

Insert a required (imposed) vertex.

Parameters
[in]vLabel of vertex

◆ insertSubDomain() [1/2]

void insertSubDomain ( size_t  ln,
int  orient,
int  code 
)

Insert subdomain.

Parameters
[in]lnLine label
[in]orientOrientation (1 or -1)
[in]codeSubdomain code or reference

◆ insertSubDomain() [2/2]

void insertSubDomain ( size_t  n,
int  code 
)

Insert subdomain.

Parameters
[in]n
[in]code

◆ insertVertex() [1/2]

void insertVertex ( real_t  x,
real_t  y,
real_t  h,
int  code 
)

Insert a vertex.

Parameters
[in]xx-coordinate of vertex
[in]yy-coordinate of vertex
[in]hmesh size around vertex
[in]codecode of coordinate

◆ insertVertex() [2/2]

void insertVertex ( real_t  x,
real_t  y,
real_t  z,
real_t  h,
int  code 
)

Insert a vertex (3-D case)

Parameters
[in]xx-coordinate of vertex
[in]yy-coordinate of vertex
[in]zz-coordinate of vertex
[in]hmesh size around vertex
[in]codecode of coordinate

◆ operator*=()

Domain & operator*= ( real_t  a)

Operator *=

Rescale domain coordinates by myltiplying by a factor

Parameters
[in]aValue to multiply by

◆ setOutputFile()

void setOutputFile ( string  file)

Define output mesh file.

Parameters
[in]fileString defining output mesh file





Copyright © 1998-2022 Rachid Touzani