34 #include "mapMeshes.H" 41 int main(
int argc,
char *argv[])
45 "map volume fields from one mesh to another" 53 "scalar|'latestTime'",
54 "specify the source time" 60 "specify the source region" 66 "specify the target region" 71 "source and target geometry and boundary conditions identical" 77 "specify the mapping method" 83 "specify a list of fields to be mapped. Eg, '(U T p)' - " 84 "regular expressions not currently supported" 89 "skip mapping lagrangian positions and fields" 101 Info<<
"Source: " << rootDirSource <<
" " << caseDirSource <<
endl;
105 sourceRegion =
args[
"sourceRegion"];
106 Info<<
"Source region: " << sourceRegion <<
endl;
109 Info<<
"Target: " << rootDirTarget <<
" " << caseDirTarget <<
endl;
113 targetRegion =
args[
"targetRegion"];
114 Info<<
"Target region: " << targetRegion <<
endl;
124 cellVolumeWeightMethod::typeName
127 Info<<
"Mapping method: " << mapMethod <<
endl;
137 #include "createTimes.H" 157 mapFieldsDict.lookup(
"patchMap") >> patchMap;
158 mapFieldsDict.lookup(
"cuttingPatches") >> cuttingPatches;
161 #include "setTimeIndex.H" 187 Info<<
"Source mesh size: " << meshSource.nCells() <<
tab 188 <<
"Target mesh size: " << meshTarget.nCells() <<
nl <<
endl;
A HashTable with keys but without contents.
A class for handling file names.
const fileName & globalCaseName() const
Return case name.
void mapSubMesh(const fvMesh &meshSource, const fvMesh &meshTarget, const HashTable< word > &patchMap, const wordList &cuttingPatches, const meshToMesh0::order &mapOrder)
const fileName & rootPath() const
Return root path.
static word defaultRegion
Return the default region name.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool optionFound(const word &opt) const
Return true if the named option is found.
static SLList< string > validArgs
A list of valid (mandatory) arguments.
Time runTimeTarget(Time::controlDictName, args)
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
T optionLookupOrDefault(const word &opt, const T &deflt) const
Read a value from the named option if present.
Time runTimeSource(Time::controlDictName, argsSrc)
static word timeName(const scalar, const int precision=curPrecision_)
Return time name of given scalar time.
A class for handling words, derived from string.
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
word name() const
Return file name (part beyond last /)
An STL-conforming hash table.
const word & system() const
Return system name.
void mapConsistentMesh(const fvMesh &meshSource, const fvMesh &meshTarget, const meshToMesh0::order &mapOrder)
Mesh data needed to do the Finite Volume discretisation.
fileName path() const
Return directory path name (part before last /)
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
static void addNote(const string &)
Add extra notes for the usage information.
Foam::argList args(argc, argv)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
IStringStream optionLookup(const word &opt) const
Return an IStringStream from the named option.