Last change
on this file since 1208 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.6 KB
|
Rev | Line | |
---|
[888] | 1 | /*! |
---|
| 2 | \file scalar_algorithm_transformation.hpp |
---|
| 3 | \author Ha NGUYEN |
---|
| 4 | \since 23 June 2016 |
---|
| 5 | \date 23 June 2016 |
---|
| 6 | |
---|
| 7 | \brief Interface for all scalar transformation algorithms. |
---|
| 8 | */ |
---|
| 9 | #ifndef __XIOS_SCALAR_ALGORITHM_TRANSFORMATION_HPP__ |
---|
| 10 | #define __XIOS_SCALAR_ALGORITHM_TRANSFORMATION_HPP__ |
---|
| 11 | |
---|
| 12 | #include "generic_algorithm_transformation.hpp" |
---|
| 13 | |
---|
| 14 | namespace xios { |
---|
| 15 | |
---|
| 16 | class CScalar; |
---|
| 17 | class CAxis; |
---|
| 18 | class CDomain; |
---|
| 19 | |
---|
| 20 | /*! |
---|
| 21 | \class CScalarAlgorithmTransformation |
---|
| 22 | Algorithms for scalar. |
---|
| 23 | */ |
---|
| 24 | class CScalarAlgorithmTransformation : public virtual CGenericAlgorithmTransformation |
---|
| 25 | { |
---|
| 26 | public: |
---|
| 27 | CScalarAlgorithmTransformation(CScalar* scalarDestination, CScalar* scalarSource); |
---|
| 28 | CScalarAlgorithmTransformation(CScalar* scalarDestination, CAxis* axisSource); |
---|
| 29 | CScalarAlgorithmTransformation(CScalar* scalarDestination, CDomain* domainSource); |
---|
| 30 | |
---|
| 31 | virtual ~CScalarAlgorithmTransformation(); |
---|
| 32 | |
---|
| 33 | protected: |
---|
| 34 | void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); |
---|
| 35 | |
---|
| 36 | virtual void computeExchangeGlobalIndex(const CArray<size_t,1>& globalScalarIndex, |
---|
| 37 | int elementType, |
---|
| 38 | CClientClientDHTInt::Index2VectorInfoTypeMap& globalScalarIndexOnProc); |
---|
| 39 | |
---|
| 40 | protected: |
---|
| 41 | //! Global index of an scalar on grid destination |
---|
| 42 | std::vector<int> scalarDestGlobalIndex_; |
---|
| 43 | |
---|
| 44 | //! Size of |
---|
| 45 | int scalarDestGlobalSize_; |
---|
| 46 | |
---|
| 47 | //! Scalar on grid destination |
---|
| 48 | CScalar* scalarDest_; |
---|
| 49 | |
---|
| 50 | //! Scalar on grid source |
---|
| 51 | CScalar* scalarSrc_; |
---|
| 52 | //! Axis source |
---|
| 53 | CAxis* axisSrc_; |
---|
| 54 | //! Domain source |
---|
| 55 | CDomain* domainSrc_; |
---|
| 56 | }; |
---|
| 57 | |
---|
| 58 | } |
---|
| 59 | #endif // __XIOS_SCALAR_ALGORITHM_TRANSFORMATION_HPP__ |
---|
Note: See
TracBrowser
for help on using the repository browser.