fieldCoordinateSystemTransform: Updated coordinateSystem construction and documentation

Resolves bug-report http://bugs.openfoam.org/view.php?id=3746
This commit is contained in:
Henry Weller
2021-10-24 11:33:56 +01:00
parent c515e74e00
commit cdefd71521
3 changed files with 7 additions and 54 deletions

View File

@ -56,7 +56,7 @@ fieldCoordinateSystemTransform
:
fvMeshFunctionObject(name, runTime, dict),
fields_(),
coordSys_(coordinateSystem::New(mesh_, dict.subDict("coordinateSystem"))())
coordSys_(coordinateSystem::New(mesh_, dict)())
{
read(dict);

View File

@ -35,7 +35,9 @@ Description
{
type fieldCoordinateSystemTransform;
libs ("libfieldFunctionObjects.so");
...
writeControl writeTime;
fields
(
U
@ -45,6 +47,7 @@ Description
coordinateSystem
{
type cartesian;
origin (0.001 0 0);
coordinateRotation
{

View File

@ -57,9 +57,7 @@ void Foam::functionObjects::fieldCoordinateSystemTransform::transform
if (mesh_.foundObject<VolFieldType>(fieldName))
{
DebugInfo
<< type() << ": Field " << fieldName << " already in database"
<< endl;
DebugInfo << type() << ": Field " << fieldName << endl;
transformField<VolFieldType>
(
@ -68,61 +66,13 @@ void Foam::functionObjects::fieldCoordinateSystemTransform::transform
}
else if (mesh_.foundObject<SurfaceFieldType>(fieldName))
{
DebugInfo
<< type() << ": Field " << fieldName << " already in database"
<< endl;
DebugInfo << type() << ": Field " << fieldName << endl;
transformField<SurfaceFieldType>
(
mesh_.lookupObject<SurfaceFieldType>(fieldName)
);
}
else
{
typeIOobject<VolFieldType> fieldHeader
(
fieldName,
mesh_.time().timeName(),
mesh_,
IOobject::MUST_READ,
IOobject::NO_WRITE
);
if (fieldHeader.headerOk())
{
DebugInfo
<< type() << ": Field " << fieldName << " read from file"
<< endl;
transformField<VolFieldType>
(
mesh_.lookupObject<VolFieldType>(fieldName)
);
}
else
{
typeIOobject<SurfaceFieldType> fieldHeader
(
fieldName,
mesh_.time().timeName(),
mesh_,
IOobject::MUST_READ,
IOobject::NO_WRITE
);
if (fieldHeader.headerOk())
{
DebugInfo
<< type() << ": Field " << fieldName << " read from file"
<< endl;
transformField<SurfaceFieldType>
(
mesh_.lookupObject<SurfaceFieldType>(fieldName)
);
}
}
}
}