Medusa  1.1
Coordinate Free Mehless Method implementation
mm::ShapeStorage< Derived, vec_t, OpFamilies > Class Template Reference

#include <ShapeStorage_fwd.hpp>

Detailed Description

template<typename Derived, typename vec_t, typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
class mm::ShapeStorage< Derived, vec_t, OpFamilies >

Shape storage base class.

It supports storing computed shapes for Lap, D1 and D2 operators. Derived classes should inherit the interface via CRTP and implement missing methods.

See also
UniformShapeStorage, RaggedShapeStorage

Definition at line 41 of file ShapeStorage_fwd.hpp.

+ Collaboration diagram for mm::ShapeStorage< Derived, vec_t, OpFamilies >:

Public Member Functions

void resize (const std::vector< int > &support_sizes)
 Resizes the storage to accommodate shapes of given sizes. More...
 
int size () const
 Returns number of nodes. More...
 
SINL int support (int node, int j) const
 Returns index of j-th neighbour of node-th node, i.e. support[node][j], but possibly faster. More...
 
SINL Eigen::Map< const Eigen::Matrix< int, Eigen::Dynamic, 1 > > support (int node) const
 Returns a collection of support indices for given node. More...
 
void setSupport (int node_idx, const std::vector< int > &support)
 Sets support of node-th node to support. More...
 
int supportSize (int node) const
 Returns support size of node-th node. More...
 
Range< int > supportSizes () const
 Returns a vector of support sizes for all nodes, useful for matrix space preallocation. More...
 
Range< int > supportSizesVec () const
 Returns a dim*N vector of dim*support_size, useful for matrix space preallocation for vector equations. More...
 
const std::array< Range< scalar_t >, num_operators > & shapes () const
 Read access to complete shape storage. More...
 
template<int op_family>
SINL scalar_t get (int op, int node, int j) const
 Get the weight of j-th stencil node of node for operator op in op_family (by index). More...
 
template<typename op_family >
SINL scalar_t get (int op, int node, int j) const
 Get the weight of j-th stencil node of node for operator op in op_family (by type). More...
 
template<int op_family>
SINL scalar_t get (int node, int j) const
 Get the j-th weight of shape for node for the only operator in op_family (by index). More...
 
template<typename op_family >
SINL scalar_t get (int node, int j) const
 Get the j-th weight of shape for node for the only operator in op_family (by type). More...
 
template<int op_family>
Eigen::Map< const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > > getShape (int op, int node) const
 Get the shape for node for operator op in op_family (by index). More...
 
template<typename op_family >
Eigen::Map< const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > > getShape (int op, int node) const
 Get the shape for node for operator op in op_family (by type). More...
 
template<int op_family>
SINL Eigen::Map< const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > > getShape (int node) const
 Get the shape for node for the only operator in op_family (by index). More...
 
template<typename op_family >
SINL Eigen::Map< const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > > getShape (int node) const
 Get the shape for node for the only operator in op_family (by type). More...
 
template<int op_family>
SINL void setShape (int op, int node, const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > &shape)
 Set the shape for node for operator op in op_family (by index). More...
 
template<typename op_family >
SINL void setShape (int op, int node, const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > &shape)
 Set the shape for node for operator op in op_family (by type). More...
 
template<int op_family>
SINL void setShape (int node, const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > &shape)
 Set the shape for node for the only operator in op_family (by index). More...
 
template<typename op_family >
SINL void setShape (int node, const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > &shape)
 Set the shape for node for the only operator in op_family (by type). More...
 
SINL scalar_t laplace (int node, int j) const
 Return j-th laplace shape coefficient for node-th node. More...
 
Eigen::Map< const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > > laplace (int node) const
 Returns the laplace shape for node. More...
 
SINL void setLaplace (int node, const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > &shape)
 Sets the laplace shape for node to shape. More...
 
SINL scalar_t d1 (int var, int node, int j) const
 Return j-th shape coefficient for derivative wrt. variable var in node. More...
 
Eigen::Map< const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > > d1 (int var, int node) const
 Return shape for derivative wrt. variable var in node. More...
 
SINL void setD1 (int var, int node, const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > &shape)
 Sets shape for derivative wrt. variable var for node to shape. More...
 
SINL scalar_t d2 (int varmin, int varmax, int node, int j) const
 Return j-th shape coefficient for mixed derivative wrt. More...
 
Eigen::Map< const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > > d2 (int varmin, int varmax, int node) const
 Return shape for mixed derivative wrt. variables varmin and varmax in node. More...
 
SINL void setD2 (int varmin, int varmax, int node, const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > &shape)
 Sets shape for mixed derivative wrt. variables varmin and varmax for node to shape. More...
 
size_t memoryUsed () const
 Returns the approximate memory used (in bytes). More...
 
ExplicitOperators< DerivedexplicitOperators () const
 Construct explicit operators over this storage. More...
 
ExplicitVectorOperators< DerivedexplicitVectorOperators () const
 Construct explicit vector operators over this storage. More...
 
template<typename M , typename R >
ImplicitOperators< Derived, M, R > implicitOperators (M &matrix, R &rhs) const
 Construct implicit operators over this storage. More...
 
template<typename M , typename R >
ImplicitVectorOperators< Derived, M, R > implicitVectorOperators (M &matrix, R &rhs) const
 Construct implicit vector operators over this storage. More...
 

Public Attributes

friend Derived
 Be friends with derived class. More...
 

Static Public Attributes

constexpr static int num_operators = std::tuple_size<op_families_tuple>::value
 Number of operator families in this storage. More...
 

Public Types

enum  { dim = vec_t::dim }
 Bitmask telling us which shapes to create. More...
 
typedef vec_t vector_t
 Vector type used. More...
 
typedef vec_t::scalar_t scalar_t
 Scalar type used. More...
 
typedef OpFamilies op_families_tuple
 Tuple of operator families. More...
 

Friends

template<typename D , typename V , typename O >
std::ostream & operator<< (std::ostream &os, const ShapeStorage< D, V, O > &shapes)
 Output basic info about this shape storage. More...
 

Private Member Functions

template<typename T >
SINL T * access (std::vector< T > &v, int op, int node) const
 Returns pointer to the start of values for node-th node for op-th operator. More...
 
template<typename T >
SINL T * access (std::vector< T > &v, int node) const
 Returns pointer to the start of values for node-th node. More...
 
template<typename T >
const SINL T * access (const std::vector< T > &v, int op, int node) const
 Returns const pointer to the start of values for node-th node for op-th operator. More...
 
template<typename T >
const SINL T * access (const std::vector< T > &v, int node) const
 Returns const pointer to the start of values for node-th node. More...
 
 ShapeStorage ()
 Constructs empty storage with size 0. Can be resized with resize. More...
 

Private Attributes

int domain_size_
 Total number of nodes. More...
 
Range< int > support_
 Local copy of support domains. More...
 
std::array< Range< scalar_t >, num_operatorsshapes_
 Tuple of shape containers for given operators. More...
 

Member Enumeration Documentation

◆ anonymous enum

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
anonymous enum

Bitmask telling us which shapes to create.

Store dimension of the domain.

Enumerator
dim 

Dimensionality of the domain.

Definition at line 47 of file ShapeStorage_fwd.hpp.

Constructor & Destructor Documentation

◆ ShapeStorage()

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
mm::ShapeStorage< Derived, vec_t, OpFamilies >::ShapeStorage ( )
inlineprivate

Constructs empty storage with size 0. Can be resized with resize.

Definition at line 77 of file ShapeStorage_fwd.hpp.

Member Function Documentation

◆ access() [1/4]

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<typename T >
const SINL T* mm::ShapeStorage< Derived, vec_t, OpFamilies >::access ( const std::vector< T > &  v,
int  node 
) const
inlineprivate

Returns const pointer to the start of values for node-th node.

Definition at line 73 of file ShapeStorage_fwd.hpp.

◆ access() [2/4]

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<typename T >
const SINL T* mm::ShapeStorage< Derived, vec_t, OpFamilies >::access ( const std::vector< T > &  v,
int  op,
int  node 
) const
inlineprivate

Returns const pointer to the start of values for node-th node for op-th operator.

Definition at line 70 of file ShapeStorage_fwd.hpp.

◆ access() [3/4]

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<typename T >
SINL T* mm::ShapeStorage< Derived, vec_t, OpFamilies >::access ( std::vector< T > &  v,
int  node 
) const
inlineprivate

Returns pointer to the start of values for node-th node.

Definition at line 67 of file ShapeStorage_fwd.hpp.

◆ access() [4/4]

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<typename T >
SINL T* mm::ShapeStorage< Derived, vec_t, OpFamilies >::access ( std::vector< T > &  v,
int  op,
int  node 
) const
inlineprivate

Returns pointer to the start of values for node-th node for op-th operator.

Definition at line 64 of file ShapeStorage_fwd.hpp.

◆ d1() [1/2]

template<typename Derived , typename vec_t , typename OpFamilies >
Eigen::Map< const Eigen::Matrix< typename ShapeStorage< Derived, vec_t, OpFamilies >::scalar_t, Eigen::Dynamic, 1 > > mm::ShapeStorage< Derived, vec_t, OpFamilies >::d1 ( int  var,
int  node 
) const

Return shape for derivative wrt. variable var in node.

Definition at line 103 of file ShapeStorage.hpp.

◆ d1() [2/2]

template<typename Derived , typename vec_t , typename OpFamilies >
ShapeStorage< Derived, vec_t, OpFamilies >::scalar_t mm::ShapeStorage< Derived, vec_t, OpFamilies >::d1 ( int  var,
int  node,
int  j 
) const

Return j-th shape coefficient for derivative wrt. variable var in node.

Definition at line 65 of file ShapeStorage.hpp.

◆ d2() [1/2]

template<typename Derived , typename vec_t , typename OpFamilies >
Eigen::Map< const Eigen::Matrix< typename ShapeStorage< Derived, vec_t, OpFamilies >::scalar_t, Eigen::Dynamic, 1 > > mm::ShapeStorage< Derived, vec_t, OpFamilies >::d2 ( int  varmin,
int  varmax,
int  node 
) const

Return shape for mixed derivative wrt. variables varmin and varmax in node.

Definition at line 113 of file ShapeStorage.hpp.

◆ d2() [2/2]

template<typename Derived , typename vec_t , typename OpFamilies >
ShapeStorage< Derived, vec_t, OpFamilies >::scalar_t mm::ShapeStorage< Derived, vec_t, OpFamilies >::d2 ( int  varmin,
int  varmax,
int  node,
int  j 
) const

Return j-th shape coefficient for mixed derivative wrt.

variables varmin and varmax in node.

Definition at line 76 of file ShapeStorage.hpp.

◆ explicitOperators()

template<typename Derived , typename vec_t , typename OpFamilies >
ExplicitOperators< Derived > mm::ShapeStorage< Derived, vec_t, OpFamilies >::explicitOperators

Construct explicit operators over this storage.

Definition at line 89 of file ExplicitOperators.hpp.

◆ explicitVectorOperators()

template<typename Derived , typename vec_t , typename OpFamilies >
ExplicitVectorOperators< Derived > mm::ShapeStorage< Derived, vec_t, OpFamilies >::explicitVectorOperators

Construct explicit vector operators over this storage.

Definition at line 160 of file ExplicitVectorOperators.hpp.

◆ get() [1/4]

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<int op_family>
SINL scalar_t mm::ShapeStorage< Derived, vec_t, OpFamilies >::get ( int  node,
int  j 
) const
inline

Get the j-th weight of shape for node for the only operator in op_family (by index).

Definition at line 134 of file ShapeStorage_fwd.hpp.

◆ get() [2/4]

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<typename op_family >
SINL scalar_t mm::ShapeStorage< Derived, vec_t, OpFamilies >::get ( int  node,
int  j 
) const
inline

Get the j-th weight of shape for node for the only operator in op_family (by type).

Definition at line 139 of file ShapeStorage_fwd.hpp.

◆ get() [3/4]

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<int op_family>
SINL scalar_t mm::ShapeStorage< Derived, vec_t, OpFamilies >::get ( int  op,
int  node,
int  j 
) const
inline

Get the weight of j-th stencil node of node for operator op in op_family (by index).

Definition at line 124 of file ShapeStorage_fwd.hpp.

◆ get() [4/4]

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<typename op_family >
SINL scalar_t mm::ShapeStorage< Derived, vec_t, OpFamilies >::get ( int  op,
int  node,
int  j 
) const
inline

Get the weight of j-th stencil node of node for operator op in op_family (by type).

Definition at line 129 of file ShapeStorage_fwd.hpp.

◆ getShape() [1/4]

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<int op_family>
SINL Eigen::Map<const Eigen::Matrix<scalar_t, Eigen::Dynamic, 1> > mm::ShapeStorage< Derived, vec_t, OpFamilies >::getShape ( int  node) const
inline

Get the shape for node for the only operator in op_family (by index).

Definition at line 157 of file ShapeStorage_fwd.hpp.

◆ getShape() [2/4]

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<typename op_family >
SINL Eigen::Map<const Eigen::Matrix<scalar_t, Eigen::Dynamic, 1> > mm::ShapeStorage< Derived, vec_t, OpFamilies >::getShape ( int  node) const
inline

Get the shape for node for the only operator in op_family (by type).

Definition at line 163 of file ShapeStorage_fwd.hpp.

◆ getShape() [3/4]

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<int op_family>
Eigen::Map<const Eigen::Matrix<scalar_t, Eigen::Dynamic, 1> > mm::ShapeStorage< Derived, vec_t, OpFamilies >::getShape ( int  op,
int  node 
) const
inline

Get the shape for node for operator op in op_family (by index).

Definition at line 145 of file ShapeStorage_fwd.hpp.

◆ getShape() [4/4]

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<typename op_family >
Eigen::Map<const Eigen::Matrix<scalar_t, Eigen::Dynamic, 1> > mm::ShapeStorage< Derived, vec_t, OpFamilies >::getShape ( int  op,
int  node 
) const
inline

Get the shape for node for operator op in op_family (by type).

Definition at line 151 of file ShapeStorage_fwd.hpp.

◆ implicitOperators()

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<typename M , typename R >
ImplicitOperators<Derived, M, R> mm::ShapeStorage< Derived, vec_t, OpFamilies >::implicitOperators ( M &  matrix,
R &  rhs 
) const

Construct implicit operators over this storage.

◆ implicitVectorOperators()

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<typename M , typename R >
ImplicitVectorOperators<Derived, M, R> mm::ShapeStorage< Derived, vec_t, OpFamilies >::implicitVectorOperators ( M &  matrix,
R &  rhs 
) const

Construct implicit vector operators over this storage.

◆ laplace() [1/2]

template<typename Derived , typename vec_t , typename OpFamilies >
Eigen::Map< const Eigen::Matrix< typename ShapeStorage< Derived, vec_t, OpFamilies >::scalar_t, Eigen::Dynamic, 1 > > mm::ShapeStorage< Derived, vec_t, OpFamilies >::laplace ( int  node) const

Returns the laplace shape for node.

Definition at line 94 of file ShapeStorage.hpp.

◆ laplace() [2/2]

template<typename Derived , typename vec_t , typename OpFamilies >
ShapeStorage< Derived, vec_t, OpFamilies >::scalar_t mm::ShapeStorage< Derived, vec_t, OpFamilies >::laplace ( int  node,
int  j 
) const

Return j-th laplace shape coefficient for node-th node.

Definition at line 55 of file ShapeStorage.hpp.

◆ memoryUsed()

template<typename Derived , typename vec_t , typename OpFamilies >
size_t mm::ShapeStorage< Derived, vec_t, OpFamilies >::memoryUsed

Returns the approximate memory used (in bytes).

Definition at line 182 of file ShapeStorage.hpp.

◆ resize()

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
void mm::ShapeStorage< Derived, vec_t, OpFamilies >::resize ( const std::vector< int > &  support_sizes)
inline

Resizes the storage to accommodate shapes of given sizes.

Definition at line 81 of file ShapeStorage_fwd.hpp.

◆ setD1()

template<typename Derived , typename vec_t , typename OpFamilies >
void mm::ShapeStorage< Derived, vec_t, OpFamilies >::setD1 ( int  var,
int  node,
const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > &  shape 
)

Sets shape for derivative wrt. variable var for node to shape.

Definition at line 147 of file ShapeStorage.hpp.

◆ setD2()

template<typename Derived , typename vec_t , typename OpFamilies >
void mm::ShapeStorage< Derived, vec_t, OpFamilies >::setD2 ( int  varmin,
int  varmax,
int  node,
const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > &  shape 
)

Sets shape for mixed derivative wrt. variables varmin and varmax for node to shape.

Definition at line 158 of file ShapeStorage.hpp.

◆ setLaplace()

template<typename Derived , typename vec_t , typename OpFamilies >
void mm::ShapeStorage< Derived, vec_t, OpFamilies >::setLaplace ( int  node,
const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > &  shape 
)

Sets the laplace shape for node to shape.

Definition at line 137 of file ShapeStorage.hpp.

◆ setShape() [1/4]

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<int op_family>
SINL void mm::ShapeStorage< Derived, vec_t, OpFamilies >::setShape ( int  node,
const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > &  shape 
)
inline

Set the shape for node for the only operator in op_family (by index).

Definition at line 183 of file ShapeStorage_fwd.hpp.

◆ setShape() [2/4]

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<typename op_family >
SINL void mm::ShapeStorage< Derived, vec_t, OpFamilies >::setShape ( int  node,
const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > &  shape 
)
inline

Set the shape for node for the only operator in op_family (by type).

Definition at line 189 of file ShapeStorage_fwd.hpp.

◆ setShape() [3/4]

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<int op_family>
SINL void mm::ShapeStorage< Derived, vec_t, OpFamilies >::setShape ( int  op,
int  node,
const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > &  shape 
)
inline

Set the shape for node for operator op in op_family (by index).

Definition at line 170 of file ShapeStorage_fwd.hpp.

◆ setShape() [4/4]

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<typename op_family >
SINL void mm::ShapeStorage< Derived, vec_t, OpFamilies >::setShape ( int  op,
int  node,
const Eigen::Matrix< scalar_t, Eigen::Dynamic, 1 > &  shape 
)
inline

Set the shape for node for operator op in op_family (by type).

Definition at line 177 of file ShapeStorage_fwd.hpp.

◆ setSupport()

template<typename Derived , typename vec_t , typename OpFamilies >
void mm::ShapeStorage< Derived, vec_t, OpFamilies >::setSupport ( int  node_idx,
const std::vector< int > &  support 
)

Sets support of node-th node to support.

Definition at line 126 of file ShapeStorage.hpp.

◆ shapes()

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
const std::array<Range<scalar_t>, num_operators>& mm::ShapeStorage< Derived, vec_t, OpFamilies >::shapes ( ) const
inline

Read access to complete shape storage.

Definition at line 121 of file ShapeStorage_fwd.hpp.

◆ size()

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
int mm::ShapeStorage< Derived, vec_t, OpFamilies >::size ( ) const
inline

Returns number of nodes.

Definition at line 87 of file ShapeStorage_fwd.hpp.

◆ support() [1/2]

template<typename Derived , typename vec_t , typename OpFamilies >
Eigen::Map< const Eigen::Matrix< int, Eigen::Dynamic, 1 > > mm::ShapeStorage< Derived, vec_t, OpFamilies >::support ( int  node) const

Returns a collection of support indices for given node.

Definition at line 27 of file ShapeStorage.hpp.

◆ support() [2/2]

template<typename Derived , typename vec_t , typename OpFamilies >
int mm::ShapeStorage< Derived, vec_t, OpFamilies >::support ( int  node,
int  j 
) const

Returns index of j-th neighbour of node-th node, i.e. support[node][j], but possibly faster.

Definition at line 15 of file ShapeStorage.hpp.

◆ supportSize()

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
int mm::ShapeStorage< Derived, vec_t, OpFamilies >::supportSize ( int  node) const
inline

Returns support size of node-th node.

Definition at line 102 of file ShapeStorage_fwd.hpp.

◆ supportSizes()

template<typename Derived , typename vec_t , typename OpFamilies >
Range< int > mm::ShapeStorage< Derived, vec_t, OpFamilies >::supportSizes

Returns a vector of support sizes for all nodes, useful for matrix space preallocation.

Warning
If there are ghost nodes present, their support sizes might be zero. However, matrix rows corresponding to ghost nodes must still be preallocated.
See also
supportSizesVec

Definition at line 36 of file ShapeStorage.hpp.

◆ supportSizesVec()

template<typename Derived , typename vec_t , typename OpFamilies >
Range< int > mm::ShapeStorage< Derived, vec_t, OpFamilies >::supportSizesVec

Returns a dim*N vector of dim*support_size, useful for matrix space preallocation for vector equations.

Same warning as for supportSizes applies.

See also
supportSizes

Definition at line 45 of file ShapeStorage.hpp.

Friends And Related Function Documentation

◆ operator<<

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
template<typename D , typename V , typename O >
std::ostream& operator<< ( std::ostream &  os,
const ShapeStorage< D, V, O > &  shapes 
)
friend

Output basic info about this shape storage.

Definition at line 176 of file ShapeStorage.hpp.

Member Data Documentation

◆ Derived

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
friend mm::ShapeStorage< Derived, vec_t, OpFamilies >::Derived

Be friends with derived class.

Definition at line 52 of file ShapeStorage_fwd.hpp.

◆ domain_size_

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
int mm::ShapeStorage< Derived, vec_t, OpFamilies >::domain_size_
private

Total number of nodes.

Definition at line 56 of file ShapeStorage_fwd.hpp.

◆ num_operators

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
constexpr static int mm::ShapeStorage< Derived, vec_t, OpFamilies >::num_operators = std::tuple_size<op_families_tuple>::value
staticconstexpr

Number of operator families in this storage.

Definition at line 50 of file ShapeStorage_fwd.hpp.

◆ shapes_

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
std::array<Range<scalar_t>, num_operators> mm::ShapeStorage< Derived, vec_t, OpFamilies >::shapes_
private

Tuple of shape containers for given operators.

Definition at line 61 of file ShapeStorage_fwd.hpp.

◆ support_

template<typename Derived , typename vec_t , typename OpFamilies = std::tuple<Lap<vec_t::dim>, Der1s<vec_t::dim>, Der2s<vec_t::dim>>>
Range<int> mm::ShapeStorage< Derived, vec_t, OpFamilies >::support_
private

Local copy of support domains.

Definition at line 58 of file ShapeStorage_fwd.hpp.


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