mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: mappedField: do not keep interpolator (holds copy of field)
This commit is contained in:
@ -165,21 +165,6 @@ mappedPatchFieldBase<Type>::sampleField() const
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
const interpolation<Type>& mappedPatchFieldBase<Type>::interpolator() const
|
||||
{
|
||||
if (!interpolator_.valid())
|
||||
{
|
||||
interpolator_ = interpolation<Type>::New
|
||||
(
|
||||
interpolationScheme_,
|
||||
sampleField()
|
||||
);
|
||||
}
|
||||
return interpolator_();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
tmp<Field<Type> > mappedPatchFieldBase<Type>::mappedField() const
|
||||
{
|
||||
@ -218,6 +203,14 @@ tmp<Field<Type> > mappedPatchFieldBase<Type>::mappedField() const
|
||||
samples
|
||||
);
|
||||
|
||||
autoPtr<interpolation<Type> > interpolator
|
||||
(
|
||||
interpolation<Type>::New
|
||||
(
|
||||
interpolationScheme_,
|
||||
sampleField()
|
||||
)
|
||||
);
|
||||
const interpolation<Type>& interp = interpolator();
|
||||
|
||||
newValues.setSize(samples.size(), pTraits<Type>::max);
|
||||
|
||||
@ -88,11 +88,6 @@ protected:
|
||||
//- Interpolation scheme to use for nearestcell mode
|
||||
word interpolationScheme_;
|
||||
|
||||
mutable autoPtr<interpolation<Type> > interpolator_;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -149,9 +144,6 @@ public:
|
||||
//- Field to sample. Either on my or nbr mesh
|
||||
const GeometricField<Type, fvPatchField, volMesh>& sampleField() const;
|
||||
|
||||
//- Access the interpolation method
|
||||
const interpolation<Type>& interpolator() const;
|
||||
|
||||
//- Map sampleField onto *this patch
|
||||
virtual tmp<Field<Type> > mappedField() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user