DamBreak++ Wave Simulator 0.3
DamBreak++ Simulation Framework
Loading...
Searching...
No Matches
dbpp::NodalTpl< Params > Struct Template Reference

Implementation for nodal variable concept used in our application (use of variadic template). More...

#include <dbpp_NodalTpl.hpp>

Public Types

using index_type = std::tuple_element_t<0, decltype(m_tpl)>
 first tuple element type
using value_type = std::tuple_element_t<1, decltype(m_tpl)>
 Alias (second tuple element type)

Public Member Functions

 NodalTpl ()=default
 default ctor
 NodalTpl (Params... Prms, bool tied=false)
 Ctor from values.
auto size () const
 Number of element.
auto nodeXcoord () const
 coordinate
auto Values () const
 Nodal values.
auto nodeNo () const noexcept
 Global node index.
std::optional< index_typetieNodeIdx () const
 boundary condition
auto isGhostNode () const noexcept
void setAsGhostNode ()
 Node part of global domain (not computational domain)
bool isGNode () const
 tuple implement '<=>' spaceship operator
bool isTiedNode () const
auto operator<=> (const NodalTpl &aOther) const =default
 logical operator ==,!=, <,<=,>,>= data member tuple implement '<=>' spaceship operator

Public Attributes

bool m_tiedNode { false }
bool m_ghostNode { false }
std::tuple< Params... > m_tpl

Detailed Description

template<typename... Params>
struct dbpp::NodalTpl< Params >

Implementation for nodal variable concept used in our application (use of variadic template).

Nodal values concept: a node can be represented by a set 2,3,4,... ndf (number degree of freedom) the number of attributes is not constant.

Template Parameters
...Paramsparameter pack @Usage Example of use: Nodaltpl<unsigned (id), double (x-coord)> 2-element tuple which represent values at node: node no nd x-coordinate

Member Typedef Documentation

◆ index_type

template<typename... Params>
using dbpp::NodalTpl< Params >::index_type = std::tuple_element_t<0, decltype(m_tpl)>

first tuple element type

◆ value_type

template<typename... Params>
using dbpp::NodalTpl< Params >::value_type = std::tuple_element_t<1, decltype(m_tpl)>

Alias (second tuple element type)

Constructor & Destructor Documentation

◆ NodalTpl() [1/2]

template<typename... Params>
dbpp::NodalTpl< Params >::NodalTpl ( )
default

default ctor

◆ NodalTpl() [2/2]

template<typename... Params>
dbpp::NodalTpl< Params >::NodalTpl ( Params... Prms,
bool tied = false )
inline

Ctor from values.

Parameters
...Prmsparameter pack
tiedflag boundary condition

Member Function Documentation

◆ isGhostNode()

template<typename... Params>
auto dbpp::NodalTpl< Params >::isGhostNode ( ) const
inlinenoexcept
Returns

◆ isGNode()

template<typename... Params>
bool dbpp::NodalTpl< Params >::isGNode ( ) const
inline

tuple implement '<=>' spaceship operator

◆ isTiedNode()

template<typename... Params>
bool dbpp::NodalTpl< Params >::isTiedNode ( ) const
inline
Returns

◆ nodeNo()

template<typename... Params>
auto dbpp::NodalTpl< Params >::nodeNo ( ) const
inlinenoexcept

Global node index.

Returns
node number

◆ nodeXcoord()

template<typename... Params>
auto dbpp::NodalTpl< Params >::nodeXcoord ( ) const
inline

coordinate

Returns
x-coordinate

◆ operator<=>()

template<typename... Params>
auto dbpp::NodalTpl< Params >::operator<=> ( const NodalTpl< Params > & aOther) const
default

logical operator ==,!=, <,<=,>,>= data member tuple implement '<=>' spaceship operator

Returns

◆ setAsGhostNode()

template<typename... Params>
void dbpp::NodalTpl< Params >::setAsGhostNode ( )
inline

Node part of global domain (not computational domain)

◆ size()

template<typename... Params>
auto dbpp::NodalTpl< Params >::size ( ) const
inline

Number of element.

Returns
Nodal size

◆ tieNodeIdx()

template<typename... Params>
std::optional< index_type > dbpp::NodalTpl< Params >::tieNodeIdx ( ) const
inline

boundary condition

Returns
value

◆ Values()

template<typename... Params>
auto dbpp::NodalTpl< Params >::Values ( ) const
inline

Nodal values.

Returns
tuple of values

Member Data Documentation

◆ m_ghostNode

template<typename... Params>
bool dbpp::NodalTpl< Params >::m_ghostNode { false }

extra node at far right end

◆ m_tiedNode

template<typename... Params>
bool dbpp::NodalTpl< Params >::m_tiedNode { false }

tied node (half-open bondary)

◆ m_tpl

template<typename... Params>
std::tuple<Params...> dbpp::NodalTpl< Params >::m_tpl

pack expansion


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