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

Mesh with fine middle layer, and coarser elements towards the top and bottom. More...

#include <GooseFEM/MeshQuad4.h>

Inheritance diagram for GooseFEM::Mesh::Quad4::FineLayer:
GooseFEM::Mesh::RegularBase2d< FineLayer > GooseFEM::Mesh::RegularBase< D >

Public Member Functions

 FineLayer (size_t nelx, size_t nely, double h=1.0, size_t nfine=1)
 Constructor.
 
template<class C , class E , std::enable_if_t< xt::is_xexpression< C >::value, bool > = true>
 FineLayer (const C &coor, const E &conn)
 Reconstruct class for given coordinates / connectivity.
 
const array_type::tensor< size_t, 1 > & elemrow_nhx () const
 Edge size in x-direction of a block, in units of h, per row of blocks.
 
const array_type::tensor< size_t, 1 > & elemrow_nhy () const
 Edge size in y-direction of a block, in units of h, per row of blocks.
 
const array_type::tensor< int, 1 > & elemrow_type () const
 Per row of blocks: -1: normal layer 0: transition layer to match coarse and finer element on the previous/next row.
 
const array_type::tensor< size_t, 1 > & elemrow_nelem () const
 Number of elements per row of blocks.
 
array_type::tensor< size_t, 1 > elementsMiddleLayer () const
 Elements in the middle (fine) layer.
 
array_type::tensor< size_t, 1 > elementsLayer (size_t layer) const
 Elements along a layer.
 
array_type::tensor< size_t, 1 > elementgrid_ravel (std::vector< size_t > start_stop_rows, std::vector< size_t > start_stop_cols) const
 Select region of elements from 'matrix' of element numbers.
 
array_type::tensor< size_t, 1 > elementgrid_around_ravel (size_t e, size_t size, bool periodic=true)
 Select region of elements from 'matrix' of element numbers around an element: square box with edge-size (2 * size + 1) * h, around element.
 
array_type::tensor< size_t, 1 > elementgrid_leftright (size_t e, size_t left, size_t right, bool periodic=true)
 Select region of elements from 'matrix' of element numbers around an element: left/right from element (on the same layer).
 
array_type::tensor< size_t, 1 > roll (size_t n)
 Mapping to 'roll' periodically in the x-direction,.
 
- Public Member Functions inherited from GooseFEM::Mesh::RegularBase2d< FineLayer >
auto nodesBottomEdge () const
 Nodes along the bottom edge (y = 0), in order of increasing x.
 
auto nodesTopEdge () const
 Nodes along the top edge (y = nely * h), in order of increasing x.
 
auto nodesLeftEdge () const
 Nodes along the left edge (x = 0), in order of increasing y.
 
auto nodesRightEdge () const
 Nodes along the right edge (x = nelx * h), in order of increasing y.
 
auto nodesBottomOpenEdge () const
 Nodes along the bottom edge (y = 0), without the corners (at x = 0 and x = nelx * h).
 
auto nodesTopOpenEdge () const
 Nodes along the top edge (y = nely * h), without the corners (at x = 0 and x = nelx * h).
 
auto nodesLeftOpenEdge () const
 Nodes along the left edge (x = 0), without the corners (at y = 0 and y = nely * h).
 
auto nodesRightOpenEdge () const
 Nodes along the right edge (x = nelx * h), without the corners (at y = 0 and y = nely * h).
 
auto nodesBottomLeftCorner () const
 The bottom-left corner node (at x = 0, y = 0).
 
auto nodesBottomRightCorner () const
 The bottom-right corner node (at x = nelx * h, y = 0).
 
auto nodesTopLeftCorner () const
 The top-left corner node (at x = 0, y = nely * h).
 
auto nodesTopRightCorner () const
 The top-right corner node (at x = nelx * h, y = nely * h).
 
auto nodesLeftBottomCorner () const
 Alias of nodesBottomLeftCorner().
 
auto nodesLeftTopCorner () const
 Alias of nodesTopLeftCorner().
 
auto nodesRightBottomCorner () const
 Alias of nodesBottomRightCorner().
 
auto nodesRightTopCorner () const
 Alias of nodesTopRightCorner().
 
- Public Member Functions inherited from GooseFEM::Mesh::RegularBase< D >
auto nelem () const
 Number of elements.
 
auto nnode () const
 Number of nodes.
 
auto nne () const
 Number of nodes-per-element == 4.
 
auto ndim () const
 Number of dimensions == 2.
 
auto nelx () const
 Number of elements in x-direction == width of the mesh in units of h.
 
auto nely () const
 Number of elements in y-direction == height of the mesh, in units of h,.
 
auto h () const
 Linear edge size of one 'block'.
 
auto elementType () const
 The ElementType().
 
auto coor () const
 Nodal coordinates [nnode, ndim].
 
auto conn () const
 Connectivity [nelem, nne].
 
auto dofs () const
 DOF numbers for each node (numbered sequentially) [nnode, ndim].
 
auto dofsPeriodic () const
 DOF-numbers for the case that the periodicity if fully eliminated.
 
auto nodesPeriodic () const
 Periodic node pairs, in two columns: (independent, dependent).
 
auto nodesOrigin () const
 Reference node to use for periodicity, because all corners are tied to it.
 

Friends

class RegularBase< FineLayer >
 
class RegularBase2d< FineLayer >
 
class GooseFEM::Mesh::Quad4::Map::FineLayer2Regular
 

Additional Inherited Members

- Public Types inherited from GooseFEM::Mesh::RegularBase2d< FineLayer >
using derived_type
 Underlying type.
 
- Public Types inherited from GooseFEM::Mesh::RegularBase< D >
using derived_type = D
 Underlying type.
 

Detailed Description

Mesh with fine middle layer, and coarser elements towards the top and bottom.

Definition at line 200 of file MeshQuad4.h.

Constructor & Destructor Documentation

◆ FineLayer() [1/2]

GooseFEM::Mesh::Quad4::FineLayer::FineLayer ( size_t nelx,
size_t nely,
double h = 1.0,
size_t nfine = 1 )
inline

Constructor.

Parameters
nelxNumber of elements (along the middle layer) in horizontal (x) direction.
nelyApproximate equivalent number of elements in vertical (y) direction.
hEdge size (width == height) of elements along the weak layer.
nfineExtra number of fine layers around the middle layer. By default the element size is kept smaller than the distance to the middle layer.

Definition at line 215 of file MeshQuad4.h.

◆ FineLayer() [2/2]

template<class C , class E , std::enable_if_t< xt::is_xexpression< C >::value, bool > = true>
GooseFEM::Mesh::Quad4::FineLayer::FineLayer ( const C & coor,
const E & conn )
inline

Reconstruct class for given coordinates / connectivity.

Template Parameters
Ce.g. array_type::tensor<double, 2>
Ee.g. array_type::tensor<size_t, 2>
Parameters
coorNodal coordinates [nnode, ndim] with ndim == 2.
connConnectivity [nne, nne] with nne == 4.

Definition at line 229 of file MeshQuad4.h.

Member Function Documentation

◆ elementgrid_around_ravel()

array_type::tensor< size_t, 1 > GooseFEM::Mesh::Quad4::FineLayer::elementgrid_around_ravel ( size_t e,
size_t size,
bool periodic = true )
inline

Select region of elements from 'matrix' of element numbers around an element: square box with edge-size (2 * size + 1) * h, around element.

Parameters
eThe element around which to select elements.
sizeEdge size of the square box encapsulating the selected element.
periodicAssume the mesh periodic.
Returns
List of elements.

Definition at line 410 of file MeshQuad4.h.

◆ elementgrid_leftright()

array_type::tensor< size_t, 1 > GooseFEM::Mesh::Quad4::FineLayer::elementgrid_leftright ( size_t e,
size_t left,
size_t right,
bool periodic = true )
inline

Select region of elements from 'matrix' of element numbers around an element: left/right from element (on the same layer).

Parameters
eThe element around which to select elements.
leftNumber of elements to select to the left.
rightNumber of elements to select to the right.
periodicAssume the mesh periodic.
Returns
List of elements.

Definition at line 483 of file MeshQuad4.h.

◆ elementgrid_ravel()

array_type::tensor< size_t, 1 > GooseFEM::Mesh::Quad4::FineLayer::elementgrid_ravel ( std::vector< size_t > start_stop_rows,
std::vector< size_t > start_stop_cols ) const
inline

Select region of elements from 'matrix' of element numbers.

Returns
List of element numbers.

Definition at line 314 of file MeshQuad4.h.

◆ elementsLayer()

array_type::tensor< size_t, 1 > GooseFEM::Mesh::Quad4::FineLayer::elementsLayer ( size_t layer) const
inline

Elements along a layer.

Returns
List of element numbers.

Definition at line 299 of file MeshQuad4.h.

◆ elementsMiddleLayer()

array_type::tensor< size_t, 1 > GooseFEM::Mesh::Quad4::FineLayer::elementsMiddleLayer ( ) const
inline

Elements in the middle (fine) layer.

Returns
List of element numbers.

Definition at line 287 of file MeshQuad4.h.

◆ elemrow_nelem()

const array_type::tensor< size_t, 1 > & GooseFEM::Mesh::Quad4::FineLayer::elemrow_nelem ( ) const
inline

Number of elements per row of blocks.

Note that a block is equal to an element except in refinement layers where it contains three elements.

Returns
List of size equal to the number of rows of blocks.

Definition at line 277 of file MeshQuad4.h.

◆ elemrow_nhx()

const array_type::tensor< size_t, 1 > & GooseFEM::Mesh::Quad4::FineLayer::elemrow_nhx ( ) const
inline

Edge size in x-direction of a block, in units of h, per row of blocks.

Note that a block is equal to an element except in refinement layers where it contains three elements.

Returns
List of size equal to the number of rows of blocks.

Definition at line 241 of file MeshQuad4.h.

◆ elemrow_nhy()

const array_type::tensor< size_t, 1 > & GooseFEM::Mesh::Quad4::FineLayer::elemrow_nhy ( ) const
inline

Edge size in y-direction of a block, in units of h, per row of blocks.

Note that a block is equal to an element except in refinement layers where it contains three elements.

Returns
List of size equal to the number of rows of blocks.

Definition at line 253 of file MeshQuad4.h.

◆ elemrow_type()

const array_type::tensor< int, 1 > & GooseFEM::Mesh::Quad4::FineLayer::elemrow_type ( ) const
inline

Per row of blocks: -1: normal layer 0: transition layer to match coarse and finer element on the previous/next row.

Returns
List of size equal to the number of rows of blocks.

Definition at line 265 of file MeshQuad4.h.

◆ roll()

array_type::tensor< size_t, 1 > GooseFEM::Mesh::Quad4::FineLayer::roll ( size_t n)
inline

Mapping to 'roll' periodically in the x-direction,.

Returns
element mapping, such that: new_elemvar = elemvar[elem_map]

Definition at line 539 of file MeshQuad4.h.

Friends And Related Symbol Documentation

◆ GooseFEM::Mesh::Quad4::Map::FineLayer2Regular

◆ RegularBase2d< FineLayer >

Definition at line 539 of file MeshQuad4.h.

◆ RegularBase< FineLayer >

Definition at line 539 of file MeshQuad4.h.


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