38 const word& fieldName,
49 const label fieldi =
source.applyToField(fieldName);
57 const bool ok =
source.isActive();
70 <<
" for field " << fieldName <<
endl;
100 const word& fieldName
125 const word& fieldName
161 <<
" for field " << fieldName <<
endl;
213 <<
" for field " <<
field.name() <<
endl;
241 const word& fieldName
273 Info<<
"(Inactive constrain)";
276 <<
" for field " << eqn.
psi().name() <<
endl;
291 GeometricField<Type, faPatchField, areaMesh>&
field 294 const word& fieldName =
field.name();
296 for (fa::option& source : *
this)
298 const label fieldi = source.applyToField(fieldName);
302 addProfiling(faopt,
"faOption::correct." + source.name());
304 source.setApplied(fieldi);
306 const bool ok = source.isActive();
316 Info<<
"(Inactive correct)";
318 Info<<
" source " << source.name()
319 <<
" for field " << fieldName <<
endl;
324 source.correct(
field);
#define addProfiling(name, descr)
Define profiling trigger with specified name and description string.
void constrain(faMatrix< Type > &eqn)
Apply constraints to equation.
virtual void constrain(faMatrix< scalar > &eqn, const label fieldi)
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Generic GeometricField class.
void setApplied(const label fieldi)
Set the applied flag to true for field index fieldi.
Base abstract class for handling finite area options (i.e. faOption).
void correct(GeometricField< Type, faPatchField, areaMesh > &field)
Apply correction to field.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
tmp< GeometricField< Type, faPatchField, areaMesh > > d2dt2(const dimensioned< Type > dt, const faMesh &mesh)
A class for handling words, derived from Foam::string.
virtual void addSup(const areaScalarField &h, faMatrix< scalar > &eqn, const label fieldi)
tmp< faMatrix< Type > > source(GeometricField< Type, faPatchField, areaMesh > &field, const areaScalarField &h, const word &fieldName, const dimensionSet &ds)
Return source for equation with specified name and dimensions.
friend Ostream & operator(Ostream &os, const UPtrList< T > &list)
Write UPtrList to Ostream.
const word & name() const noexcept
Return const access to the source name.
int debug
Static debugging option.
tmp< faMatrix< Type > > d2dt2(GeometricField< Type, faPatchField, areaMesh > &field)
Return source for equation with second time derivative.
const dimensionedScalar h
Planck constant.
A special matrix type and solver, designed for finite area solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
messageStream Info
Information stream (stdout output on master, null elsewhere)
const GeometricField< Type, faPatchField, areaMesh > & psi() const
virtual label applyToField(const word &fieldName) const
Return index of field name if found in fieldNames list.
virtual bool isActive()
Is the source active?
A class for managing temporary objects.
const dimensionSet dimArea(sqr(dimLength))
void checkApplied() const
Check that all sources have been applied.