lduCalculatedProcessorField< Type > Class Template Reference

A lduProcessorField type bypassing coupledFvPatchField and holding a reference to the Field<Type>. More...

Inheritance diagram for lduCalculatedProcessorField< Type >:
[legend]
Collaboration diagram for lduCalculatedProcessorField< Type >:
[legend]

Public Member Functions

 ClassName ("lduCalculatedProcessorField")
 Runtime type information. More...
 
 lduCalculatedProcessorField (const lduInterface &interface, const Field< Type > &)
 Construct from patch and internal field. More...
 
 lduCalculatedProcessorField (const lduCalculatedProcessorField< Type > &)
 Construct as copy. More...
 
virtual ~lduCalculatedProcessorField ()=default
 Destructor. More...
 
virtual label comm () const
 Return communicator used for comms. More...
 
virtual int myProcNo () const
 Return processor number. More...
 
virtual int neighbProcNo () const
 Return neighbour processor number. More...
 
virtual bool doTransform () const
 Is the transform required. More...
 
virtual const tensorFieldforwardT () const
 Return face transformation tensor. More...
 
virtual int rank () const
 Return rank of component for transform. More...
 
virtual bool ready () const
 Is all data available. More...
 
virtual void initInterfaceMatrixUpdate (solveScalarField &result, const bool add, const lduAddressing &lduAddr, const label patchId, const solveScalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const
 Initialise neighbour matrix update. More...
 
virtual void updateInterfaceMatrix (solveScalarField &result, const bool add, const lduAddressing &lduAddr, const label patchId, const solveScalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const
 Update result field based on interface functionality. More...
 
virtual void initInterfaceMatrixUpdate (Field< scalar > &result, const bool add, const lduAddressing &lduAddr, const label patchId, const Field< scalar > &psiInternal, const scalarField &coeffs, const Pstream::commsTypes commsType) const
 Initialise neighbour matrix update. More...
 
virtual void updateInterfaceMatrix (Field< scalar > &result, const bool add, const lduAddressing &lduAddr, const label patchId, const Field< scalar > &psiInternal, const scalarField &coeffs, const Pstream::commsTypes commsType) const
 Update result field based on interface functionality. More...
 
- Public Member Functions inherited from LduInterfaceField< Type >
 TypeName ("LduInterfaceField")
 Runtime type information. More...
 
 LduInterfaceField (const lduInterface &patch)
 Construct given coupled patch. More...
 
virtual ~LduInterfaceField ()=default
 Destructor. More...
 
virtual void initInterfaceMatrixUpdate (Field< Type > &, const bool add, const lduAddressing &, const label interfacei, const Field< Type > &, const scalarField &, const Pstream::commsTypes commsType) const
 Initialise neighbour matrix update. More...
 
virtual void updateInterfaceMatrix (Field< Type > &, const bool add, const lduAddressing &, const label interfacei, const Field< Type > &, const scalarField &, const Pstream::commsTypes commsType) const =0
 Update result field based on interface functionality. More...
 
virtual void initInterfaceMatrixUpdate (solveScalarField &result, const bool add, const lduAddressing &, const label interfacei, const solveScalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const
 Inherit initInterfaceMatrixUpdate from lduInterfaceField. More...
 
virtual void updateInterfaceMatrix (solveScalarField &result, const bool add, const lduAddressing &, const label interfacei, const solveScalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const=0
 Inherit updateInterfaceMatrix from lduInterfaceField. More...
 
- Public Member Functions inherited from lduInterfaceField
 TypeName ("lduInterfaceField")
 Runtime type information. More...
 
 lduInterfaceField (const lduInterface &patch)
 Construct given coupled patch. More...
 
virtual ~lduInterfaceField ()=default
 Destructor. More...
 
const lduInterfaceinterface () const
 Return the interface. More...
 
virtual const wordinterfaceFieldType () const
 Return the interface type. More...
 
bool updatedMatrix () const
 Whether matrix has been updated. More...
 
boolupdatedMatrix ()
 Whether matrix has been updated. More...
 
virtual bool ready () const
 Is all data available. More...
 
virtual void initInterfaceMatrixUpdate (solveScalarField &result, const bool add, const lduAddressing &, const label interfacei, const solveScalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const
 
virtual void updateInterfaceMatrix (solveScalarField &result, const bool add, const lduAddressing &, const label interfacei, const solveScalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const =0
 
template<class Type >
void addToInternalField (Field< Type > &result, const bool add, const labelUList &faceCells, const scalarField &coeffs, const Field< Type > &vals) const
 Add/subtract weighted contributions to internal field. More...
 
- Public Member Functions inherited from processorLduInterfaceField
 TypeName ("processorLduInterfaceField")
 Runtime type information. More...
 
 processorLduInterfaceField ()=default
 Construct null. More...
 
virtual ~processorLduInterfaceField ()=default
 Destructor. More...
 
virtual label comm () const =0
 Return communicator used for comms. More...
 
virtual int myProcNo () const =0
 Return processor number. More...
 
virtual int neighbProcNo () const =0
 Return neighbour processor number. More...
 
virtual bool doTransform () const =0
 Is the transform required. More...
 
virtual const tensorFieldforwardT () const =0
 Return face transformation tensor. More...
 
virtual int rank () const =0
 Return rank of component for transform. More...
 
template<class Type >
void transformCoupleField (Field< Type > &f) const
 Transform given patch field. More...
 
void transformCoupleField (solveScalarField &f, const direction cmpt) const
 Transform given patch component field. More...
 

Protected Member Functions

void addToInternalField (solveScalarField &result, const bool add, const scalarField &coeffs, const solveScalarField &vals) const
 

Protected Attributes

const lduPrimitiveProcessorInterfaceprocInterface_
 Local reference cast into the interface. More...
 
const Field< Type > & field_
 Local Field. More...
 
Field< Type > sendBuf_
 Send buffer. More...
 
Field< Type > receiveBuf_
 Receive buffer. More...
 
solveScalarField scalarSendBuf_
 Scalar send buffer. More...
 
solveScalarField scalarReceiveBuf_
 Scalar receive buffer. More...
 
label outstandingSendRequest_
 Outstanding request. More...
 
label outstandingRecvRequest_
 Outstanding request. More...
 

Detailed Description

template<class Type>
class Foam::lduCalculatedProcessorField< Type >

A lduProcessorField type bypassing coupledFvPatchField and holding a reference to the Field<Type>.

Used to add updateInterfaceMatrix capabilities to a lduMatrix which is fully uncoupled from the fvMesh.

Its functionality is purely to init and update the processor interfaces.

Source files

Definition at line 62 of file lduCalculatedProcessorField.H.

Constructor & Destructor Documentation

◆ lduCalculatedProcessorField() [1/2]

lduCalculatedProcessorField ( const lduInterface interface,
const Field< Type > &  iF 
)

Construct from patch and internal field.

Definition at line 33 of file lduCalculatedProcessorField.C.

References Foam::refCast().

Here is the call graph for this function:

◆ lduCalculatedProcessorField() [2/2]

Construct as copy.

Definition at line 52 of file lduCalculatedProcessorField.C.

◆ ~lduCalculatedProcessorField()

virtual ~lduCalculatedProcessorField ( )
virtualdefault

Destructor.

Member Function Documentation

◆ addToInternalField()

void addToInternalField ( solveScalarField result,
const bool  add,
const scalarField coeffs,
const solveScalarField vals 
) const
protected

Definition at line 168 of file lduCalculatedProcessorField.C.

References Foam::add(), and forAll.

Here is the call graph for this function:

◆ ClassName()

ClassName ( "lduCalculatedProcessorField< Type >"  )

Runtime type information.

◆ comm()

virtual label comm ( ) const
inlinevirtual

Return communicator used for comms.

Implements processorLduInterfaceField.

Definition at line 140 of file lduCalculatedProcessorField.H.

References lduPrimitiveProcessorInterface::comm(), and lduCalculatedProcessorField< Type >::procInterface_.

Here is the call graph for this function:

◆ myProcNo()

virtual int myProcNo ( ) const
inlinevirtual

Return processor number.

Implements processorLduInterfaceField.

Definition at line 146 of file lduCalculatedProcessorField.H.

References lduPrimitiveProcessorInterface::myProcNo(), and lduCalculatedProcessorField< Type >::procInterface_.

Here is the call graph for this function:

◆ neighbProcNo()

virtual int neighbProcNo ( ) const
inlinevirtual

Return neighbour processor number.

Implements processorLduInterfaceField.

Definition at line 152 of file lduCalculatedProcessorField.H.

References lduPrimitiveProcessorInterface::myProcNo(), and lduCalculatedProcessorField< Type >::procInterface_.

Here is the call graph for this function:

◆ doTransform()

virtual bool doTransform ( ) const
inlinevirtual

Is the transform required.

Implements processorLduInterfaceField.

Definition at line 158 of file lduCalculatedProcessorField.H.

◆ forwardT()

virtual const tensorField & forwardT ( ) const
inlinevirtual

Return face transformation tensor.

Implements processorLduInterfaceField.

Definition at line 164 of file lduCalculatedProcessorField.H.

References lduPrimitiveProcessorInterface::forwardT(), and lduCalculatedProcessorField< Type >::procInterface_.

Here is the call graph for this function:

◆ rank()

virtual int rank ( ) const
inlinevirtual

Return rank of component for transform.

Implements processorLduInterfaceField.

Definition at line 170 of file lduCalculatedProcessorField.H.

◆ ready()

bool ready
virtual

Is all data available.

Reimplemented from lduInterfaceField.

Definition at line 72 of file lduCalculatedProcessorField.C.

References UPstream::finishedRequest(), and UPstream::nRequests().

Here is the call graph for this function:

◆ initInterfaceMatrixUpdate() [1/2]

void initInterfaceMatrixUpdate ( solveScalarField result,
const bool  add,
const lduAddressing lduAddr,
const label  patchId,
const solveScalarField psiInternal,
const scalarField coeffs,
const direction  cmpt,
const Pstream::commsTypes  commsType 
) const
virtual

Initialise neighbour matrix update.

Reimplemented from lduInterfaceField.

Definition at line 105 of file lduCalculatedProcessorField.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, UPstream::nonBlocking, UPstream::nRequests(), lduAddressing::patchAddr(), patchId(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::read(), UList< T >::size(), and ObukhovLength::write().

Here is the call graph for this function:

◆ updateInterfaceMatrix() [1/2]

void updateInterfaceMatrix ( solveScalarField result,
const bool  add,
const lduAddressing lduAddr,
const label  patchId,
const solveScalarField psiInternal,
const scalarField coeffs,
const direction  cmpt,
const Pstream::commsTypes  commsType 
) const
virtual

Update result field based on interface functionality.

Implements lduInterfaceField.

Definition at line 196 of file lduCalculatedProcessorField.C.

References Foam::add(), UPstream::nRequests(), and UPstream::waitRequest().

Here is the call graph for this function:

◆ initInterfaceMatrixUpdate() [2/2]

virtual void initInterfaceMatrixUpdate ( Field< scalar > &  result,
const bool  add,
const lduAddressing lduAddr,
const label  patchId,
const Field< scalar > &  psiInternal,
const scalarField coeffs,
const Pstream::commsTypes  commsType 
) const
inlinevirtual

Initialise neighbour matrix update.

Definition at line 208 of file lduCalculatedProcessorField.H.

References NotImplemented.

◆ updateInterfaceMatrix() [2/2]

virtual void updateInterfaceMatrix ( Field< scalar > &  result,
const bool  add,
const lduAddressing lduAddr,
const label  patchId,
const Field< scalar > &  psiInternal,
const scalarField coeffs,
const Pstream::commsTypes  commsType 
) const
inlinevirtual

Update result field based on interface functionality.

Definition at line 223 of file lduCalculatedProcessorField.H.

References NotImplemented.

Member Data Documentation

◆ procInterface_

◆ field_

const Field<Type>& field_
protected

Local Field.

Definition at line 75 of file lduCalculatedProcessorField.H.

◆ sendBuf_

Field<Type> sendBuf_
mutableprotected

Send buffer.

Definition at line 80 of file lduCalculatedProcessorField.H.

◆ receiveBuf_

Field<Type> receiveBuf_
mutableprotected

Receive buffer.

Definition at line 83 of file lduCalculatedProcessorField.H.

◆ scalarSendBuf_

solveScalarField scalarSendBuf_
mutableprotected

Scalar send buffer.

Definition at line 86 of file lduCalculatedProcessorField.H.

◆ scalarReceiveBuf_

solveScalarField scalarReceiveBuf_
mutableprotected

Scalar receive buffer.

Definition at line 89 of file lduCalculatedProcessorField.H.

◆ outstandingSendRequest_

label outstandingSendRequest_
mutableprotected

Outstanding request.

Definition at line 92 of file lduCalculatedProcessorField.H.

◆ outstandingRecvRequest_

label outstandingRecvRequest_
mutableprotected

Outstanding request.

Definition at line 95 of file lduCalculatedProcessorField.H.


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