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);
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Abstract base class for interpolating in 1D.
declareRunTimeSelectionTable(autoPtr, interpolationWeights, word,(const scalarField &samples),(samples))
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.
TypeName("interpolationWeights")
Runtime type information.
interpolationWeights(const interpolationWeights &)=delete
No copy construct.
virtual bool valueWeights(const scalar t, labelList &indices, scalarField &weights) const =0
Calculate weights and indices to calculate t from samples.
void operator=(const interpolationWeights &)=delete
No copy assignment.
const scalarField & samples_
static outerProduct< typenameListType1::value_type, typenameListType2::value_type >::type weightedSum(const ListType1 &f1, const ListType2 &f2)
Helper: weighted sum.
static autoPtr< interpolationWeights > New(const word &type, const scalarField &samples)
Return a reference to the selected interpolationWeights.
virtual ~interpolationWeights()=default
Destructor.
A class for handling words, derived from Foam::string.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
scalarField samples(nIntervals, Zero)