#include <cctype>
#include <cstddef>
-#include <exception>
#include <set>
#include <sstream>
#include <limits>
{
res=(ValueUnit *)evaluateLowLev(gen);
}
- catch(std::exception& e)
+ catch(INTERP_KERNEL::Exception& e)
{
delete gen;
throw e;
{
_leaf->fillValue(ret);
}
- catch(std::exception& e)
+ catch(INTERP_KERNEL::Exception& e)
{
delete ret;
throw e;
for(auto iter3 : _func_btw_sub_expr)
iter3->operate(stackOfVal);
}
- catch(std::exception& e)
+ catch(INTERP_KERNEL::Exception& e)
{
for(auto & iter4 : stackOfVal)
delete iter4;
#include <algorithm>
#include <cmath>
#include <cstddef>
-#include <exception>
#include <map>
#include <sstream>
#include <iomanip>
_decomp_in_base=expr.evaluateUnit();
_is_interpretation_ok=true;
}
- catch(std::exception&) { }
+ catch(INTERP_KERNEL::Exception&) { }
}
}
{
case 1: intersector = new IntersectorCU1D<MyCMeshType, MyUMeshType, MatrixType>( src_mesh, tgt_mesh ); break;
case 2: intersector = new IntersectorCU2D<MyCMeshType, MyUMeshType, MatrixType>( src_mesh, tgt_mesh ); break;
- case 3: intersector = new IntersectorCU3D<MyCMeshType, MyUMeshType, MatrixType>( src_mesh, tgt_mesh, SplittingPolicy() ); break;
+ case 3: intersector = new IntersectorCU3D<MyCMeshType, MyUMeshType, MatrixType>( src_mesh, tgt_mesh, getSplittingPolicy() ); break;
}
// create empty maps for all target elements
result.resize( intersector->getNumberOfRowsOfResMatrix() );
#include "MappedBarycentric2DIntersectorP1P1.hxx"
#include "PlanarIntersector.hxx"
#include "NormalizedGeometricTypes"
+#include "InterpKernelUtilities.hxx"
#include "PointLocatorAlgos.txx"
#include <vector>
{
std::vector<double> CoordsT;
PlanarIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(icellT),CoordsT);
- ConnType nbOfNodesT=ConnType(CoordsT.size())/SPACEDIM;
+ ConnType nbOfNodesT=ToConnType(CoordsT.size())/SPACEDIM;
for(typename std::vector<ConnType>::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++)
{
NormalizedCellType tS=PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getTypeOfElement(OTT<ConnType,numPol>::indFC(*iter));
PlanarIntersector<MyMeshType,MyMatrix>::getRealSourceCoordinates(OTT<ConnType,numPol>::indFC(*iter),CoordsS);
std::vector<double> CoordsTTmp(CoordsT);
if(SPACEDIM==3)
- PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&CoordsS[0],&CoordsTTmp[0],ConnType(CoordsS.size())/SPACEDIM,nbOfNodesT);
+ PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&CoordsS[0],&CoordsTTmp[0],ToConnType(CoordsS.size())/SPACEDIM,nbOfNodesT);
const ConnType *startOfCellNodeConnT=PlanarIntersector<MyMeshType,MyMatrix>::_connectT+OTT<ConnType,numPol>::conn2C(PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT]);
for(ConnType nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
{
#include "PlanarIntersector.hxx"
#include "PlanarIntersectorP0P1Bary.hxx"
#include "InterpolationUtils.hxx"
+#include "InterpKernelUtilities.hxx"
#include "CellModel.hxx"
#include <vector>
bool isSourceQuad=CellModel::GetCellModel(tS).isQuadratic();
PlanarIntersector<MyMeshType,MyMatrix>::getRealSourceCoordinates(OTT<ConnType,numPol>::indFC(iS),srcCellCoords);
std::vector<double> *srcCoords(&srcCellCoords);
- ConnType srcNbNodes = ConnType(srcCellCoords.size())/SPACEDIM;
+ ConnType srcNbNodes = ToConnType(srcCellCoords.size())/SPACEDIM;
if(SPACEDIM==3)
{
srcCellCoordsTmp=srcCellCoords;
#include "PlanarIntersector.hxx"
#include "InterpolationUtils.hxx"
+#include "InterpKernelUtilities.hxx"
#include "PlanarIntersectorP0P1PL.hxx"
#include "PointLocatorAlgos.txx"
const ConnType *startOfCellNodeConnT=PlanarIntersector<MyMeshType,MyMatrix>::_connectT+OTT<ConnType,numPol>::conn2C(PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT]);
std::vector<double> coordsTarget;
PlanarIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(icellT),coordsTarget);
- ConnType nbNodesT=ConnType(coordsTarget.size())/SPACEDIM;
+ ConnType nbNodesT=ToConnType(coordsTarget.size())/SPACEDIM;
ii=0;
for(typename std::vector<ConnType>::const_iterator iter2=icellsS.begin();iter2!=icellsS.end();iter2++,ii++)
{
std::vector<double> tmpSource(coordsOfSources[ii]);
std::vector<double> tmpTarget(coordsTarget);
if(SPACEDIM==3)
- PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&tmpSource[0],&tmpTarget[0],ConnType(tmpSource.size())/SPACEDIM,nbNodesT);
+ PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&tmpSource[0],&tmpTarget[0],ToConnType(tmpSource.size())/SPACEDIM,nbNodesT);
for(ConnType nodeIdT=0;nodeIdT<nbNodesT;nodeIdT++)
{
- if(PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg2DSimple(&tmpTarget[0]+nodeIdT*SPACEDIM,&tmpSource[0],ConnType(tmpSource.size())/SPACEDIM,PlanarIntersector<MyMeshType,MyMatrix>::_precision))
+ if(PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg2DSimple(&tmpTarget[0]+nodeIdT*SPACEDIM,&tmpSource[0],ToConnType(tmpSource.size())/SPACEDIM,PlanarIntersector<MyMeshType,MyMatrix>::_precision))
{
ConnType curNodeTInCmode=OTT<ConnType,numPol>::coo2C(startOfCellNodeConnT[nodeIdT]);
typename MyMatrix::value_type& resRow=res[curNodeTInCmode];
#include "PlanarIntersector.txx"
#include "PlanarIntersectorP1P0.hxx"
#include "InterpolationUtils.hxx"
+#include "InterpKernelUtilities.hxx"
#include "CellModel.hxx"
#include <vector>
fillDualCellOfTri<SPACEDIM>(triangle,quadrangle);
std::vector<double> targetCellCoordsTmp(targetCellCoords);
if(SPACEDIM==3)
- orientation=PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&targetCellCoordsTmp[0],quadrangle,ConnType(targetCellCoords.size())/SPACEDIM,4);
+ orientation=PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&targetCellCoordsTmp[0],quadrangle,ToConnType(targetCellCoords.size())/SPACEDIM,4);
double surf=orientation*intersectGeometryWithQuadrangle(quadrangle,targetCellCoordsTmp,isTargetQuad);
surf=PlanarIntersector<MyMeshType,MyMatrix>::getValueRegardingOption(surf);
if(surf!=0.)
#include "PlanarIntersector.hxx"
#include "PlanarIntersectorP1P0Bary.hxx"
#include "InterpolationUtils.hxx"
+#include "InterpKernelUtilities.hxx"
#include "CellModel.hxx"
#include <vector>
// target cell data
PlanarIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(icellT),tgtCellCoords);
std::vector<double> * tgtCoords = & tgtCellCoords;
- ConnType tgtNbNodes = ConnType(tgtCellCoords.size())/SPACEDIM;
+ ConnType tgtNbNodes = ToConnType(tgtCellCoords.size())/SPACEDIM;
NormalizedCellType tT=PlanarIntersector<MyMeshType,MyMatrix>::_meshT.getTypeOfElement(OTT<ConnType,numPol>::indFC(icellT));
bool isTargetQuad=CellModel::GetCellModel(tT).isQuadratic();
#include "InterpolationUtils.hxx"
#include "NormalizedGeometricTypes"
#include "PlanarIntersectorP1P0PL.hxx"
+#include "InterpKernelUtilities.hxx"
#include "VolSurfFormulae.hxx"
#include "PointLocatorAlgos.txx"
PlanarIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(icellT),CoordsT);
double baryT[SPACEDIM];
double baryTTmp[SPACEDIM];
- calculateBarycenterDyn2<SPACEDIM>(&CoordsT[0],ConnType(CoordsT.size())/SPACEDIM,baryT);
+ calculateBarycenterDyn2<SPACEDIM>(&CoordsT[0],ToConnType(CoordsT.size())/SPACEDIM,baryT);
for(typename std::vector<ConnType>::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++)
{
NormalizedCellType tS=PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getTypeOfElement(OTT<ConnType,numPol>::indFC(*iter));
#include "PlanarIntersector.txx"
#include "PlanarIntersectorP1P1.hxx"
#include "InterpolationUtils.hxx"
+#include "InterpKernelUtilities.hxx"
#include <vector>
namespace INTERP_KERNEL
ConnType curNodeTInCmode=OTT<ConnType,numPol>::coo2C(startOfCellNodeConn[nodeIdT]);
PlanarIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinatesPermute(OTT<ConnType,numPol>::indFC(icellT),nodeIdT,polygT);
std::vector<double> polygDualT(SPACEDIM*2*(nbNodesT-1));
- fillDualCellOfPolyg<SPACEDIM>(&polygT[0],ConnType(polygT.size())/SPACEDIM,&polygDualT[0]);
+ fillDualCellOfPolyg<SPACEDIM>(&polygT[0],ToConnType(polygT.size())/SPACEDIM,&polygDualT[0]);
typename MyMatrix::value_type& resRow=res[curNodeTInCmode];
for(typename std::vector<ConnType>::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++)
{
std::vector<double> polygS;
PlanarIntersector<MyMeshType,MyMatrix>::getRealSourceCoordinatesPermute(OTT<ConnType,numPol>::indFC(iS),nodeIdS,polygS);
std::vector<double> polygDualS(SPACEDIM*2*(nbNodesS-1));
- fillDualCellOfPolyg<SPACEDIM>(&polygS[0],ConnType(polygS.size())/SPACEDIM,&polygDualS[0]);
+ fillDualCellOfPolyg<SPACEDIM>(&polygS[0],ToConnType(polygS.size())/SPACEDIM,&polygDualS[0]);
std::vector<double> polygDualTTmp(polygDualT);
if(SPACEDIM==3)
- orientation=PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&polygDualS[0],&polygDualTTmp[0],ConnType(polygDualS.size())/SPACEDIM,ConnType(polygDualT.size())/SPACEDIM);
+ orientation=PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&polygDualS[0],&polygDualTTmp[0],ToConnType(polygDualS.size())/SPACEDIM,ToConnType(polygDualT.size())/SPACEDIM);
double surf=orientation*intersectGeometryGeneral(polygDualTTmp,polygDualS);
surf=PlanarIntersector<MyMeshType,MyMatrix>::getValueRegardingOption(surf);
if(surf!=0.)
#include "InterpolationUtils.hxx"
#include "NormalizedGeometricTypes"
#include "PlanarIntersectorP1P1PL.hxx"
+#include "InterpKernelUtilities.hxx"
#include "PointLocatorAlgos.txx"
#include <vector>
{
std::vector<double> CoordsT;
this->getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(icellT),CoordsT);
- ConnType nbOfNodesT=ConnType(CoordsT.size())/SPACEDIM;
+ ConnType nbOfNodesT=ToConnType(CoordsT.size())/SPACEDIM;
for(typename std::vector<ConnType>::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++)
{
NormalizedCellType tS=this->_meshS.getTypeOfElement(OTT<ConnType,numPol>::indFC(*iter));
this->getRealSourceCoordinates(OTT<ConnType,numPol>::indFC(*iter),CoordsS);
std::vector<double> CoordsTTmp(CoordsT);
if(SPACEDIM==3)
- this->projectionThis(CoordsS.data(),CoordsTTmp.data(),ConnType(CoordsS.size())/SPACEDIM,nbOfNodesT);
+ this->projectionThis(CoordsS.data(),CoordsTTmp.data(),ToConnType(CoordsS.size())/SPACEDIM,nbOfNodesT);
const ConnType *startOfCellNodeConnT=this->_connectT+OTT<ConnType,numPol>::conn2C(this->_connIndexT[icellT]);
for(int nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
{
* @param argc number of arguments given to the program (should be 3, the user giving 2 mesh names)
* @param argv vector to the arguments as strings.
*/
-int main(int /*argc*/, char** argv)
+int main(int argc, char** argv)
{
using INTERP_TEST::PerfTestToolkit;