Macros
DAMacroFunctions.H File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define makeState(regState, fieldType, db)
 
#define makeStateRes(regState, fieldType, db)
 
#define normalizeResiduals(resName)
 
#define normalizePhiResiduals(resName)
 
#define setResidualClassMemberScalar(stateName, stateUnit)
 
#define setResidualClassMemberVector(stateName, stateUnit)
 
#define setResidualClassMemberPhi(stateName)
 
#define assignValueCheckAD(valA, valB)   valA = valB;
 

Macro Definition Documentation

◆ makeState

#define makeState (   regState,
  fieldType,
  db 
)
Value:
const word stateName = regState; \
fieldType& state( \
const_cast<fieldType&>( \
db.lookupObject<fieldType>(stateName)));

Definition at line 15 of file DAMacroFunctions.H.

◆ makeStateRes

#define makeStateRes (   regState,
  fieldType,
  db 
)
Value:
const word stateName = regState; \
const word stateResName = stateName + "Res"; \
fieldType& stateRes( \
const_cast<fieldType&>( \
db.lookupObject<fieldType>(stateResName)));

Definition at line 21 of file DAMacroFunctions.H.

◆ normalizeResiduals

#define normalizeResiduals (   resName)
Value:
if (!DAUtility::isInList<word>(#resName, daOption_.getOption<wordList>("normalizeResiduals"))) \
{ \
forAll(resName##_, cellI) \
{ \
resName##_[cellI] *= mesh_.V()[cellI]; \
} \
}

Definition at line 28 of file DAMacroFunctions.H.

◆ normalizePhiResiduals

#define normalizePhiResiduals (   resName)
Value:
if (DAUtility::isInList<word>(#resName, daOption_.getOption<wordList>("normalizeResiduals"))) \
{ \
forAll(resName##_, faceI) \
{ \
resName##_[faceI] /= mesh_.magSf()[faceI]; \
} \
forAll(resName##_.boundaryField(), patchI) \
{ \
forAll(resName##_.boundaryField()[patchI], faceI) \
{ \
resName##_.boundaryFieldRef()[patchI][faceI] /= mesh_.magSf().boundaryField()[patchI][faceI]; \
} \
} \
}

Definition at line 37 of file DAMacroFunctions.H.

◆ setResidualClassMemberScalar

#define setResidualClassMemberScalar (   stateName,
  stateUnit 
)
Value:
stateName##_( \
const_cast<volScalarField&>( \
mesh.thisDb().lookupObject<volScalarField>(#stateName))), \
stateName##Res_( \
IOobject( \
#stateName "Res", \
mesh.time().timeName(), \
mesh, \
IOobject::NO_READ, \
IOobject::NO_WRITE), \
mesh, \
dimensionedScalar(#stateName "Res", stateUnit, 0.0), \
zeroGradientFvPatchField<scalar>::typeName)

Definition at line 53 of file DAMacroFunctions.H.

◆ setResidualClassMemberVector

#define setResidualClassMemberVector (   stateName,
  stateUnit 
)
Value:
stateName##_( \
const_cast<volVectorField&>( \
mesh.thisDb().lookupObject<volVectorField>(#stateName))), \
stateName##Res_( \
IOobject( \
#stateName "Res", \
mesh.time().timeName(), \
mesh, \
IOobject::NO_READ, \
IOobject::NO_WRITE), \
mesh, \
dimensionedVector(#stateName "Res", stateUnit, vector::zero), \
zeroGradientFvPatchField<vector>::typeName)

Definition at line 68 of file DAMacroFunctions.H.

◆ setResidualClassMemberPhi

#define setResidualClassMemberPhi (   stateName)
Value:
stateName##_( \
const_cast<surfaceScalarField&>( \
mesh.thisDb().lookupObject<surfaceScalarField>(#stateName))), \
stateName##Res_( \
IOobject( \
#stateName "Res", \
mesh.time().timeName(), \
mesh, \
IOobject::NO_READ, \
IOobject::NO_WRITE), \
mesh.thisDb().lookupObject<surfaceScalarField>(#stateName))

Definition at line 83 of file DAMacroFunctions.H.

◆ assignValueCheckAD

#define assignValueCheckAD (   valA,
  valB 
)    valA = valB;

Definition at line 103 of file DAMacroFunctions.H.

mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4