mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: pass points, faces instead of meshedSurfRef in surfaceFieldValue
- removes a layer of opacity and may help with future restructuring
This commit is contained in:
committed by
Andrew Heather
parent
680ca78897
commit
e322894476
@ -33,7 +33,6 @@ License
|
||||
#include "mergePoints.H"
|
||||
#include "indirectPrimitivePatch.H"
|
||||
#include "PatchTools.H"
|
||||
#include "meshedSurfRef.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -962,6 +961,11 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::read
|
||||
)
|
||||
);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
surfaceWriterPtr_->verbose() = true;
|
||||
}
|
||||
|
||||
if (surfaceWriterPtr_->enabled())
|
||||
{
|
||||
Info<< " surfaceFormat = " << formatName << nl;
|
||||
@ -1038,8 +1042,6 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::write()
|
||||
}
|
||||
}
|
||||
|
||||
meshedSurfRef surfToWrite(points, faces);
|
||||
|
||||
// Only a few weight types (scalar, vector)
|
||||
if (weightFieldName_ != "none")
|
||||
{
|
||||
@ -1051,7 +1053,7 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::write()
|
||||
);
|
||||
|
||||
// Process the fields
|
||||
writeAll(Sf, weightField, surfToWrite);
|
||||
writeAll(Sf, weightField, points, faces);
|
||||
}
|
||||
else if (validField<vector>(weightFieldName_))
|
||||
{
|
||||
@ -1061,7 +1063,7 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::write()
|
||||
);
|
||||
|
||||
// Process the fields
|
||||
writeAll(Sf, weightField, surfToWrite);
|
||||
writeAll(Sf, weightField, points, faces);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1077,7 +1079,7 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::write()
|
||||
scalarField weightField;
|
||||
|
||||
// Process the fields
|
||||
writeAll(Sf, weightField, surfToWrite);
|
||||
writeAll(Sf, weightField, points, faces);
|
||||
}
|
||||
|
||||
if (operation_ != opNone && Pstream::master())
|
||||
|
||||
@ -494,7 +494,8 @@ protected:
|
||||
(
|
||||
const vectorField& Sf,
|
||||
const Field<WeightType>& weightField,
|
||||
const meshedSurf& surfToWrite
|
||||
const pointField& points,
|
||||
const faceList& faces
|
||||
);
|
||||
|
||||
//- Templated helper function to output field values
|
||||
@ -504,7 +505,8 @@ protected:
|
||||
const word& fieldName,
|
||||
const vectorField& Sf,
|
||||
const Field<WeightType>& weightField,
|
||||
const meshedSurf& surfToWrite
|
||||
const pointField& points,
|
||||
const faceList& faces
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -334,7 +334,8 @@ Foam::label Foam::functionObjects::fieldValues::surfaceFieldValue::writeAll
|
||||
(
|
||||
const vectorField& Sf,
|
||||
const Field<WeightType>& weightField,
|
||||
const meshedSurf& surfToWrite
|
||||
const pointField& points,
|
||||
const faceList& faces
|
||||
)
|
||||
{
|
||||
label nProcessed = 0;
|
||||
@ -343,14 +344,14 @@ Foam::label Foam::functionObjects::fieldValues::surfaceFieldValue::writeAll
|
||||
{
|
||||
if
|
||||
(
|
||||
writeValues<scalar>(fieldName, Sf, weightField, surfToWrite)
|
||||
|| writeValues<vector>(fieldName, Sf, weightField, surfToWrite)
|
||||
writeValues<scalar>(fieldName, Sf, weightField, points, faces)
|
||||
|| writeValues<vector>(fieldName, Sf, weightField, points, faces)
|
||||
|| writeValues<sphericalTensor>
|
||||
(
|
||||
fieldName, Sf, weightField, surfToWrite
|
||||
fieldName, Sf, weightField, points, faces
|
||||
)
|
||||
|| writeValues<symmTensor>(fieldName, Sf, weightField, surfToWrite)
|
||||
|| writeValues<tensor>(fieldName, Sf, weightField, surfToWrite)
|
||||
|| writeValues<symmTensor>(fieldName, Sf, weightField, points, faces)
|
||||
|| writeValues<tensor>(fieldName, Sf, weightField, points, faces)
|
||||
)
|
||||
{
|
||||
++nProcessed;
|
||||
@ -374,7 +375,8 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::writeValues
|
||||
const word& fieldName,
|
||||
const vectorField& Sf,
|
||||
const Field<WeightType>& weightField,
|
||||
const meshedSurf& surfToWrite
|
||||
const pointField& points,
|
||||
const faceList& faces
|
||||
)
|
||||
{
|
||||
const bool ok = validField<Type>(fieldName);
|
||||
@ -393,7 +395,8 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::writeValues
|
||||
{
|
||||
surfaceWriterPtr_->open
|
||||
(
|
||||
surfToWrite,
|
||||
points,
|
||||
faces,
|
||||
(
|
||||
outputDir()
|
||||
/ regionTypeNames_[regionType_] + ("_" + regionName_)
|
||||
|
||||
Reference in New Issue
Block a user