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

#include <NeuBndCondOp.hpp>

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

Public Member Functions

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.
 

Static Public Member Functions

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

static const std::string name = "NeuBndCond"
 

Protected Member Functions

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

Protected Attributes

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 TData>
class Nektar::MultiRegions::NeuBndCondOp< TData >

Definition at line 44 of file NeuBndCondOp.hpp.

Constructor & Destructor Documentation

◆ NeuBndCondOp()

template<typename TData >
Nektar::MultiRegions::NeuBndCondOp< TData >::NeuBndCondOp ( const MultiRegions::ExpListSharedPtr &  expansionList,
const std::vector< std::string > &  components 
)
inlineprotected

Definition at line 128 of file NeuBndCondOp.hpp.

130 : Operator<TData>(expansionList, components)
131 {
132 }

◆ ~NeuBndCondOp()

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

Member Function Documentation

◆ AddNeumannSurfaceIntegral()

template<typename TData >
void Nektar::MultiRegions::NeuBndCondOp< TData >::AddNeumannSurfaceIntegral ( LibUtilities::MemoryRegion< TData > &  data)
inline

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.

A singular (all-Neumann or periodic) system is solvable only when the domain integral of its forcing matches this surface integral. The sum is local to the rank and is not read back to the host, so that a caller reduces it across ranks and reads it back. Each block of boundary values is summed on the stream that wrote it.

Definition at line 103 of file NeuBndCondOp.hpp.

104 {
106 }
virtual void v_AddNeumannSurfaceIntegral(LibUtilities::MemoryRegion< TData > &data)=0

References Nektar::MultiRegions::NeuBndCondOp< TData >::v_AddNeumannSurfaceIntegral().

◆ Apply()

template<typename TData >
void Nektar::MultiRegions::NeuBndCondOp< TData >::Apply ( LibUtilities::Field< TData, FieldState::Coeff > &  inout)
inline

Definition at line 58 of file NeuBndCondOp.hpp.

59 {
60 v_Apply(inout);
61 }
virtual void v_Apply(LibUtilities::Field< TData, FieldState::Coeff > &inout)=0

References Nektar::MultiRegions::NeuBndCondOp< TData >::v_Apply().

◆ Create()

template<typename TData >
static std::shared_ptr< NeuBndCondOp< TData > > Nektar::MultiRegions::NeuBndCondOp< TData >::Create ( const MultiRegions::ExpListSharedPtr &  expansionList,
const std::vector< std::string > &  components,
const std::string &  execStr = "" 
)
inlinestatic

Definition at line 47 of file NeuBndCondOp.hpp.

51 {
52 return Operator<TData>::template Create<NeuBndCondOp>(
53 expansionList, components, execStr);
54 }

Referenced by TestNeumann< TData >::RunTestCase().

◆ ExcludeUserDefinedType()

template<typename TData >
void Nektar::MultiRegions::NeuBndCondOp< TData >::ExcludeUserDefinedType ( const std::string &  userDefinedType)
inline

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.

Collective over the row communicator: every rank calls it, with the same userDefinedType. Called before the operator is first used, it only records the type.

Definition at line 119 of file NeuBndCondOp.hpp.

120 {
121 v_ExcludeUserDefinedType(userDefinedType);
122 }
virtual void v_ExcludeUserDefinedType(const std::string &userDefinedType)=0

References Nektar::MultiRegions::NeuBndCondOp< TData >::v_ExcludeUserDefinedType().

◆ GetNumBndDofs()

template<typename TData >
size_t Nektar::MultiRegions::NeuBndCondOp< TData >::GetNumBndDofs ( )
inline

Definition at line 84 of file NeuBndCondOp.hpp.

85 {
86 return v_GetNumBndDofs();
87 }
virtual size_t v_GetNumBndDofs()=0

References Nektar::MultiRegions::NeuBndCondOp< TData >::v_GetNumBndDofs().

◆ operator()()

template<typename TData >
void Nektar::MultiRegions::NeuBndCondOp< TData >::operator() ( LibUtilities::Field< TData, FieldState::Coeff > &  inout)
inline

Definition at line 63 of file NeuBndCondOp.hpp.

64 {
65 v_Apply(inout);
66 }

References Nektar::MultiRegions::NeuBndCondOp< TData >::v_Apply().

◆ UpdateBndCoeffs()

template<typename TData >
void Nektar::MultiRegions::NeuBndCondOp< TData >::UpdateBndCoeffs ( const TData &  time = 0.0)
inline

◆ v_AddNeumannSurfaceIntegral()

template<typename TData >
virtual void Nektar::MultiRegions::NeuBndCondOp< TData >::v_AddNeumannSurfaceIntegral ( LibUtilities::MemoryRegion< TData > &  data)
protectedpure virtual

◆ v_Apply()

template<typename TData >
virtual void Nektar::MultiRegions::NeuBndCondOp< TData >::v_Apply ( LibUtilities::Field< TData, FieldState::Coeff > &  inout)
protectedpure virtual

◆ v_ExcludeUserDefinedType()

template<typename TData >
virtual void Nektar::MultiRegions::NeuBndCondOp< TData >::v_ExcludeUserDefinedType ( const std::string &  userDefinedType)
protectedpure virtual

◆ v_GetNumBndDofs()

template<typename TData >
virtual size_t Nektar::MultiRegions::NeuBndCondOp< TData >::v_GetNumBndDofs ( )
protectedpure virtual

◆ v_UpdateBndCoeffs()

template<typename TData >
virtual void Nektar::MultiRegions::NeuBndCondOp< TData >::v_UpdateBndCoeffs ( const TData &  time)
protectedpure virtual

Member Data Documentation

◆ m_bndCoeffsInitialised

template<typename TData >
bool Nektar::MultiRegions::NeuBndCondOp< TData >::m_bndCoeffsInitialised = false
protected

◆ m_hasTimeDependentBndCoeffs

template<typename TData >
bool Nektar::MultiRegions::NeuBndCondOp< TData >::m_hasTimeDependentBndCoeffs = false
protected

◆ name

template<typename TData >
const std::string Nektar::MultiRegions::NeuBndCondOp< TData >::name = "NeuBndCond"
inlinestatic

Definition at line 56 of file NeuBndCondOp.hpp.