GooseFEM 1.4.1.dev2+g78f16df
Loading...
Searching...
No Matches
GooseFEM::Mesh::Quad4::Map::RefineRegular Class Reference

Refine a Regular mesh: subdivide elements in several smaller elements. More...

#include <GooseFEM/MeshQuad4.h>

Public Member Functions

 RefineRegular (const GooseFEM::Mesh::Quad4::Regular &mesh, size_t nx, size_t ny)
 Constructor.
 
size_t nx () const
 For each coarse element: number of fine elements in x-direction.
 
size_t ny () const
 For each coarse element: number of fine elements in y-direction.
 
GooseFEM::Mesh::Quad4::Regular coarseMesh () const
 Obtain the coarse mesh (copy of the mesh passed to the constructor).
 
GooseFEM::Mesh::Quad4::Regular fineMesh () const
 Obtain the fine mesh.
 
const array_type::tensor< size_t, 2 > & map () const
 Get element-mapping: elements of the fine mesh per element of the coarse mesh.
 
GooseFEM::Mesh::Quad4::Regular getCoarseMesh () const
 Obtain the coarse mesh (copy of the mesh passed to the constructor).
 
GooseFEM::Mesh::Quad4::Regular getFineMesh () const
 Obtain the fine mesh.
 
const array_type::tensor< size_t, 2 > & getMap () const
 Get element-mapping: elements of the fine mesh per element of the coarse mesh.
 
template<class T , size_t rank>
array_type::tensor< T, rankmeanToCoarse (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.
 
template<class T , size_t rank, class S >
array_type::tensor< T, rankaverageToCoarse (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.
 
template<class T , size_t rank>
array_type::tensor< T, rankmapToFine (const array_type::tensor< T, rank > &data) const
 Map element quantities to the fine mesh.
 

Detailed Description

Refine a Regular mesh: subdivide elements in several smaller elements.

Definition at line 1145 of file MeshQuad4.h.

Constructor & Destructor Documentation

◆ RefineRegular()

GooseFEM::Mesh::Quad4::Map::RefineRegular::RefineRegular ( const GooseFEM::Mesh::Quad4::Regular & mesh,
size_t nx,
size_t ny )
inline

Constructor.

Parameters
meshthe coarse mesh.
nxfor each coarse element: number of fine elements in x-direction.
nyfor each coarse element: number of fine elements in y-direction.

Definition at line 1156 of file MeshQuad4.h.

Member Function Documentation

◆ averageToCoarse()

template<class T , size_t rank, class S >
array_type::tensor< T, rank > GooseFEM::Mesh::Quad4::Map::RefineRegular::averageToCoarse ( const array_type::tensor< T, rank > & data,
const array_type::tensor< S, rank > & weights ) const
inline

Compute the average of the quantity define on the fine mesh when mapped on the coarse mesh.

Template Parameters
Ttype of the data (e.g. double).
rankrank of the data.
Stype of the weights (e.g. double).
Parameters
datathe data [nelem_fine, ...]
weightsthe weights [nelem_fine, ...]
Returns
the average data of the coarse mesh [nelem_coarse, ...]

Definition at line 1291 of file MeshQuad4.h.

◆ coarseMesh()

GooseFEM::Mesh::Quad4::Regular GooseFEM::Mesh::Quad4::Map::RefineRegular::coarseMesh ( ) const
inline

Obtain the coarse mesh (copy of the mesh passed to the constructor).

Returns
mesh

Definition at line 1199 of file MeshQuad4.h.

◆ fineMesh()

GooseFEM::Mesh::Quad4::Regular GooseFEM::Mesh::Quad4::Map::RefineRegular::fineMesh ( ) const
inline

Obtain the fine mesh.

Returns
mesh

Definition at line 1208 of file MeshQuad4.h.

◆ getCoarseMesh()

GooseFEM::Mesh::Quad4::Regular GooseFEM::Mesh::Quad4::Map::RefineRegular::getCoarseMesh ( ) const
inline

Obtain the coarse mesh (copy of the mesh passed to the constructor).

Returns
mesh

Definition at line 1227 of file MeshQuad4.h.

◆ getFineMesh()

GooseFEM::Mesh::Quad4::Regular GooseFEM::Mesh::Quad4::Map::RefineRegular::getFineMesh ( ) const
inline

Obtain the fine mesh.

Returns
mesh

Definition at line 1237 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 1247 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 1217 of file MeshQuad4.h.

◆ mapToFine()

template<class T , size_t rank>
array_type::tensor< T, rank > GooseFEM::Mesh::Quad4::Map::RefineRegular::mapToFine ( const array_type::tensor< T, rank > & data) const
inline

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
Ttype of the data (e.g. double).
rankrank of the data.
Parameters
datathe data.
Returns
mapped data.

Definition at line 1327 of file MeshQuad4.h.

◆ meanToCoarse()

template<class T , size_t rank>
array_type::tensor< T, rank > GooseFEM::Mesh::Quad4::Map::RefineRegular::meanToCoarse ( const array_type::tensor< T, rank > & data) const
inline

Compute the mean of the quantity define on the fine mesh when mapped on the coarse mesh.

Template Parameters
Ttype of the data (e.g. double).
rankrank of the data.
Parameters
datathe data [nelem_fine, ...]
Returns
the average data of the coarse mesh [nelem_coarse, ...]

Definition at line 1261 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 1180 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 1190 of file MeshQuad4.h.


The documentation for this class was generated from the following file: