NiHu  2.0
lib_mesh.hpp File Reference

Utility functions for basic mesh generation. More...

#include "../core/mesh.hpp"
#include "lib_element.hpp"
Include dependency graph for lib_mesh.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  NiHu::orientation { NiHu::inward, NiHu::outward }
 Orientation of surface meshes. More...
 

Functions

template<class ElemTag = NiHu::line_1_tag>
NiHu::mesh< tmp::vector< typename NiHu::tag2type< ElemTag >::type > > NiHu::create_circle_mesh (double r, size_t nElem, orientation ori=outward, ElemTag tag=ElemTag())
 Create a homogeneous circular boundary mesh. More...
 
template<class ElemTag = NiHu::line_1_tag>
NiHu::mesh< tmp::vector< typename NiHu::tag2type< ElemTag >::type > > NiHu::create_rectangle_mesh (double Lx, double Ly, size_t nx, size_t ny, orientation ori=outward, ElemTag tag=ElemTag())
 Create a homogeneous rectangular boundary mesh. More...
 

Detailed Description

Utility functions for basic mesh generation.

Definition in file lib_mesh.hpp.

Enumeration Type Documentation

◆ orientation

Orientation of surface meshes.

Enumerator
inward 

The mesh is directed inward.

outward 

The mesh is directed outward.

Definition at line 14 of file lib_mesh.hpp.

Function Documentation

◆ create_circle_mesh()

template<class ElemTag = NiHu::line_1_tag>
NiHu::mesh<tmp::vector<typename NiHu::tag2type<ElemTag>::type > > NiHu::create_circle_mesh ( double  r,
size_t  nElem,
orientation  ori = outward,
ElemTag  tag = ElemTag() 
)

Create a homogeneous circular boundary mesh.

Template Parameters
ElemTagThe tag type of the consisting elements
Parameters
[in]rThe circle's radius
[in]nElemThe number of elements
[in]oriThe mesh orientation
[in]tagThe element type tag
Returns
A homogeneous circular surface mesh

Definition at line 32 of file lib_mesh.hpp.

◆ create_rectangle_mesh()

template<class ElemTag = NiHu::line_1_tag>
NiHu::mesh<tmp::vector<typename NiHu::tag2type<ElemTag>::type > > NiHu::create_rectangle_mesh ( double  Lx,
double  Ly,
size_t  nx,
size_t  ny,
orientation  ori = outward,
ElemTag  tag = ElemTag() 
)

Create a homogeneous rectangular boundary mesh.

Template Parameters
ElemTagThe tag type of the consisting elements
Parameters
[in]LxThe rectangle's length in x direction
[in]LyThe rectangle's length in y direction
[in]nxThe number of elements in x direction
[in]nyThe number of elements in y direction
[in]oriThe mesh orientation
[in]tagThe element type tag
Returns
A homogeneous rectabgular surface mesh

Definition at line 82 of file lib_mesh.hpp.