Cardinal
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
ScalarTransferBase Class Reference

Base class for transferring scalars (single numbers) between NekRS and MOOSE. More...

#include <ScalarTransferBase.h>

Inheritance diagram for ScalarTransferBase:
[legend]

Public Member Functions

 ScalarTransferBase (const InputParameters &parameters)
 
const unsigned int usrwrkSlot () const
 
const unsigned int offset () const
 
virtual void sendDataToNek ()
 Send data to Nek. More...
 
virtual void readDataFromNek ()
 Read data from Nek. More...
 
const MooseEnum & direction () const
 Get the direction of the transfer. More...
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

void addExternalPostprocessor (const std::string name, const Real initial)
 
void checkAllocatedUsrwrkSlot (const unsigned int &u) const
 

Protected Attributes

const Real & _scaling
 A multiplier to apply to the value passed in. More...
 
unsigned int _usrwrk_slot
 Slot in usrwrk to write the scalar value. More...
 
unsigned int _offset
 Offset in the slot to write the scalar value. More...
 
NekRSProblem_nek_problem
 The NekRSProblem using the field transfer interface. More...
 
NekRSMesh_nek_mesh
 The underlying NekRSMesh mirror. More...
 
const MooseEnum & _direction
 Direction of the transfer. More...
 

Static Protected Attributes

static std::map< unsigned int, unsigned int > _counter
 

Detailed Description

Base class for transferring scalars (single numbers) between NekRS and MOOSE.

Constructor & Destructor Documentation

◆ ScalarTransferBase()

ScalarTransferBase::ScalarTransferBase ( const InputParameters &  parameters)

Member Function Documentation

◆ addExternalPostprocessor()

void NekTransferBase::addExternalPostprocessor ( const std::string  name,
const Real  initial 
)
protectedinherited

Add a postprocessor to facilitate coupling

Parameters
[in]namepostprocessor name
[in]initialinitial value to use for the postprocessor

◆ checkAllocatedUsrwrkSlot()

void NekTransferBase::checkAllocatedUsrwrkSlot ( const unsigned int &  u) const
protectedinherited

Check if a specified slot in the usrwrk array has been allocated

Parameters
[in]uslice in usrwrk array

◆ direction()

const MooseEnum& NekTransferBase::direction ( ) const
inlineinherited

Get the direction of the transfer.

◆ offset()

const unsigned int ScalarTransferBase::offset ( ) const
inline

Get the offset in the slot where the single value is written

Returns
offset

◆ readDataFromNek()

virtual void NekTransferBase::readDataFromNek ( )
inlinevirtualinherited

Read data from Nek.

Reimplemented in NekBoundaryFlux, and NekFieldVariable.

◆ sendDataToNek()

virtual void NekTransferBase::sendDataToNek ( )
inlinevirtualinherited

◆ usrwrkSlot()

const unsigned int ScalarTransferBase::usrwrkSlot ( ) const
inline

Get the usrwrk slot that this transfer is using

Returns
usrwrk slot

◆ validParams()

static InputParameters ScalarTransferBase::validParams ( )
static

Member Data Documentation

◆ _counter

std::map<unsigned int, unsigned int> ScalarTransferBase::_counter
staticprotected

To allow multiple scalar numbers to be written into the same usrwrk slot (for memory efficiency), we allow multiple ScalarTransfers to write into the same slot. They are written by automatically incrementing each one by 1; this static variable keeps track of the last used offset in a given slot. Ordered as (usrwrk slot, last occupied entry)

◆ _direction

const MooseEnum& NekTransferBase::_direction
protectedinherited

Direction of the transfer.

◆ _nek_mesh

NekRSMesh* NekTransferBase::_nek_mesh
protectedinherited

The underlying NekRSMesh mirror.

◆ _nek_problem

NekRSProblem& NekTransferBase::_nek_problem
protectedinherited

The NekRSProblem using the field transfer interface.

◆ _offset

unsigned int ScalarTransferBase::_offset
protected

Offset in the slot to write the scalar value.

◆ _scaling

const Real& ScalarTransferBase::_scaling
protected

A multiplier to apply to the value passed in.

◆ _usrwrk_slot

unsigned int ScalarTransferBase::_usrwrk_slot
protected

Slot in usrwrk to write the scalar value.


The documentation for this class was generated from the following file: