Nektar++
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
Nektar::MultiRegions::AdvectionDealiasBlockOp< TData > Class Template Reference

#include <AdvectionDealiasBlockOp.hpp>

Inheritance diagram for Nektar::MultiRegions::AdvectionDealiasBlockOp< TData >:
[legend]

Public Member Functions

void SetScale (const TData &scale)
 
void SetAppend (const bool &append)
 
void SetAdvVel (LibUtilities::BlockAccessor< TData, FieldState::Phys > &Vel)
 
- Public Member Functions inherited from Nektar::MultiRegions::ElmtBlockOp< FieldState::Phys, FieldState::Phys, 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< AdvectionDealiasBlockOp< TData > > Create (const unsigned int block_idx, const LocalRegions::ExpansionSharedPtr &exp, LibUtilities::NekDataWarehouseSharedPtr dataWarehouse, const std::string &execStr, const std::string &implStr)
 
- Static Public Member Functions inherited from Nektar::MultiRegions::ElmtBlockOp< FieldState::Phys, FieldState::Phys, 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 = "BlockAdvectionDealias"
 

Protected Member Functions

 AdvectionDealiasBlockOp (const unsigned int block_idx, const LocalRegions::ExpansionSharedPtr &exp, LibUtilities::NekDataWarehouseSharedPtr dataWarehouse)
 
 ~AdvectionDealiasBlockOp () override=default
 
- Protected Member Functions inherited from Nektar::MultiRegions::ElmtBlockOp< FieldState::Phys, FieldState::Phys, 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.
 

Static Protected Member Functions

static std::vector< unsigned int > GetScaledNumPoints (const std::vector< unsigned int > &nq, const NekDouble scale)
 The per-direction point counts of the scale over-integrated grid this operator's interpolation and projection matrices are built for.
 
- Static Protected Member Functions inherited from Nektar::MultiRegions::ElmtBlockOp< FieldState::Phys, FieldState::Phys, 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.
 

Protected Attributes

TData m_scale = 1.0
 
bool m_append = false
 
LibUtilities::BlockAccessor< TData, FieldState::Phys > * m_advVel = nullptr
 
- Protected Attributes inherited from Nektar::MultiRegions::ElmtBlockOp< FieldState::Phys, FieldState::Phys, 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::Phys, FieldState::Phys, 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.
 

Detailed Description

template<typename TData>
class Nektar::MultiRegions::AdvectionDealiasBlockOp< TData >

Definition at line 45 of file AdvectionDealiasBlockOp.hpp.

Constructor & Destructor Documentation

◆ AdvectionDealiasBlockOp()

template<typename TData >
Nektar::MultiRegions::AdvectionDealiasBlockOp< TData >::AdvectionDealiasBlockOp ( const unsigned int  block_idx,
const LocalRegions::ExpansionSharedPtr &  exp,
LibUtilities::NekDataWarehouseSharedPtr  dataWarehouse 
)
inlineprotected

Definition at line 82 of file AdvectionDealiasBlockOp.hpp.

86 : ElmtBlockOp<FieldState::Phys, FieldState::Phys, TData>(block_idx, exp,
87 dataWarehouse)
88 {
89 }

◆ ~AdvectionDealiasBlockOp()

template<typename TData >
Nektar::MultiRegions::AdvectionDealiasBlockOp< TData >::~AdvectionDealiasBlockOp ( )
overrideprotecteddefault

Member Function Documentation

◆ Create()

template<typename TData >
static std::shared_ptr< AdvectionDealiasBlockOp< TData > > Nektar::MultiRegions::AdvectionDealiasBlockOp< TData >::Create ( const unsigned int  block_idx,
const LocalRegions::ExpansionSharedPtr &  exp,
LibUtilities::NekDataWarehouseSharedPtr  dataWarehouse,
const std::string &  execStr,
const std::string &  implStr 
)
inlinestatic

Definition at line 49 of file AdvectionDealiasBlockOp.hpp.

54 {
55 return ElmtBlockOp<FieldState::Phys, FieldState::Phys, TData>::
56 template Create<AdvectionDealiasBlockOp>(
57 block_idx, exp, dataWarehouse, execStr, implStr);
58 }

◆ GetScaledNumPoints()

template<typename TData >
static std::vector< unsigned int > Nektar::MultiRegions::AdvectionDealiasBlockOp< TData >::GetScaledNumPoints ( const std::vector< unsigned int > &  nq,
const NekDouble  scale 
)
inlinestaticprotected

The per-direction point counts of the scale over-integrated grid this operator's interpolation and projection matrices are built for.

Direction 0 scales outright, and a direction carrying one point fewer than direction 0 keeps that offset, which is what lets the switch templating see the same relationship on the over-integrated grid as on the native one.

Definition at line 101 of file AdvectionDealiasBlockOp.hpp.

103 {
104 std::vector<unsigned int> nqScaled;
105 nqScaled.reserve(nq.size());
106
107 for (size_t d = 0; d < nq.size(); ++d)
108 {
109 nqScaled.push_back((d != 0 && nq[0] - nq[d] == 1)
110 ? static_cast<unsigned int>(scale * nq[0]) -
111 1
112 : static_cast<unsigned int>(scale * nq[d]));
113 }
114
115 return nqScaled;
116 }
std::vector< double > d(NPUPPER *NPUPPER)

Referenced by Nektar::MultiRegions::detail::AdvectionDealiasBlockOpImpl< ExecSpace, Implementation, TData >::AdvectionDealiasBlockOpImpl().

◆ SetAdvVel()

template<typename TData >
void Nektar::MultiRegions::AdvectionDealiasBlockOp< TData >::SetAdvVel ( LibUtilities::BlockAccessor< TData, FieldState::Phys > &  Vel)
inline

Definition at line 72 of file AdvectionDealiasBlockOp.hpp.

73 {
74 m_advVel = &Vel;
75 }
LibUtilities::BlockAccessor< TData, FieldState::Phys > * m_advVel

References Nektar::MultiRegions::AdvectionDealiasBlockOp< TData >::m_advVel.

◆ SetAppend()

template<typename TData >
void Nektar::MultiRegions::AdvectionDealiasBlockOp< TData >::SetAppend ( const bool &  append)
inline

Definition at line 67 of file AdvectionDealiasBlockOp.hpp.

68 {
69 this->m_append = append;
70 }
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const bool append

References Nektar::MultiRegions::AdvectionDealiasBlockOp< TData >::m_append.

◆ SetScale()

template<typename TData >
void Nektar::MultiRegions::AdvectionDealiasBlockOp< TData >::SetScale ( const TData &  scale)
inline

Member Data Documentation

◆ m_advVel

template<typename TData >
LibUtilities::BlockAccessor<TData, FieldState::Phys>* Nektar::MultiRegions::AdvectionDealiasBlockOp< TData >::m_advVel = nullptr
protected

◆ m_append

template<typename TData >
bool Nektar::MultiRegions::AdvectionDealiasBlockOp< TData >::m_append = false
protected

◆ m_scale

template<typename TData >
TData Nektar::MultiRegions::AdvectionDealiasBlockOp< TData >::m_scale = 1.0
protected

◆ name

template<typename TData >
const std::string Nektar::MultiRegions::AdvectionDealiasBlockOp< TData >::name = "BlockAdvectionDealias"
inlinestatic

Definition at line 60 of file AdvectionDealiasBlockOp.hpp.