#include "interpolate_axis.hpp" #include "type.hpp" #include "field.hpp" namespace xios { /// ////////////////////// Définitions ////////////////////// /// CInterpolateAxis::CInterpolateAxis(void) : CObjectTemplate(), CInterpolateAxisAttributes(), CTransformation() { /* Ne rien faire de plus */ } CInterpolateAxis::CInterpolateAxis(const StdString & id) : CObjectTemplate(id), CInterpolateAxisAttributes(), CTransformation() { /* Ne rien faire de plus */ } CInterpolateAxis::~CInterpolateAxis(void) {} //---------------------------------------------------------------- StdString CInterpolateAxis::GetName(void) { return StdString("interpolate_axis"); } StdString CInterpolateAxis::GetDefName(void) { return StdString("interpolate_axis"); } ENodeType CInterpolateAxis::GetType(void) { return eInterpolateAxis; } void CInterpolateAxis::checkValid(CAxis* axisSrc) { if (this->order.isEmpty()) this->order.setValue(2); int order = this->order.getValue(); if (order >= axisSrc->n_glo.getValue()) { ERROR("CInterpolateAxis::checkValid(CAxis* axisSrc)", << "Order of interpolation is greater than global size of axis source" << "Size of axis source " <getId() << " is " << axisSrc->n_glo.getValue() << std::endl << "Order of interpolation is " << order ); } if (!this->coordinate.isEmpty()) { StdString coordinate = this->coordinate.getValue(); if (!CField::has(coordinate)) ERROR("CInterpolateAxis::checkValid(CAxis* axisSrc)", << "Coordinate field whose id " << coordinate << "does not exist " << "Please define one"); } } std::vector CInterpolateAxis::checkAuxInputs_() { std::vector auxInputs; if (!this->coordinate.isEmpty()) { StdString coordinate = this->coordinate.getValue(); if (!CField::has(coordinate)) ERROR("CInterpolateAxis::checkValid(CAxis* axisSrc)", << "Coordinate field whose id " << coordinate << "does not exist " << "Please define one"); auxInputs.push_back(coordinate); } return auxInputs; } }