Go to the documentation of this file.
37 namespace functionObjects
52 Foam::label Foam::functionObjects::ensightWrite::writeAllVolFields
54 const fvMeshSubset& proxy,
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);
72 Foam::functionObjects::ensightWrite::ensightWrite
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());
214 autoPtr<ensightGeoFile>
os = ensCase_().newGeometry(
true);
215 ensMesh_().write(
os);
218 wordHashSet acceptField(mesh_.names<
void>(selectFields_));
221 acceptField.filterKeys
223 [](
const word&
k){
return k.ends_with(
"_0"); },
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
bool read(const char *buf, int32_t &val)
virtual bool read(const dictionary &dict)
Ostream & endl(Ostream &os)
A HashTable with keys but without contents that is similar to std::unordered_set.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Mesh consisting of general polyhedral cells.
label writeAllVolFields(ensightCase &ensCase, const ensightMesh &ensMesh, const IOobjectList &objects, const bool nearCellValue=false)
The IOstreamOption is a simple container for options an IOstream can normally have.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool read(const dictionary &dict)
OBJstream os(runTime.globalPath()/outputName)
Macros for easy insertion into run-time selection tables.
Supports writing of ensight cases as well as providing common factory methods to open new files.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
unsigned int count(const UList< bool > &bools, const bool val=true)
static streamFormat formatEnum(const word &formatName, const streamFormat deflt=streamFormat::ASCII)
fileName::Type type(const fileName &name, const bool followLink=true)
A List of wordRe with additional matching capabilities.
defineTypeNameAndDebug(ObukhovLength, 0)
HashSet< word, Hash< word > > wordHashSet
A HashSet with word keys and string hasher.
word name(const expressions::valueTypeCode typeCode)
static wordRes uniq(const UList< wordRe > &input)
#define WarningInFunction