-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2024 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
{
template<class TrueMainInterpolator>
template<class MyMeshType, class MatrixType>
- int Interpolation<TrueMainInterpolator>::fromToIntegralUniform(bool fromTo, const MyMeshType& mesh, MatrixType& result, const std::string& method)
+ typename MyMeshType::MyConnType Interpolation<TrueMainInterpolator>::fromToIntegralUniform(bool fromTo, const MyMeshType& mesh, MatrixType& result, const std::string& method)
{
typedef typename MyMeshType::MyConnType ConnType;
- int ret=-1;
+ ConnType ret=-1;
if(method=="P0")
{
IntegralUniformIntersectorP0<MyMeshType,MatrixType> intersector(mesh,InterpolationOptions::getMeasureAbsStatus());
double Interpolation<TrueMainInterpolator>::CalculateCharacteristicSizeOfMeshes(const MyMeshType& myMeshS, const MyMeshType& myMeshT, const int printLevel)
{
static const int SPACEDIM=MyMeshType::MY_SPACEDIM;
+ typedef typename MyMeshType::MyConnType ConnType;
- long nbMailleS=myMeshS.getNumberOfElements();
- long nbMailleT=myMeshT.getNumberOfElements();
+ ConnType nbMailleS=myMeshS.getNumberOfElements();
+ ConnType nbMailleT=myMeshT.getNumberOfElements();
/**************************************************/
/* Search the characteristic size of the meshes */
if(nbMailleS!=0)
{
diagonalS=getDistanceBtw2Pts<SPACEDIM>(BoxS+SPACEDIM,BoxS);
- dimCaracteristicS=diagonalS/nbMailleS;
+ dimCaracteristicS=diagonalS/(double)nbMailleS;
}
double diagonalT,dimCaracteristicT=std::numeric_limits<double>::max();
if(nbMailleT!=0)
{
diagonalT=getDistanceBtw2Pts<SPACEDIM>(BoxT+SPACEDIM,BoxT);
- dimCaracteristicT=diagonalT/nbMailleT;
+ dimCaracteristicT=diagonalT/(double)nbMailleT;
}
if (printLevel>=1)
{