Refine a Regular mesh: subdivide elements in several smaller elements.
More...
#include <include/GooseFEM/MeshQuad4.h>
|
| RefineRegular (const GooseFEM::Mesh::Quad4::Regular &mesh, size_t nx, size_t ny) |
| Constructor. More...
|
|
size_t | nx () const |
| For each coarse element: number of fine elements in x-direction. More...
|
|
size_t | ny () const |
| For each coarse element: number of fine elements in y-direction. More...
|
|
GooseFEM::Mesh::Quad4::Regular | coarseMesh () const |
| Obtain the coarse mesh (copy of the mesh passed to the constructor). More...
|
|
GooseFEM::Mesh::Quad4::Regular | fineMesh () const |
| Obtain the fine mesh. More...
|
|
const array_type::tensor< size_t, 2 > & | map () const |
| Get element-mapping: elements of the fine mesh per element of the coarse mesh. More...
|
|
GooseFEM::Mesh::Quad4::Regular | getCoarseMesh () const |
| Obtain the coarse mesh (copy of the mesh passed to the constructor). More...
|
|
GooseFEM::Mesh::Quad4::Regular | getFineMesh () const |
| Obtain the fine mesh. More...
|
|
const array_type::tensor< size_t, 2 > & | getMap () const |
| Get element-mapping: elements of the fine mesh per element of the coarse mesh. More...
|
|
template<class T , size_t rank> |
array_type::tensor< T, rank > | meanToCoarse (const array_type::tensor< T, rank > &data) const |
| Compute the mean of the quantity define on the fine mesh when mapped on the coarse mesh. More...
|
|
template<class T , size_t rank, class S > |
array_type::tensor< T, rank > | averageToCoarse (const array_type::tensor< T, rank > &data, const array_type::tensor< S, rank > &weights) const |
| Compute the average of the quantity define on the fine mesh when mapped on the coarse mesh. More...
|
|
template<class T , size_t rank> |
array_type::tensor< T, rank > | mapToFine (const array_type::tensor< T, rank > &data) const |
| Map element quantities to the fine mesh. More...
|
|
Refine a Regular mesh: subdivide elements in several smaller elements.
Definition at line 1143 of file MeshQuad4.h.
◆ RefineRegular()
Constructor.
- Parameters
-
mesh | the coarse mesh. |
nx | for each coarse element: number of fine elements in x-direction. |
ny | for each coarse element: number of fine elements in y-direction. |
Definition at line 1154 of file MeshQuad4.h.
◆ averageToCoarse()
template<class T , size_t rank, class S >
Compute the average of the quantity define on the fine mesh when mapped on the coarse mesh.
- Template Parameters
-
T | type of the data (e.g. double ). |
rank | rank of the data. |
S | type of the weights (e.g. double ). |
- Parameters
-
data | the data [nelem_fine, ...] |
weights | the weights [nelem_fine, ...] |
- Returns
- the average data of the coarse mesh [nelem_coarse, ...]
Definition at line 1285 of file MeshQuad4.h.
◆ coarseMesh()
Obtain the coarse mesh (copy of the mesh passed to the constructor).
- Returns
- mesh
Definition at line 1196 of file MeshQuad4.h.
◆ fineMesh()
Obtain the fine mesh.
- Returns
- mesh
Definition at line 1205 of file MeshQuad4.h.
◆ getCoarseMesh()
Obtain the coarse mesh (copy of the mesh passed to the constructor).
- Returns
- mesh
Definition at line 1223 of file MeshQuad4.h.
◆ getFineMesh()
Obtain the fine mesh.
- Returns
- mesh
Definition at line 1232 of file MeshQuad4.h.
◆ getMap()
const array_type::tensor< size_t, 2 > & GooseFEM::Mesh::Quad4::Map::RefineRegular::getMap |
( |
| ) |
const |
|
inline |
Get element-mapping: elements of the fine mesh per element of the coarse mesh.
- Returns
- [nelem_coarse, nx() * ny()]
Definition at line 1241 of file MeshQuad4.h.
◆ map()
const array_type::tensor< size_t, 2 > & GooseFEM::Mesh::Quad4::Map::RefineRegular::map |
( |
| ) |
const |
|
inline |
Get element-mapping: elements of the fine mesh per element of the coarse mesh.
- Returns
- [nelem_coarse, nx() * ny()]
Definition at line 1214 of file MeshQuad4.h.
◆ mapToFine()
template<class T , size_t rank>
Map element quantities to the fine mesh.
The mapping is a bit simplistic: no interpolation is involved. The mapping is such that::
ret[e_fine, ...] <- data[e_coarse, ...]
- Template Parameters
-
T | type of the data (e.g. double ). |
rank | rank of the data. |
- Parameters
-
- Returns
- mapped data.
Definition at line 1320 of file MeshQuad4.h.
◆ meanToCoarse()
template<class T , size_t rank>
Compute the mean of the quantity define on the fine mesh when mapped on the coarse mesh.
- Template Parameters
-
T | type of the data (e.g. double ). |
rank | rank of the data. |
- Parameters
-
data | the data [nelem_fine, ...] |
- Returns
- the average data of the coarse mesh [nelem_coarse, ...]
Definition at line 1255 of file MeshQuad4.h.
◆ nx()
size_t GooseFEM::Mesh::Quad4::Map::RefineRegular::nx |
( |
| ) |
const |
|
inline |
For each coarse element: number of fine elements in x-direction.
- Returns
- unsigned int (same as used in constructor)
Definition at line 1177 of file MeshQuad4.h.
◆ ny()
size_t GooseFEM::Mesh::Quad4::Map::RefineRegular::ny |
( |
| ) |
const |
|
inline |
For each coarse element: number of fine elements in y-direction.
- Returns
- unsigned int (same as used in constructor)
Definition at line 1187 of file MeshQuad4.h.
The documentation for this class was generated from the following file: