Nektar++
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Nektar::detail::HOutflowVelocityAdapter< ExecSpace, TData > Class Template Reference

The Neumann condition of the velocity system, which applies the velocity flux of the HOutflowBndCondOpImpl set by SetOwner(). More...

#include <HOutflowBndCondOpImpl.hpp>

Inheritance diagram for Nektar::detail::HOutflowVelocityAdapter< ExecSpace, TData >:
[legend]

Public Member Functions

 HOutflowVelocityAdapter (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components)
 
void SetOwner (HOutflowBndCondOpImpl< ExecSpace, TData > *owner)
 Set the operator whose velocity flux Apply() applies, which must outlive this one.
 
- Public Member Functions inherited from Nektar::MultiRegions::NeuBndCondOp< TData >
void Apply (LibUtilities::Field< TData, FieldState::Coeff > &inout)
 
void operator() (LibUtilities::Field< TData, FieldState::Coeff > &inout)
 
void UpdateBndCoeffs (const TData &time=0.0)
 
size_t GetNumBndDofs ()
 
void AddNeumannSurfaceIntegral (LibUtilities::MemoryRegion< TData > &data)
 Add the surface integral of the Neumann boundary values on this rank, per component, as of their last update, to data[c] for component c, or data[c * nHomo + p] for plane p of a field with nHomo homogeneous planes, in the memory space of the operator's execution space.
 
void ExcludeUserDefinedType (const std::string &userDefinedType)
 Leave the boundary regions whose Neumann condition has USERDEFINEDTYPE userDefinedType, compared without regard to case, to another operator, which supplies their Neumann value: this operator no longer applies them.
 
- 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.
 

Protected Member Functions

void v_Apply (LibUtilities::Field< TData, FieldState::Coeff > &inout) override
 
void v_UpdateBndCoeffs (const TData &time) override
 
size_t v_GetNumBndDofs () override
 
void v_AddNeumannSurfaceIntegral (LibUtilities::MemoryRegion< TData > &data) override
 
void v_ExcludeUserDefinedType (const std::string &userDefinedType) override
 
- Protected Member Functions inherited from Nektar::MultiRegions::NeuBndCondOp< TData >
 NeuBndCondOp (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components)
 
 ~NeuBndCondOp () override=default
 

Private Attributes

HOutflowBndCondOpImpl< ExecSpace, TData > * m_owner = nullptr
 

Additional Inherited Members

- Static Public Member Functions inherited from Nektar::MultiRegions::NeuBndCondOp< TData >
static std::shared_ptr< NeuBndCondOp< 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 inherited from Nektar::MultiRegions::NeuBndCondOp< TData >
static const std::string name = "NeuBndCond"
 
- Protected Attributes inherited from Nektar::MultiRegions::NeuBndCondOp< TData >
bool m_bndCoeffsInitialised = false
 
bool m_hasTimeDependentBndCoeffs = false
 
- 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.
 

Detailed Description

template<typename ExecSpace, typename TData>
class Nektar::detail::HOutflowVelocityAdapter< ExecSpace, TData >

The Neumann condition of the velocity system, which applies the velocity flux of the HOutflowBndCondOpImpl set by SetOwner().

Apply() computes the flux with HOutflowBndCondOp::ApplyVelocity(), from the solved pressure set by HOutflowBndCondOp::SetPressure() and the boundary data of the last HOutflowBndCondOp::UpdatePressure(), and adds its inner product to the velocity forcing, so the flux is never older than the pressure.

Definition at line 129 of file HOutflowBndCondOpImpl.hpp.

Constructor & Destructor Documentation

◆ HOutflowVelocityAdapter()

template<typename ExecSpace , typename TData >
Nektar::detail::HOutflowVelocityAdapter< ExecSpace, TData >::HOutflowVelocityAdapter ( const MultiRegions::ExpListSharedPtr &  expansionList,
const std::vector< std::string > &  components 
)
inline

Definition at line 132 of file HOutflowBndCondOpImpl.hpp.

134 : MultiRegions::NeuBndCondOp<TData>(expansionList, components)
135 {
136 }

Member Function Documentation

◆ SetOwner()

template<typename ExecSpace , typename TData >
void Nektar::detail::HOutflowVelocityAdapter< ExecSpace, TData >::SetOwner ( HOutflowBndCondOpImpl< ExecSpace, TData > *  owner)
inline

Set the operator whose velocity flux Apply() applies, which must outlive this one.

Definition at line 140 of file HOutflowBndCondOpImpl.hpp.

141 {
142 m_owner = owner;
143 }
HOutflowBndCondOpImpl< ExecSpace, TData > * m_owner

References Nektar::detail::HOutflowVelocityAdapter< ExecSpace, TData >::m_owner.

◆ v_AddNeumannSurfaceIntegral()

template<typename ExecSpace , typename TData >
void Nektar::detail::HOutflowVelocityAdapter< ExecSpace, TData >::v_AddNeumannSurfaceIntegral ( LibUtilities::MemoryRegion< TData > &  data)
inlineoverrideprotectedvirtual

Implements Nektar::MultiRegions::NeuBndCondOp< TData >.

Definition at line 162 of file HOutflowBndCondOpImpl.hpp.

164 {
165 m_owner->AddVelocitySurfaceIntegral(data);
166 }

References Nektar::detail::HOutflowVelocityAdapter< ExecSpace, TData >::m_owner.

◆ v_Apply()

template<typename ExecSpace , typename TData >
void Nektar::detail::HOutflowVelocityAdapter< ExecSpace, TData >::v_Apply ( LibUtilities::Field< TData, FieldState::Coeff > &  inout)
inlineoverrideprotectedvirtual

◆ v_ExcludeUserDefinedType()

template<typename ExecSpace , typename TData >
void Nektar::detail::HOutflowVelocityAdapter< ExecSpace, TData >::v_ExcludeUserDefinedType ( const std::string &  userDefinedType)
inlineoverrideprotectedvirtual

Implements Nektar::MultiRegions::NeuBndCondOp< TData >.

Definition at line 168 of file HOutflowBndCondOpImpl.hpp.

170 {
171 NEKERROR(ErrorUtil::efatal, "The HOutflow velocity condition applies "
172 "only its own regions; it has no default "
173 "regions to exclude.");
174 }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...

References Nektar::ErrorUtil::efatal, and NEKERROR.

◆ v_GetNumBndDofs()

template<typename ExecSpace , typename TData >
size_t Nektar::detail::HOutflowVelocityAdapter< ExecSpace, TData >::v_GetNumBndDofs ( )
inlineoverrideprotectedvirtual

Implements Nektar::MultiRegions::NeuBndCondOp< TData >.

Definition at line 157 of file HOutflowBndCondOpImpl.hpp.

158 {
159 return m_owner->GetNumVelocityBndDofs();
160 }

References Nektar::detail::HOutflowVelocityAdapter< ExecSpace, TData >::m_owner.

◆ v_UpdateBndCoeffs()

template<typename ExecSpace , typename TData >
void Nektar::detail::HOutflowVelocityAdapter< ExecSpace, TData >::v_UpdateBndCoeffs ( const TData &  time)
inlineoverrideprotectedvirtual

Implements Nektar::MultiRegions::NeuBndCondOp< TData >.

Definition at line 151 of file HOutflowBndCondOpImpl.hpp.

152 {
153 // The flux depends on the solved pressure, not on the time alone:
154 // Apply() computes it.
155 }

Member Data Documentation

◆ m_owner

template<typename ExecSpace , typename TData >
HOutflowBndCondOpImpl<ExecSpace, TData>* Nektar::detail::HOutflowVelocityAdapter< ExecSpace, TData >::m_owner = nullptr
private