37namespace functionObjects
52Foam::label Foam::functionObjects::ensightWrite::writeAllVolFields
54 const fvMeshSubset& proxy,
55 const wordHashSet& acceptField
60 count += writeVolFields<scalar>(proxy, acceptField);
61 count += writeVolFields<vector>(proxy, acceptField);
62 count += writeVolFields<sphericalTensor>(proxy, acceptField);
63 count += writeVolFields<symmTensor>(proxy, acceptField);
64 count += writeVolFields<tensor>(proxy, acceptField);
119 consecutive_ =
dict.getOrDefault(
"consecutive",
false);
121 writeOpts_.useBoundaryMesh(
dict.getOrDefault(
"boundary",
true));
122 writeOpts_.useInternalMesh(
dict.getOrDefault(
"internal",
true));
129 dict.getOrDefault(
"noPatches",
false)
130 && writeOpts_.useBoundaryMesh()
134 <<
"Use 'boundary' instead of 'noPatches' to enable/disable "
135 <<
"conversion of the boundaries" <<
endl;
139 if (
dict.readIfPresent(
"patches", list))
142 writeOpts_.patchSelection(list);
145 if (
dict.readIfPresent(
"faceZones", list))
148 writeOpts_.faceZoneSelection(list);
154 caseOpts_.nodeValues(
dict.getOrDefault(
"nodeValues",
false));
155 caseOpts_.width(
dict.getOrDefault<label>(
"width", 8));
156 caseOpts_.overwrite(
dict.getOrDefault(
"overwrite",
false));
162 dict.readIfPresent(
"directory", outputDir_);
164 if (outputDir_.size())
168 if (!outputDir_.isAbsolute())
170 outputDir_ = time_.globalPath()/outputDir_;
196 new ensightCase(outputDir_, time_.globalCaseName(), caseOpts_)
202 ensCase().nextTime(time_.value());
206 ensCase().setTime(time_.value(), time_.timeIndex());
215 ensMesh_().write(
os);
218 wordHashSet acceptField(mesh_.names<
void>(selectFields_));
223 [](
const word&
k){
return k.ends_with(
"_0"); },
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
label filterKeys(const UnaryPredicate &pred, const bool pruning=false)
Generalized means to filter table entries based on their keys.
The IOstreamOption is a simple container for options an IOstream can normally have.
void clear()
Clear the list, i.e. set size to zero.
virtual bool read()
Re-read model coefficients if they have changed.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
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,...
Supports writing of ensight cases as well as providing common factory methods to open new files.
Abstract base-class for Time/database function objects.
static word outputPrefix
Directory prefix.
Writes fields in ensight format.
virtual bool read(const dictionary &dict)
Read the ensightWrite specification.
virtual bool execute()
Do nothing.
virtual bool write()
Write fields, flush case file.
virtual bool end()
Do nothing at the final time-loop.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Mesh consisting of general polyhedral cells.
A List of wordRe with additional matching capabilities.
static wordRes uniq(const UList< wordRe > &input)
Return a wordRes with duplicate entries filtered out.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
OBJstream os(runTime.globalPath()/outputName)
#define WarningInFunction
Report a warning using Foam::Warning.
label writeAllVolFields(ensightCase &ensCase, const ensightMesh &ensMesh, const IOobjectList &objects, const bool nearCellValue=false)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
constexpr char nl
The newline '\n' character (0x0a)