mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: inconsistent surfaceFieldValue writing (fixes #1999)
- setup writer outside the data loop to ensure that the number of output fields is correct (VTK format). - ignore 'interpolate' on sampled surfaces to ensure proper face sampling, never allow point sampling BUG: incorrect debug-switch for sampledIsoSurface
This commit is contained in:
@ -1034,16 +1034,6 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::read
|
||||
mesh_,
|
||||
dict.subDict("sampledSurfaceDict")
|
||||
);
|
||||
|
||||
if (sampledPtr_->interpolate())
|
||||
{
|
||||
// Should probably ignore interpolate entirely,
|
||||
// but the oldest isoSurface algorithm requires it!
|
||||
WarningInFunction
|
||||
<< type() << ' ' << name() << ": "
|
||||
<< "sampledSurface with interpolate = true "
|
||||
<< "is likely incorrect" << nl << nl;
|
||||
}
|
||||
}
|
||||
|
||||
Info<< type() << ' ' << name() << ':' << nl
|
||||
@ -1061,15 +1051,6 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::read
|
||||
|
||||
if (usesWeight())
|
||||
{
|
||||
if (stSampled == regionType_)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Cannot use weighted operation '"
|
||||
<< operationTypeNames_[operation_]
|
||||
<< "' for sampledSurface"
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
// Can have "weightFields" or "weightField"
|
||||
|
||||
bool missing = true;
|
||||
@ -1140,6 +1121,9 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::read
|
||||
)
|
||||
);
|
||||
|
||||
// Propagate field counts (per surface)
|
||||
surfaceWriterPtr_->nFields() = fields_.size();
|
||||
|
||||
if (debug)
|
||||
{
|
||||
surfaceWriterPtr_->verbose(true);
|
||||
|
||||
Reference in New Issue
Block a user