Newer
Older
if (operation_ != opNone && Pstream::master())
file() << tab << totalArea_;
Henry Weller
committed
}
// Many operations use the Sf field
vectorField Sf;
if (usesSf())
if (stObject == regionType_)
const polySurface& s = dynamicCast<const polySurface>(obr());
Sf = s.Sf();
}
else if (sampledPtr_.valid())
Sf = sampledPtr_().Sf();
}
else
{
Andrew Heather
committed
Sf = filterField(mesh_.Sf());
}
}
// Faces and points for surface format (if specified)
faceList faces;
pointField points;
if (surfaceWriterPtr_.valid())
{
if (withTopologicalMerge())
combineMeshGeometry(faces, points);
}
else
{
combineSurfaceGeometry(faces, points);
}
}
// Only a few weight types (scalar, vector)
Henry Weller
committed
if (weightFieldName_ != "none")
{
if (validField<scalar>(weightFieldName_))
{
scalarField weightField
Henry Weller
committed
(
Andrew Heather
committed
getFieldValues<scalar>(weightFieldName_, true)
Henry Weller
committed
);
// Process the fields
writeAll(Sf, weightField, points, faces);
}
else if (validField<vector>(weightFieldName_))
{
vectorField weightField
Andrew Heather
committed
getFieldValues<vector>(weightFieldName_, true)
// Process the fields
writeAll(Sf, weightField, points, faces);
FatalErrorInFunction
<< "weightField " << weightFieldName_
<< " not found or an unsupported type"
<< abort(FatalError);
Henry Weller
committed
}
else
{
// Default is a zero-size scalar weight field (ie, weight = 1)
scalarField weightField;
// Process the fields
writeAll(Sf, weightField, points, faces);
if (operation_ != opNone && Pstream::master())
Henry Weller
committed
{
file() << endl;
Henry Weller
committed
Log << endl;
return true;
void Foam::functionObjects::fieldValues::surfaceFieldValue::updateMesh
(
const mapPolyMesh& mpm
)
{
needsUpdate_ = true;
}
void Foam::functionObjects::fieldValues::surfaceFieldValue::movePoints
(
const polyMesh& mesh
)
{
needsUpdate_ = true;
}
// ************************************************************************* //