-// Copyright (C) 2011-2019 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
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());
}
// >>>>>>>>>
// _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).
{
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());
}
{
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());
}
{
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());
}
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) {
}
// 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());
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) {
}
// 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));
}
// 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());
/*!
* 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.
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 {
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());