FrictionQPotFEM 0.23.3
Loading...
Searching...
No Matches
GooseFEM::Mesh::Quad4::Map::RefineRegular Class Reference

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

#include <include/GooseFEM/MeshQuad4.h>

Public Member Functions

 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...
 

Detailed Description

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

Definition at line 1143 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 1154 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 1285 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 1196 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 1205 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 1223 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 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>
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 1320 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 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: