-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2021 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
// 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
&CoordsS[0],&CoordsS[SPACEDIM*iS],&CoordsS[SPACEDIM*(iS+1)],
inter, PlanarIntersector<MyMeshType,MyMatrix>::_dim_caracteristic,
PlanarIntersector<MyMeshType,MyMatrix>::_precision);
- ConnType nb_inter=((ConnType)inter.size())/2;
+ ConnType nb_inter=ToConnType(inter.size())/2;
if(nb_inter >3) inter=reconstruct_polygon(inter);
for(ConnType i = 1; i<nb_inter-1; i++)
{
bool isSourceQuad)
{
double result = 0.;
- ConnType nbNodesS=sourceCoords.size()/SPACEDIM;
+ ConnType nbNodesS=ToConnType(sourceCoords.size())/SPACEDIM;
//Compute the intersection area
double area[SPACEDIM];
for(ConnType iT = 1; iT<3; iT++)
&sourceCoords[0],&sourceCoords[SPACEDIM*iS],&sourceCoords[SPACEDIM*(iS+1)],
inter, PlanarIntersector<MyMeshType,MyMatrix>::_dim_caracteristic,
PlanarIntersector<MyMeshType,MyMatrix>::_precision);
- ConnType nb_inter=((ConnType)inter.size())/2;
+ ConnType nb_inter=ToConnType(inter.size())/2;
if(nb_inter >3) inter=reconstruct_polygon(inter);
for(ConnType i = 1; i<nb_inter-1; i++)
{
const std::vector<double>& sourceCoords)
{
double result = 0.;
- ConnType nbNodesS=sourceCoords.size()/SPACEDIM;
- ConnType nbNodesT=targetCoords.size()/SPACEDIM;
+ ConnType nbNodesS=ToConnType(sourceCoords.size())/SPACEDIM;
+ ConnType nbNodesT=ToConnType(targetCoords.size())/SPACEDIM;
//Compute the intersection area
double area[SPACEDIM];
for(ConnType iT = 1; iT<nbNodesT-1; iT++)
&sourceCoords[0],&sourceCoords[SPACEDIM*iS],&sourceCoords[SPACEDIM*(iS+1)],
inter, PlanarIntersector<MyMeshType,MyMatrix>::_dim_caracteristic,
PlanarIntersector<MyMeshType,MyMatrix>::_precision);
- ConnType nb_inter=((ConnType)inter.size())/2;
+ ConnType nb_inter=ToConnType(inter.size())/2;
if(nb_inter >3) inter=reconstruct_polygon(inter);
for(ConnType i = 1; i<nb_inter-1; i++)
{
double inter_area[SPACEDIM], total_area = 0.;
double total_barycenter[SPACEDIM]={0.,0.};
- const ConnType nbNodesT=targetCell.size()/SPACEDIM;
+ const ConnType nbNodesT=ToConnType(targetCell.size())/SPACEDIM;
for(ConnType iT = 1; iT<nbNodesT-1; iT++)
{
std::vector<double> inter;
sourceCell[0], sourceCell[1], sourceCell[2],
inter, PlanarIntersector<MyMeshType,MyMatrix>::_dim_caracteristic,
PlanarIntersector<MyMeshType,MyMatrix>::_precision);
- ConnType nb_inter=((ConnType)inter.size())/2;
+ ConnType nb_inter=ToConnType(inter.size())/2;
if(nb_inter >3) inter=reconstruct_polygon(inter);
for(ConnType i = 1; i<nb_inter-1; i++)
{