mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: improved sample surfaces and surface writers (#1206)
- The writers have changed from being a generic state-less set of routines to more properly conforming to the normal notion of a writer. These changes allow us to combine output fields (eg, in a single VTK/vtp file for each timestep). Parallel data reduction and any associated bookkeeping is now part of the surface writers. This improves their re-usability and avoids unnecessary and premature data reduction at the sampling stage. It is now possible to have different output formats on a per-surface basis. - A new feature of the surface sampling is the ability to "store" the sampled surfaces and fields onto a registry for reuse by other function objects. Additionally, the "store" can be triggered at the execution phase as well
This commit is contained in:
@ -209,7 +209,7 @@ void Foam::printMeshStats(const polyMesh& mesh, const bool allTopology)
|
||||
void Foam::mergeAndWrite
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const surfaceWriter& writer,
|
||||
surfaceWriter& writer,
|
||||
const word& name,
|
||||
const indirectPrimitivePatch& setPatch,
|
||||
const fileName& outputDir
|
||||
@ -242,37 +242,37 @@ void Foam::mergeAndWrite
|
||||
// Write
|
||||
if (Pstream::master())
|
||||
{
|
||||
writer.write
|
||||
writer.open
|
||||
(
|
||||
outputDir,
|
||||
name,
|
||||
meshedSurfRef
|
||||
(
|
||||
mergedPoints,
|
||||
mergedFaces
|
||||
)
|
||||
mergedPoints,
|
||||
mergedFaces,
|
||||
(outputDir / name),
|
||||
false // serial - already merged
|
||||
);
|
||||
|
||||
writer.writeGeometry();
|
||||
writer.clear();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.write
|
||||
writer.open
|
||||
(
|
||||
outputDir,
|
||||
name,
|
||||
meshedSurfRef
|
||||
(
|
||||
setPatch.localPoints(),
|
||||
setPatch.localFaces()
|
||||
)
|
||||
setPatch.localPoints(),
|
||||
setPatch.localFaces(),
|
||||
(outputDir / name),
|
||||
false // serial - already merged
|
||||
);
|
||||
|
||||
writer.writeGeometry();
|
||||
writer.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::mergeAndWrite
|
||||
(
|
||||
const surfaceWriter& writer,
|
||||
surfaceWriter& writer,
|
||||
const faceSet& set
|
||||
)
|
||||
{
|
||||
@ -299,7 +299,7 @@ void Foam::mergeAndWrite
|
||||
|
||||
void Foam::mergeAndWrite
|
||||
(
|
||||
const surfaceWriter& writer,
|
||||
surfaceWriter& writer,
|
||||
const cellSet& set
|
||||
)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user