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

Pass scalar values (single numbers) between NekRS and MOOSE. More...

#include <NekScalarValue.h>

Inheritance diagram for NekScalarValue:
[legend]

Public Member Functions

 NekScalarValue (const InputParameters &parameters)
 
virtual void sendDataToNek () override
 Send data to Nek. More...
 
const unsigned int usrwrkSlot () const
 
const unsigned int offset () const
 
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 & _value
 The value to pass into NekRS, possibly multiplied by 'scaling'. More...
 
const PostprocessorName * _postprocessor
 Name of postprocessor to output the value sent into NekRS, for diagnostics. More...
 
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

Pass scalar values (single numbers) between NekRS and MOOSE.

Constructor & Destructor Documentation

◆ NekScalarValue()

NekScalarValue::NekScalarValue ( 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
inlineinherited

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 NekScalarValue::sendDataToNek ( )
overridevirtual

Send data to Nek.

Reimplemented from NekTransferBase.

◆ usrwrkSlot()

const unsigned int ScalarTransferBase::usrwrkSlot ( ) const
inlineinherited

Get the usrwrk slot that this transfer is using

Returns
usrwrk slot

◆ validParams()

static InputParameters NekScalarValue::validParams ( )
static

Member Data Documentation

◆ _counter

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

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
protectedinherited

Offset in the slot to write the scalar value.

◆ _postprocessor

const PostprocessorName* NekScalarValue::_postprocessor
protected

Name of postprocessor to output the value sent into NekRS, for diagnostics.

◆ _scaling

const Real& ScalarTransferBase::_scaling
protectedinherited

A multiplier to apply to the value passed in.

◆ _usrwrk_slot

unsigned int ScalarTransferBase::_usrwrk_slot
protectedinherited

Slot in usrwrk to write the scalar value.

◆ _value

const Real& NekScalarValue::_value
protected

The value to pass into NekRS, possibly multiplied by 'scaling'.


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