79#ifndef Foam_solution_H
80#define Foam_solution_H
143 solution(
const solution&) =
delete;
146 void operator=(
const solution&) =
delete;
248 template<
class FieldType>
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
A HashTable of pointers to objects of type <T>, with deallocation management of the pointers.
IOdictionary(const IOobject &io, const dictionary *fallback=nullptr)
Construct given an IOobject and optional fallback dictionary content.
readOption
Enumeration defining read preferences.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
const word & name() const
Name function is needed to disambiguate those inherited from regIOobject and dictionary.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
word dictName() const
The local dictionary name (final part of scoped name).
A class for handling file names.
Registry of regIOobjects.
bool cache(const word &name) const
True if the given field should be cached.
virtual ~solution()
Destructor. Non-default in header (incomplete types).
const dictionary & solver(const word &name) const
The solver controls dictionary for the given field. Same as solverDict(...).
static void cachePrintMessage(const char *message, const word &name, const FieldType &fld)
Helper for printing cache message.
const dictionary & solversDict() const
The solver controls dictionary (all fields).
bool relaxField(const word &name) const
True if the relaxation factor is given for the field.
scalar fieldRelaxationFactor(const word &name) const
Get the relaxation factor for the given field. Fatal if not found.
const dictionary & solverDict(const word &name) const
The solver controls dictionary for the given field. Same as solversDict().subDict(....
static label upgradeSolverDict(dictionary &dict, const bool verbose=true)
Update from older solver controls syntax.
scalar equationRelaxationFactor(const word &name) const
Get the relaxation factor for the given equation. Fatal if not found.
static int debug
Debug switch (registered name: "solution").
bool relaxEquation(const word &name) const
True if the relaxation factor is given for the equation.
const dictionary & solutionDict() const
The entire dictionary or the optional "select" sub-dictionary.
bool read()
Read the solution dictionary.
A class for handling words, derived from Foam::string.