Last change
on this file since 2362 was
2291,
checked in by ymipsl, 2 years ago
|
Improve reduction transformation
- make the difference between reduction over geometry or reduction between process.
domain -> axis
axis -> scalar
domain -> scalar
- reduction across processes for redondant geometrical cell :
axis -> axis
scalar -> scalar
Reduction can be local (only for the geometrical cell owned by current process) or global, using the "local" attribute (bool) over the reduction.
YM
|
-
Property svn:executable set to
*
|
File size:
1.1 KB
|
Rev | Line | |
---|
[2291] | 1 | #ifndef __XIOS_GRID_ALGORITHM_REDUCE_HPP__ |
---|
| 2 | #define __XIOS_GRID_ALGORITHM_REDUCE_HPP__ |
---|
| 3 | |
---|
| 4 | #include "grid_transform_connector.hpp" |
---|
| 5 | #include <map> |
---|
| 6 | #include "array_new.hpp" |
---|
| 7 | #include "local_view.hpp" |
---|
| 8 | #include "grid_algorithm_generic.hpp" |
---|
| 9 | #include "reduction_types.hpp" |
---|
| 10 | |
---|
| 11 | namespace xios |
---|
| 12 | { |
---|
| 13 | class CGrid; |
---|
| 14 | class CGenericAlgorithmTransformation ; |
---|
| 15 | |
---|
| 16 | /*! |
---|
| 17 | \class CGenericAlgorithmTransformation |
---|
| 18 | This class defines the interface for all other inherited algorithms class |
---|
| 19 | */ |
---|
| 20 | class CTransformFilter ; |
---|
| 21 | class CGarbageCollector ; |
---|
| 22 | |
---|
| 23 | class CGridAlgorithmReduce : public CGridAlgorithmGeneric |
---|
| 24 | { |
---|
| 25 | public: |
---|
| 26 | CGridAlgorithmReduce(CGrid* gridSrc, CGrid* gridDst, int pos, shared_ptr<CGenericAlgorithmTransformation> algo, EReduction op) |
---|
| 27 | : CGridAlgorithmGeneric(gridSrc, gridDst, pos, algo), operator_(op) {} |
---|
| 28 | virtual ~CGridAlgorithmReduce() {} |
---|
| 29 | |
---|
| 30 | virtual void apply(const CArray<double,1>& dataIn, CArray<double,1>& dataOut) ; |
---|
| 31 | |
---|
| 32 | protected: |
---|
| 33 | |
---|
| 34 | EReduction operator_ ; // reduction operator to apply |
---|
| 35 | |
---|
| 36 | }; |
---|
| 37 | |
---|
| 38 | } |
---|
| 39 | |
---|
| 40 | #endif // __XIOS_GRID_ALGORITHM_REDUCE_HPP__ |
---|
Note: See
TracBrowser
for help on using the repository browser.