43 namespace functionObjects
56 bool Foam::functionObjects::sampledSets::verbose_ =
false;
61 void Foam::functionObjects::sampledSets::combineSampledSets()
63 masterSets_.setSize(size());
64 masterSetOrders_.setSize(size());
68 const sampledSet& s = operator[](seti);
70 Tuple2<coordSet, labelList> g = s.gather();
72 masterSets_.set(seti,
new coordSet(g.first()));
73 masterSetOrders_[seti] = g.second();
78 <<
"Sample set " << s.name()
79 <<
" has zero points." <<
endl;
106 outputPath_ = outputPath_/mesh_.name();
123 verbose_ = verbosity;
147 Pout<<
"Creating directory " 148 << outputPath_/mesh_.time().timeName() <<
nl <<
endl;
151 mkDir(outputPath_/mesh_.time().timeName());
158 #define FoundFieldType(Type, nullArg) \ 159 || foundObject<VolField<Type>>(fields_[fieldi]) 162 fieldNames.append(fields_[fieldi]);
166 cannotFindObject(fields_[fieldi]);
168 #undef FoundFieldType 173 #define DeclareInterpolations(Type, nullArg) \ 174 HashPtrTable<interpolation<Type>> interpolation##Type##s; 176 #undef DeclareInterpolations 181 #define GenerateFieldTypeValues(Type, nullArg) \ 182 PtrList<Field<Type>> field##Type##Values = \ 183 sampleType<Type>(seti, fieldNames, interpolation##Type##s); 185 #undef GenerateFieldTypeValues 193 outputPath_/mesh_.time().timeName(),
194 operator[](seti).name(),
197 #define FieldTypeValuesParameter(Type, nullArg) \ 198 , field##Type##Values 200 #undef FieldTypeValuesParameter 207 if (
operator[](seti).size())
211 outputPath_/mesh_.time().timeName(),
212 operator[](seti).name(),
215 #define FieldTypeValuesParameter(Type, nullArg) \ 216 , field##Type##Values 218 #undef FieldTypeValuesParameter 233 bool setsFound = dict_.found(
"sets");
236 dict_.lookup(
"fields") >> fields_;
238 dict.
lookup(
"interpolationScheme") >> interpolationScheme_;
240 const word writeType(dict.
lookup(
"setFormat"));
247 dict_.lookup(
"sets"),
251 combineSampledSets();
255 Info<<
"Reading set description:" <<
nl;
258 Info<<
" " << operator[](seti).name() <<
nl;
270 bool setsFound = dict_.found(
"sets");
273 searchEngine_.correct();
277 dict_.lookup(
"sets"),
281 combineSampledSets();
301 if (&map.
mesh() == &mesh_)
static autoPtr< setWriter > New(const word &writeType, const IOstream::streamFormat writeFormat=IOstream::ASCII, const IOstream::compressionType writeCompression=IOstream::UNCOMPRESSED)
Select given write options.
#define forAll(list, i)
Loop across all elements in list.
#define FieldTypeValuesParameter(Type, nullArg)
#define DeclareInterpolations(Type, nullArg)
A list of keyword definitions, which are a keyword followed by any number of values (e...
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-10/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));alphal=1.0 - alphav;Info<< "max-min alphav: "<< max(alphav).value()<< " "<< min(alphav).value()<< endl;psiModel-> correct()
#define FoundFieldType(Type, nullArg)
sampledSets(const word &name, const Time &time, const dictionary &dict)
Construct from Time and dictionary.
addToRunTimeSelectionTable(functionObject, Qdot, dictionary)
static const fileName null
An empty fileName.
virtual bool execute()
Execute, currently does nothing.
static word defaultRegion
Return the default region name.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define GenerateFieldTypeValues(Type, nullArg)
static bool master(const label communicator=0)
Am I the master process.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
static List< word > fieldNames
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
bool read(const char *, int32_t &)
static const word outputPrefix
Directory prefix.
virtual bool write()
Sample and write.
A class for handling words, derived from string.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
virtual void readUpdate(const polyMesh::readUpdateState state)
Update topology using the given map due to readUpdate.
static const word null
An empty word.
virtual ~sampledSets()
Destructor.
const polyMesh & mesh() const
Return polyMesh.
virtual bool read(const dictionary &)
Read the sampledSets.
Class used for the read-construction of.
virtual void movePoints(const polyMesh &)
Update for mesh point-motion.
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
word name(const complex &)
Return a string representation of a complex.
defineTypeNameAndDebug(Qdot, 0)
void correct()
Correct for mesh changes.
static bool & parRun()
Is this a parallel run?
#define WarningInFunction
Report a warning using Foam::Warning.
prefixOSstream Pout(cout, "Pout")
FOR_ALL_FIELD_TYPES(DefineFvWallInfoType)
void verbose(const bool verbosity=true)
Set verbosity level.
Mesh consisting of general polyhedral cells.
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
readUpdateState
Enumeration defining the state of the mesh after a read update.
Class containing mesh-to-mesh mapping information.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual wordList fields() const
Return the list of fields required.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.