mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: update List and DynamicList methods (issue #595)
- improve functional compatibility with DynList (remove methods) * eg, remove an element from any position in a DynamicList * reduce the number of template parameters * remove/subset regions of DynamicList - propagate Swap template specializations for lists, hashtables - move construct/assignment to various containers. - add find/found methods for FixedList and UList for a more succinct (and clearer?) usage than the equivalent global findIndex() function. - simplify List_FOR_ALL loops
This commit is contained in:
@ -31,6 +31,7 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "Function1.H"
|
||||
#include "scalarIndList.H"
|
||||
#include "IOdictionary.H"
|
||||
#include "linearInterpolationWeights.H"
|
||||
#include "splineInterpolationWeights.H"
|
||||
@ -69,7 +70,7 @@ int main(int argc, char *argv[])
|
||||
scalar baseSum = interpolator.weightedSum
|
||||
(
|
||||
weights,
|
||||
UIndirectList<scalar>(values, indices)
|
||||
scalarUIndList(values, indices)
|
||||
);
|
||||
Pout<< "baseSum=" << baseSum << nl << nl << endl;
|
||||
|
||||
@ -78,7 +79,7 @@ int main(int argc, char *argv[])
|
||||
// scalar partialSum = interpolator.weightedSum
|
||||
// (
|
||||
// weights,
|
||||
// UIndirectList<scalar>(values, indices)
|
||||
// scalarUIndList(values, indices)
|
||||
// );
|
||||
// Pout<< "partialSum=" << partialSum << nl << nl << endl;
|
||||
//
|
||||
@ -90,7 +91,7 @@ int main(int argc, char *argv[])
|
||||
// scalar sum = interpolator.weightedSum
|
||||
// (
|
||||
// weights,
|
||||
// UIndirectList<scalar>(values, indices)
|
||||
// scalarUIndList(values, indices)
|
||||
// );
|
||||
// Pout<< "integrand=" << sum << nl << nl << endl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user