|
Nektar++
|
Per-block interface of the weak Laplacian: applies the operator to every element of one block. More...
#include <LaplacianBlockOp.hpp>
Public Member Functions | |
| void | SetDiffCoeff (std::vector< TData > &diffCoeff) |
| Set the packed diffusion tensor for subsequent Apply() calls; see LaplacianOp::SetDiffCoeff for the packing order. | |
| void | SetVarDiffCoeff (LibUtilities::BlockAccessor< TData, FieldState::Phys > &diffCoeff) |
| Borrow a physical-space tensor block in the constant tensor's order. | |
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< LaplacianBlockOp< TData > > | Create (const unsigned int block_idx, const LocalRegions::ExpansionSharedPtr &exp, LibUtilities::NekDataWarehouseSharedPtr dataWarehouse, const std::string &execStr, const std::string &implStr) |
Create one Laplacian block operator through the block-operator factory, under the key "BlockLaplacian" + execStr + implStr. | |
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 = "BlockLaplacian" |
| Block-operator base name; Create() appends the execution space and implementation to it to form the factory key. | |
Protected Member Functions | |
| LaplacianBlockOp (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. | |
| ~LaplacianBlockOp () 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 | |
| bool | m_useDiffCoeff = false |
| Apply the tensor; false selects the direct geometric metric for constant unit diffusion. | |
| LibUtilities::BlockAccessor< TData, FieldState::Phys > * | m_varDiffCoeff |
| Non-owning pointer; values are read anew on every Apply(). | |
| LibUtilities::MemoryRegion< TData > | m_diffCoeff |
| Packed symmetric diffusion tensor; set by SetDiffCoeff() before Apply(). | |
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. | |
Per-block interface of the weak Laplacian: applies the operator to every element of one block.
Sets the block states accepted by Apply() – coefficient space in and out – and carries the diffusion tensor m_diffCoeff shared by all implementations. The concrete implementations are the detail::LaplacianBlockOpImpl definitions in the headers listed in LaplacianOp.hpp; CMake includes exactly one of them per generated translation unit, matching the execution-space/implementation pair that unit registers with the block-operator factory.
| TData | Floating-point type of the field data. |
Definition at line 74 of file LaplacianBlockOp.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 175 of file LaplacianBlockOp.hpp.
|
overrideprotecteddefault |
|
inlinestatic |
Create one Laplacian block operator through the block-operator factory, under the key "BlockLaplacian" + execStr + implStr.
| block_idx | Index of the block within the expansion list's Collections. |
| exp | Representative expansion of the block (its first element). |
| dataWarehouse | Data warehouse shared with the other operators on the expansion list. |
| execStr | Execution-space part of the factory key. |
| implStr | Implementation part of the factory key. |
Definition at line 93 of file LaplacianBlockOp.hpp.
|
inline |
Set the packed diffusion tensor for subsequent Apply() calls; see LaplacianOp::SetDiffCoeff for the packing order.
The entries are copied into a MemoryRegion, from which the implementations obtain a pointer in the memory space they run in.
| diffCoeff | Packed tensor entries. |
Definition at line 117 of file LaplacianBlockOp.hpp.
References ASSERTL0, Nektar::MultiRegions::LaplacianBlockOp< TData >::m_diffCoeff, Nektar::MultiRegions::BlockOperator< TData >::m_exp, Nektar::MultiRegions::LaplacianBlockOp< TData >::m_useDiffCoeff, and Nektar::MultiRegions::LaplacianBlockOp< TData >::m_varDiffCoeff.
|
inline |
Borrow a physical-space tensor block in the constant tensor's order.
Definition at line 139 of file LaplacianBlockOp.hpp.
References ASSERTL0, Nektar::LibUtilities::BlockAccessor< TData, TState >::GetNumComponents(), Nektar::LibUtilities::BlockAttributes< TState >::GetNumData(), Nektar::MultiRegions::BlockOperator< TData >::m_exp, Nektar::MultiRegions::LaplacianBlockOp< TData >::m_useDiffCoeff, and Nektar::MultiRegions::LaplacianBlockOp< TData >::m_varDiffCoeff.
|
protected |
Packed symmetric diffusion tensor; set by SetDiffCoeff() before Apply().
Definition at line 163 of file LaplacianBlockOp.hpp.
Referenced by Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::ApplyImpl(), Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), and Nektar::MultiRegions::LaplacianBlockOp< TData >::SetDiffCoeff().
|
protected |
Apply the tensor; false selects the direct geometric metric for constant unit diffusion.
Definition at line 155 of file LaplacianBlockOp.hpp.
Referenced by Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::LaplacianBlockOp< TData >::SetDiffCoeff(), and Nektar::MultiRegions::LaplacianBlockOp< TData >::SetVarDiffCoeff().
|
protected |
Non-owning pointer; values are read anew on every Apply().
Definition at line 158 of file LaplacianBlockOp.hpp.
Referenced by Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::ApplyImpl(), Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::OperatorND(), Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::LaplacianBlockOp< TData >::SetDiffCoeff(), Nektar::MultiRegions::LaplacianBlockOp< TData >::SetVarDiffCoeff(), and Nektar::MultiRegions::detail::LaplacianBlockOpImpl< 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 106 of file LaplacianBlockOp.hpp.