X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCalc%2Fcmp%2FMEDCalculator_i.cxx;h=832ef7471af25a9fc4d2a90f75aea1e6b2bf740d;hb=refs%2Fheads%2FV9_9_BR;hp=e0bafd7afb6f7e9201d27cc66414ad8dded2f0e4;hpb=688faba08168e98ca5cb3d4e6d38e84b228eaf44;p=modules%2Fmed.git diff --git a/src/MEDCalc/cmp/MEDCalculator_i.cxx b/src/MEDCalc/cmp/MEDCalculator_i.cxx index e0bafd7af..832ef7471 100644 --- a/src/MEDCalc/cmp/MEDCalculator_i.cxx +++ b/src/MEDCalc/cmp/MEDCalculator_i.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2015 CEA/DEN, EDF R&D +// Copyright (C) 2011-2022 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -25,7 +25,7 @@ #include #include "MEDCouplingFieldDouble.hxx" -using namespace ParaMEDMEM; +using namespace MEDCoupling; MEDCalculator_i * MEDCalculator_i::_instance = NULL; @@ -59,13 +59,13 @@ MEDCalculator_i::~MEDCalculator_i() MEDCALC::FieldHandler * MEDCalculator_i::add(const MEDCALC::FieldHandler & f1_hdl, const MEDCALC::FieldHandler & f2_hdl) { - // We first check that both operandes share the same mesh id. Note + // We first check that both operands share the same mesh id. Note // that it's not strictly required because the MEDCoupling operation // would raise an exception if the fields does not share the same // mesh support. if ( f1_hdl.meshid != f2_hdl.meshid ) { std::string message = - std::string("ERROR: Mesh ids are different for the field operandes ") + + std::string("ERROR: Mesh ids are different for the field operands ") + std::string(f1_hdl.fieldname) + std::string(" and ") + std::string(f2_hdl.fieldname); throw KERNEL::createSalomeException(message.c_str()); } @@ -103,7 +103,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::add(const MEDCALC::FieldHandler & f1_hd // >>>>>>>>> // _GBO_ We should test here if the iteration and order of the input - // files are identical for both operandes. A convention has to be + // files are identical for both operands. A convention has to be // defined here. By default, we let the iteration and order be // determined by the resulting MEDCouplingFieldDouble instance (see // function addField of the data manager). @@ -126,7 +126,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::sub(const MEDCALC::FieldHandler & f1_hd { if ( f1_hdl.meshid != f2_hdl.meshid ) { std::string message = - std::string("ERROR: Mesh ids are different for the field operandes ") + + std::string("ERROR: Mesh ids are different for the field operands ") + std::string(f1_hdl.fieldname) + std::string(" and ") + std::string(f2_hdl.fieldname); throw KERNEL::createSalomeException(message.c_str()); } @@ -165,7 +165,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::mul(const MEDCALC::FieldHandler & f1_hd { if ( f1_hdl.meshid != f2_hdl.meshid ) { std::string message = - std::string("ERROR: Mesh ids are different for the field operandes ") + + std::string("ERROR: Mesh ids are different for the field operands ") + std::string(f1_hdl.fieldname) + std::string(" and ") + std::string(f2_hdl.fieldname); throw KERNEL::createSalomeException(message.c_str()); } @@ -203,7 +203,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::div(const MEDCALC::FieldHandler & f1_hd { if ( f1_hdl.meshid != f2_hdl.meshid ) { std::string message = - std::string("ERROR: Mesh ids are different for the field operandes ") + + std::string("ERROR: Mesh ids are different for the field operands ") + std::string(f1_hdl.fieldname) + std::string(" and ") + std::string(f2_hdl.fieldname); throw KERNEL::createSalomeException(message.c_str()); } @@ -247,7 +247,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::pow(const MEDCALC::FieldHandler & f_hdl MEDCouplingFieldDouble* field_result; try { field_result = field->clone(true); - string functionToApply = "u^"+ToString(power); + std::string functionToApply = "u^"+ToString(power); field_result->applyFunc(functionToApply.c_str()); } catch (INTERP_KERNEL::Exception &ex) { @@ -255,7 +255,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::pow(const MEDCALC::FieldHandler & f_hdl } // Set the name (the default is the same as the original field) - string name(field_result->getName()); + std::string name(field_result->getName()); name.append("^"); name.append(ToString(power)); field_result->setName(name.c_str()); @@ -286,7 +286,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::lin(const MEDCALC::FieldHandler & f_hdl MEDCouplingFieldDouble* field_result; try { field_result = field->clone(true); - string functionToApply = "u*"+ToString(factor)+"+"+ToString(offset); + std::string functionToApply = "u*"+ToString(factor)+"+"+ToString(offset); field_result->applyFunc(functionToApply.c_str()); } catch (INTERP_KERNEL::Exception &ex) { @@ -294,7 +294,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::lin(const MEDCALC::FieldHandler & f_hdl } // Set the name (the default is the same as the original field) - string name = string("lin("); + std::string name = std::string("lin("); name.append(field->getName()); name.append(",factor="); name.append(ToString(factor)); @@ -333,7 +333,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::dup(const MEDCALC::FieldHandler & f_hdl } // Set the name (the default is the same as the original field) - string name = string("dup("); + std::string name = std::string("dup("); name.append(field->getName()); name.append(")"); field_result->setName(name.c_str()); @@ -347,7 +347,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::dup(const MEDCALC::FieldHandler & f_hdl /*! * This creates a new field by applying a function on the specified * field. The function is defined by a string of characters - * (function), that specifies the litteral equation to apply, and an + * (function), that specifies the literal equation to apply, and an * integer (nbcomponents), that specifies the number of components to * consider in the resulting field. This is to mimic the interface of * MEDCouplingFieldDouble::applyFunc. @@ -365,7 +365,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::fct(const MEDCALC::FieldHandler & f_hdl try { field_result = field->clone(true); if ( (nbResComponents == MEDCALC::NBCOMP_DEFAULT ) || - (nbResComponents < 1) || (nbResComponents > field_result->getNumberOfComponents()) ) { + (nbResComponents < 1) || (nbResComponents > (int)field_result->getNumberOfComponents()) ) { field_result->applyFunc(function); } else { @@ -376,7 +376,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::fct(const MEDCALC::FieldHandler & f_hdl throw KERNEL::createSalomeException(ex.what()); } - string name = string("fct("); name.append(field->getName()); + std::string name = std::string("fct("); name.append(field->getName()); name.append(",\""); name.append(function); name.append(",\""); name.append(ToString(nbResComponents)); name.append("\")"); field_result->setName(name.c_str());