Loading...
Searching...
No Matches
lduCalculatedProcessorField< Type > Class Template Reference

A lduProcessorField type bypassing coupledFvPatchField. More...

#include <lduCalculatedProcessorField.H>

Inheritance diagram for lduCalculatedProcessorField< Type >:
Collaboration diagram for lduCalculatedProcessorField< Type >:

Public Member Functions

 ClassName ("lduCalculatedProcessorField")
 Runtime type information.
 lduCalculatedProcessorField (const lduInterface &interface)
 Construct from ldu interface.
 lduCalculatedProcessorField (const lduCalculatedProcessorField< Type > &)
 Copy construct.
virtual ~lduCalculatedProcessorField ()=default
 Destructor.
virtual bool ready () const
 Are all (receive) data available?
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.
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.
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.
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.
virtual label comm () const
 Return communicator used for communication.
virtual int myProcNo () const
 Return processor number.
virtual int neighbProcNo () const
 Return neighbour processor number.
virtual bool doTransform () const
 Is the transform required.
virtual const tensorFieldforwardT () const
 Return face transformation tensor.
virtual int rank () const
 Return rank of component for transform.
Public Member Functions inherited from LduInterfaceField< Type >
 TypeName ("LduInterfaceField")
 Runtime type information.
 LduInterfaceField (const lduInterface &patch)
 Construct given coupled patch.
virtual ~LduInterfaceField ()=default
 Destructor.
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.
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.
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.
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.
Public Member Functions inherited from lduInterfaceField
 TypeName ("lduInterfaceField")
 Runtime type information.
 lduInterfaceField (const lduInterfaceField &)=delete
 No copy construct.
void operator= (const lduInterfaceField &)=delete
 No copy assignment.
 lduInterfaceField (const lduInterface &patch)
 Construct given coupled patch.
virtual ~lduInterfaceField ()=default
 Destructor.
const lduInterfaceinterface () const noexcept
 Return the interface.
virtual const wordinterfaceFieldType () const
 Return the interface type.
bool updatedMatrix () const noexcept
 Whether matrix has been updated.
bool updatedMatrix (bool flag) const noexcept
 Set matrix as update-to-date, return the previous value.
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.
bool & updatedMatrix () noexcept
 Adjust whether matrix has been updated.
Public Member Functions inherited from processorLduInterfaceField
 TypeName ("processorLduInterfaceField")
 Runtime type information.
 processorLduInterfaceField ()=default
 Default construct.
virtual ~processorLduInterfaceField ()=default
 Destructor.
template<class Type>
void transformCoupleField (Field< Type > &f) const
 Transform given patch field.
void transformCoupleField (solveScalarField &f, const direction cmpt) const
 Transform given patch component field.

Protected Member Functions

void addToInternalField (solveScalarField &result, const bool add, const scalarField &coeffs, const solveScalarField &vals) const
virtual bool all_ready () const
 Receive and send requests have both completed.

Protected Attributes

const lduPrimitiveProcessorInterfaceprocInterface_
 Local reference cast into the interface.
label sendRequest_
 Current (non-blocking) send request.
label recvRequest_
 Current (non-blocking) recv request.
Field< Type > sendBuf_
 Send buffer.
Field< Type > recvBuf_
 Receive buffer.
solveScalarField scalarSendBuf_
 Scalar send buffer.
solveScalarField scalarRecvBuf_
 Scalar recv buffer.

Detailed Description

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

A lduProcessorField type bypassing coupledFvPatchField.

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 57 of file lduCalculatedProcessorField.H.

Constructor & Destructor Documentation

◆ lduCalculatedProcessorField() [1/2]

template<class Type>
lduCalculatedProcessorField ( const lduInterface & interface)
explicit

Construct from ldu interface.

Definition at line 26 of file lduCalculatedProcessorField.C.

References lduInterfaceField::interface(), procInterface_, recvRequest_, Foam::refCast(), and sendRequest_.

Referenced by ClassName(), and lduCalculatedProcessorField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lduCalculatedProcessorField() [2/2]

template<class Type>
lduCalculatedProcessorField ( const lduCalculatedProcessorField< Type > & ptf)

Copy construct.

Definition at line 39 of file lduCalculatedProcessorField.C.

References lduCalculatedProcessorField(), procInterface_, recvRequest_, Foam::refCast(), and sendRequest_.

Here is the call graph for this function:

◆ ~lduCalculatedProcessorField()

template<class Type>
virtual ~lduCalculatedProcessorField ( )
virtualdefault

Destructor.

References Foam::add(), and patchId().

Here is the call graph for this function:

Member Function Documentation

◆ addToInternalField()

template<class Type>
void addToInternalField ( solveScalarField & result,
const bool add,
const scalarField & coeffs,
const solveScalarField & vals ) const
protected

Definition at line 132 of file lduCalculatedProcessorField.C.

References Foam::add(), forAll, and procInterface_.

Referenced by updateInterfaceMatrix().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ all_ready()

template<class Type>
bool all_ready ( ) const
protectedvirtual

Receive and send requests have both completed.

Definition at line 54 of file lduCalculatedProcessorField.C.

References UPstream::finishedRequestPair(), recvRequest_, and sendRequest_.

Referenced by initInterfaceMatrixUpdate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClassName()

template<class Type>
ClassName ( "lduCalculatedProcessorField< Type >" )

Runtime type information.

References lduInterfaceField::interface(), and lduCalculatedProcessorField().

Here is the call graph for this function:

◆ ready()

template<class Type>
bool ready ( ) const
virtual

Are all (receive) data available?

Reimplemented from lduInterfaceField.

Definition at line 61 of file lduCalculatedProcessorField.C.

References UPstream::finishedRequest(), recvRequest_, and sendRequest_.

Here is the call graph for this function:

◆ initInterfaceMatrixUpdate() [1/2]

template<class Type>
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

◆ updateInterfaceMatrix() [1/2]

template<class Type>
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 160 of file lduCalculatedProcessorField.C.

References Foam::add(), addToInternalField(), UPstream::finishedRequest(), patchId(), recvRequest_, scalarRecvBuf_, sendRequest_, lduInterfaceField::updatedMatrix(), and UPstream::waitRequest().

Here is the call graph for this function:

◆ initInterfaceMatrixUpdate() [2/2]

template<class Type>
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 196 of file lduCalculatedProcessorField.H.

References Foam::add(), NotImplemented, and patchId().

Here is the call graph for this function:

◆ updateInterfaceMatrix() [2/2]

template<class Type>
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 213 of file lduCalculatedProcessorField.H.

References Foam::add(), NotImplemented, and patchId().

Here is the call graph for this function:

◆ comm()

template<class Type>
virtual label comm ( ) const
inlinevirtual

Return communicator used for communication.

Implements processorLduInterfaceField.

Definition at line 233 of file lduCalculatedProcessorField.H.

References procInterface_.

◆ myProcNo()

template<class Type>
virtual int myProcNo ( ) const
inlinevirtual

Return processor number.

Implements processorLduInterfaceField.

Definition at line 241 of file lduCalculatedProcessorField.H.

References procInterface_.

◆ neighbProcNo()

template<class Type>
virtual int neighbProcNo ( ) const
inlinevirtual

Return neighbour processor number.

Implements processorLduInterfaceField.

Definition at line 249 of file lduCalculatedProcessorField.H.

References procInterface_.

◆ doTransform()

template<class Type>
virtual bool doTransform ( ) const
inlinevirtual

Is the transform required.

Implements processorLduInterfaceField.

Definition at line 257 of file lduCalculatedProcessorField.H.

◆ forwardT()

template<class Type>
virtual const tensorField & forwardT ( ) const
inlinevirtual

Return face transformation tensor.

Implements processorLduInterfaceField.

Definition at line 265 of file lduCalculatedProcessorField.H.

References procInterface_.

◆ rank()

template<class Type>
virtual int rank ( ) const
inlinevirtual

Return rank of component for transform.

Implements processorLduInterfaceField.

Definition at line 273 of file lduCalculatedProcessorField.H.

Member Data Documentation

◆ procInterface_

template<class Type>
const lduPrimitiveProcessorInterface& procInterface_
protected

◆ sendRequest_

template<class Type>
label sendRequest_
mutableprotected

◆ recvRequest_

template<class Type>
label recvRequest_
mutableprotected

◆ sendBuf_

template<class Type>
Field<Type> sendBuf_
mutableprotected

Send buffer.

Definition at line 87 of file lduCalculatedProcessorField.H.

◆ recvBuf_

template<class Type>
Field<Type> recvBuf_
mutableprotected

Receive buffer.

Definition at line 92 of file lduCalculatedProcessorField.H.

◆ scalarSendBuf_

template<class Type>
solveScalarField scalarSendBuf_
mutableprotected

Scalar send buffer.

Definition at line 97 of file lduCalculatedProcessorField.H.

Referenced by initInterfaceMatrixUpdate().

◆ scalarRecvBuf_

template<class Type>
solveScalarField scalarRecvBuf_
mutableprotected

Scalar recv buffer.

Definition at line 102 of file lduCalculatedProcessorField.H.

Referenced by initInterfaceMatrixUpdate(), and updateInterfaceMatrix().


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