112 using namespace Foam;
131 int main(
int argc,
char *argv[])
143 if (setFieldsDict.found(
"defaultValues"))
145 Info<<
"Setting field default values" <<
endl;
149 setFieldsDict.subDict(
"defaultValues"),
154 else if (setFieldsDict.found(
"defaultFieldValues"))
156 Info<<
"Setting field default values" <<
nl
157 <<
" The 'defaultFieldValues' entry is deprecated, "
158 "please use 'default'" <<
endl;
162 setFieldsDict.lookup(
"defaultFieldValues"),
168 if (setFieldsDict.found(
"zones"))
170 Info<<
"Setting field zone values" <<
endl;
176 Info<<
"Zone: " << iter().keyword() <<
endl;
185 const zoneSet zs(zg->generate());
189 setVolFields(
mesh, zoneDict.
subDict(
"values"), zs.cZone());
194 setPatchFields(
mesh, zoneDict.
subDict(
"values"), zs.fZone());
199 if (setFieldsDict.found(
"regions"))
203 Info<<
"Setting field region values" <<
nl
204 <<
" The 'regions' entry is deprecated, "
205 "please use 'zones'" <<
endl;
209 const entry& region = regions[ri];
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
static const List< label > & null()
Return a null List.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A collection of cell labels.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
A keyword and a list of tokens is an 'entry'.
const keyType & keyword() const
Return keyword.
virtual const dictionary & dict() const =0
Return dictionary if this entry is a dictionary.
Mesh data needed to do the Finite Volume discretisation.
wordList toc(const word &className) const
Return the list of names of IOobjects of given class name.
label nInternalFaces() const
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.
static instantList select0(Time &runTime, const argList &args)
Return the set of times selected based on the argList options.
static autoPtr< topoSetSource > New(const word &topoSetSourceType, const polyMesh &mesh, const dictionary &dict)
Return a reference to the selected topoSetSource.
static autoPtr< zoneGenerator > New(const word &name, const polyMesh &mesh, const dictionary &dict)
Select constructed from name, mesh and dictionary.
Zone container returned by zoneGenerator::generate.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
int main(int argc, char *argv[])
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOdictionary systemDict(const word &dictName, const argList &args, const objectRegistry &ob, const word ®ionName=polyMesh::defaultRegion, const fileName &path=fileName::null)
Foam::argList args(argc, argv)