hexed 0.4.0
 
Loading...
Searching...
No Matches
hexed::next::Block Class Referenceabstract

Abstract nodal representation of a parametric block. More...

#include <Block.hpp>

Inheritance diagram for hexed::next::Block:
hexed::Mortal hexed::mutual::Multiple< void, void > hexed::mutual::Base< void, void > hexed::next::Boundary_block hexed::next::Element_shape hexed::next::Vertex hexed::next::Edge hexed::next::Surface_face

Public Member Functions

 Block (int n_dim, int row_size)
 
int n_dim () const
 number of topological dimensions.
 
int row_size () const
 number nodes along each dimension
 
Mat< 3 > point (const std::vector< int > &node_coords, Int recursion_depth=0) const
 Obtains the node with array indices specified by node_coords.
 
Mat< 3 > point (int i_point, Int recursion_depth=0) const
 Obtains the node with flat index i_point
 
virtual Array< double > points () const
 Obtains all the nodes as a multidimensional array.
 
void visualize (std::string format, std::string file_name, double time=0.) const
 Visualizes the nodes of a single Block.
 
- Public Member Functions inherited from hexed::mutual::Multiple< void, void >
 Multiple (const Multiple &)=delete
 
 Multiple (Multiple &&that)
 steals all of that's partners, leaving that unconnected
 
Multipleoperator= (const Multiple &)=delete
 
Multipleoperator= (Multiple &&that)
 steals all of that's partners, leaving that unconnected
 
next::Sequence< Base< void, void > & > partners ()
 provides access to the list of partners
 
next::Sequence< const Base< void, void > & > partners () const
 provides access to the list of partners
 
- Public Member Functions inherited from hexed::mutual::Base< void, void >
virtual void * _mine ()
 
virtual const void * _mine () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Static Public Member Functions

static void visualize (std::string format, std::string file_name, next::Sequence< const Block & >, double time=0.)
 Visualizes the nodes of a set of Blocks.
 

Static Public Attributes

static constexpr Int max_recursion_depth = 100
 

Protected Member Functions

virtual Mat< 3 > _point (const std::vector< int > &node_coords, Int recursion_depth=0) const =0
 Derived classes must override this function to define the nodes.
 
- Protected Member Functions inherited from hexed::mutual::Base< void, void >
void _connect (Base< void, void > &that)
 may be overridden by derived classes to provide partners to data of some arbitrary type T
 
void _disconnect (Base< void, void > &that)
 mutually disconnects this and that by calling both of their _unset() member functions
 

Additional Inherited Members

- Static Protected Member Functions inherited from hexed::mutual::Base< void, void >
static void * _yours (Base< void, void > &that)
 Accesses the _mine() of that
 
static const void * _yours (const Base< void, void > &that)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
- Protected Attributes inherited from hexed::mutual::Base< void, void >
Lock _lock
 

Detailed Description

Abstract nodal representation of a parametric block.

Hexed represents many parametric block shapes (curvilinear transformations of the unit hypercube) in nodal formats (by an n-dimensional array of node coordinates). This class provides an abstract interface for all such block representations. Although this class supports an arbitrary number of topological dimensions (number of parametric coordinates), the number of geometric dimensions (number of physical coordinates) is always 3. To represent a 2D mesh, just set the last physical coordinate to 0.

Member Function Documentation

◆ point() [1/2]

Mat< 3 > hexed::next::Block::point ( const std::vector< int > & node_coords,
Int recursion_depth = 0 ) const

Obtains the node with array indices specified by node_coords.

node_coords must have n_dim() entries and each entry must be in [0, row_size()). If recursion_depth > Block::max_recursion_depth, throws. If any implementations of Block::_point call Block::point, they should increment recursion_depth to help catch infinite recursion bugs, which would otherwise result in a stack overflow.

◆ point() [2/2]

Mat< 3 > hexed::next::Block::point ( int i_point,
Int recursion_depth = 0 ) const

Obtains the node with flat index i_point

See also
Block::point

◆ points()

Array< double > hexed::next::Block::points ( ) const
virtual

Obtains all the nodes as a multidimensional array.

This is not a reference. Calling this function allocates memory for the points and changing it will not change the underlying representation. layout: [i_dim \(\in\) [0, 3)] ([i_row \(\in\) [0, row_size())] ([j_row \(\in\) [0, row_size())] ([j_row \(\in\) [0, row_size())])))

◆ row_size()

int hexed::next::Block::row_size ( ) const
inline

number nodes along each dimension

See also
row size

◆ visualize()

void hexed::next::Block::visualize ( std::string format,
std::string file_name,
next::Sequence< const Block & > blocks,
double time = 0. )
static

Visualizes the nodes of a set of Blocks.

All blocks in the list must have the same n_dim().


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