Go to the documentation of this file.
36 namespace functionObjects
52 void Foam::functionObjects::mapFields::createInterpolation
54 const dictionary&
dict
57 const fvMesh& meshTarget =
mesh_;
58 const word mapRegionName(
dict.get<word>(
"mapRegion"));
61 <<
" Reading mesh " << mapRegionName <<
endl;
70 meshTarget.time().constant(),
77 const fvMesh& mapRegion = mapRegionPtr_();
78 const word mapMethodName(
dict.get<word>(
"mapMethod"));
82 <<
type() <<
" " <<
name() <<
": unknown map method "
83 << mapMethodName <<
nl
84 <<
"Available methods include: "
95 word patchMapMethodName =
102 if (
dict.readIfPresent(
"patchMapMethod", patchMapMethodName))
104 Info<<
" Patch mapping method: " << patchMapMethodName <<
endl;
107 Info<<
" Creating mesh to mesh interpolation" <<
endl;
109 if (
dict.get<
bool>(
"consistent"))
124 HashTable<word> patchMap;
127 dict.readEntry(
"patchMap", patchMap);
128 dict.readEntry(
"cuttingPatches", cuttingPatches);
148 Foam::functionObjects::mapFields::mapFields
170 dict.readEntry(
"fields", fieldNames_);
171 createInterpolation(
dict);
186 ok = mapFieldType<scalar>() || ok;
187 ok = mapFieldType<vector>() || ok;
188 ok = mapFieldType<sphericalTensor>() || ok;
189 ok = mapFieldType<symmTensor>() || ok;
190 ok = mapFieldType<tensor>() || ok;
211 ok = writeFieldType<scalar>() || ok;
212 ok = writeFieldType<vector>() || ok;
213 ok = writeFieldType<sphericalTensor>() || ok;
214 ok = writeFieldType<symmTensor>() || ok;
215 ok = writeFieldType<tensor>() || ok;
static const Enum< interpolationMethod > interpolationMethodNames_
static const Enum< interpolationMethod > interpolationMethodNames_
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
virtual bool write()
Calculate the mapFields and write.
bool read(const char *buf, int32_t &val)
Same as readInt32.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual bool read(const dictionary &)
Read the mapFields data.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
addToRunTimeSelectionTable(functionObject, add, dictionary)
List< word > wordList
A List of words.
virtual bool execute()
Execute, currently does nothing.
messageStream Info
Information stream (uses stdout - output is on the master only)
word name(const complex &c)
Return string representation of complex.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool read(const dictionary &dict)
Read optional controls.
dimensionedScalar log(const dimensionedScalar &ds)
Macros for easy insertion into run-time selection tables.
errorManipArg< error, int > exit(error &err, const int errNo=1)
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const word & name() const
Return the name of this functionObject.
interpolationMethod
Enumeration specifying interpolation method.
virtual const word & type() const =0
Runtime type information.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const fvMesh & mesh_
Reference to the fvMesh.
static AMIPatchToPatchInterpolation::interpolationMethod interpolationMethodAMI(const interpolationMethod method)
Conversion between mesh and patch interpolation methods.
#define Log
Report write to Foam::Info if the local log switch is true.