39 #ifndef interpolationWeights_H 40 #define interpolationWeights_H 139 template<
class ListType1,
class ListType2>
142 typename ListType1::value_type,
143 typename ListType2::value_type
145 weightedSum(
const ListType1& f1,
const ListType2& f2);
declareRunTimeSelectionTable(autoPtr, interpolationWeights, word,(const scalarField &samples),(samples))
scalarField samples(nIntervals, Zero)
Abstract base class for interpolating in 1D.
static outerProduct< typename ListType1::value_type, typename ListType2::value_type >::type weightedSum(const ListType1 &f1, const ListType2 &f2)
Helper: weighted sum.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
A class for handling words, derived from Foam::string.
virtual bool integrationWeights(const scalar t1, const scalar t2, labelList &indices, scalarField &weights) const =0
Calculate weights and indices to calculate integrand of t1..t2.
virtual ~interpolationWeights()=default
Destructor.
static autoPtr< interpolationWeights > New(const word &type, const scalarField &samples)
Return a reference to the selected interpolationWeights.
TypeName("interpolationWeights")
Runtime type information.
interpolationWeights(const interpolationWeights &)=delete
No copy construct.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Macros to ease declaration of run-time selection tables.
virtual bool valueWeights(const scalar t, labelList &indices, scalarField &weights) const =0
Calculate weights and indices to calculate t from samples.
const scalarField & samples_
void operator=(const interpolationWeights &)=delete
No copy assignment.