mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Solving problem with sampledSurfaces
Removing specieSolid specialization Updating tutorials using solidThermo and solid reactions
This commit is contained in:
@ -164,17 +164,19 @@ void Foam::sampledSurfaces::write()
|
||||
writeGeometry();
|
||||
}
|
||||
|
||||
sampleAndWrite<volScalarField>(mesh_);
|
||||
sampleAndWrite<volVectorField>(mesh_);
|
||||
sampleAndWrite<volSphericalTensorField>(mesh_);
|
||||
sampleAndWrite<volSymmTensorField>(mesh_);
|
||||
sampleAndWrite<volTensorField>(mesh_);
|
||||
const IOobjectList objects(mesh_, mesh_.time().timeName());
|
||||
|
||||
sampleAndWrite<surfaceScalarField>(mesh_);
|
||||
sampleAndWrite<surfaceVectorField>(mesh_);
|
||||
sampleAndWrite<surfaceSphericalTensorField>(mesh_);
|
||||
sampleAndWrite<surfaceSymmTensorField>(mesh_);
|
||||
sampleAndWrite<surfaceTensorField>(mesh_);
|
||||
sampleAndWrite<volScalarField>(objects);
|
||||
sampleAndWrite<volVectorField>(objects);
|
||||
sampleAndWrite<volSphericalTensorField>(objects);
|
||||
sampleAndWrite<volSymmTensorField>(objects);
|
||||
sampleAndWrite<volTensorField>(objects);
|
||||
|
||||
sampleAndWrite<surfaceScalarField>(objects);
|
||||
sampleAndWrite<surfaceVectorField>(objects);
|
||||
sampleAndWrite<surfaceSphericalTensorField>(objects);
|
||||
sampleAndWrite<surfaceSymmTensorField>(objects);
|
||||
sampleAndWrite<surfaceTensorField>(objects);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -160,7 +160,7 @@ class sampledSurfaces
|
||||
|
||||
//- Sample and write all sampled fields
|
||||
template<class Type>
|
||||
void sampleAndWrite(const fvMesh&);
|
||||
void sampleAndWrite(const IOobjectList&);
|
||||
|
||||
//- Disallow default bitwise copy construct and assignment
|
||||
sampledSurfaces(const sampledSurfaces&);
|
||||
|
||||
@ -166,13 +166,18 @@ void Foam::sampledSurfaces::sampleAndWrite
|
||||
|
||||
|
||||
template<class GeoField>
|
||||
void Foam::sampledSurfaces::sampleAndWrite(const fvMesh& mesh)
|
||||
void Foam::sampledSurfaces::sampleAndWrite(const IOobjectList& allObjects)
|
||||
{
|
||||
forAll (fieldSelection_, fieldI)
|
||||
{
|
||||
const wordRe field = fieldSelection_[fieldI];
|
||||
IOobject* fieldIOPtr = allObjects.lookup(field);
|
||||
|
||||
if (mesh.thisDb().foundObject<GeoField>(field))
|
||||
if
|
||||
(
|
||||
fieldIOPtr != NULL
|
||||
&& fieldIOPtr->headerClassName() == GeoField::typeName
|
||||
)
|
||||
{
|
||||
if (Pstream::master() && verbose_)
|
||||
{
|
||||
@ -181,10 +186,18 @@ void Foam::sampledSurfaces::sampleAndWrite(const fvMesh& mesh)
|
||||
|
||||
if (loadFromFiles_)
|
||||
{
|
||||
const GeoField& geoField =
|
||||
mesh.thisDb().lookupObject<GeoField>(field);
|
||||
const GeoField geoField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
field,
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::MUST_READ
|
||||
),
|
||||
mesh_
|
||||
);
|
||||
|
||||
const_cast<GeoField&>(geoField).readOpt() = IOobject::MUST_READ;
|
||||
sampleAndWrite(geoField);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user