|
Nektar++
|
#include <EnergyOpImpl.hpp>
Public Member Functions | |
| EnergyOpImpl (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components) | |
Public Member Functions inherited from Nektar::EnergyOp< TData > | |
| void | Configure (const std::vector< unsigned int > &velocityComponents) |
velocityComponents are the indices of the velocity components in the velocity field, which may hold further components. | |
| void | Apply (LibUtilities::Field< TData, FieldState::Phys > &velocity, LibUtilities::Field< TData, FieldState::Phys > &velocityGradient) |
| Collective: every rank must call it. | |
| void | operator() (LibUtilities::Field< TData, FieldState::Phys > &velocity, LibUtilities::Field< TData, FieldState::Phys > &velocityGradient) |
| Collective: as Apply(). | |
| void | SetRootOnly (const bool rootOnly) |
Reduce the results of the next Apply() to rank zero alone if rootOnly, else to every rank. | |
| TData | GetKineticEnergy () |
| Integral of the squared velocity magnitude from the last Apply(). | |
| TData | GetEnstrophy () |
| Integral of the squared vorticity magnitude from the last Apply(). | |
| TData | GetVolume () |
| Domain volume from the last Apply(). | |
Public Member Functions inherited from Nektar::MultiRegions::Operator< TData > | |
| virtual | ~Operator ()=default |
| Operator (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > components) | |
| Construct the interface part of a concrete operator; called by the factory-registered creator functions. | |
Static Public Member Functions | |
| static std::unique_ptr< MultiRegions::Operator< TData > > | Instantiate (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components) |
Static Public Member Functions inherited from Nektar::EnergyOp< TData > | |
| static std::shared_ptr< EnergyOp< TData > > | Create (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components, const std::string &execStr="") |
Static Public Member Functions inherited from Nektar::MultiRegions::Operator< TData > | |
| template<template< typename > typename TOperator> | |
| static std::shared_ptr< TOperator< TData > > | Create (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > components, const std::string &execStr) |
| Create a concrete operator instance through the operator factory. | |
| static std::string | GetOpExecSpace (std::shared_ptr< LibUtilities::SessionReader > session, const bool warn=true) |
| Return the execution space name ("opExecSpace") for an operator. | |
| static const DefaultOpImplRule * | GetDefaultOpImplRule (const StdRegions::StdExpansionSharedPtr &exp, const std::string &execSpace) |
| Return the row of the default implementation table (DefaultOpImplTable.hpp) that a block of elements takes, or null if none does. | |
| static std::string | GetDefaultOpImpl (const StdRegions::StdExpansionSharedPtr &exp, const std::string &execSpace) |
| Return the implementation a block of elements takes when neither the command line nor the session names one for its operator. | |
| static std::vector< unsigned int > | GetDefaultInterleaveWidths (const MultiRegions::ExpListSharedPtr &expansionList) |
Return the default interleave widths, one per block of expansionList, that persistent Fields (e.g. solution storage, time-integration and linear-solver workspace) built on it should be constructed with. | |
| static bool | IsDiscontinuousProjection (std::shared_ptr< LibUtilities::SessionReader > session) |
| Return true if the session uses a Discontinuous (DG) projection. | |
Static Public Attributes | |
| static std::string | className |
Static Public Attributes inherited from Nektar::EnergyOp< TData > | |
| static const std::string | name = "Energy" |
Protected Member Functions | |
| void | v_Configure (const std::vector< unsigned int > &velocityComponents) override |
| void | v_Apply (LibUtilities::Field< TData, FieldState::Phys > &velocity, LibUtilities::Field< TData, FieldState::Phys > &velocityGradient) override |
Protected Member Functions inherited from Nektar::EnergyOp< TData > | |
| EnergyOp (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components) | |
| ~EnergyOp () override=default | |
| TData | GetResult (const unsigned int index) |
Entry index of the reduced result, read on the host. | |
Protected Attributes | |
| std::array< std::vector< const TData * >, 2 > | m_metric |
| Quadrature metric of every point of each block, indexed by block, at interleave width one (first) and at m_implInterleaveWidth (second); null until a velocity is first read at that width. | |
| LibUtilities::MemoryRegion< TData > | m_planeWeights |
| Quadrature weight of each local homogeneous plane, of size m_numPlanes. | |
| std::array< unsigned int, 3 > | m_velocityComponents {} |
| unsigned int | m_dimension = 0 |
| unsigned int | m_numPlanes = 1 |
| Number of local planes, or 1 without a homogeneous direction. | |
Protected Attributes inherited from Nektar::EnergyOp< TData > | |
| bool | m_rootOnly = false |
| Whether Apply() reduces the results to rank zero alone. | |
| LibUtilities::MemoryRegion< TData > | m_result |
| Reduced result of Apply(), of size resultSize, allocated by the implementation's constructor. | |
Protected Attributes inherited from Nektar::MultiRegions::Operator< TData > | |
| MultiRegions::ExpListSharedPtr | m_expansionList |
| Expansion list the operator acts on. | |
| std::vector< std::string > | m_components |
| Names of the field components the operator was built for. | |
| LibUtilities::NekDataWarehouseSharedPtr | m_dataWarehouse |
| Data warehouse shared with the other operators on the expansion list, used to build and cache shared tables (basis matrices, mode indices, geometric factors) once. | |
Static Protected Attributes | |
| static constexpr unsigned int | m_implInterleaveWidth |
| Interleave width of the execution space: an input block is read at this width or at width one. | |
Static Protected Attributes inherited from Nektar::EnergyOp< TData > | |
| static constexpr unsigned int | kineticEnergy = 0 |
| Indices of the integrals in m_result. | |
| static constexpr unsigned int | enstrophy = 1 |
| static constexpr unsigned int | volume = 2 |
| static constexpr unsigned int | resultSize = 3 |
| Number of entries in m_result. | |
Private Types | |
| using | MemSpace = typename ExecSpace::memory_space |
Definition at line 50 of file EnergyOpImpl.hpp.
|
private |
Definition at line 52 of file EnergyOpImpl.hpp.
|
inline |
Definition at line 55 of file EnergyOpImpl.hpp.
References ASSERTL0, Nektar::MultiRegions::e3DH1D, Nektar::eHostPinned, Nektar::MultiRegions::GetCollections(), Nektar::detail::EnergyOpImpl< ExecSpace, TData >::m_dimension, Nektar::detail::EnergyOpImpl< ExecSpace, TData >::m_metric, Nektar::detail::EnergyOpImpl< ExecSpace, TData >::m_numPlanes, Nektar::detail::EnergyOpImpl< ExecSpace, TData >::m_planeWeights, and Nektar::EnergyOp< TData >::m_result.
|
inlinestatic |
Definition at line 112 of file EnergyOpImpl.hpp.
|
inlineoverrideprotectedvirtual |
Implements Nektar::EnergyOp< TData >.
Definition at line 147 of file EnergyOpImpl.hpp.
References ASSERTL0, ASSERTL1, Nektar::ErrorUtil::efatal, Nektar::LibUtilities::Field< TData, TState >::GetBlocks(), Nektar::LibUtilities::Field< TData, TState >::GetNumComponents(), Nektar::LibUtilities::Field< TData, TState >::GetNumHomoModes(), Nektar::MultiRegions::Operator< TData >::m_dataWarehouse, Nektar::detail::EnergyOpImpl< ExecSpace, TData >::m_dimension, Nektar::MultiRegions::Operator< TData >::m_expansionList, Nektar::detail::EnergyOpImpl< ExecSpace, TData >::m_implInterleaveWidth, Nektar::detail::EnergyOpImpl< ExecSpace, TData >::m_metric, Nektar::detail::EnergyOpImpl< ExecSpace, TData >::m_numPlanes, Nektar::detail::EnergyOpImpl< ExecSpace, TData >::m_planeWeights, Nektar::EnergyOp< TData >::m_result, Nektar::EnergyOp< TData >::m_rootOnly, Nektar::detail::EnergyOpImpl< ExecSpace, TData >::m_velocityComponents, NEKERROR, and Nektar::LibUtilities::ReduceSum.
|
inlineoverrideprotectedvirtual |
Implements Nektar::EnergyOp< TData >.
Definition at line 138 of file EnergyOpImpl.hpp.
References ASSERTL0, Nektar::detail::EnergyOpImpl< ExecSpace, TData >::m_dimension, and Nektar::detail::EnergyOpImpl< ExecSpace, TData >::m_velocityComponents.
|
static |
Definition at line 109 of file EnergyOpImpl.hpp.
|
protected |
Definition at line 134 of file EnergyOpImpl.hpp.
Referenced by Nektar::detail::EnergyOpImpl< ExecSpace, TData >::EnergyOpImpl(), Nektar::detail::EnergyOpImpl< ExecSpace, TData >::v_Apply(), and Nektar::detail::EnergyOpImpl< ExecSpace, TData >::v_Configure().
|
staticconstexprprotected |
Interleave width of the execution space: an input block is read at this width or at width one.
Definition at line 123 of file EnergyOpImpl.hpp.
Referenced by Nektar::detail::EnergyOpImpl< ExecSpace, TData >::v_Apply().
|
protected |
Quadrature metric of every point of each block, indexed by block, at interleave width one (first) and at m_implInterleaveWidth (second); null until a velocity is first read at that width.
Definition at line 129 of file EnergyOpImpl.hpp.
Referenced by Nektar::detail::EnergyOpImpl< ExecSpace, TData >::EnergyOpImpl(), and Nektar::detail::EnergyOpImpl< ExecSpace, TData >::v_Apply().
|
protected |
Number of local planes, or 1 without a homogeneous direction.
Definition at line 136 of file EnergyOpImpl.hpp.
Referenced by Nektar::detail::EnergyOpImpl< ExecSpace, TData >::EnergyOpImpl(), and Nektar::detail::EnergyOpImpl< ExecSpace, TData >::v_Apply().
|
protected |
Quadrature weight of each local homogeneous plane, of size m_numPlanes.
Definition at line 132 of file EnergyOpImpl.hpp.
Referenced by Nektar::detail::EnergyOpImpl< ExecSpace, TData >::EnergyOpImpl(), and Nektar::detail::EnergyOpImpl< ExecSpace, TData >::v_Apply().
|
protected |
Definition at line 133 of file EnergyOpImpl.hpp.
Referenced by Nektar::detail::EnergyOpImpl< ExecSpace, TData >::v_Apply(), and Nektar::detail::EnergyOpImpl< ExecSpace, TData >::v_Configure().