mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: replace surfMesh/fields support with polySurface/fields support (#1206)
- fits better into the general sampling framework, improves flexibilty and allows code reduction. ENH: include surface fields on sampledSurfaces that support it
This commit is contained in:
committed by
Andrew Heather
parent
181c974b11
commit
03e6aa1a6d
@ -60,7 +60,7 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::regionTypeNames_
|
||||
({
|
||||
{ regionTypes::stFaceZone, "faceZone" },
|
||||
{ regionTypes::stPatch, "patch" },
|
||||
{ regionTypes::stSurface, "surface" },
|
||||
{ regionTypes::stObject, "functionObjectSurface" },
|
||||
{ regionTypes::stSampled, "sampledSurface" },
|
||||
});
|
||||
|
||||
@ -118,9 +118,9 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::postOperationTypeNames_
|
||||
const Foam::objectRegistry&
|
||||
Foam::functionObjects::fieldValues::surfaceFieldValue::obr() const
|
||||
{
|
||||
if (stSurface == regionType_)
|
||||
if (stObject == regionType_)
|
||||
{
|
||||
return mesh_.lookupObject<objectRegistry>(regionName_);
|
||||
return storedObjects().lookupObject<polySurface>(regionName_);
|
||||
}
|
||||
|
||||
return mesh_;
|
||||
@ -368,9 +368,9 @@ combineSurfaceGeometry
|
||||
pointField& points
|
||||
) const
|
||||
{
|
||||
if (stSurface == regionType_)
|
||||
if (stObject == regionType_)
|
||||
{
|
||||
const surfMesh& s = dynamicCast<const surfMesh>(obr());
|
||||
const polySurface& s = dynamicCast<const polySurface>(obr());
|
||||
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
@ -436,9 +436,9 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::totalArea() const
|
||||
{
|
||||
scalar totalArea = 0;
|
||||
|
||||
if (stSurface == regionType_)
|
||||
if (stObject == regionType_)
|
||||
{
|
||||
const surfMesh& s = dynamicCast<const surfMesh>(obr());
|
||||
const polySurface& s = dynamicCast<const polySurface>(obr());
|
||||
|
||||
totalArea = gSum(s.magSf());
|
||||
}
|
||||
@ -505,9 +505,9 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::update()
|
||||
setPatchFaces();
|
||||
break;
|
||||
}
|
||||
case stSurface:
|
||||
case stObject:
|
||||
{
|
||||
const surfMesh& s = dynamicCast<const surfMesh>(obr());
|
||||
const polySurface& s = dynamicCast<const polySurface>(obr());
|
||||
nFaces_ = returnReduce(s.size(), sumOp<label>());
|
||||
break;
|
||||
}
|
||||
@ -1007,9 +1007,9 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::write()
|
||||
vectorField Sf;
|
||||
if (usesSf())
|
||||
{
|
||||
if (stSurface == regionType_)
|
||||
if (stObject == regionType_)
|
||||
{
|
||||
const surfMesh& s = dynamicCast<const surfMesh>(obr());
|
||||
const polySurface& s = dynamicCast<const polySurface>(obr());
|
||||
Sf = s.Sf();
|
||||
}
|
||||
else if (sampledPtr_.valid())
|
||||
|
||||
Reference in New Issue
Block a user