|
Nektar++
|
Base class of the per-block mass operators: applies the element mass matrix to every element of one block, coefficient space to coefficient space. More...
#include <MassBlockOp.hpp>
Public Member Functions | |
| void | SetAppend (const bool &append) |
| Set overwrite (false, the default) or accumulate (true) mode for subsequent Apply() calls; see MassOp::SetAppend(). | |
| void | SetScale (const TData &scale) |
| Set the scalar factor applied to the result; see MassOp::SetScale. | |
Public Member Functions inherited from Nektar::MultiRegions::ElmtBlockOp< FieldState::Coeff, FieldState::Coeff, TData > | |
| void | Apply (LibUtilities::BlockAccessor< TData, TFieldIn > &inblock, LibUtilities::BlockAccessor< TData, TFieldOut > &outblock) |
| Apply the element operation to every element of the block. | |
| void | operator() (LibUtilities::BlockAccessor< TData, TFieldIn > &inblock, LibUtilities::BlockAccessor< TData, TFieldOut > &outblock) |
| Call operator; equivalent to Apply(). | |
Public Member Functions inherited from Nektar::MultiRegions::BlockOperator< TData > | |
| virtual | ~BlockOperator ()=default |
Static Public Member Functions | |
| static std::shared_ptr< MassBlockOp< TData > > | Create (const unsigned int block_idx, const LocalRegions::ExpansionSharedPtr &exp, LibUtilities::NekDataWarehouseSharedPtr dataWarehouse, const std::string &execStr, const std::string &implStr) |
| Create one Mass block operator through the block-operator factory. | |
Static Public Member Functions inherited from Nektar::MultiRegions::ElmtBlockOp< FieldState::Coeff, FieldState::Coeff, TData > | |
| static std::shared_ptr< TOperator< TData > > | Create (const unsigned int block_idx, const LocalRegions::ExpansionSharedPtr &exp, LibUtilities::NekDataWarehouseSharedPtr dataWarehouse, const std::string &execStr, const std::string &implStr) |
| Create one block operator through the block-operator factory. | |
Static Public Member Functions inherited from Nektar::MultiRegions::BlockOperator< TData > | |
| template<template< typename > typename TOperator> | |
| static std::shared_ptr< TOperator< TData > > | Create (const unsigned int block_idx, const LocalRegions::ExpansionSharedPtr &exp, LibUtilities::NekDataWarehouseSharedPtr dataWarehouse, const std::string &execStr) |
| Create a concrete block-operator instance through the block-operator factory. | |
Static Public Attributes | |
| static const std::string | name = "BlockMass" |
| Block-operator base name; Create() appends the execution space and implementation to it to form the factory key. | |
Protected Member Functions | |
| MassBlockOp (const unsigned int block_idx, const LocalRegions::ExpansionSharedPtr &exp, LibUtilities::NekDataWarehouseSharedPtr dataWarehouse) | |
| Construct the interface part of a concrete block operator; called by the factory-registered creator functions. | |
| ~MassBlockOp () override=default | |
Protected Member Functions inherited from Nektar::MultiRegions::ElmtBlockOp< FieldState::Coeff, FieldState::Coeff, TData > | |
| ElmtBlockOp (const unsigned int block_idx, const LocalRegions::ExpansionSharedPtr &exp, LibUtilities::NekDataWarehouseSharedPtr dataWarehouse) | |
| Construct the interface part of a concrete block operator; called by the factory-registered creator functions. | |
| ~ElmtBlockOp () override=default | |
| virtual void | v_Apply (LibUtilities::BlockAccessor< TData, TFieldIn > &inblock, LibUtilities::BlockAccessor< TData, TFieldOut > &outblock)=0 |
| Implementation hook for Apply(). | |
Protected Member Functions inherited from Nektar::MultiRegions::BlockOperator< TData > | |
| BlockOperator (const unsigned int block_idx, const LocalRegions::ExpansionSharedPtr &exp, LibUtilities::NekDataWarehouseSharedPtr dataWarehouse) | |
| Construct the interface part of a concrete block operator; called by the factory-registered creator functions. | |
Protected Attributes | |
| TData | m_scale = 1.0 |
| Scalar factor applied to the result (default 1). | |
| bool | m_append = false |
| When true, Apply() adds the scaled result onto the output block's existing values instead of overwriting them. | |
Protected Attributes inherited from Nektar::MultiRegions::ElmtBlockOp< FieldState::Coeff, FieldState::Coeff, TData > | |
| bool | m_warnOnceTemplate |
| Set once the generated ShapeBlock switch code has warned that an element size outside the templated switch range fell back to the runtime-sized OperatorND call, so that the warning is issued only once per block operator (see the BlockOpSwitch templates in LibUtilities/BasicUtils/Switch). | |
Protected Attributes inherited from Nektar::MultiRegions::BlockOperator< TData > | |
| unsigned int | m_block_idx |
| Index of the block within the expansion list's Collections. | |
| LocalRegions::ExpansionSharedPtr | m_exp |
| Representative expansion of the block (its first element). | |
| LibUtilities::NekDataWarehouseSharedPtr | m_dataWarehouse |
| Data warehouse shared with the other operators on the expansion list. | |
Additional Inherited Members | |
Public Types inherited from Nektar::MultiRegions::ElmtBlockOp< FieldState::Coeff, FieldState::Coeff, TData > | |
| using | InBlock = LibUtilities::BlockAccessor< TData, TFieldIn > |
| Accessor type of this operator's input block. | |
| using | OutBlock = LibUtilities::BlockAccessor< TData, TFieldOut > |
| Accessor type of this operator's output block; see InBlock. | |
Static Protected Member Functions inherited from Nektar::MultiRegions::ElmtBlockOp< FieldState::Coeff, FieldState::Coeff, TData > | |
| static void | ShapeSwitch (const LibUtilities::ShapeType shape, TFunc &&func) |
Call func with the runtime shape as a compile-time constant, std::integral_constant<LibUtilities::ShapeType, ...>. | |
| static void | DispatchAppendFlag (const bool append, TFunc &&func) |
Call func with std::true_type if append and std::false_type otherwise. | |
| static void | DispatchScaleFlag (const TData scale, TFunc &&func) |
Call func with std::false_type if scale is one and std::true_type otherwise. | |
| static void | DispatchDeformedFlag (const bool deformed, TFunc &&func) |
Call func with std::true_type if deformed and std::false_type otherwise. | |
Static Protected Member Functions inherited from Nektar::MultiRegions::BlockOperator< TData > | |
| template<typename MemSpace > | |
| static TData * | GetStaticWorkSpace (const size_t size, const unsigned int streamID=0) |
Return a per-stream scratch buffer in MemSpace, sized to hold at least size elements of TData, growing and reallocating it as needed. | |
Base class of the per-block mass operators: applies the element mass matrix to every element of one block, coefficient space to coefficient space.
Sets the block states accepted by Apply() at compile time – coefficient space in and out – and stores the two settings shared by every implementation: the scale factor m_scale and the append flag m_append. MassOp::SetScale and SetAppend forward to the setters here block by block; the implementations read the settings in their v_Apply(). The concrete implementations are the detail::MassBlockOpImpl definitions listed in MassOp.hpp.
CMake generates one registration translation unit per execution space, implementation and data type (from ElmtOps/ElmtBlockOpFactoryDec.cpp.in) that includes exactly one detail::MassBlockOpImpl header and registers it under the matching execution-space/implementation key.
| TData | Floating-point type of the field data. |
Definition at line 77 of file MassBlockOp.hpp.
|
inlineprotected |
Construct the interface part of a concrete block operator; called by the factory-registered creator functions.
| block_idx | Index of the block within the expansion list's Collections. |
| exp | Representative expansion of the block. |
| dataWarehouse | Data warehouse shared with the other operators on the expansion list. |
Definition at line 146 of file MassBlockOp.hpp.
|
overrideprotecteddefault |
|
inlinestatic |
Create one Mass block operator through the block-operator factory.
The factory key is name + execStr + implStr; see ElmtBlockOp::Create for the lookup and fall-back rules.
| block_idx | Index of the block within the expansion list's Collections. |
| exp | Representative expansion of the block. |
| dataWarehouse | Data warehouse shared with the other operators on the expansion list. |
| execStr | Execution-space part of the key. |
| implStr | Implementation part of the key. |
Definition at line 98 of file MassBlockOp.hpp.
References Nektar::Coeff.
|
inline |
Set overwrite (false, the default) or accumulate (true) mode for subsequent Apply() calls; see MassOp::SetAppend().
Definition at line 117 of file MassBlockOp.hpp.
References Nektar::MultiRegions::MassBlockOp< TData >::m_append.
|
inline |
Set the scalar factor applied to the result; see MassOp::SetScale.
Definition at line 124 of file MassBlockOp.hpp.
References Nektar::MultiRegions::MassBlockOp< TData >::m_scale.
|
protected |
When true, Apply() adds the scaled result onto the output block's existing values instead of overwriting them.
Definition at line 134 of file MassBlockOp.hpp.
Referenced by Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::OperatorND(), Nektar::MultiRegions::MassBlockOp< TData >::SetAppend(), and Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply().
|
protected |
Scalar factor applied to the result (default 1).
Definition at line 131 of file MassBlockOp.hpp.
Referenced by Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::MassBlockOp< TData >::SetScale(), and Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply().
|
inlinestatic |
Block-operator base name; Create() appends the execution space and implementation to it to form the factory key.
Definition at line 113 of file MassBlockOp.hpp.