[1314] | 1 | #include "reduce_scalar_to_scalar.hpp" |
---|
[2011] | 2 | #include "scalar_algorithm_reduce_scalar.hpp" |
---|
[1314] | 3 | #include "type.hpp" |
---|
| 4 | |
---|
| 5 | namespace xios { |
---|
| 6 | |
---|
| 7 | /// ////////////////////// Définitions ////////////////////// /// |
---|
| 8 | |
---|
| 9 | CReduceScalarToScalar::CReduceScalarToScalar(void) |
---|
| 10 | : CObjectTemplate<CReduceScalarToScalar>(), CReduceScalarToScalarAttributes(), CTransformation<CScalar>() |
---|
| 11 | { /* Ne rien faire de plus */ } |
---|
| 12 | |
---|
| 13 | CReduceScalarToScalar::CReduceScalarToScalar(const StdString & id) |
---|
| 14 | : CObjectTemplate<CReduceScalarToScalar>(id), CReduceScalarToScalarAttributes(), CTransformation<CScalar>() |
---|
| 15 | { /* Ne rien faire de plus */ } |
---|
| 16 | |
---|
| 17 | CReduceScalarToScalar::~CReduceScalarToScalar(void) |
---|
| 18 | {} |
---|
| 19 | |
---|
| 20 | CTransformation<CScalar>* CReduceScalarToScalar::create(const StdString& id, xml::CXMLNode* node) |
---|
| 21 | { |
---|
| 22 | CReduceScalarToScalar* reduceScalar = CReduceScalarToScalarGroup::get("reduce_scalar_to_scalar_definition")->createChild(id); |
---|
| 23 | if (node) reduceScalar->parse(*node); |
---|
| 24 | return static_cast<CTransformation<CScalar>*>(reduceScalar); |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | bool CReduceScalarToScalar::registerTrans() |
---|
| 28 | { |
---|
[1984] | 29 | return registerTransformation(TRANS_REDUCE_SCALAR_TO_SCALAR, {create, getTransformation}); |
---|
[1314] | 30 | } |
---|
| 31 | |
---|
| 32 | bool CReduceScalarToScalar::_dummyRegistered = CReduceScalarToScalar::registerTrans(); |
---|
| 33 | |
---|
| 34 | //---------------------------------------------------------------- |
---|
| 35 | |
---|
| 36 | StdString CReduceScalarToScalar::GetName(void) { return StdString("reduce_scalar_to_scalar"); } |
---|
| 37 | StdString CReduceScalarToScalar::GetDefName(void) { return StdString("reduce_scalar_to_scalar"); } |
---|
| 38 | ENodeType CReduceScalarToScalar::GetType(void) { return eReduceScalarToScalar; } |
---|
| 39 | |
---|
| 40 | void CReduceScalarToScalar::checkValid(CScalar* scalarDst) |
---|
| 41 | { |
---|
| 42 | } |
---|
| 43 | |
---|
[2270] | 44 | shared_ptr<CGenericAlgorithmTransformation> CReduceScalarToScalar::createAlgorithm(bool isSource, |
---|
[2011] | 45 | CGrid* gridDst, CGrid* gridSrc, |
---|
| 46 | int elementPositionInGrid, |
---|
| 47 | std::map<int, int>& elementPositionInGridSrc2ScalarPosition, |
---|
| 48 | std::map<int, int>& elementPositionInGridSrc2AxisPosition, |
---|
| 49 | std::map<int, int>& elementPositionInGridSrc2DomainPosition, |
---|
| 50 | std::map<int, int>& elementPositionInGridDst2ScalarPosition, |
---|
| 51 | std::map<int, int>& elementPositionInGridDst2AxisPosition, |
---|
| 52 | std::map<int, int>& elementPositionInGridDst2DomainPosition) |
---|
| 53 | { |
---|
| 54 | return CScalarAlgorithmReduceScalar::create(isSource, gridDst, gridSrc, this, elementPositionInGrid, |
---|
| 55 | elementPositionInGridSrc2ScalarPosition, elementPositionInGridSrc2AxisPosition, elementPositionInGridSrc2DomainPosition, |
---|
| 56 | elementPositionInGridDst2ScalarPosition, elementPositionInGridDst2AxisPosition, elementPositionInGridDst2DomainPosition); |
---|
| 57 | } |
---|
[1314] | 58 | } |
---|