Last change
on this file since 888 was
888,
checked in by mhnguyen, 8 years ago
|
Adding new transformation for scalar: Reducing an axis to a scalar
+) Add new xml node for new transformation
+) Add new algorithms for axis reduction
+) Make change in some place to make sure everything work fine
Test
+) On Curie
+) Tests pass and are correct
|
File size:
1.1 KB
|
Line | |
---|
1 | /*! |
---|
2 | \file scalar_algorithm_reduce_scalar.hpp |
---|
3 | \author Ha NGUYEN |
---|
4 | \since 23 June 2016 |
---|
5 | \date 23 June 2016 |
---|
6 | |
---|
7 | \brief Algorithm for reduce an axis to a scalar |
---|
8 | */ |
---|
9 | #ifndef __XIOS_SCALAR_ALGORITHM_REDUCE_AXIS_HPP__ |
---|
10 | #define __XIOS_SCALAR_ALGORITHM_REDUCE_AXIS_HPP__ |
---|
11 | |
---|
12 | #include "scalar_algorithm_transformation.hpp" |
---|
13 | |
---|
14 | namespace xios { |
---|
15 | |
---|
16 | class CScalar; |
---|
17 | class CAxis; |
---|
18 | class CReduceAxisToScalar; |
---|
19 | class CReductionAlgorithm; |
---|
20 | |
---|
21 | /*! |
---|
22 | \class CScalarAlgorithmReduceScalar |
---|
23 | Inversing an axis to a scalar |
---|
24 | */ |
---|
25 | class CScalarAlgorithmReduceScalar : public CScalarAlgorithmTransformation |
---|
26 | { |
---|
27 | public: |
---|
28 | CScalarAlgorithmReduceScalar(CScalar* scalarDestination, CAxis* axisSource, CReduceAxisToScalar* algo); |
---|
29 | |
---|
30 | virtual void apply(const std::vector<std::pair<int,double> >& localIndex, |
---|
31 | const double* dataInput, |
---|
32 | CArray<double,1>& dataOut, |
---|
33 | std::vector<bool>& flagInitial); |
---|
34 | |
---|
35 | virtual ~CScalarAlgorithmReduceScalar(); |
---|
36 | |
---|
37 | protected: |
---|
38 | void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); |
---|
39 | |
---|
40 | protected: |
---|
41 | CReductionAlgorithm* reduction_; |
---|
42 | |
---|
43 | }; |
---|
44 | |
---|
45 | } |
---|
46 | #endif // __XIOS_SCALAR_ALGORITHM_REDUCE_AXIS_HPP__ |
---|
Note: See
TracBrowser
for help on using the repository browser.