73 "ATCModel" + adjointVars.solverName(),
81 primalVars_(primalVars),
82 adjointVars_(adjointVars),
84 extraConvection_(dict_.getOrDefault<scalar>(
"extraConvection",
Zero)),
85 extraDiffusion_(dict_.getOrDefault<scalar>(
"extraDiffusion",
Zero)),
86 nSmooth_(dict_.getOrDefault<label>(
"nSmooth", 0)),
89 dict_.getOrDefault(
"reconstructGradients", false)
91 adjointSolverName_(adjointVars.solverName()),
97 "ATClimiter" + adjointSolverName_,
111 "ATCField" + adjointSolverName_,
138 auto* ctorPtr = dictionaryConstructorTable(modelType);
140 Info<<
"ATCModel type " << modelType <<
endl;
149 *dictionaryConstructorTablePtr_
155 ctorPtr(
mesh, primalVars, adjointVars,
dict)
194 limiter.primitiveFieldRef() = 1;
195 limiter.correctBoundaryConditions();
198 for (
const label celli :
cells)
204 limiter.correctBoundaryConditions();
209 for (label iLimit = 0; iLimit < nSmooth; ++iLimit)
Base class for selecting the adjoint transpose convection model. Inherits from regIOobject to add loo...
static tmp< volScalarField > createLimiter(const fvMesh &mesh, const dictionary &dict)
const labelList & getZeroATCcells()
Get the list of cells on which to zero ATC.
const scalar extraDiffusion_
scalar getExtraDiffusionMultiplier()
Get the extra diffusion multiplier.
scalar getExtraConvectionMultiplier()
Get the extra convection multiplier.
const scalar extraConvection_
virtual void updatePrimalBasedQuantities()
Update quantities related with the primal fields.
const volScalarField & getLimiter() const
Get the list of cells on which to zero ATC.
void smoothATC()
Limit ATC field using ATClimiter_.
autoPtr< zeroATCcells > zeroATCcells_
volScalarField ATClimiter_
void computeLimiter()
Compute limiter based on the cells given by zeroATCcells.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
static word timeName(const scalar t, const int precision=precision_)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
Class including all adjoint fields for incompressible flows.
Base class for solution control classes.
LocalMin-mean differencing scheme class.
virtual tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &vf) const
Return the face-interpolate of the given cell field.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
Base class for selecting cells on which to zero the ATC term.
This boundary condition applies a zero-gradient condition from the patch internal field onto the patc...
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
#define DebugInfo
Report an information message using Foam::Info.
tmp< GeometricField< Type, fvPatchField, volMesh > > average(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Area-weighted average a surfaceField creating a volField.
const dimensionSet dimless
Dimensionless.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Type gMax(const FieldField< Field, Type > &f)
tmp< areaScalarField > limiter(const areaScalarField &phi)
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
zeroCells(alpha, inletCells)