39 const word& fieldName,
50 const label fieldi =
source.applyToField(fieldName);
58 const bool ok =
source.isActive();
71 <<
" for field " << fieldName <<
endl;
76 source.addSup(mtx, fieldi);
122 const word& fieldName
158 <<
" for field " << fieldName <<
endl;
190 const word& fieldName
227 <<
" for field " << fieldName <<
endl;
266 this->mesh_.time().timeName(),
306 const word& fieldName
338 Info<<
"(Inactive constrain)";
341 <<
" for field " << eqn.
psi().name() <<
endl;
356 GeometricField<Type, fvPatchField, volMesh>&
field 359 const word& fieldName =
field.name();
361 for (fv::option& source : *
this)
363 const label fieldi = source.applyToField(fieldName);
367 addProfiling(fvopt,
"fvOption::correct." + source.name());
369 source.setApplied(fieldi);
371 const bool ok = source.isActive();
381 Info<<
"(Inactive correct)";
383 Info<<
" source " << source.name()
384 <<
" for field " << fieldName <<
endl;
389 source.correct(
field);
399 Field<Type>& sensField,
400 const word& fieldName,
401 const word& designVariablesName
404 for (fv::option& source : *
this)
406 const label fieldi = source.applyToField(fieldName);
410 addProfiling(fvopt,
"fvOption::postProcessSens." + source.name());
412 const bool ok = source.isActive();
416 Info<<
"Post processing sensitivity source " 417 << source.name() <<
" for field " << fieldName <<
endl;
422 source.postProcessSens
#define addProfiling(name, descr)
Define profiling trigger with specified name and description string.
void correct(GeometricField< Type, fvPatchField, volMesh > &field)
Apply correction to field.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
void postProcessSens(Field< Type > &sensField, const word &fieldName=word::null, const word &designVariablesName=word::null)
Post process sensitivity field related to the fvOption.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Generic GeometricField class.
tmp< fvMatrix< Type > > source(GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName, const dimensionSet &ds)
Return source for equation with specified name and dimensions.
void setApplied(const label fieldi)
Set the applied flag to true for field index fieldi.
Ignore writing from objectRegistry::writeObject()
const dimensionSet dimless
Dimensionless.
const dimensionSet dimVolume(pow3(dimLength))
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
const GeometricField< Type, fvPatchField, volMesh > & psi(const label i=0) const
Return psi.
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
tmp< GeometricField< Type, faPatchField, areaMesh > > d2dt2(const dimensioned< Type > dt, const faMesh &mesh)
virtual void addSup(fvMatrix< scalar > &eqn, const label fieldi)
A class for handling words, derived from Foam::string.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
const word & name() const noexcept
Return const access to the source name.
friend Ostream & operator(Ostream &os, const UPtrList< T > &list)
Write UPtrList to Ostream.
const dimensionSet & dimensions() const noexcept
Return const reference to dimensions.
void constrain(fvMatrix< Type > &eqn)
Apply constraints to equation.
void checkApplied() const
Check that all sources have been applied.
int debug
Static debugging option.
virtual void constrain(fvMatrix< scalar > &eqn, const label fieldi)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
messageStream Info
Information stream (stdout output on master, null elsewhere)
virtual bool isActive()
Is the source active?
virtual label applyToField(const word &fieldName) const
Return index of field name if found in fieldNames list.
A class for managing temporary objects.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
tmp< fvMatrix< Type > > d2dt2(GeometricField< Type, fvPatchField, volMesh > &field)
Return source for equation with second time derivative.
Defines the attributes of an object for which implicit objectRegistry management is supported...
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
Base abstract class for handling finite volume options (i.e. fvOption).