mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
new management for sampledSurface(s)
//- Does the surface need an update?
virtual bool needsUpdate() const = 0;
//- Mark the surface as needing an update.
// May also free up unneeded data.
// Return false if surface was already marked as expired.
virtual bool expire() = 0;
//- Update the surface as required.
// Do nothing (and return false) if no update was required
virtual bool update() = 0;
The constructors for the derived classes should generally start in a
'expired' condition (ie, needsUpdate() == true) and rely on a subsequent
call to the update() method to complete the initialization. Delaying the
final construction as late as possible allows the construction of
surfaces that may depend on intermediate calculation results (eg,
iso-surfaces) and also avoids the unnecessary reconstruction of surfaces
between sampling intervals.
It is the responsibility of the caller to ensure that the surface
update() is called before the surface is used. The update() method
implementation should do nothing when the surface is already up-to-date.
This commit is contained in:
@ -109,26 +109,24 @@ sets
|
||||
// plane : values on plane defined by point, normal.
|
||||
// patch : values on patch.
|
||||
//
|
||||
// 1] planes are triangulated by default
|
||||
// 2] patches are not triangulated by default
|
||||
// 1] patches are not triangulated by default
|
||||
// 2] planes are always triangulated
|
||||
// 3] iso-surfaces are always triangulated
|
||||
surfaces
|
||||
(
|
||||
constantPlane
|
||||
{
|
||||
type plane;
|
||||
type plane; // always triangulated
|
||||
basePoint (0.0501 0.0501 0.005);
|
||||
normalVector (0.1 0.1 1);
|
||||
|
||||
//- Optional: restrict to a particular zone
|
||||
// zoneName zone1;
|
||||
|
||||
// Optional: whether to leave as faces or triangulate (=default)
|
||||
triangulate false;
|
||||
}
|
||||
|
||||
interpolatedPlane
|
||||
{
|
||||
type plane;
|
||||
type plane; // always triangulated
|
||||
// make plane relative to the coordinateSystem (Cartesian)
|
||||
coordinateSystem
|
||||
{
|
||||
@ -136,7 +134,6 @@ surfaces
|
||||
}
|
||||
basePoint (0 0 0);
|
||||
normalVector (0.1 0.1 1);
|
||||
triangulate false;
|
||||
interpolate true;
|
||||
}
|
||||
|
||||
@ -145,6 +142,7 @@ surfaces
|
||||
type patch;
|
||||
patchName movingWall;
|
||||
// Optional: whether to leave as faces (=default) or triangulate
|
||||
// triangulate false;
|
||||
}
|
||||
|
||||
movingWall_interpolated
|
||||
@ -153,26 +151,27 @@ surfaces
|
||||
patchName movingWall;
|
||||
interpolate true;
|
||||
// Optional: whether to leave as faces (=default) or triangulate
|
||||
// triangulate false;
|
||||
}
|
||||
|
||||
interpolatedIso
|
||||
{
|
||||
// Iso surface for interpolated values only
|
||||
type isoSurface;
|
||||
type isoSurface; // always triangulated
|
||||
isoField rho;
|
||||
isoValue 0.5;
|
||||
interpolate true;
|
||||
//regularise false; //optional: do not simplify
|
||||
// regularise false; // Optional: do not simplify
|
||||
}
|
||||
constantIso
|
||||
{
|
||||
// Iso surface for constant values. Guarantees triangles to not
|
||||
// cross cells.
|
||||
type isoSurfaceCell;
|
||||
// Iso surface for constant values.
|
||||
// Triangles guaranteed not to cross cells.
|
||||
type isoSurfaceCell; // always triangulated
|
||||
isoField rho;
|
||||
isoValue 0.5;
|
||||
interpolate false;
|
||||
//regularise false; //optional: do not simplify
|
||||
// regularise false; // Optional: do not simplify
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user