From fb2d7b9bf48340b5065611a8159840d8667c70c5 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 24 May 2010 11:54:42 +0000 Subject: [PATCH] This commit was generated by cvs2git to create branch 'BR_Prepare_to_SALOME_6x'. Sprout from V6_main 2010-05-24 11:54:38 UTC inv 'Changing version to 6.1.0' Cherrypick from master 2009-03-06 09:28:28 UTC secher 'debug: forget of TRI6': adm_local/unix/config_files/check_libxml.m4 adm_local_without_kernel/unix/config_files/check_pthreads.m4 adm_local_without_kernel/unix/config_files/config.guess adm_local_without_kernel/unix/config_files/config.sub adm_local_without_kernel/unix/config_files/install-sh adm_local_without_kernel/unix/config_files/libtool.m4 adm_local_without_kernel/unix/config_files/ltconfig adm_local_without_kernel/unix/config_files/ltmain.sh resources/Deff_fdt_5.8_castem_efmh_diff_conc_dom.med resources/Deff_fdt_5.8_castem_vf_diff_conc_dom.med resources/MED.config resources/MED_en.xml resources/Old_Deff_fdt_5.8_castem_efmh_diff_conc_dom.med resources/Old_Deff_fdt_5.8_castem_vf_diff_conc_dom.med src/INTERP_KERNEL/Geometric2D/AbstractEdge.cxx src/INTERP_KERNEL/Geometric2D/AbstractEdge.hxx src/INTERP_KERNEL/Geometric2D/Bounds.cxx src/INTERP_KERNEL/Geometric2D/Bounds.hxx src/INTERP_KERNEL/Geometric2D/ComposedEdge.cxx src/INTERP_KERNEL/Geometric2D/ComposedEdge.hxx src/INTERP_KERNEL/Geometric2D/Edge.cxx src/INTERP_KERNEL/Geometric2D/Edge.hxx src/INTERP_KERNEL/Geometric2D/Edge.txx src/INTERP_KERNEL/Geometric2D/EdgeArcCircle.cxx src/INTERP_KERNEL/Geometric2D/EdgeArcCircle.hxx src/INTERP_KERNEL/Geometric2D/EdgeInfLin.cxx src/INTERP_KERNEL/Geometric2D/EdgeInfLin.hxx src/INTERP_KERNEL/Geometric2D/EdgeLin.cxx src/INTERP_KERNEL/Geometric2D/EdgeLin.hxx src/INTERP_KERNEL/Geometric2D/ElementaryEdge.cxx src/INTERP_KERNEL/Geometric2D/ElementaryEdge.hxx src/INTERP_KERNEL/Geometric2D/Node.cxx src/INTERP_KERNEL/Geometric2D/Node.hxx src/INTERP_KERNEL/Geometric2D/Precision.cxx src/INTERP_KERNEL/Geometric2D/Precision.hxx src/INTERP_KERNEL/Geometric2D/QuadraticPolygon.cxx src/INTERP_KERNEL/Geometric2D/QuadraticPolygon.hxx src/INTERP_KERNEL/PolyhedronIntersector.hxx src/INTERP_KERNEL/PolyhedronIntersector.txx src/INTERP_KERNELTest/RemapperTest.hxx src/MEDCoupling/MEDCouplingSMesh.cxx src/MEDCoupling/MEDCouplingSMesh.hxx src/MEDCoupling/MemArray.cxx src/MEDCoupling/MemArray.hxx src/MEDCoupling/MemArray.txx src/MEDCoupling/RefCountObject.hxx src/MEDCoupling/TimeLabel.cxx src/MEDCoupling/TimeLabel.hxx src/MEDGUI/MED_images.po src/MEDGUI/MED_msg_en.po src/MEDGUI/MED_msg_fr.po src/MEDMEM/PointLocatorAlgos.txx src/MEDMEM/Remapper.cxx src/MEDMEM/Remapper.hxx src/ParaMEDMEM/IntersectionDEC.cxx src/ParaMEDMEM/IntersectionDEC.hxx src/ParaMEDMEM/MEDLoader/MEDLoader.cxx src/ParaMEDMEM/MEDLoader/MEDLoader.hxx src/ParaMEDMEM/MEDLoader/Makefile.am src/ParaMEDMEM/Test/MPIAccessDECTest.cxx src/ParaMEDMEM/Test/MPIAccessDECTest.hxx src/ParaMEDMEM/Test/MPIAccessTest.cxx src/ParaMEDMEM/Test/MPIAccessTest.hxx src/ParaMEDMEM/Test/MPIMainTest.hxx src/ParaMEDMEM/Test/Makefile.am src/ParaMEDMEM/Test/ParaMEDMEMTest.cxx src/ParaMEDMEM/Test/ParaMEDMEMTest.hxx src/ParaMEDMEM/Test/ParaMEDMEMTest_BlockTopology.cxx src/ParaMEDMEM/Test/ParaMEDMEMTest_IntersectionDEC.cxx src/ParaMEDMEM/Test/ParaMEDMEMTest_MPIProcessorGroup.cxx src/ParaMEDMEM/Test/ParaMEDMEMTest_NonCoincidentDEC.cxx src/ParaMEDMEM/Test/ParaMEDMEMTest_StructuredCoincidentDEC.cxx src/ParaMEDMEM/Test/TestMPIAccess.cxx src/ParaMEDMEM/Test/TestMPIAccessDEC.cxx src/ParaMEDMEM/Test/TestParaMEDMEM.cxx src/ParaMEDMEM/Test/test_AllToAllDEC.cxx src/ParaMEDMEM/Test/test_AllToAllTimeDEC.cxx src/ParaMEDMEM/Test/test_AllToAllvDEC.cxx src/ParaMEDMEM/Test/test_AllToAllvTimeDEC.cxx src/ParaMEDMEM/Test/test_AllToAllvTimeDoubleDEC.cxx src/ParaMEDMEM/Test/test_MPI_Access_Cancel.cxx src/ParaMEDMEM/Test/test_MPI_Access_Cyclic_ISend_IRecv.cxx src/ParaMEDMEM/Test/test_MPI_Access_Cyclic_Send_Recv.cxx src/ParaMEDMEM/Test/test_MPI_Access_IProbe.cxx src/ParaMEDMEM/Test/test_MPI_Access_ISendRecv.cxx src/ParaMEDMEM/Test/test_MPI_Access_ISend_IRecv.cxx src/ParaMEDMEM/Test/test_MPI_Access_ISend_IRecv_BottleNeck.cxx src/ParaMEDMEM/Test/test_MPI_Access_ISend_IRecv_Length.cxx src/ParaMEDMEM/Test/test_MPI_Access_ISend_IRecv_Length_1.cxx src/ParaMEDMEM/Test/test_MPI_Access_Probe.cxx src/ParaMEDMEM/Test/test_MPI_Access_SendRecv.cxx src/ParaMEDMEM/Test/test_MPI_Access_Send_Recv.cxx src/ParaMEDMEM/Test/test_MPI_Access_Send_Recv_Length.cxx src/ParaMEDMEM/Test/test_MPI_Access_Time.cxx src/ParaMEDMEM/Test/test_MPI_Access_Time_0.cxx src/ParaMEDMEM_Swig/test_IntersectionDEC.py Delete: adm_local/cmake_files/FindXDR.cmake adm_local/unix/config_files/check_GUI.m4 adm_local/unix/config_files/renumber.m4 adm_local_without_kernel/cmake_files/FindMPI.cmake adm_local_without_kernel/cmake_files/FindPLATFORM.cmake adm_local_without_kernel/cmake_files/am2cmake.py adm_local_without_kernel/unix/config_files/DEPRECATED/check_pthreads.m4 adm_local_without_kernel/unix/config_files/DEPRECATED/config.guess adm_local_without_kernel/unix/config_files/DEPRECATED/config.sub adm_local_without_kernel/unix/config_files/DEPRECATED/install-sh adm_local_without_kernel/unix/config_files/DEPRECATED/libtool.m4 adm_local_without_kernel/unix/config_files/DEPRECATED/ltconfig adm_local_without_kernel/unix/config_files/DEPRECATED/ltmain.sh adm_local_without_kernel/unix/config_files/acx_pthread.m4 adm_local_without_kernel/unix/config_files/check_htmlgen.m4 adm_local_without_kernel/unix/config_files/check_libxml.m4 adm_local_without_kernel/unix/config_files/local_install.m4 doc/doxygen/images/head.png doc/doxygen/medcoupling.dox doc/doxygen/static/doxygen.css doc/doxygen/static/footer.html doc/doxygen/static/header.html.in doc/salome/tui/images/head.png doc/salome/tui/input/index.doc doc/salome/tui/static/header.html.in idl/MEDCouplingCorbaServant.idl idl/MEDCouplingCorbaServantTest.idl idl/ParaMEDCouplingCorbaServant.idl idl/ParaMEDMEMComponent.idl resources/Mesh3D_10_2d1.med resources/Mesh3D_10_2d2.med resources/Mesh3D_11.med resources/Test2D.med resources/Test2Dpoly.med resources/Test3D.med resources/Test3Dpoly.med resources/testStructCart3D.med src/INTERP_KERNEL/Bases/InterpKernelHashFun.hxx src/INTERP_KERNEL/Bases/InterpKernelHashMap.hxx src/INTERP_KERNEL/Bases/InterpKernelHashTable.hxx src/INTERP_KERNEL/Bases/InterpKernelStlExt.hxx src/INTERP_KERNEL/CurveIntersector.hxx src/INTERP_KERNEL/CurveIntersector.txx src/INTERP_KERNEL/CurveIntersectorP0P0.hxx src/INTERP_KERNEL/CurveIntersectorP0P0.txx src/INTERP_KERNEL/CurveIntersectorP0P1.hxx src/INTERP_KERNEL/CurveIntersectorP0P1.txx src/INTERP_KERNEL/CurveIntersectorP1P0.hxx src/INTERP_KERNEL/CurveIntersectorP1P0.txx src/INTERP_KERNEL/CurveIntersectorP1P1.hxx src/INTERP_KERNEL/CurveIntersectorP1P1.txx src/INTERP_KERNEL/DirectedBoundingBox.cxx src/INTERP_KERNEL/DirectedBoundingBox.hxx src/INTERP_KERNEL/ExprEval/INTERPKERNELEXPREVALDefines.hxx src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.cxx src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.hxx src/INTERP_KERNEL/ExprEval/InterpKernelFunction.cxx src/INTERP_KERNEL/ExprEval/InterpKernelFunction.hxx src/INTERP_KERNEL/ExprEval/InterpKernelUnit.cxx src/INTERP_KERNEL/ExprEval/InterpKernelUnit.hxx src/INTERP_KERNEL/ExprEval/InterpKernelValue.cxx src/INTERP_KERNEL/ExprEval/InterpKernelValue.hxx src/INTERP_KERNEL/ExprEval/Makefile.am src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DAbstractEdge.cxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DAbstractEdge.hxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DBounds.cxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DBounds.hxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.cxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.hxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.cxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.hxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.txx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.cxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.hxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeInfLin.cxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeInfLin.hxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.cxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.hxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DElementaryEdge.cxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DElementaryEdge.hxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.cxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.hxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DPrecision.cxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DPrecision.hxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.hxx src/INTERP_KERNEL/IntegralUniformIntersector.hxx src/INTERP_KERNEL/IntegralUniformIntersector.txx src/INTERP_KERNEL/Interpolation.txx src/INTERP_KERNEL/Interpolation1D.hxx src/INTERP_KERNEL/Interpolation1D.txx src/INTERP_KERNEL/Interpolation2DCurve.hxx src/INTERP_KERNEL/Interpolation2DCurve.txx src/INTERP_KERNEL/InterpolationCC.hxx src/INTERP_KERNEL/InterpolationCC.txx src/INTERP_KERNEL/InterpolationCU.hxx src/INTERP_KERNEL/InterpolationCU.txx src/INTERP_KERNEL/InterpolationCurve.hxx src/INTERP_KERNEL/InterpolationCurve.txx src/INTERP_KERNEL/InterpolationOptions.cxx src/INTERP_KERNEL/Intersector3DP1P0Bary.hxx src/INTERP_KERNEL/Intersector3DP1P0Bary.txx src/INTERP_KERNEL/Intersector3DP1P1.hxx src/INTERP_KERNEL/Intersector3DP1P1.txx src/INTERP_KERNEL/IntersectorCU.hxx src/INTERP_KERNEL/IntersectorCU.txx src/INTERP_KERNEL/IntersectorCU1D.hxx src/INTERP_KERNEL/IntersectorCU1D.txx src/INTERP_KERNEL/IntersectorCU2D.hxx src/INTERP_KERNEL/IntersectorCU2D.txx src/INTERP_KERNEL/IntersectorCU3D.hxx src/INTERP_KERNEL/IntersectorCU3D.txx src/INTERP_KERNEL/PlanarIntersectorP0P1PL.hxx src/INTERP_KERNEL/PlanarIntersectorP0P1PL.txx src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.hxx src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.txx src/INTERP_KERNEL/PlanarIntersectorP1P0PL.hxx src/INTERP_KERNEL/PlanarIntersectorP1P0PL.txx src/INTERP_KERNEL/PlanarIntersectorP1P1.hxx src/INTERP_KERNEL/PlanarIntersectorP1P1.txx src/INTERP_KERNEL/PlanarIntersectorP1P1PL.hxx src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx src/INTERP_KERNEL/PointLocator2DIntersector.hxx src/INTERP_KERNEL/PointLocator2DIntersector.txx src/INTERP_KERNEL/PointLocator3DIntersectorP0P0.hxx src/INTERP_KERNEL/PointLocator3DIntersectorP0P0.txx src/INTERP_KERNEL/PointLocator3DIntersectorP0P1.hxx src/INTERP_KERNEL/PointLocator3DIntersectorP0P1.txx src/INTERP_KERNEL/PointLocator3DIntersectorP1P0.hxx src/INTERP_KERNEL/PointLocator3DIntersectorP1P0.txx src/INTERP_KERNEL/PointLocator3DIntersectorP1P1.hxx src/INTERP_KERNEL/PointLocator3DIntersectorP1P1.txx src/INTERP_KERNEL/PointLocatorAlgos.txx src/INTERP_KERNEL/PolyhedronIntersectorP0P0.hxx src/INTERP_KERNEL/PolyhedronIntersectorP0P0.txx src/INTERP_KERNEL/PolyhedronIntersectorP1P0Bary.hxx src/INTERP_KERNEL/PolyhedronIntersectorP1P0Bary.txx src/INTERP_KERNEL/PolyhedronIntersectorP1P1.hxx src/INTERP_KERNEL/PolyhedronIntersectorP1P1.txx src/INTERP_KERNEL/VolSurfUser.hxx src/INTERP_KERNEL/VolSurfUser.txx src/INTERP_KERNELTest/ExprEvalInterpTest.cxx src/INTERP_KERNELTest/ExprEvalInterpTest.hxx src/INTERP_KERNELTest/InterpKernelTestExport.hxx src/INTERP_KERNELTest/TestInterpKernelUtils.cxx src/INTERP_KERNELTest/TestInterpKernelUtils.hxx src/MEDCoupling/MEDCoupling.hxx src/MEDCoupling/MEDCouplingCMesh.cxx src/MEDCoupling/MEDCouplingCMesh.hxx src/MEDCoupling/MEDCouplingExtrudedMesh.cxx src/MEDCoupling/MEDCouplingExtrudedMesh.hxx src/MEDCoupling/MEDCouplingFieldDiscretization.cxx src/MEDCoupling/MEDCouplingFieldDiscretization.hxx src/MEDCoupling/MEDCouplingMemArray.cxx src/MEDCoupling/MEDCouplingMemArray.hxx src/MEDCoupling/MEDCouplingMemArray.txx src/MEDCoupling/MEDCouplingMesh.cxx src/MEDCoupling/MEDCouplingNatureOfField.hxx src/MEDCoupling/MEDCouplingNormalizedCartesianMesh.hxx src/MEDCoupling/MEDCouplingNormalizedCartesianMesh.txx src/MEDCoupling/MEDCouplingPointSet.cxx src/MEDCoupling/MEDCouplingPointSet.hxx src/MEDCoupling/MEDCouplingPointSet.txx src/MEDCoupling/MEDCouplingRefCountObject.cxx src/MEDCoupling/MEDCouplingRefCountObject.hxx src/MEDCoupling/MEDCouplingRemapper.cxx src/MEDCoupling/MEDCouplingRemapper.hxx src/MEDCoupling/MEDCouplingTimeDiscretization.cxx src/MEDCoupling/MEDCouplingTimeDiscretization.hxx src/MEDCoupling/MEDCouplingTimeLabel.cxx src/MEDCoupling/MEDCouplingTimeLabel.hxx src/MEDCoupling/MEDCouplingUMeshDesc.cxx src/MEDCoupling/MEDCouplingUMeshDesc.hxx src/MEDCoupling/Test/MEDCouplingBasicsTest0.cxx src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx src/MEDCoupling/Test/MEDCouplingBasicsTestData1.hxx src/MEDCoupling/Test/MEDCouplingBasicsTestInterp.cxx src/MEDCoupling/Test/MEDCouplingRemapperTest.cxx src/MEDCoupling/Test/MEDCouplingRemapperTest.hxx src/MEDCoupling/Test/TestMEDCouplingRemapper.cxx src/MEDCouplingCorba/Client/MEDCouplingClient.hxx src/MEDCouplingCorba/Client/MEDCouplingFieldDoubleClient.cxx src/MEDCouplingCorba/Client/MEDCouplingFieldDoubleClient.hxx src/MEDCouplingCorba/Client/MEDCouplingMeshClient.cxx src/MEDCouplingCorba/Client/MEDCouplingMeshClient.hxx src/MEDCouplingCorba/Client/MEDCouplingUMeshClient.cxx src/MEDCouplingCorba/Client/MEDCouplingUMeshClient.hxx src/MEDCouplingCorba/Client/Makefile.am src/MEDCouplingCorba/MEDCouplingCorba.hxx src/MEDCouplingCorba/MEDCouplingFieldDoubleServant.cxx src/MEDCouplingCorba/MEDCouplingFieldDoubleServant.hxx src/MEDCouplingCorba/MEDCouplingFieldServant.cxx src/MEDCouplingCorba/MEDCouplingFieldServant.hxx src/MEDCouplingCorba/MEDCouplingMeshServant.cxx src/MEDCouplingCorba/MEDCouplingMeshServant.hxx src/MEDCouplingCorba/MEDCouplingPointSetServant.cxx src/MEDCouplingCorba/MEDCouplingPointSetServant.hxx src/MEDCouplingCorba/MEDCouplingRefCountServant.cxx src/MEDCouplingCorba/MEDCouplingRefCountServant.hxx src/MEDCouplingCorba/MEDCouplingUMeshServant.cxx src/MEDCouplingCorba/MEDCouplingUMeshServant.hxx src/MEDCouplingCorba/Makefile.am src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponent.cxx src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponent.hxx src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponentClt.cxx src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponentClt.hxx src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponentServ.cxx src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponentServ.hxx src/MEDCouplingCorba/Test/Makefile.am src/MEDCouplingCorba/Test/TestMEDCouplingCorbaClt.cxx src/MEDCouplingCorba/Test/TestMEDCouplingCorbaServ.cxx src/MEDCouplingCorba_Swig/Client/Makefile.am src/MEDCouplingCorba_Swig/Client/libMEDCouplingClient_Swig.i src/MEDCouplingCorba_Swig/MEDCouplingCorbaSwigTest.py src/MEDCouplingCorba_Swig/MEDCouplingCorbaSwigTestClt.py src/MEDCouplingCorba_Swig/MEDCouplingCorbaSwigTestServ.py src/MEDCouplingCorba_Swig/Makefile.am src/MEDCouplingCorba_Swig/TestMEDCouplingCorbaClt.py src/MEDCouplingCorba_Swig/TestMEDCouplingCorbaServ.py src/MEDCouplingCorba_Swig/libMEDCouplingClient_Swig.i src/MEDCouplingCorba_Swig/libMEDCouplingCorba_Swig.i src/MEDCoupling_Swig/MEDCouplingBasicsTest.py src/MEDCoupling_Swig/MEDCouplingRemapperTest.py src/MEDCoupling_Swig/MEDCouplingTypemaps.i src/MEDCoupling_Swig/Makefile.am src/MEDCoupling_Swig/libMEDCouplingRemapper_Swig.i src/MEDCoupling_Swig/libMEDCoupling_Swig.i src/MEDLoader/MEDLoader.cxx src/MEDLoader/MEDLoader.hxx src/MEDLoader/MEDLoaderBase.cxx src/MEDLoader/MEDLoaderBase.hxx src/MEDLoader/Makefile.am src/MEDLoader/Swig/Makefile.am src/MEDLoader/Swig/libMEDLoader_Swig.i src/MEDMEM/MEDMEM_RCBase.cxx src/MEDMEM/MEDMEM_Remapper.cxx src/MEDMEM/MEDMEM_Remapper.hxx src/MEDMEMBinTest/dumpInterpolation.cxx src/MEDMEMCppTest/MEDMEMCppTestExport.hxx src/MEDMEMCppTest/MEDMEMTest_DesactivateFacesComputation.cxx src/MEDMEMCppTest/MEDMEMTest_GetVolumeAbs.cxx src/MEDMEMCppTest/MEDMEMTest_PartialDescendingConnectivity.cxx src/MEDMEMCppTest/MEDMEMTest_Remapper.cxx src/MEDMEMCppTest/MEDMEMTest_Utils.cxx src/MEDMEMCppTest/MEDMEMTest_Utils.hxx src/MEDMEM_SWIG/avs2med src/MEDMEM_SWIG/med2sauv src/MEDMEM_SWIG/medutilities.py src/MEDMEM_SWIG/sauv2med src/MedClient/src/MEDClient.hxx src/ParaMEDCouplingCorba/Makefile.am src/ParaMEDCouplingCorba/ParaMEDCouplingFieldDoubleServant.cxx src/ParaMEDCouplingCorba/ParaMEDCouplingFieldDoubleServant.hxx src/ParaMEDCouplingCorba/ParaMEDCouplingUMeshServant.cxx src/ParaMEDCouplingCorba/ParaMEDCouplingUMeshServant.hxx src/ParaMEDLoader/Makefile.am src/ParaMEDLoader/ParaMEDLoader.cxx src/ParaMEDLoader/ParaMEDLoader.hxx src/ParaMEDMEM/ICoCoField.cxx src/ParaMEDMEM/ICoCoTrioField.cxx src/ParaMEDMEM/InterpKernelDEC.cxx src/ParaMEDMEM/InterpKernelDEC.hxx src/ParaMEDMEMComponent/MPIMEDCouplingFieldDoubleServant.cxx src/ParaMEDMEMComponent/MPIMEDCouplingFieldDoubleServant.hxx src/ParaMEDMEMComponent/Makefile.am src/ParaMEDMEMComponent/ParaMEDMEMComponent_i.cxx src/ParaMEDMEMComponent/ParaMEDMEMComponent_i.hxx src/ParaMEDMEMTest/MPIAccessDECTest.cxx src/ParaMEDMEMTest/MPIAccessDECTest.hxx src/ParaMEDMEMTest/MPIAccessTest.cxx src/ParaMEDMEMTest/MPIAccessTest.hxx src/ParaMEDMEMTest/MPIMainTest.hxx src/ParaMEDMEMTest/Makefile.am src/ParaMEDMEMTest/ParaMEDMEMTest.cxx src/ParaMEDMEMTest/ParaMEDMEMTest.hxx src/ParaMEDMEMTest/ParaMEDMEMTest_BlockTopology.cxx src/ParaMEDMEMTest/ParaMEDMEMTest_FabienAPI.cxx src/ParaMEDMEMTest/ParaMEDMEMTest_Gauthier1.cxx src/ParaMEDMEMTest/ParaMEDMEMTest_ICocoTrio.cxx src/ParaMEDMEMTest/ParaMEDMEMTest_InterpKernelDEC.cxx src/ParaMEDMEMTest/ParaMEDMEMTest_MEDLoader.cxx src/ParaMEDMEMTest/ParaMEDMEMTest_MPIProcessorGroup.cxx src/ParaMEDMEMTest/ParaMEDMEMTest_NonCoincidentDEC.cxx src/ParaMEDMEMTest/ParaMEDMEMTest_StructuredCoincidentDEC.cxx src/ParaMEDMEMTest/TestMPIAccess.cxx src/ParaMEDMEMTest/TestMPIAccessDEC.cxx src/ParaMEDMEMTest/TestParaMEDMEM.cxx src/ParaMEDMEMTest/test_AllToAllDEC.cxx src/ParaMEDMEMTest/test_AllToAllTimeDEC.cxx src/ParaMEDMEMTest/test_AllToAllvDEC.cxx src/ParaMEDMEMTest/test_AllToAllvTimeDEC.cxx src/ParaMEDMEMTest/test_AllToAllvTimeDoubleDEC.cxx src/ParaMEDMEMTest/test_MPI_Access_Cancel.cxx src/ParaMEDMEMTest/test_MPI_Access_Cyclic_ISend_IRecv.cxx src/ParaMEDMEMTest/test_MPI_Access_Cyclic_Send_Recv.cxx src/ParaMEDMEMTest/test_MPI_Access_IProbe.cxx src/ParaMEDMEMTest/test_MPI_Access_ISendRecv.cxx src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv.cxx src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_BottleNeck.cxx src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_Length.cxx src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_Length_1.cxx src/ParaMEDMEMTest/test_MPI_Access_Probe.cxx src/ParaMEDMEMTest/test_MPI_Access_SendRecv.cxx src/ParaMEDMEMTest/test_MPI_Access_Send_Recv.cxx src/ParaMEDMEMTest/test_MPI_Access_Send_Recv_Length.cxx src/ParaMEDMEMTest/test_MPI_Access_Time.cxx src/ParaMEDMEMTest/test_MPI_Access_Time_0.cxx src/ParaMEDMEMTest/test_perf.cxx src/ParaMEDMEM_Swig/test_InterpKernelDEC.py src/RENUMBER/Makefile.am src/RENUMBER/RENUMBER_BOOSTRenumbering.cxx src/RENUMBER/RENUMBER_BOOSTRenumbering.hxx src/RENUMBER/RENUMBER_METISRenumbering.cxx src/RENUMBER/RENUMBER_METISRenumbering.hxx src/RENUMBER/RENUMBER_Renumbering.cxx src/RENUMBER/RENUMBER_Renumbering.hxx src/RENUMBER/RenumberingFactory.cxx src/RENUMBER/RenumberingFactory.hxx src/RENUMBER/renumbering.cxx src/RENUMBER/testRenumbering.py --- adm_local/unix/config_files/renumber.m4 | 57 - doc/doxygen/images/head.png | Bin 78545 -> 0 bytes doc/doxygen/medcoupling.dox | 411 --- doc/doxygen/static/doxygen.css | 468 ---- doc/doxygen/static/footer.html | 13 - doc/doxygen/static/header.html.in | 10 - doc/salome/tui/images/head.png | Bin 78545 -> 0 bytes doc/salome/tui/input/index.doc | 13 - doc/salome/tui/static/header.html.in | 14 - resources/Mesh3D_11.med | Bin 153532 -> 0 bytes resources/Test2D.med | Bin 30380 -> 0 bytes resources/Test2Dpoly.med | Bin 22084 -> 0 bytes resources/Test3D.med | Bin 27300 -> 0 bytes resources/Test3Dpoly.med | Bin 16680 -> 0 bytes .../Bases/InterpKernelHashFun.hxx | 135 - .../Bases/InterpKernelHashMap.hxx | 403 --- .../Bases/InterpKernelHashTable.hxx | 995 -------- .../Bases/InterpKernelStlExt.hxx | 43 - src/INTERP_KERNEL/CurveIntersector.hxx | 74 - src/INTERP_KERNEL/CurveIntersector.txx | 397 --- src/INTERP_KERNEL/CurveIntersectorP0P0.hxx | 47 - src/INTERP_KERNEL/CurveIntersectorP0P0.txx | 77 - src/INTERP_KERNEL/CurveIntersectorP0P1.hxx | 47 - src/INTERP_KERNEL/CurveIntersectorP0P1.txx | 95 - src/INTERP_KERNEL/CurveIntersectorP1P0.hxx | 45 - src/INTERP_KERNEL/CurveIntersectorP1P0.txx | 95 - src/INTERP_KERNEL/CurveIntersectorP1P1.hxx | 47 - src/INTERP_KERNEL/CurveIntersectorP1P1.txx | 90 - src/INTERP_KERNEL/DirectedBoundingBox.cxx | 749 ------ src/INTERP_KERNEL/DirectedBoundingBox.hxx | 118 - .../ExprEval/INTERPKERNELEXPREVALDefines.hxx | 41 - .../ExprEval/InterpKernelExprParser.cxx | 693 ------ .../ExprEval/InterpKernelExprParser.hxx | 117 - .../ExprEval/InterpKernelFunction.cxx | 568 ----- .../ExprEval/InterpKernelFunction.hxx | 253 -- .../ExprEval/InterpKernelUnit.cxx | 372 --- .../ExprEval/InterpKernelUnit.hxx | 117 - .../ExprEval/InterpKernelValue.cxx | 425 ---- .../ExprEval/InterpKernelValue.hxx | 157 -- src/INTERP_KERNEL/ExprEval/Makefile.am | 55 - ...Geo2DAbstractEdge.cxx => AbstractEdge.cxx} | 9 +- ...Geo2DAbstractEdge.hxx => AbstractEdge.hxx} | 11 +- ...InterpKernelGeo2DBounds.cxx => Bounds.cxx} | 13 +- ...InterpKernelGeo2DBounds.hxx => Bounds.hxx} | 9 +- ...Geo2DComposedEdge.cxx => ComposedEdge.cxx} | 101 +- ...Geo2DComposedEdge.hxx => ComposedEdge.hxx} | 11 +- .../{InterpKernelGeo2DEdge.cxx => Edge.cxx} | 36 +- .../{InterpKernelGeo2DEdge.hxx => Edge.hxx} | 13 +- .../{InterpKernelGeo2DEdge.txx => Edge.txx} | 8 +- ...o2DEdgeArcCircle.cxx => EdgeArcCircle.cxx} | 14 +- ...o2DEdgeArcCircle.hxx => EdgeArcCircle.hxx} | 16 +- ...rnelGeo2DEdgeInfLin.cxx => EdgeInfLin.cxx} | 5 +- ...rnelGeo2DEdgeInfLin.hxx => EdgeInfLin.hxx} | 9 +- ...terpKernelGeo2DEdgeLin.cxx => EdgeLin.cxx} | 12 +- ...terpKernelGeo2DEdgeLin.hxx => EdgeLin.hxx} | 12 +- ...DElementaryEdge.cxx => ElementaryEdge.cxx} | 7 +- ...DElementaryEdge.hxx => ElementaryEdge.hxx} | 11 +- .../{InterpKernelGeo2DNode.cxx => Node.cxx} | 8 +- .../{InterpKernelGeo2DNode.hxx => Node.hxx} | 9 +- ...KernelGeo2DPrecision.cxx => Precision.cxx} | 5 +- ...KernelGeo2DPrecision.hxx => Precision.hxx} | 7 +- ...draticPolygon.cxx => QuadraticPolygon.cxx} | 176 +- ...draticPolygon.hxx => QuadraticPolygon.hxx} | 17 +- .../IntegralUniformIntersector.hxx | 71 - .../IntegralUniformIntersector.txx | 155 -- src/INTERP_KERNEL/Interpolation.txx | 76 - src/INTERP_KERNEL/Interpolation1D.txx | 26 - src/INTERP_KERNEL/Interpolation2DCurve.hxx | 38 - src/INTERP_KERNEL/Interpolation2DCurve.txx | 63 - src/INTERP_KERNEL/InterpolationCC.hxx | 51 - src/INTERP_KERNEL/InterpolationCC.txx | 248 -- src/INTERP_KERNEL/InterpolationCU.hxx | 47 - src/INTERP_KERNEL/InterpolationCU.txx | 237 -- src/INTERP_KERNEL/InterpolationCurve.hxx | 43 - src/INTERP_KERNEL/InterpolationCurve.txx | 176 -- src/INTERP_KERNEL/InterpolationOptions.cxx | 209 -- src/INTERP_KERNEL/Intersector3DP1P0Bary.hxx | 37 - src/INTERP_KERNEL/Intersector3DP1P0Bary.txx | 45 - src/INTERP_KERNEL/Intersector3DP1P1.hxx | 37 - src/INTERP_KERNEL/Intersector3DP1P1.txx | 45 - src/INTERP_KERNEL/IntersectorCU.hxx | 78 - src/INTERP_KERNEL/IntersectorCU.txx | 163 -- src/INTERP_KERNEL/IntersectorCU1D.hxx | 47 - src/INTERP_KERNEL/IntersectorCU1D.txx | 82 - src/INTERP_KERNEL/IntersectorCU2D.hxx | 47 - src/INTERP_KERNEL/IntersectorCU2D.txx | 76 - src/INTERP_KERNEL/IntersectorCU3D.hxx | 55 - src/INTERP_KERNEL/IntersectorCU3D.txx | 156 -- src/INTERP_KERNEL/PlanarIntersectorP0P1PL.hxx | 43 - src/INTERP_KERNEL/PlanarIntersectorP0P1PL.txx | 83 - .../PlanarIntersectorP1P0Bary.hxx | 54 - .../PlanarIntersectorP1P0Bary.txx | 116 - src/INTERP_KERNEL/PlanarIntersectorP1P0PL.hxx | 43 - src/INTERP_KERNEL/PlanarIntersectorP1P0PL.txx | 107 - src/INTERP_KERNEL/PlanarIntersectorP1P1.hxx | 48 - src/INTERP_KERNEL/PlanarIntersectorP1P1.txx | 100 - src/INTERP_KERNEL/PlanarIntersectorP1P1PL.hxx | 43 - src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx | 98 - .../PointLocator2DIntersector.hxx | 55 - .../PointLocator2DIntersector.txx | 164 -- .../PointLocator3DIntersectorP0P0.hxx | 45 - .../PointLocator3DIntersectorP0P0.txx | 77 - .../PointLocator3DIntersectorP0P1.hxx | 45 - .../PointLocator3DIntersectorP0P1.txx | 80 - .../PointLocator3DIntersectorP1P0.hxx | 45 - .../PointLocator3DIntersectorP1P0.txx | 98 - .../PointLocator3DIntersectorP1P1.hxx | 45 - .../PointLocator3DIntersectorP1P1.txx | 101 - src/INTERP_KERNEL/PointLocatorAlgos.txx | 222 -- ...ctorP0P0.hxx => PolyhedronIntersector.hxx} | 13 +- ...ctorP0P0.txx => PolyhedronIntersector.txx} | 16 +- .../PolyhedronIntersectorP1P0Bary.hxx | 64 - .../PolyhedronIntersectorP1P0Bary.txx | 153 -- .../PolyhedronIntersectorP1P1.hxx | 55 - .../PolyhedronIntersectorP1P1.txx | 133 - src/INTERP_KERNEL/VolSurfUser.hxx | 34 - src/INTERP_KERNEL/VolSurfUser.txx | 168 -- src/INTERP_KERNELTest/ExprEvalInterpTest.cxx | 380 --- src/INTERP_KERNELTest/ExprEvalInterpTest.hxx | 54 - .../InterpKernelTestExport.hxx | 33 - .../RemapperTest.hxx} | 43 +- .../TestInterpKernelUtils.cxx | 44 - .../TestInterpKernelUtils.hxx | 34 - src/MEDCoupling/MEDCoupling.hxx | 47 - src/MEDCoupling/MEDCouplingCMesh.cxx | 366 --- src/MEDCoupling/MEDCouplingCMesh.hxx | 77 - src/MEDCoupling/MEDCouplingExtrudedMesh.cxx | 472 ---- src/MEDCoupling/MEDCouplingExtrudedMesh.hxx | 88 - .../MEDCouplingFieldDiscretization.cxx | 315 --- .../MEDCouplingFieldDiscretization.hxx | 106 - src/MEDCoupling/MEDCouplingMemArray.cxx | 389 --- src/MEDCoupling/MEDCouplingMemArray.hxx | 170 -- src/MEDCoupling/MEDCouplingMesh.cxx | 149 -- src/MEDCoupling/MEDCouplingNatureOfField.hxx | 35 - .../MEDCouplingNormalizedCartesianMesh.hxx | 52 - .../MEDCouplingNormalizedCartesianMesh.txx | 57 - src/MEDCoupling/MEDCouplingPointSet.cxx | 715 ------ src/MEDCoupling/MEDCouplingPointSet.hxx | 102 - src/MEDCoupling/MEDCouplingPointSet.txx | 68 - src/MEDCoupling/MEDCouplingRemapper.cxx | 567 ----- src/MEDCoupling/MEDCouplingRemapper.hxx | 87 - src/MEDCoupling/MEDCouplingSMesh.cxx | 164 ++ src/MEDCoupling/MEDCouplingSMesh.hxx | 53 + .../MEDCouplingTimeDiscretization.cxx | 1064 -------- .../MEDCouplingTimeDiscretization.hxx | 260 -- src/MEDCoupling/MEDCouplingUMeshDesc.cxx | 389 --- src/MEDCoupling/MEDCouplingUMeshDesc.hxx | 85 - src/MEDCoupling/MemArray.cxx | 82 + src/MEDCoupling/MemArray.hxx | 116 + .../{MEDCouplingMemArray.txx => MemArray.txx} | 77 +- ...gRefCountObject.hxx => RefCountObject.hxx} | 33 +- .../Test/MEDCouplingBasicsTest0.cxx | 688 ----- .../Test/MEDCouplingBasicsTest1.cxx | 1881 -------------- .../Test/MEDCouplingBasicsTestData1.hxx | 1166 --------- .../Test/MEDCouplingBasicsTestInterp.cxx | 2213 ----------------- .../Test/MEDCouplingRemapperTest.cxx | 986 -------- .../Test/MEDCouplingRemapperTest.hxx | 58 - .../Test/TestMEDCouplingRemapper.cxx | 25 - ...MEDCouplingTimeLabel.cxx => TimeLabel.cxx} | 9 +- ...MEDCouplingTimeLabel.hxx => TimeLabel.hxx} | 9 +- src/MEDCoupling_Swig/MEDCouplingBasicsTest.py | 85 - .../MEDCouplingRemapperTest.py | 86 - src/MEDCoupling_Swig/MEDCouplingTypemaps.i | 128 - src/MEDCoupling_Swig/Makefile.am | 61 - .../libMEDCouplingRemapper_Swig.i | 42 - src/MEDCoupling_Swig/libMEDCoupling_Swig.i | 242 -- src/MEDLoader/MEDLoader.cxx | 1347 ---------- src/MEDLoader/MEDLoader.hxx | 98 - src/MEDLoader/MEDLoaderBase.cxx | 61 - src/MEDLoader/MEDLoaderBase.hxx | 35 - src/MEDLoader/Makefile.am | 44 - src/MEDLoader/Swig/Makefile.am | 54 - src/MEDLoader/Swig/libMEDLoader_Swig.i | 71 - src/ParaMEDLoader/ParaMEDLoader.cxx | 64 - src/ParaMEDLoader/ParaMEDLoader.hxx | 41 - src/ParaMEDMEM/ICoCoField.cxx | 51 - src/ParaMEDMEM/ICoCoTrioField.cxx | 265 -- ...nterpKernelDEC.cxx => IntersectionDEC.cxx} | 98 +- ...nterpKernelDEC.hxx => IntersectionDEC.hxx} | 18 +- src/ParaMEDMEM/MEDLoader/MEDLoader.cxx | 418 ++++ src/ParaMEDMEM/MEDLoader/MEDLoader.hxx | 69 + .../MEDLoader}/Makefile.am | 31 +- .../Test}/MPIAccessDECTest.cxx | 3 +- .../Test}/MPIAccessDECTest.hxx | 3 +- .../Test}/MPIAccessTest.cxx | 3 +- .../Test}/MPIAccessTest.hxx | 3 +- .../Test}/MPIMainTest.hxx | 10 +- src/ParaMEDMEM/Test/Makefile.am | 102 + .../Test/ParaMEDMEMTest.cxx} | 40 +- src/ParaMEDMEM/Test/ParaMEDMEMTest.hxx | 136 + .../Test}/ParaMEDMEMTest_BlockTopology.cxx | 3 +- .../Test/ParaMEDMEMTest_IntersectionDEC.cxx | 541 ++++ .../ParaMEDMEMTest_MPIProcessorGroup.cxx | 3 +- .../Test}/ParaMEDMEMTest_NonCoincidentDEC.cxx | 23 +- ...ParaMEDMEMTest_StructuredCoincidentDEC.cxx | 33 +- .../Test}/TestMPIAccess.cxx | 4 +- .../Test}/TestMPIAccessDEC.cxx | 4 +- .../Test}/TestParaMEDMEM.cxx | 4 +- .../Test}/test_AllToAllDEC.cxx | 3 +- .../Test}/test_AllToAllTimeDEC.cxx | 3 +- .../Test}/test_AllToAllvDEC.cxx | 3 +- .../Test}/test_AllToAllvTimeDEC.cxx | 23 +- .../Test}/test_AllToAllvTimeDoubleDEC.cxx | 41 +- .../Test}/test_MPI_Access_Cancel.cxx | 3 +- .../test_MPI_Access_Cyclic_ISend_IRecv.cxx | 3 +- .../test_MPI_Access_Cyclic_Send_Recv.cxx | 3 +- .../Test}/test_MPI_Access_IProbe.cxx | 3 +- .../Test}/test_MPI_Access_ISendRecv.cxx | 3 +- .../Test}/test_MPI_Access_ISend_IRecv.cxx | 3 +- ...test_MPI_Access_ISend_IRecv_BottleNeck.cxx | 3 +- .../test_MPI_Access_ISend_IRecv_Length.cxx | 3 +- .../test_MPI_Access_ISend_IRecv_Length_1.cxx | 3 +- .../Test}/test_MPI_Access_Probe.cxx | 3 +- .../Test}/test_MPI_Access_SendRecv.cxx | 3 +- .../Test}/test_MPI_Access_Send_Recv.cxx | 3 +- .../test_MPI_Access_Send_Recv_Length.cxx | 3 +- .../Test}/test_MPI_Access_Time.cxx | 3 +- .../Test}/test_MPI_Access_Time_0.cxx | 3 +- src/ParaMEDMEMTest/Makefile.am | 107 - src/ParaMEDMEMTest/ParaMEDMEMTest.cxx | 128 - src/ParaMEDMEMTest/ParaMEDMEMTest.hxx | 174 -- .../ParaMEDMEMTest_FabienAPI.cxx | 112 - .../ParaMEDMEMTest_Gauthier1.cxx | 434 ---- .../ParaMEDMEMTest_ICocoTrio.cxx | 271 -- .../ParaMEDMEMTest_InterpKernelDEC.cxx | 1752 ------------- .../ParaMEDMEMTest_MEDLoader.cxx | 457 ---- src/ParaMEDMEMTest/test_perf.cxx | 337 --- src/ParaMEDMEM_Swig/test_InterpKernelDEC.py | 121 - src/ParaMEDMEM_Swig/test_IntersectionDEC.py | 148 ++ src/RENUMBER/Makefile.am | 94 - src/RENUMBER/RENUMBER_BOOSTRenumbering.cxx | 53 - src/RENUMBER/RENUMBER_BOOSTRenumbering.hxx | 31 - src/RENUMBER/RENUMBER_METISRenumbering.cxx | 34 - src/RENUMBER/RENUMBER_METISRenumbering.hxx | 31 - src/RENUMBER/RENUMBER_Renumbering.cxx | 19 - src/RENUMBER/RENUMBER_Renumbering.hxx | 30 - src/RENUMBER/RenumberingFactory.cxx | 83 - src/RENUMBER/RenumberingFactory.hxx | 31 - src/RENUMBER/renumbering.cxx | 366 --- src/RENUMBER/testRenumbering.py | 321 --- 240 files changed, 2283 insertions(+), 33517 deletions(-) delete mode 100644 adm_local/unix/config_files/renumber.m4 delete mode 100755 doc/doxygen/images/head.png delete mode 100644 doc/doxygen/medcoupling.dox delete mode 100644 doc/doxygen/static/doxygen.css delete mode 100755 doc/doxygen/static/footer.html delete mode 100755 doc/doxygen/static/header.html.in delete mode 100755 doc/salome/tui/images/head.png delete mode 100644 doc/salome/tui/input/index.doc delete mode 100755 doc/salome/tui/static/header.html.in delete mode 100644 resources/Mesh3D_11.med delete mode 100644 resources/Test2D.med delete mode 100644 resources/Test2Dpoly.med delete mode 100644 resources/Test3D.med delete mode 100644 resources/Test3Dpoly.med delete mode 100644 src/INTERP_KERNEL/Bases/InterpKernelHashFun.hxx delete mode 100644 src/INTERP_KERNEL/Bases/InterpKernelHashMap.hxx delete mode 100644 src/INTERP_KERNEL/Bases/InterpKernelHashTable.hxx delete mode 100644 src/INTERP_KERNEL/Bases/InterpKernelStlExt.hxx delete mode 100644 src/INTERP_KERNEL/CurveIntersector.hxx delete mode 100644 src/INTERP_KERNEL/CurveIntersector.txx delete mode 100644 src/INTERP_KERNEL/CurveIntersectorP0P0.hxx delete mode 100644 src/INTERP_KERNEL/CurveIntersectorP0P0.txx delete mode 100644 src/INTERP_KERNEL/CurveIntersectorP0P1.hxx delete mode 100644 src/INTERP_KERNEL/CurveIntersectorP0P1.txx delete mode 100644 src/INTERP_KERNEL/CurveIntersectorP1P0.hxx delete mode 100644 src/INTERP_KERNEL/CurveIntersectorP1P0.txx delete mode 100644 src/INTERP_KERNEL/CurveIntersectorP1P1.hxx delete mode 100644 src/INTERP_KERNEL/CurveIntersectorP1P1.txx delete mode 100644 src/INTERP_KERNEL/DirectedBoundingBox.cxx delete mode 100644 src/INTERP_KERNEL/DirectedBoundingBox.hxx delete mode 100644 src/INTERP_KERNEL/ExprEval/INTERPKERNELEXPREVALDefines.hxx delete mode 100644 src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.cxx delete mode 100644 src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.hxx delete mode 100644 src/INTERP_KERNEL/ExprEval/InterpKernelFunction.cxx delete mode 100644 src/INTERP_KERNEL/ExprEval/InterpKernelFunction.hxx delete mode 100644 src/INTERP_KERNEL/ExprEval/InterpKernelUnit.cxx delete mode 100644 src/INTERP_KERNEL/ExprEval/InterpKernelUnit.hxx delete mode 100644 src/INTERP_KERNEL/ExprEval/InterpKernelValue.cxx delete mode 100644 src/INTERP_KERNEL/ExprEval/InterpKernelValue.hxx delete mode 100644 src/INTERP_KERNEL/ExprEval/Makefile.am rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DAbstractEdge.cxx => AbstractEdge.cxx} (94%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DAbstractEdge.hxx => AbstractEdge.hxx} (88%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DBounds.cxx => Bounds.cxx} (92%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DBounds.hxx => Bounds.hxx} (94%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DComposedEdge.cxx => ComposedEdge.cxx} (72%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DComposedEdge.hxx => ComposedEdge.hxx} (92%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DEdge.cxx => Edge.cxx} (95%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DEdge.hxx => Edge.hxx} (98%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DEdge.txx => Edge.txx} (85%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DEdgeArcCircle.cxx => EdgeArcCircle.cxx} (99%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DEdgeArcCircle.hxx => EdgeArcCircle.hxx} (92%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DEdgeInfLin.cxx => EdgeInfLin.cxx} (91%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DEdgeInfLin.hxx => EdgeInfLin.hxx} (88%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DEdgeLin.cxx => EdgeLin.cxx} (97%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DEdgeLin.hxx => EdgeLin.hxx} (91%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DElementaryEdge.cxx => ElementaryEdge.cxx} (97%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DElementaryEdge.hxx => ElementaryEdge.hxx} (93%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DNode.cxx => Node.cxx} (96%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DNode.hxx => Node.hxx} (95%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DPrecision.cxx => Precision.cxx} (93%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DPrecision.hxx => Precision.hxx} (89%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DQuadraticPolygon.cxx => QuadraticPolygon.cxx} (77%) rename src/INTERP_KERNEL/Geometric2D/{InterpKernelGeo2DQuadraticPolygon.hxx => QuadraticPolygon.hxx} (89%) delete mode 100644 src/INTERP_KERNEL/IntegralUniformIntersector.hxx delete mode 100644 src/INTERP_KERNEL/IntegralUniformIntersector.txx delete mode 100644 src/INTERP_KERNEL/Interpolation.txx delete mode 100644 src/INTERP_KERNEL/Interpolation1D.txx delete mode 100644 src/INTERP_KERNEL/Interpolation2DCurve.hxx delete mode 100644 src/INTERP_KERNEL/Interpolation2DCurve.txx delete mode 100644 src/INTERP_KERNEL/InterpolationCC.hxx delete mode 100644 src/INTERP_KERNEL/InterpolationCC.txx delete mode 100644 src/INTERP_KERNEL/InterpolationCU.hxx delete mode 100644 src/INTERP_KERNEL/InterpolationCU.txx delete mode 100644 src/INTERP_KERNEL/InterpolationCurve.hxx delete mode 100644 src/INTERP_KERNEL/InterpolationCurve.txx delete mode 100644 src/INTERP_KERNEL/InterpolationOptions.cxx delete mode 100644 src/INTERP_KERNEL/Intersector3DP1P0Bary.hxx delete mode 100644 src/INTERP_KERNEL/Intersector3DP1P0Bary.txx delete mode 100644 src/INTERP_KERNEL/Intersector3DP1P1.hxx delete mode 100644 src/INTERP_KERNEL/Intersector3DP1P1.txx delete mode 100644 src/INTERP_KERNEL/IntersectorCU.hxx delete mode 100644 src/INTERP_KERNEL/IntersectorCU.txx delete mode 100644 src/INTERP_KERNEL/IntersectorCU1D.hxx delete mode 100644 src/INTERP_KERNEL/IntersectorCU1D.txx delete mode 100644 src/INTERP_KERNEL/IntersectorCU2D.hxx delete mode 100644 src/INTERP_KERNEL/IntersectorCU2D.txx delete mode 100644 src/INTERP_KERNEL/IntersectorCU3D.hxx delete mode 100644 src/INTERP_KERNEL/IntersectorCU3D.txx delete mode 100644 src/INTERP_KERNEL/PlanarIntersectorP0P1PL.hxx delete mode 100644 src/INTERP_KERNEL/PlanarIntersectorP0P1PL.txx delete mode 100644 src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.hxx delete mode 100644 src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.txx delete mode 100644 src/INTERP_KERNEL/PlanarIntersectorP1P0PL.hxx delete mode 100644 src/INTERP_KERNEL/PlanarIntersectorP1P0PL.txx delete mode 100644 src/INTERP_KERNEL/PlanarIntersectorP1P1.hxx delete mode 100644 src/INTERP_KERNEL/PlanarIntersectorP1P1.txx delete mode 100644 src/INTERP_KERNEL/PlanarIntersectorP1P1PL.hxx delete mode 100644 src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx delete mode 100644 src/INTERP_KERNEL/PointLocator2DIntersector.hxx delete mode 100644 src/INTERP_KERNEL/PointLocator2DIntersector.txx delete mode 100644 src/INTERP_KERNEL/PointLocator3DIntersectorP0P0.hxx delete mode 100644 src/INTERP_KERNEL/PointLocator3DIntersectorP0P0.txx delete mode 100644 src/INTERP_KERNEL/PointLocator3DIntersectorP0P1.hxx delete mode 100644 src/INTERP_KERNEL/PointLocator3DIntersectorP0P1.txx delete mode 100644 src/INTERP_KERNEL/PointLocator3DIntersectorP1P0.hxx delete mode 100644 src/INTERP_KERNEL/PointLocator3DIntersectorP1P0.txx delete mode 100644 src/INTERP_KERNEL/PointLocator3DIntersectorP1P1.hxx delete mode 100644 src/INTERP_KERNEL/PointLocator3DIntersectorP1P1.txx delete mode 100644 src/INTERP_KERNEL/PointLocatorAlgos.txx rename src/INTERP_KERNEL/{PolyhedronIntersectorP0P0.hxx => PolyhedronIntersector.hxx} (82%) rename src/INTERP_KERNEL/{PolyhedronIntersectorP0P0.txx => PolyhedronIntersector.txx} (80%) delete mode 100644 src/INTERP_KERNEL/PolyhedronIntersectorP1P0Bary.hxx delete mode 100644 src/INTERP_KERNEL/PolyhedronIntersectorP1P0Bary.txx delete mode 100644 src/INTERP_KERNEL/PolyhedronIntersectorP1P1.hxx delete mode 100644 src/INTERP_KERNEL/PolyhedronIntersectorP1P1.txx delete mode 100644 src/INTERP_KERNEL/VolSurfUser.hxx delete mode 100644 src/INTERP_KERNEL/VolSurfUser.txx delete mode 100644 src/INTERP_KERNELTest/ExprEvalInterpTest.cxx delete mode 100644 src/INTERP_KERNELTest/ExprEvalInterpTest.hxx delete mode 100644 src/INTERP_KERNELTest/InterpKernelTestExport.hxx rename src/{INTERP_KERNEL/Interpolation1D.hxx => INTERP_KERNELTest/RemapperTest.hxx} (57%) mode change 100755 => 100644 delete mode 100644 src/INTERP_KERNELTest/TestInterpKernelUtils.cxx delete mode 100644 src/INTERP_KERNELTest/TestInterpKernelUtils.hxx delete mode 100644 src/MEDCoupling/MEDCoupling.hxx delete mode 100644 src/MEDCoupling/MEDCouplingCMesh.cxx delete mode 100644 src/MEDCoupling/MEDCouplingCMesh.hxx delete mode 100644 src/MEDCoupling/MEDCouplingExtrudedMesh.cxx delete mode 100644 src/MEDCoupling/MEDCouplingExtrudedMesh.hxx delete mode 100644 src/MEDCoupling/MEDCouplingFieldDiscretization.cxx delete mode 100644 src/MEDCoupling/MEDCouplingFieldDiscretization.hxx delete mode 100644 src/MEDCoupling/MEDCouplingMemArray.cxx delete mode 100644 src/MEDCoupling/MEDCouplingMemArray.hxx delete mode 100644 src/MEDCoupling/MEDCouplingMesh.cxx delete mode 100644 src/MEDCoupling/MEDCouplingNatureOfField.hxx delete mode 100644 src/MEDCoupling/MEDCouplingNormalizedCartesianMesh.hxx delete mode 100644 src/MEDCoupling/MEDCouplingNormalizedCartesianMesh.txx delete mode 100644 src/MEDCoupling/MEDCouplingPointSet.cxx delete mode 100644 src/MEDCoupling/MEDCouplingPointSet.hxx delete mode 100644 src/MEDCoupling/MEDCouplingPointSet.txx delete mode 100644 src/MEDCoupling/MEDCouplingRemapper.cxx delete mode 100644 src/MEDCoupling/MEDCouplingRemapper.hxx create mode 100644 src/MEDCoupling/MEDCouplingSMesh.cxx create mode 100644 src/MEDCoupling/MEDCouplingSMesh.hxx delete mode 100644 src/MEDCoupling/MEDCouplingTimeDiscretization.cxx delete mode 100644 src/MEDCoupling/MEDCouplingTimeDiscretization.hxx delete mode 100644 src/MEDCoupling/MEDCouplingUMeshDesc.cxx delete mode 100644 src/MEDCoupling/MEDCouplingUMeshDesc.hxx create mode 100644 src/MEDCoupling/MemArray.cxx create mode 100644 src/MEDCoupling/MemArray.hxx rename src/MEDCoupling/{MEDCouplingMemArray.txx => MemArray.txx} (52%) rename src/MEDCoupling/{MEDCouplingRefCountObject.hxx => RefCountObject.hxx} (62%) delete mode 100644 src/MEDCoupling/Test/MEDCouplingBasicsTest0.cxx delete mode 100644 src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx delete mode 100644 src/MEDCoupling/Test/MEDCouplingBasicsTestData1.hxx delete mode 100644 src/MEDCoupling/Test/MEDCouplingBasicsTestInterp.cxx delete mode 100644 src/MEDCoupling/Test/MEDCouplingRemapperTest.cxx delete mode 100644 src/MEDCoupling/Test/MEDCouplingRemapperTest.hxx delete mode 100644 src/MEDCoupling/Test/TestMEDCouplingRemapper.cxx rename src/MEDCoupling/{MEDCouplingTimeLabel.cxx => TimeLabel.cxx} (91%) rename src/MEDCoupling/{MEDCouplingTimeLabel.hxx => TimeLabel.hxx} (88%) delete mode 100644 src/MEDCoupling_Swig/MEDCouplingBasicsTest.py delete mode 100644 src/MEDCoupling_Swig/MEDCouplingRemapperTest.py delete mode 100644 src/MEDCoupling_Swig/MEDCouplingTypemaps.i delete mode 100644 src/MEDCoupling_Swig/Makefile.am delete mode 100644 src/MEDCoupling_Swig/libMEDCouplingRemapper_Swig.i delete mode 100644 src/MEDCoupling_Swig/libMEDCoupling_Swig.i delete mode 100644 src/MEDLoader/MEDLoader.cxx delete mode 100644 src/MEDLoader/MEDLoader.hxx delete mode 100644 src/MEDLoader/MEDLoaderBase.cxx delete mode 100644 src/MEDLoader/MEDLoaderBase.hxx delete mode 100755 src/MEDLoader/Makefile.am delete mode 100644 src/MEDLoader/Swig/Makefile.am delete mode 100644 src/MEDLoader/Swig/libMEDLoader_Swig.i delete mode 100644 src/ParaMEDLoader/ParaMEDLoader.cxx delete mode 100644 src/ParaMEDLoader/ParaMEDLoader.hxx delete mode 100644 src/ParaMEDMEM/ICoCoField.cxx delete mode 100644 src/ParaMEDMEM/ICoCoTrioField.cxx rename src/ParaMEDMEM/{InterpKernelDEC.cxx => IntersectionDEC.cxx} (78%) rename src/ParaMEDMEM/{InterpKernelDEC.hxx => IntersectionDEC.hxx} (75%) create mode 100644 src/ParaMEDMEM/MEDLoader/MEDLoader.cxx create mode 100644 src/ParaMEDMEM/MEDLoader/MEDLoader.hxx rename src/{ParaMEDLoader => ParaMEDMEM/MEDLoader}/Makefile.am (58%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/MPIAccessDECTest.cxx (96%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/MPIAccessDECTest.hxx (98%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/MPIAccessTest.cxx (96%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/MPIAccessTest.hxx (98%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/MPIMainTest.hxx (93%) create mode 100644 src/ParaMEDMEM/Test/Makefile.am rename src/{MEDCoupling/MEDCouplingRefCountObject.cxx => ParaMEDMEM/Test/ParaMEDMEMTest.cxx} (53%) create mode 100644 src/ParaMEDMEM/Test/ParaMEDMEMTest.hxx rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/ParaMEDMEMTest_BlockTopology.cxx (98%) create mode 100644 src/ParaMEDMEM/Test/ParaMEDMEMTest_IntersectionDEC.cxx rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/ParaMEDMEMTest_MPIProcessorGroup.cxx (99%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/ParaMEDMEMTest_NonCoincidentDEC.cxx (92%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/ParaMEDMEMTest_StructuredCoincidentDEC.cxx (84%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/TestMPIAccess.cxx (95%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/TestMPIAccessDEC.cxx (95%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/TestParaMEDMEM.cxx (95%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_AllToAllDEC.cxx (99%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_AllToAllTimeDEC.cxx (99%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_AllToAllvDEC.cxx (99%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_AllToAllvTimeDEC.cxx (96%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_AllToAllvTimeDoubleDEC.cxx (90%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_MPI_Access_Cancel.cxx (99%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_MPI_Access_Cyclic_ISend_IRecv.cxx (99%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_MPI_Access_Cyclic_Send_Recv.cxx (99%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_MPI_Access_IProbe.cxx (99%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_MPI_Access_ISendRecv.cxx (99%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_MPI_Access_ISend_IRecv.cxx (99%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_MPI_Access_ISend_IRecv_BottleNeck.cxx (99%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_MPI_Access_ISend_IRecv_Length.cxx (99%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_MPI_Access_ISend_IRecv_Length_1.cxx (99%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_MPI_Access_Probe.cxx (98%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_MPI_Access_SendRecv.cxx (99%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_MPI_Access_Send_Recv.cxx (99%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_MPI_Access_Send_Recv_Length.cxx (99%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_MPI_Access_Time.cxx (99%) rename src/{ParaMEDMEMTest => ParaMEDMEM/Test}/test_MPI_Access_Time_0.cxx (99%) delete mode 100644 src/ParaMEDMEMTest/Makefile.am delete mode 100644 src/ParaMEDMEMTest/ParaMEDMEMTest.cxx delete mode 100644 src/ParaMEDMEMTest/ParaMEDMEMTest.hxx delete mode 100644 src/ParaMEDMEMTest/ParaMEDMEMTest_FabienAPI.cxx delete mode 100644 src/ParaMEDMEMTest/ParaMEDMEMTest_Gauthier1.cxx delete mode 100644 src/ParaMEDMEMTest/ParaMEDMEMTest_ICocoTrio.cxx delete mode 100644 src/ParaMEDMEMTest/ParaMEDMEMTest_InterpKernelDEC.cxx delete mode 100644 src/ParaMEDMEMTest/ParaMEDMEMTest_MEDLoader.cxx delete mode 100644 src/ParaMEDMEMTest/test_perf.cxx delete mode 100755 src/ParaMEDMEM_Swig/test_InterpKernelDEC.py create mode 100755 src/ParaMEDMEM_Swig/test_IntersectionDEC.py delete mode 100644 src/RENUMBER/Makefile.am delete mode 100644 src/RENUMBER/RENUMBER_BOOSTRenumbering.cxx delete mode 100644 src/RENUMBER/RENUMBER_BOOSTRenumbering.hxx delete mode 100644 src/RENUMBER/RENUMBER_METISRenumbering.cxx delete mode 100644 src/RENUMBER/RENUMBER_METISRenumbering.hxx delete mode 100644 src/RENUMBER/RENUMBER_Renumbering.cxx delete mode 100644 src/RENUMBER/RENUMBER_Renumbering.hxx delete mode 100644 src/RENUMBER/RenumberingFactory.cxx delete mode 100644 src/RENUMBER/RenumberingFactory.hxx delete mode 100644 src/RENUMBER/renumbering.cxx delete mode 100755 src/RENUMBER/testRenumbering.py diff --git a/adm_local/unix/config_files/renumber.m4 b/adm_local/unix/config_files/renumber.m4 deleted file mode 100644 index b62ec3eeb..000000000 --- a/adm_local/unix/config_files/renumber.m4 +++ /dev/null @@ -1,57 +0,0 @@ -dnl Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -dnl - -dnl define macros : -dnl AC_ENABLE_RENUMBER AC_DISABLE_RENUMBER -dnl author Vincent BERGEAUD -dnl -# AC_ENABLE_RENUMBER -AC_DEFUN([AC_ENABLE_RENUMBER], [dnl -define([AC_ENABLE_RENUMBER_DEFAULT], ifelse($1, yes, yes, no))dnl -AC_ARG_ENABLE(renumber, -changequote(<<, >>)dnl -<< --enable-renumber[=PKGS] build with renumber tool [default=>>AC_ENABLE_RENUMBER_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_renumber=yes ;; -no) enable_renumber=no ;; -*) - enable_renumber=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_renumber=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_renumber=AC_ENABLE_RENUMBER_DEFAULT)dnl - -if test "X$enable_renumber" = "Xyes"; then - ENABLE_RENUMBER="yes" - AC_SUBST(ENABLE_RENUMBER) -fi -]) - -# AC_DISABLE_RENUMBER - set the default flag to --disable-renumber -AC_DEFUN([AC_DISABLE_RENUMBER], [AC_ENABLE_RENUMBER(no)]) - diff --git a/doc/doxygen/images/head.png b/doc/doxygen/images/head.png deleted file mode 100755 index 307d9ef9a4c07f8fba2c8721309a978433bcf63c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 78545 zcmV(=K-s^EP)KLZ*U+9)Gc>Uwq5=^`M4BQav zC@~mCR4i{s){CyJy!Z0*`{S%{?X&l}`|Q2XS{DG4r!SY621@~u$`kN|Je=tfkx_K) z0Du7=V1OwAOjbs^U$A=!5XsBUg`OdD0$&6H@OoIh0&vsNGk{J9|DU8;>3o6cm;e!* zvpE?o5f_L!B}hR1Px(02E1V7jRgKA~q2*i60W=BI4x$ z;7AEyaokrd;A9KLmvTu<&*5_u5(RV}mM-1Y+L}T4YB~8euXQVS(9J=A3hxi`{{&gM(L7aFFpTiSHgo&n% z%S#Zoo5$t~xM@5(m-nBV_z%PWq{X=wiPHEHP-BdM)O9LAe(eV+3K1aD`^8=Vqi??W zFd%+;;VP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T)a_|wijpzaXkb2cu^CGfwU>~Bm{4!XFL+qATYg|hH*KvHgO%G}Aa6rE-20usa(_(-DV0ail z^uy@m4P%u!TvbD(fzzpygud777wbzAkKu&|s9{}V#IL{|`WY?Ftz$S6Q5I>eaIGe- z`{glFUllNViXVZ+)e&lds(*EqsK9%Q{TS~v{{$ESbfgFNEIv=v00000NkvXXu0mjf D4zrO! diff --git a/doc/doxygen/medcoupling.dox b/doc/doxygen/medcoupling.dox deleted file mode 100644 index cd5fdb3d1..000000000 --- a/doc/doxygen/medcoupling.dox +++ /dev/null @@ -1,411 +0,0 @@ -/*! -\page medcoupling MEDCoupling - -\section MEDCouplingIntro Introduction - -The MEDCoupling module is presented under the form of a library -libmedcoupling and interfaces. This module MEDCoupling represents the -DataStructure designed to be exchanged by processors as well in -parallel case in SPMD paradigm ( \ref paramedmem "ParaMEDMEM" ), as in -distributed paradigm using CORBA. This DataStructure is \b fully -deconnected from \ref medmem "MEDMEM". This DataStructure is light in -order to minimize as much as possible the number of prerequisites needed -to use it. The idea is that as this DataStructure is intended to be -linked with all of code candidate for coupling ; the number of -prerequisites of medcoupling has to be threfore tiny. MEDCoupling has -been developped to comply with ICOCO API, \ref interpkernel -"conservative interpolators" and VTK visualization -DataStructure. The MEDCoupling DataStructures have been -developped to be compatible with HPC constraints (compact structures, -limitation of copies and launching of CPU consuming algorithms only when -absolutely needed ). - -\section MEDCouplingMainConc Main Concepts - -- \ref MEDCouplingMeshesP "Meshes" -- \ref MEDCouplingFieldsP "Fields" - -\section MEDCouplingFirstSteps1 Building an array from scratch - -All of exemples given here make the assumption that the \c ParaMEDMEM -namespace is visible ( by calling for example \c using \c -namespace \c ParaMEDMEM; ). - -Here a description of typical usages to use MEDCoupling arrays. -In this example we will create arrays with 12 tuples constituted each -of 3 components. These arrays will be created using different ways. - -\code - -const int nbOfNodes=12; -double coords[3*nbOfNodes]={ ... }; - -DataArrayDouble *myCoords=0; -double *tmp=0; -\endcode - -- no copy no ownership -\code -myCoords=DataArrayDouble::New(); -myCoords->useArray(coords,false,CPP_DEALLOC,nbOfNodes,3); -//now use myCoords as you need -... -//myCoords is no more usefully here : release it -myCoords->decrRef(); -\endcode - - -- no copy and ownership C++ -\code -myCoords=DataArrayDouble::New(); -tmp=new double[3*nbOfNodes]; -std::copy(coords,coords+3*nbOfNodes,tmp); -myCoords->useArray(tmp,true,CPP_DEALLOC,nbOfNodes,3); -//now use myCoords as you need -... -//myCoords is no more usefully, release it -myCoords->decrRef(); -\endcode - -- no copy and ownership C -\code -myCoords=DataArrayDouble::New(); -tmp=(double *)malloc(3*nbOfNodes*sizeof(double)); -std::copy(coords,coords+3*nbOfNodes,tmp); -myCoords->useArray(tmp,true,C_DEALLOC,nbOfNodes,3); -//now use myCoords as you need -... -//myCoords is no more usefully here : release it -myCoords->decrRef(); -\endcode - -- copy -\code -myCoords=DataArrayDouble::New(); -myCoords->alloc(nbOfNodes,3); -tmp=myCoords->getPointer(); -std::copy(coords,coords+3*nbOfNodes,tmp); -myCoords->declareAsNew();//you have modified data pointed by internal pointer notify object -//now use myCoords as you need -... -//myCoords is no more usefully here : release it -myCoords->decrRef(); -\endcode - -\section MEDCouplingFirstSteps2 Building unstructured mesh from scratch - -All of exemples given here make the assumption that the \c ParaMEDMEM -namespace is visible ( by calling for example \c using \c -namespace \c ParaMEDMEM; ). - -Here we will create a mesh with spacedim==2 and meshdim==2 too with 5 -cells and 9 nodes. - -You can notice that it is possible to mix cell -types as you want as long as the dimension of cell is exactly equal to -meshDim to respect \ref MEDCouplingMeshes "this rule". - -\code - -double coords[18]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7 }; -int conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4}; -MEDCouplingUMesh *mesh=MEDCouplingUMesh::New(); -mesh->setName("My2DMesh"); -mesh->setMeshDimension(2); -mesh->allocateCells(5);//You can put more than 5 if you want but not less. -mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn); -mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,conn+4); -mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,conn+7); -mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn+10); -mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn+14); -mesh->finishInsertingCells(); -DataArrayDouble *myCoords=DataArrayDouble::New(); -myCoords->alloc(9,2);//here myCoords are declared to have 2 components, mesh will deduce that spaceDim==2 -std::copy(coords,coords+18,myCoords->getPointer()); -mesh->setCoords(myCoords); -myCoords->decrRef(); -//mesh is now usable -... -//mesh is no more usefully here : release it -mesh->decrRef(); - -\endcode - -\section MEDCouplingFirstSteps3 Building a field from scratch - -All of exemples given here make the assumption that the \c ParaMEDMEM -namespace is visible ( by calling for example \c using \c -namespace \c ParaMEDMEM; ). - -Here we will make the assumption that an instance of \c MEDCouplingMesh -called \c mesh has been created. - -- create a tensor field with 9 components on cells with no time step -\code -MEDCouplingFieldDouble* fieldOnCells=MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME); -fieldOnCells->setName("MyTensorFieldOnCellNoTime"); -fieldOnCells->setMesh(mesh); -DataArrayDouble *array=DataArrayDouble::New(); -array->alloc(mesh->getNumberOfCells(),9);//Implicitely fieldOnCells will be a 9 components field. -fieldOnCells->setArray(array); -tmp=array->getPointer(); -std::fill(tmp,tmp+9*mesh->getNumberOfCells(),7.); -array->declareAsNew(); -array->decrRef(); -//fieldOnCells is now usable -... -//fieldOnCells is no more usefully here : release it -fieldOnCells->decrRef(); -\endcode -- create a scalar field on nodes with no time step -\code -MEDCouplingFieldDouble* fieldOnNodes=MEDCouplingFieldDouble::New(ON_NODES,NO_TIME); -fieldOnNodes->setName("MyScalarFieldOnNodeNoTime"); -fieldOnNodes->setMesh(mesh); -DataArrayDouble *array=DataArrayDouble::New(); -array->alloc(mesh->getNumberOfNodes(),1);//Implicitely fieldOnNodes will be a scalar field. -fieldOnNodes->setArray(array); -tmp=array->getPointer(); -std::fill(tmp,tmp+mesh->getNumberOfNodes(),7.); -array->declareAsNew(); -array->decrRef(); -//fieldOnNodes is now usable -... -//fieldOnNodes is no more usefully here : release it -fieldOnNodes->decrRef(); -\endcode -- create a 2 components-vector field on cells with one time step and no interval -\code -MEDCouplingFieldDouble* fieldOnCells=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME); -fieldOnCells->setName("MyVecFieldOnCellWithTime"); -fieldOnCells->setMesh(mesh); -fieldOnCells->setTime(4.22,2,-1); -DataArrayDouble *array=DataArrayDouble::New(); -array->alloc(mesh->getNumberOfCells(),2);//Implicitely fieldOnCells will be a 2 components field. -fieldOnCells->setArray(array); -tmp=array->getPointer(); -std::fill(tmp,tmp+2*mesh->getNumberOfCells(),7.); -array->declareAsNew(); -array->decrRef(); -//fieldOnCells is now usable -... -//fieldOnCells is no more usefully here : release it -fieldOnCells->decrRef(); -\endcode -- create a 3 components-vector field on nodes with a time interval where hied is constant -\code -MEDCouplingFieldDouble* fieldOnNodes=MEDCouplingFieldDouble::New(ON_NODES,CONST_ON_TIME_INTERVAL); -fieldOnNodes->setName("MyVecFieldOnNodeWithConstTime"); -fieldOnNodes->setMesh(mesh); -fieldOnNodes->setStartTime(4.22,2,-1); -fieldOnNodes->setEndTime(6.44,4,-1); -DataArrayDouble *array=DataArrayDouble::New(); -array->alloc(mesh->getNumberOfNodes(),3);//Implicitely fieldOnNodes will be a 3 components field. -fieldOnNodes->setArray(array); -tmp=array->getPointer(); -std::fill(tmp,tmp+3*mesh->getNumberOfNodes(),7.); -array->declareAsNew(); -array->decrRef(); -//fieldOnNodes is now usable -... -//fieldOnNodes is no more usefully here : release it -fieldOnNodes->decrRef(); -\endcode - -\section MEDCouplingSecondStep0 Operations on Fields -Here we will make the assumption that an instance of \ref ParaMEDMEM::MEDCouplingMesh "MEDCouplingMesh" -called \c mesh has been created with spaceDim==2. -Here some exemple of more advanced use of \ref ParaMEDMEM::MEDCouplingFieldDouble "MEDCouplingFieldDouble". -\code -MEDCouplingFieldDouble *f1=mesh->fillFromAnalytic(ON_NODES,1,"x*x+y*y*3+2.*x");//f1 is scalar -MEDCouplingFieldDouble *f2=mesh->fillFromAnalytic(ON_NODES,1,"cos(x+y/x)");//f2 is scalar too -MEDCouplingFieldDouble *f2bis=mesh->fillFromAnalytic(ON_NODES,2,"x*x*IVec+3*y*JVec");//f2bis is a vectors field -MEDCouplingFieldDouble *f3=(*f1)+(*f2);//f3 scalar -MEDCouplingFieldDouble *f4=(*f3)/(*f2);//f4 scalar -f2bis->applyFunc(1,"sqrt(x*x+y*y)");//f2bis becomes scalar -MEDCouplingFieldDouble *f5=(*f2bis)*(*f4);//f5 scalar -const double pos1[2]={0.25,0.}; -double res; -f4->getValueOn(pos1,&res);//f4 is scalar so the returned value is of size 1. -// -... -//f1, f2, f2bis, f3, f4, f5 are no more usefully here : release them -f1->decrRef(); -f2->decrRef(); -f2bis->decrRef(); -f3->decrRef(); -f4->decrRef(); -f5->decrRef(); -\endcode -*/ - -/*! - \page MEDCouplingMeshesP Meshes in MEDCoupling - -\section MEDCouplingMeshes Common concept shared by all type of Meshes - -A mesh has a the following properties : - -- name -- a dimension (called mesh dimension) and only one (it implies that \b all cells constituting -mesh have the same dimension) -- a space dimension (relative to coordinates) -- a number of nodes -- a number of cells - -The class that incarnates the concept described above is : -\ref ParaMEDMEM::MEDCouplingMesh. - -\section MEDCouplingUMeshes Unstructured meshes - -An unstructured mesh is defined by : - -- a point clouds where the explicit -coordinates of each point must be specified. -- nodal connectivity that specifies for each cell, the points in the -previous point clouds that constitutes the cell. - -As unstructured mesh is dynamically defined enough, this struture is -used by MEDCoupling to instanciate degenerated meshes as : - -- points cloud only meshes. This type of mesh will have mesh dimension - == 0 -- abstract meshes containing only one cell that covers a potentially - infinite space. This abstract mesh is used as support of fields - containing only one integrated value. This is typically used to - represent fields used by system code. This type of mesh will have - mesh dimension equal to -1. - -The norm used for cells connectivity of different types, is the same as specified in MED file execpt -that connectivities are in represented in \b C \b format and \b not \b in -\b FORTRAN \b format ! - -The class in charge to dealt with the described concept is \ref -ParaMEDMEM::MEDCouplingUMesh. This class inherits -from \ref MEDCouplingPointSets "PointSet" abstract meshes. - -\section MEDCouplingPointSets PointSet - -This is a \b non \b instanciable class that deals with set of points without -any connectivity aspect. - -The class that incarnates this concept in -MEDCoupling is : \ref ParaMEDMEM::MEDCouplingPointSet. - -This class is in charge to perform whole or part of algorithms of -its subclasses (\ref -ParaMEDMEM::MEDCouplingUMesh "MEDCouplingUMesh" and \ref -ParaMEDMEM::MEDCouplingUMeshDesc "MEDCouplingUMeshDesc") for -factorization reasons. - -Some of most important implemented methods are : - -- \ref ParaMEDMEM::MEDCouplingPointSet::getSpaceDimension "getSpaceDimension" -- \ref ParaMEDMEM::MEDCouplingPointSet::getNumberOfNodes "getNumberOfNodes" -- \ref ParaMEDMEM::MEDCouplingPointSet::rotate "rotate" -- \ref ParaMEDMEM::MEDCouplingPointSet::translate "translate" -- \ref ParaMEDMEM::MEDCouplingPointSet::scale "scale" -- \ref ParaMEDMEM::MEDCouplingPointSet::findCommonNodes "findCommonNodes" -- \ref ParaMEDMEM::MEDCouplingPointSet::renumberNodes "renumberNodes" -- \ref ParaMEDMEM::MEDCouplingPointSet::getBoundingBox "getBoundingBox" - -\section MEDCouplingCMeshs Cartesian Mesh - -A cartesian mesh is a mesh that represents structured mesh whose nodes -are arranged along axes of trihedron. To instanciate an object of this -type, only n arrays are needed. In this type of mesh space dimension -\b and mesh dimension are equals and the value is n. The n arrays will have only one component and the values -contained in these arrays will be ascendantly sorted. - -The class that incarnates this concept in MEDCoupling is : \ref ParaMEDMEM::MEDCouplingCMesh. - -\section MEDCouplingExtrudedMeshes Extruded Mesh - -An extruded mesh is a mesh also called 2.5 D. It a convolution of 2D -unstructured mesh with 1D unstructured mesh. The problem is that this -type of mesh is not managed by any file format that's why to build an -instance of this mesh you need 3D unstructured mesh and a 2D -unstructured mesh lying on the same coordinates. The advantage of this -structure is that the interpolation time is optimized. - -The class that incarnates this concept in MEDCoupling is : \ref ParaMEDMEM::MEDCouplingExtrudedMesh. -*/ - -/*! -\page MEDCouplingFieldsP Fields in MEDCoupling - -\section MEDCouplingFields Field concept - -A field in MEDCoupling point of view, is a structure that allows to -store a discretization of a physical value on a defined discretized spatial and -possibly temporal support. - -The spatial support is a \ref MEDCouplingMeshesP "mesh". -A field is lying on an entity that will be specified by the spatial -discretization of the field. For exemple a field on node will lie on -all nodes of its mesh. - -A field on cell will lie on all cells of its mesh. - -Fields in MEDCoupling follow the two following rules : - -- A field will lie on \b ALL entities of its spatial support (\ref MEDCouplingMeshesP "mesh"). -- A field has \b only \b one spatial support (\ref MEDCouplingMeshesP "mesh") on its temporal support. - -The main properties of a field are : - -- name -- spatial support which is a \ref MEDCouplingMeshesP "mesh" -- a \ref MEDCouplingSpatialDisc "spatial discretization" -- a description of intrinsic nature of the values of field. This is important for conservative interpolation. -- a temporal discretization that specifies, if it exists, the time interval on which the field is covering, and how. -- number of components - -This definition of field in MEDCoupling allows an instance of field to -know at any point inside its spatial-temporal support the value. - -The class that incarnates the concept described above is : \ref ParaMEDMEM::MEDCouplingFieldDouble. - -Some of most important implemented methods are : - -- \ref ParaMEDMEM::MEDCouplingFieldDouble::getNumberOfComponents "getNumberOfComponents" -- \ref ParaMEDMEM::MEDCouplingFieldDouble::getValueOn "getValueOn" -- \ref ParaMEDMEM::MEDCouplingFieldDouble::applyFunc "applyFunc" -- \ref ParaMEDMEM::MEDCouplingFieldDouble::addFields "cross instances operations" - -\section MEDCouplingSpatialDisc Spatial discretization concept - -This is the concept that makes the link, independantly from temporal -discretization, between the field and its spatial support(\ref MEDCouplingMeshesP "mesh"). This -concept allows the field to make a check and interpretation of an -array of values given a spatial support (\ref MEDCouplingMeshesP "mesh"). - -The abstract class that incarnates the concept is : \ref ParaMEDMEM::MEDCouplingFieldDiscretization. - -The most important pure virtual methods are : - -- \ref ParaMEDMEM::MEDCouplingFieldDiscretization::getNumberOfTuples "getnumberOfTuples" -- \ref ParaMEDMEM::MEDCouplingFieldDiscretization::getValueOn "getValueOn" -- \ref ParaMEDMEM::MEDCouplingFieldDiscretization::getWeightingField "getWeightingField" - -\section MEDCouplingTemporalDisc Temporal discretization concept - -This information allows, independantly from spatial discretization, to -associate a time interval, if it exists, on which the field will be -defined. This concept is able to give the value at any time of -the definition interval (if any). - -The abstract class \ref ParaMEDMEM::MEDCouplingTimeDiscretization -incarnates this described concept. - -This classes and its subclasses are responsible in storing the arrays -of the aggregating field. - -The most important methods are : - -- \ref ParaMEDMEM::MEDCouplingTimeDiscretization::setTime "setTime" and \ref ParaMEDMEM::MEDCouplingTimeDiscretization::getTime "getTime" -- \ref ParaMEDMEM::MEDCouplingTimeDiscretization::getArray "getArray" and \ref ParaMEDMEM::MEDCouplingTimeDiscretization::setArray "setArray" -- \ref ParaMEDMEM::MEDCouplingTimeDiscretization::getArraysForTime "getArraysForTime" -- \ref ParaMEDMEM::MEDCouplingTimeDiscretization::getValueForTime "getValueForTime" - -*/ diff --git a/doc/doxygen/static/doxygen.css b/doc/doxygen/static/doxygen.css deleted file mode 100644 index d8991647e..000000000 --- a/doc/doxygen/static/doxygen.css +++ /dev/null @@ -1,468 +0,0 @@ -body { - font-family: Arial, Helvetica, sans-serif; - background-color: #ffffff; -} - -h1 { - text-align: center; - text-decoration: none; - border: none; - line-height: 25px; - text-align: center; -// text-transform:uppercase; - background: #D9f4fd; - font-size: 12pt; - font-weight: bold; - border: 1px solid #CCCCCC; - -moz-border-radius: 8px; - -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15); -} - -h2 { - font-size: 12pt; - font-weight: bold; -} - -table { - font-size: 10pt; -} - -CAPTION { - font-weight: bold -} - -/* Link in the top navbar */ -A.qindex {} - -A.qindexRef {} - -/* Link to any cross-referenced Doxygen element inside a code section - (ex: header) -*/ -A.code { - text-decoration: none; - font-weight: normal; - color: #4444ee -} - -A.codeRef { - font-weight: normal; - color: #4444ee -} - -A:hover { - text-decoration: none; - background-color: lightblue; -} - -div.contents { - font-family: Arial, Helvetica, sans-serif; - font-size: 10pt; -} - -div.navpath { - font-size: 11pt; - border: 0 none; - text-align: left; -} - -div.version { - background-color:#ffffde; - border:1px solid #cccccc; - font-family: Arial, Helvetica, sans-serif; - font-size: 9pt; - text-align: center; - width:100px; - -moz-border-radius: 8px; -// -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15); -} - -div.header { - background: url("head.png"); - background-color: #175783; - border: 1px solid; - height: 80px; - background-repeat: no-repeat; - margin-bottom: 10px; -} - -div.tabs { - text-align: justify; - margin-left : 2px; - margin-right : 2px; - margin-top : 2px; - margin-bottom : 2px - font-weight: bold; - color: #FFFFFF; -} - -div.footer { - background-color: #D9f4fd; - border: 1px solid #AAAAAA; - font-family: Arial, Helvetica, sans-serif; - font-size: 11px; - padding: 10px; - margin-top: 15px; -} - -DL.el { - margin-left: -1cm -} - -/* A code fragment (ex: header) */ -div.fragment { - border: none; -} - -/* In the alpha list (coumpound index), style of an alphabetical index letter */ -DIV.ah { - background-color: #CCCCCC; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px -} - -/* Method name (+ type) */ -TD.md { - background-color: lightblue; - font-weight: bold; -} - -/* Method parameter (some of them) */ -TD.mdname1 { - background-color: lightblue; - font-weight: bold; color: #602020; -} - -/* Method parameter (some of them) */ -TD.mdname { - background-color: lightblue; - font-weight: bold; - color: #602020; - width: 600px; -} - -/* Separator between methods group (usually empty, seems not supported by IE) */ -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold -} - -DIV.groupText { - margin-left: 16px; - font-style: italic; - font-size: smaller -} - -/*div.div-page { - background-color: #FFFFFF; - margin-left: 1em; - margin-right: 1em; - margin-top: 1em; - margin-bottom: 0.1em; - - padding-left: 1em; - padding-right: 1em; - padding-top: 0.5em; - padding-bottom: 0.5em; - - border: 2px solid #0D299A; - border-width: 2px; - border-color: #0D299A; -}*/ - -div.tabs { - text-align: justify; - margin-left : 2px; - margin-right : 2px; - margin-top : 2px; - margin-bottom : 2px - font-weight: bold; - color: #FFFFFF; -} - -DIV.div-footer { - margin-left: 1em; - margin-right: 1em; - margin-bottom: 0.2em; - text-align: right; - font-size: 9pt; -} - -/* In File List, Coumpound List, etc, 1st column of the index */ -TD.indexkey { - background-color: #CCCCCC; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} - -/* In File List, Coumpound List, etc, 2nd column of the index */ -TD.indexvalue { - background-color: #CCCCCC; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} - -span.keyword { color: #008000 } -span.keywordtype { color: #604020 } -span.keywordflow { color: #e08000 } -span.comment { color: #800000 } -span.preprocessor { color: #806020 } -span.stringliteral { color: #002080 } -span.charliteral { color: #008080 } - -/* @group Code Colorization */ - -.fragment { - font-family: monospace, fixed; - font-size: 10pt; -} - -pre.fragment { - width: 95%; - border: 1px solid #CCCCCC; - -moz-border-radius: 8px; - -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15); - background-color:#EEF3F5; - padding: 4px 6px; - margin: 4px 1px 4px 1px; -} - -/* Top Navigation style */ - -div.navigation { - margin-bottom: 70px; -} - -/* Left navigation panel style */ - -body.ftvtree { - background-color: #D9f4fd; - margin: 10px; -} - -div.directory { - margin: 0; -} - -div.directory.p { - margin: 0; -} - -h3.swap { - font-size: 10pt; - margin-bottom: 0; -} - -/* Link to any cross-referenced Doxygen element */ -a.el { - text-decoration: none; - font-family: Arial, Helvetica, sans-serif; - font-weight: bold; - font-size: 9pt; - color: #551a8b; -} - -a.el:hover { - background-color: transparent; -} - -a.elRef { - font-weight: normal; -} - - -#MSearchBox { - -moz-border-radius:8px 8px 8px 8px; - background-color:white; - border:1px solid #84B0C7; - margin:0; - padding:0; - white-space:nowrap; -} - -div.directory img { - vertical-align:-30%; -} - -div.directory p { - white-space:nowrap; - margin: 0; -} - -div.directory-alt div { - display: none; - margin: 0px; -} - - -div.directory div { - display: none; - margin: 0px; -} - -div.version { - background-color:#ffffde; - border:1px solid #cccccc; - font-family: Arial, Helvetica, sans-serif; - font-size: 9pt; - text-align: center; - width:100px; - -moz-border-radius: 8px; -// -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15); -} - -/* In File List, Coumpound List, etc, 1st column of the index */ -TD.indexkey { - background-color: #DDDDEE; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} - -/* In File List, Coumpound List, etc, 2nd column of the index */ -TD.indexvalue { - background-color: #EEEEFF; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} - - -/* @group Member Descriptions */ - -.mdescLeft, .mdescRight, -.memItemLeft, .memItemRight, -.memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: #FAFAFA; - border: none; - margin: 4px; - padding: 1px 0 0 8px; -} - -.mdescLeft, .mdescRight { - padding: 0px 8px 4px 8px; - color: #555; -} - -.memItemLeft, .memItemRight, .memTemplParams { - border-top: 1px solid #ccc; -} - -.memItemLeft, .memTemplItemLeft { - white-space: nowrap; -} - -.memTemplParams { - color: #606060; - white-space: nowrap; -} - -/* @end */ - -/* Styles for detailed member documentation */ - -.memtemplate { - font-size: 80%; - color: #606060; - font-weight: normal; - margin-left: 3px; -} - -.memnav { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} - -.memitem { - padding: 0; - margin-bottom: 10px; -} - -.memname { - white-space: nowrap; - font-weight: bold; -} - -.memproto, .memdoc { - border: 1px solid #84b0c7; -} - -.memproto { - padding: 0; - background-color: #d5e1e8; - font-weight: bold; - -webkit-border-top-left-radius: 8px; - -webkit-border-top-right-radius: 8px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - -moz-border-radius-topleft: 8px; - -moz-border-radius-topright: 8px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - -} - - - -.memdoc { - padding: 2px 5px; - background-color: #eef3f5; - border-top-width: 0; - -webkit-border-bottom-left-radius: 8px; - -webkit-border-bottom-right-radius: 8px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - -moz-border-radius-bottomleft: 8px; - -moz-border-radius-bottomright: 8px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; -} - -.paramkey { - text-align: right; -} - -.paramtype { - white-space: nowrap; -} - -.paramname { - color: #602020; - white-space: nowrap; -} -.paramname em { - font-style: normal; -} - -/* @end */ - diff --git a/doc/doxygen/static/footer.html b/doc/doxygen/static/footer.html deleted file mode 100755 index fdfb138ca..000000000 --- a/doc/doxygen/static/footer.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - diff --git a/doc/doxygen/static/header.html.in b/doc/doxygen/static/header.html.in deleted file mode 100755 index bcf8c48ea..000000000 --- a/doc/doxygen/static/header.html.in +++ /dev/null @@ -1,10 +0,0 @@ - - - - - $title - - - -
-
Version: @VERSION@
\ No newline at end of file diff --git a/doc/salome/tui/images/head.png b/doc/salome/tui/images/head.png deleted file mode 100755 index 307d9ef9a4c07f8fba2c8721309a978433bcf63c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 78545 zcmV(=K-s^EP)KLZ*U+9)Gc>Uwq5=^`M4BQav zC@~mCR4i{s){CyJy!Z0*`{S%{?X&l}`|Q2XS{DG4r!SY621@~u$`kN|Je=tfkx_K) z0Du7=V1OwAOjbs^U$A=!5XsBUg`OdD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(Xf&Oe*YTjJxxz%G6xN8pYPZExrqa54!s$aw&?R*P{W0(5& zIB@v@F;Gu^5@N@-C2j&PFR0iXdXkLzmP>%Gsi6%{s zs5#3;jO?Qa;Eu$^JMZH11zZO4xHrb|^tr!gxFW3}+h{W6`z~z(D*Z4>>G`shV!7*K z2<|%PU(c66FSple_Em%v7~}?zwBg8`U53ZrfBVu6o&WLuX}OJV zobXZtna>BOR%9WEzO#HomDoMr_UE<4!OT)a_|wijpzaXkb2cu^CGfwU>~Bm{4!XFL+qATYg|hH*KvHgO%G}Aa6rE-20usa(_(-DV0ail z^uy@m4P%u!TvbD(fzzpygud777wbzAkKu&|s9{}V#IL{|`WY?Ftz$S6Q5I>eaIGe- z`{glFUllNViXVZ+)e&lds(*EqsK9%Q{TS~v{{$ESbfgFNEIv=v00000NkvXXu0mjf D4zrO! diff --git a/doc/salome/tui/input/index.doc b/doc/salome/tui/input/index.doc deleted file mode 100644 index 50c09d9e0..000000000 --- a/doc/salome/tui/input/index.doc +++ /dev/null @@ -1,13 +0,0 @@ -/*! \mainpage - -To browse the \b SALOME Med module Developer Documentation, follow the links below or use navigation menu at the top of the page: -
    -
  • Modules - documentation of TUI functionality.
  • -
  • Name Spaces - list of TUI packages and scripts.
  • -
  • Data Structures - list of all data structures and classes with brief descriptions.
  • -
  • Files - list of all files with brief descriptions.
  • -
- -\note Documentation of 3D - part of intersection matrix calculation more or less complete - -*/ \ No newline at end of file diff --git a/doc/salome/tui/static/header.html.in b/doc/salome/tui/static/header.html.in deleted file mode 100755 index 791a37c53..000000000 --- a/doc/salome/tui/static/header.html.in +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - $title - - - - -
-
Version: @VERSION@
- - diff --git a/resources/Mesh3D_11.med b/resources/Mesh3D_11.med deleted file mode 100644 index 5088b55b3596aefb0e6ed19aae9b2f15598cd4e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 153532 zcmeF)1%MUh+5q6C5m4zgKtVw|Bn1IU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x9E@Z&|`?do3TPX#-`#`Fu}H?-MmR`Jc28yjA{8ho5L6@HNKBD_B= zX=UJhTYiJO4fulaievU}BfdfWH2+0%Kk{FSPlQ)n1?V5kf57_z{!)0wUBz9+_lhqS zp9kxydr{37^0&fD@Hg5QynE@>@Dcb3`Cj1{Ujpw?_Zoj{_z-MD&j!Dxt>%f}>%AcN zY$)5@I%@)upm56 z`;hJ0A9&Ize zn76&SleoS3CUIW;XWsJaCc|CwwP9hni}zFdHohMCGk6dA2gK#^^I=1EEBH^yw}4gP z3EmX=0s3fsChutZzTwAKZ&mj`Z7aT%_a1Q<@jc>O#QE`Gc`K@$3irs@g+<^V-p}c; z@;!+U$Dfq%Ag+jC2pg+g#s7``?XVjBhBp;{kUkcl%{x}UfB5l|u#LL6c{0Gq;YHSu z@(cJk@GRh;7(V<4{A#=_ZwB$%|2z8=IQtVg`x7|(6FB=5IQtVg`x7|(6FB=5IQtVg j`x7|(6FB=5IQtVg`x7|(6FB=5IQtVg`xE%z@Duny9y7of diff --git a/resources/Test2D.med b/resources/Test2D.med deleted file mode 100644 index 8f651af39bb6a5866b3029db395f7f4caaa1cd7e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 30380 zcmeHQPi$007@sW#wotTSH5Ge!XeAYqv}MJDBy{O+yCvP-(rvXM+8U|Bq(TjisfI%n zJ!ry#gC>S};K0EcFkJB5gNK@M@W89?6w&yH=ow<&~pt*TWGYLki3$72pRJ`ctbYhcD0WvMCta)#rX zbaKFa)#C5%x3!}a1TzW9spDw6$t}vQSCRKMPsqSkg6!)hvZy-7}m`hXZM-M3Aq{*XQncv1Ng|KQPa z$ReF|uAI&_782Hv&bI_~-k^1kFtMF#I!k2XvyjWDVtSVJbjtmADH(c3NWDX}nQ4=b zdOQ+@=j$!RbA~ChYkAxY&pGZ#T~>c0$;$Zjj}5eIirXu-&yHU_H`*>^BYZwg(UZxH zA(0d6=ELIWLD(E8eahhGi-hrl=V|6cyAO*_MCYDPz^z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`Z!qC|tB98kuq2tTt zn+tjO-;K`-g zLsPyV%v*X>j)%>YT;GCCgVe3ulB0ACTkXgbcRN3qAAk>Q5xyA@Q^uTw@6k9)w1qO( zEF3z-v4d@taYSJ|<)E?dBJ`z#3c}a01es&9Oev+Tl5Dw#3?`rddNWh0{npJ1Ne|}4?fW0 zd5{Tulpzc856Ff*;8BJg;2;b2cplmSUfcuklh=UPfY*T6fY*T6z{6{xSNmPvhr0XS zMe!|x$NK-M-&FNE{o3#LTOYS&|G!@Jp|OHI+3t19r)qSGNlCGSQi&N_wrdISv4XXW z6}W!CS|vrhY#SS}7wo^?^EnT8&I0>;BzI0IR=FPdxH-X?i%c*eSN4HNOhE0q^kH(N z;LjY8_)0fQ_%~lpn-@cJL&k@;bqwQl)pX=hTy;@7OovuFq6MX>ROMMLb+S*MYfvipIMIUivX3*;J zJ|q4Dog(gnm=t1Ih)W^1wTJRv%D`dnL!1UN8^mV7gF4_a=b;YwhzCI?VmZKr4lyKs zj;;%c8G#498he6#@IVG+;aP|kffjs_1s>2t9%vyO{QwTMkb(E*VUm6ao2~QY4tbER isa)g1*DXE=`ndg%@_Xnt;5Fbi;5Fbi;59Hf8u%aLtXK>H diff --git a/resources/Test3D.med b/resources/Test3D.med deleted file mode 100644 index 48eccd7a612e3eb3ea2e49582796a6d3544933a0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 27300 zcmeI4&u^4P7{_PJ0tJe;xGI7_UZfys(bATmYGk!rTHJ0+3kDPg4J6gzj|2{tcrcNJ zCLTCwLO5~g!Gk7T@Z^C5hnjfs570=$#RCTp9=PH2nVE;~PWN4^Y+IJjG|xWoJo7xy z%seyiyffeTg>U+M`&KSrv)quHvnFd=%_5s|Kev6F_^2{ZuGK4MT#-5LFOK+pe<43? zFGZfn#c3~BHc;vt8a=wVP%4b%i-l2BD2*N+%;ybmuBp-k$PbJZ3PyUVu~kl2dltJ6 zH&^NRKWnaEt|Go8x^!}Jb4YD%QrsebTkohZ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>fi1$*q36f7**YF;TdG-g(N|4Lq&f-Q+`-i{iM8Bo^V|!Xcw^bZx(D4 zaP(!#fe(!`a)2^?bO2>^&+3<(YkCIpj$V}j!X z+Ka|5?)kJHd%=k@f5MdBH7ws5`D>#=ed@B_E$6mOb{M-F@ z&bOW!8LEj>w(yBw1C|GJ--7knPJSD6^H@=5JkX8K4ikXj(MKx%>10xe-8CaCSh_9rUt4lQi|bhUb+rk>EgzGuY8-^lPmOVaTvUw`LQ?sw. - -/* - * Copyright (c) 1996-1998 - * Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Silicon Graphics makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Hewlett-Packard Company makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - */ -#ifndef __INTERPKERNELHASHFUN_HXX__ -#define __INTERPKERNELHASHFUN_HXX__ - -#include - -namespace INTERP_KERNEL -{ - template - struct hash { }; - - inline std::size_t __stl_hash_string(const char* __s) - { - unsigned long __h = 0; - for ( ; *__s; ++__s) - __h = 5 * __h + *__s; - return std::size_t(__h); - } - - template<> - struct hash - { - std::size_t operator()(const char* __s) const - { return __stl_hash_string(__s); } - }; - - template<> - struct hash - { - std::size_t operator()(const char* __s) const - { return __stl_hash_string(__s); } - }; - - template<> - struct hash - { - std::size_t operator()(char __x) const { return __x; } - }; - - template<> - struct hash - { - std::size_t operator()(unsigned char __x) const { return __x; } - }; - - template<> - struct hash - { - std::size_t operator()(unsigned char __x) const { return __x; } - }; - - template<> - struct hash - { - std::size_t operator()(short __x) const { return __x; } - }; - - template<> - struct hash - { - std::size_t operator()(unsigned short __x) const { return __x; } - }; - - template<> - struct hash - { - std::size_t operator()(int __x) const { return __x; } - }; - - template<> - struct hash - { - std::size_t operator()(unsigned int __x) const { return __x; } - }; - - template<> - struct hash - { - std::size_t operator()(long __x) const { return __x; } - }; - - template<> - struct hash - { - std::size_t operator()(unsigned long __x) const { return __x; } - }; -} - -#endif diff --git a/src/INTERP_KERNEL/Bases/InterpKernelHashMap.hxx b/src/INTERP_KERNEL/Bases/InterpKernelHashMap.hxx deleted file mode 100644 index b4cc8cfbe..000000000 --- a/src/INTERP_KERNEL/Bases/InterpKernelHashMap.hxx +++ /dev/null @@ -1,403 +0,0 @@ -// Copyright (C) 2001, 2002, 2004, 2005, 2006, 2009 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, 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 -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/* - * Copyright (c) 1996 - * Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Silicon Graphics makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Hewlett-Packard Company makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - */ -#ifndef __INTERPKERNELHASHMAP__ -#define __INTERPKERNELHASHMAP__ - -#include "InterpKernelStlExt.hxx" -#include "InterpKernelHashTable.hxx" - -namespace INTERP_KERNEL -{ - template, - class _EqualKey = std::equal_to<_Key>, class _Alloc = std::allocator<_Tp> > - class HashMap - { - private: - typedef hashtable,_Key, _HashFn, - STLEXT::Select1st >, - _EqualKey, _Alloc> _Ht; - - _Ht _M_ht; - - public: - typedef typename _Ht::key_type key_type; - typedef _Tp data_type; - typedef _Tp mapped_type; - typedef typename _Ht::value_type value_type; - typedef typename _Ht::hasher hasher; - typedef typename _Ht::key_equal key_equal; - - typedef typename _Ht::size_type size_type; - typedef typename _Ht::difference_type difference_type; - typedef typename _Ht::pointer pointer; - typedef typename _Ht::const_pointer const_pointer; - typedef typename _Ht::reference reference; - typedef typename _Ht::const_reference const_reference; - - typedef typename _Ht::iterator iterator; - typedef typename _Ht::const_iterator const_iterator; - - typedef typename _Ht::allocator_type allocator_type; - - hasher hash_funct() const { return _M_ht.hash_funct(); } - - key_equal key_eq() const { return _M_ht.key_eq(); } - - allocator_type get_allocator() const { return _M_ht.get_allocator(); } - - HashMap() : _M_ht(100, hasher(), key_equal(), allocator_type()) {} - - explicit HashMap(size_type __n) : _M_ht(__n, hasher(), key_equal(), allocator_type()) {} - - HashMap(size_type __n, const hasher& __hf) : _M_ht(__n, __hf, key_equal(), allocator_type()) {} - - HashMap(size_type __n, const hasher& __hf, const key_equal& __eql, - const allocator_type& __a = allocator_type()) : _M_ht(__n, __hf, __eql, __a) {} - - template - HashMap(_InputIterator __f, _InputIterator __l) : _M_ht(100, hasher(), key_equal(), allocator_type()) - { _M_ht.insert_unique(__f, __l); } - - template - HashMap(_InputIterator __f, _InputIterator __l, size_type __n) : _M_ht(__n, hasher(), key_equal(), allocator_type()) - { _M_ht.insert_unique(__f, __l); } - - template - HashMap(_InputIterator __f, _InputIterator __l, size_type __n, const hasher& __hf) - : _M_ht(__n, __hf, key_equal(), allocator_type()) - { _M_ht.insert_unique(__f, __l); } - - template - HashMap(_InputIterator __f, _InputIterator __l, size_type __n, - const hasher& __hf, const key_equal& __eql, - const allocator_type& __a = allocator_type()) : _M_ht(__n, __hf, __eql, __a) - { _M_ht.insert_unique(__f, __l); } - - size_type size() const { return _M_ht.size(); } - - size_type max_size() const { return _M_ht.max_size(); } - - bool empty() const { return _M_ht.empty(); } - - void swap(HashMap& __hs) { _M_ht.swap(__hs._M_ht); } - - template - friend bool operator== (const HashMap<_K1, _T1, _HF, _EqK, _Al>&, - const HashMap<_K1, _T1, _HF, _EqK, _Al>&); - - iterator begin() { return _M_ht.begin(); } - - iterator end() { return _M_ht.end(); } - - const_iterator begin() const { return _M_ht.begin(); } - - const_iterator end() const { return _M_ht.end(); } - - std::pair insert(const value_type& __obj) { return _M_ht.insert_unique(__obj); } - - template - void insert(_InputIterator __f, _InputIterator __l) { _M_ht.insert_unique(__f, __l); } - - std::pair - insert_noresize(const value_type& __obj) { return _M_ht.insert_unique_noresize(__obj); } - - iterator find(const key_type& __key) { return _M_ht.find(__key); } - - const_iterator find(const key_type& __key) const { return _M_ht.find(__key); } - - _Tp& operator[](const key_type& __key) { return _M_ht.find_or_insert(value_type(__key, _Tp())).second; } - - size_type count(const key_type& __key) const { return _M_ht.count(__key); } - - std::pair equal_range(const key_type& __key) { return _M_ht.equal_range(__key); } - - std::pair equal_range(const key_type& __key) const { return _M_ht.equal_range(__key); } - - size_type erase(const key_type& __key) { return _M_ht.erase(__key); } - - void erase(iterator __it) { _M_ht.erase(__it); } - - void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); } - - void clear() { _M_ht.clear(); } - - void resize(size_type __hint) { _M_ht.resize(__hint); } - - size_type bucket_count() const { return _M_ht.bucket_count(); } - - size_type max_bucket_count() const { return _M_ht.max_bucket_count(); } - - size_type elems_in_bucket(size_type __n) const { return _M_ht.elems_in_bucket(__n); } - }; - - template - inline bool operator==(const HashMap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1, - const HashMap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2) - { return __hm1._M_ht == __hm2._M_ht; } - - template - inline bool operator!=(const HashMap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1, - const HashMap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2) - { return !(__hm1 == __hm2); } - - template - inline void swap(HashMap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1, - HashMap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2) - { __hm1.swap(__hm2); } - - template, - class _EqualKey = std::equal_to<_Key>, - class _Alloc = std::allocator<_Tp> > - class hash_multimap - { - private: - typedef hashtable, _Key, _HashFn, - STLEXT::Select1st >, _EqualKey, _Alloc> - _Ht; - _Ht _M_ht; - public: - typedef typename _Ht::key_type key_type; - typedef _Tp data_type; - typedef _Tp mapped_type; - typedef typename _Ht::value_type value_type; - typedef typename _Ht::hasher hasher; - typedef typename _Ht::key_equal key_equal; - - typedef typename _Ht::size_type size_type; - typedef typename _Ht::difference_type difference_type; - typedef typename _Ht::pointer pointer; - typedef typename _Ht::const_pointer const_pointer; - typedef typename _Ht::reference reference; - typedef typename _Ht::const_reference const_reference; - - typedef typename _Ht::iterator iterator; - typedef typename _Ht::const_iterator const_iterator; - - typedef typename _Ht::allocator_type allocator_type; - - hasher hash_funct() const { return _M_ht.hash_funct(); } - - key_equal key_eq() const { return _M_ht.key_eq(); } - - allocator_type get_allocator() const { return _M_ht.get_allocator(); } - - hash_multimap() : _M_ht(100, hasher(), key_equal(), allocator_type()) { } - - explicit hash_multimap(size_type __n) : _M_ht(__n, hasher(), key_equal(), allocator_type()) {} - - hash_multimap(size_type __n, const hasher& __hf) : _M_ht(__n, __hf, key_equal(), allocator_type()) {} - - hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql, - const allocator_type& __a = allocator_type()) : _M_ht(__n, __hf, __eql, __a) {} - - template - hash_multimap(_InputIterator __f, _InputIterator __l) : _M_ht(100, hasher(), key_equal(), allocator_type()) - { _M_ht.insert_equal(__f, __l); } - - template - hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n) : _M_ht(__n, hasher(), key_equal(), allocator_type()) - { _M_ht.insert_equal(__f, __l); } - - template - hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n, const hasher& __hf) - : _M_ht(__n, __hf, key_equal(), allocator_type()) - { _M_ht.insert_equal(__f, __l); } - - template - hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n, - const hasher& __hf, const key_equal& __eql, - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) - { _M_ht.insert_equal(__f, __l); } - - size_type size() const { return _M_ht.size(); } - - size_type max_size() const { return _M_ht.max_size(); } - - bool empty() const { return _M_ht.empty(); } - - void swap(hash_multimap& __hs) { _M_ht.swap(__hs._M_ht); } - - template - friend bool operator==(const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&, - const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&); - - iterator begin() { return _M_ht.begin(); } - - iterator end() { return _M_ht.end(); } - - const_iterator begin() const { return _M_ht.begin(); } - - const_iterator end() const { return _M_ht.end(); } - - iterator insert(const value_type& __obj) { return _M_ht.insert_equal(__obj); } - - template - void insert(_InputIterator __f, _InputIterator __l) { _M_ht.insert_equal(__f,__l); } - - iterator insert_noresize(const value_type& __obj) { return _M_ht.insert_equal_noresize(__obj); } - - iterator find(const key_type& __key) { return _M_ht.find(__key); } - - const_iterator find(const key_type& __key) const { return _M_ht.find(__key); } - - size_type count(const key_type& __key) const { return _M_ht.count(__key); } - - std::pair equal_range(const key_type& __key) { return _M_ht.equal_range(__key); } - - std::pair equal_range(const key_type& __key) const { return _M_ht.equal_range(__key); } - - size_type erase(const key_type& __key) { return _M_ht.erase(__key); } - - void erase(iterator __it) { _M_ht.erase(__it); } - - void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); } - - void clear() { _M_ht.clear(); } - - void resize(size_type __hint) { _M_ht.resize(__hint); } - - size_type bucket_count() const { return _M_ht.bucket_count(); } - - size_type max_bucket_count() const { return _M_ht.max_bucket_count(); } - - size_type elems_in_bucket(size_type __n) const { return _M_ht.elems_in_bucket(__n); } - }; - - template - inline bool operator==(const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm1, - const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm2) - { return __hm1._M_ht == __hm2._M_ht; } - - template - inline bool operator!=(const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm1, - const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm2) - { return !(__hm1 == __hm2); } - - template - inline void swap(hash_multimap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1, - hash_multimap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2) - { __hm1.swap(__hm2); } - -} - -namespace std -{ - // Specialization of insert_iterator so that it will work for HashMap - // and hash_multimap. - template - class insert_iterator > - { - protected: - typedef INTERP_KERNEL::HashMap<_Key, _Tp, _HashFn, _EqKey, _Alloc> - _Container; - _Container* container; - public: - typedef _Container container_type; - typedef output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; - - insert_iterator(_Container& __x) : container(&__x) {} - - insert_iterator(_Container& __x, typename _Container::iterator) : container(&__x) {} - - insert_iterator<_Container>& operator=(const typename _Container::value_type& __value__) - { - container->insert(__value__); - return *this; - } - - insert_iterator<_Container>& operator*() { return *this; } - - insert_iterator<_Container>& operator++() { return *this; } - - insert_iterator<_Container>& operator++(int) { return *this; } - }; - - template - class insert_iterator > - { - protected: - typedef INTERP_KERNEL::hash_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc> - _Container; - _Container* container; - typename _Container::iterator iter; - - public: - typedef _Container container_type; - typedef output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; - - insert_iterator(_Container& __x) : container(&__x) {} - - insert_iterator(_Container& __x, typename _Container::iterator) : container(&__x) {} - - insert_iterator<_Container>& operator=(const typename _Container::value_type& __value__) - { - container->insert(__value__); - return *this; - } - - insert_iterator<_Container>& operator*() { return *this; } - - insert_iterator<_Container>& operator++() { return *this; } - - insert_iterator<_Container>& operator++(int) { return *this; } - }; -} - -#endif diff --git a/src/INTERP_KERNEL/Bases/InterpKernelHashTable.hxx b/src/INTERP_KERNEL/Bases/InterpKernelHashTable.hxx deleted file mode 100644 index 472891549..000000000 --- a/src/INTERP_KERNEL/Bases/InterpKernelHashTable.hxx +++ /dev/null @@ -1,995 +0,0 @@ -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -// Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, 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 -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// . - -/* - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Silicon Graphics makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Hewlett-Packard Company makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - */ -#ifndef __INTERPKERNELHASHTABLE_HXX__ -#define __INTERPKERNELHASHTABLE_HXX__ - -#include "InterpKernelStlExt.hxx" -#include "InterpKernelHashFun.hxx" - -#include -#include -#include -#include - -namespace INTERP_KERNEL -{ - template - struct _Hashtable_node - { - _Hashtable_node* _M_next; - _Val _M_val; - }; - - template > - class hashtable; - - template - struct _Hashtable_iterator; - - template - struct _Hashtable_const_iterator; - - template - struct _Hashtable_iterator - { - typedef hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc> - _Hashtable; - typedef _Hashtable_iterator<_Val, _Key, _HashFcn, - _ExtractKey, _EqualKey, _Alloc> - iterator; - typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn, - _ExtractKey, _EqualKey, _Alloc> - const_iterator; - typedef _Hashtable_node<_Val> _Node; - typedef std::forward_iterator_tag iterator_category; - typedef _Val value_type; - typedef std::ptrdiff_t difference_type; - typedef std::size_t size_type; - typedef _Val& reference; - typedef _Val* pointer; - - _Node* _M_cur; - _Hashtable* _M_ht; - - _Hashtable_iterator(_Node* __n, _Hashtable* __tab) - : _M_cur(__n), _M_ht(__tab) { } - - _Hashtable_iterator() { } - - reference - operator*() const - { return _M_cur->_M_val; } - - pointer - operator->() const - { return &(operator*()); } - - iterator& - operator++(); - - iterator - operator++(int); - - bool - operator==(const iterator& __it) const - { return _M_cur == __it._M_cur; } - - bool - operator!=(const iterator& __it) const - { return _M_cur != __it._M_cur; } - }; - - template - struct _Hashtable_const_iterator - { - typedef hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc> - _Hashtable; - typedef _Hashtable_iterator<_Val,_Key,_HashFcn, - _ExtractKey,_EqualKey,_Alloc> - iterator; - typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn, - _ExtractKey, _EqualKey, _Alloc> - const_iterator; - typedef _Hashtable_node<_Val> _Node; - - typedef std::forward_iterator_tag iterator_category; - typedef _Val value_type; - typedef std::ptrdiff_t difference_type; - typedef std::size_t size_type; - typedef const _Val& reference; - typedef const _Val* pointer; - - const _Node* _M_cur; - const _Hashtable* _M_ht; - - _Hashtable_const_iterator(const _Node* __n, const _Hashtable* __tab) - : _M_cur(__n), _M_ht(__tab) { } - - _Hashtable_const_iterator() { } - - _Hashtable_const_iterator(const iterator& __it) - : _M_cur(__it._M_cur), _M_ht(__it._M_ht) { } - - reference operator*() const { return _M_cur->_M_val; } - - pointer operator->() const { return &(operator*()); } - - const_iterator& operator++(); - - const_iterator operator++(int); - - bool operator==(const const_iterator& __it) const { return _M_cur == __it._M_cur; } - - bool operator!=(const const_iterator& __it) const { return _M_cur != __it._M_cur; } - }; - - // Note: assumes long is at least 32 bits. - enum { _S_num_primes = 28 }; - - static const unsigned long __stl_prime_list[_S_num_primes] = - { - 53ul, 97ul, 193ul, 389ul, 769ul, - 1543ul, 3079ul, 6151ul, 12289ul, 24593ul, - 49157ul, 98317ul, 196613ul, 393241ul, 786433ul, - 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul, - 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul, - 1610612741ul, 3221225473ul, 4294967291ul - }; - - inline unsigned long - __stl_next_prime(unsigned long __n) - { - const unsigned long* __first = __stl_prime_list; - const unsigned long* __last = __stl_prime_list + (int)_S_num_primes; - const unsigned long* pos = std::lower_bound(__first, __last, __n); - return pos == __last ? *(__last - 1) : *pos; - } - - // Forward declaration of operator==. - template - class hashtable; - - template - bool operator==(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1, - const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2); - - // Hashtables handle allocators a bit differently than other - // containers do. If we're using standard-conforming allocators, then - // a hashtable unconditionally has a member variable to hold its - // allocator, even if it so happens that all instances of the - // allocator type are identical. This is because, for hashtables, - // this extra storage is negligible. Additionally, a base class - // wouldn't serve any other purposes; it wouldn't, for example, - // simplify the exception-handling code. - template - class hashtable - { - public: - typedef _Key key_type; - typedef _Val value_type; - typedef _HashFcn hasher; - typedef _EqualKey key_equal; - - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; - typedef value_type& reference; - typedef const value_type& const_reference; - - hasher hash_funct() const { return _M_hash; } - - key_equal key_eq() const { return _M_equals; } - - private: - typedef _Hashtable_node<_Val> _Node; - - public: - typedef typename _Alloc::template rebind::other allocator_type; - allocator_type get_allocator() const { return _M_node_allocator; } - - private: - typedef typename _Alloc::template rebind<_Node>::other _Node_Alloc; - typedef typename _Alloc::template rebind<_Node*>::other _Nodeptr_Alloc; - typedef std::vector<_Node*, _Nodeptr_Alloc> _Vector_type; - - _Node_Alloc _M_node_allocator; - - _Node *_M_get_node() { return _M_node_allocator.allocate(1); } - - void _M_put_node(_Node* __p) { _M_node_allocator.deallocate(__p, 1); } - - private: - hasher _M_hash; - key_equal _M_equals; - _ExtractKey _M_get_key; - _Vector_type _M_buckets; - size_type _M_num_elements; - - public: - typedef _Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey, - _EqualKey, _Alloc> - iterator; - typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey, - _EqualKey, _Alloc> - const_iterator; - - friend struct - _Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>; - - friend struct - _Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey, - _EqualKey, _Alloc>; - - public: - hashtable(size_type __n, const _HashFcn& __hf, - const _EqualKey& __eql, const _ExtractKey& __ext, - const allocator_type& __a = allocator_type()) - : _M_node_allocator(__a), _M_hash(__hf), _M_equals(__eql), - _M_get_key(__ext), _M_buckets(__a), _M_num_elements(0) - { _M_initialize_buckets(__n); } - - hashtable(size_type __n, const _HashFcn& __hf, - const _EqualKey& __eql, - const allocator_type& __a = allocator_type()) - : _M_node_allocator(__a), _M_hash(__hf), _M_equals(__eql), - _M_get_key(_ExtractKey()), _M_buckets(__a), _M_num_elements(0) - { _M_initialize_buckets(__n); } - - hashtable(const hashtable& __ht) - : _M_node_allocator(__ht.get_allocator()), _M_hash(__ht._M_hash), - _M_equals(__ht._M_equals), _M_get_key(__ht._M_get_key), - _M_buckets(__ht.get_allocator()), _M_num_elements(0) - { _M_copy_from(__ht); } - - hashtable& operator= (const hashtable& __ht) - { - if (&__ht != this) - { - clear(); - _M_hash = __ht._M_hash; - _M_equals = __ht._M_equals; - _M_get_key = __ht._M_get_key; - _M_copy_from(__ht); - } - return *this; - } - - ~hashtable() - { clear(); } - - size_type size() const { return _M_num_elements; } - - size_type max_size() const { return size_type(-1); } - - bool empty() const { return size() == 0; } - - void swap(hashtable& __ht) - { - std::swap(_M_hash, __ht._M_hash); - std::swap(_M_equals, __ht._M_equals); - std::swap(_M_get_key, __ht._M_get_key); - _M_buckets.swap(__ht._M_buckets); - std::swap(_M_num_elements, __ht._M_num_elements); - } - - iterator begin() - { - for (size_type __n = 0; __n < _M_buckets.size(); ++__n) - if (_M_buckets[__n]) - return iterator(_M_buckets[__n], this); - return end(); - } - - iterator end() { return iterator(0, this); } - - const_iterator begin() const - { - for (size_type __n = 0; __n < _M_buckets.size(); ++__n) - if (_M_buckets[__n]) - return const_iterator(_M_buckets[__n], this); - return end(); - } - - const_iterator end() const { return const_iterator(0, this); } - - template - friend bool operator==(const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&, - const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&); - - public: - size_type bucket_count() const { return _M_buckets.size(); } - - size_type max_bucket_count() const { return __stl_prime_list[(int)_S_num_primes - 1]; } - - size_type elems_in_bucket(size_type __bucket) const - { - size_type __result = 0; - for (_Node* __n = _M_buckets[__bucket]; __n; __n = __n->_M_next) - __result += 1; - return __result; - } - - std::pair insert_unique(const value_type& __obj) - { - resize(_M_num_elements + 1); - return insert_unique_noresize(__obj); - } - - iterator insert_equal(const value_type& __obj) - { - resize(_M_num_elements + 1); - return insert_equal_noresize(__obj); - } - - std::pair insert_unique_noresize(const value_type& __obj); - - iterator insert_equal_noresize(const value_type& __obj); - - template - void insert_unique(_InputIterator __f, _InputIterator __l) - { insert_unique(__f, __l, __iterator_category(__f)); } - - template - void insert_equal(_InputIterator __f, _InputIterator __l) - { insert_equal(__f, __l, __iterator_category(__f)); } - - template - void insert_unique(_InputIterator __f, _InputIterator __l, - std::input_iterator_tag) - { - for ( ; __f != __l; ++__f) - insert_unique(*__f); - } - - template - void insert_equal(_InputIterator __f, _InputIterator __l, - std::input_iterator_tag) - { - for ( ; __f != __l; ++__f) - insert_equal(*__f); - } - - template - void insert_unique(_ForwardIterator __f, _ForwardIterator __l, - std::forward_iterator_tag) - { - size_type __n = std::distance(__f, __l); - resize(_M_num_elements + __n); - for ( ; __n > 0; --__n, ++__f) - insert_unique_noresize(*__f); - } - - template - void - insert_equal(_ForwardIterator __f, _ForwardIterator __l, - std::forward_iterator_tag) - { - size_type __n = std::distance(__f, __l); - resize(_M_num_elements + __n); - for ( ; __n > 0; --__n, ++__f) - insert_equal_noresize(*__f); - } - - reference find_or_insert(const value_type& __obj); - - iterator find(const key_type& __key) - { - size_type __n = _M_bkt_num_key(__key); - _Node* __first; - for (__first = _M_buckets[__n]; - __first && !_M_equals(_M_get_key(__first->_M_val), __key); - __first = __first->_M_next) - { } - return iterator(__first, this); - } - - const_iterator find(const key_type& __key) const - { - size_type __n = _M_bkt_num_key(__key); - const _Node* __first; - for (__first = _M_buckets[__n]; - __first && !_M_equals(_M_get_key(__first->_M_val), __key); - __first = __first->_M_next) - { } - return const_iterator(__first, this); - } - - size_type count(const key_type& __key) const - { - const size_type __n = _M_bkt_num_key(__key); - size_type __result = 0; - for (const _Node* __cur = _M_buckets[__n]; __cur; - __cur = __cur->_M_next) - if (_M_equals(_M_get_key(__cur->_M_val), __key)) - ++__result; - return __result; - } - - std::pair equal_range(const key_type& __key); - - std::pair equal_range(const key_type& __key) const; - - size_type erase(const key_type& __key); - - void erase(const iterator& __it); - - void erase(iterator __first, iterator __last); - - void erase(const const_iterator& __it); - - void erase(const_iterator __first, const_iterator __last); - - void resize(size_type __num_elements_hint); - - void clear(); - - private: - size_type _M_next_size(size_type __n) const { return __stl_next_prime(__n); } - - void _M_initialize_buckets(size_type __n) - { - const size_type __n_buckets = _M_next_size(__n); - _M_buckets.reserve(__n_buckets); - _M_buckets.insert(_M_buckets.end(), __n_buckets, (_Node*) 0); - _M_num_elements = 0; - } - - size_type _M_bkt_num_key(const key_type& __key) const - { return _M_bkt_num_key(__key, _M_buckets.size()); } - - size_type _M_bkt_num(const value_type& __obj) const - { return _M_bkt_num_key(_M_get_key(__obj)); } - - size_type _M_bkt_num_key(const key_type& __key, std::size_t __n) const - { return _M_hash(__key) % __n; } - - size_type _M_bkt_num(const value_type& __obj, std::size_t __n) const - { return _M_bkt_num_key(_M_get_key(__obj), __n); } - - _Node* _M_new_node(const value_type& __obj) - { - _Node* __n = _M_get_node(); - __n->_M_next = 0; - try - { - this->get_allocator().construct(&__n->_M_val, __obj); - return __n; - } - catch(...) - { - _M_put_node(__n); - throw; - } - } - - void _M_delete_node(_Node* __n) - { - this->get_allocator().destroy(&__n->_M_val); - _M_put_node(__n); - } - - void _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last); - - void _M_erase_bucket(const size_type __n, _Node* __last); - - void _M_copy_from(const hashtable& __ht); - }; - - template - _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>& - _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>:: - operator++() - { - const _Node* __old = _M_cur; - _M_cur = _M_cur->_M_next; - if (!_M_cur) - { - size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val); - while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size()) - _M_cur = _M_ht->_M_buckets[__bucket]; - } - return *this; - } - - template - inline _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All> - _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>:: - operator++(int) - { - iterator __tmp = *this; - ++*this; - return __tmp; - } - - template - _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>& - _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>:: - operator++() - { - const _Node* __old = _M_cur; - _M_cur = _M_cur->_M_next; - if (!_M_cur) - { - size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val); - while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size()) - _M_cur = _M_ht->_M_buckets[__bucket]; - } - return *this; - } - - template - inline _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All> - _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>:: - operator++(int) - { - const_iterator __tmp = *this; - ++*this; - return __tmp; - } - - template - bool operator==(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1, - const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2) - { - typedef typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::_Node _Node; - - if (__ht1._M_buckets.size() != __ht2._M_buckets.size()) - return false; - - for (std::size_t __n = 0; __n < __ht1._M_buckets.size(); ++__n) - { - _Node* __cur1 = __ht1._M_buckets[__n]; - _Node* __cur2 = __ht2._M_buckets[__n]; - // Check same length of lists - for (; __cur1 && __cur2; - __cur1 = __cur1->_M_next, __cur2 = __cur2->_M_next) - { } - if (__cur1 || __cur2) - return false; - // Now check one's elements are in the other - for (__cur1 = __ht1._M_buckets[__n] ; __cur1; - __cur1 = __cur1->_M_next) - { - bool _found__cur1 = false; - for (__cur2 = __ht2._M_buckets[__n]; - __cur2; __cur2 = __cur2->_M_next) - { - if (__cur1->_M_val == __cur2->_M_val) - { - _found__cur1 = true; - break; - } - } - if (!_found__cur1) - return false; - } - } - return true; - } - - template - inline bool operator!=(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1, - const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2) - { return !(__ht1 == __ht2); } - - template - inline void swap(hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht1, - hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht2) - { __ht1.swap(__ht2); } - - template - std::pair::iterator, bool> - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - insert_unique_noresize(const value_type& __obj) - { - const size_type __n = _M_bkt_num(__obj); - _Node* __first = _M_buckets[__n]; - - for (_Node* __cur = __first; __cur; __cur = __cur->_M_next) - if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj))) - return std::pair(iterator(__cur, this), false); - - _Node* __tmp = _M_new_node(__obj); - __tmp->_M_next = __first; - _M_buckets[__n] = __tmp; - ++_M_num_elements; - return std::pair(iterator(__tmp, this), true); - } - - template - typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - insert_equal_noresize(const value_type& __obj) - { - const size_type __n = _M_bkt_num(__obj); - _Node* __first = _M_buckets[__n]; - - for (_Node* __cur = __first; __cur; __cur = __cur->_M_next) - if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj))) - { - _Node* __tmp = _M_new_node(__obj); - __tmp->_M_next = __cur->_M_next; - __cur->_M_next = __tmp; - ++_M_num_elements; - return iterator(__tmp, this); - } - - _Node* __tmp = _M_new_node(__obj); - __tmp->_M_next = __first; - _M_buckets[__n] = __tmp; - ++_M_num_elements; - return iterator(__tmp, this); - } - - template - typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::reference - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - find_or_insert(const value_type& __obj) - { - resize(_M_num_elements + 1); - - size_type __n = _M_bkt_num(__obj); - _Node* __first = _M_buckets[__n]; - - for (_Node* __cur = __first; __cur; __cur = __cur->_M_next) - if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj))) - return __cur->_M_val; - - _Node* __tmp = _M_new_node(__obj); - __tmp->_M_next = __first; - _M_buckets[__n] = __tmp; - ++_M_num_elements; - return __tmp->_M_val; - } - - template - std::pair::iterator, - typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator> - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::equal_range(const key_type& __key) - { - typedef std::pair _Pii; - const size_type __n = _M_bkt_num_key(__key); - - for (_Node* __first = _M_buckets[__n]; __first; - __first = __first->_M_next) - if (_M_equals(_M_get_key(__first->_M_val), __key)) - { - for (_Node* __cur = __first->_M_next; __cur; - __cur = __cur->_M_next) - if (!_M_equals(_M_get_key(__cur->_M_val), __key)) - return _Pii(iterator(__first, this), iterator(__cur, this)); - for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m) - if (_M_buckets[__m]) - return _Pii(iterator(__first, this), - iterator(_M_buckets[__m], this)); - return _Pii(iterator(__first, this), end()); - } - return _Pii(end(), end()); - } - - template - std::pair::const_iterator, - typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::const_iterator> - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::equal_range(const key_type& __key) const - { - typedef std::pair _Pii; - const size_type __n = _M_bkt_num_key(__key); - - for (const _Node* __first = _M_buckets[__n]; __first; - __first = __first->_M_next) - { - if (_M_equals(_M_get_key(__first->_M_val), __key)) - { - for (const _Node* __cur = __first->_M_next; __cur; - __cur = __cur->_M_next) - if (!_M_equals(_M_get_key(__cur->_M_val), __key)) - return _Pii(const_iterator(__first, this), - const_iterator(__cur, this)); - for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m) - if (_M_buckets[__m]) - return _Pii(const_iterator(__first, this), - const_iterator(_M_buckets[__m], this)); - return _Pii(const_iterator(__first, this), end()); - } - } - return _Pii(end(), end()); - } - - template - typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::size_type - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::erase(const key_type& __key) - { - const size_type __n = _M_bkt_num_key(__key); - _Node* __first = _M_buckets[__n]; - size_type __erased = 0; - - if (__first) - { - _Node* __cur = __first; - _Node* __next = __cur->_M_next; - while (__next) - { - if (_M_equals(_M_get_key(__next->_M_val), __key)) - { - __cur->_M_next = __next->_M_next; - _M_delete_node(__next); - __next = __cur->_M_next; - ++__erased; - --_M_num_elements; - } - else - { - __cur = __next; - __next = __cur->_M_next; - } - } - if (_M_equals(_M_get_key(__first->_M_val), __key)) - { - _M_buckets[__n] = __first->_M_next; - _M_delete_node(__first); - ++__erased; - --_M_num_elements; - } - } - return __erased; - } - - template - void hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::erase(const iterator& __it) - { - _Node* __p = __it._M_cur; - if (__p) - { - const size_type __n = _M_bkt_num(__p->_M_val); - _Node* __cur = _M_buckets[__n]; - if (__cur == __p) - { - _M_buckets[__n] = __cur->_M_next; - _M_delete_node(__cur); - --_M_num_elements; - } - else - { - _Node* __next = __cur->_M_next; - while (__next) - { - if (__next == __p) - { - __cur->_M_next = __next->_M_next; - _M_delete_node(__next); - --_M_num_elements; - break; - } - else - { - __cur = __next; - __next = __cur->_M_next; - } - } - } - } - } - - template - void hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::erase(iterator __first, iterator __last) - { - size_type __f_bucket = __first._M_cur ? _M_bkt_num(__first._M_cur->_M_val) : _M_buckets.size(); - - size_type __l_bucket = __last._M_cur ? _M_bkt_num(__last._M_cur->_M_val) : _M_buckets.size(); - - if (__first._M_cur == __last._M_cur) - return; - else if (__f_bucket == __l_bucket) - _M_erase_bucket(__f_bucket, __first._M_cur, __last._M_cur); - else - { - _M_erase_bucket(__f_bucket, __first._M_cur, 0); - for (size_type __n = __f_bucket + 1; __n < __l_bucket; ++__n) - _M_erase_bucket(__n, 0); - if (__l_bucket != _M_buckets.size()) - _M_erase_bucket(__l_bucket, __last._M_cur); - } - } - - template - inline void - hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: - erase(const_iterator __first, const_iterator __last) - { - erase(iterator(const_cast<_Node*>(__first._M_cur), - const_cast(__first._M_ht)), - iterator(const_cast<_Node*>(__last._M_cur), - const_cast(__last._M_ht))); - } - - template - inline void hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::erase(const const_iterator& __it) - { erase(iterator(const_cast<_Node*>(__it._M_cur), const_cast(__it._M_ht))); } - - template - void hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::resize(size_type __num_elements_hint) - { - const size_type __old_n = _M_buckets.size(); - if (__num_elements_hint > __old_n) - { - const size_type __n = _M_next_size(__num_elements_hint); - if (__n > __old_n) - { - _Vector_type __tmp(__n, (_Node*)(0), _M_buckets.get_allocator()); - try - { - for (size_type __bucket = 0; __bucket < __old_n; ++__bucket) - { - _Node* __first = _M_buckets[__bucket]; - while (__first) - { - size_type __new_bucket = _M_bkt_num(__first->_M_val,__n); - _M_buckets[__bucket] = __first->_M_next; - __first->_M_next = __tmp[__new_bucket]; - __tmp[__new_bucket] = __first; - __first = _M_buckets[__bucket]; - } - } - _M_buckets.swap(__tmp); - } - catch(...) - { - for (size_type __bucket = 0; __bucket < __tmp.size();++__bucket) - { - while (__tmp[__bucket]) - { - _Node* __next = __tmp[__bucket]->_M_next; - _M_delete_node(__tmp[__bucket]); - __tmp[__bucket] = __next; - } - } - throw; - } - } - } - } - - template - void hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::_M_erase_bucket(const size_type __n, _Node* __first, _Node* __last) - { - _Node* __cur = _M_buckets[__n]; - if (__cur == __first) - _M_erase_bucket(__n, __last); - else - { - _Node* __next; - for (__next = __cur->_M_next; - __next != __first; - __cur = __next, __next = __cur->_M_next) - ; - while (__next != __last) - { - __cur->_M_next = __next->_M_next; - _M_delete_node(__next); - __next = __cur->_M_next; - --_M_num_elements; - } - } - } - - template - void hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::_M_erase_bucket(const size_type __n, _Node* __last) - { - _Node* __cur = _M_buckets[__n]; - while (__cur != __last) - { - _Node* __next = __cur->_M_next; - _M_delete_node(__cur); - __cur = __next; - _M_buckets[__n] = __cur; - --_M_num_elements; - } - } - - template - void hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::clear() - { - for (size_type __i = 0; __i < _M_buckets.size(); ++__i) - { - _Node* __cur = _M_buckets[__i]; - while (__cur != 0) - { - _Node* __next = __cur->_M_next; - _M_delete_node(__cur); - __cur = __next; - } - _M_buckets[__i] = 0; - } - _M_num_elements = 0; - } - - template - void hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::_M_copy_from(const hashtable& __ht) - { - _M_buckets.clear(); - _M_buckets.reserve(__ht._M_buckets.size()); - _M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (_Node*) 0); - try - { - for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) { - const _Node* __cur = __ht._M_buckets[__i]; - if (__cur) - { - _Node* __local_copy = _M_new_node(__cur->_M_val); - _M_buckets[__i] = __local_copy; - for (_Node* __next = __cur->_M_next; - __next; - __cur = __next, __next = __cur->_M_next) - { - __local_copy->_M_next = _M_new_node(__next->_M_val); - __local_copy = __local_copy->_M_next; - } - } - } - _M_num_elements = __ht._M_num_elements; - } - catch(...) - { - clear(); - throw; - } - } -} - -#endif diff --git a/src/INTERP_KERNEL/Bases/InterpKernelStlExt.hxx b/src/INTERP_KERNEL/Bases/InterpKernelStlExt.hxx deleted file mode 100644 index 36b40df94..000000000 --- a/src/INTERP_KERNEL/Bases/InterpKernelStlExt.hxx +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __INTERPKERNELSTLEXT_HXX__ -#define __INTERPKERNELSTLEXT_HXX__ - -#include - -namespace INTERP_KERNEL -{ - namespace STLEXT - { - template - struct Select1st : public std::unary_function<_Pair, typename _Pair::first_type> - { - typename _Pair::first_type& operator()(_Pair& __x) const { return __x.first; } - const typename _Pair::first_type&operator()(const _Pair& __x) const { return __x.first; } - }; - - template - inline void Construct(_T1* __p, const _T2& __value__) { ::new(static_cast(__p)) _T1(__value__); } - - template inline void Destroy(_Tp* __pointer) { __pointer->~_Tp(); } - } -} - -#endif diff --git a/src/INTERP_KERNEL/CurveIntersector.hxx b/src/INTERP_KERNEL/CurveIntersector.hxx deleted file mode 100644 index 8e1f3929c..000000000 --- a/src/INTERP_KERNEL/CurveIntersector.hxx +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __CURVEINTERSECTOR_HXX__ -#define __CURVEINTERSECTOR_HXX__ - -#include "TargetIntersector.hxx" -#include "NormalizedUnstructuredMesh.hxx" - -namespace INTERP_KERNEL -{ - template - class CurveIntersector : public TargetIntersector - { - public: - static const int SPACEDIM=MyMeshType::MY_SPACEDIM; - static const int MESHDIM=MyMeshType::MY_MESHDIM; - typedef typename MyMeshType::MyConnType ConnType; - static const NumberingPolicy numPol=MyMeshType::My_numPol; - public: - CurveIntersector(const MyMeshType& meshT, const MyMeshType& meshS, - double precision, double adjustmentEpsAbs, double medianLine, int printLevel); - virtual ~CurveIntersector(); - void createBoundingBoxes(const MyMeshType& mesh, std::vector& bbox); - void adjustBoundingBoxes(std::vector& bbox, double adjustmentEpsAbs); - static void getElemBB(double* bb, const MyMeshType& mesh, ConnType iP, ConnType nb_nodes); - - protected : - bool getRealTargetCoordinates(ConnType icellT, std::vector& coordsT); - bool getRealSourceCoordinates(ConnType icellS, std::vector& coordsS); - double intersectSegments(double *Coords_T, double *Coords_S); - - struct TDualSegment - { - std::vector _coords; - int _nodeId; // in mesh mode - }; - static void getDualSegments(ConnType icell, - const MyMeshType& mesh, - std::vector& segments); - - protected: - const ConnType *_connectT; - const ConnType *_connectS; - const double *_coordsT; - const double *_coordsS; - const ConnType *_connIndexT; - const ConnType *_connIndexS; - const MyMeshType& _meshT; - const MyMeshType& _meshS; - double _tolerance; - double _precision; - double _median_line; - int _print_level; - }; -} - -#endif diff --git a/src/INTERP_KERNEL/CurveIntersector.txx b/src/INTERP_KERNEL/CurveIntersector.txx deleted file mode 100644 index 7fb2be48f..000000000 --- a/src/INTERP_KERNEL/CurveIntersector.txx +++ /dev/null @@ -1,397 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __CURVEINTERSECTOR_TXX__ -#define __CURVEINTERSECTOR_TXX__ - -#include "CurveIntersector.hxx" -#include "InterpolationUtils.hxx" - -#include - -namespace INTERP_KERNEL -{ - template - CurveIntersector - ::CurveIntersector(const MyMeshType& meshT, const MyMeshType& meshS, - double precision, double tolerance, double medianLine, int printLevel): - _meshT(meshT), - _meshS(meshS), - _tolerance(tolerance), - _precision(precision), - _median_line(medianLine), - _print_level(printLevel) - { - if ( SPACEDIM != 1 && SPACEDIM != 2 ) - throw Exception("CurveIntersector(): space dimension of mesh must be 1 or 2"); - if ( MESHDIM != 1 ) - throw Exception("CurveIntersector(): mesh dimension must be 1"); - - _connectT = meshT.getConnectivityPtr(); - _connectS = meshS.getConnectivityPtr(); - _connIndexT = meshT.getConnectivityIndexPtr(); - _connIndexS = meshS.getConnectivityIndexPtr(); - _coordsT = meshT.getCoordinatesPtr(); - _coordsS = meshS.getCoordinatesPtr(); - } - - template - CurveIntersector::~CurveIntersector() - { - } - - //================================================================================ - /*! - \brief creates the bounding boxes for all the cells of mesh \a mesh - - \param mesh structure pointing to the mesh - \param bbox vector containing the bounding boxes - */ - //================================================================================ - - template - void CurveIntersector::createBoundingBoxes (const MyMeshType& mesh, - std::vector& bbox) - { - long nbelems = mesh.getNumberOfElements(); - bbox.resize(2*SPACEDIM* nbelems); - const double* coords = mesh.getCoordinatesPtr(); - const ConnType* conn = mesh.getConnectivityPtr(); - const ConnType* conn_index = mesh.getConnectivityIndexPtr(); - int ibox=0; - for(long icell=0; icell::max(); - bbox[2*SPACEDIM*ibox+2*idim+1] = -std::numeric_limits::max(); - } - //updating the bounding box with each node of the element - for (int j=0; j - ::coo2C(conn[OTT::conn2C(conn_index[icell]+j)]); - for(int idim=0; idim x ) ? bbox[ibox*2*SPACEDIM + 2*idim+1] : x; - } - } - ibox++; - } - } - - //================================================================================ - /*! - Computes the bouding box of a given element. iP in numPol mode. - */ - //================================================================================ - - template - void CurveIntersector::getElemBB (double* bb, - const MyMeshType& mesh, - ConnType iP, - ConnType nb_nodes) - { - const double* coords = mesh.getCoordinatesPtr(); - const ConnType* conn_index = mesh.getConnectivityIndexPtr(); - const ConnType* conn = mesh.getConnectivityPtr(); - //initializing bounding box limits - for(int idim=0; idim::max(); - bb[2*idim+1] = -std::numeric_limits::max(); - } - - for (ConnType i=0; i::coo2C(conn[OTT::conn2C(conn_index[OTT::ind2C(iP)]+i)])); - for(int idim=0; idimbb[2*idim+1]) ? x : bb[2*idim+1]; - } - } - } - - //================================================================================ - /*! Readjusts a set of bounding boxes so that they are extended - in all dimensions for avoiding missing interesting intersections - - \param bbox vector containing the bounding boxes - */ - //================================================================================ - - template - void CurveIntersector::adjustBoundingBoxes (std::vector& bbox, - double adjustmentEpsAbs) - { - long size = bbox.size()/(2*SPACEDIM); - for (int i=0; i - bool CurveIntersector::getRealTargetCoordinates - (ConnType icellT, std::vector& coordsT) - { - int nbNodesT = _connIndexT[OTT::ind2C(icellT)+1] - - _connIndexT[OTT::ind2C(icellT)]; - coordsT.resize(SPACEDIM*nbNodesT); - for (ConnType iT=0; iT::coo2C(_connectT[OTT::conn2C(_connIndexT[OTT::ind2C(icellT)]+iT)])+idim]; - } - } - if ( nbNodesT > 2 ) - { - for(int idim=0; idim - bool CurveIntersector::getRealSourceCoordinates - (ConnType icellS, std::vector& coordsS) - { - int nbNodesS = _connIndexS[OTT::ind2C(icellS)+1] - - _connIndexS[OTT::ind2C(icellS)]; - coordsS.resize(SPACEDIM*nbNodesS); - for(ConnType iS=0; iS::coo2C(_connectS[OTT::conn2C(_connIndexS[OTT::ind2C(icellS)]+iS)])+idim]; - } - } - if ( nbNodesS > 2 ) - { - for(int idim=0; idim - void CurveIntersector::getDualSegments(ConnType icell, - const MyMeshType& mesh, - std::vector& segments) - { - // get coordinates of cell nodes - int nbNodes; - std::vector ncoords; - std::vector nodeIds; - { - const ConnType *connect = mesh.getConnectivityPtr(); - const ConnType *connIndex = mesh.getConnectivityIndexPtr(); - const double *coords = mesh.getCoordinatesPtr(); - - nbNodes = connIndex[icell+1] - connIndex[icell]; - - ncoords.resize(SPACEDIM*nbNodes); - nodeIds.resize(nbNodes); - - for(int i=0; i::conn2C(connIndex[OTT::ind2C(icell)]+i)]; - ncoords[SPACEDIM*i+idim] = coords[SPACEDIM*OTT::coo2C(nodeIds[i])+idim]; - } - if ( nbNodes > 2 ) // quadratic segment, put medium node in the middle - { - for(int idim=0; idim - double CurveIntersector::intersectSegments(double *Coords_T, - double *Coords_S) - { - double xt0 = Coords_T[0], xt1 = Coords_T[1]; - double xs0 = Coords_S[0], xs1 = Coords_S[1]; - if ( SPACEDIM == 2 ) - { - // Pass 2D->1D - - enum { X=0, Y }; - - // check if two segments overlap in 2D within tolerance - - double* t0 = Coords_T; - double* t1 = Coords_T + 2; - double t01[2] = { t1[X]-t0[X], t1[Y]-t0[Y] }; // tgt segment direction - double tSize = sqrt( t01[X]*t01[X] + t01[Y]*t01[Y] ); // tgt segment size - if ( tSize < _precision ) return 0; // degenerated segment - t01[X] /= tSize, t01[Y] /= tSize; // normalize t01 - - double* s0 = Coords_S; - double* s1 = Coords_S + 2; - double t0s0[2] = { s0[X]-t0[X], s0[Y]-t0[Y] }; - double t0s1[2] = { s1[X]-t0[X], s1[Y]-t0[Y] }; - double nt01_x_t0s0 = t0s0[X] * t01[Y] - t0s0[Y] * t01[X]; // t0s0 dot norm of t01 - double nt01_x_t0s1 = t0s1[X] * t01[Y] - t0s1[Y] * t01[X]; // t0s1 dot norm of t01 - double dist_ts0 = fabs( nt01_x_t0s0 ); // dist from tgt seg to s0 - double dist_ts1 = fabs( nt01_x_t0s1 ); // dist from tgt seg to s1 - bool s0_out_of_tol = ( dist_ts0 > _tolerance ); - bool s1_out_of_tol = ( dist_ts1 > _tolerance ); - if ( nt01_x_t0s0 * nt01_x_t0s1 > 0 && ( s0_out_of_tol || s1_out_of_tol )) - return 0; // tgt segment is to far from src segment - - double S0[2] = { s0[X], s0[Y] }; - double S1[2] = { s1[X], s1[Y] }; - if ( s0_out_of_tol ) // put s0 within tolerance - { - double t = _tolerance * nt01_x_t0s0 / dist_ts0; // signed tolerance - double r = ( nt01_x_t0s0 - t ) / ( nt01_x_t0s0 - nt01_x_t0s1 ); - S0[X] = s0[X] * ( 1.-r ) + s1[X] * r; - S0[Y] = s0[Y] * ( 1.-r ) + s1[Y] * r; - } - if ( s1_out_of_tol ) // put s1 within tolerance - { - double t = _tolerance * nt01_x_t0s1 / dist_ts1; // signed tolerance - double r = ( nt01_x_t0s1 - t ) / ( nt01_x_t0s1 - nt01_x_t0s0 ); - S1[X] = s1[X] * ( 1.-r ) + s0[X] * r; - S1[Y] = s1[Y] * ( 1.-r ) + s0[Y] * r; - } - - // project tgt and src segments to median line - - double s01[2] = { S1[X]-S0[X], S1[Y]-S0[Y] }; // src segment direction - double sSize = sqrt( s01[X]*s01[X] + s01[Y]*s01[Y] ); // src segment size - if ( sSize < _precision ) return 0; // degenerated segment - s01[X] /= sSize, s01[Y] /= sSize; // normalize s01 - - // make t01 and s01 codirected - double t01_x_s01 = t01[X] * s01[X] + t01[Y] * s01[Y]; // t01 dot s01 - if ( t01_x_s01 < 0 ) - s01[X] = -s01[X], s01[Y] = -s01[Y]; - - double medianDir[2] = { - t01[X] * ( 1.-_median_line) + s01[X] * _median_line, - t01[Y] * ( 1.-_median_line) + s01[Y] * _median_line - }; - double medianSize = sqrt( medianDir[X]*medianDir[X] + medianDir[Y]*medianDir[Y] ); - if ( medianSize < std::numeric_limits::min() ) - return 0; // strange... - medianDir[X] /= medianSize, medianDir[Y] /= medianSize; - - xt0 = t0[X] * medianDir[X] + t0[Y] * medianDir[Y]; - xt1 = t1[X] * medianDir[X] + t1[Y] * medianDir[Y]; - xs0 = S0[X] * medianDir[X] + S0[Y] * medianDir[Y]; - xs1 = S1[X] * medianDir[X] + S1[Y] * medianDir[Y]; - - } // if ( SPACEDIM == 2 ) - - if ( xt0 > xt1 ) std::swap( xt0, xt1 ); - if ( xs0 > xs1 ) std::swap( xs0, xs1 ); - - double x0 = std::max( xt0, xs0 ); - double x1 = std::min( xt1, xs1 ); - return ( x0 < x1 ) ? ( x1 - x0 ) : 0.; - } - -} - -#endif diff --git a/src/INTERP_KERNEL/CurveIntersectorP0P0.hxx b/src/INTERP_KERNEL/CurveIntersectorP0P0.hxx deleted file mode 100644 index 3ce6f6ff5..000000000 --- a/src/INTERP_KERNEL/CurveIntersectorP0P0.hxx +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __CURVEINTERSECTORP0P0_HXX__ -#define __CURVEINTERSECTORP0P0_HXX__ - -#include "CurveIntersector.hxx" - -namespace INTERP_KERNEL -{ - template - class CurveIntersectorP0P0 : public CurveIntersector - { - public: - static const int SPACEDIM=MyMeshType::MY_SPACEDIM; - static const int MESHDIM=MyMeshType::MY_MESHDIM; - typedef typename MyMeshType::MyConnType ConnType; - static const NumberingPolicy numPol=MyMeshType::My_numPol; - - CurveIntersectorP0P0(const MyMeshType& meshT, const MyMeshType& meshS, - double precision, double tolerance, - double medianLine, int printLevel); - public: - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; - void intersectCells(ConnType icellT, - const std::vector& icellsS, MyMatrix& res); - }; -} - -#endif diff --git a/src/INTERP_KERNEL/CurveIntersectorP0P0.txx b/src/INTERP_KERNEL/CurveIntersectorP0P0.txx deleted file mode 100644 index a72c1ecca..000000000 --- a/src/INTERP_KERNEL/CurveIntersectorP0P0.txx +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email :webmaster.salome@opencascade.com -#ifndef __CURVEINTERSECTORP0P0_TXX__ -#define __CURVEINTERSECTORP0P0_TXX__ - -#include "CurveIntersectorP0P0.hxx" -#include "CurveIntersector.txx" - -#define BASE_INTERSECTOR CurveIntersector - -namespace INTERP_KERNEL -{ - template - CurveIntersectorP0P0 - ::CurveIntersectorP0P0(const MyMeshType& meshT, const MyMeshType& meshS, - double precision, double tolerance, - double medianLine, int printLevel): - BASE_INTERSECTOR(meshT, meshS, precision, tolerance, medianLine, printLevel) - { - } - - template - int CurveIntersectorP0P0 - ::getNumberOfRowsOfResMatrix() const - { - return BASE_INTERSECTOR::_meshT.getNumberOfElements(); - } - - template - int CurveIntersectorP0P0 - ::getNumberOfColsOfResMatrix() const - { - return BASE_INTERSECTOR::_meshS.getNumberOfElements(); - } - - template - void CurveIntersectorP0P0 - ::intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res) - { - typename MyMatrix::value_type& resRow = res[icellT]; - std::vector coordsT; - int t, nbSegT = 1 + BASE_INTERSECTOR::getRealTargetCoordinates(icellT,coordsT); - for ( t = 0; t < nbSegT; ++t ) - for(typename std::vector::const_iterator - iter=icellsS.begin(); iter!=icellsS.end(); iter++) - { - int iS = *iter; - std::vector coordsS; - int s, nbSegS = 1 + BASE_INTERSECTOR::getRealSourceCoordinates(iS,coordsS); - for ( s = 0; s < nbSegS; ++s ) - { - double surf = BASE_INTERSECTOR::intersectSegments(&coordsT[0] + t*SPACEDIM, - &coordsS[0] + s*SPACEDIM); - if(surf!=0.) - resRow.insert(std::make_pair(OTT::indFC(iS),surf)); - } - } - } -} -#undef BASE_INTERSECTOR - -#endif diff --git a/src/INTERP_KERNEL/CurveIntersectorP0P1.hxx b/src/INTERP_KERNEL/CurveIntersectorP0P1.hxx deleted file mode 100644 index 7d4b0cd0b..000000000 --- a/src/INTERP_KERNEL/CurveIntersectorP0P1.hxx +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __CURVEINTERSECTORP0P1_HXX__ -#define __CURVEINTERSECTORP0P1_HXX__ - -#include "CurveIntersector.hxx" - -namespace INTERP_KERNEL -{ - template - class CurveIntersectorP0P1 : public CurveIntersector - { - public: - static const int SPACEDIM=MyMeshType::MY_SPACEDIM; - static const int MESHDIM=MyMeshType::MY_MESHDIM; - typedef typename MyMeshType::MyConnType ConnType; - static const NumberingPolicy numPol=MyMeshType::My_numPol; - - CurveIntersectorP0P1(const MyMeshType& meshT, const MyMeshType& meshS, - double precision, double tolerance, - double medianLine, int printLevel); - public: - void intersectCells(ConnType icellT, - const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; - }; -} - -#endif diff --git a/src/INTERP_KERNEL/CurveIntersectorP0P1.txx b/src/INTERP_KERNEL/CurveIntersectorP0P1.txx deleted file mode 100644 index c25136b5d..000000000 --- a/src/INTERP_KERNEL/CurveIntersectorP0P1.txx +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email :webmaster.salome@opencascade.com -#ifndef __CurveIntersectorP0P1_TXX__ -#define __CurveIntersectorP0P1_TXX__ - -#include "CurveIntersectorP0P1.hxx" -#include "CurveIntersector.txx" - -#define BASE_INTERSECTOR CurveIntersector - -namespace INTERP_KERNEL -{ - template - CurveIntersectorP0P1 - ::CurveIntersectorP0P1(const MyMeshType& meshT, const MyMeshType& meshS, - double precision, double tolerance, - double medianLine, int printLevel): - BASE_INTERSECTOR(meshT, meshS, precision, tolerance, medianLine, printLevel) - { - } - - template - int CurveIntersectorP0P1 - ::getNumberOfRowsOfResMatrix() const - { - return BASE_INTERSECTOR::_meshT.getNumberOfNodes(); - } - - template - int CurveIntersectorP0P1 - ::getNumberOfColsOfResMatrix() const - { - return BASE_INTERSECTOR::_meshS.getNumberOfElements(); - } - - //================================================================================ - /*! - * \brief Project from segments to nodes - */ - //================================================================================ - - template - void CurveIntersectorP0P1 - ::intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res) - { - std::vector segmentsT; - BASE_INTERSECTOR::getDualSegments( icellT, BASE_INTERSECTOR::_meshT, segmentsT); - for ( int t = 0; t < segmentsT.size(); ++t ) - { - typename MyMatrix::value_type& resRow = res[ OTT::ind2C( segmentsT[t]._nodeId )]; - for(typename std::vector::const_iterator - iter=icellsS.begin(); iter!=icellsS.end(); iter++) - { - int iS = *iter; - std::vector coordsS; - int s, nbSegS = 1 + BASE_INTERSECTOR::getRealSourceCoordinates(iS,coordsS); - for ( s = 0; s < nbSegS; ++s ) - { - double surf = BASE_INTERSECTOR::intersectSegments(&segmentsT[t]._coords[0], - &coordsS[0] + s*SPACEDIM); - if(surf!=0.) - { - typename MyMatrix::value_type::const_iterator iterRes=resRow.find(OTT::indFC(iS)); - if(iterRes==resRow.end()) - resRow.insert(std::make_pair(OTT::indFC(iS),surf)); - else - { - surf+=(*iterRes).second; - resRow.erase(OTT::indFC(iS)); - resRow.insert(std::make_pair(OTT::indFC(iS),surf)); - } - } - } - } - } - } -} -#undef BASE_INTERSECTOR - -#endif diff --git a/src/INTERP_KERNEL/CurveIntersectorP1P0.hxx b/src/INTERP_KERNEL/CurveIntersectorP1P0.hxx deleted file mode 100644 index 914c28429..000000000 --- a/src/INTERP_KERNEL/CurveIntersectorP1P0.hxx +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __CURVEINTERSECTORP1P0_HXX__ -#define __CURVEINTERSECTORP1P0_HXX__ - -#include "CurveIntersector.hxx" - -namespace INTERP_KERNEL -{ - template - class CurveIntersectorP1P0 : public CurveIntersector - { - public: - static const int SPACEDIM=MyMeshType::MY_SPACEDIM; - static const int MESHDIM=MyMeshType::MY_MESHDIM; - typedef typename MyMeshType::MyConnType ConnType; - static const NumberingPolicy numPol=MyMeshType::My_numPol; - - CurveIntersectorP1P0(const MyMeshType& meshT, const MyMeshType& meshS, - double precision, double tolerance, double medianLine, int printLevel); - public: - void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; - }; -} - -#endif diff --git a/src/INTERP_KERNEL/CurveIntersectorP1P0.txx b/src/INTERP_KERNEL/CurveIntersectorP1P0.txx deleted file mode 100644 index bafd3ad9e..000000000 --- a/src/INTERP_KERNEL/CurveIntersectorP1P0.txx +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email :webmaster.salome@opencascade.com -#ifndef __CurveIntersectorP1P0_TXX__ -#define __CurveIntersectorP1P0_TXX__ - -#include "CurveIntersectorP1P0.hxx" -#include "CurveIntersector.txx" - -#define BASE_INTERSECTOR CurveIntersector - -namespace INTERP_KERNEL -{ - template - CurveIntersectorP1P0 - ::CurveIntersectorP1P0(const MyMeshType& meshT, const MyMeshType& meshS, - double precision, double tolerance, - double medianLine, int printLevel): - BASE_INTERSECTOR (meshT, meshS, precision, tolerance, medianLine, printLevel) - { - } - - template - int CurveIntersectorP1P0 - ::getNumberOfRowsOfResMatrix() const - { - return BASE_INTERSECTOR::_meshT.getNumberOfElements(); - } - - template - int CurveIntersectorP1P0 - ::getNumberOfColsOfResMatrix() const - { - return BASE_INTERSECTOR::_meshS.getNumberOfNodes(); - } - - //================================================================================ - /*! - * \brief Project from source nodes to target segments - */ - //================================================================================ - - template - void CurveIntersectorP1P0 - ::intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res) - { - typename MyMatrix::value_type& resRow = res[ icellT ]; - std::vector segmentsS; - std::vector coordsT; - int t, nbSegT = 1 + BASE_INTERSECTOR::getRealTargetCoordinates(icellT,coordsT); - for ( t = 0; t < nbSegT; ++t ) - for(typename std::vector::const_iterator - iter=icellsS.begin(); iter!=icellsS.end(); iter++) - { - int iS = *iter; - BASE_INTERSECTOR::getDualSegments( OTT::ind2C(iS), - BASE_INTERSECTOR::_meshS, segmentsS); - for ( int s = 0; s < segmentsS.size(); ++s ) - { - double surf = BASE_INTERSECTOR::intersectSegments(&segmentsS[s]._coords[0], - &coordsT[0] + t*SPACEDIM); - if(surf!=0.) - { - int nS = segmentsS[s]._nodeId; - typename MyMatrix::value_type::const_iterator iterRes=resRow.find(nS); - if(iterRes==resRow.end()) - resRow.insert(std::make_pair(nS,surf)); - else - { - surf+=(*iterRes).second; - resRow.erase(nS); - resRow.insert(std::make_pair(nS,surf)); - } - } - } - } - } -} -#undef BASE_INTERSECTOR - -#endif diff --git a/src/INTERP_KERNEL/CurveIntersectorP1P1.hxx b/src/INTERP_KERNEL/CurveIntersectorP1P1.hxx deleted file mode 100644 index 1df986724..000000000 --- a/src/INTERP_KERNEL/CurveIntersectorP1P1.hxx +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __CURVEINTERSECTORP1P1_HXX__ -#define __CURVEINTERSECTORP1P1_HXX__ - -#include "CurveIntersector.hxx" - -namespace INTERP_KERNEL -{ - template - class CurveIntersectorP1P1 : public CurveIntersector - { - public: - static const int SPACEDIM=MyMeshType::MY_SPACEDIM; - static const int MESHDIM=MyMeshType::MY_MESHDIM; - typedef typename MyMeshType::MyConnType ConnType; - static const NumberingPolicy numPol=MyMeshType::My_numPol; - - CurveIntersectorP1P1(const MyMeshType& meshT, const MyMeshType& meshS, - double precision, double tolerance, - double medianLine, int printLevel); - public: - void intersectCells(ConnType icellT, - const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; - }; -} - -#endif diff --git a/src/INTERP_KERNEL/CurveIntersectorP1P1.txx b/src/INTERP_KERNEL/CurveIntersectorP1P1.txx deleted file mode 100644 index fd43fe7fc..000000000 --- a/src/INTERP_KERNEL/CurveIntersectorP1P1.txx +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email :webmaster.salome@opencascade.com -#ifndef __CurveIntersectorP1P1_TXX__ -#define __CurveIntersectorP1P1_TXX__ - -#include "CurveIntersectorP1P1.hxx" -#include "CurveIntersector.txx" - -#define BASE_INTERSECTOR CurveIntersector - -namespace INTERP_KERNEL -{ - template - CurveIntersectorP1P1 - ::CurveIntersectorP1P1(const MyMeshType& meshT, const MyMeshType& meshS, - double precision, double tolerance, - double medianLine, int printLevel): - BASE_INTERSECTOR (meshT, meshS, precision, tolerance, medianLine, printLevel) - { - } - - template - int CurveIntersectorP1P1 - ::getNumberOfRowsOfResMatrix() const - { - return BASE_INTERSECTOR::_meshT.getNumberOfNodes(); - } - - template - int CurveIntersectorP1P1 - ::getNumberOfColsOfResMatrix() const - { - return BASE_INTERSECTOR::_meshS.getNumberOfNodes(); - } - - template - void CurveIntersectorP1P1 - ::intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res) - { - std::vector segmentsT, segmentsS; - BASE_INTERSECTOR::getDualSegments( icellT, BASE_INTERSECTOR::_meshT, segmentsT); - for ( int t = 0; t < segmentsT.size(); ++t ) - { - typename MyMatrix::value_type& resRow = res[ OTT::ind2C( segmentsT[t]._nodeId )]; - for(typename std::vector::const_iterator - iter=icellsS.begin(); iter!=icellsS.end(); iter++) - { - int iS = *iter; - BASE_INTERSECTOR::getDualSegments( OTT::ind2C(iS), - BASE_INTERSECTOR::_meshS, segmentsS); - for ( int s = 0; s < segmentsS.size(); ++s ) - { - double surf = BASE_INTERSECTOR::intersectSegments(&segmentsT[t]._coords[0], - &segmentsS[s]._coords[0]); - if(surf!=0.) - { - int nS = segmentsS[s]._nodeId; - typename MyMatrix::value_type::const_iterator iterRes=resRow.find(nS); - if(iterRes==resRow.end()) - resRow.insert(std::make_pair(nS,surf)); - else - { - surf+=(*iterRes).second; - resRow.erase(nS); - resRow.insert(std::make_pair(nS,surf)); - } - } - } - } - } - } -} -#undef BASE_INTERSECTOR - -#endif diff --git a/src/INTERP_KERNEL/DirectedBoundingBox.cxx b/src/INTERP_KERNEL/DirectedBoundingBox.cxx deleted file mode 100644 index 72b5c5101..000000000 --- a/src/INTERP_KERNEL/DirectedBoundingBox.cxx +++ /dev/null @@ -1,749 +0,0 @@ -// Copyright (C) 2009-2010 OPEN CASCADE -// -// 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : DirectedBoundingBox.cxx -// Created : Mon Apr 12 14:41:22 2010 -// Author : Edward AGAPOV (eap) - - -#include "DirectedBoundingBox.hxx" - -#include "InterpolationUtils.hxx" - -#define __TENSOR(i,j) tensor[(i)*_dim+(j)] -#define __AXIS(i) (&_axes[(i)*_dim]) -#define __MIN(i) _minmax[i*2] -#define __MAX(i) _minmax[i*2+1] -#define __MYID (long(this)%10000) -#define __DMP(msg) \ - //cout << msg << endl - -using namespace std; - -namespace -{ - //================================================================================ - /*! - * \brief Add point coordinates to inertia tensor in 3D space - */ - //================================================================================ - - inline void addPointToInertiaTensor3D(const double* coord, - const double* gc, - vector& tensor) - { - // we fill the upper triangle of tensor only - const int _dim = 3; - double x = coord[0] - gc[0], y = coord[1] - gc[1], z = coord[2] - gc[2]; - __TENSOR(0,0) += y*y + z*z; - __TENSOR(1,1) += x*x + z*z; - __TENSOR(2,2) += x*x + y*y; - __TENSOR(0,1) -= x*y; - __TENSOR(0,2) -= x*z; - __TENSOR(1,2) -= y*z; - } - //================================================================================ - /*! - * \brief Add point coordinates to inertia tensor in 2D space - */ - //================================================================================ - - inline void addPointToInertiaTensor2D(const double* coord, - const double* gc, - vector& tensor) - { - // we fill the upper triangle of tensor only - const int _dim = 2; - double x = coord[0] - gc[0], y = coord[1] - gc[1]; - __TENSOR(0,0) += y*y; - __TENSOR(1,1) += x*x; - __TENSOR(0,1) -= x*y; - } - - //================================================================================ - /*! - * \brief Find eigenvectors of tensor using Jacobi's method - */ - //================================================================================ - - bool JacobiEigenvectorsSearch( const int _dim, vector& tensor, vector& _axes) - { - if ( _dim == 3 ) - __DMP( "Tensor : {" - << "{ "<<__TENSOR(0,0) << ", "<<__TENSOR(0,1) << ", "<<__TENSOR(0,2) << "} " - << "{ "<<__TENSOR(1,0) << ", "<<__TENSOR(1,1) << ", "<<__TENSOR(1,2) << "} " - << "{ "<<__TENSOR(2,0) << ", "<<__TENSOR(2,1) << ", "<<__TENSOR(2,2) << "}} "); - else - __DMP( "Tensor : {" - << "{ "<<__TENSOR(0,0) << ", "<<__TENSOR(0,1) << "} " - << "{ "<<__TENSOR(1,0) << ", "<<__TENSOR(1,1) << "}} "); - - const int maxRot = 5*_dim*_dim; // limit on number of rotations - const double tol = 1e-9; - - // set _axes to identity - int i,j; - for ( i = 0; i < _dim; ++i ) - for ( j = 0; j < _dim; ++j ) - __AXIS(i)[j] = ( i==j ? 1. : 0 ); - - bool solved = false; - for ( int iRot = 0; iRot < maxRot; ++ iRot ) - { - // find max off-diagonal element of the tensor - int k = 0, l = 0; - double max = 0.; - for ( i = 0; i < _dim-1; ++i ) - for ( j = i+1; j < _dim; ++j ) - if ( fabs( __TENSOR(i,j)) > max ) - max = fabs( __TENSOR(i,j) ), k = i, l = j; - solved = ( max < tol ); - if ( solved ) - break; - - // Rotate to make __TENSOR(k,l) == 0 - - double diff = __TENSOR(l,l) - __TENSOR(k,k); - double t; // tangent of rotation angle - if ( fabs(__TENSOR(k,l)) < abs(diff)*1.0e-36) - { - t = __TENSOR(k,l)/diff; - } - else - { - double phi = diff/(2.0*__TENSOR(k,l)); - t = 1.0/(abs(phi) + sqrt(phi*phi + 1.0)); - if ( phi < 0.0) t = -t; - } - double c = 1.0/sqrt(t*t + 1.0); // cosine of rotation angle - double s = t*c; // sine of rotation angle - double tau = s/(1.0 + c); - __TENSOR(k,k) -= t*__TENSOR(k,l); - __TENSOR(l,l) += t*__TENSOR(k,l); - __TENSOR(k,l) = 0.0; - -#define __ROTATE(T,r1,c1,r2,c2) \ -{ \ -int i1 = r1*_dim+c1, i2 = r2*_dim+c2; \ -double t1 = T[i1], t2 = T[i2]; \ -T[i1] -= s * ( t2 + tau * t1);\ -T[i2] += s * ( t1 - tau * t2);\ -} - for ( i = 0; i < k; ++i ) // Case of i < k - __ROTATE(tensor, i,k,i,l); - - for ( i = k+1; i < l; ++i ) // Case of k < i < l - __ROTATE(tensor, k,i,i,l); - - for ( i = l + 1; i < _dim; ++i ) // Case of i > l - __ROTATE(tensor, k,i,l,i); - - for ( i = 0; i < _dim; ++i ) // Update transformation matrix - __ROTATE(_axes, i,k,i,l); - } - - __DMP( "Solved = " << solved ); - if ( _dim == 3 ) { - __DMP( " Eigen " << __TENSOR(0,0)<<", "<<__TENSOR(1,1)<<", "<<__TENSOR(2,2) ); - for ( int i=0; i <3; ++i ) - __DMP( i << ": " << __AXIS(i)[0] << ", " << __AXIS(i)[1] << ", " << __AXIS(i)[2] ); - } - else { - __DMP( " Eigen " << __TENSOR(0,0) << ", " << __TENSOR(1,1) ); - for ( int i=0; i <2; ++i ) - __DMP( i << ": " << __AXIS(i)[0] << ", " << __AXIS(i)[1] ); - } - - return solved; - } - - //================================================================================ - /*! - * \brief Return true if two minmaxes do not intersect - */ - //================================================================================ - - inline bool isMinMaxOut(const double* minmax1, - const double* minmax2, - int dim) - { - for ( int i = 0; i < dim; ++i ) - { - if ( minmax1[i*2] > minmax2[i*2+1] || - minmax1[i*2+1] < minmax2[i*2] ) - return true; - } - return false; - } - -} // noname namespace - -namespace INTERP_KERNEL -{ - - //================================================================================ - /*! - * \brief Creates empty box intended to further initalization via setData() - */ - //================================================================================ - - DirectedBoundingBox::DirectedBoundingBox():_dim(0) - { - } - - //================================================================================ - /*! - * \brief Creates bounding box of a mesh - * \param pts - coordinates of points in full interlace - * \param numPts - number of points in the mesh - * \param dim - space dimension - */ - //================================================================================ - - DirectedBoundingBox::DirectedBoundingBox(const double* pts, - const unsigned numPts, - const unsigned dim) - : _dim(dim), _axes(dim*dim), _minmax(2*dim) - { - // init box extremities - for ( unsigned i = 0; i < _dim; ++i ) - _minmax[1+i*2] = -numeric_limits::max(), - _minmax[i*2] = numeric_limits::max(); - - if ( numPts < 1 ) return; - - __DMP( "DirectedBoundingBox " << __MYID ); - - const double* coord = pts; - const double* coordEnd = coord + numPts * dim; - - // compute gravity center of points - double gc[3] = {0,0,0}; - if ( dim > 1 ) - { - for ( coord = pts; coord < coordEnd; ) - for ( int i = 0; i < dim; ++i ) - gc[i] += *coord++; - for ( int j = 0; j < dim; ++j ) - gc[j] /= numPts; - - } - - // compute axes and box extremities - vector tensor( dim * dim, 0.); - switch ( dim ) - { - case 3: - for ( coord = pts; coord < coordEnd; coord += dim ) - addPointToInertiaTensor3D( coord, gc, tensor ); - - //computeAxes3D(tensor); - JacobiEigenvectorsSearch(_dim, tensor, _axes); - - for ( coord = pts; coord < coordEnd; coord += dim ) - addPointToBox( coord ); - - break; - - case 2: - for ( coord = pts; coord < coordEnd; coord += dim ) - addPointToInertiaTensor2D( coord, gc, tensor ); - - //computeAxes2D(tensor); - JacobiEigenvectorsSearch(_dim, tensor, _axes); - - for ( coord = pts; coord < coordEnd; coord += dim ) - addPointToBox( coord ); - - break; - - default: - for ( coord = pts; coord < coordEnd; coord += dim ) - { - if ( *coord < _minmax[0] ) _minmax[0] = *coord; - if ( *coord > _minmax[1] ) _minmax[1] = *coord; - } - } - } - - //================================================================================ - /*! - * \brief Creates bounding box of an element - * \param pts - coordinates of points of element - * \param numPts - number of points in the element - * \param dim - space dimension - */ - //================================================================================ - - DirectedBoundingBox::DirectedBoundingBox(const double** pts, - const unsigned numPts, - const unsigned dim) - : _dim(dim), _axes(dim*dim), _minmax(2*dim) - { - // init box extremities - for ( unsigned i = 0; i < _dim; ++i ) - _minmax[1+i*2] = -numeric_limits::max(), - _minmax[i*2] = numeric_limits::max(); - - if ( numPts < 1 ) return; - - __DMP( "DirectedBoundingBox " << __MYID ); - - // compute gravity center of points - double gc[3] = {0,0,0}; - if ( dim > 1 ) - { - for ( unsigned i = 0; i < numPts; ++i ) - for ( int j = 0; j < dim; ++j ) - gc[j] += pts[i][j]; - for ( int j = 0; j < dim; ++j ) - gc[j] /= numPts; - } - - // compute axes and box extremities - vector tensor( dim * dim, 0.); - switch ( dim ) - { - case 3: - for ( unsigned i = 0; i < numPts; ++i ) - addPointToInertiaTensor3D( pts[i], gc, tensor ); - - //computeAxes3D(tensor); - JacobiEigenvectorsSearch(_dim, tensor, _axes); - - for ( unsigned i = 0; i < numPts; ++i ) - addPointToBox( pts[i] ); - - break; - case 2: - for ( unsigned i = 0; i < numPts; ++i ) - addPointToInertiaTensor2D( pts[i], gc, tensor ); - - //computeAxes2D(tensor); - JacobiEigenvectorsSearch(_dim, tensor, _axes); - - for ( unsigned i = 0; i < numPts; ++i ) - addPointToBox( pts[i] ); - - break; - default: - for ( unsigned i = 0; i < numPts; ++i ) - { - if ( pts[i][0] < _minmax[0] ) _minmax[0] = pts[i][0]; - if ( pts[i][0] > _minmax[1] ) _minmax[1] = pts[i][0]; - } - } - } - - //================================================================================ - /*! - * \brief Compute eigenvectors of inertia tensor - */ - //================================================================================ - - // void DirectedBoundingBox::computeAxes3D(const std::vector& tensor) -// { -// // compute principal moments of inertia which are eigenvalues of the tensor -// double eig[3]; -// { -// // coefficients of polynomial equation det(tensor-eig*I) = 0 -// double a = -1; -// double b = __TENSOR(0,0)+__TENSOR(1,1)+__TENSOR(2,2); -// double c = -// __TENSOR(0,1)*__TENSOR(0,1) + -// __TENSOR(0,2)*__TENSOR(0,2) + -// __TENSOR(1,2)*__TENSOR(1,2) - -// __TENSOR(0,0)*__TENSOR(1,1) - -// __TENSOR(0,0)*__TENSOR(2,2) - -// __TENSOR(1,1)*__TENSOR(2,2); -// double d = -// __TENSOR(0,0)*__TENSOR(1,1)*__TENSOR(2,2) - -// __TENSOR(0,0)*__TENSOR(1,2)*__TENSOR(1,2) - -// __TENSOR(1,1)*__TENSOR(0,2)*__TENSOR(0,2) - -// __TENSOR(2,2)*__TENSOR(0,1)*__TENSOR(0,1) + -// __TENSOR(0,1)*__TENSOR(0,2)*__TENSOR(1,2)*2; - -// // find eigenvalues which are roots of characteristic polynomial -// double x = (3*c/a - b*b/(a*a))/3; -// double y = (2*b*b*b/(a*a*a) - 9*b*c/(a*a) + 27*d/a)/27; -// double z = y*y/4 + x*x*x/27; - -// double i = sqrt(y*y/4 - z) + 1e-300; -// double j = -pow(i,1/3.); -// double y2 = -y/(2*i); -// if ( y2 > 1.0) y2 = 1.; else if ( y2 < -1.0) y2 = -1.; -// double k = acos(y2); -// double m = cos(k/3); -// double n = sqrt(3)*sin(k/3); -// double p = -b/(3*a); - -// eig[0] = -2*j*m + p; -// eig[1] = j *(m + n) + p; -// eig[2] = j *(m - n) + p; -// } -// // compute eigenvector of the tensor at each eigenvalue -// // by solving system [tensor-eig*I]*[axis] = 0 -// bool ok = true; -// __DMP( "Tensor : {" -// << "{ "<<__TENSOR(0,0) << ", "<<__TENSOR(0,1) << ", "<<__TENSOR(0,2) << "} " -// << "{ "<<__TENSOR(1,0) << ", "<<__TENSOR(1,1) << ", "<<__TENSOR(1,2) << "} " -// << "{ "<<__TENSOR(2,0) << ", "<<__TENSOR(2,1) << ", "<<__TENSOR(2,2) << "}} "); -// for ( int i = 0; i < 3 && ok; ++i ) // loop on 3 eigenvalues -// { -// // [tensor-eig*I] -// double T[3][3]= -// {{ __TENSOR(0,0)-eig[i],__TENSOR(0,1), __TENSOR(0,2), }, -// { __TENSOR(0,1), __TENSOR(1,1)-eig[i],__TENSOR(1,2), }, -// { __TENSOR(0,2), __TENSOR(1,2), __TENSOR(2,2)-eig[i]}}; -// // The determinant of T is zero, so that the equations are not linearly independent. -// // Therefore, we assign an arbitrary value (1.) to i-th component of eigenvector -// // and use two of the equations to compute the other two components -// double M[2][3], sol[2]; -// for ( int j = 0, c = 0; j < 3; ++j ) -// if ( i == j ) -// M[0][2] = -T[0][j], M[1][2] = -T[1][j]; -// else -// M[0][c] = T[0][j], M[1][c] = T[1][j], c++; - -// ok = solveSystemOfEquations<2>( M, sol ); - -// double* eigenVec = __AXIS(i); -// for ( int j = 0, c = 0; j < 3; ++j ) -// eigenVec[j] = ( i == j ) ? 1. : sol[c++]; - -// // normilize -// double size = sqrt(eigenVec[0]*eigenVec[0] + -// eigenVec[1]*eigenVec[1] + -// eigenVec[2]*eigenVec[2] ); -// if ((ok = (size > numeric_limits::min() ))) -// { -// eigenVec[0] /= size; -// eigenVec[1] /= size; -// eigenVec[2] /= size; -// } -// } -// if ( !ok ) -// { -// __DMP( " solve3EquationSystem() - KO " ); -// _axes = vector( _dim*_dim, 0); -// __AXIS(0)[0] = __AXIS(1)[1] = __AXIS(2)[2] = 1.; -// } -// __DMP( " Eigen " << eig[0] << ", " << eig[1] << ", " << eig[2] ); -// for ( int i=0; i <3; ++i ) -// __DMP( i << ": " << __AXIS(i)[0] << ", " << __AXIS(i)[1] << ", " << __AXIS(i)[2] ); - -// double* a0 = __AXIS(0), *a1 = __AXIS(1); -// double cross[3] = { a0[1]*a1[2]-a1[1]*a0[2], -// a0[2]*a1[0]-a1[2]*a0[0], -// a0[0]*a1[1]-a1[0]*a0[1] }; -// __DMP( " Cross a1^a2 " << cross[0] << ", " << cross[1] << ", " << cross[2] ); -// } - - //================================================================================ - /*! - * \brief Compute eigenvectors of inertia tensor - */ - //================================================================================ - - // void DirectedBoundingBox::computeAxes2D(const std::vector& tensor) -// { -// // compute principal moments of inertia which are eigenvalues of the tensor -// // by solving square equation det(tensor-eig*I) -// double X = (__TENSOR(0,0)+__TENSOR(1,1))/2; -// double Y = sqrt(4*__TENSOR(0,1)*__TENSOR(0,1) + -// (__TENSOR(0,0)-__TENSOR(1,1)) * (__TENSOR(0,0)-__TENSOR(1,1)))/2; -// double eig[2] = -// { -// X + Y, -// X - Y -// }; -// // compute eigenvector of the tensor at each eigenvalue -// // by solving system [tensor-eig*I]*[axis] = 0 -// bool ok = true; -// for ( int i = 0; i < 2 && ok; ++i ) -// { -// // [tensor-eig*I] -// double T[2][2]= -// {{ __TENSOR(0,0)-eig[i],__TENSOR(0,1) }, -// { __TENSOR(0,1), __TENSOR(1,1)-eig[i] }}; - -// // The determinant of T is zero, so that the equations are not linearly independent. -// // Therefore, we assign an arbitrary value (1.) to i-th component of eigenvector -// // and use one equation to compute the other component -// double* eigenVec = __AXIS(i); -// eigenVec[i] = 1.; -// int j = 1-i; -// if ((ok = ( fabs( T[j][j] ) > numeric_limits::min() ))) -// eigenVec[j] = -T[j][i] / T[j][j]; -// } -// if ( !ok ) -// { -// _axes = vector( _dim*_dim, 0); -// __AXIS(0)[0] = __AXIS(1)[1] = 1.; -// } -// } - - //================================================================================ - /*! - * \brief Convert point coordinates into local coordinate system of the box - */ - //================================================================================ - - void DirectedBoundingBox::toLocalCS(const double* p, double* pLoc) const - { - switch ( _dim ) - { - case 3: - pLoc[0] = dotprod<3>( p, __AXIS(0)); - pLoc[1] = dotprod<3>( p, __AXIS(1)); - pLoc[2] = dotprod<3>( p, __AXIS(2)); - break; - case 2: - pLoc[0] = dotprod<2>( p, __AXIS(0)); - pLoc[1] = dotprod<2>( p, __AXIS(1)); - break; - default: - pLoc[0] = p[0]; - } - } - - //================================================================================ - /*! - * \brief Convert point coordinates from local coordinate system of the box to global CS - */ - //================================================================================ - - void DirectedBoundingBox::fromLocalCS(const double* p, double* pGlob) const - { - switch ( _dim ) - { - case 3: - pGlob[0] = p[0] * __AXIS(0)[0] + p[1] * __AXIS(1)[0] + p[2] * __AXIS(2)[0]; - pGlob[1] = p[0] * __AXIS(0)[1] + p[1] * __AXIS(1)[1] + p[2] * __AXIS(2)[1]; - pGlob[2] = p[0] * __AXIS(0)[2] + p[1] * __AXIS(1)[2] + p[2] * __AXIS(2)[2]; - break; - case 2: - pGlob[0] = p[0] * __AXIS(0)[0] + p[1] * __AXIS(1)[0]; - pGlob[1] = p[0] * __AXIS(0)[1] + p[1] * __AXIS(1)[1]; - break; - default: - pGlob[0] = p[0]; - } - } - - //================================================================================ - /*! - * \brief Enlarge box size by given value - */ - //================================================================================ - - void DirectedBoundingBox::enlarge(const double tol) - { - for ( unsigned i = 0; i < _dim; ++i ) - __MIN(i) -= tol, __MAX(i) += tol; - } - - //================================================================================ - /*! - * \brief Return coordinates of corners of bounding box - */ - //================================================================================ - - void DirectedBoundingBox::getCorners(std::vector& corners, - const double* minmax) const - { - int iC, nbCorners = 1; - for ( int i=0;i<_dim;++i ) nbCorners *= 2; - corners.resize( nbCorners * _dim ); - // each coordinate is filled with either min or max, nbSwap is number of corners - // after which min and max swap - int nbSwap = nbCorners/2; - for ( unsigned i = 0; i < _dim; ++i ) - { - iC = 0; - while ( iC < nbCorners ) - { - for (int j = 0; j < nbSwap; ++j, ++iC ) corners[iC*_dim+i] = minmax[i*2]; - for (int j = 0; j < nbSwap; ++j, ++iC ) corners[iC*_dim+i] = minmax[i*2+1]; - } - nbSwap /= 2; - } - } - - //================================================================================ - /*! - * \brief Test if this box intersects with the other - * \retval bool - true if there is no intersection - */ - //================================================================================ - - bool DirectedBoundingBox::isDisjointWith(const DirectedBoundingBox& box) const - { - if ( _dim < 1 || box._dim < 1 ) return false; // empty box includes all - - // boxes are disjoined if their minmaxes in local CS of either of boxes do not intersect - for ( int isThisCS = 0; isThisCS < 2; ++isThisCS ) - { - const DirectedBoundingBox* axisBox = isThisCS ? this : &box; - const DirectedBoundingBox* cornerBox = isThisCS ? &box : this; - - // find minmax of cornerBox in the CS of axisBox - - DirectedBoundingBox mmBox((double*)0,0,_dim); //!< empty box with CS == axisBox->_axes - mmBox._axes = axisBox->_axes; - - vector corners; - getCorners( corners, &cornerBox->_minmax[0] ); - - double globCorner[3]; - for ( int iC = 0, nC = corners.size()/_dim; iC < nC; ++iC) - { - cornerBox->fromLocalCS( &corners[iC*_dim], globCorner ); - mmBox.addPointToBox( globCorner ); - } - if ( isMinMaxOut( &mmBox._minmax[0], &axisBox->_minmax[0], _dim )) - return true; - } - return false; - } - - //================================================================================ - /*! - * \brief Test if this box intersects with an non-directed box - * \retval bool - true if there is no intersection - */ - //================================================================================ - - bool DirectedBoundingBox::isDisjointWith(const double* box) const - { - if ( _dim < 1 ) return false; // empty box includes all - - // boxes are disjoined if their minmaxes in local CS of either of boxes do not intersect - - // compare minmaxes in locals CS of this directed box - { - vector cornersOther; - getCorners( cornersOther, box ); - DirectedBoundingBox mmBox((double*)0,0,_dim); //!< empty box with CS == this->_axes - mmBox._axes = this->_axes; - for ( int iC = 0, nC = cornersOther.size()/_dim; iC < nC; ++iC) - mmBox.addPointToBox( &cornersOther[iC*_dim] ); - - if ( isMinMaxOut( &mmBox._minmax[0], &this->_minmax[0], _dim )) - return true; - } - - // compare minmaxes in global CS - { - vector cornersThis; - getCorners( cornersThis, &_minmax[0] ); - DirectedBoundingBox mmBox((double*)0,0,_dim); //!< initailized _minmax - double globCorner[3]; - for ( int iC = 0, nC = cornersThis.size()/_dim; iC < nC; ++iC) - { - fromLocalCS( &cornersThis[iC*_dim], globCorner ); - for ( int i = 0; i < _dim; ++i ) - { - if ( globCorner[i] < mmBox._minmax[i*2] ) mmBox._minmax[i*2] = globCorner[i]; - if ( globCorner[i] > mmBox._minmax[i*2+1] ) mmBox._minmax[i*2+1] = globCorner[i]; - } - } - if ( isMinMaxOut( &mmBox._minmax[0], box, _dim )) - return true; - } - return false; - } - - //================================================================================ - /*! - * \brief Return true if given point is out of this box - */ - //================================================================================ - - bool DirectedBoundingBox::isOut(const double* point) const - { - if ( _dim < 1 ) return false; // empty box includes all - - double pLoc[3]; - toLocalCS( point, pLoc ); - bool out = isLocalOut( pLoc ); -#ifdef _DEBUG_ - switch (_dim) - { - case 3: - __DMP(__MYID<<": "< DirectedBoundingBox::getData() const - { - vector data(1, _dim); - if ( _dim > 0 ) - { - data.insert( data.end(), &_axes[0], &_axes[0] + _axes.size()); - data.insert( data.end(), &_minmax[0], &_minmax[0] + _minmax.size()); - } - if ( data.size() < dataSize( _dim )) - data.resize( dataSize( _dim ), 0 ); - return data; - } - - //================================================================================ - /*! - * \brief Initializes self with data retrieved via getData() - */ - //================================================================================ - - void DirectedBoundingBox::setData(const double* data) - { - _dim = unsigned( *data++ ); - if ( _dim > 0 ) - { - _axes.assign( data, data+_dim*_dim ); data += _dim*_dim; - _minmax.assign( data, data+2*_dim ); - } - else - { - _axes.clear(); - _minmax.clear(); - } - } - - //================================================================================ - /*! - * \brief Return size of internal data returned by getData() depending on space dim - */ - //================================================================================ - - int DirectedBoundingBox::dataSize(int dim) - { - return 1 + dim*dim + 2*dim; // : _dim + _axes + _minmax - } -} diff --git a/src/INTERP_KERNEL/DirectedBoundingBox.hxx b/src/INTERP_KERNEL/DirectedBoundingBox.hxx deleted file mode 100644 index 93874acdb..000000000 --- a/src/INTERP_KERNEL/DirectedBoundingBox.hxx +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (C) 2009-2010 OPEN CASCADE -// -// 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __DirectedBoundingBox_HXX__ -#define __DirectedBoundingBox_HXX__ - -#include "INTERPKERNELDefines.hxx" - -#include - -namespace INTERP_KERNEL -{ - - /** - * \brief Class representing the bounding box of a number of points - * with box axes parallel to principal axes of inertia of points - */ - class INTERPKERNEL_EXPORT DirectedBoundingBox - { - public: - - DirectedBoundingBox(); - - DirectedBoundingBox(const double* pts, const unsigned numPts, const unsigned dim); - - DirectedBoundingBox(const double** pts, const unsigned numPts, const unsigned dim); - - //~DirectedBoundingBox(); - - void enlarge(const double tol); - - bool isDisjointWith(const DirectedBoundingBox& box) const; - - bool isDisjointWith(const double* box) const; - - bool isOut(const double* point) const; - - - // return internal data - std::vector getData() const; - - // initialize with data returned by getData() - void setData(const double* data); - - // return size of internal data - static int dataSize(int dim); - - private: - - //void computeAxes3D(const std::vector& tensor); - - //void computeAxes2D(const std::vector& tensor); - - inline void addPointToBox(const double* coord); - - void toLocalCS(const double* p, double* pLoc) const; - - void fromLocalCS(const double* p, double* pGlob) const; - - inline bool isLocalOut(const double* pLoc) const; - - void getCorners(std::vector& corners, const double* minmax) const; - - unsigned _dim; - - std::vector _axes; //!< principal axes of inertia in full interlace - std::vector _minmax; //!< pairs of min an max coordinates along the axes - - }; - - //================================================================================ - /*! - * \brief Test point in local CS against box extremities - * - */ - //================================================================================ - - inline bool DirectedBoundingBox::isLocalOut(const double* pLoc) const - { - for ( int i = 0; i < _dim; ++i ) - if ( pLoc[i] < _minmax[i*2] || pLoc[i] > _minmax[i*2+1] ) - return true; - return false; - } - - //================================================================================ - /*! - * \brief Update box extremities - */ - //================================================================================ - - inline void DirectedBoundingBox::addPointToBox(const double* coord) - { - for ( int i = 0; i < _dim; ++i ) - { - double c = 0; - for ( int j = 0; j < _dim; ++j ) c += coord[j]*_axes[i*_dim+j]; - if ( c < _minmax[i*2] ) _minmax[i*2] = c; - if ( c > _minmax[i*2+1] ) _minmax[i*2+1] = c; - } - } -} -#endif diff --git a/src/INTERP_KERNEL/ExprEval/INTERPKERNELEXPREVALDefines.hxx b/src/INTERP_KERNEL/ExprEval/INTERPKERNELEXPREVALDefines.hxx deleted file mode 100644 index 8dbfa17f8..000000000 --- a/src/INTERP_KERNEL/ExprEval/INTERPKERNELEXPREVALDefines.hxx +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __INTERPKERNELEXPREVALDEFINES_HXX__ -#define __INTERPKERNELEXPREVALDEFINES_HXX__ - -//export symbols -// #ifdef WIN32 -// # if defined INTERPKERNELEXPREVAL_EXPORTS || defined interpkernelexpreval_EXPORTS -// # define INTERPKERNELEXPREVAL_EXPORT __declspec(dllexport) -// # else -// # define INTERPKERNELEXPREVAL_EXPORT __declspec(dllimport) -// # endif -// #else -// # define INTERPKERNELEXPREVAL_EXPORT -// #endif - -#define INTERPKERNELEXPREVAL_EXPORT - -#ifdef WNT -#pragma warning( disable : 4290 ) // See http://msdn.microsoft.com/en-us/library/sa28fef8%28VS.80%29.aspx -#endif - - -#endif diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.cxx b/src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.cxx deleted file mode 100644 index 5dde84961..000000000 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.cxx +++ /dev/null @@ -1,693 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "InterpKernelExprParser.hxx" -#include "InterpKernelValue.hxx" - -#include -#include -#include -#include -#include - -using namespace INTERP_KERNEL; - -const char LeafExprVar::END_OF_RECOGNIZED_VAR[]="Vec"; - -const char ExprParser::WHITE_SPACES[]=" \n"; - -const char ExprParser::EXPR_PARSE_ERR_MSG[]="Invalid expression detected : "; - -LeafExpr *LeafExpr::buildInstanceFrom(const std::string& expr) throw(INTERP_KERNEL::Exception) -{ - std::istringstream stream; - stream.str(expr); - double val; - stream >> val; - if(!stream.fail()) - if(stream.eof()) - return new LeafExprVal(val); - else - { - std::ostringstream errMsg; - char MSGTYP6[]="Error following expression is not consedered as a double value : "; - errMsg << MSGTYP6 << expr; - throw INTERP_KERNEL::Exception(errMsg.str().c_str()); - } - else - return new LeafExprVar(expr); -} - -LeafExpr::~LeafExpr() -{ -} - -LeafExprVal::LeafExprVal(double value):_value(value) -{ -} - -LeafExprVal::~LeafExprVal() -{ -} - -void LeafExprVal::fillValue(Value *val) const throw(INTERP_KERNEL::Exception) -{ - val->setDouble(_value); -} - -LeafExprVar::LeafExprVar(const std::string& var):_fast_pos(-1),_var_name(var) -{ -} - -void LeafExprVar::fillValue(Value *val) const throw(INTERP_KERNEL::Exception) -{ - val->setVarname(_fast_pos,_var_name); -} - -void LeafExprVar::prepareExprEvaluation(const std::vector& vars) const throw(INTERP_KERNEL::Exception) -{ - std::vector::const_iterator iter=std::find(vars.begin(),vars.end(),_var_name); - if(iter==vars.end()) - { - if(!isRecognizedKeyVar(_var_name,_fast_pos)) - { - std::ostringstream oss; oss << "Var : " << _var_name << " not in : "; - std::copy(vars.begin(),vars.end(),std::ostream_iterator(oss,", ")); - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } - return; - } - _fast_pos=iter-vars.begin(); -} - -void LeafExprVar::prepareExprEvaluationVec() const throw(INTERP_KERNEL::Exception) -{ - if(!isRecognizedKeyVar(_var_name,_fast_pos)) - _fast_pos=-2; -} - -bool LeafExprVar::isRecognizedKeyVar(const std::string& var, int& pos) -{ - if(var.length()!=sizeof(END_OF_RECOGNIZED_VAR)) - return false; - std::string end=var.substr(1); - if(end!=END_OF_RECOGNIZED_VAR) - return false; - char first=var[0]; - if(first<'I' || first>'Z') - return false; - pos=-7-(first-'I'); - return true; -} - -LeafExprVar::~LeafExprVar() -{ -} - -ExprParser::ExprParser(const char *expr):_is_parsed(false),_leaf(0),_is_parsing_ok(false),_expr(expr) -{ -} - -//! For \b NOT null terminated strings coming from FORTRAN. -ExprParser::ExprParser(const char *expr, int lgth):_is_parsed(false),_leaf(0),_is_parsing_ok(false) -{ - _expr=buildStringFromFortran(expr,lgth); -} - -ExprParser::~ExprParser() -{ - delete _leaf; - releaseFunctions(); -} - -std::size_t ExprParser::findCorrespondingOpenBracket(const std::string& expr, std::size_t posOfCloseBracket) -{ - int level=0; - for(std::size_t iter=posOfCloseBracket-1;iter>=0;iter--) - if(expr[iter]==')') - level++; - else if(expr[iter]=='(') - { - if(level==0) - return iter; - else - level--; - } - return std::string::npos; -} - -std::string ExprParser::buildStringFromFortran(const char *expr, int lgth) -{ - std::string ret(expr,lgth); - std::string whiteSpaces(WHITE_SPACES); - std::size_t found=ret.find_last_not_of(whiteSpaces); - if (found!=std::string::npos) - ret.erase(found+1); - else - ret.clear();//ret is all whitespace - return ret; -} - -std::string ExprParser::deleteWhiteSpaces(const std::string& expr) -{ - std::string ret(expr); - std::string whiteSpaces(WHITE_SPACES); - std::size_t where1=0,where2=0; - while(where2!=std::string::npos && where1!=std::string::npos) - { - where1=ret.find_first_of(whiteSpaces.c_str(),where1,whiteSpaces.length()); - if(where1!=std::string::npos) - { - where2=ret.find_first_not_of(whiteSpaces,where1); - if(where2!=std::string::npos) - ret.erase(ret.begin()+where1,ret.begin()+where2); - else - ret.erase(ret.begin()+where1,ret.end()); - } - } - return ret; -} - -void ExprParser::parse() throw(INTERP_KERNEL::Exception) -{ - _is_parsed=true; - _is_parsing_ok=false; - _sub_expr.clear(); - releaseFunctions(); - if(!_expr.empty()) - { - checkBracketsParity(); - if(!simplify()) - parseDeeper(); - } - _is_parsing_ok=true; -} - -double ExprParser::evaluate() const throw(INTERP_KERNEL::Exception) -{ - Value *gen=new ValueDouble; - ValueDouble *res=(ValueDouble *)evaluateLowLev(gen); - delete gen; - double ret=res->getData(); - delete res; - return ret; -} - -DecompositionInUnitBase ExprParser::evaluateUnit() const throw(INTERP_KERNEL::Exception) -{ - Value *gen=new ValueUnit; - ValueUnit *res=0; - try - { - res=(ValueUnit *)evaluateLowLev(gen); - } - catch(INTERP_KERNEL::Exception& e) - { - delete gen; - throw e; - } - delete gen; - DecompositionInUnitBase ret=res->getData(); - delete res; - return ret; -} - -void ExprParser::evaluateExpr(int szOfOutParam, double *outParam, const double *inParam) const throw(INTERP_KERNEL::Exception) -{ - Value *gen=new ValueDoubleExpr(szOfOutParam,inParam); - ValueDoubleExpr *res=0; - try - { - res=(ValueDoubleExpr *)evaluateLowLev(gen); - } - catch(INTERP_KERNEL::Exception& e) - { - delete gen; - throw e; - } - delete gen; - std::copy(res->getData(),res->getData()+szOfOutParam,outParam); - delete res; -} - -void ExprParser::prepareExprEvaluation(const std::vector& vars) const throw(INTERP_KERNEL::Exception) -{ - if(_leaf) - { - LeafExprVar *leafC=dynamic_cast(_leaf); - if(leafC) - leafC->prepareExprEvaluation(vars); - } - else - for(std::list::const_iterator iter=_sub_expr.begin();iter!=_sub_expr.end();iter++) - (*iter).prepareExprEvaluation(vars); -} - -void ExprParser::prepareExprEvaluationVec() const throw(INTERP_KERNEL::Exception) -{ - std::set trueVars; - getTrueSetOfVars(trueVars); - if(trueVars.size()>1) - { - std::ostringstream oss; oss << "For this type of evaluation only one not keyword variable authorized : "; - oss << "having " << trueVars.size() << " : "; - std::copy(trueVars.begin(),trueVars.end(),std::ostream_iterator(oss," ")); oss << " !"; - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } - prepareExprEvaluationVecLowLev(); -} - -void ExprParser::prepareExprEvaluationVecLowLev() const throw(INTERP_KERNEL::Exception) -{ - if(_leaf) - { - LeafExprVar *leafC=dynamic_cast(_leaf); - if(leafC) - leafC->prepareExprEvaluationVec(); - } - else - for(std::list::const_iterator iter=_sub_expr.begin();iter!=_sub_expr.end();iter++) - (*iter).prepareExprEvaluationVecLowLev(); -} - -Value *ExprParser::evaluateLowLev(Value *valGen) const throw(INTERP_KERNEL::Exception) -{ - if(!_is_parsing_ok) - throw INTERP_KERNEL::Exception("Parsing fails ! Invalid expression !"); - if(_sub_expr.empty() && !_leaf) - throw INTERP_KERNEL::Exception("Empty expression !"); - std::vector stackOfVal; - try - { - if(_leaf) - { - Value *ret=valGen->newInstance(); - try - { - _leaf->fillValue(ret); - } - catch(INTERP_KERNEL::Exception& e) - { - delete ret; - throw e; - } - stackOfVal.resize(1); - stackOfVal[0]=ret; - } - else - { - stackOfVal.resize(_sub_expr.size()); - std::vector::reverse_iterator iter2=stackOfVal.rbegin(); - for(std::list::const_iterator iter=_sub_expr.begin();iter!=_sub_expr.end();iter++,iter2++) - *iter2=(*iter).evaluateLowLev(valGen); - } - std::list::const_iterator iter3; - for(iter3=_func_btw_sub_expr.begin();iter3!=_func_btw_sub_expr.end();iter3++) - (*iter3)->operate(stackOfVal); - } - catch(INTERP_KERNEL::Exception& e) - { - for(std::vector::iterator iter4=stackOfVal.begin();iter4!=stackOfVal.end();iter4++) - delete *iter4; - throw e; - } - return stackOfVal.back(); -} - -void ExprParser::getSetOfVars(std::set& vars) const -{ - if(_leaf) - { - LeafExprVar *leafC=dynamic_cast(_leaf); - if(leafC) - vars.insert(leafC->getVar()); - } - else - for(std::list::const_iterator iter=_sub_expr.begin();iter!=_sub_expr.end();iter++) - (*iter).getSetOfVars(vars); -} - -void ExprParser::getTrueSetOfVars(std::set& trueVars) const -{ - std::set vars; - getSetOfVars(vars); - trueVars.clear(); - for(std::set::const_iterator iter=vars.begin();iter!=vars.end();iter++) - { - int tmp; - if(!LeafExprVar::isRecognizedKeyVar(*iter,tmp)) - trueVars.insert(*iter); - } -} - -void ExprParser::parseDeeper() throw(INTERP_KERNEL::Exception) -{ - for(std::list::iterator iter=_sub_expr.begin();iter!=_sub_expr.end();iter++) - if(!(*iter).simplify()) - (*iter).parseDeeper(); -} - -/*! - * This method has the responsability to see if this->_expr can be seen as a unary function of something. - * Something defined as the contain of highest level barckets. - * Typically '(3*x+2)' and 'cos(4*l+p*n)' will be intercepted by this method whereas '3*x+2' not...etc.. - */ -void ExprParser::parseUnaryFunc() throw(INTERP_KERNEL::Exception) -{ - if(_expr[_expr.length()-1]!=')') - return ; - //at this level of code _expr - std::size_t pos1=_expr.find_first_of('('); - std::size_t pos4=findCorrespondingOpenBracket(_expr,_expr.length()-1); - if(pos4!=pos1) - return ; - std::string funcName=_expr.substr(0,pos1); - std::size_t pos2=funcName.find_first_of("+-*/^",0,5); - std::size_t pos3=funcName.find_first_not_of("+-*/^",0,5); - if(pos2!=std::string::npos && pos3!=std::string::npos) - return ;//Bracket group is not alone, can't conclude not recursively. - std::string newExp2=_expr.substr(pos1+1,_expr.length()-pos1-2); - int nbOfParamsInFunc=std::count(newExp2.begin(),newExp2.end(),',')+1; - if(pos3!=std::string::npos) - _func_btw_sub_expr.push_back(FunctionsFactory::buildFuncFromString(funcName.c_str(),nbOfParamsInFunc)); - else - { - int lgth=funcName.length(); - char tmp[2]; tmp[1]='\0'; - for(int i=0;i_expr is interpretable without any recursion. - * \return true if no recursion needed, false if this->_expr is too complex to be interpreted at this level. - * \throw exception if this->_expr is simple enough to try to interprate this and this expression contains an error. - */ -bool ExprParser::tryToInterpALeaf() throw(INTERP_KERNEL::Exception) -{ - std::size_t pos=_expr.find_first_not_of("+-",0,2); - std::string minimizedExpr=_expr.substr(pos); - std::size_t pos2=minimizedExpr.find_first_of("+-*/^()",0,7); - if(pos2!=std::string::npos) - return false; - delete _leaf; - _leaf=LeafExpr::buildInstanceFrom(minimizedExpr); - int nbOfNegs=0; - for(std::size_t i=0;i::iterator iter=_func_btw_sub_expr.begin();iter!=_func_btw_sub_expr.end();iter++) - delete *iter; - _func_btw_sub_expr.clear(); -} - -/*! - * This method parse this->_expr at the current level. - * This method first try to see if this->_expr is a leaf, if not it try a unary function of something (see INTERP_KERNEL::ExprParser::parseUnaryFunc method) - * If true is returned, no deeper parsing needed, if false is returned for a full parsing of this->_expr INTERP_KERNEL::ExprParser::parseDeeper call needed. - */ -bool ExprParser::simplify() throw(INTERP_KERNEL::Exception) -{ - if(tryToInterpALeaf()) - return true; - parseUnaryFunc(); - if(!_is_parsing_ok) - { - parseForAddMin(); - if(!_is_parsing_ok) - { - parseForMulDiv(); - if(!_is_parsing_ok) - parseForPow(); - } - } - if(!_is_parsing_ok) - { - std::ostringstream errMsg; - char MSGTYP3[]="Error in interpreting : "; - errMsg << EXPR_PARSE_ERR_MSG << MSGTYP3 << _expr; - locateError(errMsg,_expr,0); - throw INTERP_KERNEL::Exception(errMsg.str().c_str()); - } - return false; -} - -void ExprParser::checkBracketsParity() const throw(INTERP_KERNEL::Exception) -{ - std::string::const_iterator iter; - int curLevel=0; - for(iter=_expr.begin();iter!=_expr.end();iter++) - { - if(*iter=='(') - curLevel++; - else if(*iter==')') - { - if(curLevel==0) - { - std::ostringstream errMsg; - char MSGTYP1[]="Error in brackets : closing brackets ')' before openning '('"; - errMsg << EXPR_PARSE_ERR_MSG << MSGTYP1; - locateError(errMsg,_expr,iter-_expr.begin()); - throw INTERP_KERNEL::Exception(errMsg.str().c_str()); - } - curLevel--; - } - } - if(curLevel!=0) - { - std::ostringstream errMsg; - char MSGTYP2[]="Error in brackets : not finally closed expr."; - errMsg << EXPR_PARSE_ERR_MSG << MSGTYP2; - throw INTERP_KERNEL::Exception(errMsg.str().c_str()); - } -} - -void ExprParser::locateError(std::ostream& stringToDisp, const std::string& srcOfErr, int posOfErr) -{ - stringToDisp << "Position is " << posOfErr << " of string : \"" << srcOfErr << "\"" << std::endl; -} diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.hxx b/src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.hxx deleted file mode 100644 index 032f7070a..000000000 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.hxx +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __INTERPKERNELEXPRPARSER_HXX__ -#define __INTERPKERNELEXPRPARSER_HXX__ - -#include "INTERPKERNELEXPREVALDefines.hxx" -#include "InterpKernelUnit.hxx" -#include "InterpKernelException.hxx" -#include "InterpKernelFunction.hxx" - -#include -#include -#include -#include - -namespace INTERP_KERNEL -{ - class ValueDouble; - - class INTERPKERNELEXPREVAL_EXPORT LeafExpr - { - public: - virtual ~LeafExpr(); - virtual void fillValue(Value *val) const throw(INTERP_KERNEL::Exception) = 0; - static LeafExpr *buildInstanceFrom(const std::string& expr) throw(INTERP_KERNEL::Exception); - }; - - class INTERPKERNELEXPREVAL_EXPORT LeafExprVal : public LeafExpr - { - public: - LeafExprVal(double value); - ~LeafExprVal(); - void fillValue(Value *val) const throw(INTERP_KERNEL::Exception); - private: - double _value; - }; - - class INTERPKERNELEXPREVAL_EXPORT LeafExprVar : public LeafExpr - { - public: - LeafExprVar(const std::string& var); - ~LeafExprVar(); - void fillValue(Value *val) const throw(INTERP_KERNEL::Exception); - std::string getVar() const { return _var_name; } - void prepareExprEvaluation(const std::vector& vars) const throw(INTERP_KERNEL::Exception); - void prepareExprEvaluationVec() const throw(INTERP_KERNEL::Exception); - static bool isRecognizedKeyVar(const std::string& var, int& pos); - public: - static const char END_OF_RECOGNIZED_VAR[]; - private: - mutable int _fast_pos; - std::string _var_name; - }; - - class INTERPKERNELEXPREVAL_EXPORT ExprParser - { - public: - ExprParser(const char *expr); - ExprParser(const char *expr, int lgth); - ~ExprParser(); - void parse() throw(INTERP_KERNEL::Exception); - bool isParsingSuccessfull() const { return _is_parsing_ok; } - double evaluate() const throw(INTERP_KERNEL::Exception); - DecompositionInUnitBase evaluateUnit() const throw(INTERP_KERNEL::Exception); - void prepareExprEvaluation(const std::vector& vars) const throw(INTERP_KERNEL::Exception); - void evaluateExpr(int szOfOutParam, double *outParam, const double *inParam) const throw(INTERP_KERNEL::Exception); - void prepareExprEvaluationVec() const throw(INTERP_KERNEL::Exception); - void getSetOfVars(std::set& vars) const; - void getTrueSetOfVars(std::set& vars) const; - static std::string buildStringFromFortran(const char *expr, int lgth); - static std::string deleteWhiteSpaces(const std::string& expr); - private: - Value *evaluateLowLev(Value *valGen) const throw(INTERP_KERNEL::Exception); - private: - void prepareExprEvaluationVecLowLev() const throw(INTERP_KERNEL::Exception); - bool tryToInterpALeaf() throw(INTERP_KERNEL::Exception); - void parseUnaryFunc() throw(INTERP_KERNEL::Exception); - void parseForAddMin() throw(INTERP_KERNEL::Exception); - void parseForMulDiv() throw(INTERP_KERNEL::Exception); - void parseForPow() throw(INTERP_KERNEL::Exception); - void parseDeeper() throw(INTERP_KERNEL::Exception); - bool simplify() throw(INTERP_KERNEL::Exception); - void releaseFunctions(); - void checkBracketsParity() const throw(INTERP_KERNEL::Exception); - static std::size_t findCorrespondingOpenBracket(const std::string& expr, std::size_t posOfCloseBracket); - static void locateError(std::ostream& stringToDisp, const std::string& srcOfErr, int posOfErr); - private: - bool _is_parsed; - LeafExpr *_leaf; - bool _is_parsing_ok; - std::string _expr; - std::list _sub_expr; - std::list _func_btw_sub_expr; - private: - static const char WHITE_SPACES[]; - static const char EXPR_PARSE_ERR_MSG[]; - }; -} - -#endif diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelFunction.cxx b/src/INTERP_KERNEL/ExprEval/InterpKernelFunction.cxx deleted file mode 100644 index 6e8316526..000000000 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelFunction.cxx +++ /dev/null @@ -1,568 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "InterpKernelFunction.hxx" -#include "InterpKernelValue.hxx" - -#include - -using namespace INTERP_KERNEL; - -const char IdentityFunction::REPR[]="Id"; - -const char PositiveFunction::REPR[]="+"; - -const char NegateFunction::REPR[]="-"; - -const char CosFunction::REPR[]="cos"; - -const char SinFunction::REPR[]="sin"; - -const char TanFunction::REPR[]="tan"; - -const char SqrtFunction::REPR[]="sqrt"; - -const char AbsFunction::REPR[]="abs"; - -const char PlusFunction::REPR[]="+"; - -const char MinusFunction::REPR[]="-"; - -const char MultFunction::REPR[]="*"; - -const char DivFunction::REPR[]="/"; - -const char PowFunction::REPR[]="^"; - -const char ExpFunction::REPR[]="exp"; - -const char LnFunction::REPR[]="ln"; - -const char MaxFunction::REPR[]="max"; - -const char MinFunction::REPR[]="min"; - -Function *FunctionsFactory::buildFuncFromString(const char *type, int nbOfParams) throw(INTERP_KERNEL::Exception) -{ - switch(nbOfParams) - { - case 1: - return buildUnaryFuncFromString(type); - case 2: - return buildBinaryFuncFromString(type); - default: - throw INTERP_KERNEL::Exception("Invalid number of params detected : limited to 2 !"); - } -} - -Function *FunctionsFactory::buildUnaryFuncFromString(const char *type) throw(INTERP_KERNEL::Exception) -{ - std::string tmp(type); - if(tmp.empty()) - return new IdentityFunction; - if(tmp==CosFunction::REPR) - return new CosFunction; - if(tmp==SinFunction::REPR) - return new SinFunction; - if(tmp==TanFunction::REPR) - return new TanFunction; - if(tmp==SqrtFunction::REPR) - return new SqrtFunction; - if(tmp==AbsFunction::REPR) - return new AbsFunction; - if(tmp==PositiveFunction::REPR) - return new PositiveFunction; - if(tmp==NegateFunction::REPR) - return new NegateFunction; - if(tmp==ExpFunction::REPR) - return new ExpFunction; - if(tmp==LnFunction::REPR) - return new LnFunction; - // - std::string msg("Invalid unary function detected : \""); - msg+=type; msg+="\""; - throw INTERP_KERNEL::Exception(msg.c_str()); -} - -Function *FunctionsFactory::buildBinaryFuncFromString(const char *type) throw(INTERP_KERNEL::Exception) -{ - std::string tmp(type); - if(tmp==PositiveFunction::REPR) - return new PlusFunction; - if(tmp==NegateFunction::REPR) - return new MinusFunction; - if(tmp==MultFunction::REPR) - return new MultFunction; - if(tmp==DivFunction::REPR) - return new DivFunction; - if(tmp==PowFunction::REPR) - return new PowFunction; - if(tmp==MaxFunction::REPR) - return new MaxFunction; - if(tmp==MinFunction::REPR) - return new MinFunction; - std::string msg("Invalid binary function detected : \""); - msg+=type; msg+="\""; - throw INTERP_KERNEL::Exception(msg.c_str()); -} - -Function *FunctionsFactory::buildBinaryFuncFromString(char type) throw(INTERP_KERNEL::Exception) -{ - char tmp[2]; tmp[0]=type; tmp[1]='\0'; - return buildBinaryFuncFromString(tmp); -} - -Function::~Function() -{ -} - -IdentityFunction::~IdentityFunction() -{ -} - -void IdentityFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) -{ -} - -const char *IdentityFunction::getRepr() const -{ - return REPR; -} - -bool IdentityFunction::isACall() const -{ - return false; -} - -PositiveFunction::~PositiveFunction() -{ -} - -int UnaryFunction::getNbInputParams() const -{ - return 1; -} - -void PositiveFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) -{ -} - -const char *PositiveFunction::getRepr() const -{ - return REPR; -} - -bool PositiveFunction::isACall() const -{ - return false; -} - -NegateFunction::~NegateFunction() -{ -} - -void NegateFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) -{ - Value *val=stack.back(); - val->negate(); -} - -const char *NegateFunction::getRepr() const -{ - return REPR; -} - -bool NegateFunction::isACall() const -{ - return false; -} - -CosFunction::~CosFunction() -{ -} - -void CosFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) -{ - Value *val=stack.back(); - val->cos(); -} - -const char *CosFunction::getRepr() const -{ - return REPR; -} - -bool CosFunction::isACall() const -{ - return true; -} - -SinFunction::~SinFunction() -{ -} - -void SinFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) -{ - Value *val=stack.back(); - val->sin(); -} - -const char *SinFunction::getRepr() const -{ - return REPR; -} - -bool SinFunction::isACall() const -{ - return true; -} - -TanFunction::~TanFunction() -{ -} - -void TanFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) -{ - Value *val=stack.back(); - val->tan(); -} - -const char *TanFunction::getRepr() const -{ - return REPR; -} - -bool TanFunction::isACall() const -{ - return true; -} - -SqrtFunction::~SqrtFunction() -{ -} - -void SqrtFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) -{ - Value *val=stack.back(); - val->sqrt(); -} - -const char *SqrtFunction::getRepr() const -{ - return REPR; -} - -bool SqrtFunction::isACall() const -{ - return true; -} - -AbsFunction::~AbsFunction() -{ -} - -void AbsFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) -{ - Value *val=stack.back(); - val->abs(); -} - -const char *AbsFunction::getRepr() const -{ - return REPR; -} - -bool AbsFunction::isACall() const -{ - return false; -} - -void ExpFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) -{ - Value *val=stack.back(); - val->exp(); -} - -const char *ExpFunction::getRepr() const -{ - return REPR; -} - -bool ExpFunction::isACall() const -{ - return true; -} - -LnFunction::~LnFunction() -{ -} - -void LnFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) -{ - Value *val=stack.back(); - val->ln(); -} - -const char *LnFunction::getRepr() const -{ - return REPR; -} - -bool LnFunction::isACall() const -{ - return true; -} - -int BinaryFunction::getNbInputParams() const -{ - return 2; -} - -PlusFunction::~PlusFunction() -{ -} - -void PlusFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) -{ - Value *val1=stack.back(); - stack.pop_back(); - Value *& val2=stack.back(); - Value *val3; - try - { - val3=val1->plus(val2); - } - catch(INTERP_KERNEL::Exception& e) - { - delete val1; - throw e; - } - delete val1; - delete val2; - val2=val3; -} - -const char *PlusFunction::getRepr() const -{ - return REPR; -} - -bool PlusFunction::isACall() const -{ - return false; -} - -MinusFunction::~MinusFunction() -{ -} - -void MinusFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) -{ - Value *val1=stack.back(); - stack.pop_back(); - Value *& val2=stack.back(); - Value *val3; - try - { - val3=val1->minus(val2); - } - catch(INTERP_KERNEL::Exception& e) - { - delete val1; - throw e; - } - delete val1; - delete val2; - val2=val3; -} - -const char *MinusFunction::getRepr() const -{ - return REPR; -} - -bool MinusFunction::isACall() const -{ - return false; -} - -MultFunction::~MultFunction() -{ -} - -void MultFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) -{ - Value *val1=stack.back(); - stack.pop_back(); - Value *& val2=stack.back(); - Value *val3=val1->mult(val2); - delete val1; - delete val2; - val2=val3; -} - -const char *MultFunction::getRepr() const -{ - return REPR; -} - -bool MultFunction::isACall() const -{ - return false; -} - -DivFunction::~DivFunction() -{ -} - -void DivFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) -{ - Value *val1=stack.back(); - stack.pop_back(); - Value *& val2=stack.back(); - Value *val3; - try - { - val3=val1->div(val2); - } - catch(INTERP_KERNEL::Exception& e) - { - delete val1; - throw e; - } - delete val1; - delete val2; - val2=val3; -} - -const char *DivFunction::getRepr() const -{ - return REPR; -} - -bool DivFunction::isACall() const -{ - return false; -} - -PowFunction::~PowFunction() -{ -} - -void PowFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) -{ - Value *val1=stack.back(); - stack.pop_back(); - Value *& val2=stack.back(); - Value *val3; - try - { - val3=val1->pow(val2); - } - catch(INTERP_KERNEL::Exception& e) - { - delete val1; - throw e; - } - delete val1; - delete val2; - val2=val3; -} - -const char *PowFunction::getRepr() const -{ - return REPR; -} - -bool PowFunction::isACall() const -{ - return true; -} - -ExpFunction::~ExpFunction() -{ -} - -MaxFunction::~MaxFunction() -{ -} - -void MaxFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) -{ - Value *val1=stack.back(); - stack.pop_back(); - Value *& val2=stack.back(); - Value *val3; - try - { - val3=val1->max(val2); - } - catch(INTERP_KERNEL::Exception& e) - { - delete val1; - throw e; - } - delete val1; - delete val2; - val2=val3; -} - -const char *MaxFunction::getRepr() const -{ - return REPR; -} - -bool MaxFunction::isACall() const -{ - return false; -} - -MinFunction::~MinFunction() -{ -} - -void MinFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) -{ - Value *val1=stack.back(); - stack.pop_back(); - Value *& val2=stack.back(); - Value *val3; - try - { - val3=val1->min(val2); - } - catch(INTERP_KERNEL::Exception& e) - { - delete val1; - throw e; - } - delete val1; - delete val2; - val2=val3; -} - -const char *MinFunction::getRepr() const -{ - return REPR; -} - -bool MinFunction::isACall() const -{ - return false; -} diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelFunction.hxx b/src/INTERP_KERNEL/ExprEval/InterpKernelFunction.hxx deleted file mode 100644 index 548a09f1e..000000000 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelFunction.hxx +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __INTERPKERNELFUNCTION_HXX__ -#define __INTERPKERNELFUNCTION_HXX__ - -#include "INTERPKERNELEXPREVALDefines.hxx" -#include "InterpKernelException.hxx" - -#include - -namespace INTERP_KERNEL -{ - class Value; - class Function; - - class INTERPKERNELEXPREVAL_EXPORT FunctionsFactory - { - public: - static Function *buildFuncFromString(const char *type, int nbOfParams) throw(INTERP_KERNEL::Exception); - static Function *buildUnaryFuncFromString(const char *type) throw(INTERP_KERNEL::Exception); - //static Function *buildUnaryFuncFromString(char type) throw(INTERP_KERNEL::Exception); - static Function *buildBinaryFuncFromString(const char *type) throw(INTERP_KERNEL::Exception); - static Function *buildBinaryFuncFromString(char type) throw(INTERP_KERNEL::Exception); - }; - - class INTERPKERNELEXPREVAL_EXPORT Function - { - public: - virtual ~Function(); - virtual int getNbInputParams() const = 0; - virtual void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) = 0; - virtual const char *getRepr() const = 0; - virtual bool isACall() const = 0; - }; - - class INTERPKERNELEXPREVAL_EXPORT UnaryFunction : public Function - { - public: - int getNbInputParams() const; - }; - - class INTERPKERNELEXPREVAL_EXPORT IdentityFunction : public UnaryFunction - { - public: - ~IdentityFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - const char *getRepr() const; - bool isACall() const; - public: - static const char REPR[]; - }; - - class INTERPKERNELEXPREVAL_EXPORT PositiveFunction : public UnaryFunction - { - public: - ~PositiveFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - const char *getRepr() const; - bool isACall() const; - public: - static const char REPR[]; - }; - - class INTERPKERNELEXPREVAL_EXPORT NegateFunction : public UnaryFunction - { - public: - ~NegateFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - const char *getRepr() const; - bool isACall() const; - public: - static const char REPR[]; - }; - - class INTERPKERNELEXPREVAL_EXPORT CosFunction : public UnaryFunction - { - public: - ~CosFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - const char *getRepr() const; - bool isACall() const; - public: - static const char REPR[]; - }; - - class INTERPKERNELEXPREVAL_EXPORT SinFunction : public UnaryFunction - { - public: - ~SinFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - const char *getRepr() const; - bool isACall() const; - public: - static const char REPR[]; - }; - - class INTERPKERNELEXPREVAL_EXPORT TanFunction : public UnaryFunction - { - public: - ~TanFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - const char *getRepr() const; - bool isACall() const; - public: - static const char REPR[]; - }; - - class INTERPKERNELEXPREVAL_EXPORT SqrtFunction : public UnaryFunction - { - public: - ~SqrtFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - const char *getRepr() const; - bool isACall() const; - public: - static const char REPR[]; - }; - - class INTERPKERNELEXPREVAL_EXPORT AbsFunction : public UnaryFunction - { - public: - ~AbsFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - const char *getRepr() const; - bool isACall() const; - public: - static const char REPR[]; - }; - - class INTERPKERNELEXPREVAL_EXPORT ExpFunction : public UnaryFunction - { - public: - ~ExpFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - const char *getRepr() const; - bool isACall() const; - public: - static const char REPR[]; - }; - - class INTERPKERNELEXPREVAL_EXPORT LnFunction : public UnaryFunction - { - public: - ~LnFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - const char *getRepr() const; - bool isACall() const; - public: - static const char REPR[]; - }; - - class INTERPKERNELEXPREVAL_EXPORT BinaryFunction : public Function - { - public: - int getNbInputParams() const; - }; - - class PlusFunction : public BinaryFunction - { - public: - ~PlusFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - const char *getRepr() const; - bool isACall() const; - public: - static const char REPR[]; - }; - - class INTERPKERNELEXPREVAL_EXPORT MinusFunction : public BinaryFunction - { - public: - ~MinusFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - const char *getRepr() const; - bool isACall() const; - public: - static const char REPR[]; - }; - - class INTERPKERNELEXPREVAL_EXPORT MultFunction : public BinaryFunction - { - public: - ~MultFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - const char *getRepr() const; - bool isACall() const; - public: - static const char REPR[]; - }; - - class INTERPKERNELEXPREVAL_EXPORT DivFunction : public BinaryFunction - { - public: - ~DivFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - const char *getRepr() const; - bool isACall() const; - public: - static const char REPR[]; - }; - - class INTERPKERNELEXPREVAL_EXPORT PowFunction : public BinaryFunction - { - public: - ~PowFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - const char *getRepr() const; - bool isACall() const; - public: - static const char REPR[]; - }; - - class INTERPKERNELEXPREVAL_EXPORT MaxFunction : public BinaryFunction - { - public: - ~MaxFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - const char *getRepr() const; - bool isACall() const; - public: - static const char REPR[]; - }; - - class INTERPKERNELEXPREVAL_EXPORT MinFunction : public BinaryFunction - { - public: - ~MinFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - const char *getRepr() const; - bool isACall() const; - public: - static const char REPR[]; - }; -} - -#endif diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelUnit.cxx b/src/INTERP_KERNEL/ExprEval/InterpKernelUnit.cxx deleted file mode 100644 index 6eacf7221..000000000 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelUnit.cxx +++ /dev/null @@ -1,372 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "InterpKernelUnit.hxx" -#include "InterpKernelExprParser.hxx" - -#include -#include -#include -#include - -using namespace INTERP_KERNEL; - -UnitDataBase UnitDataBase::_uniqueMapForExpr; - -static const char InterpKernelMuAscii[2]={-0x4B,0x0}; - -static const char InterpKernelMuUnicode[3]={-0x3E,-0x4B,0x0}; - -const char *UnitDataBase::PREF_POW10[NB_OF_PREF_POW10]={"y","z","a","f","p","n",InterpKernelMuAscii,InterpKernelMuUnicode,"u","m","c","d", - "da","h","k","M","G","T","P","E","Z","Y"}; - -const double UnitDataBase::POW10[NB_OF_PREF_POW10]={1e-24,1e-21,1e-18,1e-15,1e-12,1e-9,1e-6,1e-6,1e-6,1e-3,1e-2,1e-1, - 1e1,1e2,1e3,1e6,1e9,1e12,1e15,1e18,1e21,1e24}; - -static const char InterpKernelDegreeCAscii[3]={-0x50,0x43,0x0}; - -static const char InterpKernelDegreeCUnicode[4]={-0x3E,-0x50,0x43,0x0}; - -static const char InterpKernelDegreeCUnicodeWin[3]={-0x08,0x43,0x0}; - -const char *UnitDataBase::UNITS_RECOGN[NB_OF_UNITS_RECOGN]={"g","m","s","A","K", - "W","J","Hz","V","h","min","t","N","dyn", - "eV","Pa","atm","bar",InterpKernelDegreeCAscii,"C","ohm","F","S", - "T","H","P","St",InterpKernelDegreeCUnicode,InterpKernelDegreeCUnicodeWin}; - -const short UnitDataBase::PROJ_IN_BASE[NB_OF_UNITS_RECOGN][SIZE_OF_UNIT_BASE]= - { - {1,0,0,0,0},//g - {0,1,0,0,0},//m - {0,0,1,0,0},//s - {0,0,0,1,0},//A - {0,0,0,0,1},//K - {1,2,-3,0,0},//W - {1,2,-2,0,0},//J - {0,0,-1,0,0},//Hz - {1,2,-3,-1,0},//V - {0,0,1,0,0},//h - {0,0,1,0,0},//min - {1,0,0,0,0},//t - {1,1,-2,0,0},//N - {1,1,-2,0,0},//dyn - {1,2,-2,0,0},//eV - {1,-1,-2,0,0},//Pa - {1,-1,-2,0,0},//atm - {1,-1,-2,0,0},//bar - {0,0,0,0,1},//degree C - {0,0,1,1,0},//C - {1,2,-3,-2,0},//ohm - {-1,-2,4,2,0},//F - {-1,-2,3,2,0},//S - {1,0,-2,-1,0},//T - {1,2,-2,-2,0},//H - {1,-1,-1,0,0},//P - {0,2,-1,0,0},//St - {0,0,0,0,1},//degree C - {0,0,0,0,1}//degree C - }; - -const double UnitDataBase::MUL_COEFF[NB_OF_UNITS_RECOGN]= - { 1.,1.,1.,1.,1., - 1000.,1000.,1.,1000.,3600.,3600.,1e6,1000.,1e-2, - 1.60217733e-16,1000.,1.01325e8,1e8,1.,1.,1000.,1e-3, - 1000.,1000.,100.,1.,1.,1.,1.}; - -const double UnitDataBase::ADD_COEFF[NB_OF_UNITS_RECOGN]= - { 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 273.15, 0., 0., 0., 0., 0., 0., 0., 0., 273.15 ,273.15}; - -UnitDataBase::UnitDataBase() -{ - for(int i=0;i::const_iterator iter=_units_semantic.find(work); - if(iter!=_units_semantic.end()) - { - ret=(*iter).second; - std::map::const_iterator iter2=_units_add.find(work); - addFact=(*iter2).second; - std::map::const_iterator iter3=_units_mul.find(work); - mFact=(*iter3).second; - work2=unit.substr(0,i); - } - } - if(!ret) - { - std::ostringstream os; - os << "Unit : " << unit << " not recognized !"; - throw INTERP_KERNEL::Exception(os.str().c_str()); - } - if(!work2.empty()) - { - std::map::const_iterator iter4=_prefix_pow_10.find(work2); - if(iter4==_prefix_pow_10.end()) - { - std::ostringstream os; - os << "Unit : " << unit << " not fully recognized : \"" << work << "\" detected as core unit and \""; - os << work2 << "\" not recognized prefix !"; - throw INTERP_KERNEL::Exception(os.str().c_str()); - } - addFact=0.; - mFact*=(*iter4).second; - } - return ret; -} - -DecompositionInUnitBase::DecompositionInUnitBase():_add_to_base(0.),_mult_fact_to_base(1.) -{ - _value[0]=0; - _value[1]=0; - _value[2]=0; - _value[3]=0; - _value[4]=0; -} - -void DecompositionInUnitBase::setInfo(const short *vals, double addFact, double mFact) -{ - _add_to_base=addFact; - _mult_fact_to_base=mFact; - _value[0]=vals[0]; - _value[1]=vals[1]; - _value[2]=vals[2]; - _value[3]=vals[3]; - _value[4]=vals[4]; -} - -bool DecompositionInUnitBase::operator==(const DecompositionInUnitBase& other) const -{ - return _value[0]==other._value[0] && _value[1]==other._value[1] && _value[2]==other._value[2] && _value[3]==other._value[3] && _value[4]==other._value[4]; -} - -void DecompositionInUnitBase::getTranslationParams(const DecompositionInUnitBase& other, double& mul, double& add) const -{ - if((*this)==other) - { - mul=_mult_fact_to_base/other._mult_fact_to_base; - add=_add_to_base/other._mult_fact_to_base-other._add_to_base; - } - else - { - mul=std::numeric_limits::max(); - add=std::numeric_limits::max(); - } -} - -bool DecompositionInUnitBase::isEqual(short mass, short lgth, short time, short intensity, short temp, double add, double mult) -{ - bool ret1=mass==_value[0]; - bool ret2=lgth==_value[1]; - bool ret3=time==_value[2]; - bool ret4=intensity==_value[3]; - bool ret5=temp==_value[4]; - bool ret6=areDoubleEquals(add,_add_to_base); - bool ret7=areDoubleEquals(mult,_mult_fact_to_base); - return ret1 && ret2 && ret3 && ret4 && ret5 && ret6 && ret7; -} - -void DecompositionInUnitBase::negate() -{ - _mult_fact_to_base=-_mult_fact_to_base; -} - -bool DecompositionInUnitBase::isAdimensional() const -{ - return _value[0]==0 && _value[1]==0 && _value[2]==0 && _value[3]==0 && _value[4]==0; -} - -bool DecompositionInUnitBase::isUnitary() const -{ - return areDoubleEquals(_add_to_base,0.) && areDoubleEquals(_mult_fact_to_base,1.); -} - -void DecompositionInUnitBase::tryToConvertInUnit(double val) throw(INTERP_KERNEL::Exception) -{ - int valI=(int)val; - if((val-(double)valI)!=0.) - { - std::ostringstream os; - os << "Double value " << val << " can't be considered as integer. Not admitable for units !"; - throw INTERP_KERNEL::Exception(os.str().c_str()); - } - _value[0]=0; - _value[1]=0; - _value[2]=0; - _value[3]=0; - _value[4]=0; - _add_to_base=0; - _mult_fact_to_base=valI; -} - -DecompositionInUnitBase &DecompositionInUnitBase::operator*(const DecompositionInUnitBase& other) -{ - _value[0]+=other._value[0]; _value[1]+=other._value[1]; _value[2]+=other._value[2]; _value[3]+=other._value[3]; _value[4]+=other._value[4]; - _mult_fact_to_base*=other._mult_fact_to_base; - _add_to_base=0.; - return *this; -} - -DecompositionInUnitBase &DecompositionInUnitBase::operator/(const DecompositionInUnitBase& other) -{ - _value[0]-=other._value[0]; _value[1]-=other._value[1]; _value[2]-=other._value[2]; _value[3]-=other._value[3]; _value[4]-=other._value[4]; - _mult_fact_to_base/=other._mult_fact_to_base; - _add_to_base=0.; - return *this; -} - -DecompositionInUnitBase &DecompositionInUnitBase::operator^(const DecompositionInUnitBase& other) throw(INTERP_KERNEL::Exception) -{ - if(!other.isAdimensional()) - throw INTERP_KERNEL::Exception("Trying to execute operator ^ with a second member not adimensionnal"); - int exp=couldItBeConsideredAsInt(other._mult_fact_to_base); - _value[0]*=exp; _value[1]*=exp; _value[2]*=exp; _value[3]*=exp; _value[4]*=exp; - _mult_fact_to_base=powInt(_mult_fact_to_base,exp); - _add_to_base=0.; - return *this; -} - -void DecompositionInUnitBase::dealWithAddFactor(const DecompositionInUnitBase& other) -{ - if(!areDoubleEquals(_add_to_base,0.)) - if(other.isAdimensional()) - if(areDoubleEquals(other._mult_fact_to_base,1.)) - return ; - if(!other.areDoubleEquals(_add_to_base,0.)) - if(isAdimensional()) - if(areDoubleEquals(_mult_fact_to_base,1.)) - return ; - _add_to_base=0.; -} - -double DecompositionInUnitBase::powInt(double val, int exp) -{ - double work=1.; - if(exp==0) - return 1.; - if(exp>0) - for(int i=0;i::max(); -} - -std::string Unit::getCoarseRepr() const -{ - return _coarse_repr; -} diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelUnit.hxx b/src/INTERP_KERNEL/ExprEval/InterpKernelUnit.hxx deleted file mode 100644 index 1c5b50ee8..000000000 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelUnit.hxx +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __INTERPKERNELUNIT_HXX__ -#define __INTERPKERNELUNIT_HXX__ - -#include "INTERPKERNELEXPREVALDefines.hxx" -#include "InterpKernelException.hxx" - -#include -#include - -namespace INTERP_KERNEL -{ - class INTERPKERNELEXPREVAL_EXPORT UnitDataBase - { - public: - UnitDataBase(); - const short *getInfoForUnit(const std::string& unit, - double& addFact, double& mFact) const throw(INTERP_KERNEL::Exception); - static UnitDataBase _uniqueMapForExpr; - static const int SIZE_OF_UNIT_BASE=5; - private: - std::map _prefix_pow_10; - std::map _units_semantic; - std::map _units_mul; - std::map _units_add; - private: - static const int NB_OF_PREF_POW10=22; - static const char *PREF_POW10[NB_OF_PREF_POW10]; - static const double POW10[NB_OF_PREF_POW10]; - static const int NB_OF_UNITS_RECOGN=29; - static const char *UNITS_RECOGN[NB_OF_UNITS_RECOGN]; - static const short PROJ_IN_BASE[NB_OF_UNITS_RECOGN][SIZE_OF_UNIT_BASE]; - static const double MUL_COEFF[NB_OF_UNITS_RECOGN]; - static const double ADD_COEFF[NB_OF_UNITS_RECOGN]; - }; - - class INTERPKERNELEXPREVAL_EXPORT DecompositionInUnitBase - { - public: - DecompositionInUnitBase(); - void setInfo(const short *vals, double addFact, double mFact); - short operator[](int i) const { return _value[i]; } - bool operator==(const DecompositionInUnitBase& other) const; - void getTranslationParams(const DecompositionInUnitBase& other, double& mul, double& add) const; - bool isEqual(short mass, short lgth, short time, short intensity, short temp, - double add, double mult); - bool isUnitary() const; - //! \b WARNING no test is done on the fact that unit is adimensionnal. - void negate(); - bool isAdimensional() const; - void tryToConvertInUnit(double val) throw(INTERP_KERNEL::Exception); - DecompositionInUnitBase &operator*(const DecompositionInUnitBase& other); - DecompositionInUnitBase &operator/(const DecompositionInUnitBase& other); - DecompositionInUnitBase &operator^(const DecompositionInUnitBase& other) throw(INTERP_KERNEL::Exception); - private: - void dealWithAddFactor(const DecompositionInUnitBase& other); - static int couldItBeConsideredAsInt(double val) throw(INTERP_KERNEL::Exception); - static bool areDoubleEquals(double a, double b); - static double powInt(double val, int exp); - private: - short _value[UnitDataBase::SIZE_OF_UNIT_BASE]; - double _add_to_base; - double _mult_fact_to_base; - }; - - /*! - * This class deals with units. - * This class has two main responsabilities : - * - interprete units by giving simply their representation in string type. - * - performing operations on these units. - * - * All the possible units are represented with a unique tuple with 5 elements - * representing the unique decomposition of a unit in the following base. - * - * dimension 0 stands for mass in g (\b NOT kg to simplify parsing). - * dimension 1 stands for length in m. - * dimension 2 stands for time in s. - * dimension 3 stands for elec intensity A. - * dimension 4 stands for temperature in K. - */ - class INTERPKERNELEXPREVAL_EXPORT Unit - { - public: - Unit(const char *reprC, bool tryToInterp=true); - Unit(const char *reprFortran, int sizeOfRepr, bool tryToInterp=true); - void tryToInterprate() const; - bool isInterpretationOK() const; - bool isCompatibleWith(const Unit& other) const; - double convert(const Unit& target, double sourceVal) const; - std::string getCoarseRepr() const; - private: - std::string _coarse_repr; - mutable bool _is_interpreted; - mutable bool _is_interpretation_ok; - mutable DecompositionInUnitBase _decomp_in_base; - }; -} - -#endif diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelValue.cxx b/src/INTERP_KERNEL/ExprEval/InterpKernelValue.cxx deleted file mode 100644 index 5e3bcfe19..000000000 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelValue.cxx +++ /dev/null @@ -1,425 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "InterpKernelValue.hxx" -#include "InterpKernelFunction.hxx" - -#include -#include -#include - -using namespace INTERP_KERNEL; - -ValueDouble::ValueDouble():_data(std::numeric_limits::max()) -{ -} - -Value *ValueDouble::newInstance() const -{ - return new ValueDouble; -} - -ValueDouble::ValueDouble(double val):_data(val) -{ -} - -void ValueDouble::setDouble(double val) throw(INTERP_KERNEL::Exception) -{ - _data=val; -} - -void ValueDouble::setVarname(int fastPos, const std::string& var) throw(INTERP_KERNEL::Exception) -{ - std::string msg("Error var : "); msg+=var; msg+=" not numeric : use another expression evaluator !"; - throw INTERP_KERNEL::Exception(msg.c_str()); -} - -void ValueDouble::positive() throw(INTERP_KERNEL::Exception) -{ -} - -void ValueDouble::negate() throw(INTERP_KERNEL::Exception) -{ - _data=-_data; -} - -void ValueDouble::sqrt() throw(INTERP_KERNEL::Exception) -{ - _data=std::sqrt(_data); -} - -void ValueDouble::cos() throw(INTERP_KERNEL::Exception) -{ - _data=std::cos(_data); -} - -void ValueDouble::sin() throw(INTERP_KERNEL::Exception) -{ - _data=std::sin(_data); -} - -void ValueDouble::tan() throw(INTERP_KERNEL::Exception) -{ - _data=std::tan(_data); -} - -void ValueDouble::abs() throw(INTERP_KERNEL::Exception) -{ - if(_data<0.) - _data=-_data; -} - -void ValueDouble::exp() throw(INTERP_KERNEL::Exception) -{ - _data=std::exp(_data); -} - -void ValueDouble:: ln() throw(INTERP_KERNEL::Exception) -{ - _data=std::log(_data); -} - -Value *ValueDouble::plus(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - const ValueDouble *valC=checkSameType(other); - return new ValueDouble(_data+valC->_data); -} - -Value *ValueDouble::minus(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - const ValueDouble *valC=checkSameType(other); - return new ValueDouble(_data-valC->_data); -} - -Value *ValueDouble::mult(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - const ValueDouble *valC=checkSameType(other); - return new ValueDouble(_data*valC->_data); -} - -Value *ValueDouble::div(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - const ValueDouble *valC=checkSameType(other); - return new ValueDouble(_data/valC->_data); -} - -Value *ValueDouble::pow(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - const ValueDouble *valC=checkSameType(other); - return new ValueDouble(std::pow(_data,valC->_data)); -} - -Value *ValueDouble::max(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - const ValueDouble *valC=checkSameType(other); - return new ValueDouble(std::max(_data,valC->_data)); -} - -Value *ValueDouble::min(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - const ValueDouble *valC=checkSameType(other); - return new ValueDouble(std::min(_data,valC->_data)); -} - -const ValueDouble *ValueDouble::checkSameType(const Value *val) throw(INTERP_KERNEL::Exception) -{ - const ValueDouble *valC=dynamic_cast(val); - if(!valC) - throw INTERP_KERNEL::Exception("Trying to operate on non homogeneous Values (double with other type) !"); - return valC; -} - -ValueUnit::ValueUnit() -{ -} - -Value *ValueUnit::newInstance() const -{ - return new ValueUnit; -} - -ValueUnit::ValueUnit(const DecompositionInUnitBase& unit):_data(unit) -{ -} - -void ValueUnit::setDouble(double val) throw(INTERP_KERNEL::Exception) -{ - _data.tryToConvertInUnit(val); -} - -void ValueUnit::setVarname(int fastPos, const std::string& var) throw(INTERP_KERNEL::Exception) -{ - double add,mult; - const short *projInBase=UnitDataBase::_uniqueMapForExpr.getInfoForUnit(var,add,mult); - _data.setInfo(projInBase,add,mult); -} - -void ValueUnit::positive() throw(INTERP_KERNEL::Exception) -{ - unsupportedOp(PositiveFunction::REPR); -} - -void ValueUnit::negate() throw(INTERP_KERNEL::Exception) -{ - _data.negate(); -} - -void ValueUnit::sqrt() throw(INTERP_KERNEL::Exception) -{ - unsupportedOp(SqrtFunction::REPR); -} - -void ValueUnit::cos() throw(INTERP_KERNEL::Exception) -{ - unsupportedOp(CosFunction::REPR); -} - -void ValueUnit::sin() throw(INTERP_KERNEL::Exception) -{ - unsupportedOp(SinFunction::REPR); -} - -void ValueUnit::tan() throw(INTERP_KERNEL::Exception) -{ - unsupportedOp(TanFunction::REPR); -} - -void ValueUnit::abs() throw(INTERP_KERNEL::Exception) -{ - unsupportedOp(AbsFunction::REPR); -} - -void ValueUnit::exp() throw(INTERP_KERNEL::Exception) -{ - unsupportedOp(ExpFunction::REPR); -} - -void ValueUnit::ln() throw(INTERP_KERNEL::Exception) -{ - unsupportedOp(LnFunction::REPR); -} - -Value *ValueUnit::plus(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - unsupportedOp(PlusFunction::REPR); - return 0; -} - -Value *ValueUnit::minus(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - unsupportedOp(MinusFunction::REPR); - return 0; -} - -Value *ValueUnit::mult(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - const ValueUnit *valC=checkSameType(other); - DecompositionInUnitBase tmp=_data; - tmp*valC->getData(); - return new ValueUnit(tmp); -} - -Value *ValueUnit::div(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - const ValueUnit *valC=checkSameType(other); - DecompositionInUnitBase tmp=_data; - tmp/valC->getData(); - return new ValueUnit(tmp); -} - -Value *ValueUnit::pow(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - const ValueUnit *valC=checkSameType(other); - DecompositionInUnitBase tmp=_data; - tmp^valC->getData(); - return new ValueUnit(tmp); -} - -Value *ValueUnit::max(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - unsupportedOp(MaxFunction::REPR); - return 0; -} - -Value *ValueUnit::min(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - unsupportedOp(MinFunction::REPR); - return 0; -} - -const ValueUnit *ValueUnit::checkSameType(const Value *val) throw(INTERP_KERNEL::Exception) -{ - const ValueUnit *valC=dynamic_cast(val); - if(!valC) - throw INTERP_KERNEL::Exception("Trying to operate on non homogeneous Values (Units with other type) !"); - return valC; -} - -void ValueUnit::unsupportedOp(const char *type) throw(INTERP_KERNEL::Exception) -{ - const char msg[]="Unsupported operation for units :"; - std::string msgStr(msg); - msgStr+=type; - throw INTERP_KERNEL::Exception(msgStr.c_str()); -} - -ValueDoubleExpr::ValueDoubleExpr(int szDestData, const double *srcData):_sz_dest_data(szDestData),_dest_data(new double[_sz_dest_data]),_src_data(srcData) -{ -} - -ValueDoubleExpr::~ValueDoubleExpr() -{ - delete [] _dest_data; -} - -Value *ValueDoubleExpr::newInstance() const -{ - return new ValueDoubleExpr(_sz_dest_data,_src_data); -} - -void ValueDoubleExpr::setDouble(double val) throw(INTERP_KERNEL::Exception) -{ - std::fill(_dest_data,_dest_data+_sz_dest_data,val); -} - -void ValueDoubleExpr::setVarname(int fastPos, const std::string& var) throw(INTERP_KERNEL::Exception) -{ - if(fastPos==-2) - std::copy(_src_data,_src_data+_sz_dest_data,_dest_data); - else if(fastPos>-2) - std::fill(_dest_data,_dest_data+_sz_dest_data,_src_data[fastPos]); - else - { - std::fill(_dest_data,_dest_data+_sz_dest_data,0.); - _dest_data[-7-fastPos]=1.; - } -} - -void ValueDoubleExpr::positive() throw(INTERP_KERNEL::Exception) -{ -} - -void ValueDoubleExpr::negate() throw(INTERP_KERNEL::Exception) -{ - std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::negate()); -} - -void ValueDoubleExpr::sqrt() throw(INTERP_KERNEL::Exception) -{ - double *it=std::find_if(_dest_data,_dest_data+_sz_dest_data,std::bind2nd(std::less(),0.)); - if(it!=_dest_data+_sz_dest_data) - throw INTERP_KERNEL::Exception("Trying to apply sqrt on < 0. value !"); - std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::sqrt)); -} - -void ValueDoubleExpr::cos() throw(INTERP_KERNEL::Exception) -{ - std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::cos)); -} - -void ValueDoubleExpr::sin() throw(INTERP_KERNEL::Exception) -{ - std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::sin)); -} - -void ValueDoubleExpr::tan() throw(INTERP_KERNEL::Exception) -{ - std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::tan)); -} - -void ValueDoubleExpr::abs() throw(INTERP_KERNEL::Exception) -{ - std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(fabs)); -} - -void ValueDoubleExpr::exp() throw(INTERP_KERNEL::Exception) -{ - std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::exp)); -} - -void ValueDoubleExpr::ln() throw(INTERP_KERNEL::Exception) -{ - double *it=std::find_if(_dest_data,_dest_data+_sz_dest_data,std::bind2nd(std::less_equal(),0.)); - if(it!=_dest_data+_sz_dest_data) - throw INTERP_KERNEL::Exception("Trying to apply sqrt on < 0. value !"); - std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::log)); -} - -Value *ValueDoubleExpr::plus(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - const ValueDoubleExpr *otherC=static_cast(other); - ValueDoubleExpr *ret=new ValueDoubleExpr(_sz_dest_data,_src_data); - std::transform(_dest_data,_dest_data+_sz_dest_data,otherC->getData(),ret->getData(),std::plus()); - return ret; -} - -Value *ValueDoubleExpr::minus(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - const ValueDoubleExpr *otherC=static_cast(other); - ValueDoubleExpr *ret=new ValueDoubleExpr(_sz_dest_data,_src_data); - std::transform(_dest_data,_dest_data+_sz_dest_data,otherC->getData(),ret->getData(),std::minus()); - return ret; -} - -Value *ValueDoubleExpr::mult(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - const ValueDoubleExpr *otherC=static_cast(other); - ValueDoubleExpr *ret=new ValueDoubleExpr(_sz_dest_data,_src_data); - std::transform(_dest_data,_dest_data+_sz_dest_data,otherC->getData(),ret->getData(),std::multiplies()); - return ret; -} - -Value *ValueDoubleExpr::div(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - const ValueDoubleExpr *otherC=static_cast(other); - double *it=std::find(otherC->getData(),otherC->getData()+_sz_dest_data,0.); - if(it!=otherC->getData()+_sz_dest_data) - throw INTERP_KERNEL::Exception("Trying to operate division by 0. !"); - ValueDoubleExpr *ret=new ValueDoubleExpr(_sz_dest_data,_src_data); - std::transform(_dest_data,_dest_data+_sz_dest_data,otherC->getData(),ret->getData(),std::divides()); - return ret; -} - -Value *ValueDoubleExpr::pow(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - const ValueDoubleExpr *otherC=static_cast(other); - double p=otherC->getData()[0]; - double *it=std::find_if(_dest_data,_dest_data+_sz_dest_data,std::bind2nd(std::less(),0.)); - if(it!=_dest_data+_sz_dest_data) - throw INTERP_KERNEL::Exception("Trying to operate pow(a,b) with a<0. !"); - ValueDoubleExpr *ret=new ValueDoubleExpr(_sz_dest_data,_src_data); - std::transform(_dest_data,_dest_data+_sz_dest_data,ret->getData(),std::bind2nd(std::ptr_fun(std::pow),p)); - return ret; -} - -Value *ValueDoubleExpr::max(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - const ValueDoubleExpr *otherC=static_cast(other); - ValueDoubleExpr *ret=new ValueDoubleExpr(_sz_dest_data,_src_data); - std::transform(_dest_data,_dest_data+_sz_dest_data,otherC->getData(),ret->getData(),std::ptr_fun(std::max)); - return ret; -} - -Value *ValueDoubleExpr::min(const Value *other) const throw(INTERP_KERNEL::Exception) -{ - const ValueDoubleExpr *otherC=static_cast(other); - ValueDoubleExpr *ret=new ValueDoubleExpr(_sz_dest_data,_src_data); - std::transform(_dest_data,_dest_data+_sz_dest_data,otherC->getData(),ret->getData(),std::ptr_fun(std::min)); - return ret; -} diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelValue.hxx b/src/INTERP_KERNEL/ExprEval/InterpKernelValue.hxx deleted file mode 100644 index 95ac2e66b..000000000 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelValue.hxx +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __INTERPKERNELVALUE_HXX__ -#define __INTERPKERNELVALUE_HXX__ - -#include "INTERPKERNELEXPREVALDefines.hxx" -#include "InterpKernelException.hxx" -#include "InterpKernelUnit.hxx" - -namespace INTERP_KERNEL -{ - class INTERPKERNELEXPREVAL_EXPORT Value - { - public: - virtual Value *newInstance() const = 0; - virtual ~Value() { } - virtual void setDouble(double val) throw(INTERP_KERNEL::Exception) = 0; - virtual void setVarname(int fastPos, const std::string& var) throw(INTERP_KERNEL::Exception) = 0; - //unary - virtual void positive() throw(INTERP_KERNEL::Exception) = 0; - virtual void negate() throw(INTERP_KERNEL::Exception) = 0; - virtual void sqrt() throw(INTERP_KERNEL::Exception) = 0; - virtual void cos() throw(INTERP_KERNEL::Exception) = 0; - virtual void sin() throw(INTERP_KERNEL::Exception) = 0; - virtual void tan() throw(INTERP_KERNEL::Exception) = 0; - virtual void abs() throw(INTERP_KERNEL::Exception) = 0; - virtual void exp() throw(INTERP_KERNEL::Exception) = 0; - virtual void ln() throw(INTERP_KERNEL::Exception) = 0; - //binary - virtual Value *plus(const Value *other) const throw(INTERP_KERNEL::Exception) = 0; - virtual Value *minus(const Value *other) const throw(INTERP_KERNEL::Exception) = 0; - virtual Value *mult(const Value *other) const throw(INTERP_KERNEL::Exception) = 0; - virtual Value *div(const Value *other) const throw(INTERP_KERNEL::Exception) = 0; - virtual Value *pow(const Value *other) const throw(INTERP_KERNEL::Exception) = 0; - virtual Value *max(const Value *other) const throw(INTERP_KERNEL::Exception) = 0; - virtual Value *min(const Value *other) const throw(INTERP_KERNEL::Exception) = 0; - }; - - class INTERPKERNELEXPREVAL_EXPORT ValueDouble : public Value - { - public: - ValueDouble(); - Value *newInstance() const; - void setDouble(double val) throw(INTERP_KERNEL::Exception); - void setVarname(int fastPos, const std::string& var) throw(INTERP_KERNEL::Exception); - // - double getData() const { return _data; } - void positive() throw(INTERP_KERNEL::Exception); - void negate() throw(INTERP_KERNEL::Exception); - void sqrt() throw(INTERP_KERNEL::Exception); - void cos() throw(INTERP_KERNEL::Exception); - void sin() throw(INTERP_KERNEL::Exception); - void tan() throw(INTERP_KERNEL::Exception); - void abs() throw(INTERP_KERNEL::Exception); - void exp() throw(INTERP_KERNEL::Exception); - void ln() throw(INTERP_KERNEL::Exception); - // - Value *plus(const Value *other) const throw(INTERP_KERNEL::Exception); - Value *minus(const Value *other) const throw(INTERP_KERNEL::Exception); - Value *mult(const Value *other) const throw(INTERP_KERNEL::Exception); - Value *div(const Value *other) const throw(INTERP_KERNEL::Exception); - Value *pow(const Value *other) const throw(INTERP_KERNEL::Exception); - Value *max(const Value *other) const throw(INTERP_KERNEL::Exception); - Value *min(const Value *other) const throw(INTERP_KERNEL::Exception); - private: - ValueDouble(double val); - static const ValueDouble *checkSameType(const Value *val) throw(INTERP_KERNEL::Exception); - private: - double _data; - }; - - class INTERPKERNELEXPREVAL_EXPORT ValueUnit : public Value - { - public: - ValueUnit(); - Value *newInstance() const; - void setDouble(double val) throw(INTERP_KERNEL::Exception); - void setVarname(int fastPos, const std::string& var) throw(INTERP_KERNEL::Exception); - // - DecompositionInUnitBase getData() const { return _data; } - void positive() throw(INTERP_KERNEL::Exception); - void negate() throw(INTERP_KERNEL::Exception); - void sqrt() throw(INTERP_KERNEL::Exception); - void cos() throw(INTERP_KERNEL::Exception); - void sin() throw(INTERP_KERNEL::Exception); - void tan() throw(INTERP_KERNEL::Exception); - void abs() throw(INTERP_KERNEL::Exception); - void exp() throw(INTERP_KERNEL::Exception); - void ln() throw(INTERP_KERNEL::Exception); - // - Value *plus(const Value *other) const throw(INTERP_KERNEL::Exception); - Value *minus(const Value *other) const throw(INTERP_KERNEL::Exception); - Value *mult(const Value *other) const throw(INTERP_KERNEL::Exception); - Value *div(const Value *other) const throw(INTERP_KERNEL::Exception); - Value *pow(const Value *other) const throw(INTERP_KERNEL::Exception); - Value *max(const Value *other) const throw(INTERP_KERNEL::Exception); - Value *min(const Value *other) const throw(INTERP_KERNEL::Exception); - private: - ValueUnit(const DecompositionInUnitBase& unit); - static void unsupportedOp(const char *type) throw(INTERP_KERNEL::Exception); - static const ValueUnit *checkSameType(const Value *val) throw(INTERP_KERNEL::Exception); - private: - DecompositionInUnitBase _data; - }; - - class INTERPKERNELEXPREVAL_EXPORT ValueDoubleExpr : public Value - { - public: - ValueDoubleExpr(int szDestData, const double *srcData); - ~ValueDoubleExpr(); - double *getData() const { return _dest_data; } - Value *newInstance() const; - void setDouble(double val) throw(INTERP_KERNEL::Exception); - void setVarname(int fastPos, const std::string& var) throw(INTERP_KERNEL::Exception); - // - void positive() throw(INTERP_KERNEL::Exception); - void negate() throw(INTERP_KERNEL::Exception); - void sqrt() throw(INTERP_KERNEL::Exception); - void cos() throw(INTERP_KERNEL::Exception); - void sin() throw(INTERP_KERNEL::Exception); - void tan() throw(INTERP_KERNEL::Exception); - void abs() throw(INTERP_KERNEL::Exception); - void exp() throw(INTERP_KERNEL::Exception); - void ln() throw(INTERP_KERNEL::Exception); - // - Value *plus(const Value *other) const throw(INTERP_KERNEL::Exception); - Value *minus(const Value *other) const throw(INTERP_KERNEL::Exception); - Value *mult(const Value *other) const throw(INTERP_KERNEL::Exception); - Value *div(const Value *other) const throw(INTERP_KERNEL::Exception); - Value *pow(const Value *other) const throw(INTERP_KERNEL::Exception); - Value *max(const Value *other) const throw(INTERP_KERNEL::Exception); - Value *min(const Value *other) const throw(INTERP_KERNEL::Exception); - private: - int _sz_dest_data; - double *_dest_data; - const double *_src_data; - }; -} - -#endif diff --git a/src/INTERP_KERNEL/ExprEval/Makefile.am b/src/INTERP_KERNEL/ExprEval/Makefile.am deleted file mode 100644 index 4a67afba5..000000000 --- a/src/INTERP_KERNEL/ExprEval/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (C) 2007-2010 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. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# File : Makefile.am -# Author : Anthony GEAY (CEA/DEN/DANS/DM2S/SFME/LGLS) -# Module : MED -# -include $(top_srcdir)/adm_local/unix/make_common_starter.am - -noinst_LTLIBRARIES = libinterpkernelexpreval.la - -salomeinclude_HEADERS = \ -INTERPKERNELEXPREVALDefines.hxx \ -InterpKernelExprParser.hxx \ -InterpKernelFunction.hxx \ -InterpKernelUnit.hxx \ -InterpKernelValue.hxx - - -EXTRA_DIST += \ -INTERPKERNELEXPREVALDefines.hxx \ -InterpKernelExprParser.hxx \ -InterpKernelFunction.hxx \ -InterpKernelUnit.hxx \ -InterpKernelValue.hxx - -dist_libinterpkernelexpreval_la_SOURCES = \ - InterpKernelExprParser.cxx \ - InterpKernelFunction.cxx \ - InterpKernelUnit.cxx \ - InterpKernelValue.cxx - -libinterpkernelexpreval_la_CPPFLAGS=-I$(srcdir)/../Bases - -libinterpkernelexpreval_la_LDFLAGS= - -AM_CPPFLAGS += $(libinterpkernelexpreval_la_CPPFLAGS) - -LDADD= $(libinterpkernelexpreval_la_LDFLAGS) diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DAbstractEdge.cxx b/src/INTERP_KERNEL/Geometric2D/AbstractEdge.cxx similarity index 94% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DAbstractEdge.cxx rename to src/INTERP_KERNEL/Geometric2D/AbstractEdge.cxx index c92bf3014..1085fd171 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DAbstractEdge.cxx +++ b/src/INTERP_KERNEL/Geometric2D/AbstractEdge.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,10 +16,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#include "InterpKernelGeo2DAbstractEdge.hxx" -#include "InterpKernelGeo2DComposedEdge.hxx" -#include "InterpKernelGeo2DElementaryEdge.hxx" +#include "AbstractEdge.hxx" +#include "ComposedEdge.hxx" +#include "ElementaryEdge.hxx" using namespace INTERP_KERNEL; diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DAbstractEdge.hxx b/src/INTERP_KERNEL/Geometric2D/AbstractEdge.hxx similarity index 88% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DAbstractEdge.hxx rename to src/INTERP_KERNEL/Geometric2D/AbstractEdge.hxx index 34f0518b9..3fa757243 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DAbstractEdge.hxx +++ b/src/INTERP_KERNEL/Geometric2D/AbstractEdge.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,11 +16,8 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef __INTERPKERNELGEO2DABSTRACTEDGE_HXX__ -#define __INTERPKERNELGEO2DABSTRACTEDGE_HXX__ - -#include "INTERPKERNELGEOMETRIC2DDefines.hxx" +#ifndef __ABSTRACTEDGE_HXX__ +#define __ABSTRACTEDGE_HXX__ #include #include @@ -38,7 +35,7 @@ namespace INTERP_KERNEL /*! * Asumption is done with this iterator that we iterate on a container containing more than one edge. */ - class INTERPKERNELGEOMETRIC2D_EXPORT IteratorOnComposedEdge + class IteratorOnComposedEdge { friend class ComposedEdge; friend class ElementaryEdge; diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DBounds.cxx b/src/INTERP_KERNEL/Geometric2D/Bounds.cxx similarity index 92% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DBounds.cxx rename to src/INTERP_KERNEL/Geometric2D/Bounds.cxx index 7b0187162..8e168ea5a 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DBounds.cxx +++ b/src/INTERP_KERNEL/Geometric2D/Bounds.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,11 +16,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#include "InterpKernelGeo2DBounds.hxx" +#include "Bounds.hxx" #include "InterpKernelException.hxx" -#include "InterpKernelGeo2DEdgeArcCircle.hxx" -#include "InterpKernelGeo2DNode.hxx" +#include "EdgeArcCircle.hxx" +#include "Node.hxx" using namespace INTERP_KERNEL; @@ -169,7 +168,7 @@ Position Bounds::nearlyWhere(double x, double y) const bool thinY=Node::areDoubleEquals(_y_min,_y_max); if(!thinX) { - if((Node::areDoubleEquals(x,_x_min) || Node::areDoubleEquals(x,_x_max)) && ((y<_y_max+QUADRATIC_PLANAR::_precision) && (y>_y_min-QUADRATIC_PLANAR::_precision))) + if(Node::areDoubleEquals(x,_x_min) || Node::areDoubleEquals(x,_x_max) && (y<_y_max+QUADRATIC_PLANAR::_precision) && (y>_y_min-QUADRATIC_PLANAR::_precision)) return ON_BOUNDARY_POS; } else @@ -177,7 +176,7 @@ Position Bounds::nearlyWhere(double x, double y) const return OUT; if(!thinY) { - if((Node::areDoubleEquals(y,_y_min) || Node::areDoubleEquals(y,_y_max)) && ((x<_x_max+QUADRATIC_PLANAR::_precision) && (x>_x_min-QUADRATIC_PLANAR::_precision))) + if(Node::areDoubleEquals(y,_y_min) || Node::areDoubleEquals(y,_y_max) && (x<_x_max+QUADRATIC_PLANAR::_precision) && (x>_x_min-QUADRATIC_PLANAR::_precision)) return ON_BOUNDARY_POS; } else diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DBounds.hxx b/src/INTERP_KERNEL/Geometric2D/Bounds.hxx similarity index 94% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DBounds.hxx rename to src/INTERP_KERNEL/Geometric2D/Bounds.hxx index 4df244ba9..49d72dc67 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DBounds.hxx +++ b/src/INTERP_KERNEL/Geometric2D/Bounds.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,13 +16,12 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef __INTERPKERNELGEO2DBOUNDS_HXX__ -#define __INTERPKERNELGEO2DBOUNDS_HXX__ +#ifndef __BOUNDS_HXX__ +#define __BOUNDS_HXX__ #include "INTERPKERNELGEOMETRIC2DDefines.hxx" -#include +#include namespace INTERP_KERNEL { diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.cxx b/src/INTERP_KERNEL/Geometric2D/ComposedEdge.cxx similarity index 72% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.cxx rename to src/INTERP_KERNEL/Geometric2D/ComposedEdge.cxx index 6e13f3055..9909ada8d 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.cxx +++ b/src/INTERP_KERNEL/Geometric2D/ComposedEdge.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,22 +16,21 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#include "InterpKernelGeo2DComposedEdge.hxx" -#include "InterpKernelGeo2DElementaryEdge.hxx" -#include "InterpKernelGeo2DEdgeInfLin.hxx" +#include "ComposedEdge.hxx" +#include "ElementaryEdge.hxx" +#include "EdgeInfLin.hxx" #include "InterpKernelException.hxx" #include -#include #include #include +using namespace std; using namespace INTERP_KERNEL; ComposedEdge::ComposedEdge(const ComposedEdge& other) { - for(std::list::const_iterator iter=other._sub_edges.begin();iter!=other._sub_edges.end();iter++) + for(list::const_iterator iter=other._sub_edges.begin();iter!=other._sub_edges.end();iter++) _sub_edges.push_back((*iter)->clone()); } @@ -42,7 +41,7 @@ ComposedEdge::~ComposedEdge() void ComposedEdge::setValueAt(int i, Edge *e, bool direction) { - std::list::iterator it=_sub_edges.begin(); + list::iterator it=_sub_edges.begin(); for(int j=0;j::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) + for(list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) { if(find_if(other._sub_edges.begin(),other._sub_edges.end(),AbsEdgeCmp(*iter))!=other._sub_edges.end()) { @@ -89,13 +88,13 @@ void ComposedEdge::pushBack(ElementaryEdge *elem) void ComposedEdge::pushBack(ComposedEdge *elem) { - std::list *elemsOfElem=elem->getListBehind(); + list *elemsOfElem=elem->getListBehind(); _sub_edges.insert(_sub_edges.end(),elemsOfElem->begin(),elemsOfElem->end()); } ElementaryEdge *ComposedEdge::operator[](int i) const { - std::list::const_iterator iter=_sub_edges.begin(); + list::const_iterator iter=_sub_edges.begin(); for(int ii=0;ii::iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) + for(list::iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) (*iter)->reverse(); } void ComposedEdge::initLocations() const { - for(std::list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) + for(list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) (*iter)->initLocations(); } @@ -122,7 +121,7 @@ ComposedEdge *ComposedEdge::clone() const bool ComposedEdge::isNodeIn(Node *n) const { bool ret=false; - for(std::list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end() && !ret;iter++) + for(list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end() && !ret;iter++) ret=(*iter)->isNodeIn(n); return ret; } @@ -145,7 +144,7 @@ bool ComposedEdge::isNodeIn(Node *n) const double ComposedEdge::getArea() const { double ret=0.; - for(std::list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) + for(list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) ret+=(*iter)->getAreaOfZone(); return ret; } @@ -153,7 +152,7 @@ double ComposedEdge::getArea() const double ComposedEdge::getPerimeter() const { double ret=0.; - for(std::list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) + for(list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) ret+=(*iter)->getCurveLength(); return ret; } @@ -187,7 +186,7 @@ void ComposedEdge::getBarycenter(double *bary) const bary[0]=0.; bary[1]=0.; double area=0.; - for(std::list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) + for(list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) { (*iter)->getBarycenterOfZone(bary); area+=(*iter)->getAreaOfZone(); @@ -196,26 +195,14 @@ void ComposedEdge::getBarycenter(double *bary) const bary[1]/=area; } -/*! - * Idem ComposedEdge::getBarycenter except that the special case where _sub_edges==1 is dealt here. - */ -void ComposedEdge::getBarycenterGeneral(double *bary) const -{ - if(_sub_edges.empty()) - throw INTERP_KERNEL::Exception("ComposedEdge::getBarycenterGeneral called on an empty polygon !"); - if(_sub_edges.size()>2) - return getBarycenter(bary); - double w; - _sub_edges.back()->getBarycenter(bary,w); -} - -double ComposedEdge::normalize(ComposedEdge *other, double& xBary, double& yBary) +double ComposedEdge::normalize(ComposedEdge *other) { Bounds b; b.prepareForAggregation(); fillBounds(b); other->fillBounds(b); double dimChar=b.getCaracteristicDim(); + double xBary,yBary; b.getBarycenter(xBary,yBary); applyGlobalSimilarity(xBary,yBary,dimChar); other->applyGlobalSimilarity(xBary,yBary,dimChar); @@ -225,7 +212,7 @@ double ComposedEdge::normalize(ComposedEdge *other, double& xBary, double& yBary void ComposedEdge::dumpInXfigFile(std::ostream& stream, int resolution, const Bounds& box) const { stream.precision(10); - for(std::list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) + for(list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) (*iter)->dumpInXfigFile(stream,resolution,box); } @@ -251,7 +238,7 @@ bool ComposedEdge::changeStartNodeWith(Node *node) const void ComposedEdge::fillBounds(Bounds& output) const { - for(std::list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) + for(list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) (*iter)->fillBounds(output); } @@ -260,7 +247,7 @@ void ComposedEdge::fillBounds(Bounds& output) const */ void ComposedEdge::applySimilarity(double xBary, double yBary, double dimChar) { - for(std::list::iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) + for(list::iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) (*iter)->applySimilarity(xBary,yBary,dimChar); } @@ -269,11 +256,11 @@ void ComposedEdge::applySimilarity(double xBary, double yBary, double dimChar) */ void ComposedEdge::applyGlobalSimilarity(double xBary, double yBary, double dimChar) { - std::set allNodes; + set allNodes; getAllNodes(allNodes); - for(std::set::iterator iter=allNodes.begin();iter!=allNodes.end();iter++) + for(set::iterator iter=allNodes.begin();iter!=allNodes.end();iter++) (*iter)->applySimilarity(xBary,yBary,dimChar); - for(std::list::iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) + for(list::iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) (*iter)->applySimilarity(xBary,yBary,dimChar); } @@ -283,7 +270,7 @@ void ComposedEdge::applyGlobalSimilarity(double xBary, double yBary, double dimC */ void ComposedEdge::dispatchPerimeter(double& partConsidered) const { - for(std::list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) + for(list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) { TypeOfEdgeLocInPolygon loc=(*iter)->getLoc(); if(loc==FULL_IN_1 || loc==FULL_ON_1) @@ -296,7 +283,7 @@ void ComposedEdge::dispatchPerimeter(double& partConsidered) const */ void ComposedEdge::dispatchPerimeterExcl(double& partConsidered, double& commonPart) const { - for(std::list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) + for(list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) { TypeOfEdgeLocInPolygon loc=(*iter)->getLoc(); if(loc==FULL_IN_1) @@ -308,7 +295,7 @@ void ComposedEdge::dispatchPerimeterExcl(double& partConsidered, double& commonP void ComposedEdge::getAllNodes(std::set& output) const { - std::list::const_iterator iter=_sub_edges.begin(); + list::const_iterator iter=_sub_edges.begin(); for(;iter!=_sub_edges.end();iter++) (*iter)->getAllNodes(output); } @@ -317,7 +304,7 @@ void ComposedEdge::getBarycenter(double *bary, double& weigh) const { weigh=0.; bary[0]=0.; bary[1]=0.; double tmp1,tmp2[2]; - for(std::list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) + for(list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) { (*iter)->getBarycenter(tmp2,tmp1); weigh+=tmp1; @@ -335,32 +322,32 @@ bool ComposedEdge::isInOrOut(Node *nodeToTest) const if(b.nearlyWhere((*nodeToTest)[0],(*nodeToTest)[1])==OUT) return false; // searching for e1 - std::set nodes; + set nodes; getAllNodes(nodes); - std::set radialDistributionOfNodes; - std::set::const_iterator iter; + set radialDistributionOfNodes; + set::const_iterator iter; for(iter=nodes.begin();iter!=nodes.end();iter++) radialDistributionOfNodes.insert(nodeToTest->getSlope(*(*iter))); - std::vector radialDistrib(radialDistributionOfNodes.begin(),radialDistributionOfNodes.end()); + vector radialDistrib(radialDistributionOfNodes.begin(),radialDistributionOfNodes.end()); radialDistributionOfNodes.clear(); - std::vector radialDistrib2(radialDistrib.size()); + vector radialDistrib2(radialDistrib.size()); copy(radialDistrib.begin()+1,radialDistrib.end(),radialDistrib2.begin()); radialDistrib2.back()=M_PI+radialDistrib.front(); - std::vector radialDistrib3(radialDistrib.size()); - std::transform(radialDistrib2.begin(),radialDistrib2.end(),radialDistrib.begin(),radialDistrib3.begin(),std::minus()); - std::vector::iterator iter3=max_element(radialDistrib3.begin(),radialDistrib3.end()); + vector radialDistrib3(radialDistrib.size()); + transform(radialDistrib2.begin(),radialDistrib2.end(),radialDistrib.begin(),radialDistrib3.begin(),minus()); + vector::iterator iter3=max_element(radialDistrib3.begin(),radialDistrib3.end()); int i=iter3-radialDistrib3.begin(); // ok for e1 - Let's go. EdgeInfLin *e1=new EdgeInfLin(nodeToTest,radialDistrib[i]+radialDistrib3[i]/2.); double ref=e1->getCharactValue(*nodeToTest); - std::set< IntersectElement > inOutSwitch; - for(std::list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) + set< IntersectElement > inOutSwitch; + for(list::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++) { ElementaryEdge *val=(*iter); if(val) { Edge *e=val->getPtr(); - std::auto_ptr intersc(Edge::buildIntersectorWith(e1,e)); + auto_ptr intersc(Edge::buildIntersectorWith(e1,e)); bool obviousNoIntersection,areOverlapped; intersc->areOverlappedOrOnlyColinears(0,obviousNoIntersection,areOverlapped); if(obviousNoIntersection) @@ -369,8 +356,8 @@ bool ComposedEdge::isInOrOut(Node *nodeToTest) const } if(!areOverlapped) { - std::list< IntersectElement > listOfIntesc=intersc->getIntersectionsCharacteristicVal(); - for(std::list< IntersectElement >::iterator iter2=listOfIntesc.begin();iter2!=listOfIntesc.end();iter2++) + list< IntersectElement > listOfIntesc=intersc->getIntersectionsCharacteristicVal(); + for(list< IntersectElement >::iterator iter2=listOfIntesc.begin();iter2!=listOfIntesc.end();iter2++) if((*iter2).isIncludedByBoth()) inOutSwitch.insert(*iter2); } @@ -381,7 +368,7 @@ bool ComposedEdge::isInOrOut(Node *nodeToTest) const } e1->decrRef(); bool ret=false; - for(std::set< IntersectElement >::iterator iter=inOutSwitch.begin();iter!=inOutSwitch.end();iter++) + for(set< IntersectElement >::iterator iter=inOutSwitch.begin();iter!=inOutSwitch.end();iter++) { if((*iter).getVal1()intresincEqCoarse(other); } -void ComposedEdge::clearAll(std::list::iterator startToDel) +void ComposedEdge::clearAll(list::iterator startToDel) { - for(std::list::iterator iter=startToDel;iter!=_sub_edges.end();iter++) + for(list::iterator iter=startToDel;iter!=_sub_edges.end();iter++) delete (*iter); } diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.hxx b/src/INTERP_KERNEL/Geometric2D/ComposedEdge.hxx similarity index 92% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.hxx rename to src/INTERP_KERNEL/Geometric2D/ComposedEdge.hxx index 772585e84..583e4af08 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.hxx +++ b/src/INTERP_KERNEL/Geometric2D/ComposedEdge.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,16 +16,14 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef __INTERPKERNELGEO2DCOMPOSEDNODE_HXX__ -#define __INTERPKERNELGEO2DCOMPOSEDNODE_HXX__ +#ifndef __COMPOSEDNODE_HXX__ +#define __COMPOSEDNODE_HXX__ #include "INTERPKERNELGEOMETRIC2DDefines.hxx" #include #include #include -#include namespace INTERP_KERNEL { @@ -53,8 +51,7 @@ namespace INTERP_KERNEL double getPerimeter() const; double getHydraulicDiameter() const; void getBarycenter(double *bary) const; - void getBarycenterGeneral(double *bary) const; - double normalize(ComposedEdge *other, double& xBary, double& yBary); + double normalize(ComposedEdge *other); void fillBounds(Bounds& output) const; void applySimilarity(double xBary, double yBary, double dimChar); void applyGlobalSimilarity(double xBary, double yBary, double dimChar); diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.cxx b/src/INTERP_KERNEL/Geometric2D/Edge.cxx similarity index 95% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.cxx rename to src/INTERP_KERNEL/Geometric2D/Edge.cxx index 16c5fdd93..334b4d886 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.cxx +++ b/src/INTERP_KERNEL/Geometric2D/Edge.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,16 +16,16 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#include "InterpKernelGeo2DEdge.hxx" -#include "InterpKernelGeo2DEdgeLin.hxx" -#include "InterpKernelGeo2DEdgeInfLin.hxx" +#include "Edge.hxx" +#include "EdgeLin.hxx" +#include "EdgeInfLin.hxx" //#include "EdgeParabol.hxx" -#include "InterpKernelGeo2DEdgeArcCircle.hxx" +#include "EdgeArcCircle.hxx" #include "InterpKernelException.hxx" #include +using namespace std; using namespace INTERP_KERNEL; MergePoints::MergePoints():_ass1Start1(0),_ass1End1(0),_ass1Start2(0),_ass1End2(0), @@ -303,8 +303,8 @@ bool IntersectElement::isIncludedByBoth() const bool EdgeIntersector::intersect(const Bounds *whereToFind, std::vector& newNodes, bool& order, MergePoints& commonNode) { - std::list< IntersectElement > listOfIntesc=getIntersectionsCharacteristicVal(); - std::list< IntersectElement >::iterator iter; + list< IntersectElement > listOfIntesc=getIntersectionsCharacteristicVal(); + list< IntersectElement >::iterator iter; for(iter=listOfIntesc.begin();iter!=listOfIntesc.end();) { if((*iter).isOnMergedExtremity()) @@ -342,10 +342,10 @@ bool EdgeIntersector::intersect(const Bounds *whereToFind, std::vector& } else { - std::vector vecOfIntesc(listOfIntesc.begin(),listOfIntesc.end()); + vector vecOfIntesc(listOfIntesc.begin(),listOfIntesc.end()); listOfIntesc.clear(); sort(vecOfIntesc.begin(),vecOfIntesc.end()); - for(std::vector::iterator iterV=vecOfIntesc.begin();iterV!=vecOfIntesc.end();iterV++) + for(vector::iterator iterV=vecOfIntesc.begin();iterV!=vecOfIntesc.end();iterV++) newNodes.push_back((*iterV).getNodeAndReleaseIt()); order=vecOfIntesc.front().isLowerOnOther(vecOfIntesc.back()); } @@ -532,10 +532,10 @@ void Edge::addSubEdgeInVector(Node *start, Node *end, ComposedEdge& vec) const */ void Edge::getNormalVector(double *vectOutput) const { - std::copy((const double *)(*_end),(const double *)(*_end)+2,vectOutput); - std::transform(vectOutput,vectOutput+2,(const double *)(*_start),vectOutput,std::minus()); + copy((const double *)(*_end),(const double *)(*_end)+2,vectOutput); + transform(vectOutput,vectOutput+2,(const double *)(*_start),vectOutput,minus()); double norm=1./Node::norm(vectOutput); - std::transform(vectOutput,vectOutput+2,vectOutput,bind2nd(std::multiplies(),norm)); + transform(vectOutput,vectOutput+2,vectOutput,bind2nd(multiplies(),norm)); double tmp=vectOutput[0]; vectOutput[0]=vectOutput[1]; vectOutput[1]=-tmp; @@ -607,7 +607,7 @@ void Edge::interpolate1DLin(const std::vector& distrib1, const std::vect MergePoints commonNode; for(int i=0;i::const_iterator iter=find_if(distrib2.begin()+1,distrib2.end(),bind2nd(std::greater_equal(),distrib1[i])); + vector::const_iterator iter=find_if(distrib2.begin()+1,distrib2.end(),bind2nd(greater_equal(),distrib1[i])); if(iter!=distrib2.end()) { for(int j=(iter-1)-distrib2.begin();j newNodes; + vector newNodes; bool order; if(intersector->intersect(whereToFind,newNodes,order,commonNode)) { if(newNodes.empty()) throw Exception("Internal error occured - error in intersector implementation!");// This case should never happen - std::vector::iterator iter=newNodes.begin(); - std::vector::reverse_iterator iterR=newNodes.rbegin(); + vector::iterator iter=newNodes.begin(); + vector::reverse_iterator iterR=newNodes.rbegin(); f1->addSubEdgeInVector(f1->getStartNode(),*iter,outValForF1); f2->addSubEdgeInVector(f2->getStartNode(),order?*iter:*iterR,outValForF2); - for(std::vector::iterator iter=newNodes.begin();iter!=newNodes.end();iter++,iterR++) + for(vector::iterator iter=newNodes.begin();iter!=newNodes.end();iter++,iterR++) { if((iter+1)==newNodes.end()) { diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.hxx b/src/INTERP_KERNEL/Geometric2D/Edge.hxx similarity index 98% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.hxx rename to src/INTERP_KERNEL/Geometric2D/Edge.hxx index a02ca807a..3aff6efce 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.hxx +++ b/src/INTERP_KERNEL/Geometric2D/Edge.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,15 +16,14 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef __INTERPKERNELGEO2DEDGE_HXX__ -#define __INTERPKERNELGEO2DEDGE_HXX__ +#ifndef __EDGE_HXX__ +#define __EDGE_HXX__ #include "INTERPKERNELGEOMETRIC2DDefines.hxx" -#include "InterpKernelGeo2DComposedEdge.hxx" +#include "ComposedEdge.hxx" #include "InterpKernelException.hxx" -#include "InterpKernelGeo2DBounds.hxx" -#include "InterpKernelGeo2DNode.hxx" +#include "Bounds.hxx" +#include "Node.hxx" #include #include diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.txx b/src/INTERP_KERNEL/Geometric2D/Edge.txx similarity index 85% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.txx rename to src/INTERP_KERNEL/Geometric2D/Edge.txx index 68387e094..6a3f80f5b 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.txx +++ b/src/INTERP_KERNEL/Geometric2D/Edge.txx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,10 +16,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef __INTERPKERNELGEO2DEDGE_TXX__ -#define __INTERPKERNELGEO2DEDGE_TXX__ +#ifndef __EDGE_TXX__ +#define __EDGE_TXX__ -#include "InterpKernelGeo2DEdgeArcCircle.hxx" +#include "EdgeArcCircle.hxx" template INTERP_KERNEL::Edge *INTERP_KERNEL::Edge::buildEdgeFrom(Node *start, Node *middle, Node *end) diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.cxx b/src/INTERP_KERNEL/Geometric2D/EdgeArcCircle.cxx similarity index 99% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.cxx rename to src/INTERP_KERNEL/Geometric2D/EdgeArcCircle.cxx index f427aaace..f65ab1510 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.cxx +++ b/src/INTERP_KERNEL/Geometric2D/EdgeArcCircle.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,15 +16,15 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#include "InterpKernelGeo2DEdgeArcCircle.hxx" -#include "InterpKernelGeo2DEdgeLin.hxx" +#include "EdgeArcCircle.hxx" +#include "EdgeLin.hxx" #include "InterpKernelException.hxx" -#include "InterpKernelGeo2DNode.hxx" +#include "Node.hxx" #include #include +using namespace std; using namespace INTERP_KERNEL; ArcCArcCIntersector::ArcCArcCIntersector(const EdgeArcCircle& e1, const EdgeArcCircle& e2):SameTypeEdgeIntersector(e1,e2),_dist(0.) @@ -153,7 +153,7 @@ bool ArcCArcCIntersector::areArcsOverlapped(const EdgeArcCircle& a1, const EdgeA a=EdgeArcCircle::normalizeAngle(phi-angle0L+M_PI); if(EdgeArcCircle::isIn2Pi(angle0L,angleL,a)) cmpContainer[sizeOfCmpContainer++]=cst-cst2; - a=*std::max_element(cmpContainer,cmpContainer+sizeOfCmpContainer); + a=*max_element(cmpContainer,cmpContainer+sizeOfCmpContainer); return Node::areDoubleEqualsWP(a,1.,2.); } @@ -507,7 +507,7 @@ void EdgeArcCircle::dumpInXfigFile(std::ostream& stream, bool direction, int res middle->dumpInXfigFile(stream,resolution,box); middle->decrRef(); direction?_end->dumpInXfigFile(stream,resolution,box):_start->dumpInXfigFile(stream,resolution,box); - stream << std::endl; + stream << endl; } void EdgeArcCircle::update(Node *m) diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.hxx b/src/INTERP_KERNEL/Geometric2D/EdgeArcCircle.hxx similarity index 92% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.hxx rename to src/INTERP_KERNEL/Geometric2D/EdgeArcCircle.hxx index d3a2fefcd..b3a4a3e20 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.hxx +++ b/src/INTERP_KERNEL/Geometric2D/EdgeArcCircle.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,16 +16,14 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +#ifndef __EDGEARCCIRCLE_HXX__ +#define __EDGEARCCIRCLE_HXX__ -#ifndef __INTERPKERNELGEO2DEDGEARCCIRCLE_HXX__ -#define __INTERPKERNELGEO2DEDGEARCCIRCLE_HXX__ - -#include "INTERPKERNELGEOMETRIC2DDefines.hxx" -#include "InterpKernelGeo2DEdge.hxx" +#include "Edge.hxx" namespace INTERP_KERNEL { - class INTERPKERNELGEOMETRIC2D_EXPORT ArcCArcCIntersector : public SameTypeEdgeIntersector + class ArcCArcCIntersector : public SameTypeEdgeIntersector { public: ArcCArcCIntersector(const EdgeArcCircle& e1, const EdgeArcCircle& e2); @@ -44,7 +42,7 @@ namespace INTERP_KERNEL double _dist; }; - class INTERPKERNELGEOMETRIC2D_EXPORT ArcCSegIntersector : public CrossTypeEdgeIntersector + class ArcCSegIntersector : public CrossTypeEdgeIntersector { public: ArcCSegIntersector(const EdgeArcCircle& e1, const EdgeLin& e2, bool reverse=true); @@ -63,7 +61,7 @@ namespace INTERP_KERNEL double _determinant; }; - class INTERPKERNELGEOMETRIC2D_EXPORT EdgeArcCircle : public Edge + class EdgeArcCircle : public Edge { public: EdgeArcCircle(std::istream& lineInXfig); diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeInfLin.cxx b/src/INTERP_KERNEL/Geometric2D/EdgeInfLin.cxx similarity index 91% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeInfLin.cxx rename to src/INTERP_KERNEL/Geometric2D/EdgeInfLin.cxx index 9298af554..2f3fd9da5 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeInfLin.cxx +++ b/src/INTERP_KERNEL/Geometric2D/EdgeInfLin.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,8 +16,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#include "InterpKernelGeo2DEdgeInfLin.hxx" +#include "EdgeInfLin.hxx" using namespace INTERP_KERNEL; diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeInfLin.hxx b/src/INTERP_KERNEL/Geometric2D/EdgeInfLin.hxx similarity index 88% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeInfLin.hxx rename to src/INTERP_KERNEL/Geometric2D/EdgeInfLin.hxx index 157386825..d600b7701 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeInfLin.hxx +++ b/src/INTERP_KERNEL/Geometric2D/EdgeInfLin.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,11 +16,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +#ifndef __EDGEINFLIN_HXX__ +#define __EDGEINFLIN_HXX__ -#ifndef __INTERPKERNELGEO2DEDGEINFLIN_HXX__ -#define __INTERPKERNELGEO2DEDGEINFLIN_HXX__ - -#include "InterpKernelGeo2DEdgeLin.hxx" +#include "EdgeLin.hxx" namespace INTERP_KERNEL { diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.cxx b/src/INTERP_KERNEL/Geometric2D/EdgeLin.cxx similarity index 97% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.cxx rename to src/INTERP_KERNEL/Geometric2D/EdgeLin.cxx index fa7de64f8..92f051610 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.cxx +++ b/src/INTERP_KERNEL/Geometric2D/EdgeLin.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,11 +16,11 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#include "InterpKernelGeo2DEdgeLin.hxx" -#include "InterpKernelGeo2DNode.hxx" +#include "EdgeLin.hxx" +#include "Node.hxx" #include "InterpKernelException.hxx" +using namespace std; using namespace INTERP_KERNEL; namespace INTERP_KERNEL @@ -209,10 +209,10 @@ void EdgeLin::dumpInXfigFile(std::ostream& stream, bool direction, int resolutio { stream << "2 1 0 1 "; fillXfigStreamForLoc(stream); - stream << " 7 50 -1 -1 0.000 0 0 -1 0 0 2" << std::endl; + stream << " 7 50 -1 -1 0.000 0 0 -1 0 0 2" << endl; direction?_start->dumpInXfigFile(stream,resolution,box):_end->dumpInXfigFile(stream,resolution,box); direction?_end->dumpInXfigFile(stream,resolution,box):_start->dumpInXfigFile(stream,resolution,box); - stream << std::endl; + stream << endl; } void EdgeLin::update(Node *m) diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.hxx b/src/INTERP_KERNEL/Geometric2D/EdgeLin.hxx similarity index 91% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.hxx rename to src/INTERP_KERNEL/Geometric2D/EdgeLin.hxx index 8221eb5ed..0c11ae39b 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.hxx +++ b/src/INTERP_KERNEL/Geometric2D/EdgeLin.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,12 +16,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +#ifndef __EDGELIN_HXX__ +#define __EDGELIN_HXX__ -#ifndef __INTERPKERNELGEO2DEDGELIN_HXX__ -#define __INTERPKERNELGEO2DEDGELIN_HXX__ - -#include "INTERPKERNELGEOMETRIC2DDefines.hxx" -#include "InterpKernelGeo2DEdge.hxx" +#include "Edge.hxx" namespace INTERP_KERNEL { @@ -44,7 +42,7 @@ namespace INTERP_KERNEL double _matrix[4];//SPACEDIM*SPACEDIM }; - class INTERPKERNELGEOMETRIC2D_EXPORT EdgeLin : public Edge + class EdgeLin : public Edge { friend class SegSegIntersector; public: diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DElementaryEdge.cxx b/src/INTERP_KERNEL/Geometric2D/ElementaryEdge.cxx similarity index 97% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DElementaryEdge.cxx rename to src/INTERP_KERNEL/Geometric2D/ElementaryEdge.cxx index eae4a4051..b26422084 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DElementaryEdge.cxx +++ b/src/INTERP_KERNEL/Geometric2D/ElementaryEdge.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,10 +16,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#include "InterpKernelGeo2DElementaryEdge.hxx" +#include "ElementaryEdge.hxx" #include "InterpKernelException.hxx" -#include "InterpKernelGeo2DEdge.hxx" +#include "Edge.hxx" using namespace INTERP_KERNEL; diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DElementaryEdge.hxx b/src/INTERP_KERNEL/Geometric2D/ElementaryEdge.hxx similarity index 93% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DElementaryEdge.hxx rename to src/INTERP_KERNEL/Geometric2D/ElementaryEdge.hxx index 11168621a..19f4e1968 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DElementaryEdge.hxx +++ b/src/INTERP_KERNEL/Geometric2D/ElementaryEdge.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,14 +16,13 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef __INTERPKERNELGEO2DELEMENTARYEDGE_HXX__ -#define __INTERPKERNELGEO2DELEMENTARYEDGE_HXX__ +#ifndef __ELEMENTARYEDGE_HXX__ +#define __ELEMENTARYEDGE_HXX__ #include "INTERPKERNELGEOMETRIC2DDefines.hxx" #include "InterpKernelException.hxx" -#include "InterpKernelGeo2DAbstractEdge.hxx" -#include "InterpKernelGeo2DEdge.hxx" +#include "AbstractEdge.hxx" +#include "Edge.hxx" namespace INTERP_KERNEL { diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.cxx b/src/INTERP_KERNEL/Geometric2D/Node.cxx similarity index 96% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.cxx rename to src/INTERP_KERNEL/Geometric2D/Node.cxx index d95825f74..fb64ded3c 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.cxx +++ b/src/INTERP_KERNEL/Geometric2D/Node.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,10 +16,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +#include "Node.hxx" +#include "EdgeArcCircle.hxx" -#include "InterpKernelGeo2DNode.hxx" -#include "InterpKernelGeo2DEdgeArcCircle.hxx" - +using namespace std; using namespace INTERP_KERNEL; Node::Node(double x, double y):_cnt(1),_loc(UNKNOWN) diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.hxx b/src/INTERP_KERNEL/Geometric2D/Node.hxx similarity index 95% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.hxx rename to src/INTERP_KERNEL/Geometric2D/Node.hxx index e58d62061..46957dac0 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.hxx +++ b/src/INTERP_KERNEL/Geometric2D/Node.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,11 +16,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +#ifndef __NODE_HXX__ +#define __NODE_HXX__ -#ifndef __INTERPKERNELGEO2DNODE_HXX__ -#define __INTERPKERNELGEO2DNODE_HXX__ - -#include "InterpKernelGeo2DPrecision.hxx" +#include "Precision.hxx" #include "INTERPKERNELGEOMETRIC2DDefines.hxx" #include diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DPrecision.cxx b/src/INTERP_KERNEL/Geometric2D/Precision.cxx similarity index 93% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DPrecision.cxx rename to src/INTERP_KERNEL/Geometric2D/Precision.cxx index cba6e5881..1e4f3510c 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DPrecision.cxx +++ b/src/INTERP_KERNEL/Geometric2D/Precision.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,8 +16,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#include "InterpKernelGeo2DPrecision.hxx" +#include "Precision.hxx" double INTERP_KERNEL::QUADRATIC_PLANAR::_precision=1e-14; diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DPrecision.hxx b/src/INTERP_KERNEL/Geometric2D/Precision.hxx similarity index 89% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DPrecision.hxx rename to src/INTERP_KERNEL/Geometric2D/Precision.hxx index 371a85e22..31fa8f60a 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DPrecision.hxx +++ b/src/INTERP_KERNEL/Geometric2D/Precision.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,9 +16,8 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef __INTERPKERNELGEO2DPRECISION_HXX__ -#define __INTERPKERNELGEO2DPRECISION_HXX__ +#ifndef __PRECISION_HXX__ +#define __PRECISION_HXX__ #include "INTERPKERNELGEOMETRIC2DDefines.hxx" diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx b/src/INTERP_KERNEL/Geometric2D/QuadraticPolygon.cxx similarity index 77% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx rename to src/INTERP_KERNEL/Geometric2D/QuadraticPolygon.cxx index ef38d42ce..d8faa8a4c 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx +++ b/src/INTERP_KERNEL/Geometric2D/QuadraticPolygon.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,20 +16,18 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#include "InterpKernelGeo2DQuadraticPolygon.hxx" -#include "InterpKernelGeo2DElementaryEdge.hxx" -#include "InterpKernelGeo2DEdgeArcCircle.hxx" -#include "InterpKernelGeo2DAbstractEdge.hxx" -#include "InterpKernelGeo2DEdgeLin.hxx" -#include "InterpKernelGeo2DBounds.hxx" -#include "InterpKernelGeo2DEdge.txx" +#include "QuadraticPolygon.hxx" +#include "ElementaryEdge.hxx" +#include "EdgeArcCircle.hxx" +#include "AbstractEdge.hxx" +#include "EdgeLin.hxx" +#include "Bounds.hxx" +#include "Edge.txx" #include #include -#include -#include +using namespace std; using namespace INTERP_KERNEL; namespace INTERP_KERNEL @@ -40,8 +38,8 @@ namespace INTERP_KERNEL QuadraticPolygon::QuadraticPolygon(const char *file) { char currentLine[MAX_SIZE_OF_LINE_XFIG_FILE]; - std::ifstream stream(file); - stream.exceptions(std::ios_base::eofbit); + ifstream stream(file); + stream.exceptions(ios_base::eofbit); try { do @@ -56,7 +54,7 @@ QuadraticPolygon::QuadraticPolygon(const char *file) } while(1); } - catch(std::ifstream::failure&) + catch(ifstream::failure& e) { } front()->changeStartNodeWith(back()->getEndNode()); @@ -101,16 +99,16 @@ QuadraticPolygon *QuadraticPolygon::buildArcCirclePolygon(std::vector& n void QuadraticPolygon::buildDbgFile(const std::vector& nodes, const char *fileName) { - std::ofstream file(fileName); - file << std::setprecision(16); - file << " double coords[]=" << std::endl << " { "; - for(std::vector::const_iterator iter=nodes.begin();iter!=nodes.end();iter++) + ofstream file(fileName); + file << setprecision(16); + file << " double coords[]=" << endl << " { "; + for(vector::const_iterator iter=nodes.begin();iter!=nodes.end();iter++) { if(iter!=nodes.begin()) - file << "," << std::endl << " "; + file << "," << endl << " "; file << (*(*iter))[0] << ", " << (*(*iter))[1]; } - file << "};" << std::endl; + file << "};" << endl; } void QuadraticPolygon::closeMe() const @@ -129,35 +127,9 @@ void QuadraticPolygon::circularPermute() } } -bool QuadraticPolygon::isButterfly() const -{ - for(std::list::const_iterator it=_sub_edges.begin();it!=_sub_edges.end();it++) - { - Edge *e1=(*it)->getPtr(); - std::list::const_iterator it2=it; - it2++; - for(;it2!=_sub_edges.end();it2++) - { - MergePoints commonNode; - ComposedEdge *outVal1=new ComposedEdge; - ComposedEdge *outVal2=new ComposedEdge; - Edge *e2=(*it2)->getPtr(); - if(e1->intersectWith(e2,commonNode,*outVal1,*outVal2)) - { - Delete(outVal1); - Delete(outVal2); - return true; - } - Delete(outVal1); - Delete(outVal2); - } - } - return false; -} - void QuadraticPolygon::dumpInXfigFileWithOther(const ComposedEdge& other, const char *fileName) const { - std::ofstream file(fileName); + ofstream file(fileName); const int resolution=1200; Bounds box; box.prepareForAggregation(); @@ -169,7 +141,7 @@ void QuadraticPolygon::dumpInXfigFileWithOther(const ComposedEdge& other, const void QuadraticPolygon::dumpInXfigFile(const char *fileName) const { - std::ofstream file(fileName); + ofstream file(fileName); const int resolution=1200; Bounds box; box.prepareForAggregation(); @@ -179,15 +151,15 @@ void QuadraticPolygon::dumpInXfigFile(const char *fileName) const void QuadraticPolygon::dumpInXfigFile(std::ostream& stream, int resolution, const Bounds& box) const { - stream << "#FIG 3.2 Produced by xfig version 3.2.5-alpha5" << std::endl; - stream << "Landscape" << std::endl; - stream << "Center" << std::endl; - stream << "Metric" << std::endl; - stream << "Letter" << std::endl; - stream << "100.00" << std::endl; - stream << "Single" << std::endl; - stream << "-2" << std::endl; - stream << resolution << " 2" << std::endl; + stream << "#FIG 3.2 Produced by xfig version 3.2.5-alpha5" << endl; + stream << "Landscape" << endl; + stream << "Center" << endl; + stream << "Metric" << endl; + stream << "Letter" << endl; + stream << "100.00" << endl; + stream << "Single" << endl; + stream << "-2" << endl; + stream << resolution << " 2" << endl; ComposedEdge::dumpInXfigFile(stream,resolution,box); } @@ -196,10 +168,10 @@ void QuadraticPolygon::dumpInXfigFile(std::ostream& stream, int resolution, cons */ double QuadraticPolygon::intersectWithAbs(QuadraticPolygon& other) { - double ret=0.,xBaryBB,yBaryBB; - double fact=normalize(&other,xBaryBB,yBaryBB); - std::vector polygs=intersectMySelfWith(other); - for(std::vector::iterator iter=polygs.begin();iter!=polygs.end();iter++) + double ret=0.; + double fact=normalize(&other); + vector polygs=intersectMySelfWith(other); + for(vector::iterator iter=polygs.begin();iter!=polygs.end();iter++) { ret+=fabs((*iter)->getArea()); delete *iter; @@ -207,33 +179,6 @@ double QuadraticPolygon::intersectWithAbs(QuadraticPolygon& other) return ret*fact*fact; } -/*! - * Warning contrary to intersectWith method this method is \b NOT const. 'this' and 'other' are modified after call of this method. - */ -double QuadraticPolygon::intersectWithAbs(QuadraticPolygon& other, double* barycenter) -{ - double ret=0.,bary[2],area,xBaryBB,yBaryBB; - barycenter[0] = barycenter[1] = 0.; - double fact=normalize(&other,xBaryBB,yBaryBB); - std::vector polygs=intersectMySelfWith(other); - for(std::vector::iterator iter=polygs.begin();iter!=polygs.end();iter++) - { - area=fabs((*iter)->getArea()); - (*iter)->getBarycenter(bary); - delete *iter; - ret+=area; - barycenter[0] += bary[0]*area; - barycenter[1] += bary[1]*area; - } - if ( ret > std::numeric_limits::min() ) - { - barycenter[0]=barycenter[0]/ret*fact+xBaryBB; - barycenter[1]=barycenter[1]/ret*fact+yBaryBB; - - } - return ret*fact*fact; -} - /*! * \b WARNING this method is const and other is const too. \b BUT location of Edges in 'this' and 'other' are nevertheless modified. * This is possible because loc attribute in Edge class is mutable. @@ -242,8 +187,8 @@ double QuadraticPolygon::intersectWithAbs(QuadraticPolygon& other, double* baryc double QuadraticPolygon::intersectWith(const QuadraticPolygon& other) const { double ret=0.; - std::vector polygs=intersectMySelfWith(other); - for(std::vector::iterator iter=polygs.begin();iter!=polygs.end();iter++) + vector polygs=intersectMySelfWith(other); + for(vector::iterator iter=polygs.begin();iter!=polygs.end();iter++) { ret+=fabs((*iter)->getArea()); delete *iter; @@ -251,33 +196,6 @@ double QuadraticPolygon::intersectWith(const QuadraticPolygon& other) const return ret; } -/*! - * \b WARNING this method is const and other is const too. \b BUT location of Edges in 'this' and 'other' are nevertheless modified. - * This is possible because loc attribute in Edge class is mutable. - * This implies that if 'this' or/and 'other' are reused for intersect* method initLocations has to be called on each of this/them. - */ -double QuadraticPolygon::intersectWith(const QuadraticPolygon& other, double* barycenter) const -{ - double ret=0., bary[2]; - barycenter[0] = barycenter[1] = 0.; - std::vector polygs=intersectMySelfWith(other); - for(std::vector::iterator iter=polygs.begin();iter!=polygs.end();iter++) - { - double area = fabs((*iter)->getArea()); - (*iter)->getBarycenter(bary); - delete *iter; - ret+=area; - barycenter[0] += bary[0]*area; - barycenter[1] += bary[1]*area; - } - if ( ret > std::numeric_limits::min() ) - { - barycenter[0] /= ret; - barycenter[1] /= ret; - } - return ret; -} - /*! * \b WARNING this method is const and other is const too. \b BUT location of Edges in 'this' and 'other' are nevertheless modified. * This is possible because loc attribute in Edge class is mutable. @@ -450,8 +368,8 @@ void QuadraticPolygon::performLocatingOperation(QuadraticPolygon& pol2) const */ std::vector QuadraticPolygon::buildIntersectionPolygons(const QuadraticPolygon& pol1, const QuadraticPolygon& pol2) const { - std::vector ret; - std::list pol2Zip=pol2.zipConsecutiveInSegments(); + vector ret; + list pol2Zip=pol2.zipConsecutiveInSegments(); if(!pol2Zip.empty()) closePolygons(pol2Zip,pol1,ret); else @@ -473,7 +391,7 @@ std::vector QuadraticPolygon::buildIntersectionPolygons(cons */ std::list QuadraticPolygon::zipConsecutiveInSegments() const { - std::list ret; + list ret; IteratorOnComposedEdge it((ComposedEdge *)this); int nbOfTurns=recursiveSize(); int i=0; @@ -514,7 +432,7 @@ void QuadraticPolygon::closePolygons(std::list& pol2Zip, con { bool directionKnownInPol1=false; bool directionInPol1; - for(std::list::iterator iter=pol2Zip.begin();iter!=pol2Zip.end();) + for(list::iterator iter=pol2Zip.begin();iter!=pol2Zip.end();) { if((*iter)->completed()) { @@ -524,14 +442,12 @@ void QuadraticPolygon::closePolygons(std::list& pol2Zip, con continue; } if(!directionKnownInPol1) - { - if(!(*iter)->amIAChanceToBeCompletedBy(pol1,*this,directionInPol1)) - { delete *iter; iter=pol2Zip.erase(iter); continue; } - else - directionKnownInPol1=true; - } - std::list::iterator iter2=iter; iter2++; - std::list::iterator iter3=(*iter)->fillAsMuchAsPossibleWith(pol1,iter2,pol2Zip.end(),directionInPol1); + if(!(*iter)->amIAChanceToBeCompletedBy(pol1,*this,directionInPol1)) + { delete *iter; iter=pol2Zip.erase(iter); continue; } + else + directionKnownInPol1=true; + list::iterator iter2=iter; iter2++; + list::iterator iter3=(*iter)->fillAsMuchAsPossibleWith(pol1,iter2,pol2Zip.end(),directionInPol1); if(iter3!=pol2Zip.end()) { (*iter)->pushBack(*iter3); @@ -630,7 +546,7 @@ std::list::iterator QuadraticPolygon::fillAsMuchAsPossibleWi std::list::iterator QuadraticPolygon::checkInList(Node *n, std::list::iterator iStart, std::list::iterator iEnd) { - for(std::list::iterator iter=iStart;iter!=iEnd;iter++) + for(list::iterator iter=iStart;iter!=iEnd;iter++) if((*iter)->isNodeIn(n)) return iter; return iEnd; diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.hxx b/src/INTERP_KERNEL/Geometric2D/QuadraticPolygon.hxx similarity index 89% rename from src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.hxx rename to src/INTERP_KERNEL/Geometric2D/QuadraticPolygon.hxx index 52f985b91..78977ecf5 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.hxx +++ b/src/INTERP_KERNEL/Geometric2D/QuadraticPolygon.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,15 +16,14 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef __INTERPKERNELGEO2DQUADRATICPOLYGON_HXX__ -#define __INTERPKERNELGEO2DQUADRATICPOLYGON_HXX__ +#ifndef __QUADRATICPOLYGON_HXX__ +#define __QUADRATICPOLYGON_HXX__ #include "INTERPKERNELGEOMETRIC2DDefines.hxx" -#include "InterpKernelGeo2DComposedEdge.hxx" -#include "InterpKernelGeo2DAbstractEdge.hxx" -#include "InterpKernelGeo2DElementaryEdge.hxx" +#include "ComposedEdge.hxx" +#include "AbstractEdge.hxx" +#include "ElementaryEdge.hxx" #include #include @@ -46,15 +45,11 @@ namespace INTERP_KERNEL ~QuadraticPolygon(); void closeMe() const; void circularPermute(); - bool isButterfly() const; void dumpInXfigFile(const char *fileName) const; void dumpInXfigFileWithOther(const ComposedEdge& other, const char *fileName) const; //! Before intersecting as intersectWith a normalization is done. double intersectWithAbs(QuadraticPolygon& other); - //! Before intersecting as intersectWith a normalization is done. - double intersectWithAbs(QuadraticPolygon& other, double* barycenter); double intersectWith(const QuadraticPolygon& other) const; - double intersectWith(const QuadraticPolygon& other, double* barycenter) const; std::vector intersectMySelfWith(const QuadraticPolygon& other) const; void intersectForPerimeter(const QuadraticPolygon& other, double& perimeterThisPart, double& perimeterOtherPart, double& perimeterCommonPart) const; void intersectForPerimeterAdvanced(const QuadraticPolygon& other, std::vector< double >& polThis, std::vector< double >& polOther) const; diff --git a/src/INTERP_KERNEL/IntegralUniformIntersector.hxx b/src/INTERP_KERNEL/IntegralUniformIntersector.hxx deleted file mode 100644 index e7fe7e9f2..000000000 --- a/src/INTERP_KERNEL/IntegralUniformIntersector.hxx +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __INTEGRALUNIFORMINTERSECTOR_HXX__ -#define __INTEGRALUNIFORMINTERSECTOR_HXX__ - -#include "TargetIntersector.hxx" - -#include - -namespace INTERP_KERNEL -{ - template - class IntegralUniformIntersector : public TargetIntersector - { - public: - typedef typename MyMeshType::MyConnType ConnType; - public: - IntegralUniformIntersector(const MyMeshType& mesh, bool isAbs); - double performNormalization(double val) const { if(_is_abs) return fabs(val); else return val; } - void setFromTo(bool val) { _from_to=val; } - void putValueIn(ConnType i, double val, MyMatrix& res) const; - protected: - const MyMeshType& _mesh; - //! if false means fromIntegralUniform if true means toIntegralUniform - bool _from_to; - bool _is_abs; - }; - - template - class IntegralUniformIntersectorP0 : public IntegralUniformIntersector - { - public: - typedef typename MyMeshType::MyConnType ConnType; - public: - IntegralUniformIntersectorP0(const MyMeshType& mesh, bool isAbs); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; - void intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res); - }; - - template - class IntegralUniformIntersectorP1 : public IntegralUniformIntersector - { - public: - typedef typename MyMeshType::MyConnType ConnType; - public: - IntegralUniformIntersectorP1(const MyMeshType& mesh, bool isAbs); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; - void intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res); - }; -} - -#endif diff --git a/src/INTERP_KERNEL/IntegralUniformIntersector.txx b/src/INTERP_KERNEL/IntegralUniformIntersector.txx deleted file mode 100644 index 334d9e0b0..000000000 --- a/src/INTERP_KERNEL/IntegralUniformIntersector.txx +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __INTEGRALUNIFORMINTERSECTOR_TXX__ -#define __INTEGRALUNIFORMINTERSECTOR_TXX__ - -#include "IntegralUniformIntersector.hxx" -#include "VolSurfUser.txx" - -namespace INTERP_KERNEL -{ - template - IntegralUniformIntersector::IntegralUniformIntersector(const MyMeshType& mesh, bool isAbs):_mesh(mesh),_from_to(false),_is_abs(isAbs) - { - } - - template - void IntegralUniformIntersector::putValueIn(ConnType iInCMode, double val1, MyMatrix& res) const - { - static const NumberingPolicy numPol=MyMeshType::My_numPol; - double val=performNormalization(val1); - if(_from_to) - { - typename MyMatrix::value_type& resRow=res[0]; - typename MyMatrix::value_type::const_iterator iterRes=resRow.find(OTT::indFC(iInCMode)); - if(iterRes==resRow.end()) - resRow.insert(std::make_pair(OTT::indFC(iInCMode),val)); - else - { - double val2=(*iterRes).second+val; - resRow.erase(OTT::indFC(iInCMode)); - resRow.insert(std::make_pair(OTT::indFC(iInCMode),val2)); - } - } - else - { - typename MyMatrix::value_type& resRow=res[iInCMode]; - typename MyMatrix::value_type::const_iterator iterRes=resRow.find(OTT::indFC(0)); - if(iterRes==resRow.end()) - resRow.insert(std::make_pair(OTT::indFC(0),val)); - else - { - double val2=(*iterRes).second+val; - resRow.erase(OTT::indFC(0)); - resRow.insert(std::make_pair(OTT::indFC(0),val2)); - } - } - } - - template - IntegralUniformIntersectorP0::IntegralUniformIntersectorP0(const MyMeshType& mesh, bool isAbs):IntegralUniformIntersector(mesh,isAbs) - { - } - - template - int IntegralUniformIntersectorP0::getNumberOfRowsOfResMatrix() const - { - if(IntegralUniformIntersector::_from_to) - return 1; - else - return IntegralUniformIntersector::_mesh.getNumberOfElements(); - } - - template - int IntegralUniformIntersectorP0::getNumberOfColsOfResMatrix() const - { - if(IntegralUniformIntersector::_from_to) - return IntegralUniformIntersector::_mesh.getNumberOfElements(); - else - return 1; - } - - template - void IntegralUniformIntersectorP0::intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res) - { - static const NumberingPolicy numPol=MyMeshType::My_numPol; - res.resize(getNumberOfRowsOfResMatrix()); - unsigned long nbelem=IntegralUniformIntersector::_mesh.getNumberOfElements(); - const ConnType *connIndx=IntegralUniformIntersector::_mesh.getConnectivityIndexPtr(); - const ConnType *conn=IntegralUniformIntersector::_mesh.getConnectivityPtr(); - const double *coords=IntegralUniformIntersector::_mesh.getCoordinatesPtr(); - for(unsigned long i=0;i::_mesh.getTypeOfElement(OTT::indFC(i)); - double val=computeVolSurfOfCell(t,conn+OTT::ind2C(connIndx[i]),connIndx[i+1]-connIndx[i],coords); - IntegralUniformIntersector::putValueIn(i,val,res); - } - } - - template - IntegralUniformIntersectorP1::IntegralUniformIntersectorP1(const MyMeshType& mesh, bool isAbs):IntegralUniformIntersector(mesh,isAbs) - { - } - - template - int IntegralUniformIntersectorP1::getNumberOfRowsOfResMatrix() const - { - if(IntegralUniformIntersector::_from_to) - return 1; - else - return IntegralUniformIntersector::_mesh.getNumberOfNodes(); - } - - template - int IntegralUniformIntersectorP1::getNumberOfColsOfResMatrix() const - { - if(IntegralUniformIntersector::_from_to) - return IntegralUniformIntersector::_mesh.getNumberOfNodes(); - else - return 1; - } - - template - void IntegralUniformIntersectorP1::intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res) - { - static const NumberingPolicy numPol=MyMeshType::My_numPol; - res.resize(getNumberOfRowsOfResMatrix()); - unsigned long nbelem=IntegralUniformIntersector::_mesh.getNumberOfElements(); - const ConnType *connIndx=IntegralUniformIntersector::_mesh.getConnectivityIndexPtr(); - const ConnType *conn=IntegralUniformIntersector::_mesh.getConnectivityPtr(); - const double *coords=IntegralUniformIntersector::_mesh.getCoordinatesPtr(); - for(unsigned long i=0;i::_mesh.getTypeOfElement(OTT::indFC(i)); - int lgth=connIndx[i+1]-connIndx[i]; - const ConnType *locConn=conn+OTT::ind2C(connIndx[i]); - double val=computeVolSurfOfCell(t,locConn,lgth,coords); - if(t==NORM_TRI3) - val/=3.; - else if(t==NORM_TETRA4) - val/=4.; - else - throw INTERP_KERNEL::Exception("Invalid cell type detected : must be TRI3 or TETRA4 ! "); - for(int j=0;j::putValueIn(OTT::coo2C(locConn[j]),val,res); - } - } -} - -#endif diff --git a/src/INTERP_KERNEL/Interpolation.txx b/src/INTERP_KERNEL/Interpolation.txx deleted file mode 100644 index 6e59eb88c..000000000 --- a/src/INTERP_KERNEL/Interpolation.txx +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __INTERPOLATION_TXX__ -#define __INTERPOLATION_TXX__ - -#include "Interpolation.hxx" -#include "IntegralUniformIntersector.hxx" -#include "IntegralUniformIntersector.txx" - -namespace INTERP_KERNEL -{ - template - template - int Interpolation::fromToIntegralUniform(bool fromTo, const MyMeshType& mesh, MatrixType& result, const char *method) - { - typedef typename MyMeshType::MyConnType ConnType; - std::string methodCPP(method); - int ret=-1; - if(methodCPP=="P0") - { - IntegralUniformIntersectorP0 intersector(mesh,InterpolationOptions::getMeasureAbsStatus()); - intersector.setFromTo(fromTo); - std::vector tmp; - intersector.intersectCells(0,tmp,result); - ret=intersector.getNumberOfColsOfResMatrix(); - } - else if(methodCPP=="P1") - { - IntegralUniformIntersectorP1 intersector(mesh,InterpolationOptions::getMeasureAbsStatus()); - intersector.setFromTo(fromTo); - std::vector tmp; - intersector.intersectCells(0,tmp,result); - ret=intersector.getNumberOfColsOfResMatrix(); - } - else - throw INTERP_KERNEL::Exception("Invalid method specified in fromIntegralUniform : must be in { \"P0\", \"P1\"}"); - return ret; - } - - template - void Interpolation::checkAndSplitInterpolationMethod(const char *method, std::string& srcMeth, std::string& trgMeth) throw(INTERP_KERNEL::Exception) - { - const int NB_OF_METH_MANAGED=4; - const char *METH_MANAGED[NB_OF_METH_MANAGED]={"P0P0","P0P1","P1P0","P1P1"}; - std::string methodC(method); - bool found=false; - for(int i=0;i - { - public: - Interpolation2DCurve(); - Interpolation2DCurve(const InterpolationOptions& io); - // geometric precision, intersection tolerance, coice of the median line, - void setOptions(double precision, double tolerance, double medianLine); - }; -} - -#endif diff --git a/src/INTERP_KERNEL/Interpolation2DCurve.txx b/src/INTERP_KERNEL/Interpolation2DCurve.txx deleted file mode 100644 index 0aafe3f91..000000000 --- a/src/INTERP_KERNEL/Interpolation2DCurve.txx +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __INTERPOLATION2DCURVE_TXX__ -#define __INTERPOLATION2DCURVE_TXX__ - -#include "Interpolation2DCurve.hxx" -#include "InterpolationCurve.txx" - -namespace INTERP_KERNEL -{ - Interpolation2DCurve::Interpolation2DCurve() - { - // to have non-zero default thickness of target element - InterpolationOptions::setBoundingBoxAdjustmentAbs( InterpolationOptions::getPrecision() ); - } - - Interpolation2DCurve::Interpolation2DCurve - (const InterpolationOptions& io):InterpolationCurve(io) - { - // to have non-zero default thickness of target element - InterpolationOptions::setBoundingBoxAdjustmentAbs( InterpolationOptions::getPrecision() ); - } - - /** - * \brief Function used to set the options for the intersection calculation - * \details The following options can be modified: - * -# Precision: Level of precision of the computations. - * - Values: positive real number. - * - Default: 1.0E-12. - * -# Tolerance: Thickness of target element. - * - Values: positive real number. - * - Default: 1.0E-12. - * -# Median line: Position of the median line where both segments will be projected. - * - Values: real number between 0.0 and 1.0. - * - Default: 0.5 - */ - void Interpolation2DCurve::setOptions (double precision, - double tolerance, - double medianLine) - { - InterpolationOptions::setPrecision(precision); - InterpolationOptions::setBoundingBoxAdjustmentAbs(tolerance); - InterpolationOptions::setMedianPlane(medianLine); - } -} - -#endif diff --git a/src/INTERP_KERNEL/InterpolationCC.hxx b/src/INTERP_KERNEL/InterpolationCC.hxx deleted file mode 100644 index 738bdb0c5..000000000 --- a/src/INTERP_KERNEL/InterpolationCC.hxx +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2009-2010 OPEN CASCADE -// -// 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File : InterpolationCC.hxx -// Created : Fri Aug 14 11:33:17 2009 -// Author : Edward AGAPOV (eap) -// -#ifndef __InterpolationCC_HXX__ -#define __InterpolationCC_HXX__ - -#include "Interpolation.hxx" - -namespace INTERP_KERNEL -{ - /*! - * \brief Interpolator of cartesian/cartesian meshes - */ - class InterpolationCC : public Interpolation - { -// static const int SPACEDIM=MyMeshType::MY_SPACEDIM; -// static const int MESHDIM=MyMeshType::MY_MESHDIM; -// typedef typename MyMeshType::MyConnType ConnType; -// static const NumberingPolicy numPol=MyMeshType::My_numPol; - public: - InterpolationCC(); - //InterpolationCC(const InterpolationOptions& io); - template - int interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const char *method); - - private: - }; -} - - -#endif diff --git a/src/INTERP_KERNEL/InterpolationCC.txx b/src/INTERP_KERNEL/InterpolationCC.txx deleted file mode 100644 index 9b08c68f6..000000000 --- a/src/INTERP_KERNEL/InterpolationCC.txx +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright (C) 2009-2010 OPEN CASCADE -// -// 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : InterpolationCC.txx -// Created : Fri Aug 14 11:39:27 2009 -// Author : Edward AGAPOV (eap) -// - -#include "InterpolationCC.hxx" -#include "InterpolationUtils.hxx" - -// convert index "From Mesh Index" -#define _FMI(i) OTT::ind2C((i)) -// convert index "To Mesh Index" -#define _TMI(i) OTT::indFC((i)) - -namespace INTERP_KERNEL -{ - //================================================================================ - /*! - * \brief Constructor does nothing - */ - //================================================================================ - InterpolationCC::InterpolationCC() - { - } - - //================================================================================ - /*! - * \brief An 1D intersection result - */ - //================================================================================ - - struct Interference - { - int _src_index; // source cell index along an axis - int _tgt_index; // target cell index along an axis - double _length; // interference length - Interference(int is = -1, int it = -1, double l = 0):_src_index(is),_tgt_index(it),_length(l){} - }; - - //================================================================================ - /*! - * \brief Fills the matrix by precomputed cell interferences along axes - * \param inter_of_axis - cell/cell interferences along each axis - * \param result - matrix to fill in - * \param src_nb_cells[] - nb of cells along each of axes in the source mesh - * \param tgt_nb_cells[] - nb of cells along each of axes in the target mesh - * \param src_i_cell - source cell number accumulated by previous axes - * \param tgt_i_cell - target cell number accumulated by previous axes - * \param src_prev_area - factor by which this axis icreases cell number - * \param tgt_prev_area - factor by which this axis icreases cell number - * \param axis - the axis to treat - * \param prev_value - intersection size computed by previous axes - */ - //================================================================================ - - template - void fillMatrix(const std::list< Interference > inter_of_axis[dim], - MatrixType& result, - const int src_nb_cells[dim], - const int tgt_nb_cells[dim], - const int src_i_cell = 0, - const int tgt_i_cell = 0, - const int src_prev_area = 1, - const int tgt_prev_area = 1, - const int axis = 0, - const double prev_value = 1.0) - { - typedef std::list < Interference >::const_iterator TIntIterator; - - if ( axis + 1 == dim ) - { - for ( TIntIterator i = inter_of_axis[axis].begin(); i != inter_of_axis[axis].end(); ++i ) - { - double value = i->_length * prev_value; - int src_i = i->_src_index * src_prev_area + src_i_cell; - int tgt_i = i->_tgt_index * tgt_prev_area + tgt_i_cell; - - result[ tgt_i ].insert( std::make_pair( _TMI( src_i ), value )); - } - } - else - { - int src_prev_area_next = src_prev_area * src_nb_cells[ axis ]; - int tgt_prev_area_next = tgt_prev_area * tgt_nb_cells[ axis ]; - - for ( TIntIterator i = inter_of_axis[axis].begin(); i != inter_of_axis[axis].end(); ++i ) - { - double value = i->_length * prev_value; - int src_i = i->_src_index * src_prev_area + src_i_cell; - int tgt_i = i->_tgt_index * tgt_prev_area + tgt_i_cell; - - // call for the next axis - fillMatrix(inter_of_axis, result, - src_nb_cells, tgt_nb_cells, src_i, tgt_i, - src_prev_area_next, tgt_prev_area_next, - axis+1, value ); - } - } - } - - //================================================================================ - /*! - * \brief Calculates the matrix of volumes of intersection between the elements of - * src_mesh and the elements of targetMesh - * \param src_mesh - source mesh - * \param tgt_mesh - target mesh - * \param result - matrix in which the result is stored - * \param method - interpolation method, not used as only "P0P0" is implemented so far - * - * The matrix is partially sparse : it is a vector of maps of integer - double pairs. - * It can also be an INTERP_KERNEL::Matrix object. - * The length of the vector is equal to the number of target elements - for each target - * element there is a map, regardless of whether the element intersects any source - * elements or not. But in the maps there are only entries for those source elements - * which have a non-zero intersection volume with the target element. The vector has - * indices running from 0 to (nb target elements - 1), meaning that the map for target - * element i is stored at index i - 1. In the maps, however, the indexing is more natural: - * the intersection volume of the target element i with source element j is found at matrix[i-1][j] - */ - //================================================================================ - - template - int InterpolationCC::interpolateMeshes(const MyMeshType& src_mesh, - const MyMeshType& tgt_mesh, - MatrixType& result, - const char * method) - { - if ( std::string("P0P0") != method ) - throw Exception("Only P0P0 method is implemented so far"); - - // create empty maps for all target elements - result.resize( tgt_mesh.getNumberOfElements() ); - - const int ret = src_mesh.getNumberOfElements(); - - const double eps = getPrecision(); - const int dim = MyMeshType::MY_MESHDIM; - //const NumberingPolicy numPol = MyMeshType::My_numPol; - - const double* src_coords[ dim ]; - const double* tgt_coords[ dim ]; - int src_nb_cells[ dim ]; - int tgt_nb_cells[ dim ]; - for ( int j = 0; j < dim; ++j ) - { - src_coords[ j ] = src_mesh.getCoordsAlongAxis( _TMI( j )); - tgt_coords[ j ] = tgt_mesh.getCoordsAlongAxis( _TMI( j )); - src_nb_cells[ j ] = src_mesh.nbCellsAlongAxis( _TMI( j )); - tgt_nb_cells[ j ] = tgt_mesh.nbCellsAlongAxis( _TMI( j )); - } - - // ============================================ - // Calculate cell interferences along the axes - // ============================================ - - std::list < Interference > interferences[ dim ]; - - for ( int j = 0; j < dim; ++j ) // loop on axes of castesian space - { - std::list < Interference >& axis_interferences = interferences[j]; - - int it = 0, is = 0; - double x1t, x2t, x1s, x2s; // left and right ordinates of target and source cells - - // look for the first interference - // -------------------------------- - bool intersection = false; - while ( !intersection && it < tgt_nb_cells[j] && is < src_nb_cells[j] ) - { - x1s = src_coords[ j ][ is ]; - x2t = tgt_coords[ j ][ it+1 ]; - if ( x2t < x1s+eps ) - { - it++; // source lays on the right of target - continue; - } - x1t = tgt_coords[ j ][ it ]; - x2s = src_coords[ j ][ is+1 ]; - if ( x2s < x1t+eps ) - { - is++; // source lays on the left of target - continue; - } - intersection = true; - } - if ( !intersection ) return ret; // no intersections - - // get all interferences - // ---------------------- - while ( intersection ) - { - x1s = src_coords[ j ][ is ]; - x1t = tgt_coords[ j ][ it ]; - x2t = tgt_coords[ j ][ it+1 ]; - x2s = src_coords[ j ][ is+1 ]; - - double x1 = std::max( x1s ,x1t ); - double x2 = std::min( x2s ,x2t ); - axis_interferences.push_back( Interference( is, it, x2 - x1 )); - - // to the next target and/or source cell - double diff2 = x2s - x2t; - if ( diff2 > -eps ) - intersection = ( ++it < tgt_nb_cells[j] ); - if ( diff2 < eps ) - intersection = ( ++is < src_nb_cells[j] && intersection); - } - } - - // ================ - // Fill the matrix - // ================ - - switch ( dim ) - { - case 3: - fillMatrix( interferences, result, src_nb_cells,tgt_nb_cells ); - break; - - case 2: - fillMatrix( interferences, result, src_nb_cells,tgt_nb_cells ); - break; - - case 1: - fillMatrix( interferences, result, src_nb_cells,tgt_nb_cells ); - break; - } - - return ret; - } -} diff --git a/src/INTERP_KERNEL/InterpolationCU.hxx b/src/INTERP_KERNEL/InterpolationCU.hxx deleted file mode 100644 index ea73b3667..000000000 --- a/src/INTERP_KERNEL/InterpolationCU.hxx +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2009-2010 OPEN CASCADE -// -// 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File : InterpolationCU.hxx -// Created : Mon Dec 14 16:52:53 2009 -// Author : Edward AGAPOV (eap) -// -#ifndef __InterpolationCU_HXX__ -#define __InterpolationCU_HXX__ - -#include "Interpolation.hxx" -#include "NormalizedUnstructuredMesh.hxx" - -namespace INTERP_KERNEL -{ - class InterpolationCU : public Interpolation< InterpolationCU > - { - public: - InterpolationCU(); - InterpolationCU(const InterpolationOptions & io); - - template - int interpolateMeshes(const MyCMeshType& meshS, const MyUMeshType& meshT, MatrixType& result, const char *method); - - template - int interpolateMeshesRev(const MyUMeshType& meshS, const MyCMeshType& meshT, MatrixType& result, const char *method); - - }; -} - -#endif diff --git a/src/INTERP_KERNEL/InterpolationCU.txx b/src/INTERP_KERNEL/InterpolationCU.txx deleted file mode 100644 index 18d09ef97..000000000 --- a/src/INTERP_KERNEL/InterpolationCU.txx +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright (C) 2009-2010 OPEN CASCADE -// -// 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : InterpolationCU.txx -// Created : Mon Dec 14 17:30:25 2009 -// Author : Edward AGAPOV (eap) - -#ifndef __InterpolationCU_TXX__ -#define __InterpolationCU_TXX__ - -#include "InterpolationCU.hxx" - -#include "Interpolation.txx" -#include "IntersectorCU1D.txx" -#include "IntersectorCU2D.txx" -#include "IntersectorCU3D.txx" - -#include - -// // convert index "From Mesh Index" -#define _FMIU(i) OTT::ind2C((i)) -#define _FMIC(i) OTT::ind2C((i)) -// convert index "To Mesh Index" -#define _TMIU(i) OTT::indFC((i)) -#define _TMIC(i) OTT::indFC((i)) -// convert coord "From Mesh Coord" -#define _FMCOO(i) OTT::coo2C((i)) -// convert connectivity "From Mesh Connectivity" -#define _FMCON(i) OTT::conn2C((i)) - -namespace INTERP_KERNEL -{ - /** - * \defgroup InterpolationCU InterpolationCU - * \class InterpolationCU - * \brief Class used to calculate the volumes of intersection between the elements of a cartesian and an unstructured meshes. - * - */ - //================================================================================ - /** - * Default constructor - * - */ - //================================================================================ - - InterpolationCU::InterpolationCU() - { - } - - InterpolationCU::InterpolationCU(const InterpolationOptions & io) - :Interpolation(io) - { - } - - //================================================================================ - /** - * Calculates the matrix of volumes of intersection between the elements of srcMesh and the elements of targetMesh. - * The calculation is done in two steps. First a filtering process reduces the number of pairs of elements for which the - * calculation must be carried out by eliminating pairs that do not intersect based on their bounding boxes. Then, the - * volume of intersection is calculated for the remaining pairs, and entered into the - * intersection matrix. - * - * The matrix is partially sparse : it is a vector of maps of integer - double pairs. - * It can also be an INTERP_KERNEL::Matrix object. - * The length of the vector is equal to the number of target elements - for each target element there is a map, regardless - * of whether the element intersects any source elements or not. But in the maps there are only entries for those source elements - * which have a non-zero intersection volume with the target element. The vector has indices running from - * 0 to (nb target elements - 1), meaning that the map for target element i is stored at index i - 1. In the maps, however, - * the indexing is more natural : the intersection volume of the target element i with source element j is found at matrix[i-1][j]. - * - - * @param srcMesh cartesian source mesh - * @param targetMesh unstructured target mesh - * @param result matrix in which the result is stored - * @param method interpolation method - */ - //================================================================================ - - template - int InterpolationCU::interpolateMeshes(const MyCMeshType& src_mesh, - const MyUMeshType& tgt_mesh, - MatrixType& result, - const char * method) - { - typedef typename MyUMeshType::MyConnType ConnType; - typedef typename MyCMeshType::MyConnType CConnType; - - if ( std::string("P0P0") != method ) - throw Exception("Only P0P0 method is implemented so far"); - if ( MyCMeshType::MY_SPACEDIM != MyUMeshType::MY_SPACEDIM || - MyCMeshType::MY_SPACEDIM != MyUMeshType::MY_MESHDIM ) - throw Exception("InterpolationCU::interpolateMeshes(): dimension of meshes must be same"); - - const double eps = getPrecision(); - const int dim = MyCMeshType::MY_SPACEDIM; - - TargetIntersector* intersector = 0; - switch( dim ) - { - case 1: intersector = new IntersectorCU1D( src_mesh, tgt_mesh ); break; - case 2: intersector = new IntersectorCU2D( src_mesh, tgt_mesh ); break; - case 3: intersector = new IntersectorCU3D( src_mesh, tgt_mesh, getSplittingPolicy() ); break; - } - // create empty maps for all target elements - result.resize( intersector->getNumberOfRowsOfResMatrix() ); - const int ret = intersector->getNumberOfColsOfResMatrix(); - - const double* src_coords[ dim ]; - int src_nb_coords[ dim ]; - std::map< double, int> src_coord_to_index[ dim ]; - for ( int j = 0; j < dim; ++j ) - { - src_coords [j] = src_mesh.getCoordsAlongAxis( _TMIC( j )); - src_nb_coords[j] = src_mesh.nbCellsAlongAxis ( _TMIC( j )) + 1; - for (int i = 0; i < src_nb_coords[j]; ++i ) - src_coord_to_index[j].insert( std::make_pair( src_coords[j][i], i )); - } - - const unsigned long tgtu_nb_cells = tgt_mesh.getNumberOfElements(); - - IntersectorCU bbHelper(src_mesh, tgt_mesh); - double bb[2*dim]; - - // loop on unstructured tgt cells - - for(unsigned int iT=0; iT src_coords[j][0] + eps; - if ( !doItersect ) - continue; // no intersection - - // find structured src cells intersecting iT cell - std::vector< std::vector< CConnType > > structIndices(1); - std::map< double, int>::iterator coo_ind; - for ( int j = 0; j < dim; ++j ) - { - coo_ind = src_coord_to_index[j].lower_bound( bb[2*j+1] - eps ); - if ( coo_ind == src_coord_to_index[j].end() ) - --coo_ind; - int max_i = coo_ind->second; - - coo_ind = src_coord_to_index[j].upper_bound( bb[2*j ] + eps ); - if ( coo_ind != src_coord_to_index[j].begin() ) - --coo_ind; - int min_i = coo_ind->second; - - std::vector< std::vector< CConnType > > newStructIndices; - for ( unsigned int iInd = 0; iInd < structIndices.size(); ++iInd ) - { - for ( int i = min_i; i < max_i; ++i ) - { - std::vector< CConnType > index = structIndices[iInd]; - index.push_back( i ); - newStructIndices.push_back( index ); - } - } - structIndices.swap( newStructIndices ); - } - - // perform intersection - - for ( unsigned int iInd = 0; iInd < structIndices.size(); ++iInd ) - intersector->intersectCells( iT, structIndices[iInd], result ); - } - delete intersector; - return ret; - } - - //================================================================================ - /** - * Calculates the matrix of volumes of intersection between the elements of srcMesh and the elements of targetMesh. - * The calculation is done in two steps. First a filtering process reduces the number of pairs of elements for which the - * calculation must be carried out by eliminating pairs that do not intersect based on their bounding boxes. Then, the - * volume of intersection is calculated for the remaining pairs, and entered into the - * intersection matrix. - * - * The matrix is partially sparse : it is a vector of maps of integer - double pairs. - * It can also be an INTERP_KERNEL::Matrix object. - * The length of the vector is equal to the number of target elements - for each target element there is a map, regardless - * of whether the element intersects any source elements or not. But in the maps there are only entries for those source elements - * which have a non-zero intersection volume with the target element. The vector has indices running from - * 0 to (nb target elements - 1), meaning that the map for target element i is stored at index i - 1. In the maps, however, - * the indexing is more natural : the intersection volume of the target element i with source element j is found at matrix[i-1][j]. - * - - * @param srcMesh 2-dimesional unstructured target mesh - * @param targetMesh 2-dimensional cartesian source mesh - * @param result matrix in which the result is stored - * @param method interpolation method - */ - //================================================================================ - - template - int InterpolationCU::interpolateMeshesRev(const MyUMeshType& meshS, const MyCMeshType& meshT, MatrixType& result, const char *method) - { - MatrixType revResult; - int sizeT = interpolateMeshes( meshT, meshS, revResult, method ); - int sizeS = revResult.size(); - result.resize( sizeT ); - - for ( int iS = 0; iS < sizeS; ++iS ) - { - typename MatrixType::value_type & row = revResult[iS]; - typename MatrixType::value_type::iterator iT_surf = row.begin(); - for ( ; iT_surf != row.end(); ++iT_surf ) - result[ iT_surf->first ][ iS ] = iT_surf->second; - } - return sizeS; - } - -} - -#endif diff --git a/src/INTERP_KERNEL/InterpolationCurve.hxx b/src/INTERP_KERNEL/InterpolationCurve.hxx deleted file mode 100644 index 0c3f11ad3..000000000 --- a/src/INTERP_KERNEL/InterpolationCurve.hxx +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __INTERPOLATIONCURVE_HXX__ -#define __INTERPOLATIONCURVE_HXX__ - -#include "Interpolation.hxx" -#include "InterpolationOptions.hxx" - -namespace INTERP_KERNEL -{ - template - class InterpolationCurve : public Interpolation< InterpolationCurve > - { - public: - InterpolationCurve(); - InterpolationCurve(const InterpolationOptions & io); - - // Main function to interpolate - template - int interpolateMeshes(const MyMeshType& meshS, const MyMeshType& meshT, - MatrixType& result, const char *method); - - }; -} - -#endif diff --git a/src/INTERP_KERNEL/InterpolationCurve.txx b/src/INTERP_KERNEL/InterpolationCurve.txx deleted file mode 100644 index e4b908322..000000000 --- a/src/INTERP_KERNEL/InterpolationCurve.txx +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __INTERPOLATIONCURVE_TXX__ -#define __INTERPOLATIONCURVE_TXX__ - -#include "InterpolationCurve.hxx" -#include "InterpolationOptions.hxx" -#include "CurveIntersectorP0P0.txx" -#include "CurveIntersectorP1P0.txx" -#include "CurveIntersectorP0P1.txx" -#include "CurveIntersectorP1P1.txx" -#include "BBTree.txx" - -#include - -namespace INTERP_KERNEL -{ - /** - * \defgroup interpolationCurve InterpolationCurve - * - * \class InterpolationCurve - * \brief Class used to compute the coefficients of the interpolation matrix between - * two local meshes in two dimensions. - */ - template - InterpolationCurve::InterpolationCurve() - { - } - - template - InterpolationCurve::InterpolationCurve (const InterpolationOptions& io) - :Interpolation< InterpolationCurve >(io) - { - } - - /** \brief Main function to interpolate 1D meshes. - \details The algorithm proceeds in two steps: first a filtering process reduces the number of pairs of elements for which the - * calculation must be carried out by eliminating pairs that do not intersect based on their bounding boxes. Then, the - * volume of intersection is calculated by an object of type IntersectorPlanar for the remaining pairs, and entered into the - * intersection matrix. - * - * The matrix is partially sparse : it is a vector of maps of integer - double pairs. - * The length of the vector is equal to the number of target elements - for each target element there is a map, regardless - * of whether the element intersects any source elements or not. But in the maps there are only entries for those source elements - * which have a non-zero intersection volume with the target element. The vector has indices running from - * 0 to (#target elements - 1), meaning that the map for target element i is stored at index i - 1. In the maps, however, - * the indexing is more natural : the intersection volume of the target element i with source element j is found at matrix[i-1][j]. - * - - * @param myMeshS Planar source mesh - * @Param myMeshT Planar target mesh - * @return vector containing for each element i of the source mesh, a map giving for each element j - * of the target mesh which i intersects, the area of the intersection - * - */ - template - template - int InterpolationCurve::interpolateMeshes (const MyMeshType& myMeshS, - const MyMeshType& myMeshT, - MatrixType& result, - const char * method) - { - static const int SPACEDIM=MyMeshType::MY_SPACEDIM; - typedef typename MyMeshType::MyConnType ConnType; - static const NumberingPolicy numPol = MyMeshType::My_numPol; - - long global_start = clock(); - int counter=0; - - long nbMailleS = myMeshS.getNumberOfElements(); - long nbMailleT = myMeshT.getNumberOfElements(); - - CurveIntersector* intersector=0; - std::string meth(method); - if(meth=="P0P0") - { - intersector = new CurveIntersectorP0P0 - (myMeshT, myMeshS, - InterpolationOptions::getPrecision(), - InterpolationOptions::getBoundingBoxAdjustmentAbs(), - InterpolationOptions::getMedianPlane(), - InterpolationOptions::getPrintLevel()); - } - else if(meth=="P0P1") - { - intersector = new CurveIntersectorP0P1 - (myMeshT, myMeshS, - InterpolationOptions::getPrecision(), - InterpolationOptions::getBoundingBoxAdjustmentAbs(), - InterpolationOptions::getMedianPlane(), - InterpolationOptions::getPrintLevel()); - } - else if(meth=="P1P0") - { - intersector = new CurveIntersectorP1P0 - (myMeshT, myMeshS, - InterpolationOptions::getPrecision(), - InterpolationOptions::getBoundingBoxAdjustmentAbs(), - InterpolationOptions::getMedianPlane(), - InterpolationOptions::getPrintLevel()); - } - else if(meth=="P1P1") - { - intersector = new CurveIntersectorP1P1 - (myMeshT, myMeshS, - InterpolationOptions::getPrecision(), - InterpolationOptions::getBoundingBoxAdjustmentAbs(), - InterpolationOptions::getMedianPlane(), - InterpolationOptions::getPrintLevel()); - } - else - throw INTERP_KERNEL::Exception("Invalid method specified ! Must be in : \"P0P0\" \"P0P1\" \"P1P0\" or \"P1P1\""); - /****************************************************************/ - /* Create a search tree based on the bounding boxes */ - /* Instanciate the intersector and initialise the result vector */ - /****************************************************************/ - - long start_filtering=clock(); - - std::vector bbox; - intersector->createBoundingBoxes(myMeshS,bbox); // create the bounding boxes - intersector->adjustBoundingBoxes(bbox, InterpolationOptions::getBoundingBoxAdjustmentAbs()); - BBTree my_tree(&bbox[0], 0, 0, nbMailleS);//creating the search structure - - long end_filtering = clock(); - - result.resize(intersector->getNumberOfRowsOfResMatrix());//on initialise. - - /****************************************************/ - /* Loop on the target cells - core of the algorithm */ - /****************************************************/ - long start_intersection = clock(); - const ConnType *connIndxT = myMeshT.getConnectivityIndexPtr(); - for(int iT=0; iT intersecting_elems; - double bb[2*SPACEDIM]; - intersector->getElemBB(bb,myMeshT,OTT::indFC(iT),nb_nodesT); - my_tree.getIntersectingElems(bb, intersecting_elems); - intersector->intersectCells(iT,intersecting_elems,result); - counter += intersecting_elems.size(); - } - int ret = intersector->getNumberOfColsOfResMatrix(); - delete intersector; - - if (InterpolationOptions::getPrintLevel() >= 1) - { - long end_intersection=clock(); - std::cout << "Filtering time= " << end_filtering-start_filtering << std::endl; - std::cout << "Intersection time= " << end_intersection-start_intersection << std::endl; - long global_end =clock(); - std::cout << "Number of computed intersections = " << counter << std::endl; - std::cout << "Global time= " << global_end - global_start << std::endl; - } - return ret; - } -} - -#endif diff --git a/src/INTERP_KERNEL/InterpolationOptions.cxx b/src/INTERP_KERNEL/InterpolationOptions.cxx deleted file mode 100644 index 6eb93e9aa..000000000 --- a/src/INTERP_KERNEL/InterpolationOptions.cxx +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "InterpolationOptions.hxx" - -const double INTERP_KERNEL::InterpolationOptions::DFT_MEDIAN_PLANE=0.5; - -const double INTERP_KERNEL::InterpolationOptions::DFT_SURF3D_ADJ_EPS=1.e-4; - -const double INTERP_KERNEL::InterpolationOptions::DFT_MAX_DIST_3DSURF_INTERSECT=-1.; - -const char INTERP_KERNEL::InterpolationOptions::PRECISION_STR[]="Precision"; - -const char INTERP_KERNEL::InterpolationOptions::MEDIANE_PLANE_STR[]="MedianPlane"; - -const char INTERP_KERNEL::InterpolationOptions::BOUNDING_BOX_ADJ_STR[]="BoundingBoxAdjustment"; - -const char INTERP_KERNEL::InterpolationOptions::BOUNDING_BOX_ADJ_ABS_STR[]="BoundingBoxAdjustmentAbs"; - -const char INTERP_KERNEL::InterpolationOptions::MAX_DISTANCE_3DSURF_INSECT_STR[]="MaxDistance3DSurfIntersect"; - -const char INTERP_KERNEL::InterpolationOptions::PRINT_LEV_STR[]="PrintLevel"; - -const char INTERP_KERNEL::InterpolationOptions::DO_ROTATE_STR[]="DoRotate"; - -const char INTERP_KERNEL::InterpolationOptions::ORIENTATION_STR[]="Orientation"; - -const char INTERP_KERNEL::InterpolationOptions::MEASURE_ABS_STR[]="MeasureAbs"; - -const char INTERP_KERNEL::InterpolationOptions::INTERSEC_TYPE_STR[]="IntersectionType"; - -const char INTERP_KERNEL::InterpolationOptions::SPLITTING_POLICY_STR[]="SplittingPolicy"; - -const char INTERP_KERNEL::InterpolationOptions::TRIANGULATION_INTERSECT2D_STR[]="Triangulation"; - -const char INTERP_KERNEL::InterpolationOptions::CONVEX_INTERSECT2D_STR[]="Convex"; - -const char INTERP_KERNEL::InterpolationOptions::GEOMETRIC_INTERSECT2D_STR[]="Geometric2D"; - -const char INTERP_KERNEL::InterpolationOptions::POINTLOCATOR_INTERSECT_STR[]="PointLocator"; - -const char INTERP_KERNEL::InterpolationOptions::PLANAR_SPLIT_FACE_5_STR[]="PLANAR_FACE_5"; - -const char INTERP_KERNEL::InterpolationOptions::PLANAR_SPLIT_FACE_6_STR[]="PLANAR_FACE_6"; - -const char INTERP_KERNEL::InterpolationOptions::GENERAL_SPLIT_24_STR[]="GENERAL_24"; - -const char INTERP_KERNEL::InterpolationOptions::GENERAL_SPLIT_48_STR[]="GENERAL_48"; - -bool INTERP_KERNEL::InterpolationOptions::setOptionDouble(const std::string& key, double value) -{ - if(key==PRECISION_STR) - { - setPrecision(value); - return true; - } - else if(key==MEDIANE_PLANE_STR) - { - setMedianPlane(value); - return true; - } - else if(key==BOUNDING_BOX_ADJ_STR) - { - setBoundingBoxAdjustment(value); - return true; - } - else if(key==BOUNDING_BOX_ADJ_ABS_STR) - { - setBoundingBoxAdjustmentAbs(value); - return true; - } - else if(key==MAX_DISTANCE_3DSURF_INSECT_STR) - { - setMaxDistance3DSurfIntersect(value); - return true; - } - else - return false; -} - -bool INTERP_KERNEL::InterpolationOptions::setOptionInt(const std::string& key, int value) -{ - if(key==PRINT_LEV_STR) - { - setPrintLevel(value); - return true; - } - else if(key==DO_ROTATE_STR) - { - setDoRotate(value != 0); - return true; - } - else if(key==ORIENTATION_STR) - { - setOrientation(value); - return true; - } - else if(key==MEASURE_ABS_STR) - { - bool valBool=(value!=0); - setMeasureAbsStatus(valBool); - return true; - } - else - return false; -} - -bool INTERP_KERNEL::InterpolationOptions::setOptionString(const std::string& key, std::string& value) -{ - if(key==INTERSEC_TYPE_STR) - { - if(value==TRIANGULATION_INTERSECT2D_STR) - { - setIntersectionType(INTERP_KERNEL::Triangulation); - return true; - } - else if(value==CONVEX_INTERSECT2D_STR) - { - setIntersectionType(INTERP_KERNEL::Convex); - return true; - } - else if(value==GEOMETRIC_INTERSECT2D_STR) - { - setIntersectionType(INTERP_KERNEL::Geometric2D); - return true; - } - else if(value==POINTLOCATOR_INTERSECT_STR) - { - setIntersectionType(INTERP_KERNEL::PointLocator); - return true; - } - } - else if(key==SPLITTING_POLICY_STR) - { - if(value==PLANAR_SPLIT_FACE_5_STR) - { - setSplittingPolicy(INTERP_KERNEL::PLANAR_FACE_5); - return true; - } - else if(value==PLANAR_SPLIT_FACE_6_STR) - { - setSplittingPolicy(INTERP_KERNEL::PLANAR_FACE_6); - return true; - } - else if(value==GENERAL_SPLIT_24_STR) - { - setSplittingPolicy(INTERP_KERNEL::GENERAL_24); - return true; - } - else if(value==GENERAL_SPLIT_48_STR) - { - setSplittingPolicy(INTERP_KERNEL::GENERAL_48); - return true; - } - else - return false; - } - return false; -} - -std::string INTERP_KERNEL::InterpolationOptions::filterInterpolationMethod(const std::string& meth) const -{ - if ( _P1P0_bary_method && meth == "P1P0" ) - return "P1P0Bary"; - return meth; -} - -bool INTERP_KERNEL::InterpolationOptions::setInterpolationOptions(long print_level, - std::string intersection_type, - double precision, - double median_plane, - bool do_rotate, - double bounding_box_adjustment, - double bounding_box_adjustment_abs, - double max_distance_for_3Dsurf_intersect, - long orientation, - bool measure_abs, - std::string splitting_policy, - bool P1P0_bary_method ) -{ - _print_level=print_level; - _precision=precision; - _median_plane=median_plane; - _do_rotate=do_rotate; - _bounding_box_adjustment=bounding_box_adjustment; - _bounding_box_adjustment_abs=bounding_box_adjustment_abs; - _max_distance_for_3Dsurf_intersect=max_distance_for_3Dsurf_intersect; - _orientation=orientation; - _measure_abs=measure_abs; - _P1P0_bary_method=P1P0_bary_method; - return(setOptionString(INTERSEC_TYPE_STR,intersection_type) && setOptionString(SPLITTING_POLICY_STR,splitting_policy)); -} - diff --git a/src/INTERP_KERNEL/Intersector3DP1P0Bary.hxx b/src/INTERP_KERNEL/Intersector3DP1P0Bary.hxx deleted file mode 100644 index b47ba5ccd..000000000 --- a/src/INTERP_KERNEL/Intersector3DP1P0Bary.hxx +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __Intersector3DP1P0Bary_HXX__ -#define __Intersector3DP1P0Bary_HXX__ - -#include "Intersector3D.hxx" - -namespace INTERP_KERNEL -{ - template - class Intersector3DP1P0Bary : public Intersector3D - { - public: - Intersector3DP1P0Bary(const MyMeshType& targetMesh, const MyMeshType& srcMesh); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; - }; -} - -#endif diff --git a/src/INTERP_KERNEL/Intersector3DP1P0Bary.txx b/src/INTERP_KERNEL/Intersector3DP1P0Bary.txx deleted file mode 100644 index f0883fe3c..000000000 --- a/src/INTERP_KERNEL/Intersector3DP1P0Bary.txx +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __Intersector3DP1P0Bary_TXX__ -#define __Intersector3DP1P0Bary_TXX__ - -#include "Intersector3DP1P0Bary.hxx" -#include "Intersector3D.txx" - -namespace INTERP_KERNEL -{ - template - Intersector3DP1P0Bary::Intersector3DP1P0Bary(const MyMeshType& targetMesh, const MyMeshType& srcMesh):Intersector3D(targetMesh,srcMesh) - { - } - - template - int Intersector3DP1P0Bary::getNumberOfRowsOfResMatrix() const - { - return Intersector3D::_target_mesh.getNumberOfElements(); - } - - template - int Intersector3DP1P0Bary::getNumberOfColsOfResMatrix() const - { - return Intersector3D::_src_mesh.getNumberOfNodes(); - } -} - -#endif diff --git a/src/INTERP_KERNEL/Intersector3DP1P1.hxx b/src/INTERP_KERNEL/Intersector3DP1P1.hxx deleted file mode 100644 index a6961b7f2..000000000 --- a/src/INTERP_KERNEL/Intersector3DP1P1.hxx +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __Intersector3DP1P1_HXX__ -#define __Intersector3DP1P1_HXX__ - -#include "Intersector3D.hxx" - -namespace INTERP_KERNEL -{ - template - class Intersector3DP1P1 : public Intersector3D - { - public: - Intersector3DP1P1(const MyMeshType& targetMesh, const MyMeshType& srcMesh); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; - }; -} - -#endif diff --git a/src/INTERP_KERNEL/Intersector3DP1P1.txx b/src/INTERP_KERNEL/Intersector3DP1P1.txx deleted file mode 100644 index c41a1d0d4..000000000 --- a/src/INTERP_KERNEL/Intersector3DP1P1.txx +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __Intersector3DP1P1_TXX__ -#define __Intersector3DP1P1_TXX__ - -#include "Intersector3DP1P1.hxx" -#include "Intersector3D.txx" - -namespace INTERP_KERNEL -{ - template - Intersector3DP1P1::Intersector3DP1P1(const MyMeshType& targetMesh, const MyMeshType& srcMesh):Intersector3D(targetMesh,srcMesh) - { - } - - template - int Intersector3DP1P1::getNumberOfRowsOfResMatrix() const - { - return Intersector3D::_target_mesh.getNumberOfNodes(); - } - - template - int Intersector3DP1P1::getNumberOfColsOfResMatrix() const - { - return Intersector3D::_src_mesh.getNumberOfNodes(); - } -} - -#endif diff --git a/src/INTERP_KERNEL/IntersectorCU.hxx b/src/INTERP_KERNEL/IntersectorCU.hxx deleted file mode 100644 index 75c5d405e..000000000 --- a/src/INTERP_KERNEL/IntersectorCU.hxx +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (C) 2009-2010 OPEN CASCADE -// -// 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : IntersectorCU.hxx -// Created : Thu Dec 17 12:30:17 2009 -// Author : Edward AGAPOV (eap) -// - -#ifndef __IntersectorCU_HXX__ -#define __IntersectorCU_HXX__ - -#include "TargetIntersector.hxx" -#include "NormalizedUnstructuredMesh.hxx" - -namespace INTERP_KERNEL -{ - template class _StabIntersector; - - template > - class IntersectorCU : public TargetIntersector - { - public: - static const int SPACEDIM=MyCMeshType::MY_SPACEDIM; - static const int MESHDIM=MyCMeshType::MY_MESHDIM; - typedef typename MyUMeshType::MyConnType UConnType; - typedef typename MyCMeshType::MyConnType CConnType; - public: - //! \addtogroup InterpKerGrpIntCU @{ - IntersectorCU(const MyCMeshType& meshS, const MyUMeshType& meshT); - //! @} - virtual ~IntersectorCU(); - void getUElemBB(double* bb, UConnType iP); - void getUCoordinates(UConnType icell, std::vector& coords); - - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; - void intersectCells(CConnType icellU, const std::vector& icellC, MyMatrix& res); - double intersectGeometry(CConnType icellT, const std::vector& icellC) { return asLeaf().intersectGeometry(icellT,icellC); } - protected: - ConcreteIntersector& asLeaf() { return static_cast(*this); } - - protected: - const UConnType *_connectU; - const UConnType *_connIndexU; - const double * _coordsU; - const MyUMeshType& _meshU; - - const double * _coordsC[SPACEDIM]; - int _nbCellsC[SPACEDIM]; - const MyCMeshType& _meshC; - }; - - // class to enable usage of IntersectorCU not for intersection but for access to data it encapsulates - template - class _StabIntersector: public IntersectorCU > - { - public: - _StabIntersector(const MyCMeshType& meshS, const MyUMeshType& meshT) : IntersectorCU >(meshS, meshT) {} - double intersectGeometry(typename MyUMeshType::MyConnType icellT, const std::vector& icellC) { throw Exception("You must provide an intersector as the 4-th template argument of IntersectorCU"); return 0; } - }; -} - -#endif diff --git a/src/INTERP_KERNEL/IntersectorCU.txx b/src/INTERP_KERNEL/IntersectorCU.txx deleted file mode 100644 index f9a3155a4..000000000 --- a/src/INTERP_KERNEL/IntersectorCU.txx +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (C) 2009-2010 OPEN CASCADE -// -// 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email :webmaster.salome@opencascade.com -// -// File : IntersectorCU.txx -// Created : Thu Dec 17 12:30:17 2009 -// Author : Edward AGAPOV (eap) -// -#ifndef __IntersectorCU_TXX__ -#define __IntersectorCU_TXX__ - -#include "IntersectorCU.hxx" - -// convert index "From Mesh Index" -#define _FMIU(i) OTT::ind2C((i)) -#define _FMIC(i) OTT::ind2C((i)) -// convert index "To Mesh Index" -#define _TMIU(i) OTT::indFC((i)) -#define _TMIC(i) OTT::indFC((i)) -// convert coord "From Mesh Coord" -#define _FMCOO(i) OTT::coo2C((i)) -// convert connectivity "From Mesh Connectivity" -#define _FMCON(i) OTT::conn2C((i)) - - -#define _CU_TEMPLATE \ -template -#define _INTERSECTOR_CU_ \ -IntersectorCU - -namespace INTERP_KERNEL -{ - //================================================================================ - /*! - * \brief Constructor - */ - //================================================================================ - - _CU_TEMPLATE - _INTERSECTOR_CU_::IntersectorCU(const MyCMeshType& meshS, const MyUMeshType& meshT): - _meshU(meshT), _meshC(meshS) - { - _connectU =meshT.getConnectivityPtr(); - _connIndexU=meshT.getConnectivityIndexPtr(); - _coordsU =meshT.getCoordinatesPtr(); - - for ( int j = 0; j < SPACEDIM; ++j ) - { - _coordsC [ j ] = _meshC.getCoordsAlongAxis( _TMIC( j )); - _nbCellsC[ j ] = _meshC.nbCellsAlongAxis ( _TMIC( j )); - } - } - - //================================================================================ - /*! - * \brief Destructor - */ - //================================================================================ - - _CU_TEMPLATE - _INTERSECTOR_CU_::~IntersectorCU() - { - } - - //================================================================================ - /*! - * \brief Return bounding box of an unstructured element - */ - //================================================================================ - - _CU_TEMPLATE - void _INTERSECTOR_CU_::getUElemBB(double* bb, UConnType icell) - { - //initializing bounding box limits - for(int idim=0; idim::max(); - bb[2*idim+1] = -std::numeric_limits::max(); - } - - UConnType nb_nodes = _connIndexU[icell+1] - _connIndexU[icell]; - for (UConnType i=0; i::coo2C(conn[OTT::conn2C(conn_index[OTT::ind2C(iP)]+i)])); - const double* coord_node=_coordsU+SPACEDIM*(_FMCOO( _connectU[_FMCON (_connIndexU[_FMIU(icell)]+i)])); - for(int idim=0; idimbb[2*idim+1])?x:bb[2*idim+1]; - } - } - } - - //================================================================================ - /*! - * \brief Return coordinates of nodes of an unstructured element - */ - //================================================================================ - - _CU_TEMPLATE - void _INTERSECTOR_CU_::getUCoordinates(UConnType icell, std::vector& coords) - { - UConnType nb_nodes = _connIndexU[icell+1] - _connIndexU[icell]; - coords.resize( SPACEDIM * nb_nodes ); - for (UConnType i=0; i& icellC, - MyMatrix& res) - { - double v = intersectGeometry(icellU, icellC); - - CConnType iC = icellC[0], area = _nbCellsC[0]; - for ( int j = 1; j < SPACEDIM; ++j ) - { - iC += icellC[j] * area; - area *= _nbCellsC[j]; - } - res[ icellU ][ iC ] = v; - } -} - -#endif diff --git a/src/INTERP_KERNEL/IntersectorCU1D.hxx b/src/INTERP_KERNEL/IntersectorCU1D.hxx deleted file mode 100644 index 0da006bcb..000000000 --- a/src/INTERP_KERNEL/IntersectorCU1D.hxx +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2009-2010 OPEN CASCADE -// -// 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File : IntersectorCU1D.hxx -// Created : Thu Dec 17 14:10:00 2009 -// Author : Edward AGAPOV (eap) -// -#ifndef __IntersectorCU1D_HXX__ -#define __IntersectorCU1D_HXX__ - -#include "IntersectorCU.hxx" - -namespace INTERP_KERNEL -{ - template - class IntersectorCU1D : public IntersectorCU > - { - public: - typedef typename MyUMeshType::MyConnType UConnType; - typedef typename MyCMeshType::MyConnType CConnType; - public: - IntersectorCU1D(const MyCMeshType& meshS, const MyUMeshType& meshT); - ~IntersectorCU1D(); - double intersectGeometry(UConnType icellT, const std::vector& icellC); - - private: - }; -} - - -#endif diff --git a/src/INTERP_KERNEL/IntersectorCU1D.txx b/src/INTERP_KERNEL/IntersectorCU1D.txx deleted file mode 100644 index 1eff67400..000000000 --- a/src/INTERP_KERNEL/IntersectorCU1D.txx +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (C) 2009-2010 OPEN CASCADE -// -// 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : IntersectorCU1D.txx -// Created : Thu Dec 17 14:17:49 2009 -// Author : Edward AGAPOV (eap) - -#ifndef __IntersectorCU1D_TXX__ -#define __IntersectorCU1D_TXX__ - -#include "IntersectorCU1D.hxx" -#include "IntersectorCU.txx" - -#define IntersectorCU1D_TEMPLATE template -#define INTERSECTOR_CU1D IntersectorCU1D -#define _INTER_CU IntersectorCU > - -namespace INTERP_KERNEL -{ - //================================================================================ - /*! - * \brief intersector of the unstructured mesh and the cartesian mesh in 1D - */ - //================================================================================ - - IntersectorCU1D_TEMPLATE - INTERSECTOR_CU1D::IntersectorCU1D(const MyCMeshType& meshS, - const MyUMeshType& meshT): - _INTER_CU( meshS, meshT ) - { - if ( MyCMeshType::MY_SPACEDIM != 1 || MyCMeshType::MY_MESHDIM != 1 || - MyUMeshType::MY_SPACEDIM != 1 || MyUMeshType::MY_MESHDIM != 1 ) - throw Exception("IntersectorCU1D(): Invalid mesh dimension, it must be 1"); - } - - //================================================================================ - /*! - * \brief destructor - */ - //================================================================================ - - IntersectorCU1D_TEMPLATE - INTERSECTOR_CU1D::~IntersectorCU1D() - { - } - - //================================================================================ - /*! - * \brief Calculate length of intersection of an unstructured cell and a cartesian one. - * The cartesian cell is given by its [i,j,k] indices - */ - //================================================================================ - - IntersectorCU1D_TEMPLATE - double INTERSECTOR_CU1D::intersectGeometry(UConnType icellT, - const std::vector& icellS) - { - std::vector coordsU; - _INTER_CU::getUCoordinates(icellT, coordsU); - - const double* coordsC = & _INTER_CU::_coordsC[0][ _FMIC(icellS[0]) ]; - - double res = std::min( coordsU[1], coordsC[1] ) - std::max( coordsU[0], coordsC[0] ); - return res; - } -} -#endif diff --git a/src/INTERP_KERNEL/IntersectorCU2D.hxx b/src/INTERP_KERNEL/IntersectorCU2D.hxx deleted file mode 100644 index b6f335c2a..000000000 --- a/src/INTERP_KERNEL/IntersectorCU2D.hxx +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2009-2010 OPEN CASCADE -// -// 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File : IntersectorCU2D.hxx -// Created : Thu Dec 17 14:10:00 2009 -// Author : Edward AGAPOV (eap) -// -#ifndef __IntersectorCU2D_HXX__ -#define __IntersectorCU2D_HXX__ - -#include "IntersectorCU.hxx" - -namespace INTERP_KERNEL -{ - template - class IntersectorCU2D : public IntersectorCU > - { - public: - typedef typename MyUMeshType::MyConnType UConnType; - typedef typename MyCMeshType::MyConnType CConnType; - public: - IntersectorCU2D(const MyCMeshType& meshS, const MyUMeshType& meshT); - double intersectGeometry(UConnType icellT, const std::vector& icellC); - - private: - TriangulationIntersector _intersector; - }; -} - - -#endif diff --git a/src/INTERP_KERNEL/IntersectorCU2D.txx b/src/INTERP_KERNEL/IntersectorCU2D.txx deleted file mode 100644 index e6174d823..000000000 --- a/src/INTERP_KERNEL/IntersectorCU2D.txx +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (C) 2009-2010 OPEN CASCADE -// -// 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : IntersectorCU2D.txx -// Created : Thu Dec 17 14:17:49 2009 -// Author : Edward AGAPOV (eap) - -#ifndef __IntersectorCU2D_TXX__ -#define __IntersectorCU2D_TXX__ - -#include "IntersectorCU2D.hxx" -#include "IntersectorCU.txx" - -#define IntersectorCU2D_TEMPLATE template -#define INTERSECTOR_CU2D IntersectorCU2D -#define INTER_CU IntersectorCU > - - -namespace INTERP_KERNEL -{ - IntersectorCU2D_TEMPLATE - INTERSECTOR_CU2D::IntersectorCU2D(const MyCMeshType& meshS, - const MyUMeshType& meshT): - IntersectorCU >( meshS, meshT ), - _intersector(meshT, meshT, 0,0,0,0,0,0 ) - { - if ( MyCMeshType::MY_SPACEDIM != 2 || MyCMeshType::MY_MESHDIM != 2 || - MyUMeshType::MY_SPACEDIM != 2 || MyUMeshType::MY_MESHDIM != 2 ) - throw Exception("IntersectorCU2D(): Invalid mesh dimension, it must be 2"); - } - - - //================================================================================ - /*! - * \brief Calculate area of intersection of an unstructured cell and a cartesian one. - * The cartesian cell is given by its [i,j] indices - */ - //================================================================================ - - IntersectorCU2D_TEMPLATE - double INTERSECTOR_CU2D::intersectGeometry(UConnType icellT, - const std::vector& icellS) - { - std::vector uCoords; - getUCoordinates( icellT, uCoords ); - - NormalizedCellType tT = INTER_CU::_meshU.getTypeOfElement( _TMIU(icellT)); - bool is_tgt_quad = CellModel::getCellModel(tT).isQuadratic(); - - double quad[8] = { INTER_CU::_coordsC[0][icellS[0]], INTER_CU::_coordsC[1][icellS[1]], - INTER_CU::_coordsC[0][icellS[0]+1], INTER_CU::_coordsC[1][icellS[1]], - INTER_CU::_coordsC[0][icellS[0]+1], INTER_CU::_coordsC[1][icellS[1]+1], - INTER_CU::_coordsC[0][icellS[0]], INTER_CU::_coordsC[1][icellS[1]+1] }; - - double surf = _intersector.intersectGeometryWithQuadrangle( quad, - uCoords, - is_tgt_quad); - return surf; - } -} -#endif diff --git a/src/INTERP_KERNEL/IntersectorCU3D.hxx b/src/INTERP_KERNEL/IntersectorCU3D.hxx deleted file mode 100644 index c74565220..000000000 --- a/src/INTERP_KERNEL/IntersectorCU3D.hxx +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (C) 2009-2010 OPEN CASCADE -// -// 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File : IntersectorCU3D.hxx -// Created : Thu Dec 17 14:10:00 2009 -// Author : Edward AGAPOV (eap) -// -#ifndef __IntersectorCU3D_HXX__ -#define __IntersectorCU3D_HXX__ - -#include "IntersectorCU.hxx" -#include "SplitterTetra.hxx" - -namespace INTERP_KERNEL -{ - class _Cartesian3D2UnstructHexMesh; - - template - class IntersectorCU3D : public IntersectorCU > - { - public: - typedef typename MyUMeshType::MyConnType UConnType; - typedef typename MyCMeshType::MyConnType CConnType; - public: - IntersectorCU3D(const MyCMeshType& meshS, const MyUMeshType& meshT, SplittingPolicy splitting_policy); - ~IntersectorCU3D(); - double intersectGeometry(UConnType icellT, const std::vector& icellC); - - private: - - typedef SplitterTetra2 TSplitter; - typedef SplitterTetra <_Cartesian3D2UnstructHexMesh > TTetra; - _Cartesian3D2UnstructHexMesh* _uHexMesh; - TSplitter* _split; - }; -} - - -#endif diff --git a/src/INTERP_KERNEL/IntersectorCU3D.txx b/src/INTERP_KERNEL/IntersectorCU3D.txx deleted file mode 100644 index 6a94f91a9..000000000 --- a/src/INTERP_KERNEL/IntersectorCU3D.txx +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (C) 2009-2010 OPEN CASCADE -// -// 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : IntersectorCU3D.txx -// Created : Thu Dec 17 14:17:49 2009 -// Author : Edward AGAPOV (eap) - -#ifndef __IntersectorCU3D_TXX__ -#define __IntersectorCU3D_TXX__ - -#include "IntersectorCU3D.hxx" -#include "IntersectorCU.txx" -#include "SplitterTetra.txx" - -#define IntersectorCU3D_TEMPLATE template -#define INTERSECTOR_CU3D IntersectorCU3D -#define _INTERSECTOR_CU IntersectorCU > - -namespace INTERP_KERNEL -{ - //================================================================================ - /*! - * \brief Unstructured hexahedral mesh derived from cartesian 3D mesh. - * Mesh contains one HEXA8 element - */ - //================================================================================ - - class _Cartesian3D2UnstructHexMesh : public INTERP_KERNEL::GenericMesh - { - public: - static const int MY_SPACEDIM=3; - static const int MY_MESHDIM=3; - typedef int MyConnType; - static const NumberingPolicy My_numPol=ALL_C_MODE; - - _Cartesian3D2UnstructHexMesh(const double * coords[3]): _coordsC(coords) {} - void setHexa(int I, int J, int K) // indices in C mode - { - double* pCoord = _coordsU; - for ( int k = K; k < K+2; ++k ) - for ( int j = J; j < J+2; ++j ) - for ( int i = I; i < I+2; ++i ) - { - *pCoord++ = _coordsC[0][i]; - *pCoord++ = _coordsC[1][j]; - *pCoord++ = _coordsC[2][k]; - } - } - const int *getConnectivityPtr() const - { - static int conn[] = { 1,0,2,3,5,4,6,7 }; - return conn; - } - const int *getConnectivityIndexPtr() const - { - static int conInd[] = { 0,8 }; - return conInd; - } - void getBoundingBox(double *boundingBox) const - { - boundingBox[BoundingBox::XMIN] = _coordsU[0]; - boundingBox[BoundingBox::XMAX] = _coordsU[0+1*MY_SPACEDIM]; - boundingBox[BoundingBox::YMIN] = _coordsU[1]; - boundingBox[BoundingBox::YMAX] = _coordsU[1+2*MY_SPACEDIM]; - boundingBox[BoundingBox::ZMIN] = _coordsU[2]; - boundingBox[BoundingBox::ZMAX] = _coordsU[2+4*MY_SPACEDIM]; - } - NormalizedCellType getTypeOfElement(int eltId) const { return NORM_HEXA8; } - unsigned char getNumberOfNodesOfElement(int eltId) const { return 8; } - unsigned long getNumberOfElements() const { return 1; } - unsigned long getNumberOfNodes() const { return 8; } - const double *getCoordinatesPtr() const { return _coordsU; } - void releaseTempArrays() {} - private: - const double** _coordsC; - double _coordsU[3*8]; - }; - - //================================================================================ - /*! - * \brief intersector of the unstructured mesh and the cartesian mesh in 3D - */ - //================================================================================ - - IntersectorCU3D_TEMPLATE - INTERSECTOR_CU3D::IntersectorCU3D(const MyCMeshType& meshS, - const MyUMeshType& meshT, - SplittingPolicy splitting_policy): - _INTERSECTOR_CU( meshS, meshT ) - { - if ( MyCMeshType::MY_SPACEDIM != 3 || MyCMeshType::MY_MESHDIM != 3 || - MyUMeshType::MY_SPACEDIM != 3 || MyUMeshType::MY_MESHDIM != 3 ) - throw Exception("IntersectorCU3D(): Invalid mesh dimension, it must be 3"); - - _uHexMesh = new _Cartesian3D2UnstructHexMesh( _INTERSECTOR_CU::_coordsC ); - _split = new TSplitter( meshT, *_uHexMesh, splitting_policy ); - } - - //================================================================================ - /*! - * \brief destructor - */ - //================================================================================ - - IntersectorCU3D_TEMPLATE - INTERSECTOR_CU3D::~IntersectorCU3D() - { - delete _uHexMesh; _uHexMesh=0; - delete _split; _split=0; - } - - //================================================================================ - /*! - * \brief Calculate volume of intersection of an unstructured cell and a cartesian one. - * The cartesian cell is given by its [i,j,k] indices - */ - //================================================================================ - - IntersectorCU3D_TEMPLATE - double INTERSECTOR_CU3D::intersectGeometry(UConnType icellT, - const std::vector& icellS) - { - // split an unstructured cell into tetra - std::vector< TTetra* > tetra; - UConnType nb_nodes = - _INTERSECTOR_CU::_connIndexU[icellT+1] - _INTERSECTOR_CU::_connIndexU[icellT]; - _split->releaseArrays(); - _split->splitTargetCell( icellT, nb_nodes, tetra); - - // intersect a cartesian 3d cell with tetra - _uHexMesh->setHexa( _FMIC(icellS[0]),_FMIC(icellS[1]),_FMIC(icellS[2])); // set cell at i,j,k - double res = 0; - for ( unsigned int t = 0; t < tetra.size(); ++t ) - { - res += tetra[t]->intersectSourceCell( 0 ); - delete tetra[t]; - } - return res; - } -} -#endif diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.hxx b/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.hxx deleted file mode 100644 index 8426e7e6e..000000000 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.hxx +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __PLANARINTERSECTORP0P1PL_HXX__ -#define __PLANARINTERSECTORP0P1PL_HXX__ - -#include "PlanarIntersector.hxx" - -namespace INTERP_KERNEL -{ - template - class PlanarIntersectorP0P1PL : public PlanarIntersector - { - public: - static const int SPACEDIM=MyMeshType::MY_SPACEDIM; - static const int MESHDIM=MyMeshType::MY_MESHDIM; - typedef typename MyMeshType::MyConnType ConnType; - static const NumberingPolicy numPol=MyMeshType::My_numPol; - public: - PlanarIntersectorP0P1PL(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double md3DSurf, double medianPlane, double precision, int orientation); - void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; - }; -} - -#endif diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.txx b/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.txx deleted file mode 100644 index 29dba1bb9..000000000 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P1PL.txx +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __PLANARINTERSECTORP0P1PL_TXX__ -#define __PLANARINTERSECTORP0P1PL_TXX__ - -#include "PlanarIntersectorP0P1PL.hxx" -#include "PlanarIntersector.txx" -#include "CellModel.hxx" - -#include "PointLocatorAlgos.txx" - -namespace INTERP_KERNEL -{ - template - PlanarIntersectorP0P1PL::PlanarIntersectorP0P1PL(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double md3DSurf, - double medianPlane, double precision, int orientation): - PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,true,orientation,0) - { - } - - template - void PlanarIntersectorP0P1PL::intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res) - { - std::vector< std::vector > coordsOfSources(icellsS.size()); - int ii=0; - for(typename std::vector::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++,ii++) - PlanarIntersector::getRealSourceCoordinates(OTT::indFC(*iter),coordsOfSources[ii]); - const ConnType *startOfCellNodeConnT=PlanarIntersector::_connectT+OTT::conn2C(PlanarIntersector::_connIndexT[icellT]); - std::vector coordsTarget; - PlanarIntersector::getRealTargetCoordinates(OTT::indFC(icellT),coordsTarget); - int nbNodesT=coordsTarget.size()/SPACEDIM; - ii=0; - for(typename std::vector::const_iterator iter2=icellsS.begin();iter2!=icellsS.end();iter2++,ii++) - { - std::vector tmpSource(coordsOfSources[ii]); - std::vector tmpTarget(coordsTarget); - if(SPACEDIM==3) - PlanarIntersector::projectionThis(&tmpSource[0],&tmpTarget[0],tmpSource.size()/SPACEDIM,nbNodesT); - for(int nodeIdT=0;nodeIdT::isElementContainsPointAlg2D(&tmpTarget[0]+nodeIdT*SPACEDIM,&tmpSource[0],tmpSource.size()/SPACEDIM,PlanarIntersector::_precision)) - { - ConnType curNodeTInCmode=OTT::coo2C(startOfCellNodeConnT[nodeIdT]); - typename MyMatrix::value_type& resRow=res[curNodeTInCmode]; - typename MyMatrix::value_type::const_iterator iterRes=resRow.find(OTT::indFC(*iter2)); - if(iterRes==resRow.end()) - resRow.insert(std::make_pair(OTT::indFC(*iter2),1.)); - } - } - } - } - - template - int PlanarIntersectorP0P1PL::getNumberOfRowsOfResMatrix() const - { - return PlanarIntersector::_meshT.getNumberOfNodes(); - } - - template - int PlanarIntersectorP0P1PL::getNumberOfColsOfResMatrix() const - { - return PlanarIntersector::_meshS.getNumberOfElements(); - } -} - -#endif diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.hxx b/src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.hxx deleted file mode 100644 index d58cffc9c..000000000 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.hxx +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __PlanarIntersectorP1P0Bary_HXX__ -#define __PlanarIntersectorP1P0Bary_HXX__ - -#include "PlanarIntersector.hxx" - -namespace INTERP_KERNEL -{ - template - class PlanarIntersectorP1P0Bary : public PlanarIntersector - { - public: - static const int SPACEDIM=MyMeshType::MY_SPACEDIM; - static const int MESHDIM=MyMeshType::MY_MESHDIM; - typedef typename MyMeshType::MyConnType ConnType; - static const NumberingPolicy numPol=MyMeshType::My_numPol; - protected: - PlanarIntersectorP1P0Bary(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); - public: - void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; - /*! - * Contrary to intersectCells method here icellS and icellT are \b not in \b C mode but in mode of MyMeshType. - */ - double intersectGeoBary(const std::vector& targetCell, - bool targetCellQuadratic, - const double * sourceTria, - std::vector& res) - { return asLeaf().intersectGeoBary(targetCell,targetCellQuadratic,sourceTria,res); } - protected: - ConcreteP1P0Intersector& asLeaf() { return static_cast(*this); } - }; -} - -#endif diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.txx b/src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.txx deleted file mode 100644 index dd59b8c42..000000000 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.txx +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email :webmaster.salome@opencascade.com -#ifndef __PlanarIntersectorP1P0Bary_TXX__ -#define __PlanarIntersectorP1P0Bary_TXX__ - -#include "PlanarIntersectorP1P0Bary.hxx" -#include "InterpolationUtils.hxx" - -#define PLAN_INTERSECTOR PlanarIntersectorP1P0Bary -#define PLAN_INTER_TEMPLATE template - -namespace INTERP_KERNEL -{ - PLAN_INTER_TEMPLATE - PLAN_INTERSECTOR::PlanarIntersectorP1P0Bary(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double precision, - double md3DSurf, double medianPlane, - bool doRotate, int orientation, int printLevel): - PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf, - medianPlane,doRotate,orientation,printLevel) - { - // SPEC: - // "Limitation. For the P1P0 barycentric improvement only triangle source cells in 2D and - // tetrahedrons in 3D will be supported by interpolators. If a non - // triangle/tetrahedron source cell is detected an INTERP_KERNEL::Exception should be thrown." - - // Check types of source elements here rather than in intersectCells() since a wrong type can be - // found late after a long time of calculation. - - const unsigned long numSrcElems = meshS.getNumberOfElements(); - for(unsigned long i = 0 ; i < numSrcElems ; ++i) - if ( meshS.getTypeOfElement( OTT::indFC( i )) != NORM_TRI3 ) - throw INTERP_KERNEL::Exception("P1P0 barycentric algorithm works only with triangular source meshes"); - } - - PLAN_INTER_TEMPLATE - int PLAN_INTERSECTOR::getNumberOfRowsOfResMatrix() const - { - return PlanarIntersector::_meshT.getNumberOfElements(); - } - - PLAN_INTER_TEMPLATE - int PLAN_INTERSECTOR::getNumberOfColsOfResMatrix() const - { - return PlanarIntersector::_meshS.getNumberOfNodes(); - } - - /*! - * This method computes a value per each node of each source triangle for target. - */ - PLAN_INTER_TEMPLATE - void PLAN_INTERSECTOR::intersectCells(ConnType icellT, - const std::vector& icellsS, - MyMatrix& res) - { - int orientation=1; - std::vector srcTriaCoords, tgtCellCoords, tgtCellCoordsTmp, nodeCeffs; - - // target cell data - PlanarIntersector::getRealTargetCoordinates(OTT::indFC(icellT),tgtCellCoords); - std::vector * tgtCoords = & tgtCellCoords; - int tgtNbNodes = tgtCellCoords.size()/SPACEDIM; - NormalizedCellType tT=PlanarIntersector::_meshT.getTypeOfElement(OTT::indFC(icellT)); - bool isTargetQuad=CellModel::getCellModel(tT).isQuadratic(); - - typename MyMatrix::value_type& resRow=res[icellT]; - - // treat each source triangle - for(typename std::vector::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++) - { - int iS=*iter; - PlanarIntersector::getRealSourceCoordinates(OTT::indFC(iS),srcTriaCoords); - const ConnType *startOfCellNodeConn=PlanarIntersector::_connectS+OTT::conn2C(PlanarIntersector::_connIndexS[iS]); - if(SPACEDIM==3) - { - tgtCellCoordsTmp = tgtCellCoords; - tgtCoords = & tgtCellCoordsTmp; - orientation=PlanarIntersector::projectionThis(&tgtCellCoordsTmp[0], &srcTriaCoords[0], - tgtNbNodes, 3); - } - //double surf=orientation*intersectGeometryWithQuadrangle(quadrangle,targetCellCoordsTmp,isTargetQuad); - double surf=orientation*intersectGeoBary( *tgtCoords, isTargetQuad, &srcTriaCoords[0], nodeCeffs ); - surf=PlanarIntersector::getValueRegardingOption(surf); - if(surf!=0.) - { - for(int nodeIdS=0;nodeIdS<3;nodeIdS++) - { - ConnType curNodeS=startOfCellNodeConn[nodeIdS]; - typename MyMatrix::value_type::const_iterator iterRes=resRow.find(curNodeS); - if(iterRes!=resRow.end()) - { - nodeCeffs[nodeIdS] += iterRes->second; - resRow.erase( curNodeS ); - } - resRow.insert(std::make_pair(curNodeS,nodeCeffs[nodeIdS])); - } - } - } - } -} -#endif diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.hxx b/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.hxx deleted file mode 100644 index 31fda104a..000000000 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.hxx +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __PLANARINTERSECTORP1P0PL_HXX__ -#define __PLANARINTERSECTORP1P0PL_HXX__ - -#include "PlanarIntersector.hxx" - -namespace INTERP_KERNEL -{ - template - class PlanarIntersectorP1P0PL : public PlanarIntersector - { - public: - static const int SPACEDIM=MyMeshType::MY_SPACEDIM; - static const int MESHDIM=MyMeshType::MY_MESHDIM; - typedef typename MyMeshType::MyConnType ConnType; - static const NumberingPolicy numPol=MyMeshType::My_numPol; - public: - PlanarIntersectorP1P0PL(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double md3DSurf, double medianPlane, double precision, int orientation); - void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; - }; -} - -#endif diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.txx b/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.txx deleted file mode 100644 index 4973f93d1..000000000 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P0PL.txx +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __PLANARINTERSECTORP1P0PL_TXX__ -#define __PLANARINTERSECTORP1P0PL_TXX__ - -#include "PlanarIntersectorP1P0PL.hxx" -#include "PlanarIntersector.txx" -#include "CellModel.hxx" - -#include "PointLocatorAlgos.txx" -#include "InterpKernelGeo2DQuadraticPolygon.hxx" -#include "MeshUtils.hxx" - -namespace INTERP_KERNEL -{ - template - PlanarIntersectorP1P0PL::PlanarIntersectorP1P0PL(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double md3DSurf, - double medianPlane, double precision, int orientation): - PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,true,orientation,0) - { - } - - template - void PlanarIntersectorP1P0PL::intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res) - { - std::vector CoordsT; - typename MyMatrix::value_type& resRow=res[icellT]; - PlanarIntersector::getRealTargetCoordinates(OTT::indFC(icellT),CoordsT); - double baryT[SPACEDIM]; - double baryTTmp[SPACEDIM]; - calculateBarycenterDyn2(&CoordsT[0],CoordsT.size()/SPACEDIM,baryT); - for(typename std::vector::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++) - { - NormalizedCellType tS=PlanarIntersector::_meshS.getTypeOfElement(OTT::indFC(*iter)); - if(tS!=NORM_TRI3) - throw INTERP_KERNEL::Exception("Invalid source cell detected for meshdim==2. Only TRI3 supported !"); - std::vector CoordsS; - PlanarIntersector::getRealSourceCoordinates(OTT::indFC(*iter),CoordsS); - if(SPACEDIM==2) - { - std::copy(baryT,baryT+SPACEDIM,baryTTmp); - } - else - { - double littleTargetCell[9]; - std::copy(baryT,baryT+3,littleTargetCell); - std::copy(CoordsT.begin(),CoordsT.begin()+3,littleTargetCell+3); - std::copy(CoordsT.begin()+3,CoordsT.begin()+6,littleTargetCell+6); - PlanarIntersector::projectionThis(&CoordsS[0],littleTargetCell,3,3); - std::copy(littleTargetCell,littleTargetCell+3,baryTTmp); - } - if(PointLocatorAlgos::isElementContainsPointAlg2D(baryTTmp,&CoordsS[0],3,PlanarIntersector::_precision)) - { - double resLoc[3]; - barycentric_coords(&CoordsS[0],baryTTmp,resLoc); - const ConnType *startOfCellNodeConnS=PlanarIntersector::_connectS+OTT::conn2C(PlanarIntersector::_connIndexS[*iter]); - for(int nodeIdS=0;nodeIdS<3;nodeIdS++) - { - if(fabs(resLoc[nodeIdS])>PlanarIntersector::_precision) - { - ConnType curNodeSInCmode=OTT::coo2C(startOfCellNodeConnS[nodeIdS]); - typename MyMatrix::value_type::const_iterator iterRes=resRow.find(OTT::indFC(curNodeSInCmode)); - if(iterRes==resRow.end()) - resRow.insert(std::make_pair(OTT::indFC(curNodeSInCmode),resLoc[nodeIdS])); - else - { - double val=(*iterRes).second+resLoc[nodeIdS]; - resRow.erase(OTT::indFC(curNodeSInCmode)); - resRow.insert(std::make_pair(OTT::indFC(curNodeSInCmode),val)); - } - } - } - } - } - } - - template - int PlanarIntersectorP1P0PL::getNumberOfRowsOfResMatrix() const - { - return PlanarIntersector::_meshT.getNumberOfElements(); - } - - template - int PlanarIntersectorP1P0PL::getNumberOfColsOfResMatrix() const - { - return PlanarIntersector::_meshS.getNumberOfNodes(); - } -} - -#endif diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P1.hxx b/src/INTERP_KERNEL/PlanarIntersectorP1P1.hxx deleted file mode 100644 index 4278bb39a..000000000 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P1.hxx +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __PLANARINTERSECTORP1P1_HXX__ -#define __PLANARINTERSECTORP1P1_HXX__ - -#include "PlanarIntersector.hxx" - -namespace INTERP_KERNEL -{ - template - class PlanarIntersectorP1P1 : public PlanarIntersector - { - public: - static const int SPACEDIM=MyMeshType::MY_SPACEDIM; - static const int MESHDIM=MyMeshType::MY_MESHDIM; - typedef typename MyMeshType::MyConnType ConnType; - static const NumberingPolicy numPol=MyMeshType::My_numPol; - protected: - PlanarIntersectorP1P1(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); - public: - void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; - - double intersectGeometryGeneral(const std::vector& targetCoords, const std::vector& sourceCoords) { return asLeaf().intersectGeometryGeneral(targetCoords,sourceCoords); } - protected: - ConcreteP1P1Intersector& asLeaf() { return static_cast(*this); } - }; -} - -#endif diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P1.txx b/src/INTERP_KERNEL/PlanarIntersectorP1P1.txx deleted file mode 100644 index dcd85a694..000000000 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P1.txx +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email :webmaster.salome@opencascade.com -#ifndef __PLANARINTERSECTORP1P1_TXX__ -#define __PLANARINTERSECTORP1P1_TXX__ - -#include "PlanarIntersectorP1P1.hxx" -#include "InterpolationUtils.hxx" -#include "CellModel.hxx" - -namespace INTERP_KERNEL -{ - template - PlanarIntersectorP1P1::PlanarIntersectorP1P1(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double precision, double md3DSurf, double medianPlane, - bool doRotate, int orientation, int printLevel): - PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,doRotate,orientation,printLevel) - { - } - - template - int PlanarIntersectorP1P1::getNumberOfRowsOfResMatrix() const - { - return PlanarIntersector::_meshT.getNumberOfNodes(); - } - - template - int PlanarIntersectorP1P1::getNumberOfColsOfResMatrix() const - { - return PlanarIntersector::_meshS.getNumberOfNodes(); - } - - /*! - * This methods split on the fly, into triangles in order to compute dual mesh of target cell (with icellT id in target mesh in C mode). - */ - template - void PlanarIntersectorP1P1::intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res) - { - int nbNodesT=PlanarIntersector::_connIndexT[icellT+1]-PlanarIntersector::_connIndexT[icellT]; - int orientation=1; - const ConnType *startOfCellNodeConn=PlanarIntersector::_connectT+OTT::conn2C(PlanarIntersector::_connIndexT[icellT]); - std::vector polygT; - PlanarIntersector::getRealTargetCoordinates(OTT::indFC(icellT),polygT); - for(int nodeIdT=0;nodeIdT::coo2C(startOfCellNodeConn[nodeIdT]); - PlanarIntersector::getRealTargetCoordinatesPermute(OTT::indFC(icellT),nodeIdT,polygT); - std::vector polygDualT(SPACEDIM*2*(nbNodesT-1)); - fillDualCellOfPolyg(&polygT[0],polygT.size()/SPACEDIM,&polygDualT[0]); - typename MyMatrix::value_type& resRow=res[curNodeTInCmode]; - for(typename std::vector::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++) - { - int iS=*iter; - int nbNodesS=PlanarIntersector::_connIndexS[iS+1]-PlanarIntersector::_connIndexS[iS]; - const ConnType *startOfCellNodeConnS=PlanarIntersector::_connectS+OTT::conn2C(PlanarIntersector::_connIndexS[iS]); - for(int nodeIdS=0;nodeIdS::coo2C(startOfCellNodeConnS[nodeIdS]); - std::vector polygS; - PlanarIntersector::getRealSourceCoordinatesPermute(OTT::indFC(iS),nodeIdS,polygS); - std::vector polygDualS(SPACEDIM*2*(nbNodesS-1)); - fillDualCellOfPolyg(&polygS[0],polygS.size()/SPACEDIM,&polygDualS[0]); - std::vector polygDualTTmp(polygDualT); - if(SPACEDIM==3) - orientation=PlanarIntersector::projectionThis(&polygDualS[0],&polygDualTTmp[0],polygDualS.size()/SPACEDIM,polygDualT.size()/SPACEDIM); - double surf=orientation*intersectGeometryGeneral(polygDualTTmp,polygDualS); - surf=PlanarIntersector::getValueRegardingOption(surf); - if(surf!=0.) - { - typename MyMatrix::value_type::const_iterator iterRes=resRow.find(OTT::indFC(curNodeSInCmode)); - if(iterRes==resRow.end()) - resRow.insert(std::make_pair(OTT::indFC(curNodeSInCmode),surf)); - else - { - double val=(*iterRes).second+surf; - resRow.erase(OTT::indFC(curNodeSInCmode)); - resRow.insert(std::make_pair(OTT::indFC(curNodeSInCmode),val)); - } - } - } - } - } - } -} - -#endif diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.hxx b/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.hxx deleted file mode 100644 index a93b16bfa..000000000 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.hxx +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __PLANARINTERSECTORP1P1PL_HXX__ -#define __PLANARINTERSECTORP1P1PL_HXX__ - -#include "PlanarIntersector.hxx" - -namespace INTERP_KERNEL -{ - template - class PlanarIntersectorP1P1PL : public PlanarIntersector - { - public: - static const int SPACEDIM=MyMeshType::MY_SPACEDIM; - static const int MESHDIM=MyMeshType::MY_MESHDIM; - typedef typename MyMeshType::MyConnType ConnType; - static const NumberingPolicy numPol=MyMeshType::My_numPol; - public: - PlanarIntersectorP1P1PL(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double md3DSurf, double medianPlane, double precision, int orientation); - void intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res); - int getNumberOfRowsOfResMatrix() const; - int getNumberOfColsOfResMatrix() const; - }; -} - -#endif diff --git a/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx b/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx deleted file mode 100644 index 76eaaab10..000000000 --- a/src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __PLANARINTERSECTORP1P1PL_TXX__ -#define __PLANARINTERSECTORP1P1PL_TXX__ - -#include "PlanarIntersectorP1P1PL.hxx" -#include "PlanarIntersector.txx" -#include "CellModel.hxx" - -#include "PointLocatorAlgos.txx" -#include "MeshUtils.hxx" - -namespace INTERP_KERNEL -{ - template - PlanarIntersectorP1P1PL::PlanarIntersectorP1P1PL(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double md3DSurf, - double medianPlane, double precision, int orientation): - PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,true,orientation,0) - { - } - - template - void PlanarIntersectorP1P1PL::intersectCells(ConnType icellT, const std::vector& icellsS, MyMatrix& res) - { - std::vector CoordsT; - PlanarIntersector::getRealTargetCoordinates(OTT::indFC(icellT),CoordsT); - int nbOfNodesT=CoordsT.size()/SPACEDIM; - for(typename std::vector::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++) - { - NormalizedCellType tS=PlanarIntersector::_meshS.getTypeOfElement(OTT::indFC(*iter)); - if(tS!=NORM_TRI3) - throw INTERP_KERNEL::Exception("Invalid source cell detected for meshdim==2. Only TRI3 supported !"); - std::vector CoordsS; - PlanarIntersector::getRealSourceCoordinates(OTT::indFC(*iter),CoordsS); - std::vector CoordsTTmp(CoordsT); - if(SPACEDIM==3) - PlanarIntersector::projectionThis(&CoordsS[0],&CoordsTTmp[0],CoordsS.size()/SPACEDIM,nbOfNodesT); - const ConnType *startOfCellNodeConnT=PlanarIntersector::_connectT+OTT::conn2C(PlanarIntersector::_connIndexT[icellT]); - for(int nodeIdT=0;nodeIdT::ind2C(startOfCellNodeConnT[nodeIdT])]; - if( PointLocatorAlgos::isElementContainsPointAlg2D(&CoordsTTmp[nodeIdT*SPACEDIM],&CoordsS[0],3,PlanarIntersector::_precision) ) - { - double resLoc[3]; - barycentric_coords(&CoordsS[0],&CoordsTTmp[nodeIdT*SPACEDIM],resLoc); - const ConnType *startOfCellNodeConnS=PlanarIntersector::_connectS+OTT::conn2C(PlanarIntersector::_connIndexS[*iter]); - for(int nodeIdS=0;nodeIdS<3;nodeIdS++) - { - if(fabs(resLoc[nodeIdS])>PlanarIntersector::_precision) - { - ConnType curNodeSInCmode=OTT::coo2C(startOfCellNodeConnS[nodeIdS]); - typename MyMatrix::value_type::const_iterator iterRes=resRow.find(OTT::indFC(curNodeSInCmode)); - if(iterRes==resRow.end()) - resRow.insert(std::make_pair(OTT::indFC(curNodeSInCmode),resLoc[nodeIdS])); - else - { - double val=(*iterRes).second+resLoc[nodeIdS]; - resRow.erase(OTT::indFC(curNodeSInCmode)); - resRow.insert(std::make_pair(OTT::indFC(curNodeSInCmode),val)); - } - } - } - } - } - } - } - - template - int PlanarIntersectorP1P1PL::getNumberOfRowsOfResMatrix() const - { - return PlanarIntersector::_meshT.getNumberOfNodes(); - } - - template - int PlanarIntersectorP1P1PL::getNumberOfColsOfResMatrix() const - { - return PlanarIntersector::_meshS.getNumberOfNodes(); - } -} - -#endif diff --git a/src/INTERP_KERNEL/PointLocator2DIntersector.hxx b/src/INTERP_KERNEL/PointLocator2DIntersector.hxx deleted file mode 100644 index 6ee193353..000000000 --- a/src/INTERP_KERNEL/PointLocator2DIntersector.hxx +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __POINTLOCATORINTERSECTOR_HXX__ -#define __POINTLOCATORINTERSECTOR_HXX__ - -#include "PlanarIntersectorP0P0.hxx" -#include "PlanarIntersectorP0P1.hxx" -#include "PlanarIntersectorP1P0.hxx" -#include "PlanarIntersectorP1P1.hxx" -#include "PlanarIntersectorP1P0Bary.hxx" - -namespace INTERP_KERNEL -{ - class QuadraticPolygon; - - template class InterpType> - class PointLocator2DIntersector : public InterpType > - { - public: - static const int SPACEDIM=MyMeshType::MY_SPACEDIM; - static const int MESHDIM=MyMeshType::MY_MESHDIM; - typedef typename MyMeshType::MyConnType ConnType; - static const NumberingPolicy numPol=MyMeshType::My_numPol; - public: - PointLocator2DIntersector(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double md3DSurf, double medianPlane, double precision, int orientation); - double intersectGeometry(ConnType icellT, ConnType icellS, ConnType nbNodesT, ConnType nbNodesS); - double intersectGeometryWithQuadrangle(const double *quadrangle, const std::vector& sourceCoords, bool isSourceQuad); - double intersectGeometryGeneral(const std::vector& targetCoords, const std::vector& sourceCoords); - double intersectGeoBary(const std::vector& targetCell, bool targetCellQuadratic, const double *sourceCell, std::vector& res); - private: - QuadraticPolygon *buildPolygonFrom(const std::vector& coords, NormalizedCellType type); - QuadraticPolygon *buildPolygonAFrom(ConnType cell, int nbOfPoints, NormalizedCellType type); - QuadraticPolygon *buildPolygonBFrom(ConnType cell, int nbOfPoints, NormalizedCellType type); - }; -} - -#endif diff --git a/src/INTERP_KERNEL/PointLocator2DIntersector.txx b/src/INTERP_KERNEL/PointLocator2DIntersector.txx deleted file mode 100644 index f6a329047..000000000 --- a/src/INTERP_KERNEL/PointLocator2DIntersector.txx +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __POINTLOCATORINTERSECTOR_TXX__ -#define __POINTLOCATORINTERSECTOR_TXX__ - -#include "PointLocator2DIntersector.hxx" -#include "PlanarIntersectorP0P0.txx" -#include "PlanarIntersectorP0P1.txx" -#include "PlanarIntersectorP1P0.txx" -#include "PlanarIntersectorP1P1.txx" -#include "PlanarIntersectorP1P0Bary.txx" -#include "CellModel.hxx" - -#include "InterpKernelGeo2DQuadraticPolygon.hxx" -#include "PointLocatorAlgos.txx" - -#define PTLOC2D_INTERSECTOR PointLocator2DIntersector -#define INTERSECTOR_TEMPLATE template class InterpType> - -namespace INTERP_KERNEL -{ - INTERSECTOR_TEMPLATE - PTLOC2D_INTERSECTOR::PointLocator2DIntersector(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double md3DSurf, double medianPlane, - double precision, int orientation): - InterpType(meshT,meshS,dimCaracteristic, precision, md3DSurf, medianPlane, true, orientation, 0) - { - } - - INTERSECTOR_TEMPLATE - double PTLOC2D_INTERSECTOR::intersectGeometry(ConnType icellT, ConnType icellS, - ConnType nbNodesT, ConnType nbNodesS) - { - int orientation = 1; - std::vector CoordsT; - std::vector CoordsS; - PlanarIntersector::getRealCoordinates(icellT,icellS,nbNodesT,nbNodesS,CoordsT,CoordsS,orientation); - NormalizedCellType tT=PlanarIntersector::_meshT.getTypeOfElement(icellT); - QuadraticPolygon *pT=buildPolygonFrom(CoordsT,tT); - double baryT[SPACEDIM]; - pT->getBarycenterGeneral(baryT); - delete pT; - if(PointLocatorAlgos::isElementContainsPointAlg2D(baryT,&CoordsS[0],nbNodesS,InterpType::_precision)) - return 1.; - return 0.; - } - - INTERSECTOR_TEMPLATE - double PTLOC2D_INTERSECTOR::intersectGeometryWithQuadrangle(const double * quadrangle, - const std::vector& sourceCoords, - bool isSourceQuad) - { - int nbOfSourceNodes=sourceCoords.size()/SPACEDIM; - std::vector nodes2(nbOfSourceNodes); - for(int i=0;igetBarycenter(bary); - delete p2; - if( PointLocatorAlgos::isElementContainsPointAlg2D(bary,quadrangle,4) ) - return 1.; - return 0.; - } - - INTERSECTOR_TEMPLATE - double PTLOC2D_INTERSECTOR::intersectGeometryGeneral(const std::vector& targetCoords, - const std::vector& sourceCoords) - { - int nbOfTargetNodes=targetCoords.size()/SPACEDIM; - int nbOfSourceNodes=sourceCoords.size()/SPACEDIM; - std::vector nodes2(nbOfSourceNodes); - for(int i=0;igetBarycenterGeneral(bary); - delete p; - if( PointLocatorAlgos::isElementContainsPointAlg2D(bary,&targetCoords[0],nbOfTargetNodes) ) - return 1.; - return 0.; - } - - //================================================================================ - /*! - * \brief Intersect a triangle and a polygon for P1P0 barycentric algorithm - * \param targetCell - list of coordinates of target polygon in full interlace - * \param targetCellQuadratic - specifies if target polygon is quadratic or not - * \param sourceTria - list of coordinates of source triangle - * \param res - coefficients a,b and c associated to nodes of sourceTria - */ - //================================================================================ - - INTERSECTOR_TEMPLATE - double PTLOC2D_INTERSECTOR::intersectGeoBary(const std::vector& targetCell, - bool targetCellQuadratic, - const double * sourceTria, - std::vector& res) - { - throw INTERP_KERNEL::Exception("intersectGeoBary incompatible with PointLocator. Desactivate P1P0Bary to avoid the problem"); - return 0.; - } - - INTERSECTOR_TEMPLATE - QuadraticPolygon *PTLOC2D_INTERSECTOR::buildPolygonFrom(const std::vector& coords, NormalizedCellType type) - { - int nbNodes=coords.size()/SPACEDIM; - std::vector nodes(nbNodes); - for(int i=0;i::_connectT+OTT::conn2C(PlanarIntersector::_connIndexT[OTT::ind2C(cell)]); - std::vector nodes(nbOfPoints); - for(int i=0;i::_coordsT+OTT::coo2C(startOfCellNodeConn[i])*SPACEDIM); - if(CellModel::getCellModel(type).isQuadratic()) - return QuadraticPolygon::buildLinearPolygon(nodes); - else - return QuadraticPolygon::buildArcCirclePolygon(nodes); - } - - INTERSECTOR_TEMPLATE - QuadraticPolygon *PTLOC2D_INTERSECTOR::buildPolygonBFrom(ConnType cell, int nbOfPoints, NormalizedCellType type) - { - const ConnType *startOfCellNodeConn=PlanarIntersector::_connectS+OTT::conn2C(PlanarIntersector::_connIndexS[OTT::ind2C(cell)]); - std::vector nodes(nbOfPoints); - for(int i=0;i::_coordsS+OTT::coo2C(startOfCellNodeConn[i])*SPACEDIM); - if(type!=NORM_TRI6 && type!=NORM_QUAD8) - return QuadraticPolygon::buildLinearPolygon(nodes); - else - return QuadraticPolygon::buildArcCirclePolygon(nodes); - } -} - -#endif diff --git a/src/INTERP_KERNEL/PointLocator3DIntersectorP0P0.hxx b/src/INTERP_KERNEL/PointLocator3DIntersectorP0P0.hxx deleted file mode 100644 index 7c9df49ed..000000000 --- a/src/INTERP_KERNEL/PointLocator3DIntersectorP0P0.hxx +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __POINTLOCATOR3DINTERSECTORP0P0_HXX__ -#define __POINTLOCATOR3DINTERSECTORP0P0_HXX__ - -#include "Intersector3DP0P0.hxx" -#include "NormalizedUnstructuredMesh.hxx" - -namespace INTERP_KERNEL -{ - template - class PointLocator3DIntersectorP0P0 : public Intersector3DP0P0 - { - public: - static const int SPACEDIM=MyMeshType::MY_SPACEDIM; - static const int MESHDIM=MyMeshType::MY_MESHDIM; - typedef typename MyMeshType::MyConnType ConnType; - static const NumberingPolicy numPol=MyMeshType::My_numPol; - public: - PointLocator3DIntersectorP0P0(const MyMeshType& targetMesh, const MyMeshType& srcMesh, double precision); - ~PointLocator3DIntersectorP0P0(); - void intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res); - protected: - double _precision; - }; -} - -#endif diff --git a/src/INTERP_KERNEL/PointLocator3DIntersectorP0P0.txx b/src/INTERP_KERNEL/PointLocator3DIntersectorP0P0.txx deleted file mode 100644 index b88c0b468..000000000 --- a/src/INTERP_KERNEL/PointLocator3DIntersectorP0P0.txx +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __POINTLOCATOR3DINTERSECTORP0P0_TXX__ -#define __POINTLOCATOR3DINTERSECTORP0P0_TXX__ - -#include "PointLocator3DIntersectorP0P0.hxx" -#include "Intersector3DP0P0.txx" -#include "MeshUtils.hxx" - -#include "SplitterTetra.txx" -#include "PointLocatorAlgos.txx" - -namespace INTERP_KERNEL -{ - - /** - * @param targetMesh mesh containing the target elements - * @param srcMesh mesh containing the source elements - * @param policy splitting policy to be used - */ - template - PointLocator3DIntersectorP0P0::PointLocator3DIntersectorP0P0(const MyMeshType& targetMesh, const MyMeshType& srcMesh, double precision): - Intersector3DP0P0(targetMesh,srcMesh),_precision(precision) - { - } - - template - PointLocator3DIntersectorP0P0::~PointLocator3DIntersectorP0P0() - { - } - - /** - * - * @param targetCell in C mode. - * @param srcCells in C mode. - * - */ - template - void PointLocator3DIntersectorP0P0::intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res) - { - std::vector CoordsT; - Intersector3DP0P0::getRealTargetCoordinates(OTT::indFC(targetCell),CoordsT); - double bary[SPACEDIM]; - calculateBarycenterDyn2(&CoordsT[0],CoordsT.size()/SPACEDIM,bary); - typename MyMatrix::value_type& resRow=res[targetCell]; - const double *coordsS=Intersector3DP0P0::_src_mesh.getCoordinatesPtr(); - for(typename std::vector::const_iterator iterCellS=srcCells.begin();iterCellS!=srcCells.end();iterCellS++) - { - NormalizedCellType tS=Intersector3DP0P0::_src_mesh.getTypeOfElement(OTT::indFC(*iterCellS)); - const CellModel& cmTypeS=CellModel::getCellModel(tS); - std::vector connOfCurCellS; - Intersector3DP0P0::getConnOfSourceCell(OTT::indFC(*iterCellS),connOfCurCellS); - if(PointLocatorAlgos::isElementContainsPointAlg3D(bary,&connOfCurCellS[0],connOfCurCellS.size(),coordsS,cmTypeS,_precision)) - { - resRow.insert(std::make_pair(OTT::indFC(*iterCellS),1)); - } - } - } -} - -#endif diff --git a/src/INTERP_KERNEL/PointLocator3DIntersectorP0P1.hxx b/src/INTERP_KERNEL/PointLocator3DIntersectorP0P1.hxx deleted file mode 100644 index 9b8c986b1..000000000 --- a/src/INTERP_KERNEL/PointLocator3DIntersectorP0P1.hxx +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __POINTLOCATOR3DINTERSECTORP0P1_HXX__ -#define __POINTLOCATOR3DINTERSECTORP0P1_HXX__ - -#include "Intersector3DP0P1.hxx" -#include "NormalizedUnstructuredMesh.hxx" - -namespace INTERP_KERNEL -{ - template - class PointLocator3DIntersectorP0P1 : public Intersector3DP0P1 - { - public: - static const int SPACEDIM=MyMeshType::MY_SPACEDIM; - static const int MESHDIM=MyMeshType::MY_MESHDIM; - typedef typename MyMeshType::MyConnType ConnType; - static const NumberingPolicy numPol=MyMeshType::My_numPol; - public: - PointLocator3DIntersectorP0P1(const MyMeshType& targetMesh, const MyMeshType& srcMesh, double precision); - ~PointLocator3DIntersectorP0P1(); - void intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res); - protected: - double _precision; - }; -} - -#endif diff --git a/src/INTERP_KERNEL/PointLocator3DIntersectorP0P1.txx b/src/INTERP_KERNEL/PointLocator3DIntersectorP0P1.txx deleted file mode 100644 index 1f84569d3..000000000 --- a/src/INTERP_KERNEL/PointLocator3DIntersectorP0P1.txx +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __POINTLOCATOR3DINTERSECTORP0P1_TXX__ -#define __POINTLOCATOR3DINTERSECTORP0P1_TXX__ - -#include "PointLocator3DIntersectorP0P1.hxx" -#include "Intersector3DP0P1.txx" -#include "MeshUtils.hxx" - -namespace INTERP_KERNEL -{ - - /** - * @param targetMesh mesh containing the target elements - * @param srcMesh mesh containing the source elements - * @param policy splitting policy to be used - */ - template - PointLocator3DIntersectorP0P1::PointLocator3DIntersectorP0P1(const MyMeshType& targetMesh, const MyMeshType& srcMesh, double precision): - Intersector3DP0P1(targetMesh,srcMesh),_precision(precision) - { - } - - template - PointLocator3DIntersectorP0P1::~PointLocator3DIntersectorP0P1() - { - } - - /** - * - * @param targetCell in C mode. - * @param srcCells in C mode. - * - */ - template - void PointLocator3DIntersectorP0P1::intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res) - { - std::vector coordsTarget; - Intersector3DP0P1::getRealTargetCoordinates(OTT::indFC(targetCell),coordsTarget); - int nbNodesT=coordsTarget.size()/SPACEDIM; - const double *coordsS=Intersector3DP0P1::_src_mesh.getCoordinatesPtr(); - const ConnType *startOfCellNodeConnT=Intersector3DP0P1::getStartConnOfTargetCell(targetCell); - for(typename std::vector::const_iterator iterCellS=srcCells.begin();iterCellS!=srcCells.end();iterCellS++) - { - NormalizedCellType tS=Intersector3DP0P1::_src_mesh.getTypeOfElement(OTT::indFC(*iterCellS)); - const CellModel& cmTypeS=CellModel::getCellModel(tS); - std::vector connOfCurCellS; - Intersector3DP0P1::getConnOfSourceCell(OTT::indFC(*iterCellS),connOfCurCellS); - for(int nodeIdT=0;nodeIdT::isElementContainsPointAlg3D(&coordsTarget[nodeIdT*SPACEDIM],&connOfCurCellS[0],connOfCurCellS.size(),coordsS,cmTypeS,_precision)) - { - ConnType curNodeTInCmode=OTT::coo2C(startOfCellNodeConnT[nodeIdT]); - typename MyMatrix::value_type& resRow=res[curNodeTInCmode]; - typename MyMatrix::value_type::const_iterator iterRes=resRow.find(OTT::indFC(*iterCellS)); - if(iterRes==resRow.end()) - resRow.insert(std::make_pair(OTT::indFC(*iterCellS),1.)); - } - } - } - } -} - -#endif diff --git a/src/INTERP_KERNEL/PointLocator3DIntersectorP1P0.hxx b/src/INTERP_KERNEL/PointLocator3DIntersectorP1P0.hxx deleted file mode 100644 index e3da28795..000000000 --- a/src/INTERP_KERNEL/PointLocator3DIntersectorP1P0.hxx +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __POINTLOCATOR3DINTERSECTORP1P0_HXX__ -#define __POINTLOCATOR3DINTERSECTORP1P0_HXX__ - -#include "Intersector3DP1P0.hxx" -#include "NormalizedUnstructuredMesh.hxx" - -namespace INTERP_KERNEL -{ - template - class PointLocator3DIntersectorP1P0 : public Intersector3DP1P0 - { - public: - static const int SPACEDIM=MyMeshType::MY_SPACEDIM; - static const int MESHDIM=MyMeshType::MY_MESHDIM; - typedef typename MyMeshType::MyConnType ConnType; - static const NumberingPolicy numPol=MyMeshType::My_numPol; - public: - PointLocator3DIntersectorP1P0(const MyMeshType& targetMesh, const MyMeshType& srcMesh, double precision); - ~PointLocator3DIntersectorP1P0(); - void intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res); - protected: - double _precision; - }; -} - -#endif diff --git a/src/INTERP_KERNEL/PointLocator3DIntersectorP1P0.txx b/src/INTERP_KERNEL/PointLocator3DIntersectorP1P0.txx deleted file mode 100644 index f67c2597d..000000000 --- a/src/INTERP_KERNEL/PointLocator3DIntersectorP1P0.txx +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __POINTLOCATOR3DINTERSECTORP1P0_TXX__ -#define __POINTLOCATOR3DINTERSECTORP1P0_TXX__ - -#include "PointLocator3DIntersectorP1P0.hxx" -#include "Intersector3DP1P0.txx" -#include "MeshUtils.hxx" - -namespace INTERP_KERNEL -{ - /** - * @param targetMesh mesh containing the target elements - * @param srcMesh mesh containing the source elements - * @param policy splitting policy to be used - * - * WARNING : in _split attribute, sourceMesh and targetMesh are switched in order to fit intersectCells feature. - */ - template - PointLocator3DIntersectorP1P0::PointLocator3DIntersectorP1P0(const MyMeshType& targetMesh, const MyMeshType& srcMesh, double precision):Intersector3DP1P0(targetMesh,srcMesh),_precision(precision) - { - } - - template - PointLocator3DIntersectorP1P0::~PointLocator3DIntersectorP1P0() - { - } - - /** - * @param targetCell in C mode. - * @param srcCells in C mode. - * - * WARNING : for all methods on _split object source and target are switched ! - */ - template - void PointLocator3DIntersectorP1P0::intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res) - { - std::vector CoordsT; - typename MyMatrix::value_type& resRow=res[targetCell]; - const double *coordsS=Intersector3DP1P0::_src_mesh.getCoordinatesPtr(); - Intersector3DP1P0::getRealTargetCoordinates(OTT::indFC(targetCell),CoordsT); - double baryT[SPACEDIM]; - calculateBarycenterDyn2(&CoordsT[0],CoordsT.size()/SPACEDIM,baryT); - for(typename std::vector::const_iterator iterCellS=srcCells.begin();iterCellS!=srcCells.end();iterCellS++) - { - NormalizedCellType tS=Intersector3DP1P0::_src_mesh.getTypeOfElement(OTT::indFC(*iterCellS)); - if(tS!=NORM_TETRA4) - throw INTERP_KERNEL::Exception("Invalid source cell detected for meshdim==3. Only TETRA4 supported !"); - const CellModel& cmTypeS=CellModel::getCellModel(tS); - std::vector connOfCurCellS; - Intersector3DP1P0::getConnOfSourceCell(OTT::indFC(*iterCellS),connOfCurCellS); - if( PointLocatorAlgos::isElementContainsPointAlg3D(baryT,&connOfCurCellS[0],connOfCurCellS.size(),coordsS,cmTypeS,_precision) ) - { - double resLoc[4]; - std::vector srcCell; - Intersector3DP1P0::getRealSourceCoordinates(OTT::indFC(*iterCellS),srcCell); - std::vector eap(4); - eap[0]=&srcCell[0]; eap[1]=&srcCell[3]; eap[2]=&srcCell[6]; eap[3]=&srcCell[9]; - barycentric_coords(eap,baryT,resLoc); - const ConnType *startOfCellNodeConn=Intersector3DP1P0::getStartConnOfSourceCell(*iterCellS); - for(int nodeIdS=0;nodeIdS<4;nodeIdS++) - { - if(fabs(resLoc[nodeIdS])>_precision) - { - ConnType curNodeSInCmode=OTT::coo2C(startOfCellNodeConn[nodeIdS]); - typename MyMatrix::value_type::const_iterator iterRes=resRow.find(OTT::indFC(curNodeSInCmode)); - if(iterRes==resRow.end()) - resRow.insert(std::make_pair(OTT::indFC(curNodeSInCmode),resLoc[nodeIdS])); - else - { - double val=(*iterRes).second+resLoc[nodeIdS]; - resRow.erase(OTT::indFC(curNodeSInCmode)); - resRow.insert(std::make_pair(OTT::indFC(curNodeSInCmode),val)); - } - } - } - } - } - } -} - -#endif diff --git a/src/INTERP_KERNEL/PointLocator3DIntersectorP1P1.hxx b/src/INTERP_KERNEL/PointLocator3DIntersectorP1P1.hxx deleted file mode 100644 index 402124fa4..000000000 --- a/src/INTERP_KERNEL/PointLocator3DIntersectorP1P1.hxx +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __POINTLOCATOR3DINTERSECTORP1P1_HXX__ -#define __POINTLOCATOR3DINTERSECTORP1P1_HXX__ - -#include "Intersector3DP1P1.hxx" -#include "NormalizedUnstructuredMesh.hxx" - -namespace INTERP_KERNEL -{ - template - class PointLocator3DIntersectorP1P1 : public Intersector3DP1P1 - { - public: - static const int SPACEDIM=MyMeshType::MY_SPACEDIM; - static const int MESHDIM=MyMeshType::MY_MESHDIM; - typedef typename MyMeshType::MyConnType ConnType; - static const NumberingPolicy numPol=MyMeshType::My_numPol; - public: - PointLocator3DIntersectorP1P1(const MyMeshType& targetMesh, const MyMeshType& srcMesh, double precision); - ~PointLocator3DIntersectorP1P1(); - void intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res); - protected: - double _precision; - }; -} - -#endif diff --git a/src/INTERP_KERNEL/PointLocator3DIntersectorP1P1.txx b/src/INTERP_KERNEL/PointLocator3DIntersectorP1P1.txx deleted file mode 100644 index 78bbb7655..000000000 --- a/src/INTERP_KERNEL/PointLocator3DIntersectorP1P1.txx +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __POINTLOCATOR3DINTERSECTORP1P1_TXX__ -#define __POINTLOCATOR3DINTERSECTORP1P1_TXX__ - -#include "PointLocator3DIntersectorP1P1.hxx" -#include "Intersector3DP1P1.txx" -#include "MeshUtils.hxx" - -namespace INTERP_KERNEL -{ - - /** - * Constructor creating object from target cell global number - * - * @param targetMesh mesh containing the target elements - * @param srcMesh mesh containing the source elements - * @param policy splitting policy to be used - */ - template - PointLocator3DIntersectorP1P1::PointLocator3DIntersectorP1P1(const MyMeshType& targetMesh, const MyMeshType& srcMesh, double precision): - Intersector3DP1P1(targetMesh,srcMesh),_precision(precision) - { - } - - template - PointLocator3DIntersectorP1P1::~PointLocator3DIntersectorP1P1() - { - } - - /** - * @param targetCell in C mode. - * @param srcCells in C mode. - */ - template - void PointLocator3DIntersectorP1P1::intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res) - { - std::vector CoordsT; - Intersector3DP1P1::getRealTargetCoordinates(OTT::indFC(targetCell),CoordsT); - int nbOfNodesT=CoordsT.size()/SPACEDIM; - const double *coordsS=Intersector3DP1P1::_src_mesh.getCoordinatesPtr(); - for(typename std::vector::const_iterator iterCellS=srcCells.begin();iterCellS!=srcCells.end();iterCellS++) - { - NormalizedCellType tS=Intersector3DP1P1::_src_mesh.getTypeOfElement(OTT::indFC(*iterCellS)); - if(tS!=NORM_TETRA4) - throw INTERP_KERNEL::Exception("Invalid source cell detected for meshdim==3. Only TETRA4 supported !"); - const CellModel& cmTypeS=CellModel::getCellModel(tS); - const ConnType *startOfCellNodeConnT=Intersector3DP1P1::getStartConnOfTargetCell(targetCell); - for(int nodeIdT=0;nodeIdT::ind2C(startOfCellNodeConnT[nodeIdT])]; - std::vector connOfCurCellS; - Intersector3DP1P1::getConnOfSourceCell(OTT::indFC(*iterCellS),connOfCurCellS); - if( PointLocatorAlgos::isElementContainsPointAlg3D(&CoordsT[nodeIdT*SPACEDIM],&connOfCurCellS[0],connOfCurCellS.size(),coordsS,cmTypeS,_precision) ) - { - double resLoc[4]; - std::vector localCoordsS; - Intersector3DP1P1::getRealSourceCoordinates(OTT::indFC(*iterCellS),localCoordsS); - std::vector eap(4); - eap[0]=&localCoordsS[0]; eap[1]=&localCoordsS[3]; eap[2]=&localCoordsS[6]; eap[3]=&localCoordsS[9]; - barycentric_coords(eap,&CoordsT[nodeIdT*SPACEDIM],resLoc); - const ConnType *startOfCellNodeConnS=Intersector3DP1P1::getStartConnOfSourceCell(*iterCellS); - for(int nodeIdS=0;nodeIdS<4;nodeIdS++) - { - if(fabs(resLoc[nodeIdS])>_precision) - { - ConnType curNodeSInCmode=OTT::coo2C(startOfCellNodeConnS[nodeIdS]); - typename MyMatrix::value_type::const_iterator iterRes=resRow.find(OTT::indFC(curNodeSInCmode)); - if(iterRes==resRow.end()) - resRow.insert(std::make_pair(OTT::indFC(curNodeSInCmode),resLoc[nodeIdS])); - else - { - double val=(*iterRes).second+resLoc[nodeIdS]; - resRow.erase(OTT::indFC(curNodeSInCmode)); - resRow.insert(std::make_pair(OTT::indFC(curNodeSInCmode),val)); - } - } - } - } - } - } - } -} - -#endif diff --git a/src/INTERP_KERNEL/PointLocatorAlgos.txx b/src/INTERP_KERNEL/PointLocatorAlgos.txx deleted file mode 100644 index d7dd7432e..000000000 --- a/src/INTERP_KERNEL/PointLocatorAlgos.txx +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __POINTLOCATORALGOS_TXX__ -#define __POINTLOCATORALGOS_TXX__ - -#include "InterpolationUtils.hxx" -#include "CellModel.hxx" -#include "BBTree.txx" - -#include -#include - -namespace INTERP_KERNEL -{ - class GenericPointLocatorAlgos - { - public: - virtual ~GenericPointLocatorAlgos() { } - virtual std::list locates(const double* x, double eps) = 0; - }; - - template - class PointLocatorAlgos: public GenericPointLocatorAlgos - { - private : - double* _bb; - BBTree* _tree; - const MyMeshType& _mesh; - public: - PointLocatorAlgos(const MyMeshType& mesh):_mesh(mesh) - { - typedef typename MyMeshType::MyConnType ConnType; - const int SPACEDIM=MyMeshType::MY_SPACEDIM; - const NumberingPolicy numPol=MyMeshType::My_numPol; - int nelem = _mesh.getNumberOfElements(); - _bb = new double[SPACEDIM*2*nelem]; - const ConnType* conn = _mesh.getConnectivityPtr(); - const ConnType* conn_index = _mesh.getConnectivityIndexPtr(); - const double* coords=_mesh.getCoordinatesPtr(); - for (int i=0; i::max(); - _bb[2*(i*SPACEDIM+idim)+1]=-std::numeric_limits::max(); - } - for (int index= conn_index[i]; index < conn_index[i+1];index++) - { - //coordelem points to the coordinates of the current node of the i-th element - const double* coordelem = coords+OTT::ind2C(conn[OTT::ind2C(index)])*SPACEDIM; - - //the bounding box is updated by checking wheher the node is at the min/max in exach dimension - for (int idim=0; idim_bb[2*(i*SPACEDIM+idim)+1])?coordelem[idim]:_bb[2*(i*SPACEDIM+idim)+1]; - } - } - } - _tree=new BBTree(_bb,0,0,nelem); - } - - ~PointLocatorAlgos() - { - delete[] _bb; - delete _tree; - } - - //returns the list of elements that contains - //the point pointed to by x - std::list locates(const double* x, double eps) - { - typedef typename MyMeshType::MyConnType ConnType; - const NumberingPolicy numPol=MyMeshType::My_numPol; - std::vector candidates; - _tree->getElementsAroundPoint(x,candidates); - std::list retlist; - for(unsigned int i=0; i< candidates.size(); i++) - { - int ielem=candidates[i]; - if (elementContainsPoint(ielem,x,eps)) - retlist.push_back(OTT::indFC(ielem)); - } - return retlist; - } - - static bool isElementContainsPointAlg2D(const double *ptToTest, const double *cellPts, int nbEdges, double eps) - { - /* with dimension 2, it suffices to check all the edges - and see if the sign of double products from the point - is always the same. - C - / \ - / \ - Xo / \ - A-------B - - here XA^XC and XC^XB have different signs*/ - const int SPACEDIM=MyMeshType::MY_SPACEDIM; - int* sign = new int[nbEdges]; - for (int iedge=0; iedgeeps) - sign[iedge]=1; - else - sign[iedge]=0; - } - bool ret=decideFromSign(sign, nbEdges); - delete [] sign; - return ret; - } - - static bool isElementContainsPointAlg3D(const double *ptToTest, const typename MyMeshType::MyConnType *conn_elem, int conn_elem_sz, const double *coords, const CellModel& cmType, double eps) - { - const int SPACEDIM=MyMeshType::MY_SPACEDIM; - typedef typename MyMeshType::MyConnType ConnType; - const NumberingPolicy numPol=MyMeshType::My_numPol; - - int nbfaces = cmType.getNumberOfSons2(conn_elem,conn_elem_sz); - int *sign = new int[nbfaces]; - int *connOfSon = new int[conn_elem_sz]; - for (int iface=0; iface::coo2C(connOfSon[0])); - const double* BB=coords+SPACEDIM*(OTT::coo2C(connOfSon[1])); - const double* CC=coords+SPACEDIM*(OTT::coo2C(connOfSon[2])); - double Vol=triple_product(AA,BB,CC,ptToTest); - if (Vol<-eps) - sign[iface]=-1; - else if (Vol>eps) - sign[iface]=1; - else - sign[iface]=0; - } - bool ret=decideFromSign(sign, nbfaces); - delete [] sign; - delete [] connOfSon; - return ret; - } - - static bool isElementContainsPoint(const double *ptToTest, NormalizedCellType type, const double *coords, const typename MyMeshType::MyConnType *conn_elem, int conn_elem_sz, double eps) - { - const int SPACEDIM=MyMeshType::MY_SPACEDIM; - typedef typename MyMeshType::MyConnType ConnType; - const NumberingPolicy numPol=MyMeshType::My_numPol; - - const CellModel& cmType=CellModel::getCellModel(type); - // - if (SPACEDIM==2) - { - int nbEdges=cmType.getNumberOfSons(); - double *pts = new double[nbEdges*SPACEDIM]; - for (int iedge=0; iedge::ind2C(conn_elem[iedge])); - std::copy(a,a+SPACEDIM,pts+iedge*SPACEDIM); - } - bool ret=isElementContainsPointAlg2D(ptToTest,pts,nbEdges,eps); - delete [] pts; - return ret; - } - - if (SPACEDIM==3) - { - return isElementContainsPointAlg3D(ptToTest,conn_elem,conn_elem_sz,coords,cmType,eps); - } - } - - bool elementContainsPoint(typename MyMeshType::MyConnType i, const double* x, double eps) - { - //as i is extracted from the BBTRee, it is already in C numbering - //it is not necessary to convert it from F to C - typedef typename MyMeshType::MyConnType ConnType; - const NumberingPolicy numPol=MyMeshType::My_numPol; - - const double* coords= _mesh.getCoordinatesPtr(); - const ConnType* conn=_mesh.getConnectivityPtr(); - const ConnType* conn_index= _mesh.getConnectivityIndexPtr(); - const ConnType* conn_elem=conn+OTT::ind2C(conn_index[i]); - int conn_elem_sz=conn_index[i+1]-conn_index[i]; - NormalizedCellType type=_mesh.getTypeOfElement(OTT::indFC(i)); - return isElementContainsPoint(x,type,coords,conn_elem,conn_elem_sz,eps); - } - - static bool decideFromSign(const int* sign, int nbelem) - { - int min_sign = 1; - int max_sign = -1; - for (int i=0; imax_sign)?sign[i]:max_sign; - } - return (min_sign!=-1 || max_sign!=1); - } - }; -} - -#endif diff --git a/src/INTERP_KERNEL/PolyhedronIntersectorP0P0.hxx b/src/INTERP_KERNEL/PolyhedronIntersector.hxx similarity index 82% rename from src/INTERP_KERNEL/PolyhedronIntersectorP0P0.hxx rename to src/INTERP_KERNEL/PolyhedronIntersector.hxx index 30d3b2af7..4cf4fb4ee 100644 --- a/src/INTERP_KERNEL/PolyhedronIntersectorP0P0.hxx +++ b/src/INTERP_KERNEL/PolyhedronIntersector.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,9 +16,8 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef __POLYHEDRONINTERSECTORP0P0_HXX__ -#define __POLYHEDRONINTERSECTORP0P0_HXX__ +#ifndef __POLYHEDRONINTERSECTOR_HXX__ +#define __POLYHEDRONINTERSECTOR_HXX__ #include "Intersector3DP0P0.hxx" #include "SplitterTetra.hxx" @@ -34,7 +33,7 @@ namespace INTERP_KERNEL * */ template - class PolyhedronIntersectorP0P0 : public Intersector3DP0P0 + class PolyhedronIntersector : public Intersector3DP0P0 { public: static const int SPACEDIM=MyMeshType::MY_SPACEDIM; @@ -43,9 +42,9 @@ namespace INTERP_KERNEL static const NumberingPolicy numPol=MyMeshType::My_numPol; public: - PolyhedronIntersectorP0P0(const MyMeshType& targetMesh, const MyMeshType& srcMesh, SplittingPolicy policy = GENERAL_24); + PolyhedronIntersector(const MyMeshType& targetMesh, const MyMeshType& srcMesh, SplittingPolicy policy = GENERAL_24); - ~PolyhedronIntersectorP0P0(); + ~PolyhedronIntersector(); void intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res); diff --git a/src/INTERP_KERNEL/PolyhedronIntersectorP0P0.txx b/src/INTERP_KERNEL/PolyhedronIntersector.txx similarity index 80% rename from src/INTERP_KERNEL/PolyhedronIntersectorP0P0.txx rename to src/INTERP_KERNEL/PolyhedronIntersector.txx index 1fde5d1ae..1d58f7a58 100644 --- a/src/INTERP_KERNEL/PolyhedronIntersectorP0P0.txx +++ b/src/INTERP_KERNEL/PolyhedronIntersector.txx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,10 +16,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef __POLYHEDRONINTERSECTORP0P0_TXX__ -#define __POLYHEDRONINTERSECTORP0P0_TXX__ +#ifndef __POLYHEDRONINTERSECTOR_TXX__ +#define __POLYHEDRONINTERSECTOR_TXX__ -#include "PolyhedronIntersectorP0P0.hxx" +#include "PolyhedronIntersector.hxx" #include "Intersector3DP0P0.txx" #include "MeshUtils.hxx" @@ -39,7 +39,7 @@ namespace INTERP_KERNEL * @param policy splitting policy to be used */ template - PolyhedronIntersectorP0P0::PolyhedronIntersectorP0P0(const MyMeshType& targetMesh, const MyMeshType& srcMesh, SplittingPolicy policy):Intersector3DP0P0(targetMesh,srcMesh),_split(targetMesh,srcMesh,policy) + PolyhedronIntersector::PolyhedronIntersector(const MyMeshType& targetMesh, const MyMeshType& srcMesh, SplittingPolicy policy):Intersector3DP0P0(targetMesh,srcMesh),_split(targetMesh,srcMesh,policy) { } @@ -49,13 +49,13 @@ namespace INTERP_KERNEL * */ template - PolyhedronIntersectorP0P0::~PolyhedronIntersectorP0P0() + PolyhedronIntersector::~PolyhedronIntersector() { releaseArrays(); } template - void PolyhedronIntersectorP0P0::releaseArrays() + void PolyhedronIntersector::releaseArrays() { for(typename std::vector< SplitterTetra* >::iterator iter = _tetra.begin(); iter != _tetra.end(); ++iter) delete *iter; @@ -74,7 +74,7 @@ namespace INTERP_KERNEL * */ template - void PolyhedronIntersectorP0P0::intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res) + void PolyhedronIntersector::intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res) { int nbOfNodesT=Intersector3D::_target_mesh.getNumberOfNodesOfElement(OTT::indFC(targetCell)); releaseArrays(); diff --git a/src/INTERP_KERNEL/PolyhedronIntersectorP1P0Bary.hxx b/src/INTERP_KERNEL/PolyhedronIntersectorP1P0Bary.hxx deleted file mode 100644 index 899adc731..000000000 --- a/src/INTERP_KERNEL/PolyhedronIntersectorP1P0Bary.hxx +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __PolyhedronIntersectorP1P0Bary_HXX__ -#define __PolyhedronIntersectorP1P0Bary_HXX__ - -#include "Intersector3DP1P0Bary.hxx" -#include "SplitterTetra.hxx" -#include "NormalizedUnstructuredMesh.hxx" - -namespace INTERP_KERNEL -{ - - - /** - * \brief Class responsible for calculating intersection between a hexahedron target element and - * the source elements. - * - */ - template - class PolyhedronIntersectorP1P0Bary : public Intersector3DP1P0Bary - { - public: - static const int SPACEDIM=MyMeshType::MY_SPACEDIM; - static const int MESHDIM=MyMeshType::MY_MESHDIM; - typedef typename MyMeshType::MyConnType ConnType; - static const NumberingPolicy numPol=MyMeshType::My_numPol; - public: - - PolyhedronIntersectorP1P0Bary(const MyMeshType& targetMesh, const MyMeshType& srcMesh, SplittingPolicy policy = GENERAL_24); - - ~PolyhedronIntersectorP1P0Bary(); - - void intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res); - - private: - void releaseArrays(); - private: - /// pointers to the SplitterTetra objects representing the tetrahedra - /// that result from the splitting of the hexahedron target cell - std::vector< SplitterTetra* > _tetra; - - SplitterTetra2 _split; - - }; -} - -#endif diff --git a/src/INTERP_KERNEL/PolyhedronIntersectorP1P0Bary.txx b/src/INTERP_KERNEL/PolyhedronIntersectorP1P0Bary.txx deleted file mode 100644 index c38e16d50..000000000 --- a/src/INTERP_KERNEL/PolyhedronIntersectorP1P0Bary.txx +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __PolyhedronIntersectorP1P0Bary_TXX__ -#define __PolyhedronIntersectorP1P0Bary_TXX__ - -#include "PolyhedronIntersectorP1P0Bary.hxx" -#include "Intersector3DP1P0Bary.txx" -#include "MeshUtils.hxx" - -#include "SplitterTetra.txx" - -namespace INTERP_KERNEL -{ - - /** - * Constructor creating object from target cell global number - * The constructor first calculates the necessary nodes, - * (depending on the splitting policy) and then splits the hexahedron into - * tetrahedra, placing these in the internal vector _tetra. - * - * @param targetMesh mesh containing the target elements - * @param srcMesh mesh containing the source elements - * @param policy splitting policy to be used - * - * WARNING : in _split attribute, sourceMesh and targetMesh are switched in order to fit intersectCells feature. - */ - template - PolyhedronIntersectorP1P0Bary::PolyhedronIntersectorP1P0Bary(const MyMeshType& targetMesh, - const MyMeshType& srcMesh, - SplittingPolicy policy) - :Intersector3DP1P0Bary(targetMesh,srcMesh),_split(targetMesh,srcMesh,policy) - { - // SPEC: - // "Limitation. For the P1P0 barycentric improvement only triangle source cells in 2D and - // tetrahedrons in 3D will be supported by interpolators. If a non - // triangle/tetrahedron source cell is detected an INTERP_KERNEL::Exception should be thrown." - - // Check types of source elements here rather than in intersectCells() since a wrong type can be - // found late after a long time of calculation. - - const unsigned long numSrcElems = srcMesh.getNumberOfElements(); - for(unsigned long i = 0 ; i < numSrcElems ; ++i) - if ( srcMesh.getTypeOfElement( OTT::indFC(i) ) != NORM_TETRA4 ) - throw INTERP_KERNEL::Exception("P1P0 barycentric algorithm works only with tetrahedral source meshes"); - } - - /** - * Destructor. - * Liberates the SplitterTetra objects and potential sub-node points that have been allocated. - * - */ - template - PolyhedronIntersectorP1P0Bary::~PolyhedronIntersectorP1P0Bary() - { - releaseArrays(); - } - - template - void PolyhedronIntersectorP1P0Bary::releaseArrays() - { - for(typename std::vector< SplitterTetra* >::iterator iter = _tetra.begin(); iter != _tetra.end(); ++iter) - delete *iter; - _split.releaseArrays(); - _tetra.clear(); - } - - //================================================================================ - /*! - * \brief This method computes a value per each node of source cell for each target cell. - * \param srcCell - a source tetrahedron - * \param tgtCells - target elements - * \param res - matrix to fill in - */ - //================================================================================ - - template - void PolyhedronIntersectorP1P0Bary::intersectCells(ConnType tgtCell, - const std::vector& srcCells, - MyMatrix& res) - { - typename MyMatrix::value_type& resRow=res[tgtCell]; - - int nbOfNodesT=Intersector3D::_target_mesh.getNumberOfNodesOfElement(OTT::indFC(tgtCell)); - releaseArrays(); - _split.splitTargetCell(tgtCell,nbOfNodesT,_tetra); - - for(typename std::vector::const_iterator iterCellS=srcCells.begin();iterCellS!=srcCells.end();iterCellS++) - { - // intersect a source tetrahedron with each target tetrahedron: get intersection volume and barycenter - double baryCentre[SPACEDIM], total_baryCentre[3] = { 0., 0., 0.}; - double interVolume = 0; - for(typename std::vector*>::iterator iterTetraT = _tetra.begin(); iterTetraT != _tetra.end(); ++iterTetraT) - { - SplitterTetra *tmp=*iterTetraT; - tmp->clearVolumesCache(); - double volume = tmp->intersectSourceCell(*iterCellS, baryCentre); - if ( volume > 0 ) - { - interVolume += volume; - for ( int i = 0; i < SPACEDIM; ++i ) - total_baryCentre[i] += baryCentre[i]*volume; - } - } - if(interVolume!=0) - { - for ( int i = 0; i < SPACEDIM; ++i ) - total_baryCentre[i] /= interVolume; - - // coordinates of the source tetrahedron - std::vector srcCellCoords(4); - for ( int n = 0; n < 4; ++n ) - srcCellCoords[ n ] = getCoordsOfNode( n, *iterCellS, Intersector3D::_src_mesh ); - - // compute barycentric coordinates - double baryCoords[4]; - barycentric_coords( srcCellCoords, total_baryCentre, baryCoords); - - // store coeffs of each node of the source tetrahedron - const ConnType *srcCellNodes=Intersector3D::_src_mesh.getConnectivityPtr()+OTT::conn2C(Intersector3D::_src_mesh.getConnectivityIndexPtr()[*iterCellS]); - for ( int n = 0; n < 4; ++n ) - { - double val = baryCoords[n] * interVolume; - ConnType curNodeS = srcCellNodes[n]; - typename MyMatrix::value_type::const_iterator iterRes=resRow.find(curNodeS); - if(iterRes!=resRow.end()) - { - val += iterRes->second; - resRow.erase( curNodeS ); - } - resRow.insert(std::make_pair(curNodeS,val)); - } - } - } - } -} - -#endif diff --git a/src/INTERP_KERNEL/PolyhedronIntersectorP1P1.hxx b/src/INTERP_KERNEL/PolyhedronIntersectorP1P1.hxx deleted file mode 100644 index 736188661..000000000 --- a/src/INTERP_KERNEL/PolyhedronIntersectorP1P1.hxx +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __PolyhedronIntersectorP1P1_HXX__ -#define __PolyhedronIntersectorP1P1_HXX__ - -#include "Intersector3DP1P1.hxx" -#include "SplitterTetra.hxx" -#include "NormalizedUnstructuredMesh.hxx" - -namespace INTERP_KERNEL -{ - - - /** - * \brief Class responsible for calculating intersection between a hexahedron target element and - * the source elements. - * - */ - template - class PolyhedronIntersectorP1P1 : public Intersector3DP1P1 - { - public: - static const int SPACEDIM=MyMeshType::MY_SPACEDIM; - static const int MESHDIM=MyMeshType::MY_MESHDIM; - typedef typename MyMeshType::MyConnType ConnType; - static const NumberingPolicy numPol=MyMeshType::My_numPol; - public: - - PolyhedronIntersectorP1P1(const MyMeshType& targetMesh, const MyMeshType& srcMesh, SplittingPolicy policy = GENERAL_24); - - ~PolyhedronIntersectorP1P1(); - - void intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res); - - }; -} - -#endif diff --git a/src/INTERP_KERNEL/PolyhedronIntersectorP1P1.txx b/src/INTERP_KERNEL/PolyhedronIntersectorP1P1.txx deleted file mode 100644 index f80348924..000000000 --- a/src/INTERP_KERNEL/PolyhedronIntersectorP1P1.txx +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __PolyhedronIntersectorP1P1_TXX__ -#define __PolyhedronIntersectorP1P1_TXX__ - -#include "PolyhedronIntersectorP1P1.hxx" -#include "Intersector3DP1P1.txx" -#include "MeshUtils.hxx" - -#include "SplitterTetra.txx" - -namespace INTERP_KERNEL -{ - - /** - * Constructor creating object from target cell global number - * - * @param targetMesh mesh containing the target elements - * @param srcMesh mesh containing the source elements - * @param policy splitting policy to be used - */ - template - PolyhedronIntersectorP1P1::PolyhedronIntersectorP1P1(const MyMeshType& targetMesh, const MyMeshType& srcMesh, SplittingPolicy policy):Intersector3DP1P1(targetMesh,srcMesh) - { - // SPEC: - // "Limitation. Concerning P1P1 3D improvement only tetrahedron will be supported. - // If another type than tetrahedron is detected an INTERP_KERNEL::Exception should be thrown" - - // Check types of elements here rather than in intersectCells() since a wrong type can be - // found late after a long time of calculation. - - const unsigned long numSrcElems = srcMesh.getNumberOfElements(); - for(unsigned long i = 0 ; i < numSrcElems ; ++i) - if ( srcMesh.getTypeOfElement( OTT::indFC( i )) != NORM_TETRA4 ) - throw INTERP_KERNEL::Exception("P1P1 3D algorithm works only with tetrahedral meshes"); - - const unsigned long numTgtElems = targetMesh.getNumberOfElements(); - for(unsigned long i = 0 ; i < numTgtElems ; ++i) - if ( targetMesh.getTypeOfElement( OTT::indFC( i )) != NORM_TETRA4 ) - throw INTERP_KERNEL::Exception("P1P1 3D algorithm works only with tetrahedral meshes"); - } - - /** - * Destructor. - */ - template - PolyhedronIntersectorP1P1::~PolyhedronIntersectorP1P1() - { - } - - /** - * Calculates the volume of intersection of an element in the source mesh and the target element - * represented by the object. - * - * @param targetCell in C mode. - * @param srcCells in C mode. - */ - template - void PolyhedronIntersectorP1P1::intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res) - { -#ifdef _DEBUG_ - UnitTetraIntersectionBary b; b.init(); -#endif - // split the targetCell into dual cells - std::pair< int, std::vector > subTetraNodes[24]; // a node of sub tetra and its coordinates - const double* nodes[4]; int conn[4]; - for(int node = 0; node < 4 ; ++node) - nodes[node]=getCoordsOfNode2(node, OTT::indFC(targetCell), - Intersector3D::_target_mesh,conn[node]); - SplitterTetra tgtTetra(Intersector3D::_src_mesh, nodes, conn); - for (int i=0; i<24; i++) - { - subTetraNodes[i].second.resize(12); - tgtTetra.splitMySelfForDual(&subTetraNodes[i].second[0],i,subTetraNodes[i].first); - } - // intersect each source tetrahedron with each of target dual cells - SplitterTetra* subTetrasS[24]; - for(typename std::vector::const_iterator iterCellS=srcCells.begin();iterCellS!=srcCells.end();iterCellS++) - { - // split a source cell into dual cells - for(int node = 0; node < 4 ; ++node) - nodes[node]=getCoordsOfNode2(node, OTT::indFC(*iterCellS), - Intersector3D::_src_mesh,conn[node]); - - SplitterTetra srcTetra(Intersector3D::_target_mesh, nodes, conn); - srcTetra.splitIntoDualCells(subTetrasS); - - // intersect each target subTetra with each source one - for(int i=0;i<24;i++) - { - SplitterTetra *tmp=subTetrasS[i]; - ConnType sourceNode=OTT::indFC(tmp->getId(0)); - for(int j=0;j<24;j++) - { - const double* tetraNodes12 = &subTetraNodes[j].second[0]; - const double* tetraNodesT[4]={ tetraNodes12, tetraNodes12+3, tetraNodes12+6, tetraNodes12+9 }; - double volume = tmp->intersectTetra( tetraNodesT ); - if(volume!=0.) - { - ConnType tgtNode=subTetraNodes[j].first; - typename MyMatrix::value_type& resRow = res[tgtNode]; - typename MyMatrix::value_type::const_iterator iterRes=resRow.find( sourceNode ); - if(iterRes!=resRow.end()) - { - volume += (*iterRes).second; - resRow.erase(sourceNode); - } - resRow.insert(std::make_pair(sourceNode,volume)); - } - } - delete tmp; - } - } - } -} - -#endif diff --git a/src/INTERP_KERNEL/VolSurfUser.hxx b/src/INTERP_KERNEL/VolSurfUser.hxx deleted file mode 100644 index a0eafd221..000000000 --- a/src/INTERP_KERNEL/VolSurfUser.hxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __VOLSURFUSER_HXX__ -#define __VOLSURFUSER_HXX__ - -#include "NormalizedUnstructuredMesh.hxx" - -namespace INTERP_KERNEL -{ - template - double computeVolSurfOfCell(NormalizedCellType type, const ConnType *connec, int lgth, const double *coords); - - template - double computeVolSurfOfCell2(NormalizedCellType type, const ConnType *connec, int lgth, const double *coords, int spaceDim); -} - -#endif diff --git a/src/INTERP_KERNEL/VolSurfUser.txx b/src/INTERP_KERNEL/VolSurfUser.txx deleted file mode 100644 index d6fcd11bf..000000000 --- a/src/INTERP_KERNEL/VolSurfUser.txx +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __VOLSURFUSER_TXX__ -#define __VOLSURFUSER_TXX__ - -#include "VolSurfUser.hxx" -#include "VolSurfFormulae.hxx" -#include "InterpolationUtils.hxx" - -namespace INTERP_KERNEL -{ - template - double computeVolSurfOfCell(NormalizedCellType type, const ConnType *connec, int lgth, const double *coords) - { - switch(type) - { - case INTERP_KERNEL::NORM_TRI3 : - case INTERP_KERNEL::NORM_TRI6 : - { - int N1 = OTT::coo2C(connec[0]); - int N2 = OTT::coo2C(connec[1]); - int N3 = OTT::coo2C(connec[2]); - - return INTERP_KERNEL::calculateAreaForTria(coords+(SPACEDIM*N1), - coords+(SPACEDIM*N2), - coords+(SPACEDIM*N3), - SPACEDIM); - } - break; - - case INTERP_KERNEL::NORM_QUAD4 : - case INTERP_KERNEL::NORM_QUAD8 : - { - int N1 = OTT::coo2C(connec[0]); - int N2 = OTT::coo2C(connec[1]); - int N3 = OTT::coo2C(connec[2]); - int N4 = OTT::coo2C(connec[3]); - - return INTERP_KERNEL::calculateAreaForQuad(coords+SPACEDIM*N1, - coords+SPACEDIM*N2, - coords+SPACEDIM*N3, - coords+SPACEDIM*N4, - SPACEDIM); - } - break; - - case INTERP_KERNEL::NORM_POLYGON : - { - const double **pts=new const double *[lgth]; - for(int inod=0;inod::coo2C(connec[inod]); - double val=INTERP_KERNEL::calculateAreaForPolyg(pts,lgth,SPACEDIM); - delete [] pts; - return val; - } - break; - case INTERP_KERNEL::NORM_TETRA4 : - case INTERP_KERNEL::NORM_TETRA10 : - { - int N1 = OTT::coo2C(connec[0]); - int N2 = OTT::coo2C(connec[1]); - int N3 = OTT::coo2C(connec[2]); - int N4 = OTT::coo2C(connec[3]); - - return INTERP_KERNEL::calculateVolumeForTetra(coords+SPACEDIM*N1, - coords+SPACEDIM*N2, - coords+SPACEDIM*N3, - coords+SPACEDIM*N4); - } - break; - - case INTERP_KERNEL::NORM_PYRA5 : - case INTERP_KERNEL::NORM_PYRA13 : - { - int N1 = OTT::coo2C(connec[0]); - int N2 = OTT::coo2C(connec[1]); - int N3 = OTT::coo2C(connec[2]); - int N4 = OTT::coo2C(connec[3]); - int N5 = OTT::coo2C(connec[4]); - - return INTERP_KERNEL::calculateVolumeForPyra(coords+SPACEDIM*N1, - coords+SPACEDIM*N2, - coords+SPACEDIM*N3, - coords+SPACEDIM*N4, - coords+SPACEDIM*N5); - } - break; - - case INTERP_KERNEL::NORM_PENTA6 : - case INTERP_KERNEL::NORM_PENTA15 : - { - int N1 = OTT::coo2C(connec[0]); - int N2 = OTT::coo2C(connec[1]); - int N3 = OTT::coo2C(connec[2]); - int N4 = OTT::coo2C(connec[3]); - int N5 = OTT::coo2C(connec[4]); - int N6 = OTT::coo2C(connec[5]); - - return INTERP_KERNEL::calculateVolumeForPenta(coords+SPACEDIM*N1, - coords+SPACEDIM*N2, - coords+SPACEDIM*N3, - coords+SPACEDIM*N4, - coords+SPACEDIM*N5, - coords+SPACEDIM*N6); - } - break; - - case INTERP_KERNEL::NORM_HEXA8 : - case INTERP_KERNEL::NORM_HEXA20 : - { - int N1 = OTT::coo2C(connec[0]); - int N2 = OTT::coo2C(connec[1]); - int N3 = OTT::coo2C(connec[2]); - int N4 = OTT::coo2C(connec[3]); - int N5 = OTT::coo2C(connec[4]); - int N6 = OTT::coo2C(connec[5]); - int N7 = OTT::coo2C(connec[6]); - int N8 = OTT::coo2C(connec[7]); - - return INTERP_KERNEL::calculateVolumeForHexa(coords+SPACEDIM*N1, - coords+SPACEDIM*N2, - coords+SPACEDIM*N3, - coords+SPACEDIM*N4, - coords+SPACEDIM*N5, - coords+SPACEDIM*N6, - coords+SPACEDIM*N7, - coords+SPACEDIM*N8); - } - break; - - case INTERP_KERNEL::NORM_POLYHED : - { - throw INTERP_KERNEL::Exception("Polyedra Not yet implemented !"); - } - break; - default: - throw INTERP_KERNEL::Exception("Not recognized cell type to get Area/Volume on it !"); - } - } - - template - double computeVolSurfOfCell2(NormalizedCellType type, const ConnType *connec, int lgth, const double *coords, int spaceDim) - { - if(spaceDim==3) - return computeVolSurfOfCell(type,connec,lgth,coords); - if(spaceDim==2) - return computeVolSurfOfCell(type,connec,lgth,coords); - throw INTERP_KERNEL::Exception("Invalid spaceDim specified : must be 2 or 3"); - } -} - -#endif diff --git a/src/INTERP_KERNELTest/ExprEvalInterpTest.cxx b/src/INTERP_KERNELTest/ExprEvalInterpTest.cxx deleted file mode 100644 index 947f8fa5c..000000000 --- a/src/INTERP_KERNELTest/ExprEvalInterpTest.cxx +++ /dev/null @@ -1,380 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "ExprEvalInterpTest.hxx" -#include "InterpKernelExprParser.hxx" - -using namespace INTERP_TEST; - -void ExprEvalInterpTest::testBuildStringFromFortran() -{ - char toto1[]="123456 "; - char result[]="123456"; - std::string titi; - titi=INTERP_KERNEL::ExprParser::buildStringFromFortran(toto1,8); - CPPUNIT_ASSERT_EQUAL(6,(int)titi.length()); - CPPUNIT_ASSERT(titi==result); - // - char toto2[]=" 23456 "; - char result2[]=" 23456"; - titi=INTERP_KERNEL::ExprParser::buildStringFromFortran(toto2,8); - CPPUNIT_ASSERT(titi==result2); - CPPUNIT_ASSERT_EQUAL(6,(int)titi.length()); - // - char toto3[]=" 3456 "; - char result3[]=" 3456"; - titi=INTERP_KERNEL::ExprParser::buildStringFromFortran(toto3,8); - CPPUNIT_ASSERT(titi==result3); - CPPUNIT_ASSERT_EQUAL(6,(int)titi.length()); - // - char toto4[]=" "; - titi=INTERP_KERNEL::ExprParser::buildStringFromFortran(toto4,8); - CPPUNIT_ASSERT_EQUAL(0,(int)titi.length()); - // - char toto5[]=" 345677"; - titi=INTERP_KERNEL::ExprParser::buildStringFromFortran(toto5,8); - CPPUNIT_ASSERT(titi==toto5); - CPPUNIT_ASSERT_EQUAL(8,(int)titi.length()); -} - -void ExprEvalInterpTest::testDeleteWhiteSpaces() -{ - char toto[]=" jkhjkh ooooppp l "; - char result[]="jkhjkhoooopppl"; - std::string totoS(toto); - std::string totoR=INTERP_KERNEL::ExprParser::deleteWhiteSpaces(totoS); - CPPUNIT_ASSERT(totoR==result); - CPPUNIT_ASSERT_EQUAL(14,(int)totoR.length()); - // - char toto2[]=" jkhjkh ooooppp l "; - totoS=toto2; - totoR=INTERP_KERNEL::ExprParser::deleteWhiteSpaces(totoS); - CPPUNIT_ASSERT(totoR==result); - CPPUNIT_ASSERT_EQUAL(14,(int)totoR.length()); - // - char toto3[]=" jkhjkh oooo pppl "; - totoS=toto3; - totoR=INTERP_KERNEL::ExprParser::deleteWhiteSpaces(totoS); - CPPUNIT_ASSERT(totoR==result); - CPPUNIT_ASSERT_EQUAL(14,(int)totoR.length()); - // - char toto4[]=" jkhjkh oooo pppl"; - totoS=toto4; - totoR=INTERP_KERNEL::ExprParser::deleteWhiteSpaces(totoS); - CPPUNIT_ASSERT(totoR==result); - CPPUNIT_ASSERT_EQUAL(14,(int)totoR.length()); - // - char toto5[]="jkhjkh oooo pppl"; - totoS=toto5; - totoR=INTERP_KERNEL::ExprParser::deleteWhiteSpaces(totoS); - CPPUNIT_ASSERT(totoR==result); - CPPUNIT_ASSERT_EQUAL(14,(int)totoR.length()); - // - totoS=result; - totoR=INTERP_KERNEL::ExprParser::deleteWhiteSpaces(totoS); - CPPUNIT_ASSERT(totoR==result); - CPPUNIT_ASSERT_EQUAL(14,(int)totoR.length()); - // - char toto6[]="j k h j k h o o o o p p p l"; - totoS=toto6; - totoR=INTERP_KERNEL::ExprParser::deleteWhiteSpaces(totoS); - CPPUNIT_ASSERT(totoR==result); - CPPUNIT_ASSERT_EQUAL(14,(int)totoR.length()); - // - char toto7[]="j k h j k h o o o o p pp l"; - totoS=toto7; - totoR=INTERP_KERNEL::ExprParser::deleteWhiteSpaces(totoS); - CPPUNIT_ASSERT(totoR==result); - CPPUNIT_ASSERT_EQUAL(14,(int)totoR.length()); - // - char toto8[]=" "; - totoS=toto8; - totoR=INTERP_KERNEL::ExprParser::deleteWhiteSpaces(totoS); - CPPUNIT_ASSERT(totoR.empty()); - // - char toto9[]=""; - totoS=toto9; - totoR=INTERP_KERNEL::ExprParser::deleteWhiteSpaces(totoS); - CPPUNIT_ASSERT(totoR.empty()); - // - char toto10[]="j\n k \nh\nj \n\n k\nh \n o \no\n o\n o \np\n\npp \n\n l"; - totoS=toto10; - totoR=INTERP_KERNEL::ExprParser::deleteWhiteSpaces(totoS); - CPPUNIT_ASSERT(totoR==result); - CPPUNIT_ASSERT_EQUAL(14,(int)totoR.length()); -} - -void ExprEvalInterpTest::testInterpreter0() -{ - INTERP_KERNEL::ExprParser expr1("3*-2"); - expr1.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(-6.,expr1.evaluate(),1e-15); - INTERP_KERNEL::ExprParser expr2("-2.3"); - expr2.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(-2.3,expr2.evaluate(),1e-15); - INTERP_KERNEL::ExprParser expr3("--2.3"); - expr3.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(2.3,expr3.evaluate(),1e-15); - INTERP_KERNEL::ExprParser expr4("-++2.3"); - expr4.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(-2.3,expr4.evaluate(),1e-15); - INTERP_KERNEL::ExprParser expr5("+2.3"); - expr5.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(2.3,expr5.evaluate(),1e-15); - INTERP_KERNEL::ExprParser expr6("3^-1"); - expr6.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.33333333333333333,expr6.evaluate(),1e-15); -} - -void ExprEvalInterpTest::testInterpreter1() -{ - INTERP_KERNEL::ExprParser expr1("3+2*5"); - expr1.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(13.,expr1.evaluate(),1e-14); - INTERP_KERNEL::ExprParser expr2("3+2^3*5"); - expr2.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(43.,expr2.evaluate(),1e-14); - INTERP_KERNEL::ExprParser expr3("3+2^(2*5)"); - expr3.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1027.,expr3.evaluate(),1e-14); - INTERP_KERNEL::ExprParser expr4("(3.2+4.3)*(1.3+2.3*7.8)"); - expr4.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(144.3,expr4.evaluate(),1e-10); - INTERP_KERNEL::ExprParser expr5("(3.2+4.3)*cos(1.3+2.3*7.8)"); - expr5.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(6.9355510138337619,expr5.evaluate(),1e-14); - INTERP_KERNEL::ExprParser expr6("3+2-4-7+4.3"); - expr6.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(-1.7,expr6.evaluate(),1e-14); - INTERP_KERNEL::ExprParser expr7("3.2*4.5/3.3/2.2"); - expr7.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.9834710743801653,expr7.evaluate(),1e-14); - INTERP_KERNEL::ExprParser expr8("3.2*4.5/3.3/2.2"); - expr8.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.9834710743801653,expr8.evaluate(),1e-14); - INTERP_KERNEL::ExprParser expr9("(((1.23456789)))"); - expr9.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.23456789,expr9.evaluate(),1e-14); - INTERP_KERNEL::ExprParser expr10("3.2*((2*5.2+6.)+(1.2*1.2+3.))"); - expr10.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(66.688,expr10.evaluate(),1e-13); - INTERP_KERNEL::ExprParser expr11("((3.2*(((2*5.2+6.)+(1.2*1.2+3.)))))"); - expr11.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(66.688,expr11.evaluate(),1e-13); - INTERP_KERNEL::ExprParser expr12("((3.2*(cos((2*5.2+6.)+(1.2*1.2+3.)))))"); - expr12.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(-1.3038041398761016,expr12.evaluate(),1e-14); - INTERP_KERNEL::ExprParser expr13("((3.2*(sin((2*5.2+6.)+(1.2*1.2+3.)))))"); - expr13.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(2.9223440531261784,expr13.evaluate(),1e-14); - INTERP_KERNEL::ExprParser expr14("((3.2*(tan((2*5.2+6.)+(1.2*1.2+3.)))))"); - expr14.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(-7.1724737512280257,expr14.evaluate(),1e-14); - INTERP_KERNEL::ExprParser expr15("((3.2*(sqrt((2*5.2+6.)+(1.2*1.2+3.)))))"); - expr15.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(14.608271629457059,expr15.evaluate(),1e-13); - INTERP_KERNEL::ExprParser expr16("-((3.2*(sqrt((2*5.2+6.)+(1.2*1.2+3.)))))"); - expr16.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(-14.608271629457059,expr16.evaluate(),1e-13); - INTERP_KERNEL::ExprParser expr17("(-(3.2*(sqrt((2*5.2+6.)+(1.2*1.2+3.)))))"); - expr17.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(-14.608271629457059,expr17.evaluate(),1e-13); - INTERP_KERNEL::ExprParser expr18("((-3.2*(sqrt((2*5.2+6.)+(1.2*1.2+3.)))))"); - expr18.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(-14.608271629457059,expr18.evaluate(),1e-13); - INTERP_KERNEL::ExprParser expr19("((3.2*(exp((6.+2*5.2)+(1.2*1.2+3.)))))"); - expr19.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(3596226038.1784945,expr19.evaluate(),1e-6); - INTERP_KERNEL::ExprParser expr20("((3.2*(ln((2*5.2+6.)+(1.2*1.2+3.)))))"); - expr20.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(9.7179974940325309,expr20.evaluate(),1e-14); - INTERP_KERNEL::ExprParser expr21("max(3.2,4.5)"); - expr21.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(4.5,expr21.evaluate(),1e-14); - INTERP_KERNEL::ExprParser expr22("3.*max(((3.2*(ln((2*5.2+6.)+(1.2*1.2+3.))))),((3.2*(exp((6.+2*5.2)+(1.2*1.2+3.))))))"); - expr22.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(10788678114.535484,expr22.evaluate(),1e-5); - INTERP_KERNEL::ExprParser expr23("min(3.2,4.5)"); - expr23.parse(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(3.2,expr23.evaluate(),1e-14); -} - -void ExprEvalInterpTest::testInterpreter2() -{ - INTERP_KERNEL::ExprParser expr1("3.5*x+x*x*x/(2+x)+2*5*y"); - expr1.parse(); - std::set res,expected; - expr1.getSetOfVars(res); - CPPUNIT_ASSERT_EQUAL(2,(int)res.size()); - expected.insert("x"); expected.insert("y"); - CPPUNIT_ASSERT(std::equal(res.begin(),res.end(),expected.begin())); - double xyValue[2]={1.,3.}; - double res1; - std::vector vars; vars.push_back("x"); vars.push_back("y"); - expr1.prepareExprEvaluation(vars); - expr1.evaluateExpr(1,&res1,xyValue); - CPPUNIT_ASSERT_DOUBLES_EQUAL(33.833333333333336,res1,1e-13); - xyValue[0]=-2.; - CPPUNIT_ASSERT_THROW(expr1.evaluateExpr(1,&res1,xyValue),INTERP_KERNEL::Exception); - double res2[2]; - xyValue[0]=1.; - expr1.evaluateExpr(2,res2,xyValue); - CPPUNIT_ASSERT_DOUBLES_EQUAL(33.833333333333336,res2[0],1e-13); - CPPUNIT_ASSERT_DOUBLES_EQUAL(33.833333333333336,res2[1],1e-13); - INTERP_KERNEL::ExprParser expr2("3.5*tan(2.3*x)*IVec+(cos(1.2+y/x)*JVec)"); - expr2.parse(); - res.clear(); expected.clear(); - expr2.getSetOfVars(res); - CPPUNIT_ASSERT_EQUAL(4,(int)res.size()); - expected.insert("x"); expected.insert("y"); expected.insert("IVec"); expected.insert("JVec"); - CPPUNIT_ASSERT(std::equal(res.begin(),res.end(),expected.begin())); - expr2.prepareExprEvaluation(vars); - expr2.evaluateExpr(2,res2,xyValue); - CPPUNIT_ASSERT_DOUBLES_EQUAL(-3.9172477460694637,res2[0],1e-14); - CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.49026082134069943,res2[1],1e-14); - INTERP_KERNEL::ExprParser expr3("3.5*u+u^2.4+2."); - expr3.parse(); - expr3.prepareExprEvaluationVec(); - expr3.evaluateExpr(2,res2,xyValue); - CPPUNIT_ASSERT_DOUBLES_EQUAL(6.5,res2[0],1e-14); - CPPUNIT_ASSERT_DOUBLES_EQUAL(26.466610165238237,res2[1],1e-14); - INTERP_KERNEL::ExprParser expr4("3.5*v+u^2.4+2."); - expr4.parse(); - CPPUNIT_ASSERT_THROW(expr4.prepareExprEvaluationVec(),INTERP_KERNEL::Exception); -} - -void ExprEvalInterpTest::testInterpreterUnit0() -{ - INTERP_KERNEL::ExprParser expr1("kg"); - expr1.parse(); - INTERP_KERNEL::DecompositionInUnitBase unit=expr1.evaluateUnit(); - CPPUNIT_ASSERT(unit.isEqual(1,0,0,0,0,0.,1000.)); - INTERP_KERNEL::ExprParser expr2("kgT"); - expr2.parse(); - CPPUNIT_ASSERT_THROW(expr2.evaluateUnit(),INTERP_KERNEL::Exception); - INTERP_KERNEL::ExprParser expr3("g"); - expr3.parse(); - unit=expr3.evaluateUnit(); - CPPUNIT_ASSERT(unit.isEqual(1,0,0,0,0,0.,1.)); - INTERP_KERNEL::ExprParser expr4("g*m"); - expr4.parse(); - unit=expr4.evaluateUnit(); - CPPUNIT_ASSERT(unit.isEqual(1,1,0,0,0,0.,1.)); - INTERP_KERNEL::ExprParser expr5("g*m/K"); - expr5.parse(); - unit=expr5.evaluateUnit(); - CPPUNIT_ASSERT(unit.isEqual(1,1,0,0,-1,0.,1.)); - INTERP_KERNEL::ExprParser expr6("g*m/K^2"); - expr6.parse(); - unit=expr6.evaluateUnit(); - CPPUNIT_ASSERT(unit.isEqual(1,1,0,0,-2,0.,1.)); - INTERP_KERNEL::ExprParser expr7("g/K^2*m"); - expr7.parse(); - unit=expr7.evaluateUnit(); - CPPUNIT_ASSERT(unit.isEqual(1,1,0,0,-2,0.,1.)); - INTERP_KERNEL::ExprParser expr8("g/(K^2*m)"); - expr8.parse(); - unit=expr8.evaluateUnit(); - CPPUNIT_ASSERT(unit.isEqual(1,-1,0,0,-2,0.,1.)); - INTERP_KERNEL::ExprParser expr9("km/h"); - expr9.parse(); - unit=expr9.evaluateUnit(); - CPPUNIT_ASSERT(unit.isEqual(0,1,-1,0,0,0.,0.27777777777777779)); - INTERP_KERNEL::ExprParser expr10("m/s"); - expr10.parse(); - unit=expr10.evaluateUnit(); - CPPUNIT_ASSERT(unit.isEqual(0,1,-1,0,0,0.,1.)); - INTERP_KERNEL::ExprParser expr11("m+s"); - expr11.parse(); - CPPUNIT_ASSERT_THROW(expr11.evaluateUnit(),INTERP_KERNEL::Exception); - INTERP_KERNEL::ExprParser expr12("m-m"); - expr12.parse(); - CPPUNIT_ASSERT_THROW(expr12.evaluateUnit(),INTERP_KERNEL::Exception); - const char expr13C[3]={-0x50,0x43,0x0}; - INTERP_KERNEL::ExprParser expr13(expr13C); - expr13.parse(); - unit=expr13.evaluateUnit(); - CPPUNIT_ASSERT(unit.isEqual(0,0,0,0,1,273.15,1.)); - const char expr14C[4]={-0x3E,-0x50,0x43,0x0}; - INTERP_KERNEL::ExprParser expr14(expr14C); - expr14.parse(); - unit=expr14.evaluateUnit(); - CPPUNIT_ASSERT(unit.isEqual(0,0,0,0,1,273.15,1.)); - INTERP_KERNEL::ExprParser expr15("kN/kg"); - expr15.parse(); - unit=expr15.evaluateUnit(); - CPPUNIT_ASSERT(unit.isEqual(0,1,-2,0,0,0.,1000.)); - INTERP_KERNEL::ExprParser expr16("cm"); - expr16.parse(); - unit=expr16.evaluateUnit(); - CPPUNIT_ASSERT(unit.isEqual(0,1,0,0,0,0.,0.01)); - INTERP_KERNEL::ExprParser expr17("m"); - expr17.parse(); - unit=expr17.evaluateUnit(); - CPPUNIT_ASSERT(unit.isEqual(0,1,0,0,0,0.,1)); - const char expr18C[3]={-0x08,0x43,0x0}; - INTERP_KERNEL::ExprParser expr18(expr18C); - expr18.parse(); - unit=expr18.evaluateUnit(); - CPPUNIT_ASSERT(unit.isEqual(0,0,0,0,1,273.15,1.)); - const char expr19C[6]={-0x50,0x43,0x2F,-0x50,0x43,0x0}; - INTERP_KERNEL::ExprParser expr19(expr19C); - expr19.parse(); - unit=expr19.evaluateUnit(); - CPPUNIT_ASSERT(unit.isEqual(0,0,0,0,0,0.,1.)); - const char expr20C[9]={-0x50,0x43,0x2A,-0x50,0x43,0x2F,-0x50,0x43,0x0}; - INTERP_KERNEL::ExprParser expr20(expr20C); - expr20.parse(); - unit=expr20.evaluateUnit(); - CPPUNIT_ASSERT(unit.isEqual(0,0,0,0,1,0.,1.)); -} - -void ExprEvalInterpTest::testInterpreterUnit1() -{ - INTERP_KERNEL::Unit unit1("m/s"); - INTERP_KERNEL::Unit unit2("km/h"); - CPPUNIT_ASSERT(unit1.isCompatibleWith(unit2) && unit2.isCompatibleWith(unit1)); - CPPUNIT_ASSERT_DOUBLES_EQUAL(360,unit1.convert(unit2,100.),1e-10); - INTERP_KERNEL::Unit unit3("J/s"); - INTERP_KERNEL::Unit unit4("kW"); - CPPUNIT_ASSERT(unit3.isCompatibleWith(unit4) && unit4.isCompatibleWith(unit3)); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,unit3.convert(unit4,1000.),1e-10); - CPPUNIT_ASSERT(unit4.getCoarseRepr()=="kW"); - INTERP_KERNEL::Unit unit5("kpT"); - CPPUNIT_ASSERT(!unit5.isInterpretationOK()); - CPPUNIT_ASSERT(unit5.getCoarseRepr()=="kpT"); - INTERP_KERNEL::Unit unit6("m*kpT"); - CPPUNIT_ASSERT(!unit6.isInterpretationOK()); - INTERP_KERNEL::Unit unit7("m*s^-1"); - CPPUNIT_ASSERT(unit7.isCompatibleWith(unit2) && unit2.isCompatibleWith(unit7)); - CPPUNIT_ASSERT_DOUBLES_EQUAL(360,unit7.convert(unit2,100.),1e-10); - const char unit8C[3]={-0x50,0x43,0x0}; - INTERP_KERNEL::Unit unit8(unit8C); - INTERP_KERNEL::Unit unit9("K"); - CPPUNIT_ASSERT(unit9.isCompatibleWith(unit8) && unit8.isCompatibleWith(unit9)); - CPPUNIT_ASSERT_DOUBLES_EQUAL(335.15,unit8.convert(unit9,62.),1e-10); - CPPUNIT_ASSERT_DOUBLES_EQUAL(-16.37,unit9.convert(unit8,256.78),1e-10); - INTERP_KERNEL::Unit unit10("m"); - INTERP_KERNEL::Unit unit11("cm"); - CPPUNIT_ASSERT(unit10.isCompatibleWith(unit11) && unit11.isCompatibleWith(unit10)); - CPPUNIT_ASSERT_DOUBLES_EQUAL(6200.,unit10.convert(unit11,62.),1e-8); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.62,unit11.convert(unit10,62.),1e-15); - INTERP_KERNEL::Unit unit12("m-m"); - CPPUNIT_ASSERT(!unit12.isInterpretationOK()); -} diff --git a/src/INTERP_KERNELTest/ExprEvalInterpTest.hxx b/src/INTERP_KERNELTest/ExprEvalInterpTest.hxx deleted file mode 100644 index a135201da..000000000 --- a/src/INTERP_KERNELTest/ExprEvalInterpTest.hxx +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _EXPREVALINTERPTEST_HXX_ -#define _EXPREVALINTERPTEST_HXX_ - -#include - -#include "InterpKernelTestExport.hxx" - -namespace INTERP_TEST -{ - class INTERPKERNELTEST_EXPORT ExprEvalInterpTest : public CppUnit::TestFixture - { - CPPUNIT_TEST_SUITE( ExprEvalInterpTest ); - CPPUNIT_TEST( testBuildStringFromFortran ); - CPPUNIT_TEST( testDeleteWhiteSpaces ); - CPPUNIT_TEST( testInterpreter0 ); - CPPUNIT_TEST( testInterpreter1 ); - CPPUNIT_TEST( testInterpreter2 ); - CPPUNIT_TEST( testInterpreterUnit0 ); - CPPUNIT_TEST( testInterpreterUnit1 ); - CPPUNIT_TEST_SUITE_END(); - public: - void setUp() { } - void tearDown() { } - void cleanUp() { } - void testBuildStringFromFortran(); - void testDeleteWhiteSpaces(); - void testInterpreter0(); - void testInterpreter1(); - void testInterpreter2(); - void testInterpreterUnit0(); - void testInterpreterUnit1(); - }; -} - -#endif diff --git a/src/INTERP_KERNELTest/InterpKernelTestExport.hxx b/src/INTERP_KERNELTest/InterpKernelTestExport.hxx deleted file mode 100644 index 1c60231b2..000000000 --- a/src/INTERP_KERNELTest/InterpKernelTestExport.hxx +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _INTERPKERNELTESTEXPORT_HXX_ -#define _INTERPKERNELTESTEXPORT_HXX_ - -#ifdef WNT -# if defined InterpKernelTest_EXPORTS -# define INTERPKERNELTEST_EXPORT __declspec( dllexport ) -# else -# define INTERPKERNELTEST_EXPORT __declspec( dllimport ) -# endif -#else -# define INTERPKERNELTEST_EXPORT -#endif - -#endif diff --git a/src/INTERP_KERNEL/Interpolation1D.hxx b/src/INTERP_KERNELTest/RemapperTest.hxx old mode 100755 new mode 100644 similarity index 57% rename from src/INTERP_KERNEL/Interpolation1D.hxx rename to src/INTERP_KERNELTest/RemapperTest.hxx index d11b202b1..bd58b533b --- a/src/INTERP_KERNEL/Interpolation1D.hxx +++ b/src/INTERP_KERNELTest/RemapperTest.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,20 +16,45 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +#ifndef __TU_REMAPPER_HXX__ +#define __TU_REMAPPER_HXX__ -#ifndef __INTERPOLATION1D_HXX__ -#define __INTERPOLATION1D_HXX__ +#include +#include "Remapper.hxx" +#include "MEDMEM_Field.hxx" -#include "InterpolationCurve.hxx" - -namespace INTERP_KERNEL +namespace INTERP_TEST { - class Interpolation1D : public InterpolationCurve + + /** + * \brief Test suite testing some of the low level methods of TransformedTriangle. + * + */ + class RemapperTest : public CppUnit::TestFixture { + + CPPUNIT_TEST_SUITE( RemapperTest ); + CPPUNIT_TEST( test_Remapper ); + CPPUNIT_TEST_SUITE_END(); + + public: - Interpolation1D() { } - Interpolation1D(const InterpolationOptions& io):InterpolationCurve(io) {} + void setUp(); + + void tearDown(); + + // tests + void test_Remapper(); + + private: + void absField(MEDMEM::FIELD&); }; + + + + } + + #endif diff --git a/src/INTERP_KERNELTest/TestInterpKernelUtils.cxx b/src/INTERP_KERNELTest/TestInterpKernelUtils.cxx deleted file mode 100644 index 1d98bdf27..000000000 --- a/src/INTERP_KERNELTest/TestInterpKernelUtils.cxx +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "TestInterpKernelUtils.hxx" - -#include - -namespace INTERP_TEST -{ - std::string getResourceFile( const std::string& filename ) - { - std::string resourceFile = ""; - - if ( getenv("top_srcdir") ) { - // we are in 'make check' step - resourceFile = getenv("top_srcdir"); - resourceFile += "/resources/"; - } - else if ( getenv("MED_ROOT_DIR") ) { - // use MED_ROOT_DIR env.var - resourceFile = getenv("MED_ROOT_DIR"); - resourceFile += "/share/salome/resources/med/"; - } - resourceFile += filename; - return resourceFile; - } - -} // namespace INTERP_TEST diff --git a/src/INTERP_KERNELTest/TestInterpKernelUtils.hxx b/src/INTERP_KERNELTest/TestInterpKernelUtils.hxx deleted file mode 100644 index 1cedbd291..000000000 --- a/src/INTERP_KERNELTest/TestInterpKernelUtils.hxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TESTINTERPKERNELUTILS_HXX_ -#define _TESTINTERPKERNELUTILS_HXX_ - -#include "InterpKernelTestExport.hxx" - -#include - -namespace INTERP_TEST -{ - - INTERPKERNELTEST_EXPORT std::string getResourceFile( const std::string& ); - -} // namespace INTERP_TEST - -#endif // _TESTINTERPKERNELUTILS_HXX_ diff --git a/src/MEDCoupling/MEDCoupling.hxx b/src/MEDCoupling/MEDCoupling.hxx deleted file mode 100644 index 5f718343a..000000000 --- a/src/MEDCoupling/MEDCoupling.hxx +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _MEDCOUPLING_HXX_ -#define _MEDCOUPLING_HXX_ - -#ifdef WNT -# if defined medcoupling_EXPORTS -# define MEDCOUPLING_EXPORT __declspec( dllexport ) -# else -# define MEDCOUPLING_EXPORT __declspec( dllimport ) -# endif -#else -# define MEDCOUPLING_EXPORT -#endif - -#ifdef WNT -# if defined medcouplingremapper_EXPORTS -# define MEDCOUPLINGREMAPPER_EXPORT __declspec( dllexport ) -# else -# define MEDCOUPLINGREMAPPER_EXPORT __declspec( dllimport ) -# endif -#else -# define MEDCOUPLINGREMAPPER_EXPORT -#endif - -#ifdef WNT -#pragma warning( disable : 4290 ) -#endif - -#endif diff --git a/src/MEDCoupling/MEDCouplingCMesh.cxx b/src/MEDCoupling/MEDCouplingCMesh.cxx deleted file mode 100644 index 8829b19de..000000000 --- a/src/MEDCoupling/MEDCouplingCMesh.cxx +++ /dev/null @@ -1,366 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "MEDCouplingCMesh.hxx" -#include "MEDCouplingMemArray.hxx" -#include "MEDCouplingFieldDouble.hxx" - -#include -#include -#include - -using namespace ParaMEDMEM; - -MEDCouplingCMesh::MEDCouplingCMesh():_x_array(0),_y_array(0),_z_array(0) -{ -} - -MEDCouplingCMesh::~MEDCouplingCMesh() -{ - if(_x_array) - _x_array->decrRef(); - if(_y_array) - _y_array->decrRef(); - if(_z_array) - _z_array->decrRef(); -} - -MEDCouplingCMesh *MEDCouplingCMesh::New() -{ - return new MEDCouplingCMesh; -} - -void MEDCouplingCMesh::updateTime() -{ - if(_x_array) - updateTimeWith(*_x_array); - if(_y_array) - updateTimeWith(*_y_array); - if(_z_array) - updateTimeWith(*_z_array); -} - -bool MEDCouplingCMesh::isEqual(const MEDCouplingMesh *other, double prec) const -{ - const MEDCouplingCMesh *otherC=dynamic_cast(other); - if(!otherC) - return false; - return true; -} - -void MEDCouplingCMesh::checkCoherency() const throw(INTERP_KERNEL::Exception) -{ - const char msg0[]="Invalid "; - const char msg1[]=" array ! Must contain more than 1 element."; - if(_x_array) - if(_x_array->getNbOfElems()<2) - { - std::ostringstream os; os << msg0 << 'X' << msg1; - throw INTERP_KERNEL::Exception(os.str().c_str()); - } - if(_y_array) - if(_y_array->getNbOfElems()<2) - { - std::ostringstream os; os << msg0 << 'Y' << msg1; - throw INTERP_KERNEL::Exception(os.str().c_str()); - } - if(_z_array) - if(_z_array->getNbOfElems()<2) - { - std::ostringstream os; os << msg0 << 'Z' << msg1; - throw INTERP_KERNEL::Exception(os.str().c_str()); - } -} - -bool MEDCouplingCMesh::isStructured() const -{ - return true; -} - -int MEDCouplingCMesh::getNumberOfCells() const -{ - int ret=1; - if(_x_array) - ret*=_x_array->getNbOfElems()-1; - if(_y_array) - ret*=_y_array->getNbOfElems()-1; - if(_z_array) - ret*=_z_array->getNbOfElems()-1; - return ret; -} - -int MEDCouplingCMesh::getNumberOfNodes() const -{ - int ret=1; - if(_x_array) - ret*=_x_array->getNbOfElems(); - if(_y_array) - ret*=_y_array->getNbOfElems(); - if(_z_array) - ret*=_z_array->getNbOfElems(); - return ret; -} - -void MEDCouplingCMesh::getSplitCellValues(int *res) const -{ - int spaceDim=getSpaceDimension(); - for(int l=0;lgetNbOfElems()-1; - res[spaceDim-l-1]=val; - } -} - -void MEDCouplingCMesh::getSplitNodeValues(int *res) const -{ - int spaceDim=getSpaceDimension(); - for(int l=0;lgetNbOfElems(); - res[spaceDim-l-1]=val; - } -} - -int MEDCouplingCMesh::getCellIdFromPos(int i, int j, int k) const -{ - int tmp[3]={i,j,k}; - int tmp2[3]; - int spaceDim=getSpaceDimension(); - getSplitCellValues(tmp2); - std::transform(tmp,tmp+spaceDim,tmp2,tmp,std::multiplies()); - return std::accumulate(tmp,tmp+spaceDim,0); -} - -int MEDCouplingCMesh::getNodeIdFromPos(int i, int j, int k) const -{ - int tmp[3]={i,j,k}; - int tmp2[3]; - int spaceDim=getSpaceDimension(); - getSplitNodeValues(tmp2); - std::transform(tmp,tmp+spaceDim,tmp2,tmp,std::multiplies()); - return std::accumulate(tmp,tmp+spaceDim,0); -} - -void MEDCouplingCMesh::getPosFromId(int nodeId, int spaceDim, const int *split, int *res) -{ - int work=nodeId; - for(int i=spaceDim-1;i>=0;i--) - { - int pos=work/split[i]; - work=work%split[i]; - res[i]=pos; - } -} - -int MEDCouplingCMesh::getSpaceDimension() const -{ - int ret=0; - if(_x_array) - ret++; - if(_y_array) - ret++; - if(_z_array) - ret++; - return ret; -} - -int MEDCouplingCMesh::getMeshDimension() const -{ - return getSpaceDimension(); -} - -INTERP_KERNEL::NormalizedCellType MEDCouplingCMesh::getTypeOfCell(int cellId) const -{ - switch(getMeshDimension()) - { - case 3: - return INTERP_KERNEL::NORM_HEXA8; - case 2: - return INTERP_KERNEL::NORM_QUAD4; - case 1: - return INTERP_KERNEL::NORM_SEG2; - default: - throw INTERP_KERNEL::Exception("Unexpected dimension for MEDCouplingCMesh::getTypeOfCell !"); - } -} - -void MEDCouplingCMesh::getNodeIdsOfCell(int cellId, std::vector& conn) const -{ - //not implemented yet -} - -void MEDCouplingCMesh::getCoordinatesOfNode(int nodeId, std::vector& coo) const -{ - //not implemented yet -} - -DataArrayDouble *MEDCouplingCMesh::getCoordsAt(int i) const throw(INTERP_KERNEL::Exception) -{ - switch(i) - { - case 0: - return _x_array; - case 1: - return _y_array; - case 2: - return _z_array; - default: - throw INTERP_KERNEL::Exception("Invalid rank specified must be 0 or 1 or 2."); - } -} - -void MEDCouplingCMesh::setCoords(DataArrayDouble *coordsX, DataArrayDouble *coordsY, DataArrayDouble *coordsZ) -{ - if(_x_array) - _x_array->decrRef(); - _x_array=coordsX; - if(_x_array) - _x_array->incrRef(); - if(_y_array) - _y_array->decrRef(); - _y_array=coordsY; - if(_y_array) - _y_array->incrRef(); - if(_z_array) - _z_array->decrRef(); - _z_array=coordsZ; - if(_z_array) - _z_array->incrRef(); - declareAsNew(); -} - -void MEDCouplingCMesh::getBoundingBox(double *bbox) const -{ - //not implemented yet ! -} - -MEDCouplingFieldDouble *MEDCouplingCMesh::getMeasureField(bool isAbs) const -{ - //not implemented yet ! - return 0; -} - -MEDCouplingFieldDouble *MEDCouplingCMesh::getMeasureFieldOnNode(bool isAbs) const -{ - //not implemented yet ! - return 0; -} - -MEDCouplingFieldDouble *MEDCouplingCMesh::buildOrthogonalField() const -{ - if(getMeshDimension()!=2) - throw INTERP_KERNEL::Exception("Expected a cmesh with meshDim == 2 !"); - MEDCouplingFieldDouble *ret=MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME); - DataArrayDouble *array=DataArrayDouble::New(); - int nbOfCells=getNumberOfCells(); - array->alloc(nbOfCells,3); - double *vals=array->getPointer(); - for(int i=0;isetArray(array); - array->decrRef(); - ret->setMesh(this); - return ret; -} - -int MEDCouplingCMesh::getCellContainingPoint(const double *pos, double eps) const -{ - //not implemented yet ! - return -1; -} - -void MEDCouplingCMesh::rotate(const double *center, const double *vector, double angle) -{ - throw INTERP_KERNEL::Exception("No rotation available on CMesh : Traduce it to StructuredMesh to apply it !"); -} - -void MEDCouplingCMesh::translate(const double *vector) -{ - if(_x_array) - std::transform(_x_array->getConstPointer(),_x_array->getConstPointer()+_x_array->getNbOfElems(), - _x_array->getPointer(),std::bind2nd(std::plus(),vector[0])); - if(_y_array) - std::transform(_y_array->getConstPointer(),_y_array->getConstPointer()+_y_array->getNbOfElems(), - _y_array->getPointer(),std::bind2nd(std::plus(),vector[1])); - if(_z_array) - std::transform(_z_array->getConstPointer(),_z_array->getConstPointer()+_z_array->getNbOfElems(), - _z_array->getPointer(),std::bind2nd(std::plus(),vector[2])); -} - -MEDCouplingMesh *MEDCouplingCMesh::mergeMyselfWith(const MEDCouplingMesh *other) const -{ - //not implemented yet ! - return 0; -} - -DataArrayDouble *MEDCouplingCMesh::getCoordinatesAndOwner() const -{ - DataArrayDouble *ret=DataArrayDouble::New(); - int spaceDim=getSpaceDimension(); - int nbNodes=getNumberOfNodes(); - ret->alloc(nbNodes,spaceDim); - double *pt=ret->getPointer(); - int tmp[3]; - getSplitNodeValues(tmp); - DataArrayDouble *tabs[3]={getCoordsAt(0),getCoordsAt(1),getCoordsAt(2)}; - const double *tabsPtr[3]; - for(int j=0;jgetConstPointer(); - int tmp2[3]; - for(int i=0;ialloc(nbCells,spaceDim); - double *pt=ret->getPointer(); - int tmp[3]; - getSplitCellValues(tmp); - DataArrayDouble *tabs[3]={getCoordsAt(0),getCoordsAt(1),getCoordsAt(2)}; - std::vector tabsPtr[3]; - for(int j=0;jgetNbOfElems()-1; - const double *srcPtr=tabs[j]->getConstPointer(); - tabsPtr[j].insert(tabsPtr[j].end(),srcPtr,srcPtr+sz); - std::transform(tabsPtr[j].begin(),tabsPtr[j].end(),srcPtr+1,tabsPtr[j].begin(),std::plus()); - std::transform(tabsPtr[j].begin(),tabsPtr[j].end(),tabsPtr[j].begin(),std::bind2nd(std::multiplies(),0.5)); - } - int tmp2[3]; - for(int i=0;i& conn) const; - void getCoordinatesOfNode(int nodeId, std::vector& coo) const; - DataArrayDouble *getCoordsAt(int i) const throw(INTERP_KERNEL::Exception); - void setCoords(DataArrayDouble *coordsX, - DataArrayDouble *coordsY=0, - DataArrayDouble *coordsZ=0); - // tools - void getBoundingBox(double *bbox) const; - MEDCouplingFieldDouble *getMeasureField(bool isAbs) const; - MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const; - MEDCouplingFieldDouble *buildOrthogonalField() const; - int getCellContainingPoint(const double *pos, double eps) const; - void rotate(const double *center, const double *vector, double angle); - void translate(const double *vector); - MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const; - DataArrayDouble *getCoordinatesAndOwner() const; - DataArrayDouble *getBarycenterAndOwner() const; - //some useful methods - void getSplitCellValues(int *res) const; - void getSplitNodeValues(int *res) const; - private: - MEDCouplingCMesh(); - ~MEDCouplingCMesh(); - private: - DataArrayDouble *_x_array; - DataArrayDouble *_y_array; - DataArrayDouble *_z_array; - }; -} - -#endif diff --git a/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx b/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx deleted file mode 100644 index 3233ac549..000000000 --- a/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx +++ /dev/null @@ -1,472 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "MEDCouplingExtrudedMesh.hxx" -#include "MEDCouplingUMesh.hxx" -#include "MEDCouplingMemArray.hxx" -#include "MEDCouplingFieldDouble.hxx" -#include "CellModel.hxx" - -#include "InterpolationUtils.hxx" - -#include -#include -#include -#include -#include -#include -#include - -using namespace ParaMEDMEM; - -/*! - * Build an extruded mesh instance from 3D and 2D unstructured mesh lying on the \b same \b coords. - * @param mesh3D 3D unstructured mesh. - * @param mesh2D 2D unstructured mesh lying on the same coordinates than mesh3D. \b Warning mesh2D is \b not \b const - * because the mesh is aggregated and potentially modified by rotate or translate method. - * @param cell2DId Id of cell in mesh2D mesh where the computation of 1D mesh will be done. - */ -MEDCouplingExtrudedMesh *MEDCouplingExtrudedMesh::New(const MEDCouplingUMesh *mesh3D, MEDCouplingUMesh *mesh2D, int cell2DId) throw(INTERP_KERNEL::Exception) -{ - return new MEDCouplingExtrudedMesh(mesh3D,mesh2D,cell2DId); -} - -MEDCouplingMeshType MEDCouplingExtrudedMesh::getType() const -{ - return EXTRUDED; -} - -MEDCouplingExtrudedMesh::MEDCouplingExtrudedMesh(const MEDCouplingUMesh *mesh3D, MEDCouplingUMesh *mesh2D, int cell2DId) throw(INTERP_KERNEL::Exception) -try:_mesh2D(mesh2D),_mesh1D(MEDCouplingUMesh::New()),_mesh3D_ids(0),_cell_2D_id(cell2DId) -{ - if(_mesh2D!=0) - _mesh2D->incrRef(); - computeExtrusion(mesh3D); -} -catch(INTERP_KERNEL::Exception&) - { - } - -bool MEDCouplingExtrudedMesh::isStructured() const -{ - return false; -} - -int MEDCouplingExtrudedMesh::getNumberOfCells() const -{ - return _mesh2D->getNumberOfCells()*_mesh1D->getNumberOfCells(); -} - -int MEDCouplingExtrudedMesh::getNumberOfNodes() const -{ - return _mesh2D->getNumberOfNodes(); -} - -int MEDCouplingExtrudedMesh::getSpaceDimension() const -{ - return 3; -} - -int MEDCouplingExtrudedMesh::getMeshDimension() const -{ - return 3; -} - -INTERP_KERNEL::NormalizedCellType MEDCouplingExtrudedMesh::getTypeOfCell(int cellId) const -{ - int nbOfCells2D=_mesh2D->getNumberOfCells(); - int locId=cellId%nbOfCells2D; - INTERP_KERNEL::NormalizedCellType tmp=_mesh2D->getTypeOfCell(locId); - return INTERP_KERNEL::CellModel::getCellModel(tmp).getExtrudedType(); -} - -void MEDCouplingExtrudedMesh::getNodeIdsOfCell(int cellId, std::vector& conn) const -{ - int nbOfCells2D=_mesh2D->getNumberOfCells(); - int nbOfNodes2D=_mesh2D->getNumberOfNodes(); - int locId=cellId%nbOfCells2D; - int lev=cellId/nbOfCells2D; - std::vector tmp,tmp2; - _mesh2D->getNodeIdsOfCell(locId,tmp); - tmp2=tmp; - std::transform(tmp.begin(),tmp.end(),tmp.begin(),std::bind2nd(std::plus(),nbOfNodes2D*lev)); - std::transform(tmp2.begin(),tmp2.end(),tmp2.begin(),std::bind2nd(std::plus(),nbOfNodes2D*(lev+1))); - conn.insert(conn.end(),tmp.begin(),tmp.end()); - conn.insert(conn.end(),tmp2.begin(),tmp2.end()); -} - -void MEDCouplingExtrudedMesh::getCoordinatesOfNode(int nodeId, std::vector& coo) const -{ - int nbOfNodes2D=_mesh2D->getNumberOfNodes(); - int locId=nodeId%nbOfNodes2D; - int lev=nodeId/nbOfNodes2D; - std::vector tmp,tmp2; - _mesh2D->getCoordinatesOfNode(locId,tmp); - tmp2=tmp; - int spaceDim=_mesh1D->getSpaceDimension(); - const double *z=_mesh1D->getCoords()->getConstPointer(); - std::transform(tmp.begin(),tmp.end(),z+lev*spaceDim,tmp.begin(),std::plus()); - std::transform(tmp2.begin(),tmp2.end(),z+(lev+1)*spaceDim,tmp2.begin(),std::plus()); - coo.insert(coo.end(),tmp.begin(),tmp.end()); - coo.insert(coo.end(),tmp2.begin(),tmp2.end()); -} - -void MEDCouplingExtrudedMesh::checkCoherency() const throw (INTERP_KERNEL::Exception) -{ -} - -void MEDCouplingExtrudedMesh::getBoundingBox(double *bbox) const -{ - double bbox2D[6]; - _mesh2D->getBoundingBox(bbox2D); - const double *nodes1D=_mesh1D->getCoords()->getConstPointer(); - int nbOfNodes1D=_mesh1D->getNumberOfNodes(); - double bbox1DMin[3],bbox1DMax[3],tmp[3]; - std::fill(bbox1DMin,bbox1DMin+3,std::numeric_limits::max()); - std::fill(bbox1DMax,bbox1DMax+3,-(std::numeric_limits::max())); - for(int i=0;i(std::min)); - std::transform(nodes1D+3*i,nodes1D+3*(i+1),bbox1DMax,bbox1DMax,static_cast(std::max)); - } - std::transform(bbox1DMax,bbox1DMax+3,bbox1DMin,tmp,std::minus()); - int id=std::max_element(tmp,tmp+3)-tmp; - bbox[0]=bbox1DMin[0]; bbox[1]=bbox1DMax[0]; - bbox[2]=bbox1DMin[1]; bbox[3]=bbox1DMax[1]; - bbox[4]=bbox1DMin[2]; bbox[5]=bbox1DMax[2]; - bbox[2*id+1]+=tmp[id]; -} - -void MEDCouplingExtrudedMesh::updateTime() -{ - if(_mesh2D) - { - updateTimeWith(*_mesh2D); - } - if(_mesh1D) - { - updateTimeWith(*_mesh1D); - } -} - -MEDCouplingFieldDouble *MEDCouplingExtrudedMesh::getMeasureField(bool) const -{ - //not implemented yet - return 0; -} - -MEDCouplingFieldDouble *MEDCouplingExtrudedMesh::getMeasureFieldOnNode(bool) const -{ - //not implemented yet - return 0; -} - -MEDCouplingFieldDouble *MEDCouplingExtrudedMesh::buildOrthogonalField() const -{ - //not implemented yet - throw INTERP_KERNEL::Exception("MEDCouplingExtrudedMesh::buildOrthogonalField not implemented yet !"); -} - -int MEDCouplingExtrudedMesh::getCellContainingPoint(const double *pos, double eps) const -{ - //not implemented yet - return -1; -} - -MEDCouplingExtrudedMesh::~MEDCouplingExtrudedMesh() -{ - if(_mesh2D) - _mesh2D->decrRef(); - if(_mesh1D) - _mesh1D->decrRef(); - if(_mesh3D_ids) - _mesh3D_ids->decrRef(); -} - -void MEDCouplingExtrudedMesh::computeExtrusion(const MEDCouplingUMesh *mesh3D) throw(INTERP_KERNEL::Exception) -{ - const char errMsg1[]="2D mesh is empty unable to compute extrusion !"; - const char errMsg2[]="Coords between 2D and 3D meshes are not the same ! Try MEDCouplingPointSet::tryToShareSameCoords method"; - const char errMsg3[]="No chance to find extrusion pattern in mesh3D,mesh2D couple because nbCells3D%nbCells2D!=0 !"; - if(_mesh2D==0 || mesh3D==0) - throw INTERP_KERNEL::Exception(errMsg1); - if(_mesh2D->getCoords()!=mesh3D->getCoords()) - throw INTERP_KERNEL::Exception(errMsg2); - if(mesh3D->getNumberOfCells()%_mesh2D->getNumberOfCells()!=0) - throw INTERP_KERNEL::Exception(errMsg3); - if(!_mesh3D_ids) - _mesh3D_ids=DataArrayInt::New(); - if(!_mesh1D) - _mesh1D=MEDCouplingUMesh::New(); - computeExtrusionAlg(mesh3D); -} - -void MEDCouplingExtrudedMesh::build1DExtrusion(int idIn3DDesc, int newId, int nbOf1DLev, MEDCouplingUMesh *subMesh, - const int *desc3D, const int *descIndx3D, - const int *revDesc3D, const int *revDescIndx3D, - bool computeMesh1D) throw(INTERP_KERNEL::Exception) -{ - int nbOf2DCells=_mesh2D->getNumberOfCells(); - int start=revDescIndx3D[idIn3DDesc]; - int end=revDescIndx3D[idIn3DDesc+1]; - if(end-start!=1) - { - std::ostringstream ost; ost << "Invalid bases 2D mesh specified : 2D cell # " << idIn3DDesc; - ost << " shared by more than 1 3D cell !!!"; - throw INTERP_KERNEL::Exception(ost.str().c_str()); - } - int current3DCell=revDesc3D[start]; - int current2DCell=idIn3DDesc; - int *mesh3DIDs=_mesh3D_ids->getPointer(); - mesh3DIDs[newId]=current3DCell; - const int *conn2D=subMesh->getNodalConnectivity()->getConstPointer(); - const int *conn2DIndx=subMesh->getNodalConnectivityIndex()->getConstPointer(); - for(int i=1;i conn(conn2D+conn2DIndx[current2DCell]+1,conn2D+conn2DIndx[current2DCell+1]); - std::sort(conn.begin(),conn.end()); - if(computeMesh1D) - computeBaryCenterOfFace(conn,i-1); - current2DCell=findOppositeFaceOf(current2DCell,current3DCell,conn, - desc3D,descIndx3D,conn2D,conn2DIndx); - start=revDescIndx3D[current2DCell]; - end=revDescIndx3D[current2DCell+1]; - if(end-start!=2) - { - std::ostringstream ost; ost << "Expecting to have 2 3D cells attached to 2D cell " << current2DCell << "!"; - ost << " : Impossible or call tryToShareSameCoords method !"; - throw INTERP_KERNEL::Exception(ost.str().c_str()); - } - if(revDesc3D[start]!=current3DCell) - current3DCell=revDesc3D[start]; - else - current3DCell=revDesc3D[start+1]; - mesh3DIDs[i*nbOf2DCells+newId]=current3DCell; - } - if(computeMesh1D) - { - std::vector conn(conn2D+conn2DIndx[current2DCell]+1,conn2D+conn2DIndx[current2DCell+1]); - std::sort(conn.begin(),conn.end()); - computeBaryCenterOfFace(conn,nbOf1DLev-1); - current2DCell=findOppositeFaceOf(current2DCell,current3DCell,conn, - desc3D,descIndx3D,conn2D,conn2DIndx); - conn.clear(); - conn.insert(conn.end(),conn2D+conn2DIndx[current2DCell]+1,conn2D+conn2DIndx[current2DCell+1]); - std::sort(conn.begin(),conn.end()); - computeBaryCenterOfFace(conn,nbOf1DLev); - } -} - -int MEDCouplingExtrudedMesh::findOppositeFaceOf(int current2DCell, int current3DCell, const std::vector& connSorted, - const int *desc3D, const int *descIndx3D, - const int *conn2D, const int *conn2DIndx) throw(INTERP_KERNEL::Exception) -{ - int start=descIndx3D[current3DCell]; - int end=descIndx3D[current3DCell+1]; - bool found=false; - for(const int *candidate2D=desc3D+start;candidate2D!=desc3D+end && !found;candidate2D++) - { - if(*candidate2D!=current2DCell) - { - std::vector conn2(conn2D+conn2DIndx[*candidate2D]+1,conn2D+conn2DIndx[*candidate2D+1]); - std::sort(conn2.begin(),conn2.end()); - std::list intersect; - std::set_intersection(connSorted.begin(),connSorted.end(),conn2.begin(),conn2.end(), - std::insert_iterator< std::list >(intersect,intersect.begin())); - if(intersect.empty()) - return *candidate2D; - } - } - std::ostringstream ost; ost << "Impossible to find an opposite 2D face of face # " << current2DCell; - ost << " in 3D cell # " << current3DCell << " : Impossible or call tryToShareSameCoords method !"; - throw INTERP_KERNEL::Exception(ost.str().c_str()); -} - -void MEDCouplingExtrudedMesh::computeBaryCenterOfFace(const std::vector& nodalConnec, int lev1DId) -{ - double *zoneToUpdate=_mesh1D->getCoords()->getPointer()+lev1DId*3; - std::fill(zoneToUpdate,zoneToUpdate+3,0.); - const double *coords=_mesh2D->getCoords()->getConstPointer(); - for(std::vector::const_iterator iter=nodalConnec.begin();iter!=nodalConnec.end();iter++) - std::transform(zoneToUpdate,zoneToUpdate+3,coords+3*(*iter),zoneToUpdate,std::plus()); - std::transform(zoneToUpdate,zoneToUpdate+3,zoneToUpdate,std::bind2nd(std::multiplies(),(double)(1./nodalConnec.size()))); -} - -int MEDCouplingExtrudedMesh::findCorrespCellByNodalConn(const std::vector& nodalConnec, const int *revNodalPtr, const int *revNodalIndxPtr) throw(INTERP_KERNEL::Exception) -{ - std::vector::const_iterator iter=nodalConnec.begin(); - std::set s1(revNodalPtr+revNodalIndxPtr[*iter],revNodalPtr+revNodalIndxPtr[*iter+1]); - iter++; - for(;iter!=nodalConnec.end();iter++) - { - std::set s2(revNodalPtr+revNodalIndxPtr[*iter],revNodalPtr+revNodalIndxPtr[*iter+1]); - std::set s3; - std::set_intersection(s1.begin(),s1.end(),s2.begin(),s2.end(),std::insert_iterator< std::set >(s3,s3.end())); - s1=s3; - } - if(s1.size()==1) - return *(s1.begin()); - std::ostringstream ostr; - ostr << "Cell with nodal connec : "; - std::copy(nodalConnec.begin(),nodalConnec.end(),std::ostream_iterator(ostr," ")); - ostr << " is not part of mesh"; - throw INTERP_KERNEL::Exception(ostr.str().c_str()); -} - -/*! - * This method is callable on 1Dmeshes (meshDim==1 && spaceDim==3) returned by MEDCouplingExtrudedMesh::getMesh1D typically. - * These 1Dmeshes (meshDim==1 && spaceDim==3) have a special semantic because these meshes do not specify a static location but a translation along a path. - * This method checks that 'm1' and 'm2' are compatible, if not an exception is thrown. In case these meshes ('m1' and 'm2') are compatible 2 corresponding meshes - * are created ('m1r' and 'm2r') that can be used for interpolation. - * @param m1 input mesh with meshDim==1 and spaceDim==3 - * @param m2 input mesh with meshDim==1 and spaceDim==3 - * @param eps tolerance acceptable to determine compatibility - * @param m1r output mesh with ref count equal to 1 with meshDim==1 and spaceDim==1 - * @param m2r output mesh with ref count equal to 1 with meshDim==1 and spaceDim==1 - * @param v is the output normalized vector of the common direction of 'm1' and 'm2' - * @throw in case that m1 and m2 are not compatible each other. - */ -void MEDCouplingExtrudedMesh::project1DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps, - MEDCouplingUMesh *&m1r, MEDCouplingUMesh *&m2r, double *v) throw(INTERP_KERNEL::Exception) -{ - if(m1->getSpaceDimension()!=3 || m1->getSpaceDimension()!=3) - throw INTERP_KERNEL::Exception("Input meshes are expected to have a spaceDim==3 for projec1D !"); - m1r=m1->clone(true); - m2r=m2->clone(true); - m1r->changeSpaceDimension(1); - m2r->changeSpaceDimension(1); - std::vector c; - std::vector ref,ref2; - m1->getNodeIdsOfCell(0,c); - m1->getCoordinatesOfNode(c[0],ref); - m1->getCoordinatesOfNode(c[1],ref2); - std::transform(ref2.begin(),ref2.end(),ref.begin(),v,std::minus()); - double n=INTERP_KERNEL::norm<3>(v); - std::transform(v,v+3,v,std::bind2nd(std::multiplies(),1/n)); - m1->project1D(&ref[0],v,eps,m1r->getCoords()->getPointer()); - m2->project1D(&ref[0],v,eps,m2r->getCoords()->getPointer()); - -} - -void MEDCouplingExtrudedMesh::rotate(const double *center, const double *vector, double angle) -{ - _mesh2D->rotate(center,vector,angle); - _mesh1D->rotate(center,vector,angle); -} - -void MEDCouplingExtrudedMesh::translate(const double *vector) -{ - _mesh2D->translate(vector); - _mesh1D->translate(vector); -} - -MEDCouplingMesh *MEDCouplingExtrudedMesh::mergeMyselfWith(const MEDCouplingMesh *other) const -{ - // not implemented yet ! - return 0; -} - -DataArrayDouble *MEDCouplingExtrudedMesh::getCoordinatesAndOwner() const -{ - DataArrayDouble *arr2D=_mesh2D->getCoords(); - DataArrayDouble *arr1D=_mesh1D->getCoords(); - DataArrayDouble *ret=DataArrayDouble::New(); - ret->alloc(getNumberOfNodes(),3); - int nbOf1DLev=_mesh1D->getNumberOfNodes(); - int nbOf2DNodes=_mesh2D->getNumberOfNodes(); - const double *ptSrc=arr2D->getConstPointer(); - double *pt=ret->getPointer(); - std::copy(ptSrc,ptSrc+3*nbOf2DNodes,pt); - for(int i=1;igetConstPointer()+3*i,arr1D->getConstPointer()+3*(i+1),vec); - std::transform(arr1D->getConstPointer()+3*(i-1),arr1D->getConstPointer()+3*i,vec,vec,std::minus()); - for(int j=0;j()); - } - return ret; -} - -DataArrayDouble *MEDCouplingExtrudedMesh::getBarycenterAndOwner() const -{ - //not yet implemented - return 0; -} - -void MEDCouplingExtrudedMesh::computeExtrusionAlg(const MEDCouplingUMesh *mesh3D) throw(INTERP_KERNEL::Exception) -{ - _mesh3D_ids->alloc(mesh3D->getNumberOfCells(),1); - int nbOf1DLev=mesh3D->getNumberOfCells()/_mesh2D->getNumberOfCells(); - _mesh1D->setMeshDimension(1); - _mesh1D->allocateCells(nbOf1DLev); - int tmpConn[2]; - for(int i=0;iinsertNextCell(INTERP_KERNEL::NORM_SEG2,2,tmpConn); - } - _mesh1D->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(nbOf1DLev+1,3); - _mesh1D->setCoords(myCoords); - myCoords->decrRef(); - DataArrayInt *desc,*descIndx,*revDesc,*revDescIndx; - desc=DataArrayInt::New(); descIndx=DataArrayInt::New(); revDesc=DataArrayInt::New(); revDescIndx=DataArrayInt::New(); - MEDCouplingUMesh *subMesh=mesh3D->buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx); - DataArrayInt *revNodal2D,*revNodalIndx2D; - revNodal2D=DataArrayInt::New(); revNodalIndx2D=DataArrayInt::New(); - subMesh->getReverseNodalConnectivity(revNodal2D,revNodalIndx2D); - const int *nodal2D=_mesh2D->getNodalConnectivity()->getConstPointer(); - const int *nodal2DIndx=_mesh2D->getNodalConnectivityIndex()->getConstPointer(); - const int *revNodal2DPtr=revNodal2D->getConstPointer(); - const int *revNodalIndx2DPtr=revNodalIndx2D->getConstPointer(); - const int *descP=desc->getConstPointer(); - const int *descIndxP=descIndx->getConstPointer(); - const int *revDescP=revDesc->getConstPointer(); - const int *revDescIndxP=revDescIndx->getConstPointer(); - // - int nbOf2DCells=_mesh2D->getNumberOfCells(); - for(int i=0;i nodalConnec(nodal2D+nodal2DIndx[i]+1,nodal2D+nodal2DIndx[i+1]); - try - { - idInSubMesh=findCorrespCellByNodalConn(nodalConnec,revNodal2DPtr,revNodalIndx2DPtr); - } - catch(INTERP_KERNEL::Exception& e) - { - std::ostringstream ostr; ostr << "mesh2D cell # " << i << " is not part of any cell of 3D mesh !\n"; - ostr << e.what(); - throw INTERP_KERNEL::Exception(ostr.str().c_str()); - } - build1DExtrusion(idInSubMesh,i,nbOf1DLev,subMesh,descP,descIndxP,revDescP,revDescIndxP,i==_cell_2D_id); - } - // - revNodal2D->decrRef(); - revNodalIndx2D->decrRef(); - subMesh->decrRef(); - desc->decrRef(); - descIndx->decrRef(); - revDesc->decrRef(); - revDescIndx->decrRef(); -} diff --git a/src/MEDCoupling/MEDCouplingExtrudedMesh.hxx b/src/MEDCoupling/MEDCouplingExtrudedMesh.hxx deleted file mode 100644 index 60f46c047..000000000 --- a/src/MEDCoupling/MEDCouplingExtrudedMesh.hxx +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __PARAMEDMEM_MEDCOUPLINGEXTRUDEDMESH_HXX__ -#define __PARAMEDMEM_MEDCOUPLINGEXTRUDEDMESH_HXX__ - -#include "MEDCoupling.hxx" -#include "MEDCouplingMesh.hxx" - -#include - -namespace ParaMEDMEM -{ - class DataArrayInt; - class DataArrayDouble; - class MEDCouplingUMesh; - class MEDCouplingFieldDouble; - - class MEDCOUPLING_EXPORT MEDCouplingExtrudedMesh : public MEDCouplingMesh - { - public: - static MEDCouplingExtrudedMesh *New(const MEDCouplingUMesh *mesh3D, MEDCouplingUMesh *mesh2D, int cell2DId) throw(INTERP_KERNEL::Exception); - MEDCouplingMeshType getType() const; - bool isStructured() const; - int getNumberOfCells() const; - int getNumberOfNodes() const; - int getSpaceDimension() const; - int getMeshDimension() const; - INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const; - void getNodeIdsOfCell(int cellId, std::vector& conn) const; - void getCoordinatesOfNode(int nodeId, std::vector& coo) const; - void checkCoherency() const throw (INTERP_KERNEL::Exception); - void getBoundingBox(double *bbox) const; - void updateTime(); - MEDCouplingUMesh *getMesh2D() const { return _mesh2D; } - MEDCouplingUMesh *getMesh1D() const { return _mesh1D; } - DataArrayInt *getMesh3DIds() const { return _mesh3D_ids; } - MEDCouplingFieldDouble *getMeasureField(bool) const; - MEDCouplingFieldDouble *getMeasureFieldOnNode(bool) const; - MEDCouplingFieldDouble *buildOrthogonalField() const; - int getCellContainingPoint(const double *pos, double eps) const; - static int findCorrespCellByNodalConn(const std::vector& nodalConnec, - const int *revNodalPtr, const int *revNodalIndxPtr) throw(INTERP_KERNEL::Exception); - static void project1DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps, - MEDCouplingUMesh *&m1r, MEDCouplingUMesh *&m2r, double *v) throw(INTERP_KERNEL::Exception); - void rotate(const double *center, const double *vector, double angle); - void translate(const double *vector); - MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const; - DataArrayDouble *getCoordinatesAndOwner() const; - DataArrayDouble *getBarycenterAndOwner() const; - private: - MEDCouplingExtrudedMesh(const MEDCouplingUMesh *mesh3D, MEDCouplingUMesh *mesh2D, int cell2DId) throw(INTERP_KERNEL::Exception); - void computeExtrusion(const MEDCouplingUMesh *mesh3D) throw(INTERP_KERNEL::Exception); - void computeExtrusionAlg(const MEDCouplingUMesh *mesh3D) throw(INTERP_KERNEL::Exception); - void build1DExtrusion(int idIn3DDesc, int newId, int nbOf1DLev, MEDCouplingUMesh *subMesh, - const int *desc3D, const int *descIndx3D, - const int *revDesc3D, const int *revDescIndx3D, - bool computeMesh1D) throw(INTERP_KERNEL::Exception); - int findOppositeFaceOf(int current2DCell, int current3DCell, const std::vector& connSorted, - const int *desc3D, const int *descIndx3D, - const int *conn2D, const int *conn2DIndx) throw(INTERP_KERNEL::Exception); - void computeBaryCenterOfFace(const std::vector& nodalConnec, int lev1DId); - ~MEDCouplingExtrudedMesh(); - private: - MEDCouplingUMesh *_mesh2D; - MEDCouplingUMesh *_mesh1D; - DataArrayInt *_mesh3D_ids; - int _cell_2D_id; - }; -} - -#endif diff --git a/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx b/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx deleted file mode 100644 index 7e7c7b298..000000000 --- a/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx +++ /dev/null @@ -1,315 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "MEDCouplingFieldDiscretization.hxx" -#include "MEDCouplingPointSet.hxx" -#include "MEDCouplingCMesh.hxx" -#include "MEDCouplingFieldDouble.hxx" - -#include "InterpolationUtils.hxx" - -#include -#include -#include - -using namespace ParaMEDMEM; - -const double MEDCouplingFieldDiscretization::DFLT_PRECISION=1.e-12; - -const char MEDCouplingFieldDiscretizationP0::REPR[]="P0"; - -const TypeOfField MEDCouplingFieldDiscretizationP0::TYPE=ON_CELLS; - -const char MEDCouplingFieldDiscretizationP1::REPR[]="P1"; - -const TypeOfField MEDCouplingFieldDiscretizationP1::TYPE=ON_NODES; - -MEDCouplingFieldDiscretization::MEDCouplingFieldDiscretization():_precision(DFLT_PRECISION) -{ -} - -MEDCouplingFieldDiscretization *MEDCouplingFieldDiscretization::New(TypeOfField type) -{ - switch(type) - { - case MEDCouplingFieldDiscretizationP0::TYPE: - return new MEDCouplingFieldDiscretizationP0; - case MEDCouplingFieldDiscretizationP1::TYPE: - return new MEDCouplingFieldDiscretizationP1; - default: - throw INTERP_KERNEL::Exception("Choosen discretization is not implemented yet."); - } -} - -TypeOfField MEDCouplingFieldDiscretization::getTypeOfFieldFromStringRepr(const char *repr) throw(INTERP_KERNEL::Exception) -{ - std::string reprCpp(repr); - if(reprCpp==MEDCouplingFieldDiscretizationP0::REPR) - return MEDCouplingFieldDiscretizationP0::TYPE; - if(reprCpp==MEDCouplingFieldDiscretizationP1::REPR) - return MEDCouplingFieldDiscretizationP1::TYPE; - throw INTERP_KERNEL::Exception("Representation does not match with any field discretization !"); -} - -TypeOfField MEDCouplingFieldDiscretizationP0::getEnum() const -{ - return TYPE; -} - -MEDCouplingFieldDiscretization *MEDCouplingFieldDiscretizationP0::clone() const -{ - return new MEDCouplingFieldDiscretizationP0; -} - -const char *MEDCouplingFieldDiscretizationP0::getStringRepr() const -{ - return REPR; -} - -bool MEDCouplingFieldDiscretizationP0::isEqual(const MEDCouplingFieldDiscretization *other) const -{ - const MEDCouplingFieldDiscretizationP0 *otherC=dynamic_cast(other); - return otherC!=0; -} - -int MEDCouplingFieldDiscretizationP0::getNumberOfTuples(const MEDCouplingMesh *mesh) const -{ - return mesh->getNumberOfCells(); -} - -DataArrayDouble *MEDCouplingFieldDiscretizationP0::getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const -{ - return mesh->getBarycenterAndOwner(); -} - -void MEDCouplingFieldDiscretizationP0::checkCompatibilityWithNature(NatureOfField nat) const throw(INTERP_KERNEL::Exception) -{ -} - -void MEDCouplingFieldDiscretizationP0::checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArrayDouble *da) const throw(INTERP_KERNEL::Exception) -{ - if(mesh->getNumberOfCells()!=da->getNumberOfTuples()) - { - std::ostringstream message; - message << "Field on cells invalid because there are " << mesh->getNumberOfCells(); - message << " cells in mesh and " << da->getNumberOfTuples() << " tuples in field !"; - throw INTERP_KERNEL::Exception(message.str().c_str()); - } -} - -MEDCouplingFieldDouble *MEDCouplingFieldDiscretizationP0::getWeightingField(const MEDCouplingMesh *mesh, bool isAbs) const -{ - return mesh->getMeasureField(isAbs); -} - -void MEDCouplingFieldDiscretizationP0::getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const -{ - int id=mesh->getCellContainingPoint(loc,_precision); - if(id==-1) - throw INTERP_KERNEL::Exception("Specified point is detected outside of mesh : unable to apply P0::getValueOn !"); - arr->getTuple(id,res); -} - -void MEDCouplingFieldDiscretizationP0::getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const -{ - const MEDCouplingCMesh *meshC=dynamic_cast(mesh); - if(!meshC) - throw INTERP_KERNEL::Exception("P0::getValueOnPos is only accessible for structured meshes !"); - int id=meshC->getCellIdFromPos(i,j,k); - arr->getTuple(id,res); -} - -/*! - * Nothing to do. It's not a bug. - */ -void MEDCouplingFieldDiscretizationP0::renumberValuesOnNodes(const DataArrayInt *old2New, DataArrayDouble *arr) const -{ -} - -/*! - * This method returns a submesh of 'mesh' instance constituting cell ids contained in array defined as an interval [start;end). - * @ param di is an array returned that specifies entity ids (here cells ids) in mesh 'mesh' of entity in returned submesh. - * Example : The first cell id of returned mesh has the (*di)[0] id in 'mesh' - */ -MEDCouplingMesh *MEDCouplingFieldDiscretizationP0::buildSubMeshData(const int *start, const int *end, const MEDCouplingMesh *mesh, DataArrayInt *&di) const -{ - MEDCouplingPointSet* ret=((const MEDCouplingPointSet *) mesh)->buildPartOfMySelf(start,end,false); - di=DataArrayInt::New(); - di->alloc(end-start,1); - int *pt=di->getPointer(); - std::copy(start,end,pt); - return ret; -} - -TypeOfField MEDCouplingFieldDiscretizationP1::getEnum() const -{ - return TYPE; -} - -MEDCouplingFieldDiscretization *MEDCouplingFieldDiscretizationP1::clone() const -{ - return new MEDCouplingFieldDiscretizationP1; -} - -const char *MEDCouplingFieldDiscretizationP1::getStringRepr() const -{ - return REPR; -} - -bool MEDCouplingFieldDiscretizationP1::isEqual(const MEDCouplingFieldDiscretization *other) const -{ - const MEDCouplingFieldDiscretizationP1 *otherC=dynamic_cast(other); - return otherC!=0; -} - -int MEDCouplingFieldDiscretizationP1::getNumberOfTuples(const MEDCouplingMesh *mesh) const -{ - return mesh->getNumberOfNodes(); -} - -DataArrayDouble *MEDCouplingFieldDiscretizationP1::getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const -{ - return mesh->getCoordinatesAndOwner(); -} - -void MEDCouplingFieldDiscretizationP1::checkCompatibilityWithNature(NatureOfField nat) const throw(INTERP_KERNEL::Exception) -{ - if(nat!=ConservativeVolumic) - throw INTERP_KERNEL::Exception("Invalid nature for P1 field !"); -} - -void MEDCouplingFieldDiscretizationP1::checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArrayDouble *da) const throw(INTERP_KERNEL::Exception) -{ - if(mesh->getNumberOfNodes()!=da->getNumberOfTuples()) - { - std::ostringstream message; - message << "Field on nodes invalid because there are " << mesh->getNumberOfNodes(); - message << " cells in mesh and " << da->getNumberOfTuples() << " tuples in field !"; - throw INTERP_KERNEL::Exception(message.str().c_str()); - } -} - -MEDCouplingFieldDouble *MEDCouplingFieldDiscretizationP1::getWeightingField(const MEDCouplingMesh *mesh, bool isAbs) const -{ - return mesh->getMeasureFieldOnNode(isAbs); -} - -void MEDCouplingFieldDiscretizationP1::getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const -{ - int id=mesh->getCellContainingPoint(loc,_precision); - if(id==-1) - throw INTERP_KERNEL::Exception("Specified point is detected outside of mesh : unable to apply P1::getValueOn !"); - INTERP_KERNEL::NormalizedCellType type=mesh->getTypeOfCell(id); - if(type!=INTERP_KERNEL::NORM_SEG2 && type!=INTERP_KERNEL::NORM_TRI3 && type!=INTERP_KERNEL::NORM_TETRA4) - throw INTERP_KERNEL::Exception("P1 getValueOn is not specified for not simplex cells !"); - std::vector conn; - std::vector coo; - mesh->getNodeIdsOfCell(id,conn); - for(std::vector::const_iterator iter=conn.begin();iter!=conn.end();iter++) - mesh->getCoordinatesOfNode(*iter,coo); - int spaceDim=mesh->getSpaceDimension(); - int nbOfNodes=conn.size(); - std::vector vec(nbOfNodes); - for(int i=0;igetNumberOfComponents(); - double *tmp2=new double[sz]; - std::fill(res,res+sz,0.); - for(int i=0;igetTuple(conn[i],tmp2); - std::transform(tmp2,tmp2+sz,tmp2,std::bind2nd(std::multiplies(),tmp[i])); - std::transform(res,res+sz,tmp2,res,std::plus()); - } - delete [] tmp; - delete [] tmp2; -} - -void MEDCouplingFieldDiscretizationP1::getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const -{ - const MEDCouplingCMesh *meshC=dynamic_cast(mesh); - if(!meshC) - throw INTERP_KERNEL::Exception("P1::getValueOnPos is only accessible for structured meshes !"); - int id=meshC->getNodeIdFromPos(i,j,k); - arr->getTuple(id,res); -} - -void MEDCouplingFieldDiscretizationP1::renumberValuesOnNodes(const DataArrayInt *old2New, DataArrayDouble *arr) const -{ - int oldNbOfElems=old2New->getNbOfElems(); - const int *old2NewPtr=old2New->getConstPointer(); - int nbOfComp=arr->getNumberOfComponents(); - int newNbOfTuples=(*std::max_element(old2NewPtr,old2NewPtr+oldNbOfElems))+1; - DataArrayDouble *arrCpy=arr->deepCopy(); - const double *ptSrc=arrCpy->getConstPointer(); - arr->reAlloc(newNbOfTuples); - double *ptToFill=arr->getPointer(); - std::fill(ptToFill,ptToFill+nbOfComp*newNbOfTuples,std::numeric_limits::max()); - for(int i=0;i(),std::numeric_limits::max())) - ==ptToFill+(newNb+1)*nbOfComp) - std::copy(ptSrc+i*nbOfComp,ptSrc+(i+1)*nbOfComp,ptToFill+newNb*nbOfComp); - else - { - if(!std::equal(ptSrc+i*nbOfComp,ptSrc+(i+1)*nbOfComp,ptToFill+newNb*nbOfComp)) - { - arrCpy->decrRef(); - std::ostringstream oss; - oss << "Node " << i << " and " << std::find(old2NewPtr,old2NewPtr+i,newNb)-old2NewPtr - << " have been merged and nodal field on them are different !"; - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } - } - } - arrCpy->decrRef(); -} - -/*! - * This method invert array 'di' that is a conversion map from Old to New node numbering to New to Old node numbering. - */ -DataArrayInt *MEDCouplingFieldDiscretizationP1::invertArrayO2N2N2O(const MEDCouplingMesh *mesh, const DataArrayInt *di) -{ - DataArrayInt *ret=DataArrayInt::New(); - ret->alloc(mesh->getNumberOfNodes(),1); - int nbOfOldNodes=di->getNumberOfTuples(); - const int *old2New=di->getConstPointer(); - int *pt=ret->getPointer(); - for(int i=0;i!=nbOfOldNodes;i++) - if(old2New[i]!=-1) - pt[old2New[i]]=i; - return ret; -} - -/*! - * This method returns a submesh of 'mesh' instance constituting cell ids contained in array defined as an interval [start;end). -* @ param di is an array returned that specifies entity ids (here nodes ids) in mesh 'mesh' of entity in returned submesh. - * Example : The first node id of returned mesh has the (*di)[0] id in 'mesh' - */ -MEDCouplingMesh *MEDCouplingFieldDiscretizationP1::buildSubMeshData(const int *start, const int *end, const MEDCouplingMesh *mesh, DataArrayInt *&di) const -{ - MEDCouplingPointSet* ret=((const MEDCouplingPointSet *) mesh)->buildPartOfMySelf(start,end,true); - DataArrayInt *diInv=ret->zipCoordsTraducer(); - di=invertArrayO2N2N2O(ret,diInv); - diInv->decrRef(); - return ret; -} diff --git a/src/MEDCoupling/MEDCouplingFieldDiscretization.hxx b/src/MEDCoupling/MEDCouplingFieldDiscretization.hxx deleted file mode 100644 index 25d52f542..000000000 --- a/src/MEDCoupling/MEDCouplingFieldDiscretization.hxx +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __MEDCOUPLINGFIELDDISCRETIZATION_HXX__ -#define __MEDCOUPLINGFIELDDISCRETIZATION_HXX__ - -#include "MEDCoupling.hxx" -#include "MEDCouplingRefCountObject.hxx" -#include "InterpKernelException.hxx" -#include "MEDCouplingNatureOfField.hxx" - -namespace ParaMEDMEM -{ - class DataArrayInt; - class MEDCouplingMesh; - class DataArrayDouble; - class MEDCouplingFieldDouble; - - class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization - { - public: - static MEDCouplingFieldDiscretization *New(TypeOfField type); - double getPrecision() const { return _precision; } - void setPrecision(double val) { _precision=val; } - static TypeOfField getTypeOfFieldFromStringRepr(const char *repr) throw(INTERP_KERNEL::Exception); - virtual TypeOfField getEnum() const = 0; - virtual bool isEqual(const MEDCouplingFieldDiscretization *other) const = 0; - virtual MEDCouplingFieldDiscretization *clone() const = 0; - virtual const char *getStringRepr() const = 0; - virtual int getNumberOfTuples(const MEDCouplingMesh *mesh) const = 0; - virtual DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const = 0; - virtual void checkCompatibilityWithNature(NatureOfField nat) const throw(INTERP_KERNEL::Exception) = 0; - virtual void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArrayDouble *da) const throw(INTERP_KERNEL::Exception) = 0; - virtual MEDCouplingFieldDouble *getWeightingField(const MEDCouplingMesh *mesh, bool isAbs) const = 0; - virtual void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const = 0; - virtual void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const = 0; - virtual MEDCouplingMesh *buildSubMeshData(const int *start, const int *end, const MEDCouplingMesh *mesh, DataArrayInt *&di) const = 0; - virtual void renumberValuesOnNodes(const DataArrayInt *old2New, DataArrayDouble *arr) const = 0; - protected: - MEDCouplingFieldDiscretization(); - protected: - double _precision; - static const double DFLT_PRECISION; - }; - - class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationP0 : public MEDCouplingFieldDiscretization - { - public: - TypeOfField getEnum() const; - MEDCouplingFieldDiscretization *clone() const; - const char *getStringRepr() const; - bool isEqual(const MEDCouplingFieldDiscretization *other) const; - int getNumberOfTuples(const MEDCouplingMesh *mesh) const; - DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const; - void checkCompatibilityWithNature(NatureOfField nat) const throw(INTERP_KERNEL::Exception); - void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArrayDouble *da) const throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *getWeightingField(const MEDCouplingMesh *mesh, bool isAbs) const; - void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const; - void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const; - void renumberValuesOnNodes(const DataArrayInt *old2New, DataArrayDouble *arr) const; - MEDCouplingMesh *buildSubMeshData(const int *start, const int *end, const MEDCouplingMesh *mesh, DataArrayInt *&di) const; - public: - static const char REPR[]; - static const TypeOfField TYPE; - }; - - class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationP1 : public MEDCouplingFieldDiscretization - { - public: - TypeOfField getEnum() const; - MEDCouplingFieldDiscretization *clone() const; - const char *getStringRepr() const; - bool isEqual(const MEDCouplingFieldDiscretization *other) const; - int getNumberOfTuples(const MEDCouplingMesh *mesh) const; - DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const; - void checkCompatibilityWithNature(NatureOfField nat) const throw(INTERP_KERNEL::Exception); - void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArrayDouble *da) const throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *getWeightingField(const MEDCouplingMesh *mesh, bool isAbs) const; - void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const; - void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const; - MEDCouplingMesh *buildSubMeshData(const int *start, const int *end, const MEDCouplingMesh *mesh, DataArrayInt *&di) const; - void renumberValuesOnNodes(const DataArrayInt *old2New, DataArrayDouble *arr) const; - static DataArrayInt *invertArrayO2N2N2O(const MEDCouplingMesh *mesh, const DataArrayInt *di); - public: - static const char REPR[]; - static const TypeOfField TYPE; - }; -} - -#endif diff --git a/src/MEDCoupling/MEDCouplingMemArray.cxx b/src/MEDCoupling/MEDCouplingMemArray.cxx deleted file mode 100644 index 3456e329b..000000000 --- a/src/MEDCoupling/MEDCouplingMemArray.cxx +++ /dev/null @@ -1,389 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "MEDCouplingMemArray.txx" - -#include - -using namespace ParaMEDMEM; - -void DataArray::setName(const char *name) -{ - _name=name; -} - -void DataArray::copyStringInfoFrom(const DataArray& other) throw(INTERP_KERNEL::Exception) -{ - if(_info_on_compo.size()!=other._info_on_compo.size()) - throw INTERP_KERNEL::Exception("Size of arrays mismatches on copyStringInfoFrom !"); - _name=other._name; - _info_on_compo=other._info_on_compo; -} - -bool DataArray::areInfoEquals(const DataArray& other) const -{ - if(_nb_of_tuples!=other._nb_of_tuples) - return false; - if(_name!=other._name) - return false; - return _info_on_compo==other._info_on_compo; -} - -DataArrayDouble *DataArrayDouble::New() -{ - return new DataArrayDouble; -} - -DataArrayDouble *DataArrayDouble::deepCopy() const -{ - return new DataArrayDouble(*this); -} - -DataArrayDouble *DataArrayDouble::performCpy(bool deepCpy) const -{ - if(deepCpy) - return deepCopy(); - else - { - incrRef(); - return const_cast(this); - } -} - -void DataArrayDouble::alloc(int nbOfTuple, int nbOfCompo) -{ - _nb_of_tuples=nbOfTuple; - _info_on_compo.resize(nbOfCompo); - _mem.alloc(nbOfCompo*_nb_of_tuples); - declareAsNew(); -} - -bool DataArrayDouble::isEqual(const DataArrayDouble& other, double prec) const -{ - if(!areInfoEquals(other)) - return false; - return _mem.isEqual(other._mem,prec); -} - -void DataArrayDouble::reAlloc(int nbOfTuples) -{ - _mem.reAlloc(_info_on_compo.size()*nbOfTuples); - _nb_of_tuples=nbOfTuples; - declareAsNew(); -} - -void DataArrayDouble::setArrayIn(DataArrayDouble *newArray, DataArrayDouble* &arrayToSet) -{ - if(newArray!=arrayToSet) - { - if(arrayToSet) - arrayToSet->decrRef(); - arrayToSet=newArray; - if(arrayToSet) - arrayToSet->incrRef(); - } -} - -void DataArrayDouble::useArray(const double *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo) -{ - _nb_of_tuples=nbOfTuple; - _info_on_compo.resize(nbOfCompo); - _mem.useArray(array,ownership,type,nbOfTuple*nbOfCompo); - declareAsNew(); -} - -void DataArrayDouble::checkNoNullValues() const throw(INTERP_KERNEL::Exception) -{ - const double *tmp=getConstPointer(); - int nbOfElems=getNbOfElems(); - const double *where=std::find(tmp,tmp+nbOfElems,0.); - if(where!=tmp+nbOfElems) - throw INTERP_KERNEL::Exception("A value 0.0 have been detected !"); -} - -DataArrayDouble *DataArrayDouble::aggregate(const DataArrayDouble *a1, const DataArrayDouble *a2) -{ - int nbOfComp=a1->getNumberOfComponents(); - if(nbOfComp!=a2->getNumberOfComponents()) - throw INTERP_KERNEL::Exception("Nb of components mismatch for array aggregation !"); - int nbOfTuple1=a1->getNumberOfTuples(); - int nbOfTuple2=a2->getNumberOfTuples(); - DataArrayDouble *ret=DataArrayDouble::New(); - ret->alloc(nbOfTuple1+nbOfTuple2,nbOfComp); - double *pt=std::copy(a1->getConstPointer(),a1->getConstPointer()+nbOfTuple1*nbOfComp,ret->getPointer()); - std::copy(a2->getConstPointer(),a2->getConstPointer()+nbOfTuple2*nbOfComp,pt); - ret->copyStringInfoFrom(*a1); - return ret; -} - -DataArrayDouble *DataArrayDouble::add(const DataArrayDouble *a1, const DataArrayDouble *a2) -{ - int nbOfComp=a1->getNumberOfComponents(); - if(nbOfComp!=a2->getNumberOfComponents()) - throw INTERP_KERNEL::Exception("Nb of components mismatch for array add !"); - int nbOfTuple=a1->getNumberOfTuples(); - if(nbOfTuple!=a2->getNumberOfTuples()) - throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array add !"); - DataArrayDouble *ret=DataArrayDouble::New(); - ret->alloc(nbOfTuple,nbOfComp); - std::transform(a1->getConstPointer(),a1->getConstPointer()+nbOfTuple*nbOfComp,a2->getConstPointer(),ret->getPointer(),std::plus()); - ret->copyStringInfoFrom(*a1); - return ret; -} - -void DataArrayDouble::addEqual(const DataArrayDouble *other) -{ - int nbOfComp=getNumberOfComponents(); - if(nbOfComp!=other->getNumberOfComponents()) - throw INTERP_KERNEL::Exception("Nb of components mismatch for array add !"); - int nbOfTuple=getNumberOfTuples(); - if(nbOfTuple!=other->getNumberOfTuples()) - throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array add !"); - std::transform(getConstPointer(),getConstPointer()+nbOfTuple*nbOfComp,other->getConstPointer(),getPointer(),std::plus()); - declareAsNew(); -} - -DataArrayDouble *DataArrayDouble::substract(const DataArrayDouble *a1, const DataArrayDouble *a2) -{ - int nbOfComp=a1->getNumberOfComponents(); - if(nbOfComp!=a2->getNumberOfComponents()) - throw INTERP_KERNEL::Exception("Nb of components mismatch for array substract !"); - int nbOfTuple=a1->getNumberOfTuples(); - if(nbOfTuple!=a2->getNumberOfTuples()) - throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array substract !"); - DataArrayDouble *ret=DataArrayDouble::New(); - ret->alloc(nbOfTuple,nbOfComp); - std::transform(a1->getConstPointer(),a1->getConstPointer()+nbOfTuple*nbOfComp,a2->getConstPointer(),ret->getPointer(),std::minus()); - ret->copyStringInfoFrom(*a1); - return ret; -} - -void DataArrayDouble::substractEqual(const DataArrayDouble *other) -{ - int nbOfComp=getNumberOfComponents(); - if(nbOfComp!=other->getNumberOfComponents()) - throw INTERP_KERNEL::Exception("Nb of components mismatch for array substract !"); - int nbOfTuple=getNumberOfTuples(); - if(nbOfTuple!=other->getNumberOfTuples()) - throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array substract !"); - std::transform(getConstPointer(),getConstPointer()+nbOfTuple*nbOfComp,other->getConstPointer(),getPointer(),std::minus()); - declareAsNew(); -} - -DataArrayDouble *DataArrayDouble::multiply(const DataArrayDouble *a1, const DataArrayDouble *a2) -{ - int nbOfTuple=a1->getNumberOfTuples(); - int nbOfTuple2=a2->getNumberOfTuples(); - int nbOfComp=a1->getNumberOfComponents(); - int nbOfComp2=a2->getNumberOfComponents(); - if(nbOfTuple!=nbOfTuple2) - throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array multiply !"); - DataArrayDouble *ret=0; - if(nbOfComp==nbOfComp2) - { - ret=DataArrayDouble::New(); - ret->alloc(nbOfTuple,nbOfComp); - std::transform(a1->getConstPointer(),a1->getConstPointer()+nbOfTuple*nbOfComp,a2->getConstPointer(),ret->getPointer(),std::multiplies()); - ret->copyStringInfoFrom(*a1); - } - else - { - int nbOfCompMin,nbOfCompMax; - const DataArrayDouble *aMin, *aMax; - if(nbOfComp>nbOfComp2) - { - nbOfCompMin=nbOfComp2; nbOfCompMax=nbOfComp; - aMin=a2; aMax=a1; - } - else - { - nbOfCompMin=nbOfComp; nbOfCompMax=nbOfComp2; - aMin=a1; aMax=a2; - } - if(nbOfCompMin==1) - { - ret=DataArrayDouble::New(); - ret->alloc(nbOfTuple,nbOfCompMax); - const double *aMinPtr=aMin->getConstPointer(); - const double *aMaxPtr=aMax->getConstPointer(); - double *res=ret->getPointer(); - for(int i=0;i(),aMinPtr[i])); - ret->copyStringInfoFrom(*aMax); - } - else - throw INTERP_KERNEL::Exception("Nb of components mismatch for array multiply !"); - } - return ret; -} - -void DataArrayDouble::multiplyEqual(const DataArrayDouble *other) -{ - int nbOfTuple=getNumberOfTuples(); - int nbOfTuple2=other->getNumberOfTuples(); - int nbOfComp=getNumberOfComponents(); - int nbOfComp2=other->getNumberOfComponents(); - if(nbOfTuple!=nbOfTuple2) - throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array multiplyEqual !"); - DataArrayDouble *ret=0; - if(nbOfComp==nbOfComp2) - { - ret=DataArrayDouble::New(); - ret->alloc(nbOfTuple,nbOfComp); - std::transform(getConstPointer(),getConstPointer()+nbOfTuple*nbOfComp,other->getConstPointer(),getPointer(),std::multiplies()); - } - else - { - if(nbOfComp2==1) - { - const double *ptr=other->getConstPointer(); - double *myPtr=getPointer(); - for(int i=0;i(),ptr[i])); - } - else - throw INTERP_KERNEL::Exception("Nb of components mismatch for array multiplyEqual !"); - } - declareAsNew(); -} - -DataArrayDouble *DataArrayDouble::divide(const DataArrayDouble *a1, const DataArrayDouble *a2) -{ - int nbOfComp=a1->getNumberOfComponents(); - if(nbOfComp!=a2->getNumberOfComponents()) - throw INTERP_KERNEL::Exception("Nb of components mismatch for array divide !"); - int nbOfTuple=a1->getNumberOfTuples(); - if(nbOfTuple!=a2->getNumberOfTuples()) - throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array divide !"); - DataArrayDouble *ret=DataArrayDouble::New(); - ret->alloc(nbOfTuple,nbOfComp); - std::transform(a1->getConstPointer(),a1->getConstPointer()+nbOfTuple*nbOfComp,a2->getConstPointer(),ret->getPointer(),std::divides()); - ret->copyStringInfoFrom(*a1); - return ret; -} - -void DataArrayDouble::divideEqual(const DataArrayDouble *other) -{ - int nbOfComp=getNumberOfComponents(); - if(nbOfComp!=other->getNumberOfComponents()) - throw INTERP_KERNEL::Exception("Nb of components mismatch for array divideEqual !"); - int nbOfTuple=getNumberOfTuples(); - if(nbOfTuple!=other->getNumberOfTuples()) - throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array divideEqual !"); - std::transform(getConstPointer(),getConstPointer()+nbOfTuple*nbOfComp,other->getConstPointer(),getPointer(),std::divides()); - declareAsNew(); -} - -DataArrayInt *DataArrayInt::New() -{ - return new DataArrayInt; -} - -DataArrayInt *DataArrayInt::deepCopy() const -{ - return new DataArrayInt(*this); -} - -DataArrayInt *DataArrayInt::performCpy(bool deepCpy) const -{ - if(deepCpy) - return deepCopy(); - else - { - incrRef(); - return const_cast(this); - } -} - -void DataArrayInt::alloc(int nbOfTuple, int nbOfCompo) -{ - _nb_of_tuples=nbOfTuple; - _info_on_compo.resize(nbOfCompo); - _mem.alloc(nbOfCompo*_nb_of_tuples); - declareAsNew(); -} - -bool DataArrayInt::isEqual(const DataArrayInt& other) const -{ - if(!areInfoEquals(other)) - return false; - return _mem.isEqual(other._mem,0); -} - -void DataArrayInt::useArray(const int *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo) -{ - _nb_of_tuples=nbOfTuple; - _info_on_compo.resize(nbOfCompo); - _mem.useArray(array,ownership,type,nbOfTuple*nbOfCompo); - declareAsNew(); -} - -void DataArrayInt::reAlloc(int nbOfTuples) -{ - _mem.reAlloc(_info_on_compo.size()*nbOfTuples); - _nb_of_tuples=nbOfTuples; - declareAsNew(); -} - -void DataArrayInt::setArrayIn(DataArrayInt *newArray, DataArrayInt* &arrayToSet) -{ - if(newArray!=arrayToSet) - { - if(arrayToSet) - arrayToSet->decrRef(); - arrayToSet=newArray; - if(arrayToSet) - arrayToSet->incrRef(); - } -} - -DataArrayInt *DataArrayInt::aggregate(const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2) -{ - int nbOfComp=a1->getNumberOfComponents(); - if(nbOfComp!=a2->getNumberOfComponents()) - throw INTERP_KERNEL::Exception("Nb of components mismatch for array aggregation !"); - int nbOfTuple1=a1->getNumberOfTuples(); - int nbOfTuple2=a2->getNumberOfTuples(); - DataArrayInt *ret=DataArrayInt::New(); - ret->alloc(nbOfTuple1+nbOfTuple2-offsetA2,nbOfComp); - int *pt=std::copy(a1->getConstPointer(),a1->getConstPointer()+nbOfTuple1*nbOfComp,ret->getPointer()); - std::copy(a2->getConstPointer()+offsetA2*nbOfComp,a2->getConstPointer()+nbOfTuple2*nbOfComp,pt); - ret->copyStringInfoFrom(*a1); - return ret; -} - -int *DataArrayInt::checkAndPreparePermutation(const int *start, const int *end) -{ - int sz=std::distance(start,end); - int *ret=new int[sz]; - int *work=new int[sz]; - std::copy(start,end,work); - std::sort(work,work+sz); - if(std::unique(work,work+sz)!=work+sz) - { - delete [] work; - delete [] ret; - throw INTERP_KERNEL::Exception("Some elements are equals in the specified array !"); - } - int *iter2=ret; - for(const int *iter=start;iter!=end;iter++,iter2++) - *iter2=std::distance(work,std::find(work,work+sz,*iter)); - delete [] work; - return ret; -} diff --git a/src/MEDCoupling/MEDCouplingMemArray.hxx b/src/MEDCoupling/MEDCouplingMemArray.hxx deleted file mode 100644 index 74d165bb9..000000000 --- a/src/MEDCoupling/MEDCouplingMemArray.hxx +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __PARAMEDMEM_MEDCOUPLINGMEMARRAY_HXX__ -#define __PARAMEDMEM_MEDCOUPLINGMEMARRAY_HXX__ - -#include "MEDCoupling.hxx" -#include "MEDCouplingTimeLabel.hxx" -#include "MEDCouplingRefCountObject.hxx" -#include "InterpKernelException.hxx" - -#include -#include - -namespace ParaMEDMEM -{ - template - class MEDCouplingPointer - { - public: - MEDCouplingPointer():_internal(0),_external(0) { } - void null() { _internal=0; _external=0; } - bool isNull() const { return _internal==0 && _external==0; } - void setInternal(T *pointer); - void setExternal(const T *pointer); - const T *getConstPointer() const { if(_internal) return _internal; else return _external; } - const T *getConstPointerLoc(int offset) const { if(_internal) return _internal+offset; else return _external+offset; } - T *getPointer() const { if(_internal) return _internal; if(_external) throw INTERP_KERNEL::Exception("Trying to write on an external pointer."); else return 0; } - private: - T *_internal; - const T *_external; - }; - - template - class MemArray - { - public: - MemArray():_nb_of_elem(-1),_ownership(false),_dealloc(CPP_DEALLOC) { } - MemArray(const MemArray& other); - const T *getConstPointerLoc(int offset) const { return _pointer.getConstPointerLoc(offset); } - const T *getConstPointer() const { return _pointer.getConstPointer(); } - T *getPointer() const { return _pointer.getPointer(); } - MemArray &operator=(const MemArray& other); - T operator[](int id) const { return _pointer.getConstPointer()[id]; } - T& operator[](int id) { return _pointer.getPointer()[id]; } - bool isEqual(const MemArray& other, T prec) const; - void alloc(int nbOfElements); - void reAlloc(int newNbOfElements); - void useArray(const T *array, bool ownership, DeallocType type, int nbOfElem); - void writeOnPlace(int id, T element0, const T *others, int sizeOfOthers); - ~MemArray() { destroy(); } - private: - void destroy(); - static void destroyPointer(T *pt, DeallocType type); - private: - int _nb_of_elem; - bool _ownership; - MEDCouplingPointer _pointer; - //T *_pointer; - DeallocType _dealloc; - }; - - class DataArray : public RefCountObject, public TimeLabel - { - public: - MEDCOUPLING_EXPORT void setName(const char *name); - MEDCOUPLING_EXPORT void copyStringInfoFrom(const DataArray& other) throw(INTERP_KERNEL::Exception); - MEDCOUPLING_EXPORT bool areInfoEquals(const DataArray& other) const; - MEDCOUPLING_EXPORT std::string getName() const { return _name; } - MEDCOUPLING_EXPORT std::string getInfoOnComponent(int i) const { return _info_on_compo[i]; } - MEDCOUPLING_EXPORT void setInfoOnComponent(int i, const char *info) { _info_on_compo[i]=info; } - MEDCOUPLING_EXPORT int getNumberOfComponents() const { return _info_on_compo.size(); } - MEDCOUPLING_EXPORT int getNumberOfTuples() const { return _nb_of_tuples; } - MEDCOUPLING_EXPORT int getNbOfElems() const { return _info_on_compo.size()*_nb_of_tuples; } - protected: - DataArray():_nb_of_tuples(-1) { } - protected: - int _nb_of_tuples; - std::string _name; - std::vector _info_on_compo; - }; -} - -#include "MEDCouplingMemArray.txx" - -namespace ParaMEDMEM -{ - class DataArrayDouble : public DataArray - { - public: - MEDCOUPLING_EXPORT static DataArrayDouble *New(); - MEDCOUPLING_EXPORT DataArrayDouble *deepCopy() const; - MEDCOUPLING_EXPORT DataArrayDouble *performCpy(bool deepCpy) const; - MEDCOUPLING_EXPORT void alloc(int nbOfTuple, int nbOfCompo); - MEDCOUPLING_EXPORT bool isEqual(const DataArrayDouble& other, double prec) const; - //!alloc or useArray should have been called before. - MEDCOUPLING_EXPORT void reAlloc(int nbOfTuples); - MEDCOUPLING_EXPORT void getTuple(int tupleId, double *res) const { std::copy(_mem.getConstPointerLoc(tupleId*_info_on_compo.size()),_mem.getConstPointerLoc((tupleId+1)*_info_on_compo.size()),res); } - MEDCOUPLING_EXPORT double getIJ(int tupleId, int compoId) const { return _mem[tupleId*_info_on_compo.size()+compoId]; } - MEDCOUPLING_EXPORT void setIJ(int tupleId, int compoId, double newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; } - MEDCOUPLING_EXPORT double *getPointer() const { return _mem.getPointer(); } - MEDCOUPLING_EXPORT static void setArrayIn(DataArrayDouble *newArray, DataArrayDouble* &arrayToSet); - MEDCOUPLING_EXPORT const double *getConstPointer() const { return _mem.getConstPointer(); } - MEDCOUPLING_EXPORT void useArray(const double *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo); - MEDCOUPLING_EXPORT void writeOnPlace(int id, double element0, const double *others, int sizeOfOthers) { _mem.writeOnPlace(id,element0,others,sizeOfOthers); } - MEDCOUPLING_EXPORT void checkNoNullValues() const throw(INTERP_KERNEL::Exception); - MEDCOUPLING_EXPORT static DataArrayDouble *aggregate(const DataArrayDouble *a1, const DataArrayDouble *a2); - MEDCOUPLING_EXPORT static DataArrayDouble *add(const DataArrayDouble *a1, const DataArrayDouble *a2); - MEDCOUPLING_EXPORT void addEqual(const DataArrayDouble *other); - MEDCOUPLING_EXPORT static DataArrayDouble *substract(const DataArrayDouble *a1, const DataArrayDouble *a2); - MEDCOUPLING_EXPORT void substractEqual(const DataArrayDouble *other); - MEDCOUPLING_EXPORT static DataArrayDouble *multiply(const DataArrayDouble *a1, const DataArrayDouble *a2); - MEDCOUPLING_EXPORT void multiplyEqual(const DataArrayDouble *other); - MEDCOUPLING_EXPORT static DataArrayDouble *divide(const DataArrayDouble *a1, const DataArrayDouble *a2); - MEDCOUPLING_EXPORT void divideEqual(const DataArrayDouble *other); - //! nothing to do here because this class does not aggregate any TimeLabel instance. - MEDCOUPLING_EXPORT void updateTime() { } - private: - DataArrayDouble() { } - private: - MemArray _mem; - }; - - class DataArrayInt : public DataArray - { - public: - MEDCOUPLING_EXPORT static DataArrayInt *New(); - MEDCOUPLING_EXPORT DataArrayInt *deepCopy() const; - MEDCOUPLING_EXPORT DataArrayInt *performCpy(bool deepCpy) const; - MEDCOUPLING_EXPORT void alloc(int nbOfTuple, int nbOfCompo); - MEDCOUPLING_EXPORT bool isEqual(const DataArrayInt& other) const; - //!alloc or useArray should have been called before. - MEDCOUPLING_EXPORT void reAlloc(int nbOfTuples); - MEDCOUPLING_EXPORT void getTuple(int tupleId, int *res) const { std::copy(_mem.getConstPointerLoc(tupleId*_info_on_compo.size()),_mem.getConstPointerLoc((tupleId+1)*_info_on_compo.size()),res); } - MEDCOUPLING_EXPORT int getIJ(int tupleId, int compoId) const { return _mem[tupleId*_info_on_compo.size()+compoId]; } - MEDCOUPLING_EXPORT void setIJ(int tupleId, int compoId, int newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; } - MEDCOUPLING_EXPORT int *getPointer() const { return _mem.getPointer(); } - MEDCOUPLING_EXPORT static void setArrayIn(DataArrayInt *newArray, DataArrayInt* &arrayToSet); - MEDCOUPLING_EXPORT const int *getConstPointer() const { return _mem.getConstPointer(); } - MEDCOUPLING_EXPORT static DataArrayInt *aggregate(const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2); - MEDCOUPLING_EXPORT void useArray(const int *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo); - MEDCOUPLING_EXPORT void writeOnPlace(int id, int element0, const int *others, int sizeOfOthers) { _mem.writeOnPlace(id,element0,others,sizeOfOthers); } - //! nothing to do here because this class does not aggregate any TimeLabel instance. - MEDCOUPLING_EXPORT void updateTime() { } - public: - MEDCOUPLING_EXPORT static int *checkAndPreparePermutation(const int *start, const int *end); - private: - DataArrayInt() { } - private: - MemArray _mem; - }; -} - -#endif diff --git a/src/MEDCoupling/MEDCouplingMesh.cxx b/src/MEDCoupling/MEDCouplingMesh.cxx deleted file mode 100644 index a552ea588..000000000 --- a/src/MEDCoupling/MEDCouplingMesh.cxx +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "MEDCouplingMesh.hxx" -#include "MEDCouplingMemArray.hxx" -#include "MEDCouplingFieldDouble.hxx" -#include "MEDCouplingFieldDiscretization.hxx" - -#include "InterpKernelExprParser.hxx" - -#include -#include - -using namespace ParaMEDMEM; - -bool MEDCouplingMesh::areCompatible(const MEDCouplingMesh *other) const -{ - if(getMeshDimension()!=other->getMeshDimension()) - return false; - if(getSpaceDimension()!=other->getSpaceDimension()) - return false; - return true; -} - -/*! - * This method builds a field lying on 'this' with 'nbOfComp' components. - * 'func' is a pointer that points to a function that takes 2 arrays in parameter and returns a boolean. - * The first array is a in-param of size this->getSpaceDimension and the second an out param of size 'nbOfComp'. - * The return field will have type specified by 't'. 't' is also used to determine where values of field will be - * evaluate. - * @param t type of field returned and specifies where the evaluation of func will be done. - * @param nbOfComp number of components of returned field. - * @param func pointer to a function that should return false if the evaluation failed. (division by 0. for example) - * @return field with counter = 1. - */ -MEDCouplingFieldDouble *MEDCouplingMesh::fillFromAnalytic(TypeOfField t, int nbOfComp, FunctionToEvaluate func) const -{ - MEDCouplingFieldDouble *ret=MEDCouplingFieldDouble::New(t); - ret->setMesh(this); - DataArrayDouble *loc=ret->getDiscretization()->getLocalizationOfDiscValues(this); - DataArrayDouble *array=DataArrayDouble::New(); - int nbOfTuple=loc->getNumberOfTuples(); - int nbCompIn=loc->getNumberOfComponents(); - const double *locPtr=loc->getConstPointer(); - array->alloc(nbOfTuple,nbOfComp); - double *ptToFill=array->getPointer(); - for(int i=0;i(oss,", ")); - oss << ") : Evaluation of function failed !"; - loc->decrRef(); - array->decrRef(); - ret->decrRef(); - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } - ptToFill+=nbOfComp; - } - loc->decrRef(); - ret->setArray(array); - array->decrRef(); - return ret; -} - -/*! - * This method builds a field lying on 'this' with 'nbOfComp' components. - * 'func' is a string that is the expression to evaluate. - * The return field will have type specified by 't'. 't' is also used to determine where values of field will be - * evaluate. - * @param t type of field returned and specifies where the evaluation of func will be done. - * @param nbOfComp number of components of returned field. - * @param func expression. - * @return field with counter = 1. - */ -MEDCouplingFieldDouble *MEDCouplingMesh::fillFromAnalytic(TypeOfField t, int nbOfComp, const char *func) const -{ - INTERP_KERNEL::ExprParser expr(func); - expr.parse(); - std::set vars; - expr.getTrueSetOfVars(vars); - if((int)vars.size()>getSpaceDimension()) - { - std::ostringstream oss; oss << "The mesh has a spaceDim==" << getSpaceDimension() << " and there are "; - oss << vars.size() << " variables : "; - std::copy(vars.begin(),vars.end(),std::ostream_iterator(oss," ")); - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } - std::vector varsV(vars.begin(),vars.end()); - expr.prepareExprEvaluation(varsV); - // - MEDCouplingFieldDouble *ret=MEDCouplingFieldDouble::New(t); - ret->setMesh(this); - DataArrayDouble *loc=ret->getDiscretization()->getLocalizationOfDiscValues(this); - DataArrayDouble *array=DataArrayDouble::New(); - int nbOfTuple=loc->getNumberOfTuples(); - int nbCompIn=loc->getNumberOfComponents(); - const double *locPtr=loc->getConstPointer(); - array->alloc(nbOfTuple,nbOfComp); - double *ptToFill=array->getPointer(); - for(int i=0;i(oss,", ")); - oss << ") : Evaluation of function failed ! " << e.what(); - loc->decrRef(); - array->decrRef(); - ret->decrRef(); - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } - ptToFill+=nbOfComp; - } - loc->decrRef(); - ret->setArray(array); - array->decrRef(); - return ret; -} - -/*! - * retruns a newly created mesh with counter=1 - * that is the union of mesh1 and mesh2 if possible. The cells of mesh2 will appear after cells of 'mesh1'. Idem for nodes. - */ -MEDCouplingMesh *MEDCouplingMesh::mergeMeshes(const MEDCouplingMesh *mesh1, const MEDCouplingMesh *mesh2) -{ - return mesh1->mergeMyselfWith(mesh2); -} diff --git a/src/MEDCoupling/MEDCouplingNatureOfField.hxx b/src/MEDCoupling/MEDCouplingNatureOfField.hxx deleted file mode 100644 index bdc1c78dd..000000000 --- a/src/MEDCoupling/MEDCouplingNatureOfField.hxx +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __MEDCOUPLINGNATUREOFFIELD_HXX__ -#define __MEDCOUPLINGNATUREOFFIELD_HXX__ - -namespace ParaMEDMEM -{ - typedef enum - { - NoNature = 17, - ConservativeVolumic = 26, - Integral = 32, - IntegralGlobConstraint = 35, - RevIntegral = 37 - } NatureOfField; -} - -#endif diff --git a/src/MEDCoupling/MEDCouplingNormalizedCartesianMesh.hxx b/src/MEDCoupling/MEDCouplingNormalizedCartesianMesh.hxx deleted file mode 100644 index ebb12e01a..000000000 --- a/src/MEDCoupling/MEDCouplingNormalizedCartesianMesh.hxx +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __MEDCouplingNormalizedCartesianMesh_HXX__ -#define __MEDCouplingNormalizedCartesianMesh_HXX__ - -#include "NormalizedUnstructuredMesh.hxx" - -namespace ParaMEDMEM -{ - class MEDCouplingCMesh; -} - -template -class MEDCouplingNormalizedCartesianMesh : public INTERP_KERNEL::GenericMesh -{ -public: - static const int MY_SPACEDIM=SPACEDIM; - static const int MY_MESHDIM=SPACEDIM; - typedef int MyConnType; - static const INTERP_KERNEL::NumberingPolicy My_numPol=INTERP_KERNEL::ALL_C_MODE; -public: - MEDCouplingNormalizedCartesianMesh(ParaMEDMEM::MEDCouplingCMesh *mesh); - //void getBoundingBox(double *boundingBox) const; - //INTERP_KERNEL::NormalizedCellType getTypeOfElement(int eltId) const; - //unsigned char getNumberOfNodesOfElement(int eltId) const; - //unsigned long getNumberOfNodes() const; - unsigned long getNumberOfElements() const; - unsigned long nbCellsAlongAxis(int axis) const; - const double * getCoordsAlongAxis(int axis) const; - ~MEDCouplingNormalizedCartesianMesh(); -private: - ParaMEDMEM::MEDCouplingCMesh *_mesh; -}; - -#endif diff --git a/src/MEDCoupling/MEDCouplingNormalizedCartesianMesh.txx b/src/MEDCoupling/MEDCouplingNormalizedCartesianMesh.txx deleted file mode 100644 index 468eea71a..000000000 --- a/src/MEDCoupling/MEDCouplingNormalizedCartesianMesh.txx +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : MEDCouplingNormalizedCartesianMesh.txx -// Created : Mon Aug 17 12:00:38 2009 -// Author : Edward AGAPOV (eap) -// - -#include "MEDCouplingNormalizedCartesianMesh.hxx" -#include "MEDCouplingCMesh.hxx" - -template -MEDCouplingNormalizedCartesianMesh::MEDCouplingNormalizedCartesianMesh(ParaMEDMEM::MEDCouplingCMesh *mesh):_mesh(mesh) -{ - if(_mesh) - _mesh->incrRef(); -} - -template -MEDCouplingNormalizedCartesianMesh::~MEDCouplingNormalizedCartesianMesh() -{ - if(_mesh) - _mesh->decrRef(); -} - -template -unsigned long MEDCouplingNormalizedCartesianMesh::getNumberOfElements() const -{ - return _mesh->getNumberOfCells(); -} - -template -unsigned long MEDCouplingNormalizedCartesianMesh::nbCellsAlongAxis(int axis) const -{ - return _mesh->getCoordsAt(axis)->getNumberOfTuples() - 1; -} - -template -const double * MEDCouplingNormalizedCartesianMesh::getCoordsAlongAxis(int axis) const -{ - return _mesh->getCoordsAt(axis)->getConstPointer(); -} diff --git a/src/MEDCoupling/MEDCouplingPointSet.cxx b/src/MEDCoupling/MEDCouplingPointSet.cxx deleted file mode 100644 index 0c0ce1887..000000000 --- a/src/MEDCoupling/MEDCouplingPointSet.cxx +++ /dev/null @@ -1,715 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "MEDCouplingPointSet.hxx" -#include "MEDCouplingUMesh.hxx" -#include "MEDCouplingUMeshDesc.hxx" -#include "MEDCouplingMemArray.hxx" -#include "MEDCouplingPointSet.txx" -#include "PlanarIntersector.txx" -#include "InterpKernelGeo2DQuadraticPolygon.hxx" -#include "InterpKernelGeo2DNode.hxx" -#include "DirectedBoundingBox.hxx" - -#include -#include -#include - -using namespace ParaMEDMEM; - -MEDCouplingPointSet::MEDCouplingPointSet():_coords(0) -{ -} - -MEDCouplingPointSet::MEDCouplingPointSet(const MEDCouplingPointSet& other, bool deepCpy):MEDCouplingMesh(other),_coords(0) -{ - if(other._coords) - _coords=other._coords->performCpy(deepCpy); -} - -MEDCouplingPointSet::~MEDCouplingPointSet() -{ - if(_coords) - _coords->decrRef(); -} - -int MEDCouplingPointSet::getNumberOfNodes() const -{ - if(_coords) - return _coords->getNumberOfTuples(); - else - throw INTERP_KERNEL::Exception("Unable to get number of nodes because no coordinates specified !"); -} - -int MEDCouplingPointSet::getSpaceDimension() const -{ - if(_coords) - return _coords->getNumberOfComponents(); - else - throw INTERP_KERNEL::Exception("Unable to get space dimension because no coordinates specified !"); -} - -void MEDCouplingPointSet::updateTime() -{ - if(_coords) - { - updateTimeWith(*_coords); - } -} - -bool MEDCouplingPointSet::isStructured() const -{ - return false; -} - -void MEDCouplingPointSet::setCoords(DataArrayDouble *coords) -{ - if( coords != _coords ) - { - if (_coords) - _coords->decrRef(); - _coords=coords; - if(_coords) - _coords->incrRef(); - declareAsNew(); - } -} - -DataArrayDouble *MEDCouplingPointSet::getCoordinatesAndOwner() const -{ - if(_coords) - _coords->incrRef(); - return _coords; -} - -bool MEDCouplingPointSet::isEqual(const MEDCouplingMesh *other, double prec) const -{ - const MEDCouplingPointSet *otherC=dynamic_cast(other); - if(!otherC) - return false; - if(!MEDCouplingMesh::isEqual(other,prec)) - return false; - if(!areCoordsEqual(*otherC,prec)) - return false; - return true; -} - -bool MEDCouplingPointSet::areCoordsEqual(const MEDCouplingPointSet& other, double prec) const -{ - if(_coords==0 && other._coords==0) - return true; - if(_coords==0 || other._coords==0) - return false; - if(_coords==other._coords) - return true; - return _coords->isEqual(*other._coords,prec); -} - -/*! - * This methods searches for each node n1 nodes in _coords that are less far than 'prec' from n1. if any these nodes are stored in params - * comm and commIndex. - * @param comm out parameter (not inout) - * @param commIndex out parameter (not inout) - */ -void MEDCouplingPointSet::findCommonNodes(DataArrayInt *&comm, DataArrayInt *&commIndex, double prec) const -{ - comm=DataArrayInt::New(); - commIndex=DataArrayInt::New(); - // - int nbNodesOld=getNumberOfNodes(); - int spaceDim=getSpaceDimension(); - std::vector bbox(2*nbNodesOld*spaceDim); - const double *coordsPtr=_coords->getConstPointer(); - for(int i=0;i c,cI(1); - switch(spaceDim) - { - case 3: - findCommonNodesAlg<3>(bbox,nbNodesOld,prec,c,cI); - break; - case 2: - findCommonNodesAlg<2>(bbox,nbNodesOld,prec,c,cI); - break; - case 1: - findCommonNodesAlg<1>(bbox,nbNodesOld,prec,c,cI); - break; - default: - throw INTERP_KERNEL::Exception("Unexpected spacedim of coords. Must be 1,2 or 3."); - } - commIndex->alloc(cI.size(),1); - std::copy(cI.begin(),cI.end(),commIndex->getPointer()); - comm->alloc(cI.back(),1); - std::copy(c.begin(),c.end(),comm->getPointer()); -} - -/*! - * @param comm in param in the same format than one returned by findCommonNodes method. - * @param commI in param in the same format than one returned by findCommonNodes method. - * @return the old to new correspondance array. - */ -DataArrayInt *MEDCouplingPointSet::buildNewNumberingFromCommNodesFrmt(const DataArrayInt *comm, const DataArrayInt *commIndex, - int& newNbOfNodes) const -{ - DataArrayInt *ret=DataArrayInt::New(); - int nbNodesOld=getNumberOfNodes(); - ret->alloc(nbNodesOld,1); - std::fill(ret->getPointer(),ret->getPointer()+nbNodesOld,-1); - int *retPtr=ret->getPointer(); - std::vector commRemain(comm->getConstPointer(),comm->getConstPointer()+comm->getNumberOfTuples()); - std::vector commIRemain(commIndex->getConstPointer(),commIndex->getConstPointer()+commIndex->getNumberOfTuples()); - int newNb=0; - for(int iNode=0;iNode::const_iterator iNode2=commRemain.begin(); - iNode2!=commRemain.begin()+commIRemain[1];iNode2++) - retPtr[*iNode2]=newNb; - int delta=commIRemain[1]; - commRemain.erase(commRemain.begin(),commRemain.begin()+commIRemain[1]); - commIRemain.erase(commIRemain.begin()); - std::transform(commIRemain.begin(),commIRemain.end(),commIRemain.begin(),std::bind2nd(std::minus(),delta)); - } - newNb++; - } - newNbOfNodes=newNb; - return ret; -} - -/* - * This method renumber 'this' using 'newNodeNumbers' array of size this->getNumberOfNodes. - * newNbOfNodes specifies the *std::max_element(newNodeNumbers,newNodeNumbers+this->getNumberOfNodes()) - * This value is asked because often known by the caller of this method. - * @param newNodeNumbers array specifying the new numbering. - * @param newNbOfNodes the new number of nodes. - */ -void MEDCouplingPointSet::renumberNodes(const int *newNodeNumbers, int newNbOfNodes) -{ - DataArrayDouble *newCoords=DataArrayDouble::New(); - int spaceDim=getSpaceDimension(); - newCoords->alloc(newNbOfNodes,spaceDim); - newCoords->copyStringInfoFrom(*_coords); - int oldNbOfNodes=getNumberOfNodes(); - double *ptToFill=newCoords->getPointer(); - const double *oldCoordsPtr=_coords->getConstPointer(); - for(int i=0;idecrRef(); -} - -/*! - * This method fills bbox params like that : bbox[0]=XMin, bbox[1]=XMax, bbox[2]=YMin... - * The returned bounding box is arranged along trihedron. - * @param bbox out array of size 2*this->getSpaceDimension(). - */ -void MEDCouplingPointSet::getBoundingBox(double *bbox) const -{ - int dim=getSpaceDimension(); - for (int idim=0; idim::max(); - bbox[idim*2+1]=-std::numeric_limits::max(); - } - const double *coords=_coords->getConstPointer(); - int nbnodes=getNumberOfNodes(); - for (int i=0; i coords[i*dim+idim] ) - { - bbox[idim*2] = coords[i*dim+idim] ; - } - if ( bbox[idim*2+1] < coords[i*dim+idim] ) - { - bbox[idim*2+1] = coords[i*dim+idim] ; - } - } - } -} - -/*! - * This method removes useless nodes in coords. - */ -void MEDCouplingPointSet::zipCoords() -{ - checkFullyDefined(); - DataArrayInt *traducer=zipCoordsTraducer(); - traducer->decrRef(); -} - -/*! - * Non const method that operates a rotation of 'this'. - * If spaceDim==2 'vector' parameter is ignored (and could be 0) and the rotation is done around 'center' with angle specified by 'angle'. - * If spaceDim==3 the rotation axe is defined by ('center','vector') and the angle is 'angle'. - * @param center an array of size getSpaceDimension(). - * @param vector in array of size getSpaceDimension(). - * @param angle angle of rotation in radian. - */ -void MEDCouplingPointSet::rotate(const double *center, const double *vector, double angle) -{ - int spaceDim=getSpaceDimension(); - if(spaceDim==3) - rotate3D(center,vector,angle); - else if(spaceDim==2) - rotate2D(center,angle); - else - throw INTERP_KERNEL::Exception("MEDCouplingPointSet::rotate : invalid space dim for rotation must be 2 or 3"); - _coords->declareAsNew(); - updateTime(); -} - -/*! - * Non const method that operates a translation of 'this'. - * @param vector in array of size getSpaceDimension(). - */ -void MEDCouplingPointSet::translate(const double *vector) -{ - double *coords=_coords->getPointer(); - int nbNodes=getNumberOfNodes(); - int dim=getSpaceDimension(); - for(int i=0; ideclareAsNew(); - updateTime(); -} - -/*! - * Non const method that operates a scale on 'this' with 'point' as reference point of scale and with factor 'factor'. - * @param point in array of size getSpaceDimension(). - * @param factor factor of the scaling - */ -void MEDCouplingPointSet::scale(const double *point, double factor) -{ - double *coords=_coords->getPointer(); - int nbNodes=getNumberOfNodes(); - int dim=getSpaceDimension(); - double *tmp=new double[dim]; - for(int i=0;i()); - std::transform(coords+i*dim,coords+(i+1)*dim,coords+i*dim,std::bind2nd(std::multiplies(),factor)); - std::transform(coords+i*dim,coords+(i+1)*dim,point,coords+i*dim,std::plus()); - } - delete [] tmp; - _coords->declareAsNew(); - updateTime(); -} - -/*! - * This method is only available for already defined coordinates. - * If not an INTERP_KERNEL::Exception is thrown. The 'newSpaceDim' input must be greater or equal to 1. - * This method simply convert this to newSpaceDim space : - * - by putting a 0. for each \f$ i^{th} \f$ components of each coord of nodes so that i>=getSpaceDim(), if 'newSpaceDim'>getSpaceDimsion() - * - by ignoring each \f$ i^{th} \f$ components of each coord of nodes so that i >= 'newSpaceDim', 'newSpaceDim'=1 !"); - int oldSpaceDim=getSpaceDimension(); - if(newSpaceDim==oldSpaceDim) - return ; - DataArrayDouble *newCoords=DataArrayDouble::New(); - newCoords->alloc(getCoords()->getNumberOfTuples(),newSpaceDim); - const double *oldc=getCoords()->getConstPointer(); - double *nc=newCoords->getPointer(); - int nbOfNodes=getNumberOfNodes(); - int dim=std::min(oldSpaceDim,newSpaceDim); - for(int i=0;isetName(getCoords()->getName().c_str()); - for(int i=0;isetInfoOnComponent(i,getCoords()->getInfoOnComponent(i).c_str()); - setCoords(newCoords); - newCoords->decrRef(); -} - -/*! - * This method try to substitute this->_coords with other._coords if arrays match. - * This method potentially modifies 'this' if it succeeds, otherway an exception is thrown. - */ -void MEDCouplingPointSet::tryToShareSameCoords(const MEDCouplingPointSet& other, double epsilon) throw(INTERP_KERNEL::Exception) -{ - if(_coords==other._coords) - return ; - if(!_coords) - throw INTERP_KERNEL::Exception("Current instance has no coords whereas other has !"); - if(!other._coords) - throw INTERP_KERNEL::Exception("Other instance has no coords whereas current has !"); - if(!_coords->isEqual(*other._coords,epsilon)) - throw INTERP_KERNEL::Exception("Coords are not the same !"); - setCoords(other._coords); -} - -/*! - * This method is expecting to be called for meshes so that getSpaceDimension() returns 3. - * This method returns in 'nodes' output all the nodes that are at a distance lower than epsilon from plane - * defined by the point 'pt' and the vector 'vec'. - * @param pt points to an array of size 3 and represents a point that owns to plane. - * @param vec points to an array of size 3 and represents the normal vector of the plane. The norm of the vector is not compulsory equal to 1. But norm must be greater than 10*abs(eps) - * @param eps is the maximal distance around the plane where node in this->_coords will be picked. - * @param nodes is the output of the method. The vector is not compulsory empty before call. The nodes that fulfills the condition will be added at the end of the nodes. - */ -void MEDCouplingPointSet::findNodesOnPlane(const double *pt, const double *vec, double eps, std::vector& nodes) const throw(INTERP_KERNEL::Exception) -{ - if(getSpaceDimension()!=3) - throw INTERP_KERNEL::Exception("Invalid spacedim to be applied on this ! Must be equal to 3 !"); - int nbOfNodes=getNumberOfNodes(); - double a=vec[0],b=vec[1],c=vec[2],d=-pt[0]*vec[0]-pt[1]*vec[1]-pt[2]*vec[2]; - double deno=sqrt(a*a+b*b+c*c); - const double *work=_coords->getConstPointer(); - for(int i=0;igetSpaceDimension(); - if(spaceDim!=m2->getSpaceDimension()) - throw INTERP_KERNEL::Exception("Mismatch in SpaceDim during call of mergeNodesArray !"); - return DataArrayDouble::aggregate(m1->getCoords(),m2->getCoords()); -} - -/*! - * Factory to build new instance of instanciable subclasses of MEDCouplingPointSet. - * This method is used during unserialization process. - */ -MEDCouplingPointSet *MEDCouplingPointSet::buildInstanceFromMeshType(MEDCouplingMeshType type) -{ - switch(type) - { - case UNSTRUCTURED: - return MEDCouplingUMesh::New(); - case UNSTRUCTURED_DESC: - return MEDCouplingUMeshDesc::New(); - default: - throw INTERP_KERNEL::Exception("Invalid type of mesh specified"); - } -} - -/*! - * First step of serialization process. Used by ParaMEDMEM and MEDCouplingCorba to transfert data between process. - */ -void MEDCouplingPointSet::getTinySerializationInformation(std::vector& tinyInfo, std::vector& littleStrings) const -{ - if(_coords) - { - int spaceDim=getSpaceDimension(); - littleStrings.resize(spaceDim+1); - littleStrings[0]=getName(); - for(int i=0;igetInfoOnComponent(i); - tinyInfo.clear(); - tinyInfo.push_back(getType()); - tinyInfo.push_back(spaceDim); - tinyInfo.push_back(getNumberOfNodes()); - } - else - { - littleStrings.resize(1); - littleStrings[0]=getName(); - tinyInfo.clear(); - tinyInfo.push_back(getType()); - tinyInfo.push_back(-1); - tinyInfo.push_back(-1); - } -} - -/*! - * Third and final step of serialization process. - */ -void MEDCouplingPointSet::serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const -{ - if(_coords) - { - a2=getCoords(); - a2->incrRef(); - } - else - a2=0; -} - -/*! - * Second step of serialization process. - * @param tinyInfo must be equal to the result given by getTinySerializationInformation method. - */ -void MEDCouplingPointSet::resizeForUnserialization(const std::vector& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector& littleStrings) -{ - if(tinyInfo[2]>=0 && tinyInfo[1]>=1) - { - a2->alloc(tinyInfo[2],tinyInfo[1]); - littleStrings.resize(tinyInfo[1]+1); - } - else - { - littleStrings.resize(1); - } -} - -/*! - * Second and final unserialization process. - * @param tinyInfo must be equal to the result given by getTinySerializationInformation method. - */ -void MEDCouplingPointSet::unserialization(const std::vector& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, const std::vector& littleStrings) -{ - if(tinyInfo[2]>=0 && tinyInfo[1]>=1) - { - setCoords(a2); - setName(littleStrings[0].c_str()); - for(int i=0;isetInfoOnComponent(i,littleStrings[i+1].c_str()); - } - else - setName(littleStrings[0].c_str()); -} - -/*! - * Intersect Bounding Box given 2 Bounding Boxes. - */ -bool MEDCouplingPointSet::intersectsBoundingBox(const double* bb1, const double* bb2, int dim, double eps) -{ - double* bbtemp = new double[2*dim]; - double deltamax=0.0; - - for (int i=0; i< dim; i++) - { - double delta = bb1[2*i+1]-bb1[2*i]; - if ( delta > deltamax ) - { - deltamax = delta ; - } - } - for (int i=0; i deltamax ) - { - deltamax = delta ; - } - } - for (int i=0; igetPointer(); - int nbNodes=getNumberOfNodes(); - rotate3DAlg(center,vect,angle,nbNodes,coords); -} - -/*! - * Low static method that operates 3D rotation of 'nbNodes' 3D nodes whose coordinates are arranged in 'coords' - * around an axe ('center','vect') and with angle 'angle'. - */ -void MEDCouplingPointSet::rotate3DAlg(const double *center, const double *vect, double angle, int nbNodes, double *coords) -{ - double sina=sin(angle); - double cosa=cos(angle); - double vectorNorm[3]; - double matrix[9]; - double matrixTmp[9]; - double norm=sqrt(vect[0]*vect[0]+vect[1]*vect[1]+vect[2]*vect[2]); - std::transform(vect,vect+3,vectorNorm,std::bind2nd(std::multiplies(),1/norm)); - //rotation matrix computation - matrix[0]=cosa; matrix[1]=0.; matrix[2]=0.; matrix[3]=0.; matrix[4]=cosa; matrix[5]=0.; matrix[6]=0.; matrix[7]=0.; matrix[8]=cosa; - matrixTmp[0]=vectorNorm[0]*vectorNorm[0]; matrixTmp[1]=vectorNorm[0]*vectorNorm[1]; matrixTmp[2]=vectorNorm[0]*vectorNorm[2]; - matrixTmp[3]=vectorNorm[1]*vectorNorm[0]; matrixTmp[4]=vectorNorm[1]*vectorNorm[1]; matrixTmp[5]=vectorNorm[1]*vectorNorm[2]; - matrixTmp[6]=vectorNorm[2]*vectorNorm[0]; matrixTmp[7]=vectorNorm[2]*vectorNorm[1]; matrixTmp[8]=vectorNorm[2]*vectorNorm[2]; - std::transform(matrixTmp,matrixTmp+9,matrixTmp,std::bind2nd(std::multiplies(),1-cosa)); - std::transform(matrix,matrix+9,matrixTmp,matrix,std::plus()); - matrixTmp[0]=0.; matrixTmp[1]=-vectorNorm[2]; matrixTmp[2]=vectorNorm[1]; - matrixTmp[3]=vectorNorm[2]; matrixTmp[4]=0.; matrixTmp[5]=-vectorNorm[0]; - matrixTmp[6]=-vectorNorm[1]; matrixTmp[7]=vectorNorm[0]; matrixTmp[8]=0.; - std::transform(matrixTmp,matrixTmp+9,matrixTmp,std::bind2nd(std::multiplies(),sina)); - std::transform(matrix,matrix+9,matrixTmp,matrix,std::plus()); - //rotation matrix computed. - double tmp[3]; - for(int i=0; i()); - coords[i*3]=matrix[0]*tmp[0]+matrix[1]*tmp[1]+matrix[2]*tmp[2]+center[0]; - coords[i*3+1]=matrix[3]*tmp[0]+matrix[4]*tmp[1]+matrix[5]*tmp[2]+center[1]; - coords[i*3+2]=matrix[6]*tmp[0]+matrix[7]*tmp[1]+matrix[8]*tmp[2]+center[2]; - } -} - -/*! - * 'This' is expected to be of spaceDim==2. Idem for 'center' and 'vect' - */ -void MEDCouplingPointSet::rotate2D(const double *center, double angle) -{ - double *coords=_coords->getPointer(); - int nbNodes=getNumberOfNodes(); - rotate2DAlg(center,angle,nbNodes,coords); -} - -/*! - * Low static method that operates 3D rotation of 'nbNodes' 3D nodes whose coordinates are arranged in 'coords' - * around the center point 'center' and with angle 'angle'. - */ -void MEDCouplingPointSet::rotate2DAlg(const double *center, double angle, int nbNodes, double *coords) -{ - double cosa=cos(angle); - double sina=sin(angle); - double matrix[4]; - matrix[0]=cosa; matrix[1]=-sina; matrix[2]=sina; matrix[3]=cosa; - double tmp[2]; - for(int i=0; i()); - coords[i*2]=matrix[0]*tmp[0]+matrix[1]*tmp[1]+center[0]; - coords[i*2+1]=matrix[2]*tmp[0]+matrix[3]*tmp[1]+center[1]; - } -} - -class DummyClsMCPS -{ -public: - static const int MY_SPACEDIM=3; - static const int MY_MESHDIM=2; - typedef int MyConnType; - static const INTERP_KERNEL::NumberingPolicy My_numPol=INTERP_KERNEL::ALL_C_MODE; -}; - -/*! - * res should be an empty vector before calling this method. - * This method returns all the node coordinates included in _coords which ids are in [startConn;endConn) and put it into 'res' vector. - * If spaceDim==3 a projection will be done for each nodes on the middle plane containing these all nodes in [startConn;endConn). - * And after each projected nodes are moved to Oxy plane in order to consider these nodes as 2D nodes. - */ -void MEDCouplingPointSet::project2DCellOnXY(const int *startConn, const int *endConn, std::vector& res) const -{ - const double *coords=_coords->getConstPointer(); - int spaceDim=getSpaceDimension(); - for(const int *it=startConn;it!=endConn;it++) - res.insert(res.end(),coords+spaceDim*(*it),coords+spaceDim*(*it+1)); - if(spaceDim==2) - return ; - if(spaceDim==3) - { - std::vector cpy(res); - int nbNodes=endConn-startConn; - INTERP_KERNEL::PlanarIntersector::projection(&res[0],&cpy[0],nbNodes,nbNodes,1.e-12,0.,0.,true); - res.resize(2*nbNodes); - for(int i=0;i& res, bool isQuad) -{ - int nbOfNodes=res.size()/2; - std::vector nodes(nbOfNodes); - for(int i=0;iisButterfly(); - delete pol; - return ret; -} diff --git a/src/MEDCoupling/MEDCouplingPointSet.hxx b/src/MEDCoupling/MEDCouplingPointSet.hxx deleted file mode 100644 index 601777efc..000000000 --- a/src/MEDCoupling/MEDCouplingPointSet.hxx +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __PARAMEDMEM_MEDCOUPLINGPOINTSET_HXX__ -#define __PARAMEDMEM_MEDCOUPLINGPOINTSET_HXX__ - -#include "MEDCoupling.hxx" -#include "MEDCouplingMesh.hxx" - -#include - -namespace INTERP_KERNEL -{ - class DirectedBoundingBox; -} - -namespace ParaMEDMEM -{ - class DataArrayInt; - class DataArrayDouble; - - class MEDCOUPLING_EXPORT MEDCouplingPointSet : public MEDCouplingMesh - { - protected: - MEDCouplingPointSet(); - MEDCouplingPointSet(const MEDCouplingPointSet& other, bool deepCpy); - ~MEDCouplingPointSet(); - public: - void updateTime(); - bool isStructured() const; - int getNumberOfNodes() const; - int getSpaceDimension() const; - void setCoords(DataArrayDouble *coords); - DataArrayDouble *getCoords() const { return _coords; } - DataArrayDouble *getCoordinatesAndOwner() const; - bool isEqual(const MEDCouplingMesh *other, double prec) const; - bool areCoordsEqual(const MEDCouplingPointSet& other, double prec) const; - virtual DataArrayInt *mergeNodes(double precision, bool& areNodesMerged) = 0; - void findCommonNodes(DataArrayInt *&comm, DataArrayInt *&commIndex, double prec) const; - DataArrayInt *buildNewNumberingFromCommNodesFrmt(const DataArrayInt *comm, const DataArrayInt *commIndex, - int& newNbOfNodes) const; - void getBoundingBox(double *bbox) const; - void zipCoords(); - void rotate(const double *center, const double *vector, double angle); - void translate(const double *vector); - void scale(const double *point, double factor); - void changeSpaceDimension(int newSpaceDim) throw(INTERP_KERNEL::Exception); - void tryToShareSameCoords(const MEDCouplingPointSet& other, double epsilon) throw(INTERP_KERNEL::Exception); - void findNodesOnPlane(const double *pt, const double *vec, double eps, std::vector& nodes) const throw(INTERP_KERNEL::Exception); - static DataArrayDouble *mergeNodesArray(const MEDCouplingPointSet *m1, const MEDCouplingPointSet *m2); - static MEDCouplingPointSet *buildInstanceFromMeshType(MEDCouplingMeshType type); - static void rotate2DAlg(const double *center, double angle, int nbNodes, double *coords); - static void rotate3DAlg(const double *center, const double *vect, double angle, int nbNodes, double *coords); - virtual MEDCouplingPointSet *buildPartOfMySelf(const int *start, const int *end, bool keepCoords) const = 0; - virtual MEDCouplingPointSet *buildPartOfMySelfNode(const int *start, const int *end, bool fullyIn) const = 0; - virtual MEDCouplingPointSet *buildFacePartOfMySelfNode(const int *start, const int *end, bool fullyIn) const = 0; - virtual void findBoundaryNodes(std::vector& nodes) const = 0; - virtual MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const = 0; - virtual void renumberNodes(const int *newNodeNumbers, int newNbOfNodes); - //! size of returned tinyInfo must be always the same. - virtual void getTinySerializationInformation(std::vector& tinyInfo, std::vector& littleStrings) const; - virtual bool isEmptyMesh(const std::vector& tinyInfo) const = 0; - virtual void resizeForUnserialization(const std::vector& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector& littleStrings); - virtual void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const; - virtual void unserialization(const std::vector& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, - const std::vector& littleStrings); - virtual void giveElemsInBoundingBox(const double *bbox, double eps, std::vector& elems) = 0; - virtual void giveElemsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps, std::vector& elems) = 0; - virtual DataArrayInt *zipCoordsTraducer() = 0; - protected: - virtual void checkFullyDefined() const throw(INTERP_KERNEL::Exception) = 0; - static bool intersectsBoundingBox(const double* bb1, const double* bb2, int dim, double eps); - static bool intersectsBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bb1, const double* bb2, int dim, double eps); - void rotate2D(const double *center, double angle); - void rotate3D(const double *center, const double *vect, double angle); - void project2DCellOnXY(const int *startConn, const int *endConn, std::vector& res) const; - static bool isButterfly2DCell(const std::vector& res, bool isQuad); - template - void findCommonNodesAlg(std::vector& bbox, - int nbNodes, double prec, std::vector& c, std::vector& cI) const; - protected: - DataArrayDouble *_coords; - }; -} - -#endif diff --git a/src/MEDCoupling/MEDCouplingPointSet.txx b/src/MEDCoupling/MEDCouplingPointSet.txx deleted file mode 100644 index 300aab235..000000000 --- a/src/MEDCoupling/MEDCouplingPointSet.txx +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef __PARAMEDMEM_MEDCOUPLINGPOINTSET_TXX__ -#define __PARAMEDMEM_MEDCOUPLINGPOINTSET_TXX__ - -#include "MEDCouplingPointSet.txx" -#include "InterpolationUtils.hxx" -#include "BBTree.txx" - -#include - -namespace ParaMEDMEM -{ - template - void MEDCouplingPointSet::findCommonNodesAlg(std::vector& bbox, - int nbNodes, double prec, - std::vector& c, std::vector& cI) const - { - const double *coordsPtr=_coords->getConstPointer(); - BBTree myTree(&bbox[0],0,0,nbNodes,-prec); - double bb[2*SPACEDIM]; - double prec2=prec*prec; - for(int i=0;i intersectingElems; - myTree.getIntersectingElems(bb,intersectingElems); - if(intersectingElems.size()>1) - { - std::vector commonNodes; - for(std::vector::const_iterator it=intersectingElems.begin();it!=intersectingElems.end();it++) - if(*it!=i) - if(INTERP_KERNEL::distance2(coordsPtr+SPACEDIM*i,coordsPtr+SPACEDIM*(*it))incrRef(); _target_mesh->incrRef(); - int meshInterpType=((int)_src_mesh->getType()*16)+(int)_target_mesh->getType(); - switch(meshInterpType) - { - case 85://Unstructured-Unstructured - return prepareUU(method); - case 136://Extruded-Extruded - return prepareEE(method); - default: - throw INTERP_KERNEL::Exception("Not managed type of meshes !"); - } -} - -void MEDCouplingRemapper::transfer(const MEDCouplingFieldDouble *srcField, MEDCouplingFieldDouble *targetField, double dftValue) -{ - if(_src_method!=srcField->getDiscretization()->getStringRepr()) - throw INTERP_KERNEL::Exception("Incoherency with prepare call for source field"); - if(_target_method!=targetField->getDiscretization()->getStringRepr()) - throw INTERP_KERNEL::Exception("Incoherency with prepare call for target field"); - if(srcField->getNature()!=targetField->getNature()) - throw INTERP_KERNEL::Exception("Natures of fields mismatch !"); - DataArrayDouble *array=targetField->getArray(); - int srcNbOfCompo=srcField->getNumberOfComponents(); - if(array) - { - if(srcNbOfCompo!=targetField->getNumberOfComponents()) - throw INTERP_KERNEL::Exception("Number of components mismatch !"); - } - else - { - array=DataArrayDouble::New(); - array->alloc(targetField->getNumberOfTuples(),srcNbOfCompo); - targetField->setArray(array); - array->decrRef(); - } - computeDeno(srcField->getNature(),srcField,targetField); - double *resPointer=array->getPointer(); - const double *inputPointer=srcField->getArray()->getConstPointer(); - computeProduct(inputPointer,srcNbOfCompo,dftValue,resPointer); -} - -void MEDCouplingRemapper::reverseTransfer(MEDCouplingFieldDouble *srcField, const MEDCouplingFieldDouble *targetField, double dftValue) -{ - if(_src_method!=srcField->getDiscretization()->getStringRepr()) - throw INTERP_KERNEL::Exception("Incoherency with prepare call for source field"); - if(_target_method!=targetField->getDiscretization()->getStringRepr()) - throw INTERP_KERNEL::Exception("Incoherency with prepare call for target field"); - if(srcField->getNature()!=targetField->getNature()) - throw INTERP_KERNEL::Exception("Natures of fields mismatch !"); - DataArrayDouble *array=srcField->getArray(); - int trgNbOfCompo=targetField->getNumberOfComponents(); - if(array) - { - if(trgNbOfCompo!=srcField->getNumberOfComponents()) - throw INTERP_KERNEL::Exception("Number of components mismatch !"); - } - else - { - array=DataArrayDouble::New(); - array->alloc(srcField->getNumberOfTuples(),trgNbOfCompo); - srcField->setArray(array); - array->decrRef(); - } - computeDeno(srcField->getNature(),srcField,targetField); - double *resPointer=array->getPointer(); - const double *inputPointer=targetField->getArray()->getConstPointer(); - computeReverseProduct(inputPointer,trgNbOfCompo,dftValue,resPointer); -} - -MEDCouplingFieldDouble *MEDCouplingRemapper::transferField(const MEDCouplingFieldDouble *srcField, double dftValue) -{ - if(_src_method!=srcField->getDiscretization()->getStringRepr()) - throw INTERP_KERNEL::Exception("Incoherency with prepare call for source field"); - MEDCouplingFieldDouble *ret=MEDCouplingFieldDouble::New(MEDCouplingFieldDiscretization::getTypeOfFieldFromStringRepr(_target_method.c_str())); - ret->setNature(srcField->getNature()); - ret->setMesh(_target_mesh); - transfer(srcField,ret,dftValue); - return ret; -} - -MEDCouplingFieldDouble *MEDCouplingRemapper::reverseTransferField(const MEDCouplingFieldDouble *targetField, double dftValue) -{ - if(_target_method!=targetField->getDiscretization()->getStringRepr()) - throw INTERP_KERNEL::Exception("Incoherency with prepare call for target field"); - MEDCouplingFieldDouble *ret=MEDCouplingFieldDouble::New(MEDCouplingFieldDiscretization::getTypeOfFieldFromStringRepr(_target_method.c_str())); - ret->setNature(targetField->getNature()); - ret->setMesh(_src_mesh); - reverseTransfer(ret,targetField,dftValue); - return ret; -} - -bool MEDCouplingRemapper::setOptionInt(const std::string& key, int value) -{ - return INTERP_KERNEL::InterpolationOptions::setOptionInt(key,value); -} - -bool MEDCouplingRemapper::setOptionDouble(const std::string& key, double value) -{ - return INTERP_KERNEL::InterpolationOptions::setOptionDouble(key,value); -} - -bool MEDCouplingRemapper::setOptionString(const std::string& key, std::string& value) -{ - return INTERP_KERNEL::InterpolationOptions::setOptionString(key,value); -} - -int MEDCouplingRemapper::prepareUU(const char *method) -{ - MEDCouplingUMesh *src_mesh=(MEDCouplingUMesh *)_src_mesh; - MEDCouplingUMesh *target_mesh=(MEDCouplingUMesh *)_target_mesh; - INTERP_KERNEL::Interpolation::checkAndSplitInterpolationMethod(method,_src_method,_target_method); - const int srcMeshDim=src_mesh->getMeshDimension(); - int srcSpaceDim=-1; - if(srcMeshDim!=-1) - srcSpaceDim=src_mesh->getSpaceDimension(); - const int trgMeshDim=target_mesh->getMeshDimension(); - int trgSpaceDim=-1; - if(trgMeshDim!=-1) - trgSpaceDim=target_mesh->getSpaceDimension(); - if(trgSpaceDim!=srcSpaceDim) - if(trgSpaceDim!=-1 && srcSpaceDim!=-1) - throw INTERP_KERNEL::Exception("Incoherent space dimension detected between target and source."); - int nbCols; - if(srcMeshDim==2 && trgMeshDim==2 && srcSpaceDim==2) - { - MEDCouplingNormalizedUnstructuredMesh<2,2> source_mesh_wrapper(src_mesh); - MEDCouplingNormalizedUnstructuredMesh<2,2> target_mesh_wrapper(target_mesh); - INTERP_KERNEL::Interpolation2D interpolation(*this); - nbCols=interpolation.interpolateMeshes(source_mesh_wrapper,target_mesh_wrapper,_matrix,method); - } - else if(srcMeshDim==3 && trgMeshDim==3 && srcSpaceDim==3) - { - MEDCouplingNormalizedUnstructuredMesh<3,3> source_mesh_wrapper(src_mesh); - MEDCouplingNormalizedUnstructuredMesh<3,3> target_mesh_wrapper(target_mesh); - INTERP_KERNEL::Interpolation3D interpolation(*this); - nbCols=interpolation.interpolateMeshes(source_mesh_wrapper,target_mesh_wrapper,_matrix,method); - } - else if(srcMeshDim==2 && trgMeshDim==2 && srcSpaceDim==3) - { - MEDCouplingNormalizedUnstructuredMesh<3,2> source_mesh_wrapper(src_mesh); - MEDCouplingNormalizedUnstructuredMesh<3,2> target_mesh_wrapper(target_mesh); - INTERP_KERNEL::Interpolation3DSurf interpolation(*this); - nbCols=interpolation.interpolateMeshes(source_mesh_wrapper,target_mesh_wrapper,_matrix,method); - } - else if(srcMeshDim==3 && trgMeshDim==1 && srcSpaceDim==3) - { - if(getIntersectionType()!=INTERP_KERNEL::PointLocator) - throw INTERP_KERNEL::Exception("Invalid interpolation requested between 3D and 1D ! Select PointLocator as intersection type !"); - MEDCouplingNormalizedUnstructuredMesh<3,3> source_mesh_wrapper(src_mesh); - MEDCouplingNormalizedUnstructuredMesh<3,3> target_mesh_wrapper(target_mesh); - INTERP_KERNEL::Interpolation3D interpolation(*this); - nbCols=interpolation.interpolateMeshes(source_mesh_wrapper,target_mesh_wrapper,_matrix,method); - } - else if(srcMeshDim==1 && trgMeshDim==3 && srcSpaceDim==3) - { - if(getIntersectionType()!=INTERP_KERNEL::PointLocator) - throw INTERP_KERNEL::Exception("Invalid interpolation requested between 3D and 1D ! Select PointLocator as intersection type !"); - MEDCouplingNormalizedUnstructuredMesh<3,3> source_mesh_wrapper(src_mesh); - MEDCouplingNormalizedUnstructuredMesh<3,3> target_mesh_wrapper(target_mesh); - INTERP_KERNEL::Interpolation3D interpolation(*this); - std::vector > matrixTmp; - nbCols=interpolation.interpolateMeshes(target_mesh_wrapper,source_mesh_wrapper,matrixTmp,method); - reverseMatrix(matrixTmp,nbCols,_matrix); - nbCols=matrixTmp.size(); - } - else if(srcMeshDim==2 && trgMeshDim==1 && srcSpaceDim==2) - { - if(getIntersectionType()!=INTERP_KERNEL::PointLocator) - throw INTERP_KERNEL::Exception("Invalid interpolation requested between 2D and 1D ! Select PointLocator as intersection type !"); - MEDCouplingNormalizedUnstructuredMesh<2,2> source_mesh_wrapper(src_mesh); - MEDCouplingNormalizedUnstructuredMesh<2,2> target_mesh_wrapper(target_mesh); - INTERP_KERNEL::Interpolation2D interpolation(*this); - nbCols=interpolation.interpolateMeshes(source_mesh_wrapper,target_mesh_wrapper,_matrix,method); - } - else if(srcMeshDim==1 && trgMeshDim==2 && srcSpaceDim==2) - { - if(getIntersectionType()!=INTERP_KERNEL::PointLocator) - throw INTERP_KERNEL::Exception("Invalid interpolation requested between 1D and 2D ! Select PointLocator as intersection type !"); - MEDCouplingNormalizedUnstructuredMesh<2,2> source_mesh_wrapper(src_mesh); - MEDCouplingNormalizedUnstructuredMesh<2,2> target_mesh_wrapper(target_mesh); - INTERP_KERNEL::Interpolation2D interpolation(*this); - std::vector > matrixTmp; - nbCols=interpolation.interpolateMeshes(target_mesh_wrapper,source_mesh_wrapper,matrixTmp,method); - reverseMatrix(matrixTmp,nbCols,_matrix); - nbCols=matrixTmp.size(); - } - else if(trgMeshDim==-1) - { - if(srcMeshDim==2 && srcSpaceDim==2) - { - MEDCouplingNormalizedUnstructuredMesh<2,2> source_mesh_wrapper(src_mesh); - INTERP_KERNEL::Interpolation2D interpolation(*this); - nbCols=interpolation.toIntegralUniform(source_mesh_wrapper,_matrix,_src_method.c_str()); - } - else if(srcMeshDim==3 && srcSpaceDim==3) - { - MEDCouplingNormalizedUnstructuredMesh<3,3> source_mesh_wrapper(src_mesh); - INTERP_KERNEL::Interpolation3D interpolation(*this); - nbCols=interpolation.toIntegralUniform(source_mesh_wrapper,_matrix,_src_method.c_str()); - } - else if(srcMeshDim==2 && srcSpaceDim==3) - { - MEDCouplingNormalizedUnstructuredMesh<3,2> source_mesh_wrapper(src_mesh); - INTERP_KERNEL::Interpolation3DSurf interpolation(*this); - nbCols=interpolation.toIntegralUniform(source_mesh_wrapper,_matrix,_src_method.c_str()); - } - else - throw INTERP_KERNEL::Exception("No interpolation available for the given mesh and space dimension of source mesh to -1D targetMesh"); - } - else if(srcMeshDim==-1) - { - if(trgMeshDim==2 && trgSpaceDim==2) - { - MEDCouplingNormalizedUnstructuredMesh<2,2> source_mesh_wrapper(target_mesh); - INTERP_KERNEL::Interpolation2D interpolation(*this); - nbCols=interpolation.fromIntegralUniform(source_mesh_wrapper,_matrix,_target_method.c_str()); - } - else if(trgMeshDim==3 && trgSpaceDim==3) - { - MEDCouplingNormalizedUnstructuredMesh<3,3> source_mesh_wrapper(target_mesh); - INTERP_KERNEL::Interpolation3D interpolation(*this); - nbCols=interpolation.fromIntegralUniform(source_mesh_wrapper,_matrix,_target_method.c_str()); - } - else if(trgMeshDim==2 && trgSpaceDim==3) - { - MEDCouplingNormalizedUnstructuredMesh<3,2> source_mesh_wrapper(target_mesh); - INTERP_KERNEL::Interpolation3DSurf interpolation(*this); - nbCols=interpolation.fromIntegralUniform(source_mesh_wrapper,_matrix,_target_method.c_str()); - } - else - throw INTERP_KERNEL::Exception("No interpolation available for the given mesh and space dimension of source mesh from -1D sourceMesh"); - } - else - throw INTERP_KERNEL::Exception("No interpolation available for the given mesh and space dimension"); - _deno_multiply.clear(); - _deno_multiply.resize(_matrix.size()); - _deno_reverse_multiply.clear(); - _deno_reverse_multiply.resize(nbCols); - declareAsNew(); - return 1; -} - -int MEDCouplingRemapper::prepareEE(const char *method) -{ - MEDCouplingExtrudedMesh *src_mesh=(MEDCouplingExtrudedMesh *)_src_mesh; - MEDCouplingExtrudedMesh *target_mesh=(MEDCouplingExtrudedMesh *)_target_mesh; - std::string methC(method); - if(methC!="P0P0") - throw INTERP_KERNEL::Exception("Only P0P0 method implemented for Extruded/Extruded meshes !"); - INTERP_KERNEL::Interpolation::checkAndSplitInterpolationMethod(method,_src_method,_target_method); - MEDCouplingNormalizedUnstructuredMesh<3,2> source_mesh_wrapper(src_mesh->getMesh2D()); - MEDCouplingNormalizedUnstructuredMesh<3,2> target_mesh_wrapper(target_mesh->getMesh2D()); - INTERP_KERNEL::Interpolation3DSurf interpolation2D(*this); - std::vector > matrix2D; - int nbCols2D=interpolation2D.interpolateMeshes(source_mesh_wrapper,target_mesh_wrapper,matrix2D,method); - MEDCouplingUMesh *s1D,*t1D; - double v[3]; - MEDCouplingExtrudedMesh::project1DMeshes(src_mesh->getMesh1D(),target_mesh->getMesh1D(),getPrecision(),s1D,t1D,v); - MEDCouplingNormalizedUnstructuredMesh<1,1> s1DWrapper(s1D); - MEDCouplingNormalizedUnstructuredMesh<1,1> t1DWrapper(t1D); - std::vector > matrix1D; - INTERP_KERNEL::Interpolation1D interpolation1D(*this); - int nbCols1D=interpolation1D.interpolateMeshes(s1DWrapper,t1DWrapper,matrix1D,method); - s1D->decrRef(); - t1D->decrRef(); - buildFinalInterpolationMatrixByConvolution(matrix1D,matrix2D,src_mesh->getMesh3DIds()->getConstPointer(),nbCols2D,nbCols1D, - target_mesh->getMesh3DIds()->getConstPointer()); - // - _deno_multiply.clear(); - _deno_multiply.resize(_matrix.size()); - _deno_reverse_multiply.clear(); - _deno_reverse_multiply.resize(nbCols2D*nbCols1D); - declareAsNew(); - return 1; -} - -void MEDCouplingRemapper::updateTime() -{ -} - -void MEDCouplingRemapper::releaseData(bool matrixSuppression) -{ - if(_src_mesh) - _src_mesh->decrRef(); - if(_target_mesh) - _target_mesh->decrRef(); - _src_mesh=0; - _target_mesh=0; - if(matrixSuppression) - { - _matrix.clear(); - _deno_multiply.clear(); - _deno_reverse_multiply.clear(); - } -} - -void MEDCouplingRemapper::computeDeno(NatureOfField nat, const MEDCouplingFieldDouble *srcField, const MEDCouplingFieldDouble *trgField) -{ - if(nat==NoNature) - return computeDenoFromScratch(nat,srcField,trgField); - else if(nat!=_nature_of_deno) - return computeDenoFromScratch(nat,srcField,trgField); - else if(nat==_nature_of_deno && _time_deno_update!=getTimeOfThis()) - return computeDenoFromScratch(nat,srcField,trgField); -} - -void MEDCouplingRemapper::computeDenoFromScratch(NatureOfField nat, const MEDCouplingFieldDouble *srcField, const MEDCouplingFieldDouble *trgField) -{ - _nature_of_deno=nat; - _time_deno_update=getTimeOfThis(); - switch(_nature_of_deno) - { - case ConservativeVolumic: - { - computeRowSumAndColSum(_matrix,_deno_multiply,_deno_reverse_multiply); - break; - } - case Integral: - { - MEDCouplingFieldDouble *deno=srcField->getDiscretization()->getWeightingField(srcField->getMesh(),true); - MEDCouplingFieldDouble *denoR=trgField->getDiscretization()->getWeightingField(trgField->getMesh(),true); - const double *denoPtr=deno->getArray()->getConstPointer(); - const double *denoRPtr=denoR->getArray()->getConstPointer(); - if(trgField->getMesh()->getMeshDimension()==-1) - { - double *denoRPtr2=denoR->getArray()->getPointer(); - denoRPtr2[0]=std::accumulate(denoPtr,denoPtr+deno->getNumberOfTuples(),0.); - } - if(srcField->getMesh()->getMeshDimension()==-1) - { - double *denoPtr2=deno->getArray()->getPointer(); - denoPtr2[0]=std::accumulate(denoRPtr,denoRPtr+denoR->getNumberOfTuples(),0.); - } - int idx=0; - for(std::vector >::const_iterator iter1=_matrix.begin();iter1!=_matrix.end();iter1++,idx++) - for(std::map::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++) - { - _deno_multiply[idx][(*iter2).first]=denoPtr[(*iter2).first]; - _deno_reverse_multiply[(*iter2).first][idx]=denoRPtr[idx]; - } - deno->decrRef(); - denoR->decrRef(); - break; - } - case IntegralGlobConstraint: - { - computeColSumAndRowSum(_matrix,_deno_multiply,_deno_reverse_multiply); - break; - } - case RevIntegral: - { - MEDCouplingFieldDouble *deno=trgField->getDiscretization()->getWeightingField(trgField->getMesh(),true); - MEDCouplingFieldDouble *denoR=srcField->getDiscretization()->getWeightingField(srcField->getMesh(),true); - const double *denoPtr=deno->getArray()->getConstPointer(); - const double *denoRPtr=denoR->getArray()->getConstPointer(); - if(trgField->getMesh()->getMeshDimension()==-1) - { - double *denoRPtr2=denoR->getArray()->getPointer(); - denoRPtr2[0]=std::accumulate(denoPtr,denoPtr+deno->getNumberOfTuples(),0.); - } - if(srcField->getMesh()->getMeshDimension()==-1) - { - double *denoPtr2=deno->getArray()->getPointer(); - denoPtr2[0]=std::accumulate(denoRPtr,denoRPtr+denoR->getNumberOfTuples(),0.); - } - int idx=0; - for(std::vector >::const_iterator iter1=_matrix.begin();iter1!=_matrix.end();iter1++,idx++) - for(std::map::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++) - { - _deno_multiply[idx][(*iter2).first]=denoPtr[idx]; - _deno_reverse_multiply[(*iter2).first][idx]=denoRPtr[(*iter2).first]; - } - deno->decrRef(); - denoR->decrRef(); - break; - } - case NoNature: - throw INTERP_KERNEL::Exception("No nature specified ! Select one !"); - } -} - -void MEDCouplingRemapper::computeProduct(const double *inputPointer, int inputNbOfCompo, double dftValue, double *resPointer) -{ - int idx=0; - double *tmp=new double[inputNbOfCompo]; - for(std::vector >::const_iterator iter1=_matrix.begin();iter1!=_matrix.end();iter1++,idx++) - { - if((*iter1).empty()) - { - std::fill(resPointer+idx*inputNbOfCompo,resPointer+(idx+1)*inputNbOfCompo,dftValue); - continue; - } - else - std::fill(resPointer+idx*inputNbOfCompo,resPointer+(idx+1)*inputNbOfCompo,0.); - std::map::const_iterator iter3=_deno_multiply[idx].begin(); - for(std::map::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++,iter3++) - { - std::transform(inputPointer+(*iter2).first*inputNbOfCompo,inputPointer+((*iter2).first+1)*inputNbOfCompo,tmp,std::bind2nd(std::multiplies(),(*iter2).second/(*iter3).second)); - std::transform(tmp,tmp+inputNbOfCompo,resPointer+idx*inputNbOfCompo,resPointer+idx*inputNbOfCompo,std::plus()); - } - } - delete [] tmp; -} - -void MEDCouplingRemapper::computeReverseProduct(const double *inputPointer, int inputNbOfCompo, double dftValue, double *resPointer) -{ - std::vector isReached(_deno_reverse_multiply.size(),false); - int idx=0; - double *tmp=new double[inputNbOfCompo]; - std::fill(resPointer,resPointer+inputNbOfCompo*_deno_reverse_multiply.size(),0.); - for(std::vector >::const_iterator iter1=_matrix.begin();iter1!=_matrix.end();iter1++,idx++) - { - for(std::map::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++) - { - isReached[(*iter2).first]=true; - std::transform(inputPointer+idx*inputNbOfCompo,inputPointer+(idx+1)*inputNbOfCompo,tmp,std::bind2nd(std::multiplies(),(*iter2).second/_deno_reverse_multiply[(*iter2).first][idx])); - std::transform(tmp,tmp+inputNbOfCompo,resPointer+((*iter2).first)*inputNbOfCompo,resPointer+((*iter2).first)*inputNbOfCompo,std::plus()); - } - } - delete [] tmp; - idx=0; - for(std::vector::const_iterator iter3=isReached.begin();iter3!=isReached.end();iter3++,idx++) - if(!*iter3) - std::fill(resPointer+idx*inputNbOfCompo,resPointer+(idx+1)*inputNbOfCompo,dftValue); -} - -void MEDCouplingRemapper::reverseMatrix(const std::vector >& matIn, int nbColsMatIn, std::vector >& matOut) -{ - matOut.resize(nbColsMatIn); - int id=0; - for(std::vector >::const_iterator iter1=matIn.begin();iter1!=matIn.end();iter1++,id++) - for(std::map::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++) - matOut[(*iter2).first][id]=(*iter2).second; -} - -void MEDCouplingRemapper::computeRowSumAndColSum(const std::vector >& matrixDeno, - std::vector >& deno, std::vector >& denoReverse) -{ - std::map values; - int idx=0; - for(std::vector >::const_iterator iter1=matrixDeno.begin();iter1!=matrixDeno.end();iter1++,idx++) - { - double sum=0.; - for(std::map::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++) - { - sum+=(*iter2).second; - values[(*iter2).first]+=(*iter2).second; - } - for(std::map::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++) - deno[idx][(*iter2).first]=sum; - } - idx=0; - for(std::vector >::const_iterator iter1=matrixDeno.begin();iter1!=matrixDeno.end();iter1++,idx++) - { - for(std::map::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++) - denoReverse[(*iter2).first][idx]=values[(*iter2).first]; - } -} - -void MEDCouplingRemapper::computeColSumAndRowSum(const std::vector >& matrixDeno, - std::vector >& deno, std::vector >& denoReverse) -{ - std::map values; - int idx=0; - for(std::vector >::const_iterator iter1=matrixDeno.begin();iter1!=matrixDeno.end();iter1++,idx++) - { - double sum=0.; - for(std::map::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++) - { - sum+=(*iter2).second; - values[(*iter2).first]+=(*iter2).second; - } - for(std::map::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++) - denoReverse[(*iter2).first][idx]=sum; - } - idx=0; - for(std::vector >::const_iterator iter1=matrixDeno.begin();iter1!=matrixDeno.end();iter1++,idx++) - { - for(std::map::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++) - deno[idx][(*iter2).first]=values[(*iter2).first]; - } -} - -void MEDCouplingRemapper::buildFinalInterpolationMatrixByConvolution(const std::vector< std::map >& m1D, - const std::vector< std::map >& m2D, - const int *corrCellIdSrc, int nbOf2DCellsSrc, int nbOf1DCellsSrc, - const int *corrCellIdTrg) -{ - int nbOf2DCellsTrg=m2D.size(); - int nbOf1DCellsTrg=m1D.size(); - int nbOf3DCellsTrg=nbOf2DCellsTrg*nbOf1DCellsTrg; - _matrix.resize(nbOf3DCellsTrg); - int id2R=0; - for(std::vector< std::map >::const_iterator iter2R=m2D.begin();iter2R!=m2D.end();iter2R++,id2R++) - { - for(std::map::const_iterator iter2C=(*iter2R).begin();iter2C!=(*iter2R).end();iter2C++) - { - int id1R=0; - for(std::vector< std::map >::const_iterator iter1R=m1D.begin();iter1R!=m1D.end();iter1R++,id1R++) - { - for(std::map::const_iterator iter1C=(*iter1R).begin();iter1C!=(*iter1R).end();iter1C++) - { - _matrix[corrCellIdTrg[id1R*nbOf2DCellsTrg+id2R]][corrCellIdSrc[(*iter1C).first*nbOf2DCellsSrc+(*iter2C).first]]=(*iter1C).second*((*iter2C).second); - } - } - } - } -} - -void MEDCouplingRemapper::printMatrix(const std::vector >& m) -{ - int id=0; - for(std::vector >::const_iterator iter1=m.begin();iter1!=m.end();iter1++,id++) - { - std::cout << "Target Cell # " << id << " : "; - for(std::map::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++) - std::cout << "(" << (*iter2).first << "," << (*iter2).second << "), "; - std::cout << std::endl; - } -} diff --git a/src/MEDCoupling/MEDCouplingRemapper.hxx b/src/MEDCoupling/MEDCouplingRemapper.hxx deleted file mode 100644 index 5e2bd63dd..000000000 --- a/src/MEDCoupling/MEDCouplingRemapper.hxx +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __PARAMEDMEM_MEDCOUPLINGREMAPPER_HXX__ -#define __PARAMEDMEM_MEDCOUPLINGREMAPPER_HXX__ - -#include "MEDCoupling.hxx" -#include "MEDCouplingTimeLabel.hxx" -#include "InterpolationOptions.hxx" -#include "MEDCouplingNatureOfField.hxx" - -#include -#include - -namespace ParaMEDMEM -{ - class MEDCouplingMesh; - class MEDCouplingUMesh; - class MEDCouplingFieldDouble; -} - -namespace ParaMEDMEM -{ - class MEDCouplingRemapper : public TimeLabel, public INTERP_KERNEL::InterpolationOptions - { - public: - MEDCOUPLINGREMAPPER_EXPORT MEDCouplingRemapper(); - MEDCOUPLINGREMAPPER_EXPORT ~MEDCouplingRemapper(); - MEDCOUPLINGREMAPPER_EXPORT int prepare(const MEDCouplingMesh *srcMesh, const MEDCouplingMesh *targetMesh, const char *method); - MEDCOUPLINGREMAPPER_EXPORT void transfer(const MEDCouplingFieldDouble *srcField, MEDCouplingFieldDouble *targetField, double dftValue); - MEDCOUPLINGREMAPPER_EXPORT void reverseTransfer(MEDCouplingFieldDouble *srcField, const MEDCouplingFieldDouble *targetField, double dftValue); - MEDCOUPLINGREMAPPER_EXPORT MEDCouplingFieldDouble *transferField(const MEDCouplingFieldDouble *srcField, double dftValue); - MEDCOUPLINGREMAPPER_EXPORT MEDCouplingFieldDouble *reverseTransferField(const MEDCouplingFieldDouble *targetField, double dftValue); - MEDCOUPLINGREMAPPER_EXPORT bool setOptionInt(const std::string& key, int value); - MEDCOUPLINGREMAPPER_EXPORT bool setOptionDouble(const std::string& key, double value); - MEDCOUPLINGREMAPPER_EXPORT bool setOptionString(const std::string& key, std::string& value); - public: - MEDCOUPLINGREMAPPER_EXPORT static void printMatrix(const std::vector >& m); - private: - int prepareUU(const char *method); - int prepareEE(const char *method); - void updateTime(); - void releaseData(bool matrixSuppression); - void computeDeno(NatureOfField nat, const MEDCouplingFieldDouble *srcField, const MEDCouplingFieldDouble *trgField); - void computeDenoFromScratch(NatureOfField nat, const MEDCouplingFieldDouble *srcField, const MEDCouplingFieldDouble *trgField); - void computeProduct(const double *inputPointer, int inputNbOfCompo, double dftValue, double *resPointer); - void computeReverseProduct(const double *inputPointer, int inputNbOfCompo, double dftValue, double *resPointer); - void buildFinalInterpolationMatrixByConvolution(const std::vector< std::map >& m1D, - const std::vector< std::map >& m2D, - const int *corrCellIdSrc, int nbOf2DCellsSrc, int nbOf1DCellsSrc, - const int *corrCellIdTrg); - static void reverseMatrix(const std::vector >& matIn, int nbColsMatIn, - std::vector >& matOut); - static void computeRowSumAndColSum(const std::vector >& matrixDeno, - std::vector >& deno, std::vector >& denoReverse); - static void computeColSumAndRowSum(const std::vector >& matrixDeno, - std::vector >& deno, std::vector >& denoReverse); - private: - MEDCouplingMesh *_src_mesh; - MEDCouplingMesh *_target_mesh; - std::string _src_method; - std::string _target_method; - NatureOfField _nature_of_deno; - unsigned int _time_deno_update; - std::vector > _matrix; - std::vector > _deno_multiply; - std::vector > _deno_reverse_multiply; - }; -} - -#endif diff --git a/src/MEDCoupling/MEDCouplingSMesh.cxx b/src/MEDCoupling/MEDCouplingSMesh.cxx new file mode 100644 index 000000000..724b157dd --- /dev/null +++ b/src/MEDCoupling/MEDCouplingSMesh.cxx @@ -0,0 +1,164 @@ +// Copyright (C) 2007-2008 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. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#include "MEDCouplingSMesh.hxx" +#include "MemArray.hxx" + +using namespace ParaMEDMEM; + +MEDCouplingSMesh::MEDCouplingSMesh():_x_array(0),_y_array(0),_z_array(0) +{ +} + +MEDCouplingSMesh::~MEDCouplingSMesh() +{ + if(_x_array) + _x_array->decrRef(); + if(_y_array) + _y_array->decrRef(); + if(_z_array) + _z_array->decrRef(); +} + +MEDCouplingSMesh *MEDCouplingSMesh::New() +{ + return new MEDCouplingSMesh; +} + +void MEDCouplingSMesh::updateTime() +{ + if(_x_array) + updateTimeWith(*_x_array); + if(_y_array) + updateTimeWith(*_y_array); + if(_z_array) + updateTimeWith(*_z_array); +} + +void MEDCouplingSMesh::checkCoherency() const throw(INTERP_KERNEL::Exception) +{ + const char msg0[]="Invalid "; + const char msg1[]=" array ! Must contain more than 1 element."; + if(_x_array) + if(_x_array->getNbOfElems()<2) + { + std::ostringstream os; os << msg0 << 'X' << msg1; + throw INTERP_KERNEL::Exception(os.str().c_str()); + } + if(_y_array) + if(_y_array->getNbOfElems()<2) + { + std::ostringstream os; os << msg0 << 'Y' << msg1; + throw INTERP_KERNEL::Exception(os.str().c_str()); + } + if(_z_array) + if(_z_array->getNbOfElems()<2) + { + std::ostringstream os; os << msg0 << 'Z' << msg1; + throw INTERP_KERNEL::Exception(os.str().c_str()); + } +} + +bool MEDCouplingSMesh::isStructured() const +{ + return true; +} + +int MEDCouplingSMesh::getNumberOfCells() const +{ + int ret=1; + if(_x_array) + ret*=_x_array->getNbOfElems()-1; + if(_y_array) + ret*=_y_array->getNbOfElems()-1; + if(_z_array) + ret*=_z_array->getNbOfElems()-1; + return ret; +} + +int MEDCouplingSMesh::getNumberOfNodes() const +{ + int ret=1; + if(_x_array) + ret*=_x_array->getNbOfElems(); + if(_y_array) + ret*=_y_array->getNbOfElems(); + if(_z_array) + ret*=_z_array->getNbOfElems(); + return ret; +} + +int MEDCouplingSMesh::getSpaceDimension() const +{ + int ret=0; + if(_x_array) + ret++; + if(_y_array) + ret++; + if(_z_array) + ret++; + return ret; +} + +int MEDCouplingSMesh::getMeshDimension() const +{ + int ret=0; + if(_x_array) + ret++; + if(_y_array) + ret++; + if(_z_array) + ret++; + return ret; +} + +DataArrayDouble *MEDCouplingSMesh::getCoordsAt(int i) const throw(INTERP_KERNEL::Exception) +{ + switch(i) + { + case 0: + return _x_array; + case 1: + return _y_array; + case 2: + return _z_array; + default: + throw INTERP_KERNEL::Exception("Invalid rank specified must be 0 or 1 or 2."); + } +} + +void MEDCouplingSMesh::setCoords(DataArrayDouble *coordsX, DataArrayDouble *coordsY, DataArrayDouble *coordsZ) +{ + if(_x_array) + _x_array->decrRef(); + _x_array=coordsX; + if(_x_array) + _x_array->incrRef(); + if(_y_array) + _y_array->decrRef(); + _y_array=coordsY; + if(_y_array) + _y_array->incrRef(); + if(_z_array) + _z_array->decrRef(); + _z_array=coordsZ; + if(_z_array) + _z_array->incrRef(); + declareAsNew(); +} + diff --git a/src/MEDCoupling/MEDCouplingSMesh.hxx b/src/MEDCoupling/MEDCouplingSMesh.hxx new file mode 100644 index 000000000..d782107db --- /dev/null +++ b/src/MEDCoupling/MEDCouplingSMesh.hxx @@ -0,0 +1,53 @@ +// Copyright (C) 2007-2008 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. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#ifndef __PARAMEDMEM_MEDCOUPLINGSMESH_HXX__ +#define __PARAMEDMEM_MEDCOUPLINGSMESH_HXX__ + +#include "MEDCouplingMesh.hxx" + +namespace ParaMEDMEM +{ + class DataArrayDouble; + + class MEDCouplingSMesh : public MEDCouplingMesh + { + public: + static MEDCouplingSMesh *New(); + void updateTime(); + void checkCoherency() const throw(INTERP_KERNEL::Exception); + bool isStructured() const; + int getNumberOfCells() const; + int getNumberOfNodes() const; + int getSpaceDimension() const; + int getMeshDimension() const; + DataArrayDouble *getCoordsAt(int i) const throw(INTERP_KERNEL::Exception); + void setCoords(DataArrayDouble *coordsX, + DataArrayDouble *coordsY=0, + DataArrayDouble *coordsZ=0); + private: + MEDCouplingSMesh(); + ~MEDCouplingSMesh(); + private: + DataArrayDouble *_x_array; + DataArrayDouble *_y_array; + DataArrayDouble *_z_array; + }; +} + +#endif diff --git a/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx b/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx deleted file mode 100644 index a030e1b4c..000000000 --- a/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx +++ /dev/null @@ -1,1064 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "MEDCouplingTimeDiscretization.hxx" -#include "MEDCouplingMemArray.hxx" - -#include "InterpKernelExprParser.hxx" - -#include -#include - -using namespace ParaMEDMEM; - -const char MEDCouplingNoTimeLabel::EXCEPTION_MSG[]="MEDCouplingNoTimeLabel::setTime : no time info attached."; - -const char MEDCouplingWithTimeStep::EXCEPTION_MSG[]="No data on this time."; - -const char MEDCouplingConstOnTimeInterval::EXCEPTION_MSG[]="No data on this time."; - -const double MEDCouplingTimeDiscretization::TIME_TOLERANCE_DFT=1.e-12; - -MEDCouplingTimeDiscretization *MEDCouplingTimeDiscretization::New(TypeOfTimeDiscretization type) -{ - switch(type) - { - case MEDCouplingNoTimeLabel::DISCRETIZATION: - return new MEDCouplingNoTimeLabel; - case MEDCouplingWithTimeStep::DISCRETIZATION: - return new MEDCouplingWithTimeStep; - case MEDCouplingConstOnTimeInterval::DISCRETIZATION: - return new MEDCouplingConstOnTimeInterval; - default: - throw INTERP_KERNEL::Exception("Time discretization not implemented yet"); - } -} - -void MEDCouplingTimeDiscretization::updateTime() -{ - if(_array) - updateTimeWith(*_array); -} - -bool MEDCouplingTimeDiscretization::areCompatible(const MEDCouplingTimeDiscretization *other) const -{ - if(std::fabs(_time_tolerance-other->_time_tolerance)>1.e-16) - return false; - if(_array==0 && other->_array==0) - return true; - if(_array==0 || other->_array==0) - return false; - if(_array->getNumberOfComponents()!=other->_array->getNumberOfComponents()) - return false; - return true; -} - -bool MEDCouplingTimeDiscretization::areCompatibleForMul(const MEDCouplingTimeDiscretization *other) const -{ - if(std::fabs(_time_tolerance-other->_time_tolerance)>1.e-16) - return false; - if(_array==0 && other->_array==0) - return true; - if(_array==0 || other->_array==0) - return false; - int nbC1=_array->getNumberOfComponents(); - int nbC2=other->_array->getNumberOfComponents(); - int nbMin=std::min(nbC1,nbC2); - if(nbC1!=nbC2 && nbMin!=1) - return false; - return true; -} - -bool MEDCouplingTimeDiscretization::isEqual(const MEDCouplingTimeDiscretization *other, double prec) const -{ - if(!areCompatible(other)) - return false; - if(_array==other->_array) - return true; - return _array->isEqual(*other->_array,prec); -} - -MEDCouplingTimeDiscretization *MEDCouplingTimeDiscretization::buildNewTimeReprFromThis(const MEDCouplingTimeDiscretization *other, - TypeOfTimeDiscretization type, bool deepCpy) const -{ - MEDCouplingTimeDiscretization *ret=MEDCouplingTimeDiscretization::New(type); - DataArrayDouble *arrSrc=getArray(); - DataArrayDouble *arr=0; - if(arrSrc) - arr=arrSrc->performCpy(deepCpy); - else - arr=0; - ret->setArray(arr,0); - arr->decrRef(); - return ret; -} - -void MEDCouplingTimeDiscretization::getTinySerializationIntInformation(std::vector& tinyInfo) const -{ - if(_array) - { - tinyInfo.push_back(_array->getNumberOfTuples()); - tinyInfo.push_back(_array->getNumberOfComponents()); - } - else - { - tinyInfo.push_back(-1); - tinyInfo.push_back(-1); - } -} - -void MEDCouplingTimeDiscretization::resizeForUnserialization(const std::vector& tinyInfoI, std::vector& arrays) -{ - arrays.resize(1); - if(_array!=0) - _array->decrRef(); - DataArrayDouble *arr=0; - if(tinyInfoI[0]!=-1 && tinyInfoI[1]!=-1) - { - arr=DataArrayDouble::New(); - arr->alloc(tinyInfoI[0],tinyInfoI[1]); - } - _array=arr; - arrays[0]=arr; -} - -void MEDCouplingTimeDiscretization::finishUnserialization(const std::vector& tinyInfoI, const std::vector& tinyInfoD, const std::vector& tinyInfoS) -{ - _time_tolerance=tinyInfoD[0]; - int nbOfCompo=_array->getNumberOfComponents(); - for(int i=0;isetInfoOnComponent(i,tinyInfoS[i].c_str()); -} - -void MEDCouplingTimeDiscretization::getTinySerializationDbleInformation(std::vector& tinyInfo) const -{ - tinyInfo.push_back(_time_tolerance); -} - -void MEDCouplingTimeDiscretization::getTinySerializationStrInformation(std::vector& tinyInfo) const -{ - int nbOfCompo=_array->getNumberOfComponents(); - for(int i=0;igetInfoOnComponent(i)); -} - -MEDCouplingTimeDiscretization::MEDCouplingTimeDiscretization():_time_tolerance(TIME_TOLERANCE_DFT),_array(0) -{ -} - -MEDCouplingTimeDiscretization::MEDCouplingTimeDiscretization(const MEDCouplingTimeDiscretization& other, bool deepCpy):_time_tolerance(other._time_tolerance) -{ - if(other._array) - _array=other._array->performCpy(deepCpy); - else - _array=0; -} - -MEDCouplingTimeDiscretization::~MEDCouplingTimeDiscretization() -{ - if(_array) - _array->decrRef(); -} - -void MEDCouplingTimeDiscretization::setArray(DataArrayDouble *array, TimeLabel *owner) -{ - if(array!=_array) - { - if(_array) - _array->decrRef(); - _array=array; - if(_array) - _array->incrRef(); - if(owner) - owner->declareAsNew(); - } -} - -void MEDCouplingTimeDiscretization::setArrays(const std::vector& arrays, TimeLabel *owner) throw(INTERP_KERNEL::Exception) -{ - if(arrays.size()!=1) - throw INTERP_KERNEL::Exception("MEDCouplingTimeDiscretization::setArrays : number of arrays must be one."); - setArray(arrays.back(),owner); -} - -void MEDCouplingTimeDiscretization::getArrays(std::vector& arrays) const -{ - arrays.resize(1); - arrays[0]=_array; -} - -bool MEDCouplingTimeDiscretization::isBefore(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception) -{ - int dt,it; - double time1=getEndTime(dt,it)-_time_tolerance; - double time2=other->getStartTime(dt,it)+other->getTimeTolerance(); - return time1<=time2; -} - -bool MEDCouplingTimeDiscretization::isStrictlyBefore(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception) -{ - int dt,it; - double time1=getEndTime(dt,it)+_time_tolerance; - double time2=other->getStartTime(dt,it)-other->getTimeTolerance(); - return time1getPointer()+compoId; - int nbOfComp=_array->getNumberOfComponents(); - int nbOfTuple=_array->getNumberOfTuples(); - for(int i=0;igetNumberOfTuples(); - int oldNbOfComp=_array->getNumberOfComponents(); - newArr->alloc(nbOfTuples,nbOfComp); - const double *ptr=_array->getConstPointer(); - double *ptrToFill=newArr->getPointer(); - for(int i=0;i(oss,", ")); - oss << ") : Evaluation of function failed !"; - newArr->decrRef(); - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } - } - _array->decrRef(); - _array=newArr; -} - -void MEDCouplingTimeDiscretization::applyFunc(int nbOfComp, const char *func) -{ - INTERP_KERNEL::ExprParser expr(func); - expr.parse(); - std::set vars; - expr.getTrueSetOfVars(vars); - int oldNbOfComp=_array->getNumberOfComponents(); - if((int)vars.size()>oldNbOfComp) - { - std::ostringstream oss; oss << "The field has a " << oldNbOfComp << " components and there are "; - oss << vars.size() << " variables : "; - std::copy(vars.begin(),vars.end(),std::ostream_iterator(oss," ")); - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } - std::vector varsV(vars.begin(),vars.end()); - expr.prepareExprEvaluation(varsV); - // - DataArrayDouble *newArr=DataArrayDouble::New(); - int nbOfTuples=_array->getNumberOfTuples(); - newArr->alloc(nbOfTuples,nbOfComp); - const double *ptr=_array->getConstPointer(); - double *ptrToFill=newArr->getPointer(); - for(int i=0;i(oss,", ")); - oss << ") : Evaluation of function failed !" << e.what(); - newArr->decrRef(); - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } - } - _array->decrRef(); - _array=newArr; -} - -void MEDCouplingTimeDiscretization::applyFunc(const char *func) -{ - INTERP_KERNEL::ExprParser expr(func); - expr.parse(); - expr.prepareExprEvaluationVec(); - // - DataArrayDouble *newArr=DataArrayDouble::New(); - int nbOfTuples=_array->getNumberOfTuples(); - int nbOfComp=_array->getNumberOfComponents(); - newArr->alloc(nbOfTuples,nbOfComp); - const double *ptr=_array->getConstPointer(); - double *ptrToFill=newArr->getPointer(); - for(int i=0;i(oss,", ")); - oss << ") : Evaluation of function failed ! " << e.what(); - newArr->decrRef(); - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } - } - _array->decrRef(); - _array=newArr; -} - -MEDCouplingNoTimeLabel::MEDCouplingNoTimeLabel() -{ -} - -MEDCouplingNoTimeLabel::MEDCouplingNoTimeLabel(const MEDCouplingTimeDiscretization& other, bool deepCpy):MEDCouplingTimeDiscretization(other,deepCpy) -{ -} - -bool MEDCouplingNoTimeLabel::areCompatible(const MEDCouplingTimeDiscretization *other) const -{ - if(!MEDCouplingTimeDiscretization::areCompatible(other)) - return false; - const MEDCouplingNoTimeLabel *otherC=dynamic_cast(other); - return otherC!=0; -} - -bool MEDCouplingNoTimeLabel::areCompatibleForMul(const MEDCouplingTimeDiscretization *other) const -{ - if(!MEDCouplingTimeDiscretization::areCompatibleForMul(other)) - return false; - const MEDCouplingNoTimeLabel *otherC=dynamic_cast(other); - return otherC!=0; -} - -bool MEDCouplingNoTimeLabel::isEqual(const MEDCouplingTimeDiscretization *other, double prec) const -{ - const MEDCouplingNoTimeLabel *otherC=dynamic_cast(other); - if(!otherC) - return false; - return MEDCouplingTimeDiscretization::isEqual(other,prec); -} - -MEDCouplingTimeDiscretization *MEDCouplingNoTimeLabel::aggregate(const MEDCouplingTimeDiscretization *other) const -{ - const MEDCouplingNoTimeLabel *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("NoTimeLabel::aggregation on mismatched time discretization !"); - MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel; - ret->setTimeTolerance(getTimeTolerance()); - DataArrayDouble *arr=DataArrayDouble::aggregate(getArray(),other->getArray()); - ret->setArray(arr,0); - arr->decrRef(); - return ret; -} - -MEDCouplingTimeDiscretization *MEDCouplingNoTimeLabel::add(const MEDCouplingTimeDiscretization *other) const -{ - const MEDCouplingNoTimeLabel *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("NoTimeLabel::add on mismatched time discretization !"); - MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel; - DataArrayDouble *arr=DataArrayDouble::add(getArray(),other->getArray()); - ret->setArray(arr,0); - arr->decrRef(); - return ret; -} - -void MEDCouplingNoTimeLabel::addEqual(const MEDCouplingTimeDiscretization *other) -{ - const MEDCouplingNoTimeLabel *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("NoTimeLabel::addEqual on mismatched time discretization !"); - getArray()->addEqual(other->getArray()); -} - -MEDCouplingTimeDiscretization *MEDCouplingNoTimeLabel::substract(const MEDCouplingTimeDiscretization *other) const -{ - const MEDCouplingNoTimeLabel *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("NoTimeLabel::substract on mismatched time discretization !"); - MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel; - DataArrayDouble *arr=DataArrayDouble::substract(getArray(),other->getArray()); - ret->setArray(arr,0); - arr->decrRef(); - return ret; -} - -void MEDCouplingNoTimeLabel::substractEqual(const MEDCouplingTimeDiscretization *other) -{ - const MEDCouplingNoTimeLabel *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("NoTimeLabel::substractEqual on mismatched time discretization !"); - getArray()->substractEqual(other->getArray()); -} - -MEDCouplingTimeDiscretization *MEDCouplingNoTimeLabel::multiply(const MEDCouplingTimeDiscretization *other) const -{ - const MEDCouplingNoTimeLabel *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("NoTimeLabel::multiply on mismatched time discretization !"); - MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel; - DataArrayDouble *arr=DataArrayDouble::multiply(getArray(),other->getArray()); - ret->setArray(arr,0); - arr->decrRef(); - return ret; -} - -void MEDCouplingNoTimeLabel::multiplyEqual(const MEDCouplingTimeDiscretization *other) -{ - const MEDCouplingNoTimeLabel *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("NoTimeLabel::multiplyEqual on mismatched time discretization !"); - getArray()->multiplyEqual(other->getArray()); -} - -MEDCouplingTimeDiscretization *MEDCouplingNoTimeLabel::divide(const MEDCouplingTimeDiscretization *other) const -{ - const MEDCouplingNoTimeLabel *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("divide on mismatched time discretization !"); - MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel; - DataArrayDouble *arr=DataArrayDouble::divide(getArray(),other->getArray()); - ret->setArray(arr,0); - arr->decrRef(); - return ret; -} - -void MEDCouplingNoTimeLabel::divideEqual(const MEDCouplingTimeDiscretization *other) -{ - const MEDCouplingNoTimeLabel *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("NoTimeLabel::divideEqual on mismatched time discretization !"); - getArray()->divideEqual(other->getArray()); -} - -MEDCouplingTimeDiscretization *MEDCouplingNoTimeLabel::performCpy(bool deepCpy) const -{ - return new MEDCouplingNoTimeLabel(*this,deepCpy); -} - -void MEDCouplingNoTimeLabel::checkTimePresence(double time) const throw(INTERP_KERNEL::Exception) -{ - throw INTERP_KERNEL::Exception(EXCEPTION_MSG); -} - -std::vector< const DataArrayDouble *> MEDCouplingNoTimeLabel::getArraysForTime(double time) const throw(INTERP_KERNEL::Exception) -{ - throw INTERP_KERNEL::Exception(EXCEPTION_MSG); -} - -void MEDCouplingNoTimeLabel::getValueForTime(double time, const std::vector& vals, double *res) const -{ - throw INTERP_KERNEL::Exception(EXCEPTION_MSG); -} - -bool MEDCouplingNoTimeLabel::isBefore(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception) -{ - throw INTERP_KERNEL::Exception(EXCEPTION_MSG); -} - -bool MEDCouplingNoTimeLabel::isStrictlyBefore(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception) -{ - throw INTERP_KERNEL::Exception(EXCEPTION_MSG); -} - -double MEDCouplingNoTimeLabel::getStartTime(int& dt, int& it) const throw(INTERP_KERNEL::Exception) -{ - throw INTERP_KERNEL::Exception(EXCEPTION_MSG); -} - -double MEDCouplingNoTimeLabel::getEndTime(int& dt, int& it) const throw(INTERP_KERNEL::Exception) -{ - throw INTERP_KERNEL::Exception(EXCEPTION_MSG); -} - -void MEDCouplingNoTimeLabel::setStartTime(double time, int dt, int it) throw(INTERP_KERNEL::Exception) -{ - throw INTERP_KERNEL::Exception(EXCEPTION_MSG); -} - -void MEDCouplingNoTimeLabel::setEndTime(double time, int dt, int it) throw(INTERP_KERNEL::Exception) -{ - throw INTERP_KERNEL::Exception(EXCEPTION_MSG); -} - -void MEDCouplingNoTimeLabel::getValueOnTime(int eltId, double time, double *value) const throw(INTERP_KERNEL::Exception) -{ - throw INTERP_KERNEL::Exception(EXCEPTION_MSG); -} - -void MEDCouplingNoTimeLabel::getValueOnDiscTime(int eltId, int dt, int it, double *value) const throw(INTERP_KERNEL::Exception) -{ - throw INTERP_KERNEL::Exception(EXCEPTION_MSG); -} - -MEDCouplingWithTimeStep::MEDCouplingWithTimeStep(const MEDCouplingWithTimeStep& other, bool deepCpy):MEDCouplingTimeDiscretization(other,deepCpy), - _time(other._time),_dt(other._dt),_it(other._it) -{ -} - -MEDCouplingWithTimeStep::MEDCouplingWithTimeStep():_time(0.),_dt(-1),_it(-1) -{ -} - -void MEDCouplingWithTimeStep::getTinySerializationIntInformation(std::vector& tinyInfo) const -{ - MEDCouplingTimeDiscretization::getTinySerializationIntInformation(tinyInfo); - tinyInfo.push_back(_dt); - tinyInfo.push_back(_it); -} - -void MEDCouplingWithTimeStep::getTinySerializationDbleInformation(std::vector& tinyInfo) const -{ - MEDCouplingTimeDiscretization::getTinySerializationDbleInformation(tinyInfo); - tinyInfo.push_back(_time); -} - -void MEDCouplingWithTimeStep::finishUnserialization(const std::vector& tinyInfoI, const std::vector& tinyInfoD, const std::vector& tinyInfoS) -{ - MEDCouplingTimeDiscretization::finishUnserialization(tinyInfoI,tinyInfoD,tinyInfoS); - _time=tinyInfoD[1]; - _dt=tinyInfoI[2]; - _it=tinyInfoI[3]; -} - -bool MEDCouplingWithTimeStep::areCompatible(const MEDCouplingTimeDiscretization *other) const -{ - if(!MEDCouplingTimeDiscretization::areCompatible(other)) - return false; - const MEDCouplingWithTimeStep *otherC=dynamic_cast(other); - if(!otherC) - return false; - return std::fabs(_time-otherC->_time)<_time_tolerance; -} - -bool MEDCouplingWithTimeStep::areCompatibleForMul(const MEDCouplingTimeDiscretization *other) const -{ - if(!MEDCouplingTimeDiscretization::areCompatibleForMul(other)) - return false; - const MEDCouplingWithTimeStep *otherC=dynamic_cast(other); - if(!otherC) - return false; - return std::fabs(_time-otherC->_time)<_time_tolerance; -} - -bool MEDCouplingWithTimeStep::isEqual(const MEDCouplingTimeDiscretization *other, double prec) const -{ - const MEDCouplingWithTimeStep *otherC=dynamic_cast(other); - if(!otherC) - return false; - if(_dt!=otherC->_dt) - return false; - if(_it!=otherC->_it) - return false; - if(std::fabs(_time-otherC->_time)>_time_tolerance) - return false; - return MEDCouplingTimeDiscretization::isEqual(other,prec); -} - -MEDCouplingTimeDiscretization *MEDCouplingWithTimeStep::aggregate(const MEDCouplingTimeDiscretization *other) const -{ - const MEDCouplingWithTimeStep *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("WithTimeStep::aggregation on mismatched time discretization !"); - MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep; - ret->setTimeTolerance(getTimeTolerance()); - DataArrayDouble *arr=DataArrayDouble::aggregate(getArray(),other->getArray()); - ret->setArray(arr,0); - arr->decrRef(); - int tmp1,tmp2; - double tmp3=getStartTime(tmp1,tmp2); - ret->setStartTime(tmp3,tmp1,tmp2); - return ret; -} - -MEDCouplingTimeDiscretization *MEDCouplingWithTimeStep::add(const MEDCouplingTimeDiscretization *other) const -{ - const MEDCouplingWithTimeStep *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("WithTimeStep::add on mismatched time discretization !"); - MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep; - DataArrayDouble *arr=DataArrayDouble::add(getArray(),other->getArray()); - ret->setArray(arr,0); - arr->decrRef(); - int tmp1,tmp2; - double tmp3=getStartTime(tmp1,tmp2); - ret->setStartTime(tmp3,tmp1,tmp2); - return ret; -} - -void MEDCouplingWithTimeStep::addEqual(const MEDCouplingTimeDiscretization *other) -{ - const MEDCouplingWithTimeStep *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("WithTimeStep::addEqual on mismatched time discretization !"); - getArray()->addEqual(other->getArray()); -} - -MEDCouplingTimeDiscretization *MEDCouplingWithTimeStep::substract(const MEDCouplingTimeDiscretization *other) const -{ - const MEDCouplingWithTimeStep *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("WithTimeStep::substract on mismatched time discretization !"); - MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep; - DataArrayDouble *arr=DataArrayDouble::substract(getArray(),other->getArray()); - ret->setArray(arr,0); - arr->decrRef(); - int tmp1,tmp2; - double tmp3=getStartTime(tmp1,tmp2); - ret->setStartTime(tmp3,tmp1,tmp2); - return ret; -} - -void MEDCouplingWithTimeStep::substractEqual(const MEDCouplingTimeDiscretization *other) -{ - const MEDCouplingWithTimeStep *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("WithTimeStep::substractEqual on mismatched time discretization !"); - getArray()->substractEqual(other->getArray()); -} - -MEDCouplingTimeDiscretization *MEDCouplingWithTimeStep::multiply(const MEDCouplingTimeDiscretization *other) const -{ - const MEDCouplingWithTimeStep *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("WithTimeStep::multiply on mismatched time discretization !"); - MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep; - DataArrayDouble *arr=DataArrayDouble::multiply(getArray(),other->getArray()); - ret->setArray(arr,0); - arr->decrRef(); - int tmp1,tmp2; - double tmp3=getStartTime(tmp1,tmp2); - ret->setStartTime(tmp3,tmp1,tmp2); - return ret; -} - -void MEDCouplingWithTimeStep::multiplyEqual(const MEDCouplingTimeDiscretization *other) -{ - const MEDCouplingWithTimeStep *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("WithTimeStep::multiplyEqual on mismatched time discretization !"); - getArray()->multiplyEqual(other->getArray()); -} - -MEDCouplingTimeDiscretization *MEDCouplingWithTimeStep::divide(const MEDCouplingTimeDiscretization *other) const -{ - const MEDCouplingWithTimeStep *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("WithTimeStep::divide on mismatched time discretization !"); - MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep; - DataArrayDouble *arr=DataArrayDouble::divide(getArray(),other->getArray()); - ret->setArray(arr,0); - arr->decrRef(); - int tmp1,tmp2; - double tmp3=getStartTime(tmp1,tmp2); - ret->setStartTime(tmp3,tmp1,tmp2); - return ret; -} - -void MEDCouplingWithTimeStep::divideEqual(const MEDCouplingTimeDiscretization *other) -{ - const MEDCouplingWithTimeStep *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("WithTimeStep::divideEqual on mismatched time discretization !"); - getArray()->divideEqual(other->getArray()); -} - -MEDCouplingTimeDiscretization *MEDCouplingWithTimeStep::performCpy(bool deepCpy) const -{ - return new MEDCouplingWithTimeStep(*this,deepCpy); -} - -void MEDCouplingWithTimeStep::checkNoTimePresence() const throw(INTERP_KERNEL::Exception) -{ - throw INTERP_KERNEL::Exception("No time specified on a field defined on one time"); -} - -void MEDCouplingWithTimeStep::checkTimePresence(double time) const throw(INTERP_KERNEL::Exception) -{ - if(std::fabs(time-_time)>_time_tolerance) - { - std::ostringstream stream; - stream << "The field is defined on time " << _time << " with eps=" << _time_tolerance << " and asking time = " << time << " !"; - throw INTERP_KERNEL::Exception(stream.str().c_str()); - } -} - -std::vector< const DataArrayDouble *> MEDCouplingWithTimeStep::getArraysForTime(double time) const throw(INTERP_KERNEL::Exception) -{ - if(std::fabs(time-_time)<=_time_tolerance) - { - std::vector< const DataArrayDouble *> ret(1); - ret[0]=_array; - return ret; - } - else - throw INTERP_KERNEL::Exception(EXCEPTION_MSG); -} - -void MEDCouplingWithTimeStep::getValueForTime(double time, const std::vector& vals, double *res) const -{ - std::copy(vals.begin(),vals.end(),res); -} - -void MEDCouplingWithTimeStep::getValueOnTime(int eltId, double time, double *value) const throw(INTERP_KERNEL::Exception) -{ - if(std::fabs(time-_time)<=_time_tolerance) - if(_array) - _array->getTuple(eltId,value); - else - throw INTERP_KERNEL::Exception("No array existing."); - else - throw INTERP_KERNEL::Exception(EXCEPTION_MSG); -} - -void MEDCouplingWithTimeStep::getValueOnDiscTime(int eltId, int dt, int it, double *value) const throw(INTERP_KERNEL::Exception) -{ - if(_dt==dt && _it==it) - if(_array) - _array->getTuple(eltId,value); - else - throw INTERP_KERNEL::Exception("No array existing."); - else - throw INTERP_KERNEL::Exception("No data on this discrete time."); -} - -MEDCouplingConstOnTimeInterval::MEDCouplingConstOnTimeInterval():_start_time(0.),_end_time(0.),_start_dt(-1),_end_dt(-1),_start_it(-1),_end_it(-1) -{ -} - -void MEDCouplingConstOnTimeInterval::getTinySerializationIntInformation(std::vector& tinyInfo) const -{ - MEDCouplingTimeDiscretization::getTinySerializationIntInformation(tinyInfo); - tinyInfo.push_back(_start_dt); - tinyInfo.push_back(_start_it); - tinyInfo.push_back(_end_dt); - tinyInfo.push_back(_end_it); -} - -void MEDCouplingConstOnTimeInterval::getTinySerializationDbleInformation(std::vector& tinyInfo) const -{ - MEDCouplingTimeDiscretization::getTinySerializationDbleInformation(tinyInfo); - tinyInfo.push_back(_start_time); - tinyInfo.push_back(_end_time); -} - -void MEDCouplingConstOnTimeInterval::finishUnserialization(const std::vector& tinyInfoI, const std::vector& tinyInfoD, const std::vector& tinyInfoS) -{ - MEDCouplingTimeDiscretization::finishUnserialization(tinyInfoI,tinyInfoD,tinyInfoS); - _start_time=tinyInfoD[1]; - _end_time=tinyInfoD[2]; - _start_dt=tinyInfoI[2]; - _start_it=tinyInfoI[3]; - _end_dt=tinyInfoI[4]; - _end_it=tinyInfoI[5]; -} - -MEDCouplingConstOnTimeInterval::MEDCouplingConstOnTimeInterval(const MEDCouplingConstOnTimeInterval& other, bool deepCpy): - MEDCouplingTimeDiscretization(other,deepCpy),_start_time(other._start_time),_end_time(other._end_time),_start_dt(other._start_dt), - _end_dt(other._end_dt),_start_it(other._start_it),_end_it(other._end_it) -{ -} - -MEDCouplingTimeDiscretization *MEDCouplingConstOnTimeInterval::performCpy(bool deepCpy) const -{ - return new MEDCouplingConstOnTimeInterval(*this,deepCpy); -} - -std::vector< const DataArrayDouble *> MEDCouplingConstOnTimeInterval::getArraysForTime(double time) const throw(INTERP_KERNEL::Exception) -{ - if(time>_start_time-_time_tolerance && time<_end_time+_time_tolerance) - { - std::vector< const DataArrayDouble *> ret(1); - ret[0]=_array; - return ret; - } - else - throw INTERP_KERNEL::Exception(EXCEPTION_MSG); -} - -void MEDCouplingConstOnTimeInterval::getValueForTime(double time, const std::vector& vals, double *res) const -{ - std::copy(vals.begin(),vals.end(),res); -} - -bool MEDCouplingConstOnTimeInterval::areCompatible(const MEDCouplingTimeDiscretization *other) const -{ - if(!MEDCouplingTimeDiscretization::areCompatible(other)) - return false; - const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast(other); - if(!otherC) - return false; - return (std::fabs(_start_time-otherC->_start_time)<_time_tolerance && std::fabs(_end_time-otherC->_end_time)<_time_tolerance); -} - -bool MEDCouplingConstOnTimeInterval::areCompatibleForMul(const MEDCouplingTimeDiscretization *other) const -{ - if(!MEDCouplingTimeDiscretization::areCompatible(other)) - return false; - const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast(other); - if(!otherC) - return false; - return (std::fabs(_start_time-otherC->_start_time)<_time_tolerance && std::fabs(_end_time-otherC->_end_time)<_time_tolerance); -} - -bool MEDCouplingConstOnTimeInterval::isEqual(const MEDCouplingTimeDiscretization *other, double prec) const -{ - const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast(other); - if(!otherC) - return false; - if(_start_dt!=otherC->_start_dt) - return false; - if(_start_it!=otherC->_start_it) - return false; - if(std::fabs(_start_time-otherC->_start_time)>_time_tolerance) - return false; - if(_end_dt!=otherC->_end_dt) - return false; - if(_end_it!=otherC->_end_it) - return false; - if(std::fabs(_end_time-otherC->_end_time)>_time_tolerance) - return false; - return MEDCouplingTimeDiscretization::isEqual(other,prec); -} - -void MEDCouplingConstOnTimeInterval::getValueOnTime(int eltId, double time, double *value) const throw(INTERP_KERNEL::Exception) -{ - if(time>_start_time-_time_tolerance && time<_end_time+_time_tolerance) - if(_array) - _array->getTuple(eltId,value); - else - throw INTERP_KERNEL::Exception("No array existing."); - else - throw INTERP_KERNEL::Exception(EXCEPTION_MSG); -} - -void MEDCouplingConstOnTimeInterval::getValueOnDiscTime(int eltId, int dt, int it, double *value) const throw(INTERP_KERNEL::Exception) -{ - if(dt>=_start_dt && dt<=_end_dt) - if(_array) - _array->getTuple(eltId,value); - else - throw INTERP_KERNEL::Exception("No array existing."); - else - throw INTERP_KERNEL::Exception(EXCEPTION_MSG); -} - -void MEDCouplingConstOnTimeInterval::checkNoTimePresence() const throw(INTERP_KERNEL::Exception) -{ - throw INTERP_KERNEL::Exception("No time specified on a field defined as constant on one time interval"); -} - -void MEDCouplingConstOnTimeInterval::checkTimePresence(double time) const throw(INTERP_KERNEL::Exception) -{ - if(time<_start_time-_time_tolerance || time>_end_time+_time_tolerance) - { - std::ostringstream stream; - stream << "The field is defined between times " << _start_time << " and " << _end_time << " with tolerance "; - stream << _time_tolerance << " and trying to access on time = " << time; - throw INTERP_KERNEL::Exception(stream.str().c_str()); - } -} - -MEDCouplingTimeDiscretization *MEDCouplingConstOnTimeInterval::aggregate(const MEDCouplingTimeDiscretization *other) const -{ - const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("ConstOnTimeInterval::aggregation on mismatched time discretization !"); - MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval; - ret->setTimeTolerance(getTimeTolerance()); - DataArrayDouble *arr=DataArrayDouble::aggregate(getArray(),other->getArray()); - ret->setArray(arr,0); - arr->decrRef(); - int tmp1,tmp2; - double tmp3=getStartTime(tmp1,tmp2); - ret->setStartTime(tmp3,tmp1,tmp2); - tmp3=getEndTime(tmp1,tmp2); - ret->setEndTime(tmp3,tmp1,tmp2); - return ret; -} - -MEDCouplingTimeDiscretization *MEDCouplingConstOnTimeInterval::add(const MEDCouplingTimeDiscretization *other) const -{ - const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("ConstOnTimeInterval::add on mismatched time discretization !"); - MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval; - DataArrayDouble *arr=DataArrayDouble::add(getArray(),other->getArray()); - ret->setArray(arr,0); - arr->decrRef(); - int tmp1,tmp2; - double tmp3=getStartTime(tmp1,tmp2); - ret->setStartTime(tmp3,tmp1,tmp2); - tmp3=getEndTime(tmp1,tmp2); - ret->setEndTime(tmp3,tmp1,tmp2); - return ret; -} - -void MEDCouplingConstOnTimeInterval::addEqual(const MEDCouplingTimeDiscretization *other) -{ - const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("ConstOnTimeInterval::addEqual on mismatched time discretization !"); - getArray()->addEqual(other->getArray()); -} - -MEDCouplingTimeDiscretization *MEDCouplingConstOnTimeInterval::substract(const MEDCouplingTimeDiscretization *other) const -{ - const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("ConstOnTimeInterval::substract on mismatched time discretization !"); - MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval; - DataArrayDouble *arr=DataArrayDouble::substract(getArray(),other->getArray()); - ret->setArray(arr,0); - arr->decrRef(); - int tmp1,tmp2; - double tmp3=getStartTime(tmp1,tmp2); - ret->setStartTime(tmp3,tmp1,tmp2); - tmp3=getEndTime(tmp1,tmp2); - ret->setEndTime(tmp3,tmp1,tmp2); - return ret; -} - -void MEDCouplingConstOnTimeInterval::substractEqual(const MEDCouplingTimeDiscretization *other) -{ - const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("ConstOnTimeInterval::substractEqual on mismatched time discretization !"); - getArray()->substractEqual(other->getArray()); -} - -MEDCouplingTimeDiscretization *MEDCouplingConstOnTimeInterval::multiply(const MEDCouplingTimeDiscretization *other) const -{ - const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("multiply on mismatched time discretization !"); - MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval; - DataArrayDouble *arr=DataArrayDouble::multiply(getArray(),other->getArray()); - ret->setArray(arr,0); - arr->decrRef(); - int tmp1,tmp2; - double tmp3=getStartTime(tmp1,tmp2); - ret->setStartTime(tmp3,tmp1,tmp2); - tmp3=getEndTime(tmp1,tmp2); - ret->setEndTime(tmp3,tmp1,tmp2); - return ret; -} - -void MEDCouplingConstOnTimeInterval::multiplyEqual(const MEDCouplingTimeDiscretization *other) -{ - const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("ConstOnTimeInterval::multiplyEqual on mismatched time discretization !"); - getArray()->multiplyEqual(other->getArray()); -} - -MEDCouplingTimeDiscretization *MEDCouplingConstOnTimeInterval::divide(const MEDCouplingTimeDiscretization *other) const -{ - const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("divide on mismatched time discretization !"); - MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval; - DataArrayDouble *arr=DataArrayDouble::divide(getArray(),other->getArray()); - ret->setArray(arr,0); - arr->decrRef(); - int tmp1,tmp2; - double tmp3=getStartTime(tmp1,tmp2); - ret->setStartTime(tmp3,tmp1,tmp2); - tmp3=getEndTime(tmp1,tmp2); - ret->setEndTime(tmp3,tmp1,tmp2); - return ret; -} - -void MEDCouplingConstOnTimeInterval::divideEqual(const MEDCouplingTimeDiscretization *other) -{ - const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast(other); - if(!otherC) - throw INTERP_KERNEL::Exception("ConstOnTimeInterval::divideEqual on mismatched time discretization !"); - getArray()->divideEqual(other->getArray()); -} - -MEDCouplingTwoTimeSteps::MEDCouplingTwoTimeSteps():_start_time(0.),_end_time(0.),_start_dt(-1),_end_dt(-1),_start_it(-1),_end_it(-1),_end_array(0) -{ -} - -MEDCouplingTwoTimeSteps::~MEDCouplingTwoTimeSteps() -{ - if(_end_array) - _end_array->decrRef(); -} - -void MEDCouplingTwoTimeSteps::checkNoTimePresence() const throw(INTERP_KERNEL::Exception) -{ - throw INTERP_KERNEL::Exception("The field presents a time to be specified in every access !"); -} - -void MEDCouplingTwoTimeSteps::checkTimePresence(double time) const throw(INTERP_KERNEL::Exception) -{ - if(time<_start_time-_time_tolerance || time>_end_time+_time_tolerance) - { - std::ostringstream stream; - stream << "The field is defined between times " << _start_time << " and " << _end_time << " with tolerance "; - stream << _time_tolerance << " and trying to access on time = " << time; - throw INTERP_KERNEL::Exception(stream.str().c_str()); - } -} - -void MEDCouplingTwoTimeSteps::getArrays(std::vector& arrays) const -{ - arrays.resize(2); - arrays[0]=_array; - arrays[1]=_end_array; -} - -void MEDCouplingTwoTimeSteps::resizeForUnserialization(const std::vector& tinyInfoI, std::vector& arrays) -{ - arrays.resize(2); - if(_array!=0) - _array->decrRef(); - if(_end_array!=0) - _end_array->decrRef(); - DataArrayDouble *arr=0; - if(tinyInfoI[0]!=-1 && tinyInfoI[1]!=-1) - { - arr=DataArrayDouble::New(); - arr->alloc(tinyInfoI[0],tinyInfoI[1]); - } - _array=arr; - arrays[0]=arr; - arr=0; - if(tinyInfoI[2]!=-1 && tinyInfoI[3]!=-1) - { - arr=DataArrayDouble::New(); - arr->alloc(tinyInfoI[2],tinyInfoI[3]); - } - _end_array=arr; - arrays[1]=arr; -} - -void MEDCouplingTwoTimeSteps::finishUnserialization(const std::vector& tinyInfoI, const std::vector& tinyInfoD, const std::vector& tinyInfoS) -{ - MEDCouplingTimeDiscretization::finishUnserialization(tinyInfoI,tinyInfoD,tinyInfoS); - _start_time=tinyInfoD[1]; - _end_time=tinyInfoD[2]; - _start_dt=tinyInfoI[2]; - _end_dt=tinyInfoI[3]; - _start_it=tinyInfoI[4]; - _end_it=tinyInfoI[5]; -} diff --git a/src/MEDCoupling/MEDCouplingTimeDiscretization.hxx b/src/MEDCoupling/MEDCouplingTimeDiscretization.hxx deleted file mode 100644 index 8ea2f8c6d..000000000 --- a/src/MEDCoupling/MEDCouplingTimeDiscretization.hxx +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __MEDCOUPLINGTIMEDISCRETIZATION_HXX__ -#define __MEDCOUPLINGTIMEDISCRETIZATION_HXX__ - -#include "MEDCoupling.hxx" -#include "MEDCouplingTimeLabel.hxx" -#include "MEDCouplingRefCountObject.hxx" -#include "InterpKernelException.hxx" - -#include - -namespace ParaMEDMEM -{ - class DataArrayDouble; - class TimeLabel; - - class MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization : public TimeLabel - { - protected: - MEDCouplingTimeDiscretization(); - MEDCouplingTimeDiscretization(const MEDCouplingTimeDiscretization& other, bool deepCpy); - public: - void updateTime(); - static MEDCouplingTimeDiscretization *New(TypeOfTimeDiscretization type); - virtual bool areCompatible(const MEDCouplingTimeDiscretization *other) const; - virtual bool areCompatibleForMul(const MEDCouplingTimeDiscretization *other) const; - virtual bool isEqual(const MEDCouplingTimeDiscretization *other, double prec) const; - virtual MEDCouplingTimeDiscretization *buildNewTimeReprFromThis(const MEDCouplingTimeDiscretization *other, - TypeOfTimeDiscretization type, bool deepCpy) const; - virtual TypeOfTimeDiscretization getEnum() const = 0; - virtual MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const = 0; - virtual MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const = 0; - virtual void addEqual(const MEDCouplingTimeDiscretization *other) = 0; - virtual MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const = 0; - virtual void substractEqual(const MEDCouplingTimeDiscretization *other) = 0; - virtual MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const = 0; - virtual void multiplyEqual(const MEDCouplingTimeDiscretization *other) = 0; - virtual MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const = 0; - virtual void divideEqual(const MEDCouplingTimeDiscretization *other) = 0; - virtual void getTinySerializationIntInformation(std::vector& tinyInfo) const; - virtual void getTinySerializationDbleInformation(std::vector& tinyInfo) const; - virtual void getTinySerializationStrInformation(std::vector& tinyInfo) const; - virtual void resizeForUnserialization(const std::vector& tinyInfoI, std::vector& arrays); - virtual void finishUnserialization(const std::vector& tinyInfoI, const std::vector& tinyInfoD, const std::vector& tinyInfoS); - virtual MEDCouplingTimeDiscretization *performCpy(bool deepCpy) const = 0; - void setTimeTolerance(double val) { _time_tolerance=val; } - double getTimeTolerance() const { return _time_tolerance; } - virtual void checkNoTimePresence() const throw(INTERP_KERNEL::Exception) = 0; - virtual void checkTimePresence(double time) const throw(INTERP_KERNEL::Exception) = 0; - virtual void setArray(DataArrayDouble *array, TimeLabel *owner); - virtual void setArrays(const std::vector& arrays, TimeLabel *owner) throw(INTERP_KERNEL::Exception); - DataArrayDouble *getArray() const { return _array; } - virtual DataArrayDouble *getEndArray() const { return _array; } - virtual std::vector< const DataArrayDouble *> getArraysForTime(double time) const throw(INTERP_KERNEL::Exception) = 0; - virtual void getValueForTime(double time, const std::vector& vals, double *res) const = 0; - virtual void getArrays(std::vector& arrays) const; - virtual bool isBefore(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); - virtual bool isStrictlyBefore(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); - double getTime(int& dt, int& it) const throw(INTERP_KERNEL::Exception) { return getStartTime(dt,it); } - virtual double getStartTime(int& dt, int& it) const throw(INTERP_KERNEL::Exception) = 0; - virtual double getEndTime(int& dt, int& it) const throw(INTERP_KERNEL::Exception) = 0; - void setTime(double time, int dt, int it) throw(INTERP_KERNEL::Exception) { setStartTime(time,dt,it); } - virtual void setStartTime(double time, int dt, int it) throw(INTERP_KERNEL::Exception) = 0; - virtual void setEndTime(double time, int dt, int it) throw(INTERP_KERNEL::Exception) = 0; - virtual void getValueOnTime(int eltId, double time, double *value) const throw(INTERP_KERNEL::Exception) = 0; - virtual void getValueOnDiscTime(int eltId, int dt, int it, double *value) const throw(INTERP_KERNEL::Exception) = 0; - // - virtual void applyLin(double a, double b, int compoId); - virtual void applyFunc(int nbOfComp, FunctionToEvaluate func); - virtual void applyFunc(int nbOfComp, const char *func); - virtual void applyFunc(const char *func); - // - virtual ~MEDCouplingTimeDiscretization(); - protected: - double _time_tolerance; - DataArrayDouble *_array; - protected: - static const double TIME_TOLERANCE_DFT; - }; - - class MEDCOUPLING_EXPORT MEDCouplingNoTimeLabel : public MEDCouplingTimeDiscretization - { - public: - MEDCouplingNoTimeLabel(); - MEDCouplingNoTimeLabel(const MEDCouplingTimeDiscretization& other, bool deepCpy); - TypeOfTimeDiscretization getEnum() const { return DISCRETIZATION; } - MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const; - MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const; - void addEqual(const MEDCouplingTimeDiscretization *other); - MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const; - void substractEqual(const MEDCouplingTimeDiscretization *other); - MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const; - void multiplyEqual(const MEDCouplingTimeDiscretization *other); - MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const; - void divideEqual(const MEDCouplingTimeDiscretization *other); - bool isEqual(const MEDCouplingTimeDiscretization *other, double prec) const; - bool areCompatible(const MEDCouplingTimeDiscretization *other) const; - bool areCompatibleForMul(const MEDCouplingTimeDiscretization *other) const; - MEDCouplingTimeDiscretization *performCpy(bool deepCpy) const; - void checkNoTimePresence() const throw(INTERP_KERNEL::Exception) { } - void checkTimePresence(double time) const throw(INTERP_KERNEL::Exception); - std::vector< const DataArrayDouble *> getArraysForTime(double time) const throw(INTERP_KERNEL::Exception); - void getValueForTime(double time, const std::vector& vals, double *res) const; - bool isBefore(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); - bool isStrictlyBefore(const MEDCouplingTimeDiscretization *other) const throw(INTERP_KERNEL::Exception); - double getStartTime(int& dt, int& it) const throw(INTERP_KERNEL::Exception); - double getEndTime(int& dt, int& it) const throw(INTERP_KERNEL::Exception); - void setStartTime(double time, int dt, int it) throw(INTERP_KERNEL::Exception); - void setEndTime(double time, int dt, int it) throw(INTERP_KERNEL::Exception); - void getValueOnTime(int eltId, double time, double *value) const throw(INTERP_KERNEL::Exception); - void getValueOnDiscTime(int eltId, int dt, int it, double *value) const throw(INTERP_KERNEL::Exception); - public: - static const TypeOfTimeDiscretization DISCRETIZATION=NO_TIME; - private: - static const char EXCEPTION_MSG[]; - }; - - class MEDCOUPLING_EXPORT MEDCouplingWithTimeStep : public MEDCouplingTimeDiscretization - { - protected: - MEDCouplingWithTimeStep(const MEDCouplingWithTimeStep& other, bool deepCpy); - public: - MEDCouplingWithTimeStep(); - TypeOfTimeDiscretization getEnum() const { return DISCRETIZATION; } - MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const; - MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const; - void addEqual(const MEDCouplingTimeDiscretization *other); - MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const; - void substractEqual(const MEDCouplingTimeDiscretization *other); - MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const; - void multiplyEqual(const MEDCouplingTimeDiscretization *other); - MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const; - void divideEqual(const MEDCouplingTimeDiscretization *other); - bool isEqual(const MEDCouplingTimeDiscretization *other, double prec) const; - bool areCompatible(const MEDCouplingTimeDiscretization *other) const; - bool areCompatibleForMul(const MEDCouplingTimeDiscretization *other) const; - void getTinySerializationIntInformation(std::vector& tinyInfo) const; - void getTinySerializationDbleInformation(std::vector& tinyInfo) const; - void finishUnserialization(const std::vector& tinyInfoI, const std::vector& tinyInfoD, const std::vector& tinyInfoS); - MEDCouplingTimeDiscretization *performCpy(bool deepCpy) const; - void checkNoTimePresence() const throw(INTERP_KERNEL::Exception); - void checkTimePresence(double time) const throw(INTERP_KERNEL::Exception); - void setStartTime(double time, int dt, int it) throw(INTERP_KERNEL::Exception) { _time=time; _dt=dt; _it=it; } - void setEndTime(double time, int dt, int it) throw(INTERP_KERNEL::Exception) { _time=time; _dt=dt; _it=it; } - double getStartTime(int& dt, int& it) const throw(INTERP_KERNEL::Exception) { dt=_dt; it=_it; return _time; } - double getEndTime(int& dt, int& it) const throw(INTERP_KERNEL::Exception) { dt=_dt; it=_it; return _time; } - DataArrayDouble *getArrayOnTime(double time) const throw(INTERP_KERNEL::Exception); - std::vector< const DataArrayDouble *> getArraysForTime(double time) const throw(INTERP_KERNEL::Exception); - void getValueForTime(double time, const std::vector& vals, double *res) const; - void getValueOnTime(int eltId, double time, double *value) const throw(INTERP_KERNEL::Exception); - void getValueOnDiscTime(int eltId, int dt, int it, double *value) const throw(INTERP_KERNEL::Exception); - public: - static const TypeOfTimeDiscretization DISCRETIZATION=ONE_TIME; - private: - static const char EXCEPTION_MSG[]; - protected: - double _time; - int _dt; - int _it; - }; - - class MEDCOUPLING_EXPORT MEDCouplingConstOnTimeInterval : public MEDCouplingTimeDiscretization - { - protected: - MEDCouplingConstOnTimeInterval(const MEDCouplingConstOnTimeInterval& other, bool deepCpy); - public: - MEDCouplingConstOnTimeInterval(); - void getTinySerializationIntInformation(std::vector& tinyInfo) const; - void getTinySerializationDbleInformation(std::vector& tinyInfo) const; - void finishUnserialization(const std::vector& tinyInfoI, const std::vector& tinyInfoD, const std::vector& tinyInfoS); - MEDCouplingTimeDiscretization *performCpy(bool deepCpy) const; - bool areCompatible(const MEDCouplingTimeDiscretization *other) const; - bool areCompatibleForMul(const MEDCouplingTimeDiscretization *other) const; - bool isEqual(const MEDCouplingTimeDiscretization *other, double prec) const; - std::vector< const DataArrayDouble *> getArraysForTime(double time) const throw(INTERP_KERNEL::Exception); - void getValueForTime(double time, const std::vector& vals, double *res) const; - void getValueOnTime(int eltId, double time, double *value) const throw(INTERP_KERNEL::Exception); - void getValueOnDiscTime(int eltId, int dt, int it, double *value) const throw(INTERP_KERNEL::Exception); - TypeOfTimeDiscretization getEnum() const { return DISCRETIZATION; } - MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const; - MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const; - void addEqual(const MEDCouplingTimeDiscretization *other); - MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const; - void substractEqual(const MEDCouplingTimeDiscretization *other); - MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const; - void multiplyEqual(const MEDCouplingTimeDiscretization *other); - MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const; - void divideEqual(const MEDCouplingTimeDiscretization *other); - void setStartTime(double time, int dt, int it) throw(INTERP_KERNEL::Exception) { _start_time=time; _start_dt=dt; _start_it=it; } - void setEndTime(double time, int dt, int it) throw(INTERP_KERNEL::Exception) { _end_time=time; _end_dt=dt; _end_it=it; } - double getStartTime(int& dt, int& it) const throw(INTERP_KERNEL::Exception) { dt=_start_dt; it=_start_it; return _start_time; } - double getEndTime(int& dt, int& it) const throw(INTERP_KERNEL::Exception) { dt=_end_dt; it=_end_it; return _end_time; } - void checkNoTimePresence() const throw(INTERP_KERNEL::Exception); - void checkTimePresence(double time) const throw(INTERP_KERNEL::Exception); - public: - static const TypeOfTimeDiscretization DISCRETIZATION=CONST_ON_TIME_INTERVAL; - private: - static const char EXCEPTION_MSG[]; - protected: - double _start_time; - double _end_time; - int _start_dt; - int _end_dt; - int _start_it; - int _end_it; - }; - - class MEDCOUPLING_EXPORT MEDCouplingTwoTimeSteps : public MEDCouplingTimeDiscretization - { - protected: - MEDCouplingTwoTimeSteps(); - ~MEDCouplingTwoTimeSteps(); - public: - void checkNoTimePresence() const throw(INTERP_KERNEL::Exception); - void checkTimePresence(double time) const throw(INTERP_KERNEL::Exception); - void getArrays(std::vector& arrays) const; - DataArrayDouble *getEndArray() const { return _end_array; } - void setStartTime(double time, int dt, int it) throw(INTERP_KERNEL::Exception) { _start_time=time; _start_dt=dt; _start_it=it; } - void setEndTime(double time, int dt, int it) throw(INTERP_KERNEL::Exception) { _end_time=time; _end_dt=dt; _end_it=it; } - double getStartTime(int& dt, int& it) const throw(INTERP_KERNEL::Exception) { dt=_start_dt; it=_start_it; return _start_time; } - double getEndTime(int& dt, int& it) const throw(INTERP_KERNEL::Exception) { dt=_end_dt; it=_end_it; return _end_time; } - void resizeForUnserialization(const std::vector& tinyInfoI, std::vector& arrays); - void finishUnserialization(const std::vector& tinyInfoI, const std::vector& tinyInfoD, const std::vector& tinyInfoS); - protected: - double _start_time; - double _end_time; - int _start_dt; - int _end_dt; - int _start_it; - int _end_it; - DataArrayDouble *_end_array; - }; - - class MEDCOUPLING_EXPORT MEDCouplingLinearTime : public MEDCouplingTwoTimeSteps - { - public: - TypeOfTimeDiscretization getEnum() const { return DISCRETIZATION; } - static const TypeOfTimeDiscretization DISCRETIZATION=LINEAR_TIME; - }; -} - -#endif diff --git a/src/MEDCoupling/MEDCouplingUMeshDesc.cxx b/src/MEDCoupling/MEDCouplingUMeshDesc.cxx deleted file mode 100644 index 29f1e58e3..000000000 --- a/src/MEDCoupling/MEDCouplingUMeshDesc.cxx +++ /dev/null @@ -1,389 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "MEDCouplingUMeshDesc.hxx" -#include "CellModel.hxx" -#include "MEDCouplingMemArray.hxx" - -#include - -using namespace ParaMEDMEM; - -MEDCouplingUMeshDesc::MEDCouplingUMeshDesc():_mesh_dim(-1),_desc_connec(0),_desc_connec_index(0), - _nodal_connec_face(0),_nodal_connec_face_index(0) -{ -} - -MEDCouplingUMeshDesc::~MEDCouplingUMeshDesc() -{ - if(_desc_connec) - _desc_connec->decrRef(); - if(_desc_connec_index) - _desc_connec_index->decrRef(); - if(_nodal_connec_face) - _nodal_connec_face->decrRef(); - if(_nodal_connec_face_index) - _nodal_connec_face_index->decrRef(); -} - -MEDCouplingUMeshDesc *MEDCouplingUMeshDesc::New() -{ - return new MEDCouplingUMeshDesc; -} - -MEDCouplingUMeshDesc *MEDCouplingUMeshDesc::New(const char *meshName, int meshDim) -{ - MEDCouplingUMeshDesc *ret=new MEDCouplingUMeshDesc; - ret->setName(meshName); - ret->setMeshDimension(meshDim); - return ret; -} - -void MEDCouplingUMeshDesc::checkCoherency() const throw(INTERP_KERNEL::Exception) -{ - for(std::set::const_iterator iter=_types.begin();iter!=_types.end();iter++) - { - if(INTERP_KERNEL::CellModel::getCellModel(*iter).getDimension()!=_mesh_dim) - { - std::ostringstream message; - message << "MeshDesc invalid because dimension is " << _mesh_dim << " and there is presence of cell(s) with type " << (*iter); - throw INTERP_KERNEL::Exception(message.str().c_str()); - } - } -} - -void MEDCouplingUMeshDesc::setMeshDimension(unsigned meshDim) -{ - _mesh_dim=meshDim; - declareAsNew(); -} - -int MEDCouplingUMeshDesc::getNumberOfCells() const -{ - if(_desc_connec_index) - return _desc_connec_index->getNumberOfTuples()-1; - else - throw INTERP_KERNEL::Exception("Unable to get number of cells because no connectivity specified !"); -} - -int MEDCouplingUMeshDesc::getNumberOfFaces() const -{ - if(_nodal_connec_face_index) - return _nodal_connec_face_index->getNumberOfTuples()-1; - else - throw INTERP_KERNEL::Exception("Unable to get number of faces because no connectivity specified !"); -} - -int MEDCouplingUMeshDesc::getCellMeshLength() const -{ - return _desc_connec->getNbOfElems(); -} - -int MEDCouplingUMeshDesc::getFaceMeshLength() const -{ - return _nodal_connec_face->getNbOfElems(); -} - -INTERP_KERNEL::NormalizedCellType MEDCouplingUMeshDesc::getTypeOfCell(int cellId) const -{ - const int *desc_connec=_desc_connec->getConstPointer(); - const int *desc_connec_index=_desc_connec_index->getConstPointer(); - return (INTERP_KERNEL::NormalizedCellType)desc_connec[desc_connec_index[cellId]+1]; -} - -void MEDCouplingUMeshDesc::getNodeIdsOfCell(int cellId, std::vector& conn) const -{ - //not implemented yet. -} - -void MEDCouplingUMeshDesc::getCoordinatesOfNode(int nodeId, std::vector& coo) const -{ - //not implemented yet. -} - -void MEDCouplingUMeshDesc::setConnectivity(DataArrayInt *descConn, DataArrayInt *descConnIndex, DataArrayInt *nodalFaceConn, DataArrayInt *nodalFaceConnIndx) -{ - DataArrayInt::setArrayIn(descConn,_desc_connec); - DataArrayInt::setArrayIn(descConnIndex,_desc_connec_index); - DataArrayInt::setArrayIn(nodalFaceConn,_nodal_connec_face); - DataArrayInt::setArrayIn(nodalFaceConnIndx,_nodal_connec_face_index); - computeTypes(); -} - -void MEDCouplingUMeshDesc::getTinySerializationInformation(std::vector& tinyInfo, std::vector& littleStrings) const -{ - MEDCouplingPointSet::getTinySerializationInformation(tinyInfo,littleStrings); - tinyInfo.push_back(getMeshDimension()); - tinyInfo.push_back(getNumberOfNodes()); - tinyInfo.push_back(getNumberOfCells()); - tinyInfo.push_back(getCellMeshLength()); - tinyInfo.push_back(getNumberOfFaces()); - tinyInfo.push_back(getFaceMeshLength()); -} - -bool MEDCouplingUMeshDesc::isEmptyMesh(const std::vector& tinyInfo) const -{ - return tinyInfo[5]<=0; -} - -void MEDCouplingUMeshDesc::resizeForUnserialization(const std::vector& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector& littleStrings) -{ - std::vector tinyInfoTmp(tinyInfo.begin()+1,tinyInfo.end()); - MEDCouplingPointSet::resizeForUnserialization(tinyInfoTmp,a1,a2,littleStrings); - a1->alloc(tinyInfo[5]+tinyInfo[4]+1+tinyInfo[7]+tinyInfo[6]+1,1); -} - -void MEDCouplingUMeshDesc::serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const -{ - MEDCouplingPointSet::serialize(a1,a2); - // - a1=DataArrayInt::New(); - a1->alloc(getCellMeshLength()+getNumberOfCells()+1+getFaceMeshLength()+getNumberOfFaces()+1,1); - int *ptA1=a1->getPointer(); - const int *descConn=_desc_connec->getConstPointer(); - const int *descConnIndex=_desc_connec_index->getConstPointer(); - const int *faceConn=_nodal_connec_face->getConstPointer(); - const int *faceConnIndex=_nodal_connec_face_index->getConstPointer(); - ptA1=std::copy(descConn,descConn+getCellMeshLength(),ptA1); - ptA1=std::copy(descConnIndex,descConnIndex+getNumberOfCells()+1,ptA1); - ptA1=std::copy(faceConn,faceConn+getFaceMeshLength(),ptA1); - std::copy(faceConnIndex,faceConnIndex+getNumberOfFaces()+1,ptA1); -} - -void MEDCouplingUMeshDesc::unserialization(const std::vector& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, const std::vector& littleStrings) -{ - std::vector tinyInfoTmp(tinyInfo.begin()+1,tinyInfo.end()); - MEDCouplingPointSet::unserialization(tinyInfoTmp,a1,a2,littleStrings); - // - const int *recvBuffer=a1->getConstPointer(); - DataArrayInt *descConn=DataArrayInt::New(); - descConn->alloc(tinyInfo[5],1); - std::copy(recvBuffer,recvBuffer+tinyInfo[5],descConn->getPointer()); - DataArrayInt *descConnIndex=DataArrayInt::New(); - descConnIndex->alloc(tinyInfo[4]+1,1); - std::copy(recvBuffer+tinyInfo[5],recvBuffer+tinyInfo[5]+tinyInfo[4]+1,descConnIndex->getPointer()); - DataArrayInt *faceConn=DataArrayInt::New(); - faceConn->alloc(tinyInfo[7],1); - std::copy(recvBuffer+tinyInfo[5]+tinyInfo[4]+1,recvBuffer+tinyInfo[5]+tinyInfo[4]+1+tinyInfo[7],faceConn->getPointer()); - DataArrayInt *faceConnIndex=DataArrayInt::New(); - faceConnIndex->alloc(tinyInfo[6]+1,1); - std::copy(recvBuffer+tinyInfo[5]+tinyInfo[4]+1+tinyInfo[7], - recvBuffer+tinyInfo[5]+tinyInfo[5]+1+tinyInfo[7]+tinyInfo[6]+1,faceConnIndex->getPointer()); - setConnectivity(descConn,descConnIndex,faceConn,faceConnIndex); - descConn->decrRef(); - descConnIndex->decrRef(); - faceConn->decrRef(); - faceConnIndex->decrRef(); - setMeshDimension(tinyInfo[2]); -} - -void MEDCouplingUMeshDesc::giveElemsInBoundingBox(const double *bbox, double eps, std::vector& elems) -{ - int dim=getSpaceDimension(); - double* elem_bb=new double[2*dim]; - const int* conn = _desc_connec->getConstPointer(); - const int* conn_index= _desc_connec_index->getConstPointer(); - const int* face = _nodal_connec_face->getConstPointer(); - const int* face_index= _nodal_connec_face_index->getConstPointer(); - const double* coords = getCoords()->getConstPointer(); - int nbOfCells=getNumberOfCells(); - for ( int ielem=0; ielem::max(); - elem_bb[i*2+1]=-std::numeric_limits::max(); - } - - for (int jface=conn_index[ielem]+1; jface elem_bb[idim*2+1] ) - { - elem_bb[idim*2+1] = coords[node*dim+idim] ; - } - } - } - } - if (intersectsBoundingBox(elem_bb, bbox, dim, eps)) - { - elems.push_back(ielem); - } - } - delete [] elem_bb; -} - -void MEDCouplingUMeshDesc::giveElemsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox &bbox, double eps, std::vector& elems) -{ - int dim=getSpaceDimension(); - double* elem_bb=new double[2*dim]; - const int* conn = _desc_connec->getConstPointer(); - const int* conn_index= _desc_connec_index->getConstPointer(); - const int* face = _nodal_connec_face->getConstPointer(); - const int* face_index= _nodal_connec_face_index->getConstPointer(); - const double* coords = getCoords()->getConstPointer(); - int nbOfCells=getNumberOfCells(); - for ( int ielem=0; ielem::max(); - elem_bb[i*2+1]=-std::numeric_limits::max(); - } - - for (int jface=conn_index[ielem]+1; jface elem_bb[idim*2+1] ) - { - elem_bb[idim*2+1] = coords[node*dim+idim] ; - } - } - } - } - if (intersectsBoundingBox(bbox, elem_bb, dim, eps)) - { - elems.push_back(ielem); - } - } - delete [] elem_bb; -} - -DataArrayInt *MEDCouplingUMeshDesc::mergeNodes(double precision, bool& areNodesMerged) -{ - //not implemented yet. - areNodesMerged=false; - return 0; -} - -MEDCouplingPointSet *MEDCouplingUMeshDesc::buildPartOfMySelf(const int *start, const int *end, bool keepCoords) const -{ - //not implemented yet. - return 0; -} - -MEDCouplingPointSet *MEDCouplingUMeshDesc::buildPartOfMySelfNode(const int *start, const int *end, bool fullyIn) const -{ - //not implemented yet - return 0; -} - -MEDCouplingPointSet *MEDCouplingUMeshDesc::buildFacePartOfMySelfNode(const int *start, const int *end, bool fullyIn) const -{ - //not implemented yet - return 0; -} - -void MEDCouplingUMeshDesc::findBoundaryNodes(std::vector& nodes) const -{ - //not implemented yet -} - -MEDCouplingPointSet *MEDCouplingUMeshDesc::buildBoundaryMesh(bool keepCoords) const -{ - //not implemented yet - return 0; -} - -void MEDCouplingUMeshDesc::renumberNodes(const int *newNodeNumbers, int newNbOfNodes) -{ - MEDCouplingPointSet::renumberNodes(newNodeNumbers,newNbOfNodes); - //not implemented yet -} - -MEDCouplingFieldDouble *MEDCouplingUMeshDesc::getMeasureField(bool isAbs) const -{ - //not implemented yet. - return 0; -} - -MEDCouplingFieldDouble *MEDCouplingUMeshDesc::getMeasureFieldOnNode(bool isAbs) const -{ - //not implemented yet. - return 0; -} - -MEDCouplingFieldDouble *MEDCouplingUMeshDesc::buildOrthogonalField() const -{ - if(getMeshDimension()!=2) - throw INTERP_KERNEL::Exception("Expected a cmesh with meshDim == 2 !"); - //not implemented yet ! - return 0; -} - -DataArrayInt *MEDCouplingUMeshDesc::zipCoordsTraducer() -{ - //not implemented yet. - return 0; -} - -void MEDCouplingUMeshDesc::computeTypes() -{ - if(_desc_connec && _desc_connec_index) - { - _types.clear(); - const int *conn=_desc_connec->getConstPointer(); - const int *connIndex=_desc_connec_index->getConstPointer(); - int nbOfElem=_desc_connec_index->getNbOfElems()-1; - for(const int *pt=connIndex;pt!=connIndex+nbOfElem;pt++) - _types.insert((INTERP_KERNEL::NormalizedCellType)conn[*pt]); - } -} - -void MEDCouplingUMeshDesc::checkFullyDefined() const throw(INTERP_KERNEL::Exception) -{ - if(!_desc_connec || !_desc_connec_index || !_nodal_connec_face || !_nodal_connec_face_index || !_coords) - throw INTERP_KERNEL::Exception("full connectivity and coordinates not set in unstructured mesh."); -} - -MEDCouplingMesh *MEDCouplingUMeshDesc::mergeMyselfWith(const MEDCouplingMesh *other) const -{ - //not implemented yet. - return 0; -} - -DataArrayDouble *MEDCouplingUMeshDesc::getBarycenterAndOwner() const -{ - //not implemented yet. - return 0; -} - -int MEDCouplingUMeshDesc::getCellContainingPoint(const double *pos, double eps) const -{ - //not implemented yet. - return -1; -} diff --git a/src/MEDCoupling/MEDCouplingUMeshDesc.hxx b/src/MEDCoupling/MEDCouplingUMeshDesc.hxx deleted file mode 100644 index 91ce649ed..000000000 --- a/src/MEDCoupling/MEDCouplingUMeshDesc.hxx +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __PARAMEDMEM_MEDCOUPLINGUMESHDESC_HXX__ -#define __PARAMEDMEM_MEDCOUPLINGUMESHDESC_HXX__ - -#include "MEDCouplingPointSet.hxx" -#include "MEDCoupling.hxx" -#include "NormalizedUnstructuredMesh.hxx" - -#include - -namespace ParaMEDMEM -{ - class MEDCouplingUMeshDesc : public MEDCouplingPointSet - { - public: - MEDCOUPLING_EXPORT static MEDCouplingUMeshDesc *New(); - MEDCOUPLING_EXPORT static MEDCouplingUMeshDesc *New(const char *meshName, int meshDim); - MEDCOUPLING_EXPORT void checkCoherency() const throw(INTERP_KERNEL::Exception); - MEDCOUPLING_EXPORT void setMeshDimension(unsigned meshDim); - MEDCOUPLING_EXPORT int getNumberOfCells() const; - MEDCOUPLING_EXPORT int getNumberOfFaces() const; - MEDCOUPLING_EXPORT int getCellMeshLength() const; - MEDCOUPLING_EXPORT int getFaceMeshLength() const; - MEDCOUPLING_EXPORT int getMeshDimension() const { return _mesh_dim; } - MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const; - MEDCOUPLING_EXPORT void getNodeIdsOfCell(int cellId, std::vector& conn) const; - MEDCOUPLING_EXPORT void getCoordinatesOfNode(int nodeId, std::vector& coo) const; - MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const { return UNSTRUCTURED_DESC; } - MEDCOUPLING_EXPORT void setConnectivity(DataArrayInt *descConn, DataArrayInt *descConnIndex, DataArrayInt *nodalFaceConn, DataArrayInt *nodalFaceConnIndx); - //tools to overload - MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector& tinyInfo, std::vector& littleStrings) const; - MEDCOUPLING_EXPORT bool isEmptyMesh(const std::vector& tinyInfo) const; - MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector& littleStrings); - MEDCOUPLING_EXPORT void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const; - MEDCOUPLING_EXPORT void unserialization(const std::vector& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, const std::vector& littleStrings); - MEDCOUPLING_EXPORT void giveElemsInBoundingBox(const double *bbox, double eps, std::vector& elems); - MEDCOUPLING_EXPORT void giveElemsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox &bbox, double eps, std::vector& elems); - MEDCOUPLING_EXPORT DataArrayInt *mergeNodes(double precision, bool& areNodesMerged); - MEDCOUPLING_EXPORT MEDCouplingPointSet *buildPartOfMySelf(const int *start, const int *end, bool keepCoords) const; - MEDCOUPLING_EXPORT MEDCouplingPointSet *buildPartOfMySelfNode(const int *start, const int *end, bool fullyIn) const; - MEDCOUPLING_EXPORT MEDCouplingPointSet *buildFacePartOfMySelfNode(const int *start, const int *end, bool fullyIn) const; - MEDCOUPLING_EXPORT void findBoundaryNodes(std::vector& nodes) const; - MEDCOUPLING_EXPORT MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const; - MEDCOUPLING_EXPORT void renumberNodes(const int *newNodeNumbers, int newNbOfNodes); - MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(bool isAbs) const; - MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const; - MEDCOUPLING_EXPORT int getCellContainingPoint(const double *pos, double eps) const; - MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildOrthogonalField() const; - MEDCOUPLING_EXPORT DataArrayInt *zipCoordsTraducer(); - MEDCOUPLING_EXPORT MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const; - MEDCOUPLING_EXPORT DataArrayDouble *getBarycenterAndOwner() const; - private: - MEDCouplingUMeshDesc(); - ~MEDCouplingUMeshDesc(); - void computeTypes(); - void checkFullyDefined() const throw(INTERP_KERNEL::Exception); - private: - unsigned _mesh_dim; - DataArrayInt *_desc_connec; - DataArrayInt *_desc_connec_index; - DataArrayInt *_nodal_connec_face; - DataArrayInt *_nodal_connec_face_index; - std::set _types; - }; -} - -#endif diff --git a/src/MEDCoupling/MemArray.cxx b/src/MEDCoupling/MemArray.cxx new file mode 100644 index 000000000..90d43a8fe --- /dev/null +++ b/src/MEDCoupling/MemArray.cxx @@ -0,0 +1,82 @@ +// Copyright (C) 2007-2008 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. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#include "MemArray.txx" + +using namespace ParaMEDMEM; + +void DataArray::setName(const char *name) +{ + _name=name; +} + +DataArrayDouble *DataArrayDouble::New() +{ + return new DataArrayDouble; +} + +void DataArrayDouble::alloc(int nbOfTuple, int nbOfCompo) +{ + _nb_of_tuples=nbOfTuple; + _info_on_compo.resize(nbOfCompo); + _mem.alloc(nbOfCompo*_nb_of_tuples); + declareAsNew(); +} + +void DataArrayDouble::reAlloc(int nbOfTuples) +{ + _mem.reAlloc(_info_on_compo.size()*nbOfTuples); + _nb_of_tuples=nbOfTuples; + declareAsNew(); +} + +void DataArrayDouble::useArray(double *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo) +{ + _nb_of_tuples=nbOfTuple; + _info_on_compo.resize(nbOfCompo); + _mem.useArray(array,ownership,type,nbOfTuple*nbOfCompo); + declareAsNew(); +} + +DataArrayInt *DataArrayInt::New() +{ + return new DataArrayInt; +} + +void DataArrayInt::alloc(int nbOfTuple, int nbOfCompo) +{ + _nb_of_tuples=nbOfTuple; + _info_on_compo.resize(nbOfCompo); + _mem.alloc(nbOfCompo*_nb_of_tuples); + declareAsNew(); +} + +void DataArrayInt::useArray(int *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo) +{ + _nb_of_tuples=nbOfTuple; + _info_on_compo.resize(nbOfCompo); + _mem.useArray(array,ownership,type,nbOfTuple*nbOfCompo); + declareAsNew(); +} + +void DataArrayInt::reAlloc(int nbOfTuples) +{ + _mem.reAlloc(_info_on_compo.size()*nbOfTuples); + _nb_of_tuples=nbOfTuples; + declareAsNew(); +} diff --git a/src/MEDCoupling/MemArray.hxx b/src/MEDCoupling/MemArray.hxx new file mode 100644 index 000000000..b8c9c4e38 --- /dev/null +++ b/src/MEDCoupling/MemArray.hxx @@ -0,0 +1,116 @@ +// Copyright (C) 2007-2008 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. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#ifndef __PARAMEDMEM_MEMARRAY_HXX__ +#define __PARAMEDMEM_MEMARRAY_HXX__ + +#include "RefCountObject.hxx" + +#include +#include + +namespace ParaMEDMEM +{ + template + class MemArray + { + public: + MemArray():_nb_of_elem(-1),_ownership(false),_pointer(0),_dealloc(CPP_DEALLOC) { } + T *getPointer() const { return _pointer; } + MemArray &operator=(const MemArray& other); + T operator[](int id) const { return _pointer[id]; } + T& operator[](int id) { return _pointer[id]; } + void alloc(int nbOfElements); + void reAlloc(int newNbOfElements); + void useArray(void *array, bool ownership, DeallocType type, int nbOfElem); + void writeOnPlace(int id, T element0, const T *others, int sizeOfOthers); + ~MemArray() { destroy(); } + private: + void destroy(); + static void destroyPointer(T *pt, DeallocType type); + private: + int _nb_of_elem; + bool _ownership; + T *_pointer; + DeallocType _dealloc; + }; + + class DataArray : public RefCountObject + { + public: + void setName(const char *name); + std::string getName() const { return _name; } + std::string getInfoOnComponent(int i) const { return _info_on_compo[i]; } + void setInfoOnComponent(int i, const char *info) { _info_on_compo[i]=info; } + int getNumberOfComponents() const { return _info_on_compo.size(); } + int getNumberOfTuples() const { return _nb_of_tuples; } + int getNbOfElems() const { return _info_on_compo.size()*_nb_of_tuples; } + protected: + DataArray():_nb_of_tuples(-1) { } + protected: + int _nb_of_tuples; + std::string _name; + std::vector _info_on_compo; + }; +} + +#include "MemArray.txx" + +namespace ParaMEDMEM +{ + class DataArrayDouble : public DataArray + { + public: + static DataArrayDouble *New(); + void alloc(int nbOfTuple, int nbOfCompo); + //!alloc or useArray should have been called before. + void reAlloc(int nbOfTuples); + double getIJ(int tupleId, int compoId) const { return _mem[tupleId*_info_on_compo.size()+compoId]; } + void setIJ(int tupleId, int compoId, double newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; } + double *getPointer() const { return _mem.getPointer(); } + void useArray(double *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo); + void writeOnPlace(int id, double element0, const double *others, int sizeOfOthers) { _mem.writeOnPlace(id,element0,others,sizeOfOthers); } + //! nothing to do here because this class does not aggregate any TimeLabel instance. + void updateTime() { } + private: + DataArrayDouble() { } + private: + MemArray _mem; + }; + + class DataArrayInt : public DataArray + { + public: + static DataArrayInt *New(); + void alloc(int nbOfTuple, int nbOfCompo); + //!alloc or useArray should have been called before. + void reAlloc(int nbOfTuples); + int getIJ(int tupleId, int compoId) const { return _mem[tupleId*_info_on_compo.size()+compoId]; } + int *getPointer() const { return _mem.getPointer(); } + void useArray(int *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo); + void writeOnPlace(int id, int element0, const int *others, int sizeOfOthers) { _mem.writeOnPlace(id,element0,others,sizeOfOthers); } + //! nothing to do here because this class does not aggregate any TimeLabel instance. + void updateTime() { } + private: + DataArrayInt() { } + private: + MemArray _mem; + }; +} + +#endif diff --git a/src/MEDCoupling/MEDCouplingMemArray.txx b/src/MEDCoupling/MemArray.txx similarity index 52% rename from src/MEDCoupling/MEDCouplingMemArray.txx rename to src/MEDCoupling/MemArray.txx index 476f147ae..8c858bd1f 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.txx +++ b/src/MEDCoupling/MemArray.txx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,10 +16,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef __PARAMEDMEM_MEDCOUPLINGMEMARRAY_TXX__ -#define __PARAMEDMEM_MEDCOUPLINGMEMARRAY_TXX__ +#ifndef __PARAMEDMEM_MEMARRAY_TXX__ +#define __PARAMEDMEM_MEMARRAY_TXX__ -#include "MEDCouplingMemArray.hxx" +#include "MemArray.hxx" #include "NormalizedUnstructuredMesh.hxx" #include "InterpKernelException.hxx" @@ -29,39 +29,11 @@ namespace ParaMEDMEM { template - void MEDCouplingPointer::setInternal(T *pointer) - { - _internal=pointer; - _external=0; - } - - template - void MEDCouplingPointer::setExternal(const T *pointer) - { - _external=pointer; - _internal=0; - } - - template - MemArray::MemArray(const MemArray& other):_nb_of_elem(-1),_ownership(false),_dealloc(CPP_DEALLOC) - { - if(!other._pointer.isNull()) - { - T *pointer=new T[other._nb_of_elem]; - std::copy(other._pointer.getConstPointer(),other._pointer.getConstPointer()+other._nb_of_elem,pointer); - useArray(pointer,true,CPP_DEALLOC,other._nb_of_elem); - } - } - - template - void MemArray::useArray(const T *array, bool ownership, DeallocType type, int nbOfElem) + void MemArray::useArray(void *array, bool ownership, DeallocType type, int nbOfElem) { _nb_of_elem=nbOfElem; destroy(); - if(ownership) - _pointer.setInternal((T *)array); - else - _pointer.setExternal(array); + _pointer=(T *)array; _ownership=ownership; _dealloc=type; } @@ -71,26 +43,8 @@ namespace ParaMEDMEM { if(id+sizeOfOthers>=_nb_of_elem) reAlloc(2*_nb_of_elem+sizeOfOthers+1); - T *pointer=_pointer.getPointer(); - pointer[id]=element0; - std::copy(others,others+sizeOfOthers,pointer+id+1); - } - - template - bool MemArray::isEqual(const MemArray& other, T prec) const - { - if(_nb_of_elem!=other._nb_of_elem) - return false; - const T *pt1=_pointer.getConstPointer(); - const T *pt2=other._pointer.getConstPointer(); - if(pt1==0 && pt2==0) - return true; - if(pt1==0 || pt2==0) - return false; - for(int i=0;i<_nb_of_elem;i++) - if(pt1[i]-pt2[i]<-prec || (pt1[i]-pt2[i])>prec) - return false; - return true; + _pointer[id]=element0; + memcpy(_pointer+id+1,others,sizeOfOthers*sizeof(T)); } template @@ -98,7 +52,7 @@ namespace ParaMEDMEM { destroy(); _nb_of_elem=nbOfElements; - _pointer.setInternal(new T[_nb_of_elem]); + _pointer=new T[_nb_of_elem]; _ownership=true; _dealloc=CPP_DEALLOC; } @@ -107,10 +61,9 @@ namespace ParaMEDMEM void MemArray::reAlloc(int newNbOfElements) { T *pointer=new T[newNbOfElements]; - std::copy(_pointer.getConstPointer(),_pointer.getConstPointer()+std::min(_nb_of_elem,newNbOfElements),pointer); - if(_ownership) - destroyPointer((T *)_pointer.getConstPointer(),_dealloc); - _pointer.setInternal(pointer); + memcpy(pointer,_pointer,std::min(_nb_of_elem,newNbOfElements)*sizeof(int)); + destroyPointer(_pointer,_dealloc); + _pointer=pointer; _nb_of_elem=newNbOfElements; _ownership=true; _dealloc=CPP_DEALLOC; @@ -142,8 +95,8 @@ namespace ParaMEDMEM void MemArray::destroy() { if(_ownership) - destroyPointer((T *)_pointer.getConstPointer(),_dealloc); - _pointer.null(); + destroyPointer(_pointer,_dealloc); + _pointer=0; _ownership=false; } @@ -151,7 +104,7 @@ namespace ParaMEDMEM MemArray &MemArray::operator=(const MemArray& other) { alloc(other._nb_of_elem); - std::copy(other._pointer.getConstPointer(),other._pointer.getConstPointer()+_nb_of_elem,_pointer.getPointer()); + memcpy(_pointer,other._pointer,_nb_of_elem*sizeof(T)); return *this; } } diff --git a/src/MEDCoupling/MEDCouplingRefCountObject.hxx b/src/MEDCoupling/RefCountObject.hxx similarity index 62% rename from src/MEDCoupling/MEDCouplingRefCountObject.hxx rename to src/MEDCoupling/RefCountObject.hxx index 6929b8533..ca28fd1bf 100644 --- a/src/MEDCoupling/MEDCouplingRefCountObject.hxx +++ b/src/MEDCoupling/RefCountObject.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,11 +16,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +#ifndef __PARAMEDMEM_REFCOUNTOBJECT_HXX__ +#define __PARAMEDMEM_REFCOUNTOBJECT_HXX__ -#ifndef __PARAMEDMEM_MEDCOUPLINGREFCOUNTOBJECT_HXX__ -#define __PARAMEDMEM_MEDCOUPLINGREFCOUNTOBJECT_HXX__ - -#include "MEDCoupling.hxx" +#include "TimeLabel.hxx" namespace ParaMEDMEM { @@ -36,28 +35,16 @@ namespace ParaMEDMEM ON_NODES = 1 } TypeOfField; - typedef enum - { - NO_TIME = 4, - ONE_TIME = 5, - LINEAR_TIME = 6, - CONST_ON_TIME_INTERVAL = 7 - } TypeOfTimeDiscretization; - - typedef bool (*FunctionToEvaluate)(const double *pos, double *res); - - class MEDCOUPLING_EXPORT RefCountObject + class RefCountObject : public TimeLabel { - protected: - RefCountObject(); - RefCountObject(const RefCountObject& other); public: - bool decrRef(); - void incrRef() const; + RefCountObject():_cnt(1) { } + bool decrRef() { bool ret=((--_cnt)==0); if(ret)delete this; return ret; } + void incrRef() { _cnt++; } protected: - virtual ~RefCountObject(); + virtual ~RefCountObject() { } private: - mutable int _cnt; + int _cnt; }; } diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest0.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest0.cxx deleted file mode 100644 index 959a8c2c3..000000000 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest0.cxx +++ /dev/null @@ -1,688 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "MEDCouplingBasicsTest.hxx" -#include "MEDCouplingUMesh.hxx" -#include "MEDCouplingExtrudedMesh.hxx" -#include "MEDCouplingFieldDouble.hxx" -#include "MEDCouplingMemArray.hxx" - -#include "MEDCouplingBasicsTestData1.hxx" - -using namespace ParaMEDMEM; - -MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSourceMesh_2() -{ - double sourceCoords[84]={100.0, 100.0, 0.0, 100.0, 100.0, 100.0, 100.0, 0.0, 100.0, 100.0, 0.0, 0.0, 0.0, 100.0, 0.0, 0.0, 100.0, 100.0, 0.0, - 0.0, 100.0, 0.0, 0.0, 0.0, 100.0, 100.0, 200.0, 100.0, 0.0, 200.0, 0.0, 100.0, 200.0, 0.0, 0.0, 200.0, 100.0, 200.0, - 0.0, 100.0, 200.0, 100.0, 0.0, 200.0, 0.0, 0.0, 200.0, 100.0, 100.0, 200.0, 200.0, 0.0, 200.0, 200.0, 200.0, 100.0, - 0.0, 200.0, 100.00000000833332, 100.00000000833332, 200.0, 0.0, 100.0, 200.0, 0.0, 0.0, 200.0, 100.0, 200.0, 200.0, - 0.0, 200.0, 200.0, 200.0, 0.0, 200.0, 200.0, 100.0, 200.0, 200.0, 200.0, 149.999999970343, 149.9999999874621, 49.999999881628682}; - - - int sourceConn[212]={25, 27, 13, 19, 18, 3, 20, 21, 5, 10, 17, 1, 1, 3, 0, 7, 18, 1, 0, 27, 12, 27, 13, 24, 25, 19, 16, 26, 1, 2, 6, 8, 15, 13, - 12, 5, 24, 13, 25, 27, 10, 11, 9, 6, 19, 8, 23, 1, 22, 8, 23, 19, 16, 13, 17, 1, 6, 9, 10, 8, 13, 17, 5, 15, 5, 4, 1, 12, 18, - 0, 24, 27, 19, 20, 18, 1, 7, 6, 5, 1, 4, 12, 15, 14, 25, 27, 19, 18, 1, 19, 16, 13, 20, 19, 23, 1, 27, 12, 1, 0, 6, 5, 1, 10, - 4, 5, 1, 7, 12, 27, 1, 13, 5, 15, 4, 12, 19, 16, 26, 22, 13, 5, 17, 1, 1, 3, 7, 2, 13, 5, 1, 12, 18, 1, 3, 0, 8, 23, 2, 9, 3, - 1, 18, 20, 1, 27, 19, 13, 24, 25, 18, 27, 25, 16, 19, 13, 7, 1, 2, 6, 3, 1, 20, 2, 8, 16, 17, 1, 7, 4, 0, 1, 18, 19, 1, 27, - 27, 12, 0, 24, 9, 6, 2, 8, 1, 4, 0, 12, 19, 16, 22, 8, 8, 2, 23, 1, 1, 16, 19, 8, 20, 2, 1, 23, 10, 1, 6, 8, 10, 8, 17, 1}; - - MEDCouplingUMesh *sourceMesh=MEDCouplingUMesh::New(); - sourceMesh->setMeshDimension(3); - sourceMesh->allocateCells(53); - for(int i=0;i<53;i++) - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TETRA4,4,sourceConn+4*i); - sourceMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(28,3); - std::copy(sourceCoords,sourceCoords+84,myCoords->getPointer()); - sourceMesh->setCoords(myCoords); - myCoords->decrRef(); - return sourceMesh; -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::build3DTargetMesh_2() -{ - double targetCoords[24]={200.0, 200.0, 0.0, 200.0, 200.0, 200.0, 200.0, 0.0, 0.0, 200.0, 0.0, 200.0, 0.0, 200.0, 0.0, 0.0, 200.0, 200.0, 0.0, 0.0, 0.0, 0.0, 0.0, 200.0}; - int targetConn[20]={5, 6, 3, 0, 1, 3, 0, 5, 3, 6, 5, 7, 6, 4, 0, 5, 6, 3, 0, 2}; - MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New(); - targetMesh->setMeshDimension(3); - targetMesh->allocateCells(5); - for(int i=0;i<5;i++) - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TETRA4,4,targetConn+4*i); - targetMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(8,3); - std::copy(targetCoords,targetCoords+24,myCoords->getPointer()); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - return targetMesh; -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::build1DTargetMesh_1() -{ - double targetCoords[36]={ - 25.,25.,0., 25.,25.,50., 25.,25.,200., 75.,25.,0., 75.,25.,50., 75.,25.,200., - 25.,125.,0., 25.,125.,50., 25.,125.,200., 125.,125.,0., 125.,125.,50., 125.,125.,200. - }; - int targetConn[16]={0,1, 1,2, 3,4, 4,5, 6,7, 7,8, 9,10, 10,11}; - - MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New("my name of mesh 1D",1); - targetMesh->allocateCells(8); - for(int i=0;i<8;i++) - targetMesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,targetConn+2*i); - targetMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(12,3); - std::copy(targetCoords,targetCoords+36,myCoords->getPointer()); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - return targetMesh; -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::build2DSourceMesh_1() -{ - double sourceCoords[8]={-0.3,-0.3, 0.7,-0.3, -0.3,0.7, 0.7,0.7}; - int sourceConn[6]={0,3,1,0,2,3}; - MEDCouplingUMesh *sourceMesh=MEDCouplingUMesh::New("my name of mesh 2D",2); - sourceMesh->allocateCells(2); - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,sourceConn); - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,sourceConn+3); - sourceMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(4,2); - std::copy(sourceCoords,sourceCoords+8,myCoords->getPointer()); - sourceMesh->setCoords(myCoords); - myCoords->decrRef(); - return sourceMesh; -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::build2DTargetMesh_1() -{ - double targetCoords[18]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7 }; - int targetConn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4}; - MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New(); - targetMesh->setMeshDimension(2); - targetMesh->allocateCells(5); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+4); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+7); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+10); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+14); - targetMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(9,2); - std::copy(targetCoords,targetCoords+18,myCoords->getPointer()); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - return targetMesh; -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::build2DTargetMeshPerm_1() -{ - double targetCoords[18]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7 }; - int targetConn[18]={0,3,4,1, 1,2,4, 4,5,2, 6,7,4,3, 7,8,5,4}; - MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New(); - targetMesh->setMeshDimension(2); - targetMesh->allocateCells(5); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+4); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+7); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+10); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+14); - targetMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(9,2); - std::copy(targetCoords,targetCoords+18,myCoords->getPointer()); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - return targetMesh; -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::build2DTargetMesh_2() -{ - double targetCoords[18]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7 }; - int targetConn[24]={0,3,4, 0,4,1, 1,4,2, 4,5,2, 3,6,4, 6,7,4, 4,7,5, 7,8,5 }; - MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New(); - targetMesh->setMeshDimension(2); - targetMesh->allocateCells(8); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+3); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+6); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+9); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+12); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+15); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+18); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+21); - targetMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(9,2); - std::copy(targetCoords,targetCoords+18,myCoords->getPointer()); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - return targetMesh; -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::buildCU1DMesh_U() -{ - double coords[4]={ 0.0, 0.3, 0.75, 1.0 }; - int conn[2*3]={ 0,1, 1,2, 2,3 }; - MEDCouplingUMesh *mesh=MEDCouplingUMesh::New(); - mesh->setMeshDimension(1); - mesh->allocateCells(3); - mesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn); - mesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn+2); - mesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn+4); - mesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(4,1); - std::copy(coords,coords+4,myCoords->getPointer()); - mesh->setCoords(myCoords); - myCoords->decrRef(); - return mesh; -} -MEDCouplingUMesh *MEDCouplingBasicsTest::buildCU2DMesh_U() -{ - double coords[18]={0.0,0.0, 0.5,0.0, 1.0,0.0, 0.0,0.5, 0.5,0.5, 1.0,0.5, 0.0,1.0, 0.5,1.0, 1.0,1.0 }; - int conn[18]={0,1,4,3, 3,4,7,6, 4,5,8,7, 1,5,4, 1,2,5 }; - MEDCouplingUMesh *mesh=MEDCouplingUMesh::New(); - mesh->setMeshDimension(2); - mesh->allocateCells(5); - mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn); - mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn+4); - mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn+8); - mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,conn+12); - mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,conn+15); - mesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(9,2); - std::copy(coords,coords+18,myCoords->getPointer()); - mesh->setCoords(myCoords); - myCoords->decrRef(); - return mesh; -} -MEDCouplingUMesh *MEDCouplingBasicsTest::buildCU3DMesh_U() -{ - double coords[27*3]= - { -// 0.0,1.0,0.0 ,0.0,0.3,0.0 ,0.0,0.3,0.3 ,0.3,0.0,0.0 ,0.3,0.3,1.0 ,1.0,0.0,1.0 ,1.0,0.0,0.3 ,0.3,0.0,0.3 ,0.3,1.0,0.3 ,0.0,0.3,1.0 ,0.3,0.0,1.0 ,0.3,0.3,0.3 ,1.0,0.3,1.0 ,1.0,0.0,0.0 ,0.0,0.0,0.0 ,1.0,0.3,0.3 ,0.3,1.0,0.0 ,1.0,1.0,0.3 ,1.0,1.0,1.0 ,0.0,1.0,1.0 ,0.3,0.3,0.0 ,0.0,1.0,0.3 ,0.0,0.0,1.0 ,0.3,1.0,1.0 ,1.0,0.3,0.0 ,0.0,0.0,0.3 ,1.0,1.0,0.0 - 0.0,0.0,0.0, 0.3,0.0,0.0, 1.0,0.0,0.0, 0.0,0.3,0.0, 0.3,0.3,0.0, 1.0,0.3,0.0, 0.0,1.0,0.0, 0.3,1.0,0.0, 1.0,1.0,0.0, 0.0,0.0,0.3, 0.3,0.0,0.3, 1.0,0.0,0.3, 0.0,0.3,0.3, 0.3,0.3,0.3, 1.0,0.3,0.3, 0.0,1.0,0.3, 0.3,1.0,0.3, 1.0,1.0,0.3, 0.0,0.0,1.0, 0.3,0.0,1.0, 1.0,0.0,1.0, 0.0,0.3,1.0, 0.3,0.3,1.0, 1.0,0.3,1.0, 0.0,1.0,1.0, 0.3,1.0,1.0, 1.0,1.0,1.0, - }; - int conn[8*8]= - { -// 11,15,12,4,8,17,18,23,3,13,6,7,20,24,15,11,14,3,7,25,1,20,11,2,1,20,11,2,0,16,8,21,20,24,15,11,16,26,17,8,25,7,10,22,2,11,4,9,2,11,4,9,21,8,23,19,7,6,5,10,11,15,12,4 - 0,3,4,1,9,12,13,10, 1,4,5,2,10,13,14,11, 3,6,7,4,12,15,16,13, 4,7,8,5,13,16,17,14, 9,12,13,10,18,21,22,19, 10,13,14,11,19,22,23,20, 12,15,16,13,21,24,25,22, 13,16,17,14,22,25,26,23 - }; - MEDCouplingUMesh *mesh=MEDCouplingUMesh::New(); - mesh->setMeshDimension(3); - mesh->allocateCells(8); - for(int i=0;i<8;i++) - mesh->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+8*i); - mesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(27,3); - std::copy(coords,coords+27*3,myCoords->getPointer()); - mesh->setCoords(myCoords); - myCoords->decrRef(); - return mesh; -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSurfSourceMesh_1() -{ - double sourceCoords[12]={-0.3,-0.3,0.5, 0.7,-0.3,1.5, -0.3,0.7,0.5, 0.7,0.7,1.5}; - int sourceConn[6]={0,3,1,0,2,3}; - MEDCouplingUMesh *sourceMesh=MEDCouplingUMesh::New(); - sourceMesh->setMeshDimension(2); - sourceMesh->allocateCells(2); - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,sourceConn); - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,sourceConn+3); - sourceMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(4,3); - std::copy(sourceCoords,sourceCoords+12,myCoords->getPointer()); - sourceMesh->setCoords(myCoords); - myCoords->decrRef(); - return sourceMesh; -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSurfSourceMesh_2() -{ - double sourceCoords[12]={-0.3,-0.3,0., 0.7,-0.3,0., -0.3,0.7,0., 0.7,0.7,0.}; - int sourceConn[6]={0,3,1,0,2,3}; - MEDCouplingUMesh *sourceMesh=MEDCouplingUMesh::New(); - sourceMesh->setMeshDimension(2); - sourceMesh->allocateCells(2); - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,sourceConn); - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,sourceConn+3); - sourceMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(4,3); - std::copy(sourceCoords,sourceCoords+12,myCoords->getPointer()); - sourceMesh->setCoords(myCoords); - myCoords->decrRef(); - return sourceMesh; -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSurfTargetMesh_1() -{ - double targetCoords[27]={-0.3,-0.3,0.5, 0.2,-0.3,1., 0.7,-0.3,1.5, -0.3,0.2,0.5, 0.2,0.2,1., 0.7,0.2,1.5, -0.3,0.7,0.5, 0.2,0.7,1., 0.7,0.7,1.5}; - int targetConn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4}; - MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New(); - targetMesh->setMeshDimension(2); - targetMesh->allocateCells(5); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+4); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+7); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+10); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+14); - targetMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(9,3); - std::copy(targetCoords,targetCoords+27,myCoords->getPointer()); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - return targetMesh; -} - -/*! - * Idem build3DSurfTargetMesh_1 except that cell id 2 is not correctly numbered. - */ -MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSurfTargetMeshPerm_1() -{ - double targetCoords[27]={-0.3,-0.3,0.5, 0.2,-0.3,1., 0.7,-0.3,1.5, -0.3,0.2,0.5, 0.2,0.2,1., 0.7,0.2,1.5, -0.3,0.7,0.5, 0.2,0.7,1., 0.7,0.7,1.5}; - int targetConn[18]={0,3,4,1, 1,4,2, 4,2,5, 6,7,4,3, 7,8,5,4}; - MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New(); - targetMesh->setMeshDimension(2); - targetMesh->allocateCells(5); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+4); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+7); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+10); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+14); - targetMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(9,3); - std::copy(targetCoords,targetCoords+27,myCoords->getPointer()); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - return targetMesh; -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSurfTargetMesh_2() -{ - double targetCoords[27]={-0.3,-0.3,0.5, 0.2,-0.3,1., 0.7,-0.3,1.5, -0.3,0.2,0.5, 0.2,0.2,1., 0.7,0.2,1.5, -0.3,0.7,0.5, 0.2,0.7,1., 0.7,0.7,1.5}; - int targetConn[24]={0,3,4, 0,4,1, 1,4,2, 4,5,2, 3,6,4, 6,7,4, 4,7,5, 7,8,5 }; - MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New(); - targetMesh->setMeshDimension(2); - targetMesh->allocateCells(8); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+3); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+6); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+9); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+12); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+15); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+18); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+21); - targetMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(9,3); - std::copy(targetCoords,targetCoords+27,myCoords->getPointer()); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - return targetMesh; -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSourceMesh_1() -{ - double sourceCoords[27]={ 0.0, 0.0, 200.0, 0.0, 0.0, 0.0, 0.0, 200.0, 200.0, 0.0, 200.0, 0.0, 200.0, 0.0, 200.0, - 200.0, 0.0, 0.0, 200.0, 200.0, 200.0, 200.0, 200.0, 0.0, 100.0, 100.0, 100.0 }; - int sourceConn[48]={8,1,7,3, 6,0,8,2, 7,4,5,8, 6,8,4,7, 6,8,0,4, 6,8,7,3, 8,1,3,0, 4,1,5,8, 1,7,5,8, 0,3,8,2, 8,1,0,4, 3,6,8,2}; - MEDCouplingUMesh *sourceMesh=MEDCouplingUMesh::New(); - sourceMesh->setMeshDimension(3); - sourceMesh->allocateCells(12); - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TETRA4,4,sourceConn); - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TETRA4,4,sourceConn+4); - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TETRA4,4,sourceConn+8); - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TETRA4,4,sourceConn+12); - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TETRA4,4,sourceConn+16); - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TETRA4,4,sourceConn+20); - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TETRA4,4,sourceConn+24); - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TETRA4,4,sourceConn+28); - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TETRA4,4,sourceConn+32); - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TETRA4,4,sourceConn+36); - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TETRA4,4,sourceConn+40); - sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TETRA4,4,sourceConn+44); - sourceMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(9,3); - std::copy(sourceCoords,sourceCoords+27,myCoords->getPointer()); - sourceMesh->setCoords(myCoords); - myCoords->decrRef(); - return sourceMesh; -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::build3DTargetMesh_1() -{ - double targetCoords[81]={ 0., 0., 0., 50., 0., 0. , 200., 0., 0. , 0., 50., 0., 50., 50., 0. , 200., 50., 0., 0., 200., 0., 50., 200., 0. , 200., 200., 0. , - 0., 0., 50., 50., 0., 50. , 200., 0., 50. , 0., 50., 50., 50., 50., 50. , 200., 50., 50., 0., 200., 50., 50., 200., 50. , 200., 200., 50. , - 0., 0., 200., 50., 0., 200. , 200., 0., 200. , 0., 50., 200., 50., 50., 200. , 200., 50., 200., 0., 200., 200., 50., 200., 200. , 200., 200., 200. }; - int targetConn[64]={0,1,4,3,9,10,13,12, 1,2,5,4,10,11,14,13, 3,4,7,6,12,13,16,15, 4,5,8,7,13,14,17,16, - 9,10,13,12,18,19,22,21, 10,11,14,13,19,20,23,22, 12,13,16,15,21,22,25,24, 13,14,17,16,22,23,26,25}; - MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New(); - targetMesh->setMeshDimension(3); - targetMesh->allocateCells(12); - for(int i=0;i<8;i++) - targetMesh->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,targetConn+8*i); - targetMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(27,3); - std::copy(targetCoords,targetCoords+81,myCoords->getPointer()); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - return targetMesh; -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::build2DTargetMeshMergeNode_1() -{ - double targetCoords[36]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,-0.3, 0.2,-0.3, 0.2,-0.3, 0.2,0.2, 0.2,0.2, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7, 0.2,0.7 }; - int targetConn[18]={0,9,7,5, 4,6,2, 10,11,8, 9,14,15,7, 17,16,13,6}; - MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New(); - targetMesh->setMeshDimension(2); - targetMesh->allocateCells(5); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+4); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+7); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+10); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+14); - targetMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(18,2); - std::copy(targetCoords,targetCoords+36,myCoords->getPointer()); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - return targetMesh; -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::build3DTargetMeshMergeNode_1() -{ - double targetCoords[93]={ 0., 0., 0., 50., 0., 0. , 200., 0., 0. , 0., 50., 0., 50., 50., 0. , 200., 50., 0., 0., 200., 0., 50., 200., 0. , 200., 200., 0. , - 0., 0., 50., 50., 0., 50. , 200., 0., 50. , 0., 50., 50., 50., 50., 50. , 200., 50., 50., 0., 200., 50., 50., 200., 50. , 200., 200., 50. , - 0., 0., 200., 50., 0., 200. , 200., 0., 200. , 0., 50., 200., 50., 50., 200. , 200., 50., 200., 0., 200., 200., 50., 200., 200. , 200., 200., 200., 50.,0.,0., 50.,0.,0., 50.,0.,0., 200., 50., 200.}; - int targetConn[64]={0,29,4,3,9,10,13,12, 28,2,5,4,10,11,14,13, 3,4,7,6,12,13,16,15, 4,5,8,7,13,14,17,16, - 9,10,13,12,18,19,22,21, 10,11,14,13,19,20,23,22, 12,13,16,15,21,22,25,24, 13,14,17,16,22,30,26,25}; - MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New(); - targetMesh->setMeshDimension(3); - targetMesh->allocateCells(12); - for(int i=0;i<8;i++) - targetMesh->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,targetConn+8*i); - targetMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(31,3); - std::copy(targetCoords,targetCoords+93,myCoords->getPointer()); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - return targetMesh; -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::build3DExtrudedUMesh_1(MEDCouplingUMesh *&mesh2D) -{ - double coords[180]={ - 0.,0.,0., 1.,1.,0., 1.,1.25,0., 0.,1.,0., 1.,1.5,0., 2.,0.,0., 2.,1.,0., 1.,2.,0., 0.,2.,0., 3.,1.,0., - 3.,2.,0., 0.,1.,0., 1.,3.,0., 2.,2.,0., 2.,3.,0., - 0.,0.,1., 1.,1.,1., 1.,1.25,1., 0.,1.,1., 1.,1.5,1., 2.,0.,1., 2.,1.,1., 1.,2.,1., 0.,2.,1., 3.,1.,1., - 3.,2.,1., 0.,1.,1., 1.,3.,1., 2.,2.,1., 2.,3.,1., - 0.,0.,2., 1.,1.,2., 1.,1.25,2., 0.,1.,2., 1.,1.5,2., 2.,0.,2., 2.,1.,2., 1.,2.,2., 0.,2.,2., 3.,1.,2., - 3.,2.,2., 0.,1.,2., 1.,3.,2., 2.,2.,2., 2.,3.,2., - 0.,0.,3., 1.,1.,3., 1.,1.25,3., 0.,1.,3., 1.,1.5,3., 2.,0.,3., 2.,1.,3., 1.,2.,3., 0.,2.,3., 3.,1.,3., - 3.,2.,3., 0.,1.,3., 1.,3.,3., 2.,2.,3., 2.,3.,3.}; - - int conn[354]={ - // 0 - 0,11,1,3,15,26,16,18, 1,2,4,7,13,6,-1,1,16,21,6,-1,6,21,28,13,-1,13,7,22,28,-1,7,4,19,22,-1,4,2,17,19,-1,2,1,16,17,-1,16,21,28,22,19,17, - 1,6,5,3,16,21,20,18, 13,10,9,6,28,25,24,21, - 11,8,7,4,2,1,-1,11,26,16,1,-1,1,16,17,2,-1,2,17,19,4,-1,4,19,22,7,-1,7,8,23,22,-1,8,11,26,23,-1,26,16,17,19,22,23, - 7,12,14,13,22,27,29,28, - // 1 - 15,26,16,18,30,41,31,33, 16,17,19,22,28,21,-1,16,31,36,21,-1,21,36,43,28,-1,28,22,37,43,-1,22,19,34,37,-1,19,17,32,34,-1,17,16,31,32,-1,31,36,43,37,34,32, - 16,21,20,18,31,36,35,33, 28,25,24,21,43,40,39,36, - 26,23,22,19,17,16,-1,26,41,31,16,-1,16,31,32,17,-1,17,32,34,19,-1,19,34,37,22,-1,22,23,38,37,-1,23,26,41,38,-1,41,31,32,34,37,38, - 22,27,29,28,37,42,44,43, - // 2 - 30,41,31,33,45,56,46,48, 31,32,34,37,43,36,-1,31,46,51,36,-1,36,51,58,43,-1,43,37,52,58,-1,37,34,49,52,-1,34,32,47,49,-1,32,31,46,47,-1,46,51,58,52,49,47, - 31,36,35,33,46,51,50,48, 43,40,39,36,58,55,54,51, - 41,38,37,34,32,31,-1,41,56,46,31,-1,31,46,47,32,-1,32,47,49,34,-1,34,49,52,37,-1,37,38,53,52,-1,38,41,56,53,-1,56,46,47,49,52,53, - 37,42,44,43,52,57,59,58 - }; - int conn2[28]={7,12,14,13, 11,8,7,4,2,1, 13,10,9,6, 1,6,5,3, 1,2,4,7,13,6, 0,11,1,3}; - // - MEDCouplingUMesh *ret=MEDCouplingUMesh::New(); - ret->setMeshDimension(3); - ret->allocateCells(18); - // - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn); - ret->insertNextCell(INTERP_KERNEL::NORM_POLYHED,43,conn+8); - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+51); - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+59); - ret->insertNextCell(INTERP_KERNEL::NORM_POLYHED,43,conn+67); - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+110); - // - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+118); - ret->insertNextCell(INTERP_KERNEL::NORM_POLYHED,43,conn+126); - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+169); - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+177); - ret->insertNextCell(INTERP_KERNEL::NORM_POLYHED,43,conn+185); - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+228); - // - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+236); - ret->insertNextCell(INTERP_KERNEL::NORM_POLYHED,43,conn+244); - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+287); - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+295); - ret->insertNextCell(INTERP_KERNEL::NORM_POLYHED,43,conn+303); - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+346); - // - ret->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(60,3); - std::copy(coords,coords+180,myCoords->getPointer()); - ret->setCoords(myCoords); - // - mesh2D=MEDCouplingUMesh::New(); - mesh2D->setMeshDimension(2); - mesh2D->allocateCells(6); - mesh2D->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn2); - mesh2D->insertNextCell(INTERP_KERNEL::NORM_POLYGON,6,conn2+4); - mesh2D->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn2+10); - mesh2D->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn2+14); - mesh2D->insertNextCell(INTERP_KERNEL::NORM_POLYGON,6,conn2+18); - mesh2D->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn2+24); - mesh2D->setCoords(myCoords); - myCoords->decrRef(); - return ret; -} - -void MEDCouplingBasicsTest::build3DExtrudedUMesh_2(MEDCouplingUMesh *&meshN, MEDCouplingUMesh *&meshTT, MEDCouplingUMesh *&meshTF) -{ - const double coordsN[270]={ - 0, 0, 0, 0.10803000450134277, 0, 0, 0.21606000900268554, 0, 0, 0.28808000564575198, 0, 0, 0.36010002136230468, 0, 0, 0.43212001800537109, 0, 0, 0, - 0.072020001411437995, 0, 0.10803000450134277, 0.072020001411437995, 0, 0.21606000900268554, 0.072020001411437995, 0, 0.28808000564575198, 0.072020001411437995, - 0, 0.36010002136230468, 0.072020001411437995, 0, 0.43212001800537109, 0.072020001411437995, 0, 0, 0.10803000450134277, 0, 0.10803000450134277, - 0.10803000450134277, 0, 0.21606000900268554, 0.10803000450134277, 0, 0.28808000564575198, 0.10803000450134277, 0, 0.36010002136230468, 0.10803000450134277, 0, - 0.43212001800537109, 0.10803000450134277, 0, 0, 0.14404000282287599, 0, 0.10803000450134277, 0.14404000282287599, 0, 0.21606000900268554, 0.14404000282287599, 0, - 0.28808000564575198, 0.14404000282287599, 0, 0.36010002136230468, 0.14404000282287599, 0, 0.43212001800537109, 0.14404000282287599, 0, 0, 0.21606000900268554, 0, - 0.10803000450134277, 0.21606000900268554, 0, 0.21606000900268554, 0.21606000900268554, 0, 0.28808000564575198, 0.21606000900268554, 0, 0.36010002136230468, - 0.21606000900268554, 0, 0.43212001800537109, 0.21606000900268554, 0, 0, 0, 2.1364999389648438, 0.10803000450134277, 0, 2.1364999389648438, 0.21606000900268554, - 0, 2.1364999389648438, 0.28808000564575198, 0, 2.1364999389648438, 0.36010002136230468, 0, 2.1364999389648438, 0.43212001800537109, 0, 2.1364999389648438, 0, - 0.072020001411437995, 2.1364999389648438, 0.10803000450134277, 0.072020001411437995, 2.1364999389648438, 0.21606000900268554, 0.072020001411437995, - 2.1364999389648438, 0.28808000564575198, 0.072020001411437995, 2.1364999389648438, 0.36010002136230468, 0.072020001411437995, 2.1364999389648438, - 0.43212001800537109, 0.072020001411437995, 2.1364999389648438, 0, 0.10803000450134277, 2.1364999389648438, 0.10803000450134277, 0.10803000450134277, - 2.1364999389648438, 0.21606000900268554, 0.10803000450134277, 2.1364999389648438, 0.28808000564575198, 0.10803000450134277, 2.1364999389648438, - 0.36010002136230468, 0.10803000450134277, 2.1364999389648438, 0.43212001800537109, 0.10803000450134277, 2.1364999389648438, 0, 0.14404000282287599, - 2.1364999389648438, 0.10803000450134277, 0.14404000282287599, 2.1364999389648438, 0.21606000900268554, 0.14404000282287599, 2.1364999389648438, - 0.28808000564575198, 0.14404000282287599, 2.1364999389648438, 0.36010002136230468, 0.14404000282287599, 2.1364999389648438, 0.43212001800537109, - 0.14404000282287599, 2.1364999389648438, 0, 0.21606000900268554, 2.1364999389648438, 0.10803000450134277, 0.21606000900268554, 2.1364999389648438, - 0.21606000900268554, 0.21606000900268554, 2.1364999389648438, 0.28808000564575198, 0.21606000900268554, 2.1364999389648438, 0.36010002136230468, - 0.21606000900268554, 2.1364999389648438, 0.43212001800537109, 0.21606000900268554, 2.1364999389648438, 0, 0, 4.2729998779296876, 0.10803000450134277, 0, - 4.2729998779296876, 0.21606000900268554, 0, 4.2729998779296876, 0.28808000564575198, 0, 4.2729998779296876, 0.36010002136230468, 0, 4.2729998779296876, - 0.43212001800537109, 0, 4.2729998779296876, 0, 0.072020001411437995, 4.2729998779296876, 0.10803000450134277, 0.072020001411437995, 4.2729998779296876, - 0.21606000900268554, 0.072020001411437995, 4.2729998779296876, 0.28808000564575198, 0.072020001411437995, 4.2729998779296876, 0.36010002136230468, - 0.072020001411437995, 4.2729998779296876, 0.43212001800537109, 0.072020001411437995, 4.2729998779296876, 0, 0.10803000450134277, 4.2729998779296876, - 0.10803000450134277, 0.10803000450134277, 4.2729998779296876, 0.21606000900268554, 0.10803000450134277, 4.2729998779296876, 0.28808000564575198, - 0.10803000450134277, 4.2729998779296876, 0.36010002136230468, 0.10803000450134277, 4.2729998779296876, 0.43212001800537109, 0.10803000450134277, - 4.2729998779296876, 0, 0.14404000282287599, 4.2729998779296876, 0.10803000450134277, 0.14404000282287599, 4.2729998779296876, 0.21606000900268554, - 0.14404000282287599, 4.2729998779296876, 0.28808000564575198, 0.14404000282287599, 4.2729998779296876, 0.36010002136230468, 0.14404000282287599, - 4.2729998779296876, 0.43212001800537109, 0.14404000282287599, 4.2729998779296876, 0, 0.21606000900268554, 4.2729998779296876, 0.10803000450134277, - 0.21606000900268554, 4.2729998779296876, 0.21606000900268554, 0.21606000900268554, 4.2729998779296876, 0.28808000564575198, 0.21606000900268554, - 4.2729998779296876, 0.36010002136230468, 0.21606000900268554, 4.2729998779296876, 0.43212001800537109, 0.21606000900268554, 4.2729998779296876}; - const int connN[320]={ - 0, 1, 7, 6, 30, 31, 37, 36, 1, 2, 8, 7, 31, 32, 38, 37, 2, 3, 9, 8, 32, 33, 39, 38, 3, 4, 10, 9, 33, 34, 40, 39, 4, 5, 11, 10, 34, 35, 41, 40, 6, - 7, 13, 12, 36, 37, 43, 42, 7, 8, 14, 13, 37, 38, 44, 43, 8, 9, 15, 14, 38, 39, 45, 44, 9, 10, 16, 15, 39, 40, 46, 45, 10, 11, 17, 16, 40, 41, 47, - 46, 12, 13, 19, 18, 42, 43, 49, 48, 13, 14, 20, 19, 43, 44, 50, 49, 14, 15, 21, 20, 44, 45, 51, 50, 15, 16, 22, 21, 45, 46, 52, 51, 16, 17, 23, - 22, 46, 47, 53, 52, 18, 19, 25, 24, 48, 49, 55, 54, 19, 20, 26, 25, 49, 50, 56, 55, 20, 21, 27, 26, 50, 51, 57, 56, 21, 22, 28, 27, 51, 52, 58, - 57, 22, 23, 29, 28, 52, 53, 59, 58, 30, 31, 37, 36, 60, 61, 67, 66, 31, 32, 38, 37, 61, 62, 68, 67, 32, 33, 39, 38, 62, 63, 69, 68, 33, 34, 40, - 39, 63, 64, 70, 69, 34, 35, 41, 40, 64, 65, 71, 70, 36, 37, 43, 42, 66, 67, 73, 72, 37, 38, 44, 43, 67, 68, 74, 73, 38, 39, 45, 44, 68, 69, 75, - 74, 39, 40, 46, 45, 69, 70, 76, 75, 40, 41, 47, 46, 70, 71, 77, 76, 42, 43, 49, 48, 72, 73, 79, 78, 43, 44, 50, 49, 73, 74, 80, 79, 44, 45, 51, - 50, 74, 75, 81, 80, 45, 46, 52, 51, 75, 76, 82, 81, 46, 47, 53, 52, 76, 77, 83, 82, 48, 49, 55, 54, 78, 79, 85, 84, 49, 50, 56, 55, 79, 80, 86, - 85, 50, 51, 57, 56, 80, 81, 87, 86, 51, 52, 58, 57, 81, 82, 88, 87, 52, 53, 59, 58, 82, 83, 89, 88}; - meshN=MEDCouplingUMesh::New(); - meshN->setName("meshExtrudedN"); - meshN->setMeshDimension(3); - meshN->allocateCells(40); - for(int i=0;i<40;i++) - meshN->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,connN+8*i); - meshN->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(90,3); - std::copy(coordsN,coordsN+270,myCoords->getPointer()); - meshN->setCoords(myCoords); - myCoords->decrRef(); - // - meshTT=MEDCouplingUMesh::New(); - meshTT->setName("meshExtrudedTT"); - meshTT->setMeshDimension(3); - meshTT->allocateCells(200); - for(int i=0;i<200;i++) - meshTT->insertNextCell(INTERP_KERNEL::NORM_POLYHED,connITT[i+1]-connITT[i],connTT+connITT[i]); - meshTT->finishInsertingCells(); - myCoords=DataArrayDouble::New(); - myCoords->alloc(1720,3); - std::copy(coordsTT,coordsTT+5160,myCoords->getPointer()); - meshTT->setCoords(myCoords); - myCoords->decrRef(); - // - meshTF=MEDCouplingUMesh::New(); - meshTF->setName("meshExtrudedTF"); - meshTF->setMeshDimension(3); - meshTF->allocateCells(340); - for(int i=0;i<320;i++) - meshTF->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,connTFH8+8*i); - for(int i=0;i<20;i++) - meshTF->insertNextCell(INTERP_KERNEL::NORM_POLYHED,connTFPOLH_I[i+1]-connTFPOLH_I[i],connTFPOLH+connTFPOLH_I[i]); - meshTF->finishInsertingCells(); - myCoords=DataArrayDouble::New(); - myCoords->alloc(567,3); - std::copy(coordsTF,coordsTF+1701,myCoords->getPointer()); - meshTF->setCoords(myCoords); - myCoords->decrRef(); -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::build2DTargetMeshMerged_1() -{ - double targetCoords[26]={ - -0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7, - 0.7,-0.3, 1.7,-0.3, 0.7,0.7, 1.7,0.7 - }; - int targetConn[24]={ - 0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4, - 9,12,10,9,11,12 - }; - MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New(); - targetMesh->setName("merge"); - targetMesh->setMeshDimension(2); - targetMesh->allocateCells(10); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+4); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+7); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+10); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+14); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+18); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+21); - targetMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(13,2); - std::copy(targetCoords,targetCoords+26,myCoords->getPointer()); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - return targetMesh; -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::build2DCurveMesh(double dx, double dy) -{ - // 1d mesh: - // - // * - // / - // *---* - double targetCoords[3*2]= - { - 0.+dx,0.+dy, 1.+dx,0.+dy, 2.+dx,1.+dy - }; - int targetConn[2*2]={1,2, 0,1}; - - MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New("2Dcurve 1D mesh",1); - targetMesh->allocateCells(2); - for(int i=0;i<2;i++) - targetMesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,targetConn+2*i); - targetMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(3,2); - std::copy(targetCoords,targetCoords+3*2,myCoords->getPointer()); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - return targetMesh; -} - -MEDCouplingUMesh *MEDCouplingBasicsTest::build1DMesh(double dx) -{ - double targetCoords[4]= - { - 0.+dx, 1.+dx, 3.+dx, 4.+dx - }; - int targetConn[2*3]={1,2, 0,1, 2,3}; - - MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New("1D mesh",1); - targetMesh->allocateCells(3); - for(int i=0;i<3;i++) - targetMesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,targetConn+2*i); - targetMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(4,1); - std::copy(targetCoords,targetCoords+4,myCoords->getPointer()); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - return targetMesh; -} - -double MEDCouplingBasicsTest::sumAll(const std::vector< std::map >& matrix) -{ - double ret=0.; - for(std::vector< std::map >::const_iterator iter=matrix.begin();iter!=matrix.end();iter++) - for(std::map::const_iterator iter2=(*iter).begin();iter2!=(*iter).end();iter2++) - ret+=(*iter2).second; - return ret; -} diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx deleted file mode 100644 index dbd2a6ff9..000000000 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx +++ /dev/null @@ -1,1881 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "MEDCouplingBasicsTest.hxx" -#include "MEDCouplingUMesh.hxx" -#include "MEDCouplingCMesh.hxx" -#include "MEDCouplingExtrudedMesh.hxx" -#include "MEDCouplingFieldDouble.hxx" -#include "MEDCouplingMemArray.hxx" - -#include -#include - -using namespace ParaMEDMEM; - -void MEDCouplingBasicsTest::testArray() -{ - int tmp1[6]={7,6,5,4,3,2}; - const int tmp2[3]={8,9,10}; - { - MemArray mem; - mem.useArray(tmp1,false,CPP_DEALLOC,6); - CPPUNIT_ASSERT(tmp1==mem.getConstPointer()); - CPPUNIT_ASSERT_THROW(mem.getPointer(),INTERP_KERNEL::Exception); - CPPUNIT_ASSERT_THROW(mem[2]=7,INTERP_KERNEL::Exception); - CPPUNIT_ASSERT_THROW(mem.writeOnPlace(0,12,tmp2,3),INTERP_KERNEL::Exception); - mem.writeOnPlace(4,12,tmp2,3); - } - { - int *tmp3=new int[6]; - std::copy(tmp1,tmp1+6,tmp3); - MemArray mem2; - mem2.useArray(tmp3,true,CPP_DEALLOC,6); - CPPUNIT_ASSERT(tmp3==mem2.getConstPointer()); - CPPUNIT_ASSERT(tmp3==mem2.getPointer()); - CPPUNIT_ASSERT_EQUAL(5,mem2[2]); - mem2[2]=7; - CPPUNIT_ASSERT_EQUAL(7,mem2[2]); - mem2.writeOnPlace(0,12,tmp2,3); - CPPUNIT_ASSERT_EQUAL(9,mem2[2]); - CPPUNIT_ASSERT_EQUAL(12,mem2[0]); - mem2.writeOnPlace(4,12,tmp2,3); - } -} - -void MEDCouplingBasicsTest::testMesh() -{ - const int nbOfCells=6; - const int nbOfNodes=12; - - double coords[3*nbOfNodes]={ - 0.024155, 0.04183768725682622, -0.305, 0.04831000000000001, -1.015761910347357e-17, -0.305, 0.09662000000000001, -1.832979297858306e-18, - -0.305, 0.120775, 0.04183768725682623, -0.305, 0.09662000000000001, 0.08367537451365245, -0.305, 0.04831000000000001, - 0.08367537451365246, -0.305, 0.024155, 0.04183768725682622, -0.2863, 0.04831000000000001, -1.015761910347357e-17, -0.2863, - 0.09662000000000001, -1.832979297858306e-18, -0.2863, 0.120775, 0.04183768725682623, -0.2863, 0.09662000000000001, 0.08367537451365245, - -0.2863, 0.04831000000000001, 0.08367537451365246, -0.2863, }; - - int tab4[4*nbOfCells]={ - 1, 2, 8, 7, 2, 3, 9, 8, 3, 4, 10, 9, 4, 5, 11, 10, 5, 0, 6, 11, - 0, 1, 7, 6, }; - - MEDCouplingUMesh *mesh=MEDCouplingUMesh::New(); - mesh->setMeshDimension(2); - mesh->allocateCells(8); - const int *curConn=tab4; - for(int i=0;iinsertNextCell(INTERP_KERNEL::NORM_QUAD4,4,curConn); - mesh->finishInsertingCells(); - CPPUNIT_ASSERT_EQUAL(30,mesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(nbOfCells,mesh->getNumberOfCells()); - //test 0 - no copy no ownership - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->useArray(coords,false,CPP_DEALLOC,nbOfNodes,3); - mesh->setCoords(myCoords); - mesh->setCoords(myCoords); - myCoords->decrRef(); - CPPUNIT_ASSERT_EQUAL(nbOfCells,mesh->getNumberOfCells()); - mesh->checkCoherency(); - //test 1 - no copy ownership C++ - myCoords=DataArrayDouble::New(); - double *tmp=new double[3*nbOfNodes]; - std::copy(coords,coords+3*nbOfNodes,tmp); - myCoords->useArray(tmp,true,CPP_DEALLOC,nbOfNodes,3); - mesh->setCoords(myCoords); - myCoords->decrRef(); - CPPUNIT_ASSERT_EQUAL(nbOfCells,mesh->getNumberOfCells()); - mesh->checkCoherency(); - //test 2 - no copy ownership C - myCoords=DataArrayDouble::New(); - tmp=(double *)malloc(3*nbOfNodes*sizeof(double)); - std::copy(coords,coords+3*nbOfNodes,tmp); - myCoords->useArray(tmp,true,C_DEALLOC,nbOfNodes,3); - mesh->setCoords(myCoords); - myCoords->decrRef(); - CPPUNIT_ASSERT_EQUAL(nbOfNodes,mesh->getNumberOfNodes()); - mesh->checkCoherency(); - //test 3 - copy. - myCoords=DataArrayDouble::New(); - myCoords->alloc(nbOfNodes,3); - tmp=myCoords->getPointer(); - std::copy(coords,coords+3*nbOfNodes,tmp); - // test 3 bis deepcopy - DataArrayDouble *myCoords2=DataArrayDouble::New(); - *myCoords2=*myCoords; - myCoords2->decrRef(); - // - mesh->setCoords(myCoords); - myCoords->decrRef(); - CPPUNIT_ASSERT_EQUAL(nbOfNodes,mesh->getNumberOfNodes()); - mesh->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension()); - // test clone not recursively - MEDCouplingUMesh *mesh2=mesh->clone(false); - CPPUNIT_ASSERT(mesh2!=mesh); - mesh2->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(nbOfCells,mesh2->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(nbOfNodes,mesh2->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(3,mesh2->getSpaceDimension()); - CPPUNIT_ASSERT(mesh!=mesh2); - CPPUNIT_ASSERT(mesh->getCoords()==mesh2->getCoords()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.2863,mesh2->getCoords()->getIJ(11,2),1e-14); - CPPUNIT_ASSERT(mesh->getNodalConnectivity()==mesh2->getNodalConnectivity()); - CPPUNIT_ASSERT_EQUAL(3,mesh2->getNodalConnectivity()->getIJ(7,0)); - CPPUNIT_ASSERT(mesh->getNodalConnectivityIndex()==mesh2->getNodalConnectivityIndex()); - CPPUNIT_ASSERT_EQUAL(15,mesh2->getNodalConnectivityIndex()->getIJ(3,0)); - mesh2->decrRef(); - // test clone not recursively - MEDCouplingUMesh *mesh3=mesh->clone(true); - CPPUNIT_ASSERT(mesh3!=mesh); - mesh3->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(nbOfCells,mesh3->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(nbOfNodes,mesh3->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(3,mesh3->getSpaceDimension()); - CPPUNIT_ASSERT(mesh!=mesh3); - CPPUNIT_ASSERT(mesh->getCoords()!=mesh3->getCoords()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.2863,mesh3->getCoords()->getIJ(11,2),1e-14); - CPPUNIT_ASSERT(mesh->getNodalConnectivity()!=mesh3->getNodalConnectivity()); - CPPUNIT_ASSERT_EQUAL(3,mesh3->getNodalConnectivity()->getIJ(7,0)); - CPPUNIT_ASSERT(mesh->getNodalConnectivityIndex()!=mesh3->getNodalConnectivityIndex()); - CPPUNIT_ASSERT_EQUAL(15,mesh3->getNodalConnectivityIndex()->getIJ(3,0)); - mesh3->decrRef(); - //test 4 - Field on cells - MEDCouplingFieldDouble *fieldOnCells=MEDCouplingFieldDouble::New(ON_CELLS); - fieldOnCells->setMesh(mesh); - DataArrayDouble *array=DataArrayDouble::New(); - array->alloc(nbOfCells,9); - fieldOnCells->setArray(array); - tmp=array->getPointer(); - array->decrRef(); - std::fill(tmp,tmp+9*nbOfCells,7.); - //content of field changed -> declare it. - fieldOnCells->declareAsNew(); - fieldOnCells->checkCoherency(); - // testing clone of fields - no recursive - MEDCouplingFieldDouble *fieldOnCells2=fieldOnCells->clone(false); - CPPUNIT_ASSERT(fieldOnCells2!=fieldOnCells); - fieldOnCells2->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(nbOfCells,fieldOnCells2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(9,fieldOnCells2->getNumberOfComponents()); - CPPUNIT_ASSERT(fieldOnCells2->getArray()==fieldOnCells->getArray()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,fieldOnCells2->getArray()->getIJ(3,7),1e-14); - CPPUNIT_ASSERT(fieldOnCells2->getMesh()==fieldOnCells->getMesh()); - // testing clone of fields - recursive - MEDCouplingFieldDouble *fieldOnCells3=fieldOnCells->clone(true); - CPPUNIT_ASSERT(fieldOnCells3!=fieldOnCells); - fieldOnCells3->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(nbOfCells,fieldOnCells3->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(9,fieldOnCells3->getNumberOfComponents()); - CPPUNIT_ASSERT(fieldOnCells3->getArray()!=fieldOnCells->getArray()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,fieldOnCells3->getArray()->getIJ(3,7),1e-14); - CPPUNIT_ASSERT(fieldOnCells3->getMesh()==fieldOnCells->getMesh()); - fieldOnCells2->decrRef(); - fieldOnCells3->decrRef(); - // - fieldOnCells->decrRef(); - //clean-up - mesh->decrRef(); -} - -void MEDCouplingBasicsTest::testMeshPointsCloud() -{ - double targetCoords[27]={-0.3,-0.3,0.5, 0.2,-0.3,1., 0.7,-0.3,1.5, -0.3,0.2,0.5, 0.2,0.2,1., 0.7,0.2,1.5, -0.3,0.7,0.5, 0.2,0.7,1., 0.7,0.7,1.5}; - int *targetConn=0; - MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New(); - targetMesh->setMeshDimension(0); - targetMesh->allocateCells(8); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_POINT0,0,targetConn); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_POINT0,0,targetConn); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_POINT0,0,targetConn); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_POINT0,0,targetConn); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_POINT0,0,targetConn); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_POINT0,0,targetConn); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_POINT0,0,targetConn); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_POINT0,0,targetConn); - targetMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(9,3); - std::copy(targetCoords,targetCoords+27,myCoords->getPointer()); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - // - targetMesh->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(3,targetMesh->getSpaceDimension()); - CPPUNIT_ASSERT_EQUAL(8,targetMesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(9,targetMesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(0,targetMesh->getMeshDimension()); - // - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::testMeshM1D() -{ - MEDCouplingUMesh *meshM1D=MEDCouplingUMesh::New(); - CPPUNIT_ASSERT_THROW(meshM1D->getMeshDimension(),INTERP_KERNEL::Exception); - CPPUNIT_ASSERT_THROW(meshM1D->getNumberOfNodes(),INTERP_KERNEL::Exception); - CPPUNIT_ASSERT_THROW(meshM1D->getNumberOfCells(),INTERP_KERNEL::Exception); - CPPUNIT_ASSERT_THROW(meshM1D->setMeshDimension(-2),INTERP_KERNEL::Exception); - CPPUNIT_ASSERT_THROW(meshM1D->setMeshDimension(-10),INTERP_KERNEL::Exception); - CPPUNIT_ASSERT_THROW(meshM1D->checkCoherency(),INTERP_KERNEL::Exception); - meshM1D->setMeshDimension(-1); - meshM1D->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(-1,meshM1D->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(1,meshM1D->getNumberOfCells()); - CPPUNIT_ASSERT_THROW(meshM1D->getNumberOfNodes(),INTERP_KERNEL::Exception); - CPPUNIT_ASSERT_THROW(meshM1D->getSpaceDimension(),INTERP_KERNEL::Exception); - MEDCouplingUMesh *cpy=meshM1D->clone(true); - CPPUNIT_ASSERT(cpy->isEqual(meshM1D,1e-12)); - cpy->decrRef(); - MEDCouplingFieldDouble *fieldOnCells=MEDCouplingFieldDouble::New(ON_CELLS); - fieldOnCells->setMesh(meshM1D); - DataArrayDouble *array=DataArrayDouble::New(); - array->alloc(1,6); - fieldOnCells->setArray(array); - double *tmp=array->getPointer(); - array->decrRef(); - std::fill(tmp,tmp+6,7.); - fieldOnCells->checkCoherency(); - // - fieldOnCells->decrRef(); - meshM1D->decrRef(); -} - -void MEDCouplingBasicsTest::testDeepCopy() -{ - DataArrayDouble *array=DataArrayDouble::New(); - array->alloc(5,3); - std::fill(array->getPointer(),array->getPointer()+5*3,7.); - CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,array->getIJ(3,2),1e-14); - double *tmp1=array->getPointer(); - DataArrayDouble *array2=array->deepCopy(); - double *tmp2=array2->getPointer(); - CPPUNIT_ASSERT(tmp1!=tmp2); - array->decrRef(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,array2->getIJ(3,2),1e-14); - array2->decrRef(); - // - DataArrayInt *array3=DataArrayInt::New(); - array3->alloc(5,3); - std::fill(array3->getPointer(),array3->getPointer()+5*3,17); - CPPUNIT_ASSERT_EQUAL(17,array3->getIJ(3,2)); - int *tmp3=array3->getPointer(); - DataArrayInt *array4=array3->deepCopy(); - int *tmp4=array4->getPointer(); - CPPUNIT_ASSERT(tmp3!=tmp4); - array3->decrRef(); - CPPUNIT_ASSERT_EQUAL(17,array4->getIJ(3,2)); - array4->decrRef(); -} - -void MEDCouplingBasicsTest::testRevNodal() -{ - MEDCouplingUMesh *mesh=build2DTargetMesh_1(); - DataArrayInt *revNodal=DataArrayInt::New(); - DataArrayInt *revNodalIndx=DataArrayInt::New(); - // - mesh->getReverseNodalConnectivity(revNodal,revNodalIndx); - const int revNodalExpected[18]={0,0,1,1,2,0,3,0,1,2,3,4,2,4,3,3,4,4}; - const int revNodalIndexExpected[10]={0,1,3,5,7,12,14,15,17,18}; - CPPUNIT_ASSERT_EQUAL(18,revNodal->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(10,revNodalIndx->getNbOfElems()); - CPPUNIT_ASSERT(std::equal(revNodalExpected,revNodalExpected+18,revNodal->getPointer())); - CPPUNIT_ASSERT(std::equal(revNodalIndexExpected,revNodalIndexExpected+10,revNodalIndx->getPointer())); - // - revNodal->decrRef(); - revNodalIndx->decrRef(); - mesh->decrRef(); -} - -void MEDCouplingBasicsTest::testConvertToPolyTypes() -{ - ////// 2D - MEDCouplingUMesh *mesh=build2DTargetMesh_1(); - // - const int elts[2]={1,3}; - std::vector eltsV(elts,elts+2); - mesh->convertToPolyTypes(eltsV); - mesh->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(5,mesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(23,mesh->getNodalConnectivity()->getNumberOfTuples()); - const int *pt=mesh->getNodalConnectivity()->getConstPointer(); - const int expected1[23]={4, 0, 3, 4, 1, 5, 1, 4, 2, 3, 4, 5, 2, 5, 6, 7, 4, 3, 4, 7, 8, 5, 4}; - CPPUNIT_ASSERT(std::equal(expected1,expected1+23,pt)); - // - mesh->decrRef(); - ////// 3D - mesh=build3DTargetMesh_1(); - mesh->convertToPolyTypes(eltsV); - mesh->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(8,mesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(114,mesh->getNodalConnectivity()->getNumberOfTuples()); - mesh->convertToPolyTypes(eltsV); - mesh->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(8,mesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(114,mesh->getNodalConnectivity()->getNumberOfTuples()); - // - mesh->decrRef(); -} - -void MEDCouplingBasicsTest::testDescConn2D() -{ - MEDCouplingUMesh *mesh=build2DTargetMesh_1(); - DataArrayInt *desc=DataArrayInt::New(); - DataArrayInt *descIndx=DataArrayInt::New(); - DataArrayInt *revDesc=DataArrayInt::New(); - DataArrayInt *revDescIndx=DataArrayInt::New(); - // - MEDCouplingUMesh *mesh2=mesh->buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx); - mesh2->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(1,mesh2->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(13,mesh2->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(14,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(14,revDescIndx->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(6,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(6,descIndx->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(18,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,desc->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(18,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,revDesc->getNumberOfTuples()); - const int expected1[18]={0,1,2,3, 2,4,5, 6,7,4, 8,9,1,10, 11,12,6,9}; - CPPUNIT_ASSERT(std::equal(expected1,expected1+18,desc->getConstPointer())); - const int expected2[6]={0,4,7,10,14,18}; - CPPUNIT_ASSERT(std::equal(expected2,expected2+6,descIndx->getConstPointer())); - const int expected3[14]={0,1,3,5,6,8,9,11,12,13,15,16,17,18}; - CPPUNIT_ASSERT(std::equal(expected3,expected3+14,revDescIndx->getConstPointer())); - const int expected4[18]={0, 0,3, 0,1, 0, 1,2, 1, 2,4, 2, 3, 3,4, 3, 4, 4}; - CPPUNIT_ASSERT(std::equal(expected4,expected4+18,revDesc->getConstPointer())); - DataArrayInt *conn=mesh2->getNodalConnectivity(); - DataArrayInt *connIndex=mesh2->getNodalConnectivityIndex(); - const int expected5[14]={0,3,6,9,12,15,18,21,24,27,30,33,36,39}; - CPPUNIT_ASSERT(std::equal(expected5,expected5+14,connIndex->getConstPointer())); - const int expected6[39]={1, 0, 3, 1, 3, 4, 1, 4, 1, 1, 1, 0, 1, 4, 2, 1, 2, 1, 1, 4, 5, 1, 5, 2, 1, 6, 7, 1, 7, 4, 1, 3, 6, 1, 7, 8, 1, 8, 5}; - CPPUNIT_ASSERT(std::equal(expected6,expected6+39,conn->getConstPointer())); - // - desc->decrRef(); - descIndx->decrRef(); - revDesc->decrRef(); - revDescIndx->decrRef(); - mesh2->decrRef(); - // - const int elts[2]={1,3}; - std::vector eltsV(elts,elts+2); - mesh->convertToPolyTypes(eltsV); - mesh->checkCoherency(); - // - desc=DataArrayInt::New(); - descIndx=DataArrayInt::New(); - revDesc=DataArrayInt::New(); - revDescIndx=DataArrayInt::New(); - // - mesh2=mesh->buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx); - mesh2->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(1,mesh2->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(13,mesh2->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(14,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(14,revDescIndx->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(6,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(6,descIndx->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(18,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,desc->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(18,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,revDesc->getNumberOfTuples()); - CPPUNIT_ASSERT(std::equal(expected1,expected1+18,desc->getConstPointer())); - CPPUNIT_ASSERT(std::equal(expected2,expected2+6,descIndx->getConstPointer())); - CPPUNIT_ASSERT(std::equal(expected3,expected3+14,revDescIndx->getConstPointer())); - CPPUNIT_ASSERT(std::equal(expected4,expected4+18,revDesc->getConstPointer())); - conn=mesh2->getNodalConnectivity(); - connIndex=mesh2->getNodalConnectivityIndex(); - CPPUNIT_ASSERT(std::equal(expected5,expected5+14,connIndex->getConstPointer())); - CPPUNIT_ASSERT(std::equal(expected6,expected6+39,conn->getConstPointer())); - // - desc->decrRef(); - descIndx->decrRef(); - revDesc->decrRef(); - revDescIndx->decrRef(); - mesh2->decrRef(); - mesh->decrRef(); -} - -void MEDCouplingBasicsTest::testDescConn3D() -{ - MEDCouplingUMesh *mesh=build3DTargetMesh_1(); - DataArrayInt *desc=DataArrayInt::New(); - DataArrayInt *descIndx=DataArrayInt::New(); - DataArrayInt *revDesc=DataArrayInt::New(); - DataArrayInt *revDescIndx=DataArrayInt::New(); - // - MEDCouplingUMesh *mesh2=mesh->buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx); - mesh2->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(2,mesh2->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(36,mesh2->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(37,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(37,revDescIndx->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(9,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(9,descIndx->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(48,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,desc->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(48,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,revDesc->getNumberOfTuples()); - const int expected1[9]={0, 6, 12, 18, 24, 30, 36, 42, 48}; - const int expected2[48]={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 3, 11, 12, 4, 13, 14, 15, 16, 17, 10, 18, 19, 13, 1, 20, 21, 22, 23, 24, 7, 25, 26, 27, 28, 22, 12, 29, 23, 30, 31, 32, 17, 33, 28, 34, 35, 30}; - const int expected3[37]={0, 1, 3, 4, 6, 8, 9, 10, 12, 13, 14, 16, 17, 19, 21, 22, 23, 24, 26, 27, 28, 29, 30, 32, 34, 35, 36, 37, 38, 40, 41, 43, 44, 45, 46, 47, 48}; - const int expected4[48]={0, 0, 4, 0, 0, 1, 0, 2, 0, 1, 1, 5, 1, 1, 1, 3, 2, 2, 6, 2, 3, 2, 2, 3, 3, 7, 3, 3, 4, 4, 4, 5, 4, 6, 4, 5, 5, 5, 5, 7, 6, 6, 7, 6, 6, 7, 7, 7}; - const int expected5[37]={0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180}; - const int expected6[180]={4, 0, 1, 4, 3, 4, 9, 12, 13, 10, 4, 0, 9, 10, 1, 4, 1, 10, 13, 4, 4, 4, 13, 12, 3, 4, 3, 12, 9, 0, 4, 1, 2, 5, 4, 4, 10, 13, 14, 11, 4, 1, 10, 11, 2, 4, 2, 11, 14, - 5, 4, 5, 14, 13, 4, 4, 3, 4, 7, 6, 4, 12, 15, 16, 13, 4, 4, 13, 16, 7, 4, 7, 16, 15, 6, 4, 6, 15, 12, 3, 4, 4, 5, 8, 7, 4, 13, 16, 17, 14, 4, 5, 14, 17, 8, 4, 8, - 17, 16, 7, 4, 18, 21, 22, 19, 4, 9, 18, 19, 10, 4, 10, 19, 22, 13, 4, 13, 22, 21, 12, 4, 12, 21, 18, 9, 4, 19, 22, 23, 20, 4, 10, 19, 20, 11, 4, 11, 20, 23, 14, 4, - 14, 23, 22, 13, 4, 21, 24, 25, 22, 4, 13, 22, 25, 16, 4, 16, 25, 24, 15, 4, 15, 24, 21, 12, 4, 22, 25, 26, 23, 4, 14, 23, 26, 17, 4, 17, 26, 25, 16}; - const int expected7[180]={4, 0, 1, 4, 3, 4, 9, 12, 13, 10, 4, 0, 9, 10, 1, 4, 1, 10, 13, 4, 4, 4, 13, 12, 3, 4, 3, 12, 9, 0, 5, 1, 2, 5, 4, 5, 10, 13, 14, 11, 5, 1, 10, 11, 2, 5, 2, 11, 14, - 5, 5, 5, 14, 13, 4, 4, 3, 4, 7, 6, 4, 12, 15, 16, 13, 4, 4, 13, 16, 7, 4, 7, 16, 15, 6, 4, 6, 15, 12, 3, 5, 4, 5, 8, 7, 5, 13, 16, 17, 14, 5, 5, 14, 17, 8, 5, 8, - 17, 16, 7, 4, 18, 21, 22, 19, 4, 9, 18, 19, 10, 4, 10, 19, 22, 13, 4, 13, 22, 21, 12, 4, 12, 21, 18, 9, 4, 19, 22, 23, 20, 4, 10, 19, 20, 11, 4, 11, 20, 23, 14, 4, - 14, 23, 22, 13, 4, 21, 24, 25, 22, 4, 13, 22, 25, 16, 4, 16, 25, 24, 15, 4, 15, 24, 21, 12, 4, 22, 25, 26, 23, 4, 14, 23, 26, 17, 4, 17, 26, 25, 16}; - - CPPUNIT_ASSERT(std::equal(expected1,expected1+9,descIndx->getConstPointer())); - CPPUNIT_ASSERT(std::equal(expected2,expected2+48,desc->getConstPointer())); - CPPUNIT_ASSERT(std::equal(expected3,expected3+37,revDescIndx->getConstPointer())); - CPPUNIT_ASSERT(std::equal(expected4,expected4+48,revDesc->getConstPointer())); - CPPUNIT_ASSERT(std::equal(expected5,expected5+37,mesh2->getNodalConnectivityIndex()->getConstPointer())); - CPPUNIT_ASSERT(std::equal(expected6,expected6+180,mesh2->getNodalConnectivity()->getConstPointer())); - // - desc->decrRef(); - descIndx->decrRef(); - revDesc->decrRef(); - revDescIndx->decrRef(); - mesh2->decrRef(); - // - const int elts[2]={1,3}; - std::vector eltsV(elts,elts+2); - mesh->convertToPolyTypes(eltsV); - mesh->checkCoherency(); - desc=DataArrayInt::New(); - descIndx=DataArrayInt::New(); - revDesc=DataArrayInt::New(); - revDescIndx=DataArrayInt::New(); - mesh2=mesh->buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx); - mesh2->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(2,mesh2->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(36,mesh2->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(37,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(37,revDescIndx->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(9,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(9,descIndx->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(48,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,desc->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(48,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,revDesc->getNumberOfTuples()); - CPPUNIT_ASSERT(std::equal(expected1,expected1+9,descIndx->getConstPointer())); - CPPUNIT_ASSERT(std::equal(expected2,expected2+48,desc->getConstPointer())); - CPPUNIT_ASSERT(std::equal(expected3,expected3+37,revDescIndx->getConstPointer())); - CPPUNIT_ASSERT(std::equal(expected4,expected4+48,revDesc->getConstPointer())); - CPPUNIT_ASSERT(std::equal(expected5,expected5+37,mesh2->getNodalConnectivityIndex()->getConstPointer())); - CPPUNIT_ASSERT(std::equal(expected7,expected7+180,mesh2->getNodalConnectivity()->getConstPointer())); - // - desc->decrRef(); - descIndx->decrRef(); - revDesc->decrRef(); - revDescIndx->decrRef(); - mesh2->decrRef(); - mesh->decrRef(); -} - -void MEDCouplingBasicsTest::testFindBoundaryNodes() -{ - MEDCouplingUMesh *mesh=build3DTargetMesh_1(); - std::vector boundaryNodes; - mesh->findBoundaryNodes(boundaryNodes); - CPPUNIT_ASSERT_EQUAL(26,(int)boundaryNodes.size()); - const int expected1[26]={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26}; - CPPUNIT_ASSERT(std::equal(expected1,expected1+26,boundaryNodes.begin())); - mesh->decrRef(); -} - -void MEDCouplingBasicsTest::testBoundaryMesh() -{ - MEDCouplingUMesh *mesh=build3DTargetMesh_1(); - MEDCouplingPointSet *mesh2=mesh->buildBoundaryMesh(false); - CPPUNIT_ASSERT_EQUAL(24,mesh2->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(26,mesh2->getNumberOfNodes()); - mesh2->decrRef(); - mesh->decrRef(); -} - -void MEDCouplingBasicsTest::testBuildPartOfMySelf() -{ - MEDCouplingUMesh *mesh=build2DTargetMesh_1(); - mesh->setName("Toto"); - const int tab1[2]={0,4}; - const int tab2[3]={0,2,3}; - // - MEDCouplingPointSet *subMeshSimple=mesh->buildPartOfMySelf(tab1,tab1+2,true); - MEDCouplingUMesh *subMesh=dynamic_cast(subMeshSimple); - CPPUNIT_ASSERT(subMesh); - std::string name(subMesh->getName()); - CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllTypes().size()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,*mesh->getAllTypes().begin()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*(++(mesh->getAllTypes().begin()))); - CPPUNIT_ASSERT_EQUAL(1,(int)subMesh->getAllTypes().size()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllTypes().begin()); - CPPUNIT_ASSERT(name=="PartOf_Toto"); - CPPUNIT_ASSERT(mesh->getCoords()==subMesh->getCoords()); - CPPUNIT_ASSERT_EQUAL(2,subMesh->getNumberOfCells()); - const int subConn[10]={4,0,3,4,1,4,7,8,5,4}; - const int subConnIndex[3]={0,5,10}; - CPPUNIT_ASSERT_EQUAL(10,subMesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(3,subMesh->getNodalConnectivityIndex()->getNbOfElems()); - CPPUNIT_ASSERT(std::equal(subConn,subConn+10,subMesh->getNodalConnectivity()->getPointer())); - CPPUNIT_ASSERT(std::equal(subConnIndex,subConnIndex+3,subMesh->getNodalConnectivityIndex()->getPointer())); - subMesh->decrRef(); - // - subMeshSimple=mesh->buildPartOfMySelf(tab2,tab2+3,true); - subMesh=dynamic_cast(subMeshSimple); - CPPUNIT_ASSERT(subMesh); - name=subMesh->getName(); - CPPUNIT_ASSERT_EQUAL(2,(int)subMesh->getAllTypes().size()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,*subMesh->getAllTypes().begin()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*(++(subMesh->getAllTypes().begin()))); - CPPUNIT_ASSERT(name=="PartOf_Toto"); - CPPUNIT_ASSERT(mesh->getCoords()==subMesh->getCoords()); - CPPUNIT_ASSERT_EQUAL(3,subMesh->getNumberOfCells()); - const int subConn2[14]={4,0,3,4,1,3,4,5,2,4,6,7,4,3}; - const int subConnIndex2[4]={0,5,9,14}; - CPPUNIT_ASSERT_EQUAL(14,subMesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(4,subMesh->getNodalConnectivityIndex()->getNbOfElems()); - CPPUNIT_ASSERT(std::equal(subConn2,subConn2+14,subMesh->getNodalConnectivity()->getPointer())); - CPPUNIT_ASSERT(std::equal(subConnIndex2,subConnIndex2+4,subMesh->getNodalConnectivityIndex()->getPointer())); - subMesh->decrRef(); - // - mesh->decrRef(); -} - -void MEDCouplingBasicsTest::testBuildPartOfMySelfNode() -{ - MEDCouplingUMesh *mesh=build2DTargetMesh_1(); - const int tab1[2]={5,7}; - MEDCouplingPointSet *subMeshSimple=mesh->buildPartOfMySelfNode(tab1,tab1+2,true); - MEDCouplingUMesh *subMesh=dynamic_cast(subMeshSimple); - CPPUNIT_ASSERT(subMesh); - CPPUNIT_ASSERT_EQUAL(1,(int)subMesh->getAllTypes().size()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllTypes().begin()); - CPPUNIT_ASSERT_EQUAL(1,subMesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(5,subMesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(2,subMesh->getNodalConnectivityIndex()->getNbOfElems()); - const int subConn[5]={4,7,8,5,4}; - const int subConnIndex[3]={0,5}; - CPPUNIT_ASSERT(std::equal(subConn,subConn+5,subMesh->getNodalConnectivity()->getPointer())); - CPPUNIT_ASSERT(std::equal(subConnIndex,subConnIndex+2,subMesh->getNodalConnectivityIndex()->getPointer())); - CPPUNIT_ASSERT(subMesh->getCoords()==mesh->getCoords()); - subMeshSimple->decrRef(); - // - subMeshSimple=mesh->buildPartOfMySelfNode(tab1,tab1+2,false); - subMesh=dynamic_cast(subMeshSimple); - CPPUNIT_ASSERT(subMesh); - CPPUNIT_ASSERT_EQUAL(2,(int)subMesh->getAllTypes().size()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,*subMesh->getAllTypes().begin()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*(++subMesh->getAllTypes().begin())); - CPPUNIT_ASSERT_EQUAL(3,subMesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(14,subMesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(4,subMesh->getNodalConnectivityIndex()->getNbOfElems()); - const int subConn2[14]={3,4,5,2,4,6,7,4,3,4,7,8,5,4}; - const int subConnIndex2[4]={0,4,9,14}; - CPPUNIT_ASSERT(std::equal(subConn2,subConn2+14,subMesh->getNodalConnectivity()->getPointer())); - CPPUNIT_ASSERT(std::equal(subConnIndex2,subConnIndex2+4,subMesh->getNodalConnectivityIndex()->getPointer())); - CPPUNIT_ASSERT(subMesh->getCoords()==mesh->getCoords()); - subMeshSimple->decrRef(); - //testing the case where length of tab2 is greater than max number of node per cell. - const int tab2[7]={0,3,2,1,4,5,6}; - subMeshSimple=mesh->buildPartOfMySelfNode(tab2,tab2+7,true); - subMesh=dynamic_cast(subMeshSimple); - CPPUNIT_ASSERT(subMesh); - CPPUNIT_ASSERT_EQUAL(2,(int)subMesh->getAllTypes().size()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,*subMesh->getAllTypes().begin()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*(++subMesh->getAllTypes().begin())); - CPPUNIT_ASSERT_EQUAL(3,subMesh->getNumberOfCells()); - subMeshSimple->decrRef(); - // - mesh->decrRef(); -} - -void MEDCouplingBasicsTest::testZipCoords() -{ - MEDCouplingUMesh *mesh=build2DTargetMesh_1(); - CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllTypes().size()); - CPPUNIT_ASSERT_EQUAL(2,mesh->getSpaceDimension()); - CPPUNIT_ASSERT_EQUAL(9,mesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(5,mesh->getNumberOfCells()); - std::vector oldConn(mesh->getNodalConnectivity()->getNbOfElems()); - std::vector oldConnIndex(mesh->getNumberOfCells()+1); - std::copy(mesh->getNodalConnectivity()->getPointer(),mesh->getNodalConnectivity()->getPointer()+oldConn.size(),oldConn.begin()); - std::copy(mesh->getNodalConnectivityIndex()->getPointer(),mesh->getNodalConnectivityIndex()->getPointer()+mesh->getNumberOfCells()+1,oldConnIndex.begin()); - DataArrayDouble *oldCoords=mesh->getCoords(); - oldCoords->incrRef(); - mesh->zipCoords(); - CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllTypes().size()); - CPPUNIT_ASSERT_EQUAL(2,mesh->getSpaceDimension()); - CPPUNIT_ASSERT_EQUAL(9,mesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(5,mesh->getNumberOfCells()); - CPPUNIT_ASSERT(mesh->getCoords()!=oldCoords); - CPPUNIT_ASSERT(std::equal(mesh->getCoords()->getPointer(),mesh->getCoords()->getPointer()+2*9,oldCoords->getPointer())); - CPPUNIT_ASSERT(std::equal(oldConn.begin(),oldConn.end(),mesh->getNodalConnectivity()->getPointer())); - CPPUNIT_ASSERT(std::equal(oldConnIndex.begin(),oldConnIndex.end(),mesh->getNodalConnectivityIndex()->getPointer())); - oldCoords->decrRef(); - // - const int tab1[2]={0,4}; - MEDCouplingPointSet *subMeshPtSet=mesh->buildPartOfMySelf(tab1,tab1+2,true); - MEDCouplingUMesh *subMesh=dynamic_cast(subMeshPtSet); - CPPUNIT_ASSERT(subMesh); - DataArrayInt *traducer=subMesh->zipCoordsTraducer(); - const int expectedTraducer[9]={0,1,-1,2,3,4,-1,5,6}; - CPPUNIT_ASSERT(std::equal(expectedTraducer,expectedTraducer+9,traducer->getPointer())); - traducer->decrRef(); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllTypes().begin()); - CPPUNIT_ASSERT_EQUAL(2,subMesh->getNumberOfCells()); - const int subConn[10]={4,0,2,3,1,4,5,6,4,3}; - const int subConnIndex[3]={0,5,10}; - CPPUNIT_ASSERT_EQUAL(7,subMesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(10,subMesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(3,subMesh->getNodalConnectivityIndex()->getNbOfElems()); - CPPUNIT_ASSERT(std::equal(subConn,subConn+10,subMesh->getNodalConnectivity()->getPointer())); - CPPUNIT_ASSERT(std::equal(subConnIndex,subConnIndex+3,subMesh->getNodalConnectivityIndex()->getPointer())); - subMesh->decrRef(); - // - subMeshPtSet=mesh->buildPartOfMySelf(tab1,tab1+2,false); - subMesh=dynamic_cast(subMeshPtSet); - CPPUNIT_ASSERT(subMesh); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllTypes().begin()); - CPPUNIT_ASSERT_EQUAL(2,subMesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(7,subMesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(10,subMesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(3,subMesh->getNodalConnectivityIndex()->getNbOfElems()); - CPPUNIT_ASSERT(std::equal(subConn,subConn+10,subMesh->getNodalConnectivity()->getPointer())); - CPPUNIT_ASSERT(std::equal(subConnIndex,subConnIndex+3,subMesh->getNodalConnectivityIndex()->getPointer())); - subMesh->decrRef(); - // - mesh->decrRef(); -} - -void MEDCouplingBasicsTest::testEqualMesh() -{ - MEDCouplingUMesh *mesh1=build2DTargetMesh_1(); - MEDCouplingUMesh *mesh2=build2DTargetMesh_1(); - // - CPPUNIT_ASSERT(mesh1->isEqual(mesh1,1e-12)); - // - CPPUNIT_ASSERT(mesh1->isEqual(mesh2,1e-12)); - CPPUNIT_ASSERT(mesh2->isEqual(mesh1,1e-12)); - double *pt=mesh2->getCoords()->getPointer(); - double tmp=pt[1]; - pt[1]=5.999; - CPPUNIT_ASSERT(!mesh1->isEqual(mesh2,1e-12)); - CPPUNIT_ASSERT(!mesh2->isEqual(mesh1,1e-12)); - pt[1]=tmp; - CPPUNIT_ASSERT(mesh1->isEqual(mesh2,1e-12)); - CPPUNIT_ASSERT(mesh2->isEqual(mesh1,1e-12)); - // - int *pt2=mesh1->getNodalConnectivity()->getPointer(); - pt2[5]++; - CPPUNIT_ASSERT(!mesh1->isEqual(mesh2,1e-12)); - CPPUNIT_ASSERT(!mesh2->isEqual(mesh1,1e-12)); - pt2[5]--; - CPPUNIT_ASSERT(mesh1->isEqual(mesh2,1e-12)); - CPPUNIT_ASSERT(mesh2->isEqual(mesh1,1e-12)); - // - pt2=mesh1->getNodalConnectivityIndex()->getPointer(); - pt2[1]++; - CPPUNIT_ASSERT(!mesh1->isEqual(mesh2,1e-12)); - CPPUNIT_ASSERT(!mesh2->isEqual(mesh1,1e-12)); - pt2[1]--; - CPPUNIT_ASSERT(mesh1->isEqual(mesh2,1e-12)); - CPPUNIT_ASSERT(mesh2->isEqual(mesh1,1e-12)); - // - std::string tmp3=mesh1->getName(); - mesh1->setName("lllll"); - CPPUNIT_ASSERT(!mesh1->isEqual(mesh2,1e-12)); - CPPUNIT_ASSERT(!mesh2->isEqual(mesh1,1e-12)); - mesh1->setName(tmp3.c_str()); - CPPUNIT_ASSERT(mesh1->isEqual(mesh2,1e-12)); - CPPUNIT_ASSERT(mesh2->isEqual(mesh1,1e-12)); - // - tmp3=mesh2->getCoords()->getInfoOnComponent(1); - mesh2->getCoords()->setInfoOnComponent(1,"kkkkkk"); - CPPUNIT_ASSERT(!mesh1->isEqual(mesh2,1e-12)); - CPPUNIT_ASSERT(!mesh2->isEqual(mesh1,1e-12)); - mesh2->getCoords()->setInfoOnComponent(1,tmp3.c_str()); - CPPUNIT_ASSERT(mesh1->isEqual(mesh2,1e-12)); - CPPUNIT_ASSERT(mesh2->isEqual(mesh1,1e-12)); - // - mesh1->decrRef(); - mesh2->decrRef(); -} - -void MEDCouplingBasicsTest::testEqualFieldDouble() -{ - MEDCouplingUMesh *mesh1=build2DTargetMesh_1(); - MEDCouplingUMesh *mesh2=build2DTargetMesh_1(); - // - MEDCouplingFieldDouble *fieldOnCells1=MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME); - fieldOnCells1->setMesh(mesh1); - MEDCouplingFieldDouble *fieldOnCells2=MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME); - fieldOnCells2->setMesh(mesh2); - // - CPPUNIT_ASSERT(fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15)); - CPPUNIT_ASSERT(fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15)); - fieldOnCells2->decrRef(); - // - MEDCouplingFieldDouble *fieldOnNodes1=MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME); - CPPUNIT_ASSERT(!fieldOnCells1->isEqual(fieldOnNodes1,1e-12,1e-15)); - CPPUNIT_ASSERT(!fieldOnNodes1->isEqual(fieldOnCells1,1e-12,1e-15)); - fieldOnNodes1->decrRef(); - // - fieldOnCells2=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME); - CPPUNIT_ASSERT(!fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15)); - CPPUNIT_ASSERT(!fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15)); - fieldOnCells1->decrRef(); - fieldOnCells1=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME); - CPPUNIT_ASSERT(fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15)); - CPPUNIT_ASSERT(fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15)); - fieldOnCells1->setTime(4.,6,7); - CPPUNIT_ASSERT(!fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15)); - CPPUNIT_ASSERT(!fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15)); - fieldOnCells2->setTime(4.,6,7); - CPPUNIT_ASSERT(fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15)); - CPPUNIT_ASSERT(fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15)); - fieldOnCells1->setName("Power"); - CPPUNIT_ASSERT(!fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15)); - CPPUNIT_ASSERT(!fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15)); - fieldOnCells2->setName("Power"); - CPPUNIT_ASSERT(fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15)); - CPPUNIT_ASSERT(fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15)); - // - fieldOnCells1->setMesh(mesh1); - CPPUNIT_ASSERT(!fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15)); - CPPUNIT_ASSERT(!fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15)); - fieldOnCells2->setMesh(mesh1); - CPPUNIT_ASSERT(fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15)); - CPPUNIT_ASSERT(fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15)); - DataArrayDouble *arr=DataArrayDouble::New(); - arr->setName("popo"); - arr->alloc(mesh1->getNumberOfCells(),3); - double *pt=arr->getPointer(); - std::fill(pt,pt+mesh1->getNumberOfCells()*3,6.); - fieldOnCells1->setArray(arr); - CPPUNIT_ASSERT(!fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15)); - CPPUNIT_ASSERT(!fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15)); - fieldOnCells2->setArray(arr); - arr->decrRef(); - CPPUNIT_ASSERT(fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15)); - CPPUNIT_ASSERT(fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15)); - // - DataArrayDouble *arr2=arr->deepCopy(); - fieldOnCells2->setArray(arr2); - arr2->decrRef(); - CPPUNIT_ASSERT(fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15)); - CPPUNIT_ASSERT(fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15)); - pt[4]=6.1; - CPPUNIT_ASSERT(!fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15)); - CPPUNIT_ASSERT(!fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15)); - pt[4]=6.; - CPPUNIT_ASSERT(fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15)); - CPPUNIT_ASSERT(fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15)); - arr2->setName("popo2"); - CPPUNIT_ASSERT(!fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15)); - CPPUNIT_ASSERT(!fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15)); - // - arr2->setName("popo"); - CPPUNIT_ASSERT(fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15)); - CPPUNIT_ASSERT(fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15)); - // - arr2->setInfoOnComponent(2,"jjj"); - CPPUNIT_ASSERT(!fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15)); - CPPUNIT_ASSERT(!fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15)); - arr->setInfoOnComponent(2,"jjj"); - CPPUNIT_ASSERT(fieldOnCells1->isEqual(fieldOnCells2,1e-12,1e-15)); - CPPUNIT_ASSERT(fieldOnCells2->isEqual(fieldOnCells1,1e-12,1e-15)); - // - fieldOnCells1->decrRef(); - fieldOnCells2->decrRef(); - // - mesh1->decrRef(); - mesh2->decrRef(); -} - -void MEDCouplingBasicsTest::testNatureChecking() -{ - MEDCouplingFieldDouble *field=MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME); - field->setNature(Integral); - field->setNature(ConservativeVolumic); - field->setNature(IntegralGlobConstraint); - field->decrRef(); - field=MEDCouplingFieldDouble::New(ON_NODES,NO_TIME); - field->setNature(ConservativeVolumic); - CPPUNIT_ASSERT_THROW(field->setNature(Integral),INTERP_KERNEL::Exception); - CPPUNIT_ASSERT_THROW(field->setNature(IntegralGlobConstraint),INTERP_KERNEL::Exception); - field->decrRef(); -} - -void MEDCouplingBasicsTest::testBuildSubMeshData() -{ - MEDCouplingUMesh *targetMesh=build2DTargetMesh_1(); - //check buildSubMesh on field on cells - MEDCouplingFieldDouble *fieldCells=MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME); - fieldCells->setMesh(targetMesh); - const int elts[3]={1,2,4}; - DataArrayInt *di; - MEDCouplingMesh *ret1=fieldCells->buildSubMeshData(elts,elts+3,di); - CPPUNIT_ASSERT_EQUAL(3,ret1->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(6,ret1->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(3,di->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,di->getNumberOfComponents()); - const int *toCheck=di->getConstPointer(); - CPPUNIT_ASSERT(std::equal(elts,elts+3,toCheck)); - MEDCouplingUMesh *ret1DC=dynamic_cast(ret1); - CPPUNIT_ASSERT(ret1DC); - ret1->decrRef(); - di->decrRef(); - fieldCells->decrRef(); - //check buildSubMesh on field on nodes - MEDCouplingFieldDouble *fieldNodes=MEDCouplingFieldDouble::New(ON_NODES,NO_TIME); - fieldNodes->setMesh(targetMesh); - MEDCouplingMesh *ret2=fieldNodes->buildSubMeshData(elts,elts+3,di); - MEDCouplingUMesh *ret2DC=dynamic_cast(ret2); - CPPUNIT_ASSERT(ret2DC); - CPPUNIT_ASSERT_EQUAL(3,ret2->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(6,ret2->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(6,di->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,di->getNumberOfComponents()); - toCheck=di->getConstPointer(); - const int expected[6]={1,2,4,5,7,8}; - CPPUNIT_ASSERT(std::equal(expected,expected+6,toCheck)); - ret2->decrRef(); - di->decrRef(); - fieldNodes->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::testExtrudedMesh1() -{ - MEDCouplingUMesh *mesh2D=0; - MEDCouplingUMesh *mesh3D=build3DExtrudedUMesh_1(mesh2D); - MEDCouplingExtrudedMesh *ext=MEDCouplingExtrudedMesh::New(mesh3D,mesh2D,1); - CPPUNIT_ASSERT_EQUAL(18,ext->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(60,ext->getNumberOfNodes()); - DataArrayInt *ids3D=ext->getMesh3DIds(); - const int ids3DExpected[18]={5,4,3,2,1,0, 11,10,9,8,7,6, 17,16,15,14,13,12}; - CPPUNIT_ASSERT_EQUAL(18,ids3D->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,ids3D->getNumberOfComponents()); - CPPUNIT_ASSERT(std::equal(ids3DExpected,ids3DExpected+18,ids3D->getConstPointer())); - MEDCouplingUMesh *mesh1D=ext->getMesh1D(); - CPPUNIT_ASSERT_EQUAL(4,mesh1D->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(3,mesh1D->getNumberOfCells()); - const double mesh1DExpected[12]={0.66666666666666663, 1.4583333333333333, 0, 0.66666666666666663, 1.4583333333333333, 1, 0.66666666666666663, 1.4583333333333333, 2, 0.66666666666666663, 1.4583333333333333, 3}; - DataArrayDouble *mesh1DCoords=mesh1D->getCoords(); - CPPUNIT_ASSERT_EQUAL(4,mesh1DCoords->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,mesh1DCoords->getNumberOfComponents()); - CPPUNIT_ASSERT(std::equal(mesh1DExpected,mesh1DExpected+12,mesh1DCoords->getConstPointer())); - DataArrayInt *conn1D=mesh1D->getNodalConnectivity(); - CPPUNIT_ASSERT_EQUAL(9,conn1D->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,conn1D->getNumberOfComponents()); - const int conn1DExpected[9]={1,0,1,1,1,2,1,2,3}; - CPPUNIT_ASSERT(std::equal(conn1DExpected,conn1DExpected+9,conn1D->getConstPointer())); - ext->decrRef(); - mesh3D->decrRef(); - mesh2D->decrRef(); -} - -void MEDCouplingBasicsTest::testExtrudedMesh2() -{ - MEDCouplingUMesh *mN,*mTT,*mTF; - build3DExtrudedUMesh_2(mN,mTT,mTF); - // - bool b=false; - DataArrayInt *da=mTT->mergeNodes(1e-12,b); - CPPUNIT_ASSERT(b); - da->decrRef(); - std::vector n; - double pt[3]={300.,300.,0.}; - double v[3]={0.,0.,2.}; - mTT->findNodesOnPlane(pt,v,1e-12,n); - CPPUNIT_ASSERT_EQUAL(43,(int)n.size()); - MEDCouplingUMesh *mTT3dSurf=(MEDCouplingUMesh *)mTT->buildFacePartOfMySelfNode(&n[0],&n[0]+n.size(),true); - MEDCouplingExtrudedMesh *meTT=MEDCouplingExtrudedMesh::New(mTT,mTT3dSurf,0); - CPPUNIT_ASSERT_EQUAL(200,meTT->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(10,meTT->getMesh2D()->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(20,meTT->getMesh1D()->getNumberOfCells()); - mTT3dSurf->decrRef(); - // - b=false; - da=mN->mergeNodes(1e-12,b); - da->decrRef(); - CPPUNIT_ASSERT(!b); - n.clear(); - mN->findNodesOnPlane(pt,v,1e-12,n); - CPPUNIT_ASSERT_EQUAL(30,(int)n.size()); - MEDCouplingUMesh *mN3dSurf=(MEDCouplingUMesh *)mN->buildFacePartOfMySelfNode(&n[0],&n[0]+n.size(),true); - MEDCouplingExtrudedMesh *meN=MEDCouplingExtrudedMesh::New(mN,mN3dSurf,0); - CPPUNIT_ASSERT_EQUAL(40,meN->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(20,meN->getMesh2D()->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(2,meN->getMesh1D()->getNumberOfCells()); - mN3dSurf->decrRef(); - // - b=false; - da=mTF->mergeNodes(1e-12,b); - da->decrRef(); - CPPUNIT_ASSERT(!b); - n.clear(); - mTF->findNodesOnPlane(pt,v,1e-12,n); - CPPUNIT_ASSERT_EQUAL(27,(int)n.size()); - MEDCouplingUMesh *mTF3dSurf=(MEDCouplingUMesh *)mTF->buildFacePartOfMySelfNode(&n[0],&n[0]+n.size(),true); - MEDCouplingExtrudedMesh *meTF=MEDCouplingExtrudedMesh::New(mTF,mTF3dSurf,0); - CPPUNIT_ASSERT_EQUAL(340,meTF->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(17,meTF->getMesh2D()->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(20,meTF->getMesh1D()->getNumberOfCells()); - mTF3dSurf->decrRef(); - // - meTT->decrRef(); - meN->decrRef(); - meTF->decrRef(); - // - mN->decrRef(); - mTT->decrRef(); - mTF->decrRef(); -} - -void MEDCouplingBasicsTest::testFindCommonNodes() -{ - DataArrayInt *comm,*commI; - MEDCouplingUMesh *targetMesh=build3DTargetMesh_1(); - targetMesh->findCommonNodes(comm,commI,1e-10); - CPPUNIT_ASSERT_EQUAL(1,commI->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(0,comm->getNumberOfTuples()); - int newNbOfNodes; - DataArrayInt *o2n=targetMesh->buildNewNumberingFromCommNodesFrmt(comm,commI,newNbOfNodes); - CPPUNIT_ASSERT_EQUAL(27,newNbOfNodes); - CPPUNIT_ASSERT_EQUAL(27,o2n->getNumberOfTuples()); - const int o2nExp1[27]= - { - 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, - 21,22,23,24,25,26 - }; - CPPUNIT_ASSERT(std::equal(o2nExp1,o2nExp1+27,o2n->getConstPointer())); - o2n->decrRef(); - comm->decrRef(); - commI->decrRef(); - targetMesh->decrRef(); - // - targetMesh=build3DTargetMeshMergeNode_1(); - CPPUNIT_ASSERT_EQUAL(31,targetMesh->getNumberOfNodes()); - targetMesh->findCommonNodes(comm,commI,1e-10); - CPPUNIT_ASSERT_EQUAL(3,commI->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(6,comm->getNumberOfTuples()); - const int commExpected[6]={1,27,28,29,23,30}; - const int commIExpected[3]={0,4,6}; - CPPUNIT_ASSERT(std::equal(commExpected,commExpected+6,comm->getConstPointer())); - CPPUNIT_ASSERT(std::equal(commIExpected,commIExpected+3,commI->getConstPointer())); - o2n=targetMesh->buildNewNumberingFromCommNodesFrmt(comm,commI,newNbOfNodes); - CPPUNIT_ASSERT_EQUAL(31,o2n->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(27,newNbOfNodes); - const int o2nExp2[31]= - { - 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, - 21,22,23,24,25,26,1,1,1,23 - }; - CPPUNIT_ASSERT(std::equal(o2nExp2,o2nExp2+31,o2n->getConstPointer())); - o2n->decrRef(); - comm->decrRef(); - commI->decrRef(); - targetMesh->decrRef(); - // - targetMesh=build3DTargetMesh_1(); - bool areNodesMerged; - unsigned int time=targetMesh->getTimeOfThis(); - o2n=targetMesh->mergeNodes(1e-10,areNodesMerged); - targetMesh->updateTime(); - CPPUNIT_ASSERT(time==targetMesh->getTimeOfThis()); - CPPUNIT_ASSERT(!areNodesMerged); - targetMesh->decrRef(); - o2n->decrRef(); - // - targetMesh=build3DTargetMeshMergeNode_1(); - time=targetMesh->getTimeOfThis(); - o2n=targetMesh->mergeNodes(1e-10,areNodesMerged); - targetMesh->updateTime(); - CPPUNIT_ASSERT(time!=targetMesh->getTimeOfThis()); - CPPUNIT_ASSERT(areNodesMerged); - int connExp[72]={18,0,1,4,3,9,10,13,12, 18,1,2,5,4,10,11,14,13, 18,3,4,7,6,12,13,16,15, - 18,4,5,8,7,13,14,17,16, - 18,9,10,13,12,18,19,22,21, 18,10,11,14,13,19,20,23,22, 18,12,13,16,15,21,22,25,24, - 18,13,14,17,16,22,23,26,25}; - CPPUNIT_ASSERT_EQUAL(72,targetMesh->getNodalConnectivity()->getNumberOfTuples()); - CPPUNIT_ASSERT(std::equal(connExp,connExp+72,targetMesh->getNodalConnectivity()->getConstPointer())); - CPPUNIT_ASSERT_EQUAL(27,targetMesh->getCoords()->getNumberOfTuples()); - double coordsExp[81]={ 0., 0., 0., 50., 0., 0. , 200., 0., 0. , 0., 50., 0., 50., 50., 0. , - 200., 50., 0., 0., 200., 0., 50., 200., 0. , 200., 200., 0. , - 0., 0., 50., 50., 0., 50. , 200., 0., 50. , 0., 50., 50., 50., - 50., 50. , 200., 50., 50., 0., 200., 50., 50., 200., 50. , - 200., 200., 50. , 0., 0., 200., 50., 0., 200. , 200., 0., 200. - , 0., 50., 200., 50., 50., 200. , 200., 50., 200., - 0., 200., 200., 50., 200., 200. , 200., 200., 200. }; - CPPUNIT_ASSERT(std::equal(coordsExp,coordsExp+81,targetMesh->getCoords()->getConstPointer())); - targetMesh->decrRef(); - o2n->decrRef(); - //2D - targetMesh=build2DTargetMeshMergeNode_1(); - CPPUNIT_ASSERT_EQUAL(18,targetMesh->getNumberOfNodes()); - time=targetMesh->getTimeOfThis(); - o2n=targetMesh->mergeNodes(1e-10,areNodesMerged); - CPPUNIT_ASSERT(time!=targetMesh->getTimeOfThis()); - CPPUNIT_ASSERT(areNodesMerged); - CPPUNIT_ASSERT_EQUAL(9,targetMesh->getNumberOfNodes()); - int connExp2[23]={4,0,4,3,1, 3,1,3,2, 3,3,5,2, 4,4,6,7,3, 4,7,8,5,3}; - CPPUNIT_ASSERT_EQUAL(23,targetMesh->getNodalConnectivity()->getNumberOfTuples()); - CPPUNIT_ASSERT(std::equal(connExp2,connExp2+23,targetMesh->getNodalConnectivity()->getConstPointer())); - double coordsExp2[18]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, 0.2,0.2, -0.3,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7}; - CPPUNIT_ASSERT_EQUAL(9,targetMesh->getCoords()->getNumberOfTuples()); - CPPUNIT_ASSERT(std::equal(coordsExp2,coordsExp2+18,targetMesh->getCoords()->getConstPointer())); - targetMesh->decrRef(); - o2n->decrRef(); -} - -void MEDCouplingBasicsTest::testCheckButterflyCells() -{ - std::vector cells; - MEDCouplingUMesh *sourceMesh=build2DTargetMesh_1(); - sourceMesh->checkButterflyCells(cells); - CPPUNIT_ASSERT(cells.empty()); - int *pt=sourceMesh->getNodalConnectivity()->getPointer(); - std::swap(pt[15],pt[16]); - sourceMesh->checkButterflyCells(cells); - CPPUNIT_ASSERT_EQUAL(1,(int)cells.size()); - CPPUNIT_ASSERT_EQUAL(3,cells[0]); - cells.clear(); - std::swap(pt[15],pt[16]); - sourceMesh->checkButterflyCells(cells); - CPPUNIT_ASSERT(cells.empty()); - sourceMesh->decrRef(); - // 3D surf - sourceMesh=build3DSurfTargetMesh_1(); - sourceMesh->checkButterflyCells(cells); - CPPUNIT_ASSERT(cells.empty()); - pt=sourceMesh->getNodalConnectivity()->getPointer(); - std::swap(pt[15],pt[16]); - sourceMesh->checkButterflyCells(cells); - CPPUNIT_ASSERT_EQUAL(1,(int)cells.size()); - CPPUNIT_ASSERT_EQUAL(3,cells[0]); - cells.clear(); - std::swap(pt[15],pt[16]); - sourceMesh->checkButterflyCells(cells); - CPPUNIT_ASSERT(cells.empty()); - sourceMesh->decrRef(); -} - -void MEDCouplingBasicsTest::testMergeMesh1() -{ - MEDCouplingUMesh *m1=build2DTargetMesh_1(); - MEDCouplingUMesh *m2=build2DSourceMesh_1(); - const double vec[2]={1.,0.}; - m2->translate(vec); - MEDCouplingMesh *m3=m1->mergeMyselfWith(m2); - MEDCouplingUMesh *m3C=dynamic_cast(m3); - CPPUNIT_ASSERT(m3C); - m3->checkCoherency(); - MEDCouplingUMesh *m4=build2DTargetMeshMerged_1(); - CPPUNIT_ASSERT(m3->isEqual(m4,1.e-12)); - m4->decrRef(); - bool isMerged; - DataArrayInt *da=m3C->mergeNodes(1.e-12,isMerged); - CPPUNIT_ASSERT_EQUAL(11,m3C->getNumberOfNodes()); - CPPUNIT_ASSERT(isMerged); - da->decrRef(); - m3->decrRef(); - m1->decrRef(); - m2->decrRef(); -} - -void MEDCouplingBasicsTest::testMergeField1() -{ - MEDCouplingUMesh *m1=build2DTargetMesh_1(); - MEDCouplingUMesh *m2=build2DSourceMesh_1(); - const double vec[2]={1.,0.}; - m2->translate(vec); - MEDCouplingFieldDouble *f1=m1->getMeasureField(true); - MEDCouplingFieldDouble *f2=m2->getMeasureField(true); - MEDCouplingFieldDouble *f3=MEDCouplingFieldDouble::mergeFields(f1,f2); - f3->checkCoherency(); - MEDCouplingUMesh *m4=build2DTargetMeshMerged_1(); - CPPUNIT_ASSERT(f3->getMesh()->isEqual(m4,1.e-12)); - std::string name=f3->getName(); - CPPUNIT_ASSERT(name=="MeasureOfMesh_"); - CPPUNIT_ASSERT(f3->getTypeOfField()==ON_CELLS); - CPPUNIT_ASSERT(f3->getTimeDiscretization()==NO_TIME); - CPPUNIT_ASSERT_EQUAL(1,f3->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(7,f3->getNumberOfTuples()); - double values[7]={0.25,0.125,0.125,0.25,0.25,0.5,0.5}; - const double *tmp=f3->getArray()->getConstPointer(); - std::transform(tmp,tmp+7,values,values,std::minus()); - std::transform(values,values+7,values,std::ptr_fun(fabs)); - double max=*std::max_element(values,values+7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); - m4->decrRef(); - f3->decrRef(); - f1->decrRef(); - f2->decrRef(); - m1->decrRef(); - m2->decrRef(); -} - -bool func1(const double *pt, double *res); -bool func2(const double *pt, double *res); -bool func3(const double *pt, double *res); -bool func4(const double *pt, double *res); - -bool func1(const double *pt, double *res) -{ - res[0]=pt[0]+pt[1]; - return true; -} - -bool func2(const double *pt, double *res) -{ - res[0]=pt[0]+pt[1]; - res[1]=2.*(pt[0]+pt[1]); - return true; -} - -bool func3(const double *pt, double *res) -{ - if(fabs(pt[0]-0.2)<1e-12) - return false; - res[0]=1./(pt[0]-0.2); - return true; -} - -void MEDCouplingBasicsTest::testFillFromAnalytic() -{ - MEDCouplingUMesh *m=build2DTargetMesh_1(); - MEDCouplingFieldDouble *f1=m->fillFromAnalytic(ON_CELLS,1,func1); - f1->checkCoherency(); - CPPUNIT_ASSERT(f1->getTypeOfField()==ON_CELLS); - CPPUNIT_ASSERT(f1->getTimeDiscretization()==NO_TIME); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples()); - double values1[5]={-0.1,0.23333333333333336,0.56666666666666665,0.4,0.9}; - const double *tmp=f1->getArray()->getConstPointer(); - std::transform(tmp,tmp+5,values1,values1,std::minus()); - std::transform(values1,values1+5,values1,std::ptr_fun(fabs)); - double max=*std::max_element(values1,values1+5); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); - f1->decrRef(); - // - f1=m->fillFromAnalytic(ON_NODES,1,func1); - f1->checkCoherency(); - CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f1->getTimeDiscretization()==NO_TIME); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); - double values2[9]={-0.6,-0.1,0.4,-0.1,0.4,0.9,0.4,0.9,1.4}; - tmp=f1->getArray()->getConstPointer(); - std::transform(tmp,tmp+9,values2,values2,std::minus()); - std::transform(values2,values2+9,values2,std::ptr_fun(fabs)); - max=*std::max_element(values2,values2+9); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); - f1->decrRef(); - // - f1=m->fillFromAnalytic(ON_NODES,2,func2); - f1->checkCoherency(); - CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f1->getTimeDiscretization()==NO_TIME); - CPPUNIT_ASSERT_EQUAL(2,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); - double values3[18]={-0.6,-1.2,-0.1,-0.2,0.4,0.8,-0.1,-0.2,0.4,0.8,0.9,1.8,0.4,0.8,0.9,1.8,1.4,2.8}; - tmp=f1->getArray()->getConstPointer(); - std::transform(tmp,tmp+18,values3,values3,std::minus()); - std::transform(values3,values3+18,values3,std::ptr_fun(fabs)); - max=*std::max_element(values3,values3+18); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); - double values4[2]; - f1->accumulate(values4); - CPPUNIT_ASSERT_DOUBLES_EQUAL(3.6,values4[0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(7.2,values4[1],1.e-12); - f1->measureAccumulate(true,values4); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,values4[0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,values4[1],1.e-12); - f1->decrRef(); - // - CPPUNIT_ASSERT_THROW(f1=m->fillFromAnalytic(ON_NODES,1,func3),INTERP_KERNEL::Exception); - // - m->decrRef(); -} - -void MEDCouplingBasicsTest::testFillFromAnalytic2() -{ - MEDCouplingUMesh *m=build2DTargetMesh_1(); - MEDCouplingFieldDouble *f1=m->fillFromAnalytic(ON_CELLS,1,"y+x"); - f1->checkCoherency(); - CPPUNIT_ASSERT(f1->getTypeOfField()==ON_CELLS); - CPPUNIT_ASSERT(f1->getTimeDiscretization()==NO_TIME); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples()); - double values1[5]={-0.1,0.23333333333333336,0.56666666666666665,0.4,0.9}; - const double *tmp=f1->getArray()->getConstPointer(); - std::transform(tmp,tmp+5,values1,values1,std::minus()); - std::transform(values1,values1+5,values1,std::ptr_fun(fabs)); - double max=*std::max_element(values1,values1+5); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); - f1->decrRef(); - // - f1=m->fillFromAnalytic(ON_NODES,1,"y+2*x"); - f1->checkCoherency(); - CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f1->getTimeDiscretization()==NO_TIME); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); - double values2[9]={-0.9,0.1,1.1,-0.4,0.6,1.6,0.1,1.1,2.1}; - tmp=f1->getArray()->getConstPointer(); - std::transform(tmp,tmp+9,values2,values2,std::minus()); - std::transform(values2,values2+9,values2,std::ptr_fun(fabs)); - max=*std::max_element(values2,values2+9); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); - f1->decrRef(); - f1=m->fillFromAnalytic(ON_NODES,1,"2.*x+y"); - f1->checkCoherency(); - CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f1->getTimeDiscretization()==NO_TIME); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); - tmp=f1->getArray()->getConstPointer(); - double values2Bis[9]={-0.9,0.1,1.1,-0.4,0.6,1.6,0.1,1.1,2.1}; - std::transform(tmp,tmp+9,values2Bis,values2Bis,std::minus()); - std::transform(values2,values2+9,values2Bis,std::ptr_fun(fabs)); - max=*std::max_element(values2Bis,values2Bis+9); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); - f1->decrRef(); - // - f1=m->fillFromAnalytic(ON_NODES,2,"(x+y)*IVec+2*(x+y)*JVec"); - f1->checkCoherency(); - CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f1->getTimeDiscretization()==NO_TIME); - CPPUNIT_ASSERT_EQUAL(2,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); - double values3[18]={-0.6,-1.2,-0.1,-0.2,0.4,0.8,-0.1,-0.2,0.4,0.8,0.9,1.8,0.4,0.8,0.9,1.8,1.4,2.8}; - tmp=f1->getArray()->getConstPointer(); - std::transform(tmp,tmp+18,values3,values3,std::minus()); - std::transform(values3,values3+18,values3,std::ptr_fun(fabs)); - max=*std::max_element(values3,values3+18); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); - double values4[2]; - f1->accumulate(values4); - CPPUNIT_ASSERT_DOUBLES_EQUAL(3.6,values4[0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(7.2,values4[1],1.e-12); - f1->measureAccumulate(true,values4); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,values4[0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,values4[1],1.e-12); - f1->decrRef(); - // - CPPUNIT_ASSERT_THROW(f1=m->fillFromAnalytic(ON_NODES,1,"1./(x-0.2)"),INTERP_KERNEL::Exception); - // - m->decrRef(); -} - -void MEDCouplingBasicsTest::testApplyFunc() -{ - MEDCouplingUMesh *m=build2DTargetMesh_1(); - MEDCouplingFieldDouble *f1=m->fillFromAnalytic(ON_NODES,2,func2); - f1->checkCoherency(); - CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f1->getTimeDiscretization()==NO_TIME); - CPPUNIT_ASSERT_EQUAL(2,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); - f1->applyFunc(1,func1); - CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f1->getTimeDiscretization()==NO_TIME); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); - double values1[9]={-1.8,-0.3,1.2,-0.3,1.2,2.7,1.2,2.7,4.2}; - const double *tmp=f1->getArray()->getConstPointer(); - std::transform(tmp,tmp+9,values1,values1,std::minus()); - std::transform(values1,values1+9,values1,std::ptr_fun(fabs)); - double max=*std::max_element(values1,values1+9); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); - f1->decrRef(); - m->decrRef(); -} - -void MEDCouplingBasicsTest::testApplyFunc2() -{ - MEDCouplingUMesh *m=build2DTargetMesh_1(); - MEDCouplingFieldDouble *f1=m->fillFromAnalytic(ON_NODES,2,func2); - f1->checkCoherency(); - CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f1->getTimeDiscretization()==NO_TIME); - CPPUNIT_ASSERT_EQUAL(2,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); - // - MEDCouplingFieldDouble *f2=f1->clone(true); - f2->applyFunc("abs(u)^2.4+2*u"); - CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f1->getTimeDiscretization()==NO_TIME); - CPPUNIT_ASSERT_EQUAL(2,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); - double values2[18]={-0.9065304805418678, -0.85105859001709905, -0.19601892829446504, -0.37898777756476987, - 0.91090317490482353, 2.1853504664669781, -0.19601892829446504, -0.37898777756476987, - 0.91090317490482353, 2.1853504664669781, 2.5765725275664879, 7.6987743736515295, - 0.91090317490482353, 2.1853504664669781, 2.5765725275664879, 7.6987743736515295, - 5.0423700574830965, 17.435300118916864}; - const double *tmp=f2->getArray()->getConstPointer(); - std::transform(tmp,tmp+18,values2,values2,std::minus()); - std::transform(values2,values2+18,values2,std::ptr_fun(fabs)); - double max=*std::max_element(values2,values2+18); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); - f2->decrRef(); - // - f1->applyFunc(1,"x+y"); - CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f1->getTimeDiscretization()==NO_TIME); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); - double values1[9]={-1.8,-0.3,1.2,-0.3,1.2,2.7,1.2,2.7,4.2}; - tmp=f1->getArray()->getConstPointer(); - std::transform(tmp,tmp+9,values1,values1,std::minus()); - std::transform(values1,values1+9,values1,std::ptr_fun(fabs)); - max=*std::max_element(values1,values1+9); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); - f1->decrRef(); - m->decrRef(); -} - -void MEDCouplingBasicsTest::testOperationsOnFields() -{ - MEDCouplingUMesh *m=build2DTargetMesh_1(); - MEDCouplingFieldDouble *f1=m->fillFromAnalytic(ON_NODES,1,func1); - MEDCouplingFieldDouble *f2=m->fillFromAnalytic(ON_NODES,1,func1); - f1->checkCoherency(); - f2->checkCoherency(); - MEDCouplingFieldDouble *f3=(*f1)+(*f2); - f3->checkCoherency(); - CPPUNIT_ASSERT(f3->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f3->getTimeDiscretization()==NO_TIME); - double values1[9]={-1.2,-0.2,0.8,-0.2,0.8,1.8,0.8,1.8,2.8}; - const double *tmp=f3->getArray()->getConstPointer(); - std::transform(tmp,tmp+9,values1,values1,std::minus()); - std::transform(values1,values1+9,values1,std::ptr_fun(fabs)); - double max=*std::max_element(values1,values1+9); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); - f3->decrRef(); - // - f3=(*f1)*(*f2); - f3->checkCoherency(); - CPPUNIT_ASSERT(f3->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f3->getTimeDiscretization()==NO_TIME); - double values2[9]={0.36,0.01,0.16,0.01,0.16,0.81,0.16,0.81,1.96}; - tmp=f3->getArray()->getConstPointer(); - std::transform(tmp,tmp+9,values2,values2,std::minus()); - std::transform(values2,values2+9,values2,std::ptr_fun(fabs)); - max=*std::max_element(values2,values2+9); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); - f3->decrRef(); - // - f3=(*f1)+(*f2); - MEDCouplingFieldDouble *f4=(*f1)-(*f3); - f4->checkCoherency(); - CPPUNIT_ASSERT(f4->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f4->getTimeDiscretization()==NO_TIME); - double values3[9]={0.6,0.1,-0.4,0.1,-0.4,-0.9,-0.4,-0.9,-1.4}; - tmp=f4->getArray()->getConstPointer(); - std::transform(tmp,tmp+9,values3,values3,std::minus()); - std::transform(values3,values3+9,values3,std::ptr_fun(fabs)); - max=*std::max_element(values3,values3+9); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); - f3->decrRef(); - f4->decrRef(); - // - f3=(*f1)+(*f2); - f4=(*f3)/(*f2); - f4->checkCoherency(); - CPPUNIT_ASSERT(f4->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f4->getTimeDiscretization()==NO_TIME); - tmp=f4->getArray()->getConstPointer(); - for(int i=0;i<9;i++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(2.,tmp[i],1.e-12); - f3->decrRef(); - f4->decrRef(); - // - f4=f2->buildNewTimeReprFromThis(ONE_TIME,false); - f4->checkCoherency(); - CPPUNIT_ASSERT(f4->getArray()==f2->getArray()); - CPPUNIT_ASSERT(f4->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f4->getTimeDiscretization()==ONE_TIME); - CPPUNIT_ASSERT_THROW(f3=(*f1)+(*f4),INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *f5=f4->buildNewTimeReprFromThis(NO_TIME,false); - CPPUNIT_ASSERT(f4->getArray()==f5->getArray()); - CPPUNIT_ASSERT(f5->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f5->getTimeDiscretization()==NO_TIME); - f3=(*f1)+(*f5); - tmp=f3->getArray()->getConstPointer(); - double values4[9]={-1.2,-0.2,0.8,-0.2,0.8,1.8,0.8,1.8,2.8}; - std::transform(tmp,tmp+9,values4,values4,std::minus()); - std::transform(values4,values4+9,values4,std::ptr_fun(fabs)); - max=*std::max_element(values4,values4+9); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); - f5->decrRef(); - f4->decrRef(); - f3->decrRef(); - // - f4=f2->buildNewTimeReprFromThis(ONE_TIME,true); - f4->checkCoherency(); - CPPUNIT_ASSERT(f4->getArray()!=f2->getArray()); - CPPUNIT_ASSERT(f4->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f4->getTimeDiscretization()==ONE_TIME); - CPPUNIT_ASSERT_THROW(f3=(*f1)+(*f4),INTERP_KERNEL::Exception); - f5=f4->buildNewTimeReprFromThis(NO_TIME,true); - CPPUNIT_ASSERT(f4->getArray()!=f5->getArray()); - CPPUNIT_ASSERT(f2->getArray()!=f5->getArray()); - CPPUNIT_ASSERT(f5->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f5->getTimeDiscretization()==NO_TIME); - f3=(*f1)+(*f5); - tmp=f3->getArray()->getConstPointer(); - double values5[9]={-1.2,-0.2,0.8,-0.2,0.8,1.8,0.8,1.8,2.8}; - std::transform(tmp,tmp+9,values5,values5,std::minus()); - std::transform(values5,values5+9,values5,std::ptr_fun(fabs)); - max=*std::max_element(values5,values5+9); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,max,1.e-12); - f5->decrRef(); - f4->decrRef(); - f3->decrRef(); - // - f1->decrRef(); - f2->decrRef(); - m->decrRef(); -} - -void MEDCouplingBasicsTest::testOperationsOnFields2() -{ - MEDCouplingUMesh *m=build3DSurfTargetMesh_1(); - MEDCouplingFieldDouble *f1=m->fillFromAnalytic(ON_NODES,1,"x+y+z"); - MEDCouplingFieldDouble *f2=m->fillFromAnalytic(ON_NODES,1,"a*a+b+c*c"); - MEDCouplingFieldDouble *f3=(*f1)/(*f2); - f3->checkCoherency(); - CPPUNIT_ASSERT(f3->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f3->getTimeDiscretization()==NO_TIME); - const double expected1[9]={-2.4999999999999991, 1.2162162162162162, 0.77868852459016391, - 0.7407407407407407, 1.129032258064516, 0.81632653061224492, - 0.86538461538461531, 1.0919540229885056, 0.84302325581395343}; - CPPUNIT_ASSERT_EQUAL(1,f3->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f3->getNumberOfTuples()); - const double *val=f3->getArray()->getConstPointer(); - for(int i=0;i<9;i++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],val[i],1.e-12); - f3->decrRef(); - f1->decrRef(); - f2->decrRef(); - // - f1=m->buildOrthogonalField(); - f2=m->fillFromAnalytic(ON_CELLS,1,"x"); - f3=(*f1)*(*f2); - const double expected2[15]={-0.035355339059327376,0.,0.035355339059327376, 0.2592724864350674,0.,-0.2592724864350674, 0.37712361663282529,0.,-0.37712361663282529, -0.035355339059327376,0.,0.035355339059327376, 0.31819805153394637,0.,-0.31819805153394637}; - val=f3->getArray()->getConstPointer(); - for(int i=0;i<15;i++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],val[i],1.e-12); - f3->decrRef(); - // - f3=(*f2)*(*f1); - val=f3->getArray()->getConstPointer(); - for(int i=0;i<15;i++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],val[i],1.e-12); - f3->decrRef(); - // - f1->decrRef(); - f2->decrRef(); - // - m->decrRef(); -} - -void MEDCouplingBasicsTest::testOperationsOnFields3() -{ - MEDCouplingUMesh *m=build3DSurfTargetMesh_1(); - MEDCouplingFieldDouble *f1=m->fillFromAnalytic(ON_NODES,1,"x+y+z"); - MEDCouplingFieldDouble *f2=m->fillFromAnalytic(ON_NODES,1,"a*a+b+c*c"); - (*f1)/=(*f2); - f1->checkCoherency(); - CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); - CPPUNIT_ASSERT(f1->getTimeDiscretization()==NO_TIME); - const double expected1[9]={-2.4999999999999991, 1.2162162162162162, 0.77868852459016391, - 0.7407407407407407, 1.129032258064516, 0.81632653061224492, - 0.86538461538461531, 1.0919540229885056, 0.84302325581395343}; - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); - const double *val=f1->getArray()->getConstPointer(); - for(int i=0;i<9;i++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],val[i],1.e-12); - f1->decrRef(); - f2->decrRef(); - // - f1=m->buildOrthogonalField(); - f2=m->fillFromAnalytic(ON_CELLS,1,"x"); - (*f1)*=(*f2); - const double expected2[15]={-0.035355339059327376,0.,0.035355339059327376, 0.2592724864350674,0.,-0.2592724864350674, 0.37712361663282529,0.,-0.37712361663282529, -0.035355339059327376,0.,0.035355339059327376, 0.31819805153394637,0.,-0.31819805153394637}; - val=f1->getArray()->getConstPointer(); - for(int i=0;i<15;i++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],val[i],1.e-12); - f1->decrRef(); - // - f1=m->buildOrthogonalField(); - CPPUNIT_ASSERT_THROW((*f2)*=(*f1),INTERP_KERNEL::Exception); - f1->decrRef(); - f2->decrRef(); - // - m->decrRef(); -} - -bool func4(const double *pt, double *res) -{ - res[0]=pt[0]+pt[1]+pt[2]; - return true; -} - -void MEDCouplingBasicsTest::testMergeNodesOnField() -{ - double *tmp; - MEDCouplingUMesh *targetMesh=build3DTargetMeshMergeNode_1(); - MEDCouplingFieldDouble *f1=targetMesh->fillFromAnalytic(ON_NODES,1,func4); - f1->mergeNodes(1e-10); - f1->decrRef(); - targetMesh->decrRef(); - // - targetMesh=build3DTargetMeshMergeNode_1(); - f1=targetMesh->fillFromAnalytic(ON_NODES,1,func4); - tmp=f1->getArray()->getPointer(); - tmp[0]=1000.; - f1->mergeNodes(1e-10); - f1->decrRef(); - targetMesh->decrRef(); - // - targetMesh=build3DTargetMeshMergeNode_1(); - f1=targetMesh->fillFromAnalytic(ON_NODES,1,func4); - tmp=f1->getArray()->getPointer(); - tmp[1]=1000.; - CPPUNIT_ASSERT_THROW(f1->mergeNodes(1e-10),INTERP_KERNEL::Exception); - f1->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::testCheckConsecutiveCellTypes() -{ - MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build2DTargetMesh_1(); - CPPUNIT_ASSERT(sourceMesh->checkConsecutiveCellTypes()); - CPPUNIT_ASSERT(!targetMesh->checkConsecutiveCellTypes()); - targetMesh->decrRef(); - sourceMesh->decrRef(); -} - -void MEDCouplingBasicsTest::testBuildOrthogonalField() -{ - MEDCouplingUMesh *targetMesh=build3DSurfTargetMesh_1(); - MEDCouplingFieldDouble *field=targetMesh->buildOrthogonalField(); - double expected[3]={0.70710678118654746,0.,-0.70710678118654746}; - CPPUNIT_ASSERT_EQUAL(5,field->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,field->getNumberOfComponents()); - const double *vals=field->getArray()->getConstPointer(); - for(int i=0;i<15;i++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[i%3],vals[i],1e-12); - field->decrRef(); - targetMesh->decrRef(); - // testing - double targetCoords[12]={0.,0.,0.,0.5,0.,0.5,1.,0.,1.,0.,1.,0.}; - int targetConn[4]={0,1,2,3}; - targetMesh=MEDCouplingUMesh::New(); - targetMesh->setMeshDimension(2); - targetMesh->allocateCells(1); - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn); - targetMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(4,3); - std::copy(targetCoords,targetCoords+12,myCoords->getPointer()); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - field=targetMesh->buildOrthogonalField(); - CPPUNIT_ASSERT_EQUAL(1,field->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,field->getNumberOfComponents()); - vals=field->getArray()->getConstPointer(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.70710678118654746,vals[0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,vals[1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.70710678118654746,vals[2],1e-12); - field->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::testGetCellsContainingPoint() -{ - MEDCouplingUMesh *targetMesh=build2DTargetMesh_1(); - double pos[12]={0.,0.,0.4,0.4,0.,0.4,0.1,0.1,0.25,0.,0.65,0.}; - std::vector t1,t2; - //2D basic - targetMesh->getCellsContainingPoints(pos,6,1e-12,t1,t2); - CPPUNIT_ASSERT_EQUAL(6,(int)t1.size()); - CPPUNIT_ASSERT_EQUAL(7,(int)t2.size()); - const int expectedValues1[6]={0,4,3,0,1,2}; - const int expectedValues2[7]={0,1,2,3,4,5,6}; - CPPUNIT_ASSERT(std::equal(t1.begin(),t1.end(),expectedValues1)); - CPPUNIT_ASSERT(std::equal(t2.begin(),t2.end(),expectedValues2)); - //2D with no help of bounding box. - double center[2]={0.2,0.2}; - MEDCouplingPointSet::rotate2DAlg(center,0.78539816339744830962,6,pos); - targetMesh->rotate(center,0,0.78539816339744830962); - t1.clear(); t2.clear(); - targetMesh->getCellsContainingPoints(pos,6,1e-12,t1,t2); - CPPUNIT_ASSERT_EQUAL(6,(int)t1.size()); - CPPUNIT_ASSERT_EQUAL(7,(int)t2.size()); - CPPUNIT_ASSERT(std::equal(t1.begin(),t1.end(),expectedValues1)); - CPPUNIT_ASSERT(std::equal(t2.begin(),t2.end(),expectedValues2)); - //2D outside - const double pos1bis[2]={-0.3303300858899107,-0.11819805153394641}; - CPPUNIT_ASSERT_EQUAL(-1,targetMesh->getCellContainingPoint(pos1bis,1e-12)); - targetMesh->decrRef(); - //test limits 2D - targetMesh=build2DTargetMesh_1(); - const double pos2[2]={0.2,-0.05}; - t1.clear(); - targetMesh->getCellsContainingPoint(pos2,1e-12,t1); - CPPUNIT_ASSERT_EQUAL(2,(int)t1.size()); - const int expectedValues3[2]={0,1}; - CPPUNIT_ASSERT(std::equal(t1.begin(),t1.end(),expectedValues3)); - const double pos3[2]={0.2,0.2}; - t1.clear(); - targetMesh->getCellsContainingPoint(pos3,1e-12,t1); - CPPUNIT_ASSERT_EQUAL(5,(int)t1.size()); - const int expectedValues4[5]={0,1,2,3,4}; - CPPUNIT_ASSERT(std::equal(t1.begin(),t1.end(),expectedValues4)); - CPPUNIT_ASSERT_EQUAL(0,targetMesh->getCellContainingPoint(pos3,1e-12)); - targetMesh->decrRef(); - //3D - targetMesh=build3DTargetMesh_1(); - const double pos4[3]={25.,25.,25.}; - CPPUNIT_ASSERT_EQUAL(0,targetMesh->getCellContainingPoint(pos4,1e-12)); - const double pos5[3]={50.,50.,50.}; - t1.clear(); - targetMesh->getCellsContainingPoint(pos5,1e-12,t1); - CPPUNIT_ASSERT_EQUAL(8,(int)t1.size()); - const int expectedValues5[8]={0,1,2,3,4,5,6,7}; - CPPUNIT_ASSERT(std::equal(t1.begin(),t1.end(),expectedValues5)); - const double pos6[3]={0., 50., 0.}; - t1.clear(); - targetMesh->getCellsContainingPoint(pos6,1e-12,t1); - CPPUNIT_ASSERT_EQUAL(2,(int)t1.size()); - const int expectedValues6[2]={0,2}; - CPPUNIT_ASSERT(std::equal(t1.begin(),t1.end(),expectedValues6)); - //3D outside - const double pos7[3]={-1.0,-1.0,0.}; - CPPUNIT_ASSERT_EQUAL(-1,targetMesh->getCellContainingPoint(pos7,1e-12)); - //3D outside 2 - const double center2[3]={0.,0.,0.}; - const double vec2[3]={0.,-1.,0.}; - targetMesh->rotate(center2,vec2,0.78539816339744830962); - const double pos8[3]={-25,25.,12.}; - CPPUNIT_ASSERT_EQUAL(-1,targetMesh->getCellContainingPoint(pos8,1e-12)); - // - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::testGetValueOn1() -{ - MEDCouplingUMesh *targetMesh=build2DTargetMesh_1(); - MEDCouplingFieldDouble *fieldOnCells=MEDCouplingFieldDouble::New(ON_CELLS); - int nbOfCells=targetMesh->getNumberOfCells(); - fieldOnCells->setMesh(targetMesh); - DataArrayDouble *array=DataArrayDouble::New(); - array->alloc(nbOfCells,2); - fieldOnCells->setArray(array); - double *tmp=array->getPointer(); - for(int i=0;idecrRef(); - // - const double pos1[2]={0.25,0.}; - double res[2]; - fieldOnCells->getValueOn(pos1,res); - CPPUNIT_ASSERT_DOUBLES_EQUAL(8.,res[0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(18.,res[1],1e-12); - // - fieldOnCells->decrRef(); - targetMesh->decrRef(); - // - targetMesh=build2DSourceMesh_1(); - MEDCouplingFieldDouble *fieldOnNodes=MEDCouplingFieldDouble::New(ON_NODES); - int nbOfNodes=targetMesh->getNumberOfNodes(); - fieldOnNodes->setMesh(targetMesh); - array=DataArrayDouble::New(); - array->alloc(nbOfNodes,2); - fieldOnNodes->setArray(array); - tmp=array->getPointer(); - for(int i=0;idecrRef(); - // - const double pos2[2]={-0.13333333333333333,-0.13333333333333333}; - fieldOnNodes->getValueOn(pos2,res); - CPPUNIT_ASSERT_DOUBLES_EQUAL(17.5,res[0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(27.5,res[1],1e-12); - const double pos3[2]={0.033333333333333326,0.36666666666666664}; - fieldOnNodes->getValueOn(pos3,res); - CPPUNIT_ASSERT_DOUBLES_EQUAL(18.666666666666667,res[0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(28.666666666666667,res[1],1e-12); - // - fieldOnNodes->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::testCMesh0() -{ - MEDCouplingCMesh* mesh=MEDCouplingCMesh::New(); - DataArrayDouble* coordsX=DataArrayDouble::New(); - double arrX[4] = { -1., 1., 2., 4. }; - coordsX->useArray(arrX,false, CPP_DEALLOC,4,1); - DataArrayDouble* coordsY=DataArrayDouble::New(); - double arrY[4] = { -2., 2., 4., 8. }; - coordsY->useArray(arrY,false, CPP_DEALLOC,4,1); - DataArrayDouble* coordsZ=DataArrayDouble::New(); - double arrZ[4] = { -3., 3., 6., 12. }; - coordsZ->useArray(arrZ,false, CPP_DEALLOC,4,1); - mesh->setCoords(coordsX,coordsY,coordsZ); - coordsX->decrRef(); - coordsY->decrRef(); - coordsZ->decrRef(); - // - MEDCouplingFieldDouble *fieldOnNodes=mesh->fillFromAnalytic(ON_NODES,1,"x+y/2.+z/3."); - CPPUNIT_ASSERT_EQUAL(1,fieldOnNodes->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(64,fieldOnNodes->getNumberOfTuples()); - const double expected1[64]={-3., -1., 0., 2., -1., 1., 2., 4., 0., 2., 3., 5., 2., 4., 5., 7., -1., 1., 2., - 4., 1., 3., 4., 6., 2., 4., 5., 7., 4., 6., 7., 9., 0., 2., 3., 5., 2., 4., 5., - 7., 3., 5., 6., 8., 5., 7., 8., 10., 2., 4., 5., - 7., 4., 6., 7., 9., 5., 7., 8., 10., 7., 9., 10., 12.}; - const double *val=fieldOnNodes->getArray()->getConstPointer(); - for(int i=0;i<64;i++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],val[i],1e-12); - double res; - fieldOnNodes->getValueOnPos(1,3,2,&res); - CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,res,1e-12); - fieldOnNodes->decrRef(); - // - MEDCouplingFieldDouble *fieldOnCells=mesh->fillFromAnalytic(ON_CELLS,1,"x+y/2.+z/3."); - CPPUNIT_ASSERT_EQUAL(1,fieldOnCells->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(27,fieldOnCells->getNumberOfTuples()); - val=fieldOnCells->getArray()->getConstPointer(); - const double expected2[27]={0, 1.5, 3, 1.5, 3, 4.5, 3, 4.5, 6, 1.5, 3, 4.5, 3, 4.5, - 6, 4.5, 6, 7.5, 3, 4.5, 6, 4.5, 6, 7.5, 6, 7.5, 9}; - for(int i=0;i<27;i++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],val[i],1e-12); - fieldOnCells->getValueOnPos(1,2,1,&res); - CPPUNIT_ASSERT_DOUBLES_EQUAL(6.,res,1e-12); - fieldOnCells->decrRef(); - // - mesh->decrRef(); -} - -void MEDCouplingBasicsTest::testScale() -{ - MEDCouplingUMesh *mesh=build2DTargetMesh_1(); - const double pos[2]={0.2,0.2}; - mesh->scale(pos,0.5); - const double expected1[18]={-0.05,-0.05, 0.2,-0.05, 0.45,-0.05, -0.05,0.2, 0.2,0.2, 0.45,0.2, - -0.05,0.45, 0.2,0.45, 0.45,0.45}; - const double *val=mesh->getCoords()->getConstPointer(); - for(int i=0;i<18;i++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],val[i],1e-12); - // - mesh->decrRef(); -} - -void MEDCouplingBasicsTest::testTryToShareSameCoords() -{ - MEDCouplingUMesh *m1=build2DTargetMesh_1(); - MEDCouplingUMesh *m2=build2DTargetMesh_1(); - CPPUNIT_ASSERT(m1->getCoords()!=m2->getCoords()); - m1->tryToShareSameCoords(*m2,1e-12); - CPPUNIT_ASSERT(m1->getCoords()==m2->getCoords()); - m1->tryToShareSameCoords(*m2,1e-12); - CPPUNIT_ASSERT(m1->getCoords()==m2->getCoords()); - m2->tryToShareSameCoords(*m1,1e-12); - CPPUNIT_ASSERT(m1->getCoords()==m2->getCoords()); - m1->decrRef(); - m2->decrRef(); - // - m1=build2DTargetMesh_1(); - m2=build2DTargetMesh_2(); - CPPUNIT_ASSERT(m1->getCoords()!=m2->getCoords()); - m1->tryToShareSameCoords(*m2,1e-12); - CPPUNIT_ASSERT(m1->getCoords()==m2->getCoords()); - m1->tryToShareSameCoords(*m2,1e-12); - CPPUNIT_ASSERT(m1->getCoords()==m2->getCoords()); - m2->tryToShareSameCoords(*m1,1e-12); - CPPUNIT_ASSERT(m1->getCoords()==m2->getCoords()); - m1->decrRef(); - m2->decrRef(); - // - m1=build2DTargetMesh_1(); - m2=build2DSourceMesh_1(); - CPPUNIT_ASSERT(m1->getCoords()!=m2->getCoords()); - CPPUNIT_ASSERT_THROW(m1->tryToShareSameCoords(*m2,1e-12),INTERP_KERNEL::Exception); - m1->decrRef(); - m2->decrRef(); -} - -void MEDCouplingBasicsTest::testFindNodeOnPlane() -{ - MEDCouplingUMesh *mesh=build3DTargetMesh_1(); - std::vector n; - double pt[3]={300.,300.,0.}; - double v[3]={0.,0.,2.}; - mesh->findNodesOnPlane(pt,v,1e-12,n); - CPPUNIT_ASSERT_EQUAL(9,(int)n.size()); - MEDCouplingUMesh *m3dSurf=(MEDCouplingUMesh *)mesh->buildFacePartOfMySelfNode(&n[0],&n[0]+n.size(),true); - MEDCouplingExtrudedMesh *me=MEDCouplingExtrudedMesh::New(mesh,m3dSurf,0); - const DataArrayInt *da=me->getMesh3DIds(); - CPPUNIT_ASSERT_EQUAL(8,me->getNumberOfCells()); - const int expected[8]={0,1,2,3,4,5,6,7}; - const int *val=da->getConstPointer(); - for(int i=0;i<8;i++) - CPPUNIT_ASSERT_EQUAL(expected[i],val[i]); - me->decrRef(); - m3dSurf->decrRef(); - mesh->decrRef(); -} - -void MEDCouplingBasicsTest::testRenumberCells() -{ - MEDCouplingUMesh *m=build3DSurfTargetMesh_1(); - MEDCouplingUMesh *m2=build3DSurfTargetMesh_1(); - CPPUNIT_ASSERT(m->isEqual(m2,0)); - const int arr[5]={12,3,25,2,26}; - m->renumberCells(arr,arr+5,true); - CPPUNIT_ASSERT(!m->isEqual(m2,0)); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,m->getTypeOfCell(0)); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,m->getTypeOfCell(1)); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,m->getTypeOfCell(2)); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,m->getTypeOfCell(3)); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,m->getTypeOfCell(4)); - const int arr2[5]={5,-1,-5,4,8}; - m->renumberCells(arr2,arr2+5,true); - CPPUNIT_ASSERT(m->isEqual(m2,0)); - m->decrRef(); - m2->decrRef(); -} - -void MEDCouplingBasicsTest::testChangeSpaceDimension() -{ - MEDCouplingUMesh *m1=build3DSurfTargetMesh_1(); - MEDCouplingUMesh *m2=build2DTargetMesh_1(); - // - CPPUNIT_ASSERT_EQUAL(3,m1->getSpaceDimension()); - m1->changeSpaceDimension(2); - CPPUNIT_ASSERT_EQUAL(2,m1->getSpaceDimension()); - m1->setName(m2->getName()); - CPPUNIT_ASSERT(m1->isEqual(m2,1e-12)); - m1->changeSpaceDimension(3); - CPPUNIT_ASSERT_EQUAL(3,m1->getSpaceDimension()); - const double expected[27]={-0.3,-0.3,0., 0.2,-0.3,0., 0.7,-0.3,0., -0.3,0.2,0., 0.2,0.2,0., 0.7,0.2,0., -0.3,0.7,0., 0.2,0.7,0., 0.7,0.7,0.}; - const double *val=m1->getCoords()->getConstPointer(); - for(int i=0;i<27;i++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[i],val[i],1e-14); - // - m1->decrRef(); - m2->decrRef(); -} diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTestData1.hxx b/src/MEDCoupling/Test/MEDCouplingBasicsTestData1.hxx deleted file mode 100644 index 2f9cc17cf..000000000 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTestData1.hxx +++ /dev/null @@ -1,1166 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -int connITT[201]={0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000, 1029, 1058, 1087, 1116, 1145, 1174, 1203, - 1232, 1261, 1290, 1319, 1348, 1377, 1406, 1435, 1464, 1493, 1522, 1551, 1580, 1609, 1638, 1667, 1696, 1725, 1754, 1783, 1812, 1841, 1870, 1899, - 1928, 1957, 1986, 2015, 2044, 2073, 2102, 2131, 2160, 2189, 2218, 2247, 2276, 2305, 2334, 2363, 2392, 2421, 2450, 2479, 2508, 2537, 2566, 2595, - 2624, 2653, 2682, 2711, 2740, 2769, 2798, 2827, 2856, 2885, 2914, 2943, 2972, 3001, 3030, 3059, 3088, 3117, 3146, 3175, 3204, 3233, 3262, 3291, - 3320, 3349, 3378, 3407, 3436, 3465, 3494, 3523, 3552, 3581, 3610, 3639, 3668, 3697, 3726, 3755, 3784, 3813, 3842, 3871, 3900, 3929, 3958, 3987, - 4016, 4045, 4074, 4103, 4132, 4161, 4190, 4219, 4248, 4277, 4306, 4335, 4364, 4393, 4422, 4451, 4480, 4509, 4538, 4567, 4596, 4625, 4654, 4683, - 4712, 4741, 4770, 4799, 4828, 4857, 4886, 4915, 4944, 4973, 5002, 5031, 5060, 5089, 5118, 5147, 5176, 5205, 5234, 5263, 5292, 5321, 5350, 5379, - 5408, 5437, 5466, 5495, 5524, 5553, 5582, 5611, 5640, 5669, 5698, 5727, 5756, 5785, 5814, 5843, 5872, 5901, 5930, 5959, 5988, 6017, 6046, 6075, - 6104, 6133, 6162, 6191, 6220}; - int connTT[6220]={0, 1, 2, 3, 4, 5, 6, -1, 0, 7, 8, 1, -1, 1, 8, 9, 2, -1, 2, 9, 10, 3, -1, 3, 10, 11, 4, -1, 4, 11, 12, 5, -1, 5, 12, 13, 6, -1, 6, 13, 7, 0, -1, 7, 13, 12, 11, 10, 9, 8, 14, 15, 16, 17, 18, 19, - 20, -1, 14, 21, 22, 15, -1, 15, 22, 23, 16, -1, 16, 23, 24, 17, -1, 17, 24, 25, 18, -1, 18, 25, 26, 19, -1, 19, 26, 27, 20, -1, 20, 27, 21, 14, -1, 21, 27, 26, 25, 24, 23, 22, 28, 29, 30, 31, 32, - 33, 34, -1, 28, 35, 36, 29, -1, 29, 36, 37, 30, -1, 30, 37, 38, 31, -1, 31, 38, 39, 32, -1, 32, 39, 40, 33, -1, 33, 40, 41, 34, -1, 34, 41, 35, 28, -1, 35, 41, 40, 39, 38, 37, 36, 42, 43, 44, 45, - 46, 47, 48, -1, 42, 49, 50, 43, -1, 43, 50, 51, 44, -1, 44, 51, 52, 45, -1, 45, 52, 53, 46, -1, 46, 53, 54, 47, -1, 47, 54, 55, 48, -1, 48, 55, 49, 42, -1, 49, 55, 54, 53, 52, 51, 50, 56, 57, 58, - 59, 60, 61, 62, -1, 56, 63, 64, 57, -1, 57, 64, 65, 58, -1, 58, 65, 66, 59, -1, 59, 66, 67, 60, -1, 60, 67, 68, 61, -1, 61, 68, 69, 62, -1, 62, 69, 63, 56, -1, 63, 69, 68, 67, 66, 65, 64, 70, 71, - 72, 73, 74, 75, 76, -1, 70, 77, 78, 71, -1, 71, 78, 79, 72, -1, 72, 79, 80, 73, -1, 73, 80, 81, 74, -1, 74, 81, 82, 75, -1, 75, 82, 83, 76, -1, 76, 83, 77, 70, -1, 77, 83, 82, 81, 80, 79, 78, 84, - 85, 86, 87, 88, 89, 90, -1, 84, 91, 92, 85, -1, 85, 92, 93, 86, -1, 86, 93, 94, 87, -1, 87, 94, 95, 88, -1, 88, 95, 96, 89, -1, 89, 96, 97, 90, -1, 90, 97, 91, 84, -1, 91, 97, 96, 95, 94, 93, 92, - 98, 99, 100, 101, 102, 103, 104, -1, 98, 105, 106, 99, -1, 99, 106, 107, 100, -1, 100, 107, 108, 101, -1, 101, 108, 109, 102, -1, 102, 109, 110, 103, -1, 103, 110, 111, 104, -1, 104, 111, 105, 98, - -1, 105, 111, 110, 109, 108, 107, 106, 112, 113, 114, 115, 116, 117, 118, -1, 112, 119, 120, 113, -1, 113, 120, 121, 114, -1, 114, 121, 122, 115, -1, 115, 122, 123, 116, -1, 116, 123, 124, 117, -1, - 117, 124, 125, 118, -1, 118, 125, 119, 112, -1, 119, 125, 124, 123, 122, 121, 120, 126, 127, 128, 129, 130, 131, 132, -1, 126, 133, 134, 127, -1, 127, 134, 135, 128, -1, 128, 135, 136, 129, -1, 129, - 136, 137, 130, -1, 130, 137, 138, 131, -1, 131, 138, 139, 132, -1, 132, 139, 133, 126, -1, 133, 139, 138, 137, 136, 135, 134, 140, 141, 142, 143, 144, 145, 146, -1, 140, 147, 148, 141, -1, 141, 148, - 149, 142, -1, 142, 149, 150, 143, -1, 143, 150, 151, 144, -1, 144, 151, 152, 145, -1, 145, 152, 153, 146, -1, 146, 153, 147, 140, -1, 147, 153, 152, 151, 150, 149, 148, 154, 155, 156, 157, 158, 159, - 160, -1, 154, 161, 162, 155, -1, 155, 162, 163, 156, -1, 156, 163, 164, 157, -1, 157, 164, 165, 158, -1, 158, 165, 166, 159, -1, 159, 166, 167, 160, -1, 160, 167, 161, 154, -1, 161, 167, 166, 165, - 164, 163, 162, 168, 169, 170, 171, 172, 173, 174, -1, 168, 175, 176, 169, -1, 169, 176, 177, 170, -1, 170, 177, 178, 171, -1, 171, 178, 179, 172, -1, 172, 179, 180, 173, -1, 173, 180, 181, 174, -1, - 174, 181, 175, 168, -1, 175, 181, 180, 179, 178, 177, 176, 182, 183, 184, 185, 186, 187, 188, -1, 182, 189, 190, 183, -1, 183, 190, 191, 184, -1, 184, 191, 192, 185, -1, 185, 192, 193, 186, -1, 186, - 193, 194, 187, -1, 187, 194, 195, 188, -1, 188, 195, 189, 182, -1, 189, 195, 194, 193, 192, 191, 190, 196, 197, 198, 199, 200, 201, 202, -1, 196, 203, 204, 197, -1, 197, 204, 205, 198, -1, 198, 205, - 206, 199, -1, 199, 206, 207, 200, -1, 200, 207, 208, 201, -1, 201, 208, 209, 202, -1, 202, 209, 203, 196, -1, 203, 209, 208, 207, 206, 205, 204, 210, 211, 212, 213, 214, 215, 216, -1, 210, 217, 218, - 211, -1, 211, 218, 219, 212, -1, 212, 219, 220, 213, -1, 213, 220, 221, 214, -1, 214, 221, 222, 215, -1, 215, 222, 223, 216, -1, 216, 223, 217, 210, -1, 217, 223, 222, 221, 220, 219, 218, 224, 225, - 226, 227, 228, 229, 230, -1, 224, 231, 232, 225, -1, 225, 232, 233, 226, -1, 226, 233, 234, 227, -1, 227, 234, 235, 228, -1, 228, 235, 236, 229, -1, 229, 236, 237, 230, -1, 230, 237, 231, 224, -1, - 231, 237, 236, 235, 234, 233, 232, 238, 239, 240, 241, 242, 243, 244, -1, 238, 245, 246, 239, -1, 239, 246, 247, 240, -1, 240, 247, 248, 241, -1, 241, 248, 249, 242, -1, 242, 249, 250, 243, -1, 243, - 250, 251, 244, -1, 244, 251, 245, 238, -1, 245, 251, 250, 249, 248, 247, 246, 252, 253, 254, 255, 256, 257, 258, -1, 252, 259, 260, 253, -1, 253, 260, 261, 254, -1, 254, 261, 262, 255, -1, 255, 262, - 263, 256, -1, 256, 263, 264, 257, -1, 257, 264, 265, 258, -1, 258, 265, 259, 252, -1, 259, 265, 264, 263, 262, 261, 260, 266, 267, 268, 269, 270, 271, 272, -1, 266, 273, 274, 267, -1, 267, 274, 275, - 268, -1, 268, 275, 276, 269, -1, 269, 276, 277, 270, -1, 270, 277, 278, 271, -1, 271, 278, 279, 272, -1, 272, 279, 273, 266, -1, 273, 279, 278, 277, 276, 275, 274, 280, 281, 282, 283, -1, 280, 284, - 285, 281, -1, 281, 285, 286, 282, -1, 282, 286, 287, 283, -1, 283, 287, 284, 280, -1, 284, 287, 286, 285, 288, 289, 290, 291, -1, 288, 292, 293, 289, -1, 289, 293, 294, 290, -1, 290, 294, 295, 291, - -1, 291, 295, 292, 288, -1, 292, 295, 294, 293, 296, 297, 298, 299, -1, 296, 300, 301, 297, -1, 297, 301, 302, 298, -1, 298, 302, 303, 299, -1, 299, 303, 300, 296, -1, 300, 303, 302, 301, 304, 305, - 306, 307, -1, 304, 308, 309, 305, -1, 305, 309, 310, 306, -1, 306, 310, 311, 307, -1, 307, 311, 308, 304, -1, 308, 311, 310, 309, 312, 313, 314, 315, -1, 312, 316, 317, 313, -1, 313, 317, 318, 314, - -1, 314, 318, 319, 315, -1, 315, 319, 316, 312, -1, 316, 319, 318, 317, 320, 321, 322, 323, -1, 320, 324, 325, 321, -1, 321, 325, 326, 322, -1, 322, 326, 327, 323, -1, 323, 327, 324, 320, -1, 324, - 327, 326, 325, 328, 329, 330, 331, -1, 328, 332, 333, 329, -1, 329, 333, 334, 330, -1, 330, 334, 335, 331, -1, 331, 335, 332, 328, -1, 332, 335, 334, 333, 336, 337, 338, 339, -1, 336, 340, 341, 337, - -1, 337, 341, 342, 338, -1, 338, 342, 343, 339, -1, 339, 343, 340, 336, -1, 340, 343, 342, 341, 344, 345, 346, 347, -1, 344, 348, 349, 345, -1, 345, 349, 350, 346, -1, 346, 350, 351, 347, -1, 347, - 351, 348, 344, -1, 348, 351, 350, 349, 352, 353, 354, 355, -1, 352, 356, 357, 353, -1, 353, 357, 358, 354, -1, 354, 358, 359, 355, -1, 355, 359, 356, 352, -1, 356, 359, 358, 357, 360, 361, 362, 363, - -1, 360, 364, 365, 361, -1, 361, 365, 366, 362, -1, 362, 366, 367, 363, -1, 363, 367, 364, 360, -1, 364, 367, 366, 365, 368, 369, 370, 371, -1, 368, 372, 373, 369, -1, 369, 373, 374, 370, -1, 370, - 374, 375, 371, -1, 371, 375, 372, 368, -1, 372, 375, 374, 373, 376, 377, 378, 379, -1, 376, 380, 381, 377, -1, 377, 381, 382, 378, -1, 378, 382, 383, 379, -1, 379, 383, 380, 376, -1, 380, 383, 382, - 381, 384, 385, 386, 387, -1, 384, 388, 389, 385, -1, 385, 389, 390, 386, -1, 386, 390, 391, 387, -1, 387, 391, 388, 384, -1, 388, 391, 390, 389, 392, 393, 394, 395, -1, 392, 396, 397, 393, -1, 393, - 397, 398, 394, -1, 394, 398, 399, 395, -1, 395, 399, 396, 392, -1, 396, 399, 398, 397, 400, 401, 402, 403, -1, 400, 404, 405, 401, -1, 401, 405, 406, 402, -1, 402, 406, 407, 403, -1, 403, 407, 404, - 400, -1, 404, 407, 406, 405, 408, 409, 410, 411, -1, 408, 412, 413, 409, -1, 409, 413, 414, 410, -1, 410, 414, 415, 411, -1, 411, 415, 412, 408, -1, 412, 415, 414, 413, 416, 417, 418, 419, -1, 416, - 420, 421, 417, -1, 417, 421, 422, 418, -1, 418, 422, 423, 419, -1, 419, 423, 420, 416, -1, 420, 423, 422, 421, 424, 425, 426, 427, -1, 424, 428, 429, 425, -1, 425, 429, 430, 426, -1, 426, 430, 431, - 427, -1, 427, 431, 428, 424, -1, 428, 431, 430, 429, 432, 433, 434, 435, -1, 432, 436, 437, 433, -1, 433, 437, 438, 434, -1, 434, 438, 439, 435, -1, 435, 439, 436, 432, -1, 436, 439, 438, 437, 440, - 441, 442, 443, -1, 440, 444, 445, 441, -1, 441, 445, 446, 442, -1, 442, 446, 447, 443, -1, 443, 447, 444, 440, -1, 444, 447, 446, 445, 448, 449, 450, 451, -1, 448, 452, 453, 449, -1, 449, 453, 454, - 450, -1, 450, 454, 455, 451, -1, 451, 455, 452, 448, -1, 452, 455, 454, 453, 456, 457, 458, 459, -1, 456, 460, 461, 457, -1, 457, 461, 462, 458, -1, 458, 462, 463, 459, -1, 459, 463, 460, 456, -1, - 460, 463, 462, 461, 464, 465, 466, 467, -1, 464, 468, 469, 465, -1, 465, 469, 470, 466, -1, 466, 470, 471, 467, -1, 467, 471, 468, 464, -1, 468, 471, 470, 469, 472, 473, 474, 475, -1, 472, 476, 477, - 473, -1, 473, 477, 478, 474, -1, 474, 478, 479, 475, -1, 475, 479, 476, 472, -1, 476, 479, 478, 477, 480, 481, 482, 483, -1, 480, 484, 485, 481, -1, 481, 485, 486, 482, -1, 482, 486, 487, 483, -1, - 483, 487, 484, 480, -1, 484, 487, 486, 485, 488, 489, 490, 491, -1, 488, 492, 493, 489, -1, 489, 493, 494, 490, -1, 490, 494, 495, 491, -1, 491, 495, 492, 488, -1, 492, 495, 494, 493, 496, 497, 498, - 499, -1, 496, 500, 501, 497, -1, 497, 501, 502, 498, -1, 498, 502, 503, 499, -1, 499, 503, 500, 496, -1, 500, 503, 502, 501, 504, 505, 506, 507, -1, 504, 508, 509, 505, -1, 505, 509, 510, 506, -1, 506, - 510, 511, 507, -1, 507, 511, 508, 504, -1, 508, 511, 510, 509, 512, 513, 514, 515, -1, 512, 516, 517, 513, -1, 513, 517, 518, 514, -1, 514, 518, 519, 515, -1, 515, 519, 516, 512, -1, 516, 519, 518, 517, - 520, 521, 522, 523, -1, 520, 524, 525, 521, -1, 521, 525, 526, 522, -1, 522, 526, 527, 523, -1, 523, 527, 524, 520, -1, 524, 527, 526, 525, 528, 529, 530, 531, -1, 528, 532, 533, 529, -1, 529, 533, - 534, 530, -1, 530, 534, 535, 531, -1, 531, 535, 532, 528, -1, 532, 535, 534, 533, 536, 537, 538, 539, -1, 536, 540, 541, 537, -1, 537, 541, 542, 538, -1, 538, 542, 543, 539, -1, 539, 543, 540, 536, - -1, 540, 543, 542, 541, 544, 545, 546, 547, -1, 544, 548, 549, 545, -1, 545, 549, 550, 546, -1, 546, 550, 551, 547, -1, 547, 551, 548, 544, -1, 548, 551, 550, 549, 552, 553, 554, 555, -1, 552, 556, - 557, 553, -1, 553, 557, 558, 554, -1, 554, 558, 559, 555, -1, 555, 559, 556, 552, -1, 556, 559, 558, 557, 560, 561, 562, 563, -1, 560, 564, 565, 561, -1, 561, 565, 566, 562, -1, 562, 566, 567, 563, - -1, 563, 567, 564, 560, -1, 564, 567, 566, 565, 568, 569, 570, 571, -1, 568, 572, 573, 569, -1, 569, 573, 574, 570, -1, 570, 574, 575, 571, -1, 571, 575, 572, 568, -1, 572, 575, 574, 573, 576, 577, - 578, 579, -1, 576, 580, 581, 577, -1, 577, 581, 582, 578, -1, 578, 582, 583, 579, -1, 579, 583, 580, 576, -1, 580, 583, 582, 581, 584, 585, 586, 587, -1, 584, 588, 589, 585, -1, 585, 589, 590, 586, - -1, 586, 590, 591, 587, -1, 587, 591, 588, 584, -1, 588, 591, 590, 589, 592, 593, 594, 595, -1, 592, 596, 597, 593, -1, 593, 597, 598, 594, -1, 594, 598, 599, 595, -1, 595, 599, 596, 592, -1, 596, - 599, 598, 597, 600, 601, 602, 603, -1, 600, 604, 605, 601, -1, 601, 605, 606, 602, -1, 602, 606, 607, 603, -1, 603, 607, 604, 600, -1, 604, 607, 606, 605, 608, 609, 610, 611, -1, 608, 612, 613, 609, - -1, 609, 613, 614, 610, -1, 610, 614, 615, 611, -1, 611, 615, 612, 608, -1, 612, 615, 614, 613, 616, 617, 618, 619, -1, 616, 620, 621, 617, -1, 617, 621, 622, 618, -1, 618, 622, 623, 619, -1, 619, - 623, 620, 616, -1, 620, 623, 622, 621, 624, 625, 626, 627, -1, 624, 628, 629, 625, -1, 625, 629, 630, 626, -1, 626, 630, 631, 627, -1, 627, 631, 628, 624, -1, 628, 631, 630, 629, 632, 633, 634, 635, - -1, 632, 636, 637, 633, -1, 633, 637, 638, 634, -1, 634, 638, 639, 635, -1, 635, 639, 636, 632, -1, 636, 639, 638, 637, 640, 641, 642, 643, -1, 640, 644, 645, 641, -1, 641, 645, 646, 642, -1, 642, - 646, 647, 643, -1, 643, 647, 644, 640, -1, 644, 647, 646, 645, 648, 649, 650, 651, -1, 648, 652, 653, 649, -1, 649, 653, 654, 650, -1, 650, 654, 655, 651, -1, 651, 655, 652, 648, -1, 652, 655, 654, - 653, 656, 657, 658, 659, -1, 656, 660, 661, 657, -1, 657, 661, 662, 658, -1, 658, 662, 663, 659, -1, 659, 663, 660, 656, -1, 660, 663, 662, 661, 664, 665, 666, 667, -1, 664, 668, 669, 665, -1, 665, - 669, 670, 666, -1, 666, 670, 671, 667, -1, 667, 671, 668, 664, -1, 668, 671, 670, 669, 672, 673, 674, 675, -1, 672, 676, 677, 673, -1, 673, 677, 678, 674, -1, 674, 678, 679, 675, -1, 675, 679, 676, - 672, -1, 676, 679, 678, 677, 680, 681, 682, 683, -1, 680, 684, 685, 681, -1, 681, 685, 686, 682, -1, 682, 686, 687, 683, -1, 683, 687, 684, 680, -1, 684, 687, 686, 685, 688, 689, 690, 691, -1, 688, - 692, 693, 689, -1, 689, 693, 694, 690, -1, 690, 694, 695, 691, -1, 691, 695, 692, 688, -1, 692, 695, 694, 693, 696, 697, 698, 699, -1, 696, 700, 701, 697, -1, 697, 701, 702, 698, -1, 698, 702, 703, - 699, -1, 699, 703, 700, 696, -1, 700, 703, 702, 701, 704, 705, 706, 707, -1, 704, 708, 709, 705, -1, 705, 709, 710, 706, -1, 706, 710, 711, 707, -1, 707, 711, 708, 704, -1, 708, 711, 710, 709, 712, - 713, 714, 715, -1, 712, 716, 717, 713, -1, 713, 717, 718, 714, -1, 714, 718, 719, 715, -1, 715, 719, 716, 712, -1, 716, 719, 718, 717, 720, 721, 722, 723, -1, 720, 724, 725, 721, -1, 721, 725, 726, - 722, -1, 722, 726, 727, 723, -1, 723, 727, 724, 720, -1, 724, 727, 726, 725, 728, 729, 730, 731, -1, 728, 732, 733, 729, -1, 729, 733, 734, 730, -1, 730, 734, 735, 731, -1, 731, 735, 732, 728, -1, - 732, 735, 734, 733, 736, 737, 738, 739, -1, 736, 740, 741, 737, -1, 737, 741, 742, 738, -1, 738, 742, 743, 739, -1, 739, 743, 740, 736, -1, 740, 743, 742, 741, 744, 745, 746, 747, -1, 744, 748, 749, - 745, -1, 745, 749, 750, 746, -1, 746, 750, 751, 747, -1, 747, 751, 748, 744, -1, 748, 751, 750, 749, 752, 753, 754, 755, -1, 752, 756, 757, 753, -1, 753, 757, 758, 754, -1, 754, 758, 759, 755, -1, - 755, 759, 756, 752, -1, 756, 759, 758, 757, 760, 761, 762, 763, -1, 760, 764, 765, 761, -1, 761, 765, 766, 762, -1, 762, 766, 767, 763, -1, 763, 767, 764, 760, -1, 764, 767, 766, 765, 768, 769, 770, - 771, -1, 768, 772, 773, 769, -1, 769, 773, 774, 770, -1, 770, 774, 775, 771, -1, 771, 775, 772, 768, -1, 772, 775, 774, 773, 776, 777, 778, 779, -1, 776, 780, 781, 777, -1, 777, 781, 782, 778, -1, - 778, 782, 783, 779, -1, 779, 783, 780, 776, -1, 780, 783, 782, 781, 784, 785, 786, 787, -1, 784, 788, 789, 785, -1, 785, 789, 790, 786, -1, 786, 790, 791, 787, -1, 787, 791, 788, 784, -1, 788, 791, - 790, 789, 792, 793, 794, 795, -1, 792, 796, 797, 793, -1, 793, 797, 798, 794, -1, 794, 798, 799, 795, -1, 795, 799, 796, 792, -1, 796, 799, 798, 797, 800, 801, 802, 803, -1, 800, 804, 805, 801, -1, - 801, 805, 806, 802, -1, 802, 806, 807, 803, -1, 803, 807, 804, 800, -1, 804, 807, 806, 805, 808, 809, 810, 811, -1, 808, 812, 813, 809, -1, 809, 813, 814, 810, -1, 810, 814, 815, 811, -1, 811, 815, - 812, 808, -1, 812, 815, 814, 813, 816, 817, 818, 819, -1, 816, 820, 821, 817, -1, 817, 821, 822, 818, -1, 818, 822, 823, 819, -1, 819, 823, 820, 816, -1, 820, 823, 822, 821, 824, 825, 826, 827, -1, - 824, 828, 829, 825, -1, 825, 829, 830, 826, -1, 826, 830, 831, 827, -1, 827, 831, 828, 824, -1, 828, 831, 830, 829, 832, 833, 834, 835, -1, 832, 836, 837, 833, -1, 833, 837, 838, 834, -1, 834, 838, - 839, 835, -1, 835, 839, 836, 832, -1, 836, 839, 838, 837, 840, 841, 842, 843, -1, 840, 844, 845, 841, -1, 841, 845, 846, 842, -1, 842, 846, 847, 843, -1, 843, 847, 844, 840, -1, 844, 847, 846, 845, - 848, 849, 850, 851, -1, 848, 852, 853, 849, -1, 849, 853, 854, 850, -1, 850, 854, 855, 851, -1, 851, 855, 852, 848, -1, 852, 855, 854, 853, 856, 857, 858, 859, -1, 856, 860, 861, 857, -1, 857, 861, - 862, 858, -1, 858, 862, 863, 859, -1, 859, 863, 860, 856, -1, 860, 863, 862, 861, 864, 865, 866, 867, -1, 864, 868, 869, 865, -1, 865, 869, 870, 866, -1, 866, 870, 871, 867, -1, 867, 871, 868, 864, - -1, 868, 871, 870, 869, 872, 873, 874, 875, -1, 872, 876, 877, 873, -1, 873, 877, 878, 874, -1, 874, 878, 879, 875, -1, 875, 879, 876, 872, -1, 876, 879, 878, 877, 880, 881, 882, 883, -1, 880, 884, - 885, 881, -1, 881, 885, 886, 882, -1, 882, 886, 887, 883, -1, 883, 887, 884, 880, -1, 884, 887, 886, 885, 888, 889, 890, 891, -1, 888, 892, 893, 889, -1, 889, 893, 894, 890, -1, 890, 894, 895, 891, - -1, 891, 895, 892, 888, -1, 892, 895, 894, 893, 896, 897, 898, 899, -1, 896, 900, 901, 897, -1, 897, 901, 902, 898, -1, 898, 902, 903, 899, -1, 899, 903, 900, 896, -1, 900, 903, 902, 901, 904, 905, - 906, 907, -1, 904, 908, 909, 905, -1, 905, 909, 910, 906, -1, 906, 910, 911, 907, -1, 907, 911, 908, 904, -1, 908, 911, 910, 909, 912, 913, 914, 915, -1, 912, 916, 917, 913, -1, 913, 917, 918, 914, - -1, 914, 918, 919, 915, -1, 915, 919, 916, 912, -1, 916, 919, 918, 917, 920, 921, 922, 923, -1, 920, 924, 925, 921, -1, 921, 925, 926, 922, -1, 922, 926, 927, 923, -1, 923, 927, 924, 920, -1, 924, - 927, 926, 925, 928, 929, 930, 931, -1, 928, 932, 933, 929, -1, 929, 933, 934, 930, -1, 930, 934, 935, 931, -1, 931, 935, 932, 928, -1, 932, 935, 934, 933, 936, 937, 938, 939, -1, 936, 940, 941, 937, - -1, 937, 941, 942, 938, -1, 938, 942, 943, 939, -1, 939, 943, 940, 936, -1, 940, 943, 942, 941, 944, 945, 946, 947, -1, 944, 948, 949, 945, -1, 945, 949, 950, 946, -1, 946, 950, 951, 947, -1, 947, - 951, 948, 944, -1, 948, 951, 950, 949, 952, 953, 954, 955, -1, 952, 956, 957, 953, -1, 953, 957, 958, 954, -1, 954, 958, 959, 955, -1, 955, 959, 956, 952, -1, 956, 959, 958, 957, 960, 961, 962, 963, - -1, 960, 964, 965, 961, -1, 961, 965, 966, 962, -1, 962, 966, 967, 963, -1, 963, 967, 964, 960, -1, 964, 967, 966, 965, 968, 969, 970, 971, -1, 968, 972, 973, 969, -1, 969, 973, 974, 970, -1, 970, - 974, 975, 971, -1, 971, 975, 972, 968, -1, 972, 975, 974, 973, 976, 977, 978, 979, -1, 976, 980, 981, 977, -1, 977, 981, 982, 978, -1, 978, 982, 983, 979, -1, 979, 983, 980, 976, -1, 980, 983, 982, - 981, 984, 985, 986, 987, -1, 984, 988, 989, 985, -1, 985, 989, 990, 986, -1, 986, 990, 991, 987, -1, 987, 991, 988, 984, -1, 988, 991, 990, 989, 992, 993, 994, 995, -1, 992, 996, 997, 993, -1, 993, - 997, 998, 994, -1, 994, 998, 999, 995, -1, 995, 999, 996, 992, -1, 996, 999, 998, 997, 1000, 1001, 1002, 1003, -1, 1000, 1004, 1005, 1001, -1, 1001, 1005, 1006, 1002, -1, 1002, 1006, 1007, 1003, - -1, 1003, 1007, 1004, 1000, -1, 1004, 1007, 1006, 1005, 1008, 1009, 1010, 1011, -1, 1008, 1012, 1013, 1009, -1, 1009, 1013, 1014, 1010, -1, 1010, 1014, 1015, 1011, -1, 1011, 1015, 1012, 1008, -1, - 1012, 1015, 1014, 1013, 1016, 1017, 1018, 1019, -1, 1016, 1020, 1021, 1017, -1, 1017, 1021, 1022, 1018, -1, 1018, 1022, 1023, 1019, -1, 1019, 1023, 1020, 1016, -1, 1020, 1023, 1022, 1021, 1024, - 1025, 1026, 1027, -1, 1024, 1028, 1029, 1025, -1, 1025, 1029, 1030, 1026, -1, 1026, 1030, 1031, 1027, -1, 1027, 1031, 1028, 1024, -1, 1028, 1031, 1030, 1029, 1032, 1033, 1034, 1035, -1, 1032, - 1036, 1037, 1033, -1, 1033, 1037, 1038, 1034, -1, 1034, 1038, 1039, 1035, -1, 1035, 1039, 1036, 1032, -1, 1036, 1039, 1038, 1037, 1040, 1041, 1042, 1043, -1, 1040, 1044, 1045, 1041, -1, 1041, - 1045, 1046, 1042, -1, 1042, 1046, 1047, 1043, -1, 1043, 1047, 1044, 1040, -1, 1044, 1047, 1046, 1045, 1048, 1049, 1050, 1051, -1, 1048, 1052, 1053, 1049, -1, 1049, 1053, 1054, 1050, -1, 1050, - 1054, 1055, 1051, -1, 1051, 1055, 1052, 1048, -1, 1052, 1055, 1054, 1053, 1056, 1057, 1058, 1059, -1, 1056, 1060, 1061, 1057, -1, 1057, 1061, 1062, 1058, -1, 1058, 1062, 1063, 1059, -1, 1059, - 1063, 1060, 1056, -1, 1060, 1063, 1062, 1061, 1064, 1065, 1066, 1067, -1, 1064, 1068, 1069, 1065, -1, 1065, 1069, 1070, 1066, -1, 1066, 1070, 1071, 1067, -1, 1067, 1071, 1068, 1064, -1, 1068, - 1071, 1070, 1069, 1072, 1073, 1074, 1075, -1, 1072, 1076, 1077, 1073, -1, 1073, 1077, 1078, 1074, -1, 1074, 1078, 1079, 1075, -1, 1075, 1079, 1076, 1072, -1, 1076, 1079, 1078, 1077, 1080, 1081, - 1082, 1083, -1, 1080, 1084, 1085, 1081, -1, 1081, 1085, 1086, 1082, -1, 1082, 1086, 1087, 1083, -1, 1083, 1087, 1084, 1080, -1, 1084, 1087, 1086, 1085, 1088, 1089, 1090, 1091, -1, 1088, 1092, - 1093, 1089, -1, 1089, 1093, 1094, 1090, -1, 1090, 1094, 1095, 1091, -1, 1091, 1095, 1092, 1088, -1, 1092, 1095, 1094, 1093, 1096, 1097, 1098, 1099, -1, 1096, 1100, 1101, 1097, -1, 1097, 1101, - 1102, 1098, -1, 1098, 1102, 1103, 1099, -1, 1099, 1103, 1100, 1096, -1, 1100, 1103, 1102, 1101, 1104, 1105, 1106, 1107, -1, 1104, 1108, 1109, 1105, -1, 1105, 1109, 1110, 1106, -1, 1106, 1110, - 1111, 1107, -1, 1107, 1111, 1108, 1104, -1, 1108, 1111, 1110, 1109, 1112, 1113, 1114, 1115, -1, 1112, 1116, 1117, 1113, -1, 1113, 1117, 1118, 1114, -1, 1114, 1118, 1119, 1115, -1, 1115, 1119, - 1116, 1112, -1, 1116, 1119, 1118, 1117, 1120, 1121, 1122, 1123, -1, 1120, 1124, 1125, 1121, -1, 1121, 1125, 1126, 1122, -1, 1122, 1126, 1127, 1123, -1, 1123, 1127, 1124, 1120, -1, 1124, 1127, - 1126, 1125, 1128, 1129, 1130, 1131, -1, 1128, 1132, 1133, 1129, -1, 1129, 1133, 1134, 1130, -1, 1130, 1134, 1135, 1131, -1, 1131, 1135, 1132, 1128, -1, 1132, 1135, 1134, 1133, 1136, 1137, 1138, - 1139, -1, 1136, 1140, 1141, 1137, -1, 1137, 1141, 1142, 1138, -1, 1138, 1142, 1143, 1139, -1, 1139, 1143, 1140, 1136, -1, 1140, 1143, 1142, 1141, 1144, 1145, 1146, 1147, -1, 1144, 1148, 1149, - 1145, -1, 1145, 1149, 1150, 1146, -1, 1146, 1150, 1151, 1147, -1, 1147, 1151, 1148, 1144, -1, 1148, 1151, 1150, 1149, 1152, 1153, 1154, 1155, -1, 1152, 1156, 1157, 1153, -1, 1153, 1157, 1158, - 1154, -1, 1154, 1158, 1159, 1155, -1, 1155, 1159, 1156, 1152, -1, 1156, 1159, 1158, 1157, 1160, 1161, 1162, 1163, -1, 1160, 1164, 1165, 1161, -1, 1161, 1165, 1166, 1162, -1, 1162, 1166, 1167, - 1163, -1, 1163, 1167, 1164, 1160, -1, 1164, 1167, 1166, 1165, 1168, 1169, 1170, 1171, -1, 1168, 1172, 1173, 1169, -1, 1169, 1173, 1174, 1170, -1, 1170, 1174, 1175, 1171, -1, 1171, 1175, 1172, - 1168, -1, 1172, 1175, 1174, 1173, 1176, 1177, 1178, 1179, -1, 1176, 1180, 1181, 1177, -1, 1177, 1181, 1182, 1178, -1, 1178, 1182, 1183, 1179, -1, 1179, 1183, 1180, 1176, -1, 1180, 1183, 1182, - 1181, 1184, 1185, 1186, 1187, -1, 1184, 1188, 1189, 1185, -1, 1185, 1189, 1190, 1186, -1, 1186, 1190, 1191, 1187, -1, 1187, 1191, 1188, 1184, -1, 1188, 1191, 1190, 1189, 1192, 1193, 1194, 1195, - -1, 1192, 1196, 1197, 1193, -1, 1193, 1197, 1198, 1194, -1, 1194, 1198, 1199, 1195, -1, 1195, 1199, 1196, 1192, -1, 1196, 1199, 1198, 1197, 1200, 1201, 1202, 1203, -1, 1200, 1204, 1205, 1201, - -1, 1201, 1205, 1206, 1202, -1, 1202, 1206, 1207, 1203, -1, 1203, 1207, 1204, 1200, -1, 1204, 1207, 1206, 1205, 1208, 1209, 1210, 1211, -1, 1208, 1212, 1213, 1209, -1, 1209, 1213, 1214, 1210, - -1, 1210, 1214, 1215, 1211, -1, 1211, 1215, 1212, 1208, -1, 1212, 1215, 1214, 1213, 1216, 1217, 1218, 1219, -1, 1216, 1220, 1221, 1217, -1, 1217, 1221, 1222, 1218, -1, 1218, 1222, 1223, 1219, - -1, 1219, 1223, 1220, 1216, -1, 1220, 1223, 1222, 1221, 1224, 1225, 1226, 1227, -1, 1224, 1228, 1229, 1225, -1, 1225, 1229, 1230, 1226, -1, 1226, 1230, 1231, 1227, -1, 1227, 1231, 1228, 1224, - -1, 1228, 1231, 1230, 1229, 1232, 1233, 1234, 1235, -1, 1232, 1236, 1237, 1233, -1, 1233, 1237, 1238, 1234, -1, 1234, 1238, 1239, 1235, -1, 1235, 1239, 1236, 1232, -1, 1236, 1239, 1238, 1237, - 1240, 1241, 1242, 1243, -1, 1240, 1244, 1245, 1241, -1, 1241, 1245, 1246, 1242, -1, 1242, 1246, 1247, 1243, -1, 1243, 1247, 1244, 1240, -1, 1244, 1247, 1246, 1245, 1248, 1249, 1250, 1251, -1, - 1248, 1252, 1253, 1249, -1, 1249, 1253, 1254, 1250, -1, 1250, 1254, 1255, 1251, -1, 1251, 1255, 1252, 1248, -1, 1252, 1255, 1254, 1253, 1256, 1257, 1258, 1259, -1, 1256, 1260, 1261, 1257, -1, - 1257, 1261, 1262, 1258, -1, 1258, 1262, 1263, 1259, -1, 1259, 1263, 1260, 1256, -1, 1260, 1263, 1262, 1261, 1264, 1265, 1266, 1267, -1, 1264, 1268, 1269, 1265, -1, 1265, 1269, 1270, 1266, -1, - 1266, 1270, 1271, 1267, -1, 1267, 1271, 1268, 1264, -1, 1268, 1271, 1270, 1269, 1272, 1273, 1274, 1275, -1, 1272, 1276, 1277, 1273, -1, 1273, 1277, 1278, 1274, -1, 1274, 1278, 1279, 1275, -1, - 1275, 1279, 1276, 1272, -1, 1276, 1279, 1278, 1277, 1280, 1281, 1282, 1283, -1, 1280, 1284, 1285, 1281, -1, 1281, 1285, 1286, 1282, -1, 1282, 1286, 1287, 1283, -1, 1283, 1287, 1284, 1280, -1, - 1284, 1287, 1286, 1285, 1288, 1289, 1290, 1291, -1, 1288, 1292, 1293, 1289, -1, 1289, 1293, 1294, 1290, -1, 1290, 1294, 1295, 1291, -1, 1291, 1295, 1292, 1288, -1, 1292, 1295, 1294, 1293, 1296, - 1297, 1298, 1299, -1, 1296, 1300, 1301, 1297, -1, 1297, 1301, 1302, 1298, -1, 1298, 1302, 1303, 1299, -1, 1299, 1303, 1300, 1296, -1, 1300, 1303, 1302, 1301, 1304, 1305, 1306, 1307, -1, 1304, - 1308, 1309, 1305, -1, 1305, 1309, 1310, 1306, -1, 1306, 1310, 1311, 1307, -1, 1307, 1311, 1308, 1304, -1, 1308, 1311, 1310, 1309, 1312, 1313, 1314, 1315, -1, 1312, 1316, 1317, 1313, -1, 1313, - 1317, 1318, 1314, -1, 1314, 1318, 1319, 1315, -1, 1315, 1319, 1316, 1312, -1, 1316, 1319, 1318, 1317, 1320, 1321, 1322, 1323, -1, 1320, 1324, 1325, 1321, -1, 1321, 1325, 1326, 1322, -1, 1322, - 1326, 1327, 1323, -1, 1323, 1327, 1324, 1320, -1, 1324, 1327, 1326, 1325, 1328, 1329, 1330, 1331, -1, 1328, 1332, 1333, 1329, -1, 1329, 1333, 1334, 1330, -1, 1330, 1334, 1335, 1331, -1, 1331, - 1335, 1332, 1328, -1, 1332, 1335, 1334, 1333, 1336, 1337, 1338, 1339, -1, 1336, 1340, 1341, 1337, -1, 1337, 1341, 1342, 1338, -1, 1338, 1342, 1343, 1339, -1, 1339, 1343, 1340, 1336, -1, 1340, - 1343, 1342, 1341, 1344, 1345, 1346, 1347, -1, 1344, 1348, 1349, 1345, -1, 1345, 1349, 1350, 1346, -1, 1346, 1350, 1351, 1347, -1, 1347, 1351, 1348, 1344, -1, 1348, 1351, 1350, 1349, 1352, 1353, - 1354, 1355, -1, 1352, 1356, 1357, 1353, -1, 1353, 1357, 1358, 1354, -1, 1354, 1358, 1359, 1355, -1, 1355, 1359, 1356, 1352, -1, 1356, 1359, 1358, 1357, 1360, 1361, 1362, 1363, -1, 1360, 1364, - 1365, 1361, -1, 1361, 1365, 1366, 1362, -1, 1362, 1366, 1367, 1363, -1, 1363, 1367, 1364, 1360, -1, 1364, 1367, 1366, 1365, 1368, 1369, 1370, 1371, -1, 1368, 1372, 1373, 1369, -1, 1369, 1373, - 1374, 1370, -1, 1370, 1374, 1375, 1371, -1, 1371, 1375, 1372, 1368, -1, 1372, 1375, 1374, 1373, 1376, 1377, 1378, 1379, -1, 1376, 1380, 1381, 1377, -1, 1377, 1381, 1382, 1378, -1, 1378, 1382, - 1383, 1379, -1, 1379, 1383, 1380, 1376, -1, 1380, 1383, 1382, 1381, 1384, 1385, 1386, 1387, -1, 1384, 1388, 1389, 1385, -1, 1385, 1389, 1390, 1386, -1, 1386, 1390, 1391, 1387, -1, 1387, 1391, - 1388, 1384, -1, 1388, 1391, 1390, 1389, 1392, 1393, 1394, 1395, -1, 1392, 1396, 1397, 1393, -1, 1393, 1397, 1398, 1394, -1, 1394, 1398, 1399, 1395, -1, 1395, 1399, 1396, 1392, -1, 1396, 1399, - 1398, 1397, 1400, 1401, 1402, 1403, -1, 1400, 1404, 1405, 1401, -1, 1401, 1405, 1406, 1402, -1, 1402, 1406, 1407, 1403, -1, 1403, 1407, 1404, 1400, -1, 1404, 1407, 1406, 1405, 1408, 1409, - 1410, 1411, -1, 1408, 1412, 1413, 1409, -1, 1409, 1413, 1414, 1410, -1, 1410, 1414, 1415, 1411, -1, 1411, 1415, 1412, 1408, -1, 1412, 1415, 1414, 1413, 1416, 1417, 1418, 1419, -1, 1416, - 1420, 1421, 1417, -1, 1417, 1421, 1422, 1418, -1, 1418, 1422, 1423, 1419, -1, 1419, 1423, 1420, 1416, -1, 1420, 1423, 1422, 1421, 1424, 1425, 1426, 1427, -1, 1424, 1428, 1429, 1425, -1, - 1425, 1429, 1430, 1426, -1, 1426, 1430, 1431, 1427, -1, 1427, 1431, 1428, 1424, -1, 1428, 1431, 1430, 1429, 1432, 1433, 1434, 1435, -1, 1432, 1436, 1437, 1433, -1, 1433, 1437, 1438, 1434, - -1, 1434, 1438, 1439, 1435, -1, 1435, 1439, 1436, 1432, -1, 1436, 1439, 1438, 1437, 1440, 1441, 1442, 1443, -1, 1440, 1444, 1445, 1441, -1, 1441, 1445, 1446, 1442, -1, 1442, 1446, 1447, 1443, - -1, 1443, 1447, 1444, 1440, -1, 1444, 1447, 1446, 1445, 1448, 1449, 1450, 1451, -1, 1448, 1452, 1453, 1449, -1, 1449, 1453, 1454, 1450, -1, 1450, 1454, 1455, 1451, -1, 1451, 1455, 1452, 1448, - -1, 1452, 1455, 1454, 1453, 1456, 1457, 1458, 1459, -1, 1456, 1460, 1461, 1457, -1, 1457, 1461, 1462, 1458, -1, 1458, 1462, 1463, 1459, -1, 1459, 1463, 1460, 1456, -1, 1460, 1463, 1462, 1461, - 1464, 1465, 1466, 1467, -1, 1464, 1468, 1469, 1465, -1, 1465, 1469, 1470, 1466, -1, 1466, 1470, 1471, 1467, -1, 1467, 1471, 1468, 1464, -1, 1468, 1471, 1470, 1469, 1472, 1473, 1474, 1475, -1, - 1472, 1476, 1477, 1473, -1, 1473, 1477, 1478, 1474, -1, 1474, 1478, 1479, 1475, -1, 1475, 1479, 1476, 1472, -1, 1476, 1479, 1478, 1477, 1480, 1481, 1482, 1483, -1, 1480, 1484, 1485, 1481, -1, - 1481, 1485, 1486, 1482, -1, 1482, 1486, 1487, 1483, -1, 1483, 1487, 1484, 1480, -1, 1484, 1487, 1486, 1485, 1488, 1489, 1490, 1491, -1, 1488, 1492, 1493, 1489, -1, 1489, 1493, 1494, 1490, -1, - 1490, 1494, 1495, 1491, -1, 1491, 1495, 1492, 1488, -1, 1492, 1495, 1494, 1493, 1496, 1497, 1498, 1499, -1, 1496, 1500, 1501, 1497, -1, 1497, 1501, 1502, 1498, -1, 1498, 1502, 1503, 1499, -1, - 1499, 1503, 1500, 1496, -1, 1500, 1503, 1502, 1501, 1504, 1505, 1506, 1507, -1, 1504, 1508, 1509, 1505, -1, 1505, 1509, 1510, 1506, -1, 1506, 1510, 1511, 1507, -1, 1507, 1511, 1508, 1504, -1, - 1508, 1511, 1510, 1509, 1512, 1513, 1514, 1515, -1, 1512, 1516, 1517, 1513, -1, 1513, 1517, 1518, 1514, -1, 1514, 1518, 1519, 1515, -1, 1515, 1519, 1516, 1512, -1, 1516, 1519, 1518, 1517, 1520, - 1521, 1522, 1523, -1, 1520, 1524, 1525, 1521, -1, 1521, 1525, 1526, 1522, -1, 1522, 1526, 1527, 1523, -1, 1523, 1527, 1524, 1520, -1, 1524, 1527, 1526, 1525, 1528, 1529, 1530, 1531, -1, 1528, 1532, - 1533, 1529, -1, 1529, 1533, 1534, 1530, -1, 1530, 1534, 1535, 1531, -1, 1531, 1535, 1532, 1528, -1, 1532, 1535, 1534, 1533, 1536, 1537, 1538, 1539, -1, 1536, 1540, 1541, 1537, -1, 1537, 1541, 1542, - 1538, -1, 1538, 1542, 1543, 1539, -1, 1539, 1543, 1540, 1536, -1, 1540, 1543, 1542, 1541, 1544, 1545, 1546, 1547, -1, 1544, 1548, 1549, 1545, -1, 1545, 1549, 1550, 1546, -1, 1546, 1550, 1551, 1547, - -1, 1547, 1551, 1548, 1544, -1, 1548, 1551, 1550, 1549, 1552, 1553, 1554, 1555, -1, 1552, 1556, 1557, 1553, -1, 1553, 1557, 1558, 1554, -1, 1554, 1558, 1559, 1555, -1, 1555, 1559, 1556, 1552, -1, 1556, - 1559, 1558, 1557, 1560, 1561, 1562, 1563, -1, 1560, 1564, 1565, 1561, -1, 1561, 1565, 1566, 1562, -1, 1562, 1566, 1567, 1563, -1, 1563, 1567, 1564, 1560, -1, 1564, 1567, 1566, 1565, 1568, 1569, 1570, 1571, - -1, 1568, 1572, 1573, 1569, -1, 1569, 1573, 1574, 1570, -1, 1570, 1574, 1575, 1571, -1, 1571, 1575, 1572, 1568, -1, 1572, 1575, 1574, 1573, 1576, 1577, 1578, 1579, -1, 1576, 1580, 1581, 1577, -1, - 1577, 1581, 1582, 1578, -1, 1578, 1582, 1583, 1579, -1, 1579, 1583, 1580, 1576, -1, 1580, 1583, 1582, 1581, 1584, 1585, 1586, 1587, -1, 1584, 1588, 1589, 1585, -1, 1585, 1589, 1590, 1586, -1, - 1586, 1590, 1591, 1587, -1, 1587, 1591, 1588, 1584, -1, 1588, 1591, 1590, 1589, 1592, 1593, 1594, 1595, -1, 1592, 1596, 1597, 1593, -1, 1593, 1597, 1598, 1594, -1, 1594, 1598, 1599, 1595, -1, - 1595, 1599, 1596, 1592, -1, 1596, 1599, 1598, 1597, 1600, 1601, 1602, 1603, -1, 1600, 1604, 1605, 1601, -1, 1601, 1605, 1606, 1602, -1, 1602, 1606, 1607, 1603, -1, 1603, 1607, 1604, 1600, -1, - 1604, 1607, 1606, 1605, 1608, 1609, 1610, 1611, -1, 1608, 1612, 1613, 1609, -1, 1609, 1613, 1614, 1610, -1, 1610, 1614, 1615, 1611, -1, 1611, 1615, 1612, 1608, -1, 1612, 1615, 1614, 1613, 1616, - 1617, 1618, 1619, -1, 1616, 1620, 1621, 1617, -1, 1617, 1621, 1622, 1618, -1, 1618, 1622, 1623, 1619, -1, 1619, 1623, 1620, 1616, -1, 1620, 1623, 1622, 1621, 1624, 1625, 1626, 1627, -1, 1624, - 1628, 1629, 1625, -1, 1625, 1629, 1630, 1626, -1, 1626, 1630, 1631, 1627, -1, 1627, 1631, 1628, 1624, -1, 1628, 1631, 1630, 1629, 1632, 1633, 1634, 1635, -1, 1632, 1636, 1637, 1633, -1, 1633, - 1637, 1638, 1634, -1, 1634, 1638, 1639, 1635, -1, 1635, 1639, 1636, 1632, -1, 1636, 1639, 1638, 1637, 1640, 1641, 1642, 1643, -1, 1640, 1644, 1645, 1641, -1, 1641, 1645, 1646, 1642, -1, 1642, - 1646, 1647, 1643, -1, 1643, 1647, 1644, 1640, -1, 1644, 1647, 1646, 1645, 1648, 1649, 1650, 1651, -1, 1648, 1652, 1653, 1649, -1, 1649, 1653, 1654, 1650, -1, 1650, 1654, 1655, 1651, -1, 1651, - 1655, 1652, 1648, -1, 1652, 1655, 1654, 1653, 1656, 1657, 1658, 1659, -1, 1656, 1660, 1661, 1657, -1, 1657, 1661, 1662, 1658, -1, 1658, 1662, 1663, 1659, -1, 1659, 1663, 1660, 1656, -1, 1660, - 1663, 1662, 1661, 1664, 1665, 1666, 1667, -1, 1664, 1668, 1669, 1665, -1, 1665, 1669, 1670, 1666, -1, 1666, 1670, 1671, 1667, -1, 1667, 1671, 1668, 1664, -1, 1668, 1671, 1670, 1669, 1672, 1673, - 1674, 1675, -1, 1672, 1676, 1677, 1673, -1, 1673, 1677, 1678, 1674, -1, 1674, 1678, 1679, 1675, -1, 1675, 1679, 1676, 1672, -1, 1676, 1679, 1678, 1677, 1680, 1681, 1682, 1683, -1, 1680, 1684, - 1685, 1681, -1, 1681, 1685, 1686, 1682, -1, 1682, 1686, 1687, 1683, -1, 1683, 1687, 1684, 1680, -1, 1684, 1687, 1686, 1685, 1688, 1689, 1690, 1691, -1, 1688, 1692, 1693, 1689, -1, 1689, 1693, - 1694, 1690, -1, 1690, 1694, 1695, 1691, -1, 1691, 1695, 1692, 1688, -1, 1692, 1695, 1694, 1693, 1696, 1697, 1698, 1699, -1, 1696, 1700, 1701, 1697, -1, 1697, 1701, 1702, 1698, -1, 1698, 1702, - 1703, 1699, -1, 1699, 1703, 1700, 1696, -1, 1700, 1703, 1702, 1701, 1704, 1705, 1706, 1707, -1, 1704, 1708, 1709, 1705, -1, 1705, 1709, 1710, 1706, -1, 1706, 1710, 1711, 1707, -1, 1707, 1711, - 1708, 1704, -1, 1708, 1711, 1710, 1709, 1712, 1713, 1714, 1715, -1, 1712, 1716, 1717, 1713, -1, 1713, 1717, 1718, 1714, -1, 1714, 1718, 1719, 1715, -1, 1715, 1719, 1716, 1712, -1, 1716, 1719, 1718, 1717}; - -double coordsTT[5160]={ - 0.0054015000000000044, 0.0054015000000000053, 0, 0.2106585, 0.0054015000000000053, 0, 0.2106585, 0.039611, 0, 0.2106585, 0.10803, 0, 0.2106585, - 0.17644899999999999, 0, 0.2106585, 0.2106585, 0, 0.0054015000000000044, 0.2106585, 0, 0.0054015000000000044, 0.0054015000000000053, 0.21364999999999998, - 0.2106585, 0.0054015000000000053, 0.21364999999999998, 0.2106585, 0.039611, 0.21364999999999998, 0.2106585, 0.10803, 0.21364999999999998, 0.2106585, - 0.17644899999999999, 0.21364999999999998, 0.2106585, 0.2106585, 0.21364999999999998, 0.0054015000000000044, 0.2106585, 0.21364999999999998, - 0.0054015000000000044, 0.0054015000000000053, 0.21364999999999998, 0.2106585, 0.0054015000000000053, 0.21364999999999998, 0.2106585, 0.039611, - 0.21364999999999998, 0.2106585, 0.10803, 0.21364999999999998, 0.2106585, 0.17644899999999999, 0.21364999999999998, 0.2106585, 0.2106585, 0.21364999999999998, - 0.0054015000000000044, 0.2106585, 0.21364999999999998, 0.0054015000000000044, 0.0054015000000000053, 0.42729999999999996, 0.2106585, 0.0054015000000000053, - 0.42729999999999996, 0.2106585, 0.039611, 0.42729999999999996, 0.2106585, 0.10803, 0.42729999999999996, 0.2106585, 0.17644899999999999, 0.42729999999999996, - 0.2106585, 0.2106585, 0.42729999999999996, 0.0054015000000000044, 0.2106585, 0.42729999999999996, 0.0054015000000000044, 0.0054015000000000053, - 0.42729999999999996, 0.2106585, 0.0054015000000000053, 0.42729999999999996, 0.2106585, 0.039611, 0.42729999999999996, 0.2106585, 0.10803, 0.42729999999999996, - 0.2106585, 0.17644899999999999, 0.42729999999999996, 0.2106585, 0.2106585, 0.42729999999999996, 0.0054015000000000044, 0.2106585, 0.42729999999999996, - 0.0054015000000000044, 0.0054015000000000053, 0.64094999999999991, 0.2106585, 0.0054015000000000053, 0.64094999999999991, 0.2106585, 0.039611, - 0.64094999999999991, 0.2106585, 0.10803, 0.64094999999999991, 0.2106585, 0.17644899999999999, 0.64094999999999991, 0.2106585, 0.2106585, 0.64094999999999991, - 0.0054015000000000044, 0.2106585, 0.64094999999999991, 0.0054015000000000044, 0.0054015000000000053, 0.64094999999999991, 0.2106585, 0.0054015000000000053, - 0.64094999999999991, 0.2106585, 0.039611, 0.64094999999999991, 0.2106585, 0.10803, 0.64094999999999991, 0.2106585, 0.17644899999999999, 0.64094999999999991, - 0.2106585, 0.2106585, 0.64094999999999991, 0.0054015000000000044, 0.2106585, 0.64094999999999991, 0.0054015000000000044, 0.0054015000000000053, - 0.85459999999999992, 0.2106585, 0.0054015000000000053, 0.85459999999999992, 0.2106585, 0.039611, 0.85459999999999992, 0.2106585, 0.10803, 0.85459999999999992, - 0.2106585, 0.17644899999999999, 0.85459999999999992, 0.2106585, 0.2106585, 0.85459999999999992, 0.0054015000000000044, 0.2106585, 0.85459999999999992, - 0.0054015000000000044, 0.0054015000000000053, 0.85459999999999992, 0.2106585, 0.0054015000000000053, 0.85459999999999992, 0.2106585, 0.039611, - 0.85459999999999992, 0.2106585, 0.10803, 0.85459999999999992, 0.2106585, 0.17644899999999999, 0.85459999999999992, 0.2106585, 0.2106585, 0.85459999999999992, - 0.0054015000000000044, 0.2106585, 0.85459999999999992, 0.0054015000000000044, 0.0054015000000000053, 1.0682499999999999, 0.2106585, 0.0054015000000000053, - 1.0682499999999999, 0.2106585, 0.039611, 1.0682499999999999, 0.2106585, 0.10803, - 1.0682499999999999, 0.2106585, 0.17644899999999999, 1.0682499999999999, 0.2106585, 0.2106585, 1.0682499999999999, 0.0054015000000000044, 0.2106585, - 1.0682499999999999, 0.0054015000000000044, 0.0054015000000000053, 1.0682499999999999, 0.2106585, 0.0054015000000000053, 1.0682499999999999, 0.2106585, 0.039611, - 1.0682499999999999, 0.2106585, 0.10803, 1.0682499999999999, 0.2106585, 0.17644899999999999, 1.0682499999999999, 0.2106585, 0.2106585, 1.0682499999999999, - 0.0054015000000000044, 0.2106585, 1.0682499999999999, 0.0054015000000000044, 0.0054015000000000053, 1.2818999999999998, 0.2106585, 0.0054015000000000053, - 1.2818999999999998, 0.2106585, 0.039611, 1.2818999999999998, 0.2106585, 0.10803, 1.2818999999999998, 0.2106585, 0.17644899999999999, 1.2818999999999998, - 0.2106585, 0.2106585, 1.2818999999999998, 0.0054015000000000044, 0.2106585, 1.2818999999999998, 0.0054015000000000044, 0.0054015000000000053, 1.2818999999999998, - 0.2106585, 0.0054015000000000053, 1.2818999999999998, 0.2106585, 0.039611, 1.2818999999999998, 0.2106585, 0.10803, 1.2818999999999998, 0.2106585, - 0.17644899999999999, 1.2818999999999998, 0.2106585, 0.2106585, 1.2818999999999998, 0.0054015000000000044, 0.2106585, 1.2818999999999998, 0.0054015000000000044, - 0.0054015000000000053, 1.4955499999999999, 0.2106585, 0.0054015000000000053, 1.4955499999999999, 0.2106585, 0.039611, 1.4955499999999999, 0.2106585, 0.10803, - 1.4955499999999999, 0.2106585, 0.17644899999999999, 1.4955499999999999, 0.2106585, 0.2106585, 1.4955499999999999, 0.0054015000000000044, 0.2106585, - 1.4955499999999999, 0.0054015000000000044, 0.0054015000000000053, 1.4955499999999999, 0.2106585, 0.0054015000000000053, 1.4955499999999999, 0.2106585, 0.039611, - 1.4955499999999999, 0.2106585, 0.10803, 1.4955499999999999, 0.2106585, 0.17644899999999999, 1.4955499999999999, 0.2106585, 0.2106585, 1.4955499999999999, - 0.0054015000000000044, 0.2106585, 1.4955499999999999, 0.0054015000000000044, 0.0054015000000000053, 1.7091999999999998, 0.2106585, 0.0054015000000000053, - 1.7091999999999998, 0.2106585, 0.039611, 1.7091999999999998, 0.2106585, 0.10803, 1.7091999999999998, 0.2106585, 0.17644899999999999, 1.7091999999999998, - 0.2106585, 0.2106585, 1.7091999999999998, 0.0054015000000000044, 0.2106585, 1.7091999999999998, 0.0054015000000000044, 0.0054015000000000053, 1.7091999999999998, - 0.2106585, 0.0054015000000000053, 1.7091999999999998, 0.2106585, 0.039611, 1.7091999999999998, 0.2106585, 0.10803, 1.7091999999999998, 0.2106585, - 0.17644899999999999, 1.7091999999999998, 0.2106585, 0.2106585, 1.7091999999999998, 0.0054015000000000044, 0.2106585, 1.7091999999999998, 0.0054015000000000044, - 0.0054015000000000053, 1.9228499999999997, 0.2106585, 0.0054015000000000053, 1.9228499999999997, 0.2106585, 0.039611, 1.9228499999999997, 0.2106585, 0.10803, - 1.9228499999999997, 0.2106585, 0.17644899999999999, 1.9228499999999997, 0.2106585, 0.2106585, 1.9228499999999997, 0.0054015000000000044, 0.2106585, - 1.9228499999999997, 0.0054015000000000044, 0.0054015000000000053, 1.9228499999999997, 0.2106585, 0.0054015000000000053, 1.9228499999999997, 0.2106585, 0.039611, - 1.9228499999999997, 0.2106585, 0.10803, 1.9228499999999997, 0.2106585, 0.17644899999999999, 1.9228499999999997, 0.2106585, 0.2106585, 1.9228499999999997, - 0.0054015000000000044, 0.2106585, 1.9228499999999997, 0.0054015000000000044, - 0.0054015000000000053, 2.1364999999999998, 0.2106585, 0.0054015000000000053, 2.1364999999999998, 0.2106585, 0.039611, 2.1364999999999998, 0.2106585, - 0.10803, 2.1364999999999998, 0.2106585, 0.17644899999999999, 2.1364999999999998, 0.2106585, 0.2106585, 2.1364999999999998, 0.0054015000000000044, 0.2106585, - 2.1364999999999998, 0.0054015000000000044, 0.0054015000000000053, 2.1364999999999998, 0.2106585, 0.0054015000000000053, 2.1364999999999998, 0.2106585, 0.039611, - 2.1364999999999998, 0.2106585, 0.10803, 2.1364999999999998, 0.2106585, 0.17644899999999999, 2.1364999999999998, 0.2106585, 0.2106585, 2.1364999999999998, - 0.0054015000000000044, 0.2106585, 2.1364999999999998, 0.0054015000000000044, 0.0054015000000000053, 2.3501499999999997, 0.2106585, 0.0054015000000000053, - 2.3501499999999997, 0.2106585, 0.039611, 2.3501499999999997, 0.2106585, 0.10803, 2.3501499999999997, 0.2106585, 0.17644899999999999, 2.3501499999999997, - 0.2106585, 0.2106585, 2.3501499999999997, 0.0054015000000000044, 0.2106585, 2.3501499999999997, 0.0054015000000000044, 0.0054015000000000053, 2.3501499999999997, - 0.2106585, 0.0054015000000000053, 2.3501499999999997, 0.2106585, 0.039611, 2.3501499999999997, 0.2106585, 0.10803, 2.3501499999999997, 0.2106585, - 0.17644899999999999, 2.3501499999999997, 0.2106585, 0.2106585, 2.3501499999999997, 0.0054015000000000044, 0.2106585, 2.3501499999999997, 0.0054015000000000044, - 0.0054015000000000053, 2.5637999999999996, 0.2106585, 0.0054015000000000053, 2.5637999999999996, 0.2106585, 0.039611, 2.5637999999999996, 0.2106585, 0.10803, - 2.5637999999999996, 0.2106585, 0.17644899999999999, 2.5637999999999996, 0.2106585, 0.2106585, 2.5637999999999996, 0.0054015000000000044, 0.2106585, - 2.5637999999999996, 0.0054015000000000044, 0.0054015000000000053, 2.5637999999999996, 0.2106585, 0.0054015000000000053, 2.5637999999999996, 0.2106585, 0.039611, - 2.5637999999999996, 0.2106585, 0.10803, 2.5637999999999996, 0.2106585, 0.17644899999999999, 2.5637999999999996, 0.2106585, 0.2106585, 2.5637999999999996, - 0.0054015000000000044, 0.2106585, 2.5637999999999996, 0.0054015000000000044, 0.0054015000000000053, 2.7774499999999995, 0.2106585, 0.0054015000000000053, - 2.7774499999999995, 0.2106585, 0.039611, 2.7774499999999995, 0.2106585, 0.10803, 2.7774499999999995, 0.2106585, 0.17644899999999999, 2.7774499999999995, - 0.2106585, 0.2106585, 2.7774499999999995, 0.0054015000000000044, 0.2106585, 2.7774499999999995, 0.0054015000000000044, 0.0054015000000000053, 2.7774499999999995, - 0.2106585, 0.0054015000000000053, 2.7774499999999995, 0.2106585, 0.039611, 2.7774499999999995, 0.2106585, 0.10803, 2.7774499999999995, 0.2106585, - 0.17644899999999999, 2.7774499999999995, 0.2106585, 0.2106585, 2.7774499999999995, 0.0054015000000000044, 0.2106585, 2.7774499999999995, 0.0054015000000000044, - 0.0054015000000000053, 2.9910999999999999, 0.2106585, 0.0054015000000000053, 2.9910999999999999, 0.2106585, 0.039611, 2.9910999999999999, 0.2106585, 0.10803, - 2.9910999999999999, 0.2106585, 0.17644899999999999, 2.9910999999999999, 0.2106585, 0.2106585, 2.9910999999999999, 0.0054015000000000044, 0.2106585, - 2.9910999999999999, 0.0054015000000000044, 0.0054015000000000053, 2.9910999999999999, 0.2106585, 0.0054015000000000053, 2.9910999999999999, 0.2106585, 0.039611, - 2.9910999999999999, 0.2106585, 0.10803, 2.9910999999999999, - 0.2106585, 0.17644899999999999, 2.9910999999999999, 0.2106585, 0.2106585, 2.9910999999999999, 0.0054015000000000044, 0.2106585, 2.9910999999999999, - 0.0054015000000000044, 0.0054015000000000053, 3.2047499999999998, 0.2106585, 0.0054015000000000053, 3.2047499999999998, 0.2106585, 0.039611, 3.2047499999999998, - 0.2106585, 0.10803, 3.2047499999999998, 0.2106585, 0.17644899999999999, 3.2047499999999998, 0.2106585, 0.2106585, 3.2047499999999998, 0.0054015000000000044, - 0.2106585, 3.2047499999999998, 0.0054015000000000044, 0.0054015000000000053, 3.2047499999999998, 0.2106585, 0.0054015000000000053, 3.2047499999999998, 0.2106585, - 0.039611, 3.2047499999999998, 0.2106585, 0.10803, 3.2047499999999998, 0.2106585, 0.17644899999999999, 3.2047499999999998, 0.2106585, 0.2106585, - 3.2047499999999998, 0.0054015000000000044, 0.2106585, 3.2047499999999998, 0.0054015000000000044, 0.0054015000000000053, 3.4183999999999997, 0.2106585, - 0.0054015000000000053, 3.4183999999999997, 0.2106585, 0.039611, 3.4183999999999997, 0.2106585, 0.10803, 3.4183999999999997, 0.2106585, 0.17644899999999999, - 3.4183999999999997, 0.2106585, 0.2106585, 3.4183999999999997, 0.0054015000000000044, 0.2106585, 3.4183999999999997, 0.0054015000000000044, 0.0054015000000000053, - 3.4183999999999997, 0.2106585, 0.0054015000000000053, 3.4183999999999997, 0.2106585, 0.039611, 3.4183999999999997, 0.2106585, 0.10803, 3.4183999999999997, - 0.2106585, 0.17644899999999999, 3.4183999999999997, 0.2106585, 0.2106585, 3.4183999999999997, 0.0054015000000000044, 0.2106585, 3.4183999999999997, - 0.0054015000000000044, 0.0054015000000000053, 3.6320499999999996, 0.2106585, 0.0054015000000000053, 3.6320499999999996, 0.2106585, 0.039611, 3.6320499999999996, - 0.2106585, 0.10803, 3.6320499999999996, 0.2106585, 0.17644899999999999, 3.6320499999999996, 0.2106585, 0.2106585, 3.6320499999999996, 0.0054015000000000044, - 0.2106585, 3.6320499999999996, 0.0054015000000000044, 0.0054015000000000053, 3.6320499999999996, 0.2106585, 0.0054015000000000053, 3.6320499999999996, 0.2106585, - 0.039611, 3.6320499999999996, 0.2106585, 0.10803, 3.6320499999999996, 0.2106585, 0.17644899999999999, 3.6320499999999996, 0.2106585, 0.2106585, - 3.6320499999999996, 0.0054015000000000044, 0.2106585, 3.6320499999999996, 0.0054015000000000044, 0.0054015000000000053, 3.8456999999999995, 0.2106585, - 0.0054015000000000053, 3.8456999999999995, 0.2106585, 0.039611, 3.8456999999999995, 0.2106585, 0.10803, 3.8456999999999995, 0.2106585, 0.17644899999999999, - 3.8456999999999995, 0.2106585, 0.2106585, 3.8456999999999995, 0.0054015000000000044, 0.2106585, 3.8456999999999995, 0.0054015000000000044, 0.0054015000000000053, - 3.8456999999999995, 0.2106585, 0.0054015000000000053, 3.8456999999999995, 0.2106585, 0.039611, 3.8456999999999995, 0.2106585, 0.10803, 3.8456999999999995, - 0.2106585, 0.17644899999999999, 3.8456999999999995, 0.2106585, 0.2106585, 3.8456999999999995, 0.0054015000000000044, 0.2106585, 3.8456999999999995, - 0.0054015000000000044, 0.0054015000000000053, 4.0593499999999993, 0.2106585, 0.0054015000000000053, 4.0593499999999993, 0.2106585, 0.039611, 4.0593499999999993, - 0.2106585, 0.10803, 4.0593499999999993, 0.2106585, 0.17644899999999999, 4.0593499999999993, 0.2106585, 0.2106585, 4.0593499999999993, 0.0054015000000000044, - 0.2106585, 4.0593499999999993, 0.0054015000000000044, 0.0054015000000000053, - 4.0593499999999993, 0.2106585, 0.0054015000000000053, 4.0593499999999993, 0.2106585, 0.039611, 4.0593499999999993, 0.2106585, 0.10803, 4.0593499999999993, - 0.2106585, 0.17644899999999999, 4.0593499999999993, 0.2106585, 0.2106585, 4.0593499999999993, 0.0054015000000000044, 0.2106585, 4.0593499999999993, - 0.0054015000000000044, 0.0054015000000000053, 4.2729999999999997, 0.2106585, 0.0054015000000000053, 4.2729999999999997, 0.2106585, 0.039611, 4.2729999999999997, - 0.2106585, 0.10803, 4.2729999999999997, 0.2106585, 0.17644899999999999, 4.2729999999999997, 0.2106585, 0.2106585, 4.2729999999999997, 0.0054015000000000044, - 0.2106585, 4.2729999999999997, 0.24197569714517145, 0.025915697145171439, 0, 0.26483839536511933, 0.025915697145171439, 0, 0.26483839536511933, - 0.048778395365119298, 0, 0.24197569714517145, 0.048778395365119298, 0, 0.24197569714517145, 0.025915697145171439, 0.21364999999999998, 0.26483839536511933, - 0.025915697145171439, 0.21364999999999998, 0.26483839536511933, 0.048778395365119298, 0.21364999999999998, 0.24197569714517145, 0.048778395365119298, - 0.21364999999999998, 0.24197569714517145, 0.025915697145171439, 0.21364999999999998, 0.26483839536511933, 0.025915697145171439, 0.21364999999999998, - 0.26483839536511933, 0.048778395365119298, 0.21364999999999998, 0.24197569714517145, 0.048778395365119298, 0.21364999999999998, 0.24197569714517145, - 0.025915697145171439, 0.42729999999999996, 0.26483839536511933, 0.025915697145171439, 0.42729999999999996, 0.26483839536511933, 0.048778395365119298, - 0.42729999999999996, 0.24197569714517145, 0.048778395365119298, 0.42729999999999996, 0.24197569714517145, 0.025915697145171439, 0.42729999999999996, - 0.26483839536511933, 0.025915697145171439, 0.42729999999999996, 0.26483839536511933, 0.048778395365119298, 0.42729999999999996, 0.24197569714517145, - 0.048778395365119298, 0.42729999999999996, 0.24197569714517145, 0.025915697145171439, 0.64094999999999991, 0.26483839536511933, 0.025915697145171439, - 0.64094999999999991, 0.26483839536511933, 0.048778395365119298, 0.64094999999999991, 0.24197569714517145, 0.048778395365119298, 0.64094999999999991, - 0.24197569714517145, 0.025915697145171439, 0.64094999999999991, 0.26483839536511933, 0.025915697145171439, 0.64094999999999991, 0.26483839536511933, - 0.048778395365119298, 0.64094999999999991, 0.24197569714517145, 0.048778395365119298, 0.64094999999999991, 0.24197569714517145, 0.025915697145171439, - 0.85459999999999992, 0.26483839536511933, 0.025915697145171439, 0.85459999999999992, 0.26483839536511933, 0.048778395365119298, 0.85459999999999992, - 0.24197569714517145, 0.048778395365119298, 0.85459999999999992, 0.24197569714517145, 0.025915697145171439, 0.85459999999999992, 0.26483839536511933, - 0.025915697145171439, 0.85459999999999992, 0.26483839536511933, 0.048778395365119298, 0.85459999999999992, 0.24197569714517145, 0.048778395365119298, - 0.85459999999999992, 0.24197569714517145, 0.025915697145171439, 1.0682499999999999, 0.26483839536511933, 0.025915697145171439, 1.0682499999999999, - 0.26483839536511933, 0.048778395365119298, 1.0682499999999999, 0.24197569714517145, 0.048778395365119298, 1.0682499999999999, 0.24197569714517145, - 0.025915697145171439, 1.0682499999999999, 0.26483839536511933, 0.025915697145171439, 1.0682499999999999, 0.26483839536511933, 0.048778395365119298, - 1.0682499999999999, 0.24197569714517145, 0.048778395365119298, 1.0682499999999999, 0.24197569714517145, 0.025915697145171439, 1.2818999999999998, - 0.26483839536511933, 0.025915697145171439, 1.2818999999999998, 0.26483839536511933, 0.048778395365119298, 1.2818999999999998, 0.24197569714517145, - 0.048778395365119298, 1.2818999999999998, 0.24197569714517145, 0.025915697145171439, 1.2818999999999998, 0.26483839536511933, 0.025915697145171439, - 1.2818999999999998, 0.26483839536511933, 0.048778395365119298, 1.2818999999999998, 0.24197569714517145, 0.048778395365119298, 1.2818999999999998, - 0.24197569714517145, 0.025915697145171439, 1.4955499999999999, 0.26483839536511933,0.025915697145171439, 1.4955499999999999, 0.26483839536511933, - 0.048778395365119298, 1.4955499999999999, 0.24197569714517145, 0.048778395365119298, - 1.4955499999999999, 0.24197569714517145, 0.025915697145171439, 1.4955499999999999, 0.26483839536511933, 0.025915697145171439, 1.4955499999999999, - 0.26483839536511933, 0.048778395365119298, 1.4955499999999999, 0.24197569714517145, 0.048778395365119298, 1.4955499999999999, 0.24197569714517145, - 0.025915697145171439, 1.7091999999999998, 0.26483839536511933, 0.025915697145171439, 1.7091999999999998, 0.26483839536511933, 0.048778395365119298, - 1.7091999999999998, 0.24197569714517145, 0.048778395365119298, 1.7091999999999998, 0.24197569714517145, 0.025915697145171439, 1.7091999999999998, - 0.26483839536511933, 0.025915697145171439, 1.7091999999999998, 0.26483839536511933, 0.048778395365119298, 1.7091999999999998, 0.24197569714517145, - 0.048778395365119298, 1.7091999999999998, 0.24197569714517145, 0.025915697145171439, 1.9228499999999997, 0.26483839536511933, 0.025915697145171439, - 1.9228499999999997, 0.26483839536511933, 0.048778395365119298, 1.9228499999999997, 0.24197569714517145, 0.048778395365119298, 1.9228499999999997, - 0.24197569714517145, 0.025915697145171439, 1.9228499999999997, 0.26483839536511933, 0.025915697145171439, 1.9228499999999997, 0.26483839536511933, - 0.048778395365119298, 1.9228499999999997, 0.24197569714517145, 0.048778395365119298, 1.9228499999999997, 0.24197569714517145, 0.025915697145171439, - 2.1364999999999998, 0.26483839536511933, 0.025915697145171439, 2.1364999999999998, 0.26483839536511933, 0.048778395365119298, 2.1364999999999998, - 0.24197569714517145, 0.048778395365119298, 2.1364999999999998, 0.24197569714517145, 0.025915697145171439, 2.1364999999999998, 0.26483839536511933, - 0.025915697145171439, 2.1364999999999998, 0.26483839536511933, 0.048778395365119298, 2.1364999999999998, 0.24197569714517145, 0.048778395365119298, - 2.1364999999999998, 0.24197569714517145, 0.025915697145171439, 2.3501499999999997, 0.26483839536511933, 0.025915697145171439, 2.3501499999999997, - 0.26483839536511933, 0.048778395365119298, 2.3501499999999997, 0.24197569714517145, 0.048778395365119298, 2.3501499999999997, 0.24197569714517145, - 0.025915697145171439, 2.3501499999999997, 0.26483839536511933, 0.025915697145171439, 2.3501499999999997, 0.26483839536511933, 0.048778395365119298, - 2.3501499999999997, 0.24197569714517145, 0.048778395365119298, 2.3501499999999997, 0.24197569714517145, 0.025915697145171439, 2.5637999999999996, - 0.26483839536511933, 0.025915697145171439, 2.5637999999999996, 0.26483839536511933, 0.048778395365119298, 2.5637999999999996, 0.24197569714517145, - 0.048778395365119298, 2.5637999999999996, 0.24197569714517145, 0.025915697145171439, 2.5637999999999996, 0.26483839536511933, 0.025915697145171439, - 2.5637999999999996, 0.26483839536511933, 0.048778395365119298, 2.5637999999999996, 0.24197569714517145, 0.048778395365119298, 2.5637999999999996, - 0.24197569714517145, 0.025915697145171439, 2.7774499999999995, 0.26483839536511933, 0.025915697145171439, 2.7774499999999995, 0.26483839536511933, - 0.048778395365119298, 2.7774499999999995, 0.24197569714517145, 0.048778395365119298, 2.7774499999999995, 0.24197569714517145, 0.025915697145171439, - 2.7774499999999995, 0.26483839536511933, 0.025915697145171439, 2.7774499999999995, 0.26483839536511933, 0.048778395365119298, 2.7774499999999995, - 0.24197569714517145, 0.048778395365119298, 2.7774499999999995, 0.24197569714517145, 0.025915697145171439, 2.9910999999999999, 0.26483839536511933, - 0.025915697145171439, 2.9910999999999999, 0.26483839536511933, 0.048778395365119298, 2.9910999999999999, 0.24197569714517145, 0.048778395365119298, - 2.9910999999999999, 0.24197569714517145, 0.025915697145171439, 2.9910999999999999, 0.26483839536511933, 0.025915697145171439, 2.9910999999999999, - 0.26483839536511933, 0.048778395365119298, 2.9910999999999999, 0.24197569714517145, 0.048778395365119298, 2.9910999999999999, 0.24197569714517145, - 0.025915697145171439, 3.2047499999999998, 0.26483839536511933, 0.025915697145171439, 3.2047499999999998, 0.26483839536511933, 0.048778395365119298, - 3.2047499999999998, 0.24197569714517145, 0.048778395365119298, 3.2047499999999998, - 0.24197569714517145, 0.025915697145171439, 3.2047499999999998, 0.26483839536511933, 0.025915697145171439, 3.2047499999999998, 0.26483839536511933, - 0.048778395365119298, 3.2047499999999998, 0.24197569714517145, 0.048778395365119298, 3.2047499999999998, 0.24197569714517145, 0.025915697145171439, - 3.4183999999999997, 0.26483839536511933, 0.025915697145171439, 3.4183999999999997, 0.26483839536511933, 0.048778395365119298, 3.4183999999999997, - 0.24197569714517145, 0.048778395365119298, 3.4183999999999997, 0.24197569714517145, 0.025915697145171439, 3.4183999999999997, 0.26483839536511933, - 0.025915697145171439, 3.4183999999999997, 0.26483839536511933, 0.048778395365119298, 3.4183999999999997, 0.24197569714517145, 0.048778395365119298, - 3.4183999999999997, 0.24197569714517145, 0.025915697145171439, 3.6320499999999996, 0.26483839536511933, 0.025915697145171439, 3.6320499999999996, - 0.26483839536511933, 0.048778395365119298, 3.6320499999999996, 0.24197569714517145, 0.048778395365119298, 3.6320499999999996, 0.24197569714517145, - 0.025915697145171439, 3.6320499999999996, 0.26483839536511933, 0.025915697145171439, 3.6320499999999996, 0.26483839536511933, 0.048778395365119298, - 3.6320499999999996, 0.24197569714517145, 0.048778395365119298, 3.6320499999999996, 0.24197569714517145, 0.025915697145171439, 3.8456999999999995, - 0.26483839536511933, 0.025915697145171439, 3.8456999999999995, 0.26483839536511933, 0.048778395365119298, 3.8456999999999995, 0.24197569714517145, - 0.048778395365119298, 3.8456999999999995, 0.24197569714517145, 0.025915697145171439, 3.8456999999999995, 0.26483839536511933, 0.025915697145171439, - 3.8456999999999995, 0.26483839536511933, 0.048778395365119298, 3.8456999999999995, 0.24197569714517145, 0.048778395365119298, 3.8456999999999995, - 0.24197569714517145, 0.025915697145171439, 4.0593499999999993, 0.26483839536511933, 0.025915697145171439, 4.0593499999999993, 0.26483839536511933, - 0.048778395365119298, 4.0593499999999993, 0.24197569714517145, 0.048778395365119298, 4.0593499999999993, 0.24197569714517145, 0.025915697145171439, - 4.0593499999999993, 0.26483839536511933, 0.025915697145171439, 4.0593499999999993, 0.26483839536511933, 0.048778395365119298, 4.0593499999999993, - 0.24197569714517145, 0.048778395365119298, 4.0593499999999993, 0.24197569714517145, 0.025915697145171439, 4.2729999999999997, 0.26483839536511933, - 0.025915697145171439, 4.2729999999999997, 0.26483839536511933, 0.048778395365119298, 4.2729999999999997, 0.24197569714517145, 0.048778395365119298, - 4.2729999999999997, 0.31132160463488068, 0.029625802317440348, 0, 0.3368583953651193, 0.029625802317440348, 0, 0.3368583953651193, 0.046104302854828562, 0, - 0.31132160463488068, 0.046104302854828562, 0, 0.31132160463488068, 0.029625802317440348, 0.21364999999999998, 0.3368583953651193, 0.029625802317440348, - 0.21364999999999998, 0.3368583953651193, 0.046104302854828562, 0.21364999999999998, 0.31132160463488068, 0.046104302854828562, 0.21364999999999998, - 0.31132160463488068, 0.029625802317440348, 0.21364999999999998, 0.3368583953651193, 0.029625802317440348, 0.21364999999999998, 0.3368583953651193, - 0.046104302854828562, 0.21364999999999998, 0.31132160463488068, 0.046104302854828562, 0.21364999999999998, 0.31132160463488068, 0.029625802317440348, - 0.42729999999999996, 0.3368583953651193, 0.029625802317440348, 0.42729999999999996, 0.3368583953651193, 0.046104302854828562, 0.42729999999999996, - 0.31132160463488068, 0.046104302854828562, 0.42729999999999996, 0.31132160463488068, 0.029625802317440348, 0.42729999999999996, 0.3368583953651193, - 0.029625802317440348, 0.42729999999999996, 0.3368583953651193, 0.046104302854828562, 0.42729999999999996, 0.31132160463488068, 0.046104302854828562, - 0.42729999999999996, 0.31132160463488068, 0.029625802317440348, 0.64094999999999991, 0.3368583953651193, 0.029625802317440348, 0.64094999999999991, - 0.3368583953651193, 0.046104302854828562, 0.64094999999999991, 0.31132160463488068, 0.046104302854828562, 0.64094999999999991, 0.31132160463488068, - 0.029625802317440348, 0.64094999999999991, 0.3368583953651193, 0.029625802317440348, 0.64094999999999991, 0.3368583953651193, 0.046104302854828562, - 0.64094999999999991, 0.31132160463488068, 0.046104302854828562, 0.64094999999999991, 0.31132160463488068, 0.029625802317440348, 0.85459999999999992, - 0.3368583953651193, 0.029625802317440348, 0.85459999999999992, 0.3368583953651193, 0.046104302854828562, 0.85459999999999992, 0.31132160463488068, - 0.046104302854828562, 0.85459999999999992, 0.31132160463488068, 0.029625802317440348, 0.85459999999999992, 0.3368583953651193, 0.029625802317440348, - 0.85459999999999992, 0.3368583953651193, 0.046104302854828562, 0.85459999999999992, 0.31132160463488068, 0.046104302854828562, 0.85459999999999992, - 0.31132160463488068, 0.029625802317440348, 1.0682499999999999, 0.3368583953651193, 0.029625802317440348, 1.0682499999999999, 0.3368583953651193, - 0.046104302854828562, 1.0682499999999999, 0.31132160463488068, 0.046104302854828562, 1.0682499999999999, 0.31132160463488068, 0.029625802317440348, - 1.0682499999999999, 0.3368583953651193, 0.029625802317440348, 1.0682499999999999, 0.3368583953651193, 0.046104302854828562, 1.0682499999999999, - 0.31132160463488068, 0.046104302854828562, 1.0682499999999999, 0.31132160463488068, 0.029625802317440348, 1.2818999999999998, 0.3368583953651193, - 0.029625802317440348, 1.2818999999999998, 0.3368583953651193, 0.046104302854828562, 1.2818999999999998, 0.31132160463488068, 0.046104302854828562, - 1.2818999999999998, 0.31132160463488068, 0.029625802317440348, 1.2818999999999998, 0.3368583953651193, 0.029625802317440348, 1.2818999999999998, - 0.3368583953651193, 0.046104302854828562, 1.2818999999999998, 0.31132160463488068, 0.046104302854828562, 1.2818999999999998, 0.31132160463488068, - 0.029625802317440348, 1.4955499999999999, 0.3368583953651193, 0.029625802317440348, 1.4955499999999999, 0.3368583953651193, 0.046104302854828562, - 1.4955499999999999, 0.31132160463488068, 0.046104302854828562, 1.4955499999999999, 0.31132160463488068, 0.029625802317440348, 1.4955499999999999, - 0.3368583953651193, 0.029625802317440348, 1.4955499999999999, 0.3368583953651193, 0.046104302854828562, 1.4955499999999999, 0.31132160463488068, - 0.046104302854828562, 1.4955499999999999, 0.31132160463488068, 0.029625802317440348, 1.7091999999999998, 0.3368583953651193, 0.029625802317440348, - 1.7091999999999998, 0.3368583953651193, 0.046104302854828562, 1.7091999999999998, 0.31132160463488068, 0.046104302854828562, 1.7091999999999998, - 0.31132160463488068, 0.029625802317440348, 1.7091999999999998, 0.3368583953651193, 0.029625802317440348, 1.7091999999999998, 0.3368583953651193, - 0.046104302854828562, 1.7091999999999998, 0.31132160463488068, 0.046104302854828562, 1.7091999999999998, 0.31132160463488068, 0.029625802317440348, - 1.9228499999999997, 0.3368583953651193, 0.029625802317440348, 1.9228499999999997, 0.3368583953651193, 0.046104302854828562, 1.9228499999999997, - 0.31132160463488068, 0.046104302854828562, 1.9228499999999997, 0.31132160463488068, 0.029625802317440348, 1.9228499999999997, 0.3368583953651193, - 0.029625802317440348, 1.9228499999999997, 0.3368583953651193, 0.046104302854828562, 1.9228499999999997, 0.31132160463488068, 0.046104302854828562, - 1.9228499999999997, 0.31132160463488068, 0.029625802317440348, 2.1364999999999998, 0.3368583953651193, 0.029625802317440348, 2.1364999999999998, - 0.3368583953651193, 0.046104302854828562, 2.1364999999999998, 0.31132160463488068, 0.046104302854828562, 2.1364999999999998, 0.31132160463488068, - 0.029625802317440348, 2.1364999999999998, 0.3368583953651193, 0.029625802317440348, 2.1364999999999998, 0.3368583953651193, 0.046104302854828562, - 2.1364999999999998, 0.31132160463488068, 0.046104302854828562, 2.1364999999999998, 0.31132160463488068, 0.029625802317440348, 2.3501499999999997, - 0.3368583953651193, 0.029625802317440348, 2.3501499999999997, 0.3368583953651193, 0.046104302854828562, 2.3501499999999997, 0.31132160463488068, - 0.046104302854828562, 2.3501499999999997, 0.31132160463488068, 0.029625802317440348, 2.3501499999999997, 0.3368583953651193, 0.029625802317440348, - 2.3501499999999997, 0.3368583953651193, 0.046104302854828562, 2.3501499999999997, 0.31132160463488068, 0.046104302854828562, 2.3501499999999997, - 0.31132160463488068, 0.029625802317440348, 2.5637999999999996, 0.3368583953651193, - 0.029625802317440348, 2.5637999999999996, 0.3368583953651193, 0.046104302854828562, 2.5637999999999996, 0.31132160463488068, 0.046104302854828562, - 2.5637999999999996, 0.31132160463488068, 0.029625802317440348, 2.5637999999999996, 0.3368583953651193, 0.029625802317440348, 2.5637999999999996, - 0.3368583953651193, 0.046104302854828562, 2.5637999999999996, 0.31132160463488068, 0.046104302854828562, 2.5637999999999996, 0.31132160463488068, - 0.029625802317440348, 2.7774499999999995, 0.3368583953651193, 0.029625802317440348, 2.7774499999999995, 0.3368583953651193, 0.046104302854828562, - 2.7774499999999995, 0.31132160463488068, 0.046104302854828562, 2.7774499999999995, 0.31132160463488068, 0.029625802317440348, 2.7774499999999995, - 0.3368583953651193, 0.029625802317440348, 2.7774499999999995, 0.3368583953651193, 0.046104302854828562, 2.7774499999999995, 0.31132160463488068, - 0.046104302854828562, 2.7774499999999995, 0.31132160463488068, 0.029625802317440348, 2.9910999999999999, 0.3368583953651193, 0.029625802317440348, - 2.9910999999999999, 0.3368583953651193, 0.046104302854828562, 2.9910999999999999, 0.31132160463488068, 0.046104302854828562, 2.9910999999999999, - 0.31132160463488068, 0.029625802317440348, 2.9910999999999999, 0.3368583953651193, 0.029625802317440348, 2.9910999999999999, 0.3368583953651193, - 0.046104302854828562, 2.9910999999999999, 0.31132160463488068, 0.046104302854828562, 2.9910999999999999, 0.31132160463488068, 0.029625802317440348, - 3.2047499999999998, 0.3368583953651193, 0.029625802317440348, 3.2047499999999998, 0.3368583953651193, 0.046104302854828562, 3.2047499999999998, - 0.31132160463488068, 0.046104302854828562, 3.2047499999999998, 0.31132160463488068, 0.029625802317440348, 3.2047499999999998, 0.3368583953651193, - 0.029625802317440348, 3.2047499999999998, 0.3368583953651193, 0.046104302854828562, 3.2047499999999998, 0.31132160463488068, 0.046104302854828562, - 3.2047499999999998, 0.31132160463488068, 0.029625802317440348, 3.4183999999999997, 0.3368583953651193, 0.029625802317440348, 3.4183999999999997, - 0.3368583953651193, 0.046104302854828562, 3.4183999999999997, 0.31132160463488068, 0.046104302854828562, 3.4183999999999997, 0.31132160463488068, - 0.029625802317440348, 3.4183999999999997, 0.3368583953651193, 0.029625802317440348, 3.4183999999999997, 0.3368583953651193, 0.046104302854828562, - 3.4183999999999997, 0.31132160463488068, 0.046104302854828562, 3.4183999999999997, 0.31132160463488068, 0.029625802317440348, 3.6320499999999996, - 0.3368583953651193, 0.029625802317440348, 3.6320499999999996, 0.3368583953651193, 0.046104302854828562, 3.6320499999999996, 0.31132160463488068, - 0.046104302854828562, 3.6320499999999996, 0.31132160463488068, 0.029625802317440348, 3.6320499999999996, 0.3368583953651193, 0.029625802317440348, - 3.6320499999999996, 0.3368583953651193, 0.046104302854828562, 3.6320499999999996, 0.31132160463488068, 0.046104302854828562, 3.6320499999999996, - 0.31132160463488068, 0.029625802317440348, 3.8456999999999995, 0.3368583953651193, 0.029625802317440348, 3.8456999999999995, 0.3368583953651193, - 0.046104302854828562, 3.8456999999999995, 0.31132160463488068, 0.046104302854828562, 3.8456999999999995, 0.31132160463488068, 0.029625802317440348, - 3.8456999999999995, 0.3368583953651193, 0.029625802317440348, 3.8456999999999995, 0.3368583953651193, 0.046104302854828562, 3.8456999999999995, - 0.31132160463488068, 0.046104302854828562, 3.8456999999999995, 0.31132160463488068, 0.029625802317440348, 4.0593499999999993, 0.3368583953651193, - 0.029625802317440348, 4.0593499999999993, 0.3368583953651193, 0.046104302854828562, 4.0593499999999993, 0.31132160463488068, 0.046104302854828562, - 4.0593499999999993, 0.31132160463488068, 0.029625802317440348, 4.0593499999999993, 0.3368583953651193, 0.029625802317440348, 4.0593499999999993, - 0.3368583953651193, 0.046104302854828562, 4.0593499999999993, 0.31132160463488068, 0.046104302854828562, 4.0593499999999993, 0.31132160463488068, - 0.029625802317440348, 4.2729999999999997, 0.3368583953651193, 0.029625802317440348, 4.2729999999999997, 0.3368583953651193, 0.046104302854828562, - 4.2729999999999997, 0.31132160463488068, 0.046104302854828562, 4.2729999999999997, - 0.38334160463488065, 0.025915697145171453, 0, 0.40620430285482856, 0.025915697145171453, 0, 0.40620430285482856, 0.048778395365119291, 0, - 0.38334160463488065, 0.048778395365119291, 0, 0.38334160463488065, 0.025915697145171453, 0.21364999999999998, 0.40620430285482856, 0.025915697145171453, - 0.21364999999999998, 0.40620430285482856, 0.048778395365119291, 0.21364999999999998, 0.38334160463488065, 0.048778395365119291, 0.21364999999999998, - 0.38334160463488065, 0.025915697145171453, 0.21364999999999998, 0.40620430285482856, 0.025915697145171453, 0.21364999999999998, 0.40620430285482856, - 0.048778395365119291, 0.21364999999999998, 0.38334160463488065, 0.048778395365119291, 0.21364999999999998, 0.38334160463488065, 0.025915697145171453, - 0.42729999999999996, 0.40620430285482856, 0.025915697145171453, 0.42729999999999996, 0.40620430285482856, 0.048778395365119291, 0.42729999999999996, - 0.38334160463488065, 0.048778395365119291, 0.42729999999999996, 0.38334160463488065, 0.025915697145171453, 0.42729999999999996, 0.40620430285482856, - 0.025915697145171453, 0.42729999999999996, 0.40620430285482856, 0.048778395365119291, 0.42729999999999996, 0.38334160463488065, 0.048778395365119291, - 0.42729999999999996, 0.38334160463488065, 0.025915697145171453, 0.64094999999999991, 0.40620430285482856, 0.025915697145171453, 0.64094999999999991, - 0.40620430285482856, 0.048778395365119291, 0.64094999999999991, 0.38334160463488065, 0.048778395365119291, 0.64094999999999991, 0.38334160463488065, - 0.025915697145171453, 0.64094999999999991, 0.40620430285482856, 0.025915697145171453, 0.64094999999999991, 0.40620430285482856, 0.048778395365119291, - 0.64094999999999991, 0.38334160463488065, 0.048778395365119291, 0.64094999999999991, 0.38334160463488065, 0.025915697145171453, 0.85459999999999992, - 0.40620430285482856, 0.025915697145171453, 0.85459999999999992, 0.40620430285482856, 0.048778395365119291, 0.85459999999999992, 0.38334160463488065, - 0.048778395365119291, 0.85459999999999992, 0.38334160463488065, 0.025915697145171453, 0.85459999999999992, 0.40620430285482856, 0.025915697145171453, - 0.85459999999999992, 0.40620430285482856, 0.048778395365119291, 0.85459999999999992, 0.38334160463488065, 0.048778395365119291, 0.85459999999999992, - 0.38334160463488065, 0.025915697145171453, 1.0682499999999999, 0.40620430285482856, 0.025915697145171453, 1.0682499999999999, 0.40620430285482856, - 0.048778395365119291, 1.0682499999999999, 0.38334160463488065, 0.048778395365119291, 1.0682499999999999, 0.38334160463488065, 0.025915697145171453, - 1.0682499999999999, 0.40620430285482856, 0.025915697145171453, 1.0682499999999999, 0.40620430285482856, 0.048778395365119291, 1.0682499999999999, - 0.38334160463488065, 0.048778395365119291, 1.0682499999999999, 0.38334160463488065, 0.025915697145171453, 1.2818999999999998, 0.40620430285482856, - 0.025915697145171453, 1.2818999999999998, 0.40620430285482856, 0.048778395365119291, 1.2818999999999998, 0.38334160463488065, 0.048778395365119291, - 1.2818999999999998, 0.38334160463488065, 0.025915697145171453, 1.2818999999999998, 0.40620430285482856, 0.025915697145171453, 1.2818999999999998, - 0.40620430285482856, 0.048778395365119291, 1.2818999999999998, 0.38334160463488065, 0.048778395365119291, 1.2818999999999998, 0.38334160463488065, - 0.025915697145171453, 1.4955499999999999, 0.40620430285482856, 0.025915697145171453, 1.4955499999999999, 0.40620430285482856, 0.048778395365119291, - 1.4955499999999999, 0.38334160463488065, 0.048778395365119291, 1.4955499999999999, 0.38334160463488065, 0.025915697145171453, 1.4955499999999999, - 0.40620430285482856, 0.025915697145171453, 1.4955499999999999, 0.40620430285482856, 0.048778395365119291, 1.4955499999999999, 0.38334160463488065, - 0.048778395365119291, 1.4955499999999999, 0.38334160463488065, 0.025915697145171453, 1.7091999999999998, 0.40620430285482856, 0.025915697145171453, - 1.7091999999999998, 0.40620430285482856, 0.048778395365119291, 1.7091999999999998, 0.38334160463488065, 0.048778395365119291, 1.7091999999999998, - 0.38334160463488065, 0.025915697145171453, 1.7091999999999998, 0.40620430285482856, 0.025915697145171453, 1.7091999999999998, 0.40620430285482856, - 0.048778395365119291, - 1.7091999999999998, 0.38334160463488065, 0.048778395365119291, 1.7091999999999998, 0.38334160463488065, 0.025915697145171453, 1.9228499999999997, - 0.40620430285482856, 0.025915697145171453, 1.9228499999999997, 0.40620430285482856, 0.048778395365119291, 1.9228499999999997, 0.38334160463488065, - 0.048778395365119291, 1.9228499999999997, 0.38334160463488065, 0.025915697145171453, 1.9228499999999997, 0.40620430285482856, 0.025915697145171453, - 1.9228499999999997, 0.40620430285482856, 0.048778395365119291, 1.9228499999999997, 0.38334160463488065, 0.048778395365119291, 1.9228499999999997, - 0.38334160463488065, 0.025915697145171453, 2.1364999999999998, 0.40620430285482856, 0.025915697145171453, 2.1364999999999998, 0.40620430285482856, - 0.048778395365119291, 2.1364999999999998, 0.38334160463488065, 0.048778395365119291, 2.1364999999999998, 0.38334160463488065, 0.025915697145171453, - 2.1364999999999998, 0.40620430285482856, 0.025915697145171453, 2.1364999999999998, 0.40620430285482856, 0.048778395365119291, 2.1364999999999998, - 0.38334160463488065, 0.048778395365119291, 2.1364999999999998, 0.38334160463488065, 0.025915697145171453, 2.3501499999999997, 0.40620430285482856, - 0.025915697145171453, 2.3501499999999997, 0.40620430285482856, 0.048778395365119291, 2.3501499999999997, 0.38334160463488065, 0.048778395365119291, - 2.3501499999999997, 0.38334160463488065, 0.025915697145171453, 2.3501499999999997, 0.40620430285482856, 0.025915697145171453, 2.3501499999999997, - 0.40620430285482856, 0.048778395365119291, 2.3501499999999997, 0.38334160463488065, 0.048778395365119291, 2.3501499999999997, 0.38334160463488065, - 0.025915697145171453, 2.5637999999999996, 0.40620430285482856, 0.025915697145171453, 2.5637999999999996, 0.40620430285482856, 0.048778395365119291, - 2.5637999999999996, 0.38334160463488065, 0.048778395365119291, 2.5637999999999996, 0.38334160463488065, 0.025915697145171453, 2.5637999999999996, - 0.40620430285482856, 0.025915697145171453, 2.5637999999999996, 0.40620430285482856, 0.048778395365119291, 2.5637999999999996, 0.38334160463488065, - 0.048778395365119291, 2.5637999999999996, 0.38334160463488065, 0.025915697145171453, 2.7774499999999995, 0.40620430285482856, 0.025915697145171453, - 2.7774499999999995, 0.40620430285482856, 0.048778395365119291, 2.7774499999999995, 0.38334160463488065, 0.048778395365119291, 2.7774499999999995, - 0.38334160463488065, 0.025915697145171453, 2.7774499999999995, 0.40620430285482856, 0.025915697145171453, 2.7774499999999995, 0.40620430285482856, - 0.048778395365119291, 2.7774499999999995, 0.38334160463488065, 0.048778395365119291, 2.7774499999999995, 0.38334160463488065, 0.025915697145171453, - 2.9910999999999999, 0.40620430285482856, 0.025915697145171453, 2.9910999999999999, 0.40620430285482856, 0.048778395365119291, 2.9910999999999999, - 0.38334160463488065, 0.048778395365119291, 2.9910999999999999, 0.38334160463488065, 0.025915697145171453, 2.9910999999999999, 0.40620430285482856, - 0.025915697145171453, 2.9910999999999999, 0.40620430285482856, 0.048778395365119291, 2.9910999999999999, 0.38334160463488065, 0.048778395365119291, - 2.9910999999999999, 0.38334160463488065, 0.025915697145171453, 3.2047499999999998, 0.40620430285482856, 0.025915697145171453, 3.2047499999999998, - 0.40620430285482856, 0.048778395365119291, 3.2047499999999998, 0.38334160463488065, 0.048778395365119291, 3.2047499999999998, 0.38334160463488065, - 0.025915697145171453, 3.2047499999999998, 0.40620430285482856, 0.025915697145171453, 3.2047499999999998, 0.40620430285482856, 0.048778395365119291, - 3.2047499999999998, 0.38334160463488065, 0.048778395365119291, 3.2047499999999998, 0.38334160463488065, 0.025915697145171453, 3.4183999999999997, - 0.40620430285482856, 0.025915697145171453, 3.4183999999999997, 0.40620430285482856, 0.048778395365119291, 3.4183999999999997, 0.38334160463488065, - 0.048778395365119291, 3.4183999999999997, 0.38334160463488065, 0.025915697145171453, 3.4183999999999997, 0.40620430285482856, 0.025915697145171453, - 3.4183999999999997, 0.40620430285482856, 0.048778395365119291, 3.4183999999999997, 0.38334160463488065, 0.048778395365119291, 3.4183999999999997, - 0.38334160463488065, 0.025915697145171453, 3.6320499999999996, 0.40620430285482856, - 0.025915697145171453, 3.6320499999999996, 0.40620430285482856, 0.048778395365119291, 3.6320499999999996, 0.38334160463488065, 0.048778395365119291, - 3.6320499999999996, 0.38334160463488065, 0.025915697145171453, 3.6320499999999996, 0.40620430285482856, 0.025915697145171453, 3.6320499999999996, - 0.40620430285482856, 0.048778395365119291, 3.6320499999999996, 0.38334160463488065, 0.048778395365119291, 3.6320499999999996, 0.38334160463488065, - 0.025915697145171453, 3.8456999999999995, 0.40620430285482856, 0.025915697145171453, 3.8456999999999995, 0.40620430285482856, 0.048778395365119291, - 3.8456999999999995, 0.38334160463488065, 0.048778395365119291, 3.8456999999999995, 0.38334160463488065, 0.025915697145171453, 3.8456999999999995, - 0.40620430285482856, 0.025915697145171453, 3.8456999999999995, 0.40620430285482856, 0.048778395365119291, 3.8456999999999995, 0.38334160463488065, - 0.048778395365119291, 3.8456999999999995, 0.38334160463488065, 0.025915697145171453, 4.0593499999999993, 0.40620430285482856, 0.025915697145171453, - 4.0593499999999993, 0.40620430285482856, 0.048778395365119291, 4.0593499999999993, 0.38334160463488065, 0.048778395365119291, 4.0593499999999993, - 0.38334160463488065, 0.025915697145171453, 4.0593499999999993, 0.40620430285482856, 0.025915697145171453, 4.0593499999999993, 0.40620430285482856, - 0.048778395365119291, 4.0593499999999993, 0.38334160463488065, 0.048778395365119291, 4.0593499999999993, 0.38334160463488065, 0.025915697145171453, - 4.2729999999999997, 0.40620430285482856, 0.025915697145171453, 4.2729999999999997, 0.40620430285482856, 0.048778395365119291, 4.2729999999999997, - 0.38334160463488065, 0.048778395365119291, 4.2729999999999997, 0.24568580231744036, 0.095261604634880703, 0, 0.26216430285482856, 0.095261604634880703, 0, - 0.26216430285482856, 0.1207983953651193, 0, 0.24568580231744036, 0.1207983953651193, 0, 0.24568580231744036, 0.095261604634880703, 0.21364999999999998, - 0.26216430285482856, 0.095261604634880703, 0.21364999999999998, 0.26216430285482856, 0.1207983953651193, 0.21364999999999998, 0.24568580231744036, - 0.1207983953651193, 0.21364999999999998, 0.24568580231744036, 0.095261604634880703, 0.21364999999999998, 0.26216430285482856, 0.095261604634880703, - 0.21364999999999998, 0.26216430285482856, 0.1207983953651193, 0.21364999999999998, 0.24568580231744036, 0.1207983953651193, 0.21364999999999998, - 0.24568580231744036, 0.095261604634880703, 0.42729999999999996, 0.26216430285482856, 0.095261604634880703, 0.42729999999999996, 0.26216430285482856, - 0.1207983953651193, 0.42729999999999996, 0.24568580231744036, 0.1207983953651193, 0.42729999999999996, 0.24568580231744036, 0.095261604634880703, - 0.42729999999999996, 0.26216430285482856, 0.095261604634880703, 0.42729999999999996, 0.26216430285482856, 0.1207983953651193, 0.42729999999999996, - 0.24568580231744036, 0.1207983953651193, 0.42729999999999996, 0.24568580231744036, 0.095261604634880703, 0.64094999999999991, 0.26216430285482856, - 0.095261604634880703, 0.64094999999999991, 0.26216430285482856, 0.1207983953651193, 0.64094999999999991, 0.24568580231744036, 0.1207983953651193, - 0.64094999999999991, 0.24568580231744036, 0.095261604634880703, 0.64094999999999991, 0.26216430285482856, 0.095261604634880703, 0.64094999999999991, - 0.26216430285482856, 0.1207983953651193, 0.64094999999999991, 0.24568580231744036, 0.1207983953651193, 0.64094999999999991, 0.24568580231744036, - 0.095261604634880703, 0.85459999999999992, 0.26216430285482856, 0.095261604634880703, 0.85459999999999992, 0.26216430285482856, 0.1207983953651193, - 0.85459999999999992, 0.24568580231744036, 0.1207983953651193, 0.85459999999999992, 0.24568580231744036, 0.095261604634880703, 0.85459999999999992, - 0.26216430285482856, 0.095261604634880703, 0.85459999999999992, 0.26216430285482856, 0.1207983953651193, 0.85459999999999992, 0.24568580231744036, - 0.1207983953651193, 0.85459999999999992, 0.24568580231744036, 0.095261604634880703, 1.0682499999999999, 0.26216430285482856, 0.095261604634880703, - 1.0682499999999999, 0.26216430285482856, 0.1207983953651193, 1.0682499999999999, 0.24568580231744036, 0.1207983953651193, 1.0682499999999999, - 0.24568580231744036, 0.095261604634880703, 1.0682499999999999, 0.26216430285482856, 0.095261604634880703, 1.0682499999999999, 0.26216430285482856, - 0.1207983953651193, 1.0682499999999999, 0.24568580231744036, 0.1207983953651193, 1.0682499999999999, 0.24568580231744036, 0.095261604634880703, - 1.2818999999999998, 0.26216430285482856, 0.095261604634880703, 1.2818999999999998, 0.26216430285482856, 0.1207983953651193, 1.2818999999999998, - 0.24568580231744036, 0.1207983953651193, 1.2818999999999998, 0.24568580231744036, 0.095261604634880703, 1.2818999999999998, 0.26216430285482856, - 0.095261604634880703, 1.2818999999999998, 0.26216430285482856, 0.1207983953651193, 1.2818999999999998, 0.24568580231744036, 0.1207983953651193, - 1.2818999999999998, 0.24568580231744036, 0.095261604634880703, 1.4955499999999999, 0.26216430285482856, 0.095261604634880703, 1.4955499999999999, - 0.26216430285482856, 0.1207983953651193, 1.4955499999999999, 0.24568580231744036, 0.1207983953651193, 1.4955499999999999, 0.24568580231744036, - 0.095261604634880703, 1.4955499999999999, 0.26216430285482856, 0.095261604634880703, 1.4955499999999999, 0.26216430285482856, 0.1207983953651193, - 1.4955499999999999, 0.24568580231744036, 0.1207983953651193, 1.4955499999999999, 0.24568580231744036, 0.095261604634880703, 1.7091999999999998, - 0.26216430285482856, 0.095261604634880703, 1.7091999999999998, 0.26216430285482856, 0.1207983953651193, 1.7091999999999998, 0.24568580231744036, - 0.1207983953651193, 1.7091999999999998, 0.24568580231744036, 0.095261604634880703, 1.7091999999999998, 0.26216430285482856, 0.095261604634880703, - 1.7091999999999998, 0.26216430285482856, 0.1207983953651193, 1.7091999999999998, 0.24568580231744036, 0.1207983953651193, 1.7091999999999998, - 0.24568580231744036, 0.095261604634880703, 1.9228499999999997, 0.26216430285482856, 0.095261604634880703, 1.9228499999999997, 0.26216430285482856, - 0.1207983953651193, 1.9228499999999997, 0.24568580231744036, 0.1207983953651193, 1.9228499999999997, 0.24568580231744036, 0.095261604634880703, - 1.9228499999999997, 0.26216430285482856, 0.095261604634880703, 1.9228499999999997, 0.26216430285482856, 0.1207983953651193, 1.9228499999999997, - 0.24568580231744036, 0.1207983953651193, 1.9228499999999997, 0.24568580231744036, 0.095261604634880703, 2.1364999999999998, 0.26216430285482856, - 0.095261604634880703, 2.1364999999999998, 0.26216430285482856, 0.1207983953651193, 2.1364999999999998, 0.24568580231744036, 0.1207983953651193, - 2.1364999999999998, 0.24568580231744036, 0.095261604634880703, 2.1364999999999998, 0.26216430285482856, 0.095261604634880703, 2.1364999999999998, - 0.26216430285482856, 0.1207983953651193, 2.1364999999999998, 0.24568580231744036, 0.1207983953651193, 2.1364999999999998, 0.24568580231744036, - 0.095261604634880703, 2.3501499999999997, 0.26216430285482856, 0.095261604634880703, 2.3501499999999997, 0.26216430285482856, 0.1207983953651193, - 2.3501499999999997, 0.24568580231744036, 0.1207983953651193, 2.3501499999999997, 0.24568580231744036, 0.095261604634880703, 2.3501499999999997, - 0.26216430285482856, 0.095261604634880703, 2.3501499999999997, 0.26216430285482856, 0.1207983953651193, 2.3501499999999997, 0.24568580231744036, - 0.1207983953651193, 2.3501499999999997, 0.24568580231744036, 0.095261604634880703, 2.5637999999999996, 0.26216430285482856, 0.095261604634880703, - 2.5637999999999996, 0.26216430285482856, 0.1207983953651193, 2.5637999999999996, 0.24568580231744036, 0.1207983953651193, 2.5637999999999996, - 0.24568580231744036, 0.095261604634880703, 2.5637999999999996, 0.26216430285482856, 0.095261604634880703, 2.5637999999999996, 0.26216430285482856, - 0.1207983953651193, 2.5637999999999996, 0.24568580231744036, 0.1207983953651193, 2.5637999999999996, 0.24568580231744036, 0.095261604634880703, - 2.7774499999999995, 0.26216430285482856, 0.095261604634880703, 2.7774499999999995, 0.26216430285482856, 0.1207983953651193, 2.7774499999999995, - 0.24568580231744036, 0.1207983953651193, 2.7774499999999995, 0.24568580231744036, 0.095261604634880703, 2.7774499999999995, 0.26216430285482856, - 0.095261604634880703, 2.7774499999999995, 0.26216430285482856, 0.1207983953651193, - 2.7774499999999995, 0.24568580231744036, 0.1207983953651193, 2.7774499999999995, 0.24568580231744036, 0.095261604634880703, 2.9910999999999999, - 0.26216430285482856, 0.095261604634880703, 2.9910999999999999, 0.26216430285482856, 0.1207983953651193, 2.9910999999999999, 0.24568580231744036, - 0.1207983953651193, 2.9910999999999999, 0.24568580231744036, 0.095261604634880703, 2.9910999999999999, 0.26216430285482856, 0.095261604634880703, - 2.9910999999999999, 0.26216430285482856, 0.1207983953651193, 2.9910999999999999, 0.24568580231744036, 0.1207983953651193, 2.9910999999999999, - 0.24568580231744036, 0.095261604634880703, 3.2047499999999998, 0.26216430285482856, 0.095261604634880703, 3.2047499999999998, 0.26216430285482856, - 0.1207983953651193, 3.2047499999999998, 0.24568580231744036, 0.1207983953651193, 3.2047499999999998, 0.24568580231744036, 0.095261604634880703, - 3.2047499999999998, 0.26216430285482856, 0.095261604634880703, 3.2047499999999998, 0.26216430285482856, 0.1207983953651193, 3.2047499999999998, - 0.24568580231744036, 0.1207983953651193, 3.2047499999999998, 0.24568580231744036, 0.095261604634880703, 3.4183999999999997, 0.26216430285482856, - 0.095261604634880703, 3.4183999999999997, 0.26216430285482856, 0.1207983953651193, 3.4183999999999997, 0.24568580231744036, 0.1207983953651193, - 3.4183999999999997, 0.24568580231744036, 0.095261604634880703, 3.4183999999999997, 0.26216430285482856, 0.095261604634880703, 3.4183999999999997, - 0.26216430285482856, 0.1207983953651193, 3.4183999999999997, 0.24568580231744036, 0.1207983953651193, 3.4183999999999997, 0.24568580231744036, - 0.095261604634880703, 3.6320499999999996, 0.26216430285482856, 0.095261604634880703, 3.6320499999999996, 0.26216430285482856, 0.1207983953651193, - 3.6320499999999996, 0.24568580231744036, 0.1207983953651193, 3.6320499999999996, 0.24568580231744036, 0.095261604634880703, 3.6320499999999996, - 0.26216430285482856, 0.095261604634880703, 3.6320499999999996, 0.26216430285482856, 0.1207983953651193, 3.6320499999999996, 0.24568580231744036, - 0.1207983953651193, 3.6320499999999996, 0.24568580231744036, 0.095261604634880703, 3.8456999999999995, 0.26216430285482856, 0.095261604634880703, - 3.8456999999999995, 0.26216430285482856, 0.1207983953651193, 3.8456999999999995, 0.24568580231744036, 0.1207983953651193, 3.8456999999999995, - 0.24568580231744036, 0.095261604634880703, 3.8456999999999995, 0.26216430285482856, 0.095261604634880703, 3.8456999999999995, 0.26216430285482856, - 0.1207983953651193, 3.8456999999999995, 0.24568580231744036, 0.1207983953651193, 3.8456999999999995, 0.24568580231744036, 0.095261604634880703, - 4.0593499999999993, 0.26216430285482856, 0.095261604634880703, 4.0593499999999993, 0.26216430285482856, 0.1207983953651193, 4.0593499999999993, - 0.24568580231744036, 0.1207983953651193, 4.0593499999999993, 0.24568580231744036, 0.095261604634880703, 4.0593499999999993, 0.26216430285482856, - 0.095261604634880703, 4.0593499999999993, 0.26216430285482856, 0.1207983953651193, 4.0593499999999993, 0.24568580231744036, 0.1207983953651193, - 4.0593499999999993, 0.24568580231744036, 0.095261604634880703, 4.2729999999999997, 0.26216430285482856, 0.095261604634880703, 4.2729999999999997, - 0.26216430285482856, 0.1207983953651193, 4.2729999999999997, 0.24568580231744036, 0.1207983953651193, 4.2729999999999997, 0.31399569714517145, - 0.097935697145171446, 0, 0.33418430285482853, 0.097935697145171446, 0, 0.33418430285482853, 0.11812430285482856, 0, 0.31399569714517145, 0.11812430285482856, 0, - 0.31399569714517145, 0.097935697145171446, 0.21364999999999998, 0.33418430285482853, 0.097935697145171446, 0.21364999999999998, 0.33418430285482853, - 0.11812430285482856, 0.21364999999999998, 0.31399569714517145, 0.11812430285482856, 0.21364999999999998, 0.31399569714517145, 0.097935697145171446, - 0.21364999999999998, 0.33418430285482853, 0.097935697145171446, 0.21364999999999998, 0.33418430285482853, 0.11812430285482856, 0.21364999999999998, - 0.31399569714517145, 0.11812430285482856, 0.21364999999999998, 0.31399569714517145, 0.097935697145171446, 0.42729999999999996, 0.33418430285482853, - 0.097935697145171446, 0.42729999999999996, 0.33418430285482853, 0.11812430285482856, 0.42729999999999996, 0.31399569714517145, 0.11812430285482856, - 0.42729999999999996, 0.31399569714517145, 0.097935697145171446, 0.42729999999999996, 0.33418430285482853, 0.097935697145171446, 0.42729999999999996, - 0.33418430285482853, 0.11812430285482856, 0.42729999999999996, 0.31399569714517145, 0.11812430285482856, 0.42729999999999996, 0.31399569714517145, - 0.097935697145171446, 0.64094999999999991, 0.33418430285482853, 0.097935697145171446, 0.64094999999999991, 0.33418430285482853, 0.11812430285482856, - 0.64094999999999991, 0.31399569714517145, 0.11812430285482856, 0.64094999999999991, 0.31399569714517145, 0.097935697145171446, 0.64094999999999991, - 0.33418430285482853, 0.097935697145171446, 0.64094999999999991, 0.33418430285482853, 0.11812430285482856, 0.64094999999999991, 0.31399569714517145, - 0.11812430285482856, 0.64094999999999991, 0.31399569714517145, 0.097935697145171446, 0.85459999999999992, 0.33418430285482853, 0.097935697145171446, - 0.85459999999999992, 0.33418430285482853, 0.11812430285482856, 0.85459999999999992, 0.31399569714517145, 0.11812430285482856, 0.85459999999999992, - 0.31399569714517145, 0.097935697145171446, 0.85459999999999992, 0.33418430285482853, 0.097935697145171446, 0.85459999999999992, 0.33418430285482853, - 0.11812430285482856, 0.85459999999999992, 0.31399569714517145, 0.11812430285482856, 0.85459999999999992, 0.31399569714517145, 0.097935697145171446, - 1.0682499999999999, 0.33418430285482853, 0.097935697145171446, 1.0682499999999999, 0.33418430285482853, 0.11812430285482856, 1.0682499999999999, - 0.31399569714517145, 0.11812430285482856, 1.0682499999999999, 0.31399569714517145, 0.097935697145171446, 1.0682499999999999, 0.33418430285482853, - 0.097935697145171446, 1.0682499999999999, 0.33418430285482853, 0.11812430285482856, 1.0682499999999999, 0.31399569714517145, 0.11812430285482856, - 1.0682499999999999, 0.31399569714517145, 0.097935697145171446, 1.2818999999999998, 0.33418430285482853, 0.097935697145171446, 1.2818999999999998, - 0.33418430285482853, 0.11812430285482856, 1.2818999999999998, 0.31399569714517145, 0.11812430285482856, 1.2818999999999998, 0.31399569714517145, - 0.097935697145171446, 1.2818999999999998, 0.33418430285482853, 0.097935697145171446, 1.2818999999999998, 0.33418430285482853, 0.11812430285482856, - 1.2818999999999998, 0.31399569714517145, 0.11812430285482856, 1.2818999999999998, 0.31399569714517145, 0.097935697145171446, 1.4955499999999999, - 0.33418430285482853, 0.097935697145171446, 1.4955499999999999, 0.33418430285482853, 0.11812430285482856, 1.4955499999999999, 0.31399569714517145, - 0.11812430285482856, 1.4955499999999999, 0.31399569714517145, 0.097935697145171446, 1.4955499999999999, 0.33418430285482853, 0.097935697145171446, - 1.4955499999999999, 0.33418430285482853, 0.11812430285482856, 1.4955499999999999, 0.31399569714517145, 0.11812430285482856, 1.4955499999999999, - 0.31399569714517145, 0.097935697145171446, 1.7091999999999998, 0.33418430285482853, 0.097935697145171446, 1.7091999999999998, 0.33418430285482853, - 0.11812430285482856, 1.7091999999999998, 0.31399569714517145, 0.11812430285482856, 1.7091999999999998, 0.31399569714517145, 0.097935697145171446, - 1.7091999999999998, 0.33418430285482853, 0.097935697145171446, 1.7091999999999998, 0.33418430285482853, 0.11812430285482856, 1.7091999999999998, - 0.31399569714517145, 0.11812430285482856, 1.7091999999999998, 0.31399569714517145, 0.097935697145171446, 1.9228499999999997, 0.33418430285482853, - 0.097935697145171446, 1.9228499999999997, 0.33418430285482853, 0.11812430285482856, 1.9228499999999997, 0.31399569714517145, 0.11812430285482856, - 1.9228499999999997, 0.31399569714517145, 0.097935697145171446, 1.9228499999999997, 0.33418430285482853, 0.097935697145171446, 1.9228499999999997, - 0.33418430285482853, 0.11812430285482856, 1.9228499999999997, 0.31399569714517145, 0.11812430285482856, 1.9228499999999997, 0.31399569714517145, - 0.097935697145171446, 2.1364999999999998, 0.33418430285482853, 0.097935697145171446, 2.1364999999999998, 0.33418430285482853, 0.11812430285482856, - 2.1364999999999998, 0.31399569714517145, 0.11812430285482856, 2.1364999999999998, - 0.31399569714517145, 0.097935697145171446, 2.1364999999999998, 0.33418430285482853, 0.097935697145171446, 2.1364999999999998, 0.33418430285482853, - 0.11812430285482856, 2.1364999999999998, 0.31399569714517145, 0.11812430285482856, 2.1364999999999998, 0.31399569714517145, 0.097935697145171446, - 2.3501499999999997, 0.33418430285482853, 0.097935697145171446, 2.3501499999999997, 0.33418430285482853, 0.11812430285482856, 2.3501499999999997, - 0.31399569714517145, 0.11812430285482856, 2.3501499999999997, 0.31399569714517145, 0.097935697145171446, 2.3501499999999997, 0.33418430285482853, - 0.097935697145171446, 2.3501499999999997, 0.33418430285482853, 0.11812430285482856, 2.3501499999999997, 0.31399569714517145, 0.11812430285482856, - 2.3501499999999997, 0.31399569714517145, 0.097935697145171446, 2.5637999999999996, 0.33418430285482853, 0.097935697145171446, 2.5637999999999996, - 0.33418430285482853, 0.11812430285482856, 2.5637999999999996, 0.31399569714517145, 0.11812430285482856, 2.5637999999999996, 0.31399569714517145, - 0.097935697145171446, 2.5637999999999996, 0.33418430285482853, 0.097935697145171446, 2.5637999999999996, 0.33418430285482853, 0.11812430285482856, - 2.5637999999999996, 0.31399569714517145, 0.11812430285482856, 2.5637999999999996, 0.31399569714517145, 0.097935697145171446, 2.7774499999999995, - 0.33418430285482853, 0.097935697145171446, 2.7774499999999995, 0.33418430285482853, 0.11812430285482856, 2.7774499999999995, 0.31399569714517145, - 0.11812430285482856, 2.7774499999999995, 0.31399569714517145, 0.097935697145171446, 2.7774499999999995, 0.33418430285482853, 0.097935697145171446, - 2.7774499999999995, 0.33418430285482853, 0.11812430285482856, 2.7774499999999995, 0.31399569714517145, 0.11812430285482856, 2.7774499999999995, - 0.31399569714517145, 0.097935697145171446, 2.9910999999999999, 0.33418430285482853, 0.097935697145171446, 2.9910999999999999, 0.33418430285482853, - 0.11812430285482856, 2.9910999999999999, 0.31399569714517145, 0.11812430285482856, 2.9910999999999999, 0.31399569714517145, 0.097935697145171446, - 2.9910999999999999, 0.33418430285482853, 0.097935697145171446, 2.9910999999999999, 0.33418430285482853, 0.11812430285482856, 2.9910999999999999, - 0.31399569714517145, 0.11812430285482856, 2.9910999999999999, 0.31399569714517145, 0.097935697145171446, 3.2047499999999998, 0.33418430285482853, - 0.097935697145171446, 3.2047499999999998, 0.33418430285482853, 0.11812430285482856, 3.2047499999999998, 0.31399569714517145, 0.11812430285482856, - 3.2047499999999998, 0.31399569714517145, 0.097935697145171446, 3.2047499999999998, 0.33418430285482853, 0.097935697145171446, 3.2047499999999998, - 0.33418430285482853, 0.11812430285482856, 3.2047499999999998, 0.31399569714517145, 0.11812430285482856, 3.2047499999999998, 0.31399569714517145, - 0.097935697145171446, 3.4183999999999997, 0.33418430285482853, 0.097935697145171446, 3.4183999999999997, 0.33418430285482853, 0.11812430285482856, - 3.4183999999999997, 0.31399569714517145, 0.11812430285482856, 3.4183999999999997, 0.31399569714517145, 0.097935697145171446, 3.4183999999999997, - 0.33418430285482853, 0.097935697145171446, 3.4183999999999997, 0.33418430285482853, 0.11812430285482856, 3.4183999999999997, 0.31399569714517145, - 0.11812430285482856, 3.4183999999999997, 0.31399569714517145, 0.097935697145171446, 3.6320499999999996, 0.33418430285482853, 0.097935697145171446, - 3.6320499999999996, 0.33418430285482853, 0.11812430285482856, 3.6320499999999996, 0.31399569714517145, 0.11812430285482856, 3.6320499999999996, - 0.31399569714517145, 0.097935697145171446, 3.6320499999999996, 0.33418430285482853, 0.097935697145171446, 3.6320499999999996, 0.33418430285482853, - 0.11812430285482856, 3.6320499999999996, 0.31399569714517145, 0.11812430285482856, 3.6320499999999996, 0.31399569714517145, 0.097935697145171446, - 3.8456999999999995, 0.33418430285482853, 0.097935697145171446, 3.8456999999999995, 0.33418430285482853, 0.11812430285482856, 3.8456999999999995, - 0.31399569714517145, 0.11812430285482856, 3.8456999999999995, 0.31399569714517145, 0.097935697145171446, 3.8456999999999995, 0.33418430285482853, - 0.097935697145171446, 3.8456999999999995, 0.33418430285482853, 0.11812430285482856, - 3.8456999999999995, 0.31399569714517145, 0.11812430285482856, 3.8456999999999995, 0.31399569714517145, 0.097935697145171446, 4.0593499999999993, - 0.33418430285482853, 0.097935697145171446, 4.0593499999999993, 0.33418430285482853, 0.11812430285482856, 4.0593499999999993, 0.31399569714517145, - 0.11812430285482856, 4.0593499999999993, 0.31399569714517145, 0.097935697145171446, 4.0593499999999993, 0.33418430285482853, 0.097935697145171446, - 4.0593499999999993, 0.33418430285482853, 0.11812430285482856, 4.0593499999999993, 0.31399569714517145, 0.11812430285482856, 4.0593499999999993, - 0.31399569714517145, 0.097935697145171446, 4.2729999999999997, 0.33418430285482853, 0.097935697145171446, 4.2729999999999997, 0.33418430285482853, - 0.11812430285482856, 4.2729999999999997, 0.31399569714517145, 0.11812430285482856, 4.2729999999999997, 0.38601569714517142, 0.095261604634880703, 0, - 0.40249419768255962, 0.095261604634880703, 0, 0.40249419768255962, 0.1207983953651193, 0, 0.38601569714517142, 0.1207983953651193, 0, 0.38601569714517142, - 0.095261604634880703, 0.21364999999999998, 0.40249419768255962, 0.095261604634880703, 0.21364999999999998, 0.40249419768255962, 0.1207983953651193, - 0.21364999999999998, 0.38601569714517142, 0.1207983953651193, 0.21364999999999998, 0.38601569714517142, 0.095261604634880703, 0.21364999999999998, - 0.40249419768255962, 0.095261604634880703, 0.21364999999999998, 0.40249419768255962, 0.1207983953651193, 0.21364999999999998, 0.38601569714517142, - 0.1207983953651193, 0.21364999999999998, 0.38601569714517142, 0.095261604634880703, 0.42729999999999996, 0.40249419768255962, 0.095261604634880703, - 0.42729999999999996, 0.40249419768255962, 0.1207983953651193, 0.42729999999999996, 0.38601569714517142, 0.1207983953651193, 0.42729999999999996, - 0.38601569714517142, 0.095261604634880703, 0.42729999999999996, 0.40249419768255962, 0.095261604634880703, 0.42729999999999996, 0.40249419768255962, - 0.1207983953651193, 0.42729999999999996, 0.38601569714517142, 0.1207983953651193, 0.42729999999999996, 0.38601569714517142, 0.095261604634880703, - 0.64094999999999991, 0.40249419768255962, 0.095261604634880703, 0.64094999999999991, 0.40249419768255962, 0.1207983953651193, 0.64094999999999991, - 0.38601569714517142, 0.1207983953651193, 0.64094999999999991, 0.38601569714517142, 0.095261604634880703, 0.64094999999999991, 0.40249419768255962, - 0.095261604634880703, 0.64094999999999991, 0.40249419768255962, 0.1207983953651193, 0.64094999999999991, 0.38601569714517142, 0.1207983953651193, - 0.64094999999999991, 0.38601569714517142, 0.095261604634880703, 0.85459999999999992, 0.40249419768255962, 0.095261604634880703, 0.85459999999999992, - 0.40249419768255962, 0.1207983953651193, 0.85459999999999992, 0.38601569714517142, 0.1207983953651193, 0.85459999999999992, 0.38601569714517142, - 0.095261604634880703, 0.85459999999999992, 0.40249419768255962, 0.095261604634880703, 0.85459999999999992, 0.40249419768255962, 0.1207983953651193, - 0.85459999999999992, 0.38601569714517142, 0.1207983953651193, 0.85459999999999992, 0.38601569714517142, 0.095261604634880703, 1.0682499999999999, - 0.40249419768255962, 0.095261604634880703, 1.0682499999999999, 0.40249419768255962, 0.1207983953651193, 1.0682499999999999, 0.38601569714517142, - 0.1207983953651193, 1.0682499999999999, 0.38601569714517142, 0.095261604634880703, 1.0682499999999999, 0.40249419768255962, 0.095261604634880703, - 1.0682499999999999, 0.40249419768255962, 0.1207983953651193, 1.0682499999999999, 0.38601569714517142, 0.1207983953651193, 1.0682499999999999, - 0.38601569714517142, 0.095261604634880703, 1.2818999999999998, 0.40249419768255962, 0.095261604634880703, 1.2818999999999998, 0.40249419768255962, - 0.1207983953651193, 1.2818999999999998, 0.38601569714517142, 0.1207983953651193, 1.2818999999999998, 0.38601569714517142, 0.095261604634880703, - 1.2818999999999998, 0.40249419768255962, 0.095261604634880703, 1.2818999999999998, 0.40249419768255962, 0.1207983953651193, 1.2818999999999998, - 0.38601569714517142, 0.1207983953651193, 1.2818999999999998, 0.38601569714517142, 0.095261604634880703, 1.4955499999999999, 0.40249419768255962, - 0.095261604634880703, 1.4955499999999999, 0.40249419768255962, 0.1207983953651193, 1.4955499999999999, 0.38601569714517142, 0.1207983953651193, - 1.4955499999999999, 0.38601569714517142, 0.095261604634880703, 1.4955499999999999, 0.40249419768255962, 0.095261604634880703, 1.4955499999999999, - 0.40249419768255962, 0.1207983953651193, 1.4955499999999999, 0.38601569714517142, 0.1207983953651193, 1.4955499999999999, 0.38601569714517142, - 0.095261604634880703, 1.7091999999999998, 0.40249419768255962, 0.095261604634880703, 1.7091999999999998, 0.40249419768255962, 0.1207983953651193, - 1.7091999999999998, 0.38601569714517142, 0.1207983953651193, 1.7091999999999998, 0.38601569714517142, 0.095261604634880703, 1.7091999999999998, - 0.40249419768255962, 0.095261604634880703, 1.7091999999999998, 0.40249419768255962, 0.1207983953651193, 1.7091999999999998, 0.38601569714517142, - 0.1207983953651193, 1.7091999999999998, 0.38601569714517142, 0.095261604634880703, 1.9228499999999997, 0.40249419768255962, 0.095261604634880703, - 1.9228499999999997, 0.40249419768255962, 0.1207983953651193, 1.9228499999999997, 0.38601569714517142, 0.1207983953651193, 1.9228499999999997, - 0.38601569714517142, 0.095261604634880703, 1.9228499999999997, 0.40249419768255962, 0.095261604634880703, 1.9228499999999997, 0.40249419768255962, - 0.1207983953651193, 1.9228499999999997, 0.38601569714517142, 0.1207983953651193, 1.9228499999999997, 0.38601569714517142, 0.095261604634880703, - 2.1364999999999998, 0.40249419768255962, 0.095261604634880703, 2.1364999999999998, 0.40249419768255962, 0.1207983953651193, 2.1364999999999998, - 0.38601569714517142, 0.1207983953651193, 2.1364999999999998, 0.38601569714517142, 0.095261604634880703, 2.1364999999999998, 0.40249419768255962, - 0.095261604634880703, 2.1364999999999998, 0.40249419768255962, 0.1207983953651193, 2.1364999999999998, 0.38601569714517142, 0.1207983953651193, - 2.1364999999999998, 0.38601569714517142, 0.095261604634880703, 2.3501499999999997, 0.40249419768255962, 0.095261604634880703, 2.3501499999999997, - 0.40249419768255962, 0.1207983953651193, 2.3501499999999997, 0.38601569714517142, 0.1207983953651193, 2.3501499999999997, 0.38601569714517142, - 0.095261604634880703, 2.3501499999999997, 0.40249419768255962, 0.095261604634880703, 2.3501499999999997, 0.40249419768255962, 0.1207983953651193, - 2.3501499999999997, 0.38601569714517142, 0.1207983953651193, 2.3501499999999997, 0.38601569714517142, 0.095261604634880703, 2.5637999999999996, - 0.40249419768255962, 0.095261604634880703, 2.5637999999999996, 0.40249419768255962, 0.1207983953651193, 2.5637999999999996, 0.38601569714517142, - 0.1207983953651193, 2.5637999999999996, 0.38601569714517142, 0.095261604634880703, 2.5637999999999996, 0.40249419768255962, 0.095261604634880703, - 2.5637999999999996, 0.40249419768255962, 0.1207983953651193, 2.5637999999999996, 0.38601569714517142, 0.1207983953651193, 2.5637999999999996, - 0.38601569714517142, 0.095261604634880703, 2.7774499999999995, 0.40249419768255962, 0.095261604634880703, 2.7774499999999995, 0.40249419768255962, - 0.1207983953651193, 2.7774499999999995, 0.38601569714517142, 0.1207983953651193, 2.7774499999999995, 0.38601569714517142, 0.095261604634880703, - 2.7774499999999995, 0.40249419768255962, 0.095261604634880703, 2.7774499999999995, 0.40249419768255962, 0.1207983953651193, 2.7774499999999995, - 0.38601569714517142, 0.1207983953651193, 2.7774499999999995, 0.38601569714517142, 0.095261604634880703, 2.9910999999999999, 0.40249419768255962, - 0.095261604634880703, 2.9910999999999999, 0.40249419768255962, 0.1207983953651193, 2.9910999999999999, 0.38601569714517142, 0.1207983953651193, - 2.9910999999999999, 0.38601569714517142, 0.095261604634880703, 2.9910999999999999, 0.40249419768255962, 0.095261604634880703, 2.9910999999999999, - 0.40249419768255962, 0.1207983953651193, 2.9910999999999999, 0.38601569714517142, 0.1207983953651193, 2.9910999999999999, 0.38601569714517142, - 0.095261604634880703, 3.2047499999999998, 0.40249419768255962, 0.095261604634880703, 3.2047499999999998, 0.40249419768255962, 0.1207983953651193, - 3.2047499999999998, 0.38601569714517142, 0.1207983953651193, 3.2047499999999998, - 0.38601569714517142, 0.095261604634880703, 3.2047499999999998, 0.40249419768255962, 0.095261604634880703, 3.2047499999999998, 0.40249419768255962, - 0.1207983953651193, 3.2047499999999998, 0.38601569714517142, 0.1207983953651193, 3.2047499999999998, 0.38601569714517142, 0.095261604634880703, - 3.4183999999999997, 0.40249419768255962, 0.095261604634880703, 3.4183999999999997, 0.40249419768255962, 0.1207983953651193, 3.4183999999999997, - 0.38601569714517142, 0.1207983953651193, 3.4183999999999997, 0.38601569714517142, 0.095261604634880703, 3.4183999999999997, 0.40249419768255962, - 0.095261604634880703, 3.4183999999999997, 0.40249419768255962, 0.1207983953651193, 3.4183999999999997, 0.38601569714517142, 0.1207983953651193, - 3.4183999999999997, 0.38601569714517142, 0.095261604634880703, 3.6320499999999996, 0.40249419768255962, 0.095261604634880703, 3.6320499999999996, - 0.40249419768255962, 0.1207983953651193, 3.6320499999999996, 0.38601569714517142, 0.1207983953651193, 3.6320499999999996, 0.38601569714517142, - 0.095261604634880703, 3.6320499999999996, 0.40249419768255962, 0.095261604634880703, 3.6320499999999996, 0.40249419768255962, 0.1207983953651193, - 3.6320499999999996, 0.38601569714517142, 0.1207983953651193, 3.6320499999999996, 0.38601569714517142, 0.095261604634880703, 3.8456999999999995, - 0.40249419768255962, 0.095261604634880703, 3.8456999999999995, 0.40249419768255962, 0.1207983953651193, 3.8456999999999995, 0.38601569714517142, - 0.1207983953651193, 3.8456999999999995, 0.38601569714517142, 0.095261604634880703, 3.8456999999999995, 0.40249419768255962, 0.095261604634880703, - 3.8456999999999995, 0.40249419768255962, 0.1207983953651193, 3.8456999999999995, 0.38601569714517142, 0.1207983953651193, 3.8456999999999995, - 0.38601569714517142, 0.095261604634880703, 4.0593499999999993, 0.40249419768255962, 0.095261604634880703, 4.0593499999999993, 0.40249419768255962, - 0.1207983953651193, 4.0593499999999993, 0.38601569714517142, 0.1207983953651193, 4.0593499999999993, 0.38601569714517142, 0.095261604634880703, - 4.0593499999999993, 0.40249419768255962, 0.095261604634880703, 4.0593499999999993, 0.40249419768255962, 0.1207983953651193, 4.0593499999999993, - 0.38601569714517142, 0.1207983953651193, 4.0593499999999993, 0.38601569714517142, 0.095261604634880703, 4.2729999999999997, 0.40249419768255962, - 0.095261604634880703, 4.2729999999999997, 0.40249419768255962, 0.1207983953651193, 4.2729999999999997, 0.38601569714517142, 0.1207983953651193, - 4.2729999999999997, 0.24197569714517148, 0.16728160463488068, 0, 0.26483839536511933, 0.16728160463488068, 0, 0.26483839536511933, 0.19014430285482856, 0, - 0.24197569714517148, 0.19014430285482856, 0, 0.24197569714517148, 0.16728160463488068, 0.21364999999999998, 0.26483839536511933, 0.16728160463488068, - 0.21364999999999998, 0.26483839536511933, 0.19014430285482856, 0.21364999999999998, 0.24197569714517148, 0.19014430285482856, 0.21364999999999998, - 0.24197569714517148, 0.16728160463488068, 0.21364999999999998, 0.26483839536511933, 0.16728160463488068, 0.21364999999999998, 0.26483839536511933, - 0.19014430285482856, 0.21364999999999998, 0.24197569714517148, 0.19014430285482856, 0.21364999999999998, 0.24197569714517148, 0.16728160463488068, - 0.42729999999999996, 0.26483839536511933, 0.16728160463488068, 0.42729999999999996, 0.26483839536511933, 0.19014430285482856, 0.42729999999999996, - 0.24197569714517148, 0.19014430285482856, 0.42729999999999996, 0.24197569714517148, 0.16728160463488068, 0.42729999999999996, 0.26483839536511933, - 0.16728160463488068, 0.42729999999999996, 0.26483839536511933, 0.19014430285482856, 0.42729999999999996, 0.24197569714517148, 0.19014430285482856, - 0.42729999999999996, 0.24197569714517148, 0.16728160463488068, 0.64094999999999991, 0.26483839536511933, 0.16728160463488068, 0.64094999999999991, - 0.26483839536511933, 0.19014430285482856, 0.64094999999999991, 0.24197569714517148, 0.19014430285482856, 0.64094999999999991, 0.24197569714517148, - 0.16728160463488068, 0.64094999999999991, 0.26483839536511933, 0.16728160463488068, 0.64094999999999991, 0.26483839536511933, 0.19014430285482856, - 0.64094999999999991, 0.24197569714517148, 0.19014430285482856, 0.64094999999999991, 0.24197569714517148, 0.16728160463488068, 0.85459999999999992, - 0.26483839536511933, 0.16728160463488068, 0.85459999999999992, 0.26483839536511933, 0.19014430285482856, 0.85459999999999992, 0.24197569714517148, - 0.19014430285482856, 0.85459999999999992, 0.24197569714517148, 0.16728160463488068, 0.85459999999999992, 0.26483839536511933, 0.16728160463488068, - 0.85459999999999992, 0.26483839536511933, 0.19014430285482856, 0.85459999999999992, 0.24197569714517148, 0.19014430285482856, 0.85459999999999992, - 0.24197569714517148, 0.16728160463488068, 1.0682499999999999, 0.26483839536511933, 0.16728160463488068, 1.0682499999999999, 0.26483839536511933, - 0.19014430285482856, 1.0682499999999999, 0.24197569714517148, 0.19014430285482856, 1.0682499999999999, 0.24197569714517148, 0.16728160463488068, - 1.0682499999999999, 0.26483839536511933, 0.16728160463488068, 1.0682499999999999, 0.26483839536511933, 0.19014430285482856, 1.0682499999999999, - 0.24197569714517148, 0.19014430285482856, 1.0682499999999999, 0.24197569714517148, 0.16728160463488068, 1.2818999999999998, 0.26483839536511933, - 0.16728160463488068, 1.2818999999999998, 0.26483839536511933, 0.19014430285482856, 1.2818999999999998, 0.24197569714517148, 0.19014430285482856, - 1.2818999999999998, 0.24197569714517148, 0.16728160463488068, 1.2818999999999998, 0.26483839536511933, 0.16728160463488068, 1.2818999999999998, - 0.26483839536511933, 0.19014430285482856, 1.2818999999999998, 0.24197569714517148, 0.19014430285482856, 1.2818999999999998, 0.24197569714517148, - 0.16728160463488068, 1.4955499999999999, 0.26483839536511933, 0.16728160463488068, 1.4955499999999999, 0.26483839536511933, 0.19014430285482856, - 1.4955499999999999, 0.24197569714517148, 0.19014430285482856, 1.4955499999999999, 0.24197569714517148, 0.16728160463488068, 1.4955499999999999, - 0.26483839536511933, 0.16728160463488068, 1.4955499999999999, 0.26483839536511933, 0.19014430285482856, 1.4955499999999999, 0.24197569714517148, - 0.19014430285482856, 1.4955499999999999, 0.24197569714517148, 0.16728160463488068, 1.7091999999999998, 0.26483839536511933, 0.16728160463488068, - 1.7091999999999998, 0.26483839536511933, 0.19014430285482856, 1.7091999999999998, 0.24197569714517148, 0.19014430285482856, 1.7091999999999998, - 0.24197569714517148, 0.16728160463488068, 1.7091999999999998, 0.26483839536511933, 0.16728160463488068, 1.7091999999999998, 0.26483839536511933, - 0.19014430285482856, 1.7091999999999998, 0.24197569714517148, 0.19014430285482856, 1.7091999999999998, 0.24197569714517148, 0.16728160463488068, - 1.9228499999999997, 0.26483839536511933, 0.16728160463488068, 1.9228499999999997, 0.26483839536511933, 0.19014430285482856, 1.9228499999999997, - 0.24197569714517148, 0.19014430285482856, 1.9228499999999997, 0.24197569714517148, 0.16728160463488068, 1.9228499999999997, 0.26483839536511933, - 0.16728160463488068, 1.9228499999999997, 0.26483839536511933, 0.19014430285482856, 1.9228499999999997, 0.24197569714517148, 0.19014430285482856, - 1.9228499999999997, 0.24197569714517148, 0.16728160463488068, 2.1364999999999998, 0.26483839536511933, 0.16728160463488068, 2.1364999999999998, - 0.26483839536511933, 0.19014430285482856, 2.1364999999999998, 0.24197569714517148, 0.19014430285482856, 2.1364999999999998, 0.24197569714517148, - 0.16728160463488068, 2.1364999999999998, 0.26483839536511933, 0.16728160463488068, 2.1364999999999998, 0.26483839536511933, 0.19014430285482856, - 2.1364999999999998, 0.24197569714517148, 0.19014430285482856, 2.1364999999999998, 0.24197569714517148, 0.16728160463488068, 2.3501499999999997, - 0.26483839536511933, 0.16728160463488068, 2.3501499999999997, 0.26483839536511933, 0.19014430285482856, 2.3501499999999997, 0.24197569714517148, - 0.19014430285482856, 2.3501499999999997, 0.24197569714517148, 0.16728160463488068, 2.3501499999999997, 0.26483839536511933, 0.16728160463488068, - 2.3501499999999997, 0.26483839536511933, 0.19014430285482856, 2.3501499999999997, 0.24197569714517148, 0.19014430285482856, 2.3501499999999997, - 0.24197569714517148, 0.16728160463488068, 2.5637999999999996, 0.26483839536511933, - 0.16728160463488068, 2.5637999999999996, 0.26483839536511933, 0.19014430285482856, 2.5637999999999996, 0.24197569714517148, 0.19014430285482856, - 2.5637999999999996, 0.24197569714517148, 0.16728160463488068, 2.5637999999999996, 0.26483839536511933, 0.16728160463488068, 2.5637999999999996, - 0.26483839536511933, 0.19014430285482856, 2.5637999999999996, 0.24197569714517148, 0.19014430285482856, 2.5637999999999996, 0.24197569714517148, - 0.16728160463488068, 2.7774499999999995, 0.26483839536511933, 0.16728160463488068, 2.7774499999999995, 0.26483839536511933, 0.19014430285482856, - 2.7774499999999995, 0.24197569714517148, 0.19014430285482856, 2.7774499999999995, 0.24197569714517148, 0.16728160463488068, 2.7774499999999995, - 0.26483839536511933, 0.16728160463488068, 2.7774499999999995, 0.26483839536511933, 0.19014430285482856, 2.7774499999999995, 0.24197569714517148, - 0.19014430285482856, 2.7774499999999995, 0.24197569714517148, 0.16728160463488068, 2.9910999999999999, 0.26483839536511933, 0.16728160463488068, - 2.9910999999999999, 0.26483839536511933, 0.19014430285482856, 2.9910999999999999, 0.24197569714517148, 0.19014430285482856, 2.9910999999999999, - 0.24197569714517148, 0.16728160463488068, 2.9910999999999999, 0.26483839536511933, 0.16728160463488068, 2.9910999999999999, 0.26483839536511933, - 0.19014430285482856, 2.9910999999999999, 0.24197569714517148, 0.19014430285482856, 2.9910999999999999, 0.24197569714517148, 0.16728160463488068, - 3.2047499999999998, 0.26483839536511933, 0.16728160463488068, 3.2047499999999998, 0.26483839536511933, 0.19014430285482856, 3.2047499999999998, - 0.24197569714517148, 0.19014430285482856, 3.2047499999999998, 0.24197569714517148, 0.16728160463488068, 3.2047499999999998, 0.26483839536511933, - 0.16728160463488068, 3.2047499999999998, 0.26483839536511933, 0.19014430285482856, 3.2047499999999998, 0.24197569714517148, 0.19014430285482856, - 3.2047499999999998, 0.24197569714517148, 0.16728160463488068, 3.4183999999999997, 0.26483839536511933, 0.16728160463488068, 3.4183999999999997, - 0.26483839536511933, 0.19014430285482856, 3.4183999999999997, 0.24197569714517148, 0.19014430285482856, 3.4183999999999997, 0.24197569714517148, - 0.16728160463488068, 3.4183999999999997, 0.26483839536511933, 0.16728160463488068, 3.4183999999999997, 0.26483839536511933, 0.19014430285482856, - 3.4183999999999997, 0.24197569714517148, 0.19014430285482856, 3.4183999999999997, 0.24197569714517148, 0.16728160463488068, 3.6320499999999996, - 0.26483839536511933, 0.16728160463488068, 3.6320499999999996, 0.26483839536511933, 0.19014430285482856, 3.6320499999999996, 0.24197569714517148, - 0.19014430285482856, 3.6320499999999996, 0.24197569714517148, 0.16728160463488068, 3.6320499999999996, 0.26483839536511933, 0.16728160463488068, - 3.6320499999999996, 0.26483839536511933, 0.19014430285482856, 3.6320499999999996, 0.24197569714517148, 0.19014430285482856, 3.6320499999999996, - 0.24197569714517148, 0.16728160463488068, 3.8456999999999995, 0.26483839536511933, 0.16728160463488068, 3.8456999999999995, 0.26483839536511933, - 0.19014430285482856, 3.8456999999999995, 0.24197569714517148, 0.19014430285482856, 3.8456999999999995, 0.24197569714517148, 0.16728160463488068, - 3.8456999999999995, 0.26483839536511933, 0.16728160463488068, 3.8456999999999995, 0.26483839536511933, 0.19014430285482856, 3.8456999999999995, - 0.24197569714517148, 0.19014430285482856, 3.8456999999999995, 0.24197569714517148, 0.16728160463488068, 4.0593499999999993, 0.26483839536511933, - 0.16728160463488068, 4.0593499999999993, 0.26483839536511933, 0.19014430285482856, 4.0593499999999993, 0.24197569714517148, 0.19014430285482856, - 4.0593499999999993, 0.24197569714517148, 0.16728160463488068, 4.0593499999999993, 0.26483839536511933, 0.16728160463488068, 4.0593499999999993, - 0.26483839536511933, 0.19014430285482856, 4.0593499999999993, 0.24197569714517148, 0.19014430285482856, 4.0593499999999993, 0.24197569714517148, - 0.16728160463488068, 4.2729999999999997, 0.26483839536511933, 0.16728160463488068, 4.2729999999999997, 0.26483839536511933, 0.19014430285482856, - 4.2729999999999997, 0.24197569714517148, 0.19014430285482856, 4.2729999999999997, - 0.31132160463488068, 0.16995569714517142, 0, 0.3368583953651193, 0.16995569714517142, 0, 0.3368583953651193, 0.18643419768255964, 0, 0.31132160463488068, - 0.18643419768255964, 0, 0.31132160463488068, 0.16995569714517142, 0.21364999999999998, 0.3368583953651193, 0.16995569714517142, 0.21364999999999998, - 0.3368583953651193, 0.18643419768255964, 0.21364999999999998, 0.31132160463488068, 0.18643419768255964, 0.21364999999999998, 0.31132160463488068, - 0.16995569714517142, 0.21364999999999998, 0.3368583953651193, 0.16995569714517142, 0.21364999999999998, 0.3368583953651193, 0.18643419768255964, - 0.21364999999999998, 0.31132160463488068, 0.18643419768255964, 0.21364999999999998, 0.31132160463488068, 0.16995569714517142, 0.42729999999999996, - 0.3368583953651193, 0.16995569714517142, 0.42729999999999996, 0.3368583953651193, 0.18643419768255964, 0.42729999999999996, 0.31132160463488068, - 0.18643419768255964, 0.42729999999999996, 0.31132160463488068, 0.16995569714517142, 0.42729999999999996, 0.3368583953651193, 0.16995569714517142, - 0.42729999999999996, 0.3368583953651193, 0.18643419768255964, 0.42729999999999996, 0.31132160463488068, 0.18643419768255964, 0.42729999999999996, - 0.31132160463488068, 0.16995569714517142, 0.64094999999999991, 0.3368583953651193, 0.16995569714517142, 0.64094999999999991, 0.3368583953651193, - 0.18643419768255964, 0.64094999999999991, 0.31132160463488068, 0.18643419768255964, 0.64094999999999991, 0.31132160463488068, 0.16995569714517142, - 0.64094999999999991, 0.3368583953651193, 0.16995569714517142, 0.64094999999999991, 0.3368583953651193, 0.18643419768255964, 0.64094999999999991, - 0.31132160463488068, 0.18643419768255964, 0.64094999999999991, 0.31132160463488068, 0.16995569714517142, 0.85459999999999992, 0.3368583953651193, - 0.16995569714517142, 0.85459999999999992, 0.3368583953651193, 0.18643419768255964, 0.85459999999999992, 0.31132160463488068, 0.18643419768255964, - 0.85459999999999992, 0.31132160463488068, 0.16995569714517142, 0.85459999999999992, 0.3368583953651193, 0.16995569714517142, 0.85459999999999992, - 0.3368583953651193, 0.18643419768255964, 0.85459999999999992, 0.31132160463488068, 0.18643419768255964, 0.85459999999999992, 0.31132160463488068, - 0.16995569714517142, 1.0682499999999999, 0.3368583953651193, 0.16995569714517142, 1.0682499999999999, 0.3368583953651193, 0.18643419768255964, - 1.0682499999999999, 0.31132160463488068, 0.18643419768255964, 1.0682499999999999, 0.31132160463488068, 0.16995569714517142, 1.0682499999999999, - 0.3368583953651193, 0.16995569714517142, 1.0682499999999999, 0.3368583953651193, 0.18643419768255964, 1.0682499999999999, 0.31132160463488068, - 0.18643419768255964, 1.0682499999999999, 0.31132160463488068, 0.16995569714517142, 1.2818999999999998, 0.3368583953651193, 0.16995569714517142, - 1.2818999999999998, 0.3368583953651193, 0.18643419768255964, 1.2818999999999998, 0.31132160463488068, 0.18643419768255964, 1.2818999999999998, - 0.31132160463488068, 0.16995569714517142, 1.2818999999999998, 0.3368583953651193, 0.16995569714517142, 1.2818999999999998, 0.3368583953651193, - 0.18643419768255964, 1.2818999999999998, 0.31132160463488068, 0.18643419768255964, 1.2818999999999998, 0.31132160463488068, 0.16995569714517142, - 1.4955499999999999, 0.3368583953651193, 0.16995569714517142, 1.4955499999999999, 0.3368583953651193, 0.18643419768255964, 1.4955499999999999, - 0.31132160463488068, 0.18643419768255964, 1.4955499999999999, 0.31132160463488068, 0.16995569714517142, 1.4955499999999999, 0.3368583953651193, - 0.16995569714517142, 1.4955499999999999, 0.3368583953651193, 0.18643419768255964, 1.4955499999999999, 0.31132160463488068, 0.18643419768255964, - 1.4955499999999999, 0.31132160463488068, 0.16995569714517142, 1.7091999999999998, 0.3368583953651193, 0.16995569714517142, 1.7091999999999998, - 0.3368583953651193, 0.18643419768255964, 1.7091999999999998, 0.31132160463488068, 0.18643419768255964, 1.7091999999999998, 0.31132160463488068, - 0.16995569714517142, 1.7091999999999998, 0.3368583953651193, 0.16995569714517142, 1.7091999999999998, 0.3368583953651193, 0.18643419768255964, - 1.7091999999999998, 0.31132160463488068, 0.18643419768255964, 1.7091999999999998, 0.31132160463488068, 0.16995569714517142, 1.9228499999999997, - 0.3368583953651193, 0.16995569714517142, 1.9228499999999997, 0.3368583953651193, 0.18643419768255964, 1.9228499999999997, 0.31132160463488068, - 0.18643419768255964, 1.9228499999999997, 0.31132160463488068, 0.16995569714517142, 1.9228499999999997, 0.3368583953651193, 0.16995569714517142, - 1.9228499999999997, 0.3368583953651193, 0.18643419768255964, 1.9228499999999997, 0.31132160463488068, 0.18643419768255964, 1.9228499999999997, - 0.31132160463488068, 0.16995569714517142, 2.1364999999999998, 0.3368583953651193, 0.16995569714517142, 2.1364999999999998, 0.3368583953651193, - 0.18643419768255964, 2.1364999999999998, 0.31132160463488068, 0.18643419768255964, 2.1364999999999998, 0.31132160463488068, 0.16995569714517142, - 2.1364999999999998, 0.3368583953651193, 0.16995569714517142, 2.1364999999999998, 0.3368583953651193, 0.18643419768255964, 2.1364999999999998, - 0.31132160463488068, 0.18643419768255964, 2.1364999999999998, 0.31132160463488068, 0.16995569714517142, 2.3501499999999997, 0.3368583953651193, - 0.16995569714517142, 2.3501499999999997, 0.3368583953651193, 0.18643419768255964, 2.3501499999999997, 0.31132160463488068, 0.18643419768255964, - 2.3501499999999997, 0.31132160463488068, 0.16995569714517142, 2.3501499999999997, 0.3368583953651193, 0.16995569714517142, 2.3501499999999997, - 0.3368583953651193, 0.18643419768255964, 2.3501499999999997, 0.31132160463488068, 0.18643419768255964, 2.3501499999999997, 0.31132160463488068, - 0.16995569714517142, 2.5637999999999996, 0.3368583953651193, 0.16995569714517142, 2.5637999999999996, 0.3368583953651193, 0.18643419768255964, - 2.5637999999999996, 0.31132160463488068, 0.18643419768255964, 2.5637999999999996, 0.31132160463488068, 0.16995569714517142, 2.5637999999999996, - 0.3368583953651193, 0.16995569714517142, 2.5637999999999996, 0.3368583953651193, 0.18643419768255964, 2.5637999999999996, 0.31132160463488068, - 0.18643419768255964, 2.5637999999999996, 0.31132160463488068, 0.16995569714517142, 2.7774499999999995, 0.3368583953651193, 0.16995569714517142, - 2.7774499999999995, 0.3368583953651193, 0.18643419768255964, 2.7774499999999995, 0.31132160463488068, 0.18643419768255964, 2.7774499999999995, - 0.31132160463488068, 0.16995569714517142, 2.7774499999999995, 0.3368583953651193, 0.16995569714517142, 2.7774499999999995, 0.3368583953651193, - 0.18643419768255964, 2.7774499999999995, 0.31132160463488068, 0.18643419768255964, 2.7774499999999995, 0.31132160463488068, 0.16995569714517142, - 2.9910999999999999, 0.3368583953651193, 0.16995569714517142, 2.9910999999999999, 0.3368583953651193, 0.18643419768255964, 2.9910999999999999, - 0.31132160463488068, 0.18643419768255964, 2.9910999999999999, 0.31132160463488068, 0.16995569714517142, 2.9910999999999999, 0.3368583953651193, - 0.16995569714517142, 2.9910999999999999, 0.3368583953651193, 0.18643419768255964, 2.9910999999999999, 0.31132160463488068, 0.18643419768255964, - 2.9910999999999999, 0.31132160463488068, 0.16995569714517142, 3.2047499999999998, 0.3368583953651193, 0.16995569714517142, 3.2047499999999998, - 0.3368583953651193, 0.18643419768255964, 3.2047499999999998, 0.31132160463488068, 0.18643419768255964, 3.2047499999999998, 0.31132160463488068, - 0.16995569714517142, 3.2047499999999998, 0.3368583953651193, 0.16995569714517142, 3.2047499999999998, 0.3368583953651193, 0.18643419768255964, - 3.2047499999999998, 0.31132160463488068, 0.18643419768255964, 3.2047499999999998, 0.31132160463488068, 0.16995569714517142, 3.4183999999999997, - 0.3368583953651193, 0.16995569714517142, 3.4183999999999997, 0.3368583953651193, 0.18643419768255964, 3.4183999999999997, 0.31132160463488068, - 0.18643419768255964, 3.4183999999999997, 0.31132160463488068, 0.16995569714517142, 3.4183999999999997, 0.3368583953651193, 0.16995569714517142, - 3.4183999999999997, 0.3368583953651193, 0.18643419768255964, 3.4183999999999997, 0.31132160463488068, 0.18643419768255964, 3.4183999999999997, - 0.31132160463488068, 0.16995569714517142, 3.6320499999999996, 0.3368583953651193, - 0.16995569714517142, 3.6320499999999996, 0.3368583953651193, 0.18643419768255964, 3.6320499999999996, 0.31132160463488068, 0.18643419768255964, - 3.6320499999999996, 0.31132160463488068, 0.16995569714517142, 3.6320499999999996, 0.3368583953651193, 0.16995569714517142, 3.6320499999999996, - 0.3368583953651193, 0.18643419768255964, 3.6320499999999996, 0.31132160463488068, 0.18643419768255964, 3.6320499999999996, 0.31132160463488068, - 0.16995569714517142, 3.8456999999999995, 0.3368583953651193, 0.16995569714517142, 3.8456999999999995, 0.3368583953651193, 0.18643419768255964, - 3.8456999999999995, 0.31132160463488068, 0.18643419768255964, 3.8456999999999995, 0.31132160463488068, 0.16995569714517142, 3.8456999999999995, - 0.3368583953651193, 0.16995569714517142, 3.8456999999999995, 0.3368583953651193, 0.18643419768255964, 3.8456999999999995, 0.31132160463488068, - 0.18643419768255964, 3.8456999999999995, 0.31132160463488068, 0.16995569714517142, 4.0593499999999993, 0.3368583953651193, 0.16995569714517142, - 4.0593499999999993, 0.3368583953651193, 0.18643419768255964, 4.0593499999999993, 0.31132160463488068, 0.18643419768255964, 4.0593499999999993, - 0.31132160463488068, 0.16995569714517142, 4.0593499999999993, 0.3368583953651193, 0.16995569714517142, 4.0593499999999993, 0.3368583953651193, - 0.18643419768255964, 4.0593499999999993, 0.31132160463488068, 0.18643419768255964, 4.0593499999999993, 0.31132160463488068, 0.16995569714517142, - 4.2729999999999997, 0.3368583953651193, 0.16995569714517142, 4.2729999999999997, 0.3368583953651193, 0.18643419768255964, 4.2729999999999997, - 0.31132160463488068, 0.18643419768255964, 4.2729999999999997, 0.38334160463488065, 0.1672816046348807, 0, 0.40620430285482856, 0.1672816046348807, 0, - 0.40620430285482856, 0.19014430285482853, 0, 0.38334160463488065, 0.19014430285482853, 0, 0.38334160463488065, 0.1672816046348807, 0.21364999999999998, - 0.40620430285482856, 0.1672816046348807, 0.21364999999999998, 0.40620430285482856, 0.19014430285482853, 0.21364999999999998, 0.38334160463488065, - 0.19014430285482853, 0.21364999999999998, 0.38334160463488065, 0.1672816046348807, 0.21364999999999998, 0.40620430285482856, 0.1672816046348807, - 0.21364999999999998, 0.40620430285482856, 0.19014430285482853, 0.21364999999999998, 0.38334160463488065, 0.19014430285482853, 0.21364999999999998, - 0.38334160463488065, 0.1672816046348807, 0.42729999999999996, 0.40620430285482856, 0.1672816046348807, 0.42729999999999996, 0.40620430285482856, - 0.19014430285482853, 0.42729999999999996, 0.38334160463488065, 0.19014430285482853, 0.42729999999999996, 0.38334160463488065, 0.1672816046348807, - 0.42729999999999996, 0.40620430285482856, 0.1672816046348807, 0.42729999999999996, 0.40620430285482856, 0.19014430285482853, 0.42729999999999996, - 0.38334160463488065, 0.19014430285482853, 0.42729999999999996, 0.38334160463488065, 0.1672816046348807, 0.64094999999999991, 0.40620430285482856, - 0.1672816046348807, 0.64094999999999991, 0.40620430285482856, 0.19014430285482853, 0.64094999999999991, 0.38334160463488065, 0.19014430285482853, - 0.64094999999999991, 0.38334160463488065, 0.1672816046348807, 0.64094999999999991, 0.40620430285482856, 0.1672816046348807, 0.64094999999999991, - 0.40620430285482856, 0.19014430285482853, 0.64094999999999991, 0.38334160463488065, 0.19014430285482853, 0.64094999999999991, 0.38334160463488065, - 0.1672816046348807, 0.85459999999999992, 0.40620430285482856, 0.1672816046348807, 0.85459999999999992, 0.40620430285482856, 0.19014430285482853, - 0.85459999999999992, 0.38334160463488065, 0.19014430285482853, 0.85459999999999992, 0.38334160463488065, 0.1672816046348807, 0.85459999999999992, - 0.40620430285482856, 0.1672816046348807, 0.85459999999999992, 0.40620430285482856, 0.19014430285482853, 0.85459999999999992, 0.38334160463488065, - 0.19014430285482853, 0.85459999999999992, 0.38334160463488065, 0.1672816046348807, 1.0682499999999999, 0.40620430285482856, 0.1672816046348807, - 1.0682499999999999, 0.40620430285482856, 0.19014430285482853, 1.0682499999999999, 0.38334160463488065, 0.19014430285482853, 1.0682499999999999, - 0.38334160463488065, 0.1672816046348807, 1.0682499999999999, 0.40620430285482856, 0.1672816046348807, 1.0682499999999999, 0.40620430285482856, - 0.19014430285482853, 1.0682499999999999, 0.38334160463488065, 0.19014430285482853, 1.0682499999999999, 0.38334160463488065, 0.1672816046348807, - 1.2818999999999998, 0.40620430285482856, 0.1672816046348807, 1.2818999999999998, 0.40620430285482856, 0.19014430285482853, 1.2818999999999998, - 0.38334160463488065, 0.19014430285482853, 1.2818999999999998, 0.38334160463488065, 0.1672816046348807, 1.2818999999999998, 0.40620430285482856, - 0.1672816046348807, 1.2818999999999998, 0.40620430285482856, 0.19014430285482853, 1.2818999999999998, 0.38334160463488065, 0.19014430285482853, - 1.2818999999999998, 0.38334160463488065, 0.1672816046348807, 1.4955499999999999, 0.40620430285482856, 0.1672816046348807, 1.4955499999999999, - 0.40620430285482856, 0.19014430285482853, 1.4955499999999999, 0.38334160463488065, 0.19014430285482853, 1.4955499999999999, 0.38334160463488065, - 0.1672816046348807, 1.4955499999999999, 0.40620430285482856, 0.1672816046348807, 1.4955499999999999, 0.40620430285482856, 0.19014430285482853, - 1.4955499999999999, 0.38334160463488065, 0.19014430285482853, 1.4955499999999999, 0.38334160463488065, 0.1672816046348807, 1.7091999999999998, - 0.40620430285482856, 0.1672816046348807, 1.7091999999999998, 0.40620430285482856, 0.19014430285482853, 1.7091999999999998, 0.38334160463488065, - 0.19014430285482853, 1.7091999999999998, 0.38334160463488065, 0.1672816046348807, 1.7091999999999998, 0.40620430285482856, 0.1672816046348807, - 1.7091999999999998, 0.40620430285482856, 0.19014430285482853, 1.7091999999999998, 0.38334160463488065, 0.19014430285482853, 1.7091999999999998, - 0.38334160463488065, 0.1672816046348807, 1.9228499999999997, 0.40620430285482856, 0.1672816046348807, 1.9228499999999997, 0.40620430285482856, - 0.19014430285482853, 1.9228499999999997, 0.38334160463488065, 0.19014430285482853, 1.9228499999999997, 0.38334160463488065, 0.1672816046348807, - 1.9228499999999997, 0.40620430285482856, 0.1672816046348807, 1.9228499999999997, 0.40620430285482856, 0.19014430285482853, 1.9228499999999997, - 0.38334160463488065, 0.19014430285482853, 1.9228499999999997, 0.38334160463488065, 0.1672816046348807, 2.1364999999999998, 0.40620430285482856, - 0.1672816046348807, 2.1364999999999998, 0.40620430285482856, 0.19014430285482853, 2.1364999999999998, 0.38334160463488065, 0.19014430285482853, - 2.1364999999999998, 0.38334160463488065, 0.1672816046348807, 2.1364999999999998, 0.40620430285482856, 0.1672816046348807, 2.1364999999999998, - 0.40620430285482856, 0.19014430285482853, 2.1364999999999998, 0.38334160463488065, 0.19014430285482853, 2.1364999999999998, 0.38334160463488065, - 0.1672816046348807, 2.3501499999999997, 0.40620430285482856, 0.1672816046348807, 2.3501499999999997, 0.40620430285482856, 0.19014430285482853, - 2.3501499999999997, 0.38334160463488065, 0.19014430285482853, 2.3501499999999997, 0.38334160463488065, 0.1672816046348807, 2.3501499999999997, - 0.40620430285482856, 0.1672816046348807, 2.3501499999999997, 0.40620430285482856, 0.19014430285482853, 2.3501499999999997, 0.38334160463488065, - 0.19014430285482853, 2.3501499999999997, 0.38334160463488065, 0.1672816046348807, 2.5637999999999996, 0.40620430285482856, 0.1672816046348807, - 2.5637999999999996, 0.40620430285482856, 0.19014430285482853, 2.5637999999999996, 0.38334160463488065, 0.19014430285482853, 2.5637999999999996, - 0.38334160463488065, 0.1672816046348807, 2.5637999999999996, 0.40620430285482856, 0.1672816046348807, 2.5637999999999996, 0.40620430285482856, - 0.19014430285482853, 2.5637999999999996, 0.38334160463488065, 0.19014430285482853, 2.5637999999999996, 0.38334160463488065, 0.1672816046348807, - 2.7774499999999995, 0.40620430285482856, 0.1672816046348807, 2.7774499999999995, 0.40620430285482856, 0.19014430285482853, 2.7774499999999995, - 0.38334160463488065, 0.19014430285482853, 2.7774499999999995, 0.38334160463488065, 0.1672816046348807, 2.7774499999999995, 0.40620430285482856, - 0.1672816046348807, 2.7774499999999995, 0.40620430285482856, 0.19014430285482853, - 2.7774499999999995, 0.38334160463488065, 0.19014430285482853, 2.7774499999999995, 0.38334160463488065, 0.1672816046348807, 2.9910999999999999, - 0.40620430285482856, 0.1672816046348807, 2.9910999999999999, 0.40620430285482856, 0.19014430285482853, 2.9910999999999999, 0.38334160463488065, - 0.19014430285482853, 2.9910999999999999, 0.38334160463488065, 0.1672816046348807, 2.9910999999999999, 0.40620430285482856, 0.1672816046348807, - 2.9910999999999999, 0.40620430285482856, 0.19014430285482853, 2.9910999999999999, 0.38334160463488065, 0.19014430285482853, 2.9910999999999999, - 0.38334160463488065, 0.1672816046348807, 3.2047499999999998, 0.40620430285482856, 0.1672816046348807, 3.2047499999999998, 0.40620430285482856, - 0.19014430285482853, 3.2047499999999998, 0.38334160463488065, 0.19014430285482853, 3.2047499999999998, 0.38334160463488065, 0.1672816046348807, - 3.2047499999999998, 0.40620430285482856, 0.1672816046348807, 3.2047499999999998, 0.40620430285482856, 0.19014430285482853, 3.2047499999999998, - 0.38334160463488065, 0.19014430285482853, 3.2047499999999998, 0.38334160463488065, 0.1672816046348807, 3.4183999999999997, 0.40620430285482856, - 0.1672816046348807, 3.4183999999999997, 0.40620430285482856, 0.19014430285482853, 3.4183999999999997, 0.38334160463488065, 0.19014430285482853, - 3.4183999999999997, 0.38334160463488065, 0.1672816046348807, 3.4183999999999997, 0.40620430285482856, 0.1672816046348807, 3.4183999999999997, - 0.40620430285482856, 0.19014430285482853, 3.4183999999999997, 0.38334160463488065, 0.19014430285482853, 3.4183999999999997, 0.38334160463488065, - 0.1672816046348807, 3.6320499999999996, 0.40620430285482856, 0.1672816046348807, 3.6320499999999996, 0.40620430285482856, 0.19014430285482853, - 3.6320499999999996, 0.38334160463488065, 0.19014430285482853, 3.6320499999999996, 0.38334160463488065, 0.1672816046348807, 3.6320499999999996, - 0.40620430285482856, 0.1672816046348807, 3.6320499999999996, 0.40620430285482856, 0.19014430285482853, 3.6320499999999996, 0.38334160463488065, - 0.19014430285482853, 3.6320499999999996, 0.38334160463488065, 0.1672816046348807, 3.8456999999999995, 0.40620430285482856, 0.1672816046348807, - 3.8456999999999995, 0.40620430285482856, 0.19014430285482853, 3.8456999999999995, 0.38334160463488065, 0.19014430285482853, 3.8456999999999995, - 0.38334160463488065, 0.1672816046348807, 3.8456999999999995, 0.40620430285482856, 0.1672816046348807, 3.8456999999999995, 0.40620430285482856, - 0.19014430285482853, 3.8456999999999995, 0.38334160463488065, 0.19014430285482853, 3.8456999999999995, 0.38334160463488065, 0.1672816046348807, - 4.0593499999999993, 0.40620430285482856, 0.1672816046348807, 4.0593499999999993, 0.40620430285482856, 0.19014430285482853, 4.0593499999999993, - 0.38334160463488065, 0.19014430285482853, 4.0593499999999993, 0.38334160463488065, 0.1672816046348807, 4.0593499999999993, 0.40620430285482856, - 0.1672816046348807, 4.0593499999999993, 0.40620430285482856, 0.19014430285482853, 4.0593499999999993, 0.38334160463488065, 0.19014430285482853, - 4.0593499999999993, 0.38334160463488065, 0.1672816046348807, 4.2729999999999997, 0.40620430285482856, 0.1672816046348807, 4.2729999999999997, - 0.40620430285482856, 0.19014430285482853, 4.2729999999999997, 0.38334160463488065, 0.19014430285482853, 4.2729999999999997 - }; - - -const int connTFH8[2560]={ - 1, 2, 7, 6, 28, 29, 34, 33, 2, 3, 8, 7, 29, 30, 35, 34, 3, 4, 9, 8, 30, 31, 36, 35, 4, 5, 10, 9, 31, 32, 37, 36, 6, 7, 12, 11, 33, 34, 39, 38, 7, 8, 13, 12, 34, 35, 40, 39, - 8, 9, 14, 13, 35, 36, 41, 40, 9, 10, 15, 14, 36, 37, 42, 41, 11, 12, 17, 16, 38, 39, 44, 43, 12, 13, 18, 17, 39, 40, 45, 44, 13, 14, 19, 18, 40, 41, 46, 45, 14, 15, 20, 19, - 41, 42, 47, 46, 16, 17, 21, 26, 43, 44, 48, 53, 17, 18, 22, 21, 44, 45, 49, 48, 18, 19, 23, 22, 45, 46, 50, 49, 19, 20, 24, 23, 46, 47, 51, 50, 28, 29, 34, 33, 55, 56, 61, 60, - 29, 30, 35, 34, 56, 57, 62, 61, 30, 31, 36, 35, 57, 58, 63, 62, 31, 32, 37, 36, 58, 59, 64, 63, 33, 34, 39, 38, 60, 61, 66, 65, 34, 35, 40, 39, 61, 62, 67, 66, 35, 36, 41, 40, - 62, 63, 68, 67, 36, 37, 42, 41, 63, 64, 69, 68, 38, 39, 44, 43, 65, 66, 71, 70, 39, 40, 45, 44, 66, 67, 72, 71, 40, 41, 46, 45, 67, 68, 73, 72, 41, 42, 47, 46, 68, 69, 74, 73, - 43, 44, 48, 53, 70, 71, 75, 80, 44, 45, 49, 48, 71, 72, 76, 75, 45, 46, 50, 49, 72, 73, 77, 76, 46, 47, 51, 50, 73, 74, 78, 77, 55, 56, 61, 60, 82, 83, 88, 87, 56, 57, 62, 61, - 83, 84, 89, 88, 57, 58, 63, 62, 84, 85, 90, 89, 58, 59, 64, 63, 85, 86, 91, 90, 60, 61, 66, 65, 87, 88, 93, 92, 61, 62, 67, 66, 88, 89, 94, 93, 62, 63, 68, 67, 89, 90, 95, 94, - 63, 64, 69, 68, 90, 91, 96, 95, 65, 66, 71, 70, 92, 93, 98, 97, 66, 67, 72, 71, 93, 94, 99, 98, 67, 68, 73, 72, 94, 95, 100, 99, 68, 69, 74, 73, 95, 96, 101, 100, 70, 71, 75, - 80, 97, 98, 102, 107, 71, 72, 76, 75, 98, 99, 103, 102, 72, 73, 77, 76, 99, 100, 104, 103, 73, 74, 78, 77, 100, 101, 105, 104, 82, 83, 88, 87, 109, 110, 115, 114, 83, 84, 89, - 88, 110, 111, 116, 115, 84, 85, 90, 89, 111, 112, 117, 116, 85, 86, 91, 90, 112, 113, 118, 117, 87, 88, 93, 92, 114, 115, 120, 119, 88, 89, 94, 93, 115, 116, 121, 120, 89, 90, - 95, 94, 116, 117, 122, 121, 90, 91, 96, 95, 117, 118, 123, 122, 92, 93, 98, 97, 119, 120, 125, 124, 93, 94, 99, 98, 120, 121, 126, 125, 94, 95, 100, 99, 121, 122, 127, 126, 95, - 96, 101, 100, 122, 123, 128, 127, 97, 98, 102, 107, 124, 125, 129, 134, 98, 99, 103, 102, 125, 126, 130, 129, 99, 100, 104, 103, 126, 127, 131, 130, 100, 101, 105, 104, 127, 128, - 132, 131, 109, 110, 115, 114, 136, 137, 142, 141, 110, 111, 116, 115, 137, 138, 143, 142, 111, 112, 117, 116, 138, 139, 144, 143, 112, 113, 118, 117, 139, 140, 145, 144, 114, 115, - 120, 119, 141, 142, 147, 146, 115, 116, 121, 120, 142, 143, 148, 147, 116, 117, 122, 121, 143, 144, 149, 148, 117, 118, 123, 122, 144, 145, 150, 149, 119, 120, 125, 124, 146, 147, - 152, 151, 120, 121, 126, 125, 147, 148, 153, 152, 121, 122, 127, 126, 148, 149, 154, 153, 122, 123, 128, 127, 149, 150, 155, 154, 124, 125, 129, 134, 151, 152, 156, 161, 125, 126, 130, - 129, 152, 153, 157, 156, 126, 127, 131, 130, 153, 154, 158, 157, 127, 128, 132, 131, 154, 155, 159, 158, 136, 137, 142, 141, 163, 164, 169, 168, 137, 138, 143, 142, 164, 165, 170, 169, 138, 139, 144, 143, 165, 166, 171, 170, 139, - 140, 145, 144, 166, 167, 172, 171, 141, 142, 147, 146, 168, 169, 174, 173, 142, 143, 148, 147, 169, 170, 175, 174, 143, 144, 149, 148, 170, 171, 176, 175, 144, 145, 150, 149, 171, 172, 177, 176, 146, 147, 152, 151, 173, 174, 179, - 178, 147, 148, 153, 152, 174, 175, 180, 179, 148, 149, 154, 153, 175, 176, 181, 180, 149, 150, 155, 154, 176, 177, 182, 181, 151, 152, 156, 161, 178, 179, 183, 188, 152, 153, 157, 156, 179, 180, 184, 183, 153, 154, 158, 157, 180, - 181, 185, 184, 154, 155, 159, 158, 181, 182, 186, 185, 163, 164, 169, 168, 190, 191, 196, 195, 164, 165, 170, 169, 191, 192, 197, 196, 165, 166, 171, 170, 192, 193, 198, 197, 166, 167, 172, 171, 193, 194, 199, 198, 168, 169, 174, - 173, 195, 196, 201, 200, 169, 170, 175, 174, 196, 197, 202, 201, 170, 171, 176, 175, 197, 198, 203, 202, 171, 172, 177, 176, 198, 199, 204, 203, 173, 174, 179, 178, 200, 201, 206, 205, 174, 175, 180, 179, 201, 202, 207, 206, 175, - 176, 181, 180, 202, 203, 208, 207, 176, 177, 182, 181, 203, 204, 209, 208, 178, 179, 183, 188, 205, 206, 210, 215, 179, 180, 184, 183, 206, 207, 211, 210, 180, 181, 185, 184, 207, 208, 212, 211, 181, 182, 186, 185, 208, 209, 213, - 212, 190, 191, 196, 195, 217, 218, 223, 222, 191, 192, 197, 196, 218, 219, 224, 223, 192, 193, 198, 197, 219, 220, 225, 224, 193, 194, 199, 198, 220, 221, 226, 225, 195, 196, 201, 200, 222, 223, 228, 227, 196, 197, 202, 201, 223, - 224, 229, 228, 197, 198, 203, 202, 224, 225, 230, 229, 198, 199, 204, 203, 225, 226, 231, 230, 200, 201, 206, 205, 227, 228, 233, 232, 201, 202, 207, 206, 228, 229, 234, 233, 202, 203, 208, 207, 229, 230, 235, 234, 203, 204, 209, - 208, 230, 231, 236, 235, 205, 206, 210, 215, 232, 233, 237, 242, 206, 207, 211, 210, 233, 234, 238, 237, 207, 208, 212, 211, 234, 235, 239, 238, 208, 209, 213, 212, 235, 236, 240, 239, 217, 218, 223, 222, 244, 245, 250, 249, 218, - 219, 224, 223, 245, 246, 251, 250, 219, 220, 225, 224, 246, 247, 252, 251, 220, 221, 226, 225, 247, 248, 253, 252, 222, 223, 228, 227, 249, 250, 255, 254, 223, 224, 229, 228, 250, 251, 256, 255, 224, 225, 230, 229, 251, 252, 257, - 256, 225, 226, 231, 230, 252, 253, 258, 257, 227, 228, 233, 232, 254, 255, 260, 259, 228, 229, 234, 233, 255, 256, 261, 260, 229, 230, 235, 234, 256, 257, 262, 261, 230, 231, 236, 235, 257, 258, 263, 262, 232, 233, 237, 242, 259, - 260, 264, 269, 233, 234, 238, 237, 260, 261, 265, 264, 234, 235, 239, 238, 261, 262, 266, 265, 235, 236, 240, 239, 262, 263, 267, 266, 244, 245, 250, 249, 271, 272, 277, 276, 245, 246, 251, 250, 272, 273, 278, 277, 246, 247, 252, - 251, 273, 274, 279, 278, 247, 248, 253, 252, 274, 275, 280, 279, 249, 250, 255, 254, 276, 277, 282, 281, 250, 251, 256, 255, 277, 278, 283, 282, 251, 252, 257, 256, 278, 279, 284, 283, 252, 253, 258, 257, 279, 280, 285, 284, 254, - 255, 260, 259, 281, 282, 287, 286, 255, 256, 261, 260, 282, 283, 288, 287, 256, 257, 262, 261, 283, 284, 289, 288, 257, 258, 263, 262, 284, 285, 290, 289, 259, 260, 264, 269, 286, 287, 291, 296, 260, 261, 265, 264, 287, 288, 292, - 291, 261, 262, 266, 265, 288, 289, 293, 292, 262, 263, 267, 266, 289, 290, 294, 293, 271, 272, 277, 276, 298, 299, 304, 303, 272, 273, 278, 277, 299, 300, 305, 304, 273, 274, 279, 278, 300, 301, 306, 305, 274, 275, 280, 279, 301, - 302, 307, 306, 276, 277, 282, 281, 303, 304, 309, 308, 277, 278, 283, 282, 304, 305, 310, 309, 278, 279, 284, 283, 305, 306, 311, 310, 279, 280, 285, 284, 306, 307, 312, 311, 281, 282, 287, 286, 308, 309, 314, 313, 282, 283, 288, - 287, 309, 310, 315, 314, 283, 284, 289, 288, 310, 311, 316, 315, 284, 285, 290, 289, 311, 312, 317, 316, 286, 287, 291, 296, 313, 314, 318, 323, 287, 288, 292, 291, 314, 315, 319, 318, 288, 289, 293, 292, 315, 316, 320, 319, 289, - 290, 294, 293, 316, 317, 321, 320, 298, 299, 304, 303, 325, 326, 331, 330, 299, 300, 305, 304, 326, 327, 332, 331, 300, 301, 306, 305, 327, 328, 333, 332, 301, 302, 307, 306, 328, 329, 334, 333, 303, 304, 309, 308, 330, 331, 336, - 335, 304, 305, 310, 309, 331, 332, 337, 336, 305, 306, 311, 310, 332, 333, 338, 337, 306, 307, 312, 311, 333, 334, 339, 338, 308, 309, 314, 313, 335, 336, 341, 340, 309, 310, 315, 314, 336, 337, 342, 341, 310, 311, 316, 315, 337, - 338, 343, 342, 311, 312, 317, 316, 338, 339, 344, 343, 313, 314, 318, 323, 340, 341, 345, 350, 314, 315, 319, 318, 341, 342, 346, 345, 315, 316, 320, 319, 342, 343, 347, 346, 316, 317, 321, 320, 343, 344, 348, 347, 325, 326, 331, - 330, 352, 353, 358, 357, 326, 327, 332, 331, 353, 354, 359, 358, 327, 328, 333, 332, 354, 355, 360, 359, 328, 329, 334, 333, 355, 356, 361, 360, 330, 331, 336, 335, 357, 358, 363, 362, 331, 332, 337, 336, 358, 359, 364, 363, 332, - 333, 338, 337, 359, 360, 365, 364, 333, 334, 339, 338, 360, 361, 366, 365, 335, 336, 341, 340, 362, 363, 368, 367, 336, 337, 342, 341, 363, 364, 369, 368, 337, 338, 343, 342, 364, 365, 370, 369, 338, 339, 344, 343, 365, 366, 371, - 370, 340, 341, 345, 350, 367, 368, 372, 377, 341, 342, 346, 345, 368, 369, 373, 372, 342, 343, 347, 346, 369, 370, 374, 373, 343, 344, 348, 347, 370, 371, 375, 374, 352, 353, 358, 357, 379, 380, 385, 384, 353, 354, 359, 358, 380, - 381, 386, 385, 354, 355, 360, 359, 381, 382, 387, 386, 355, 356, 361, 360, 382, 383, 388, 387, 357, 358, 363, 362, 384, 385, 390, 389, 358, 359, 364, 363, 385, 386, 391, 390, 359, 360, 365, 364, 386, 387, 392, 391, 360, 361, 366, - 365, 387, 388, 393, 392, 362, 363, 368, 367, 389, 390, 395, 394, 363, 364, 369, 368, 390, 391, 396, 395, 364, 365, 370, 369, 391, 392, 397, 396, 365, 366, 371, 370, 392, 393, 398, 397, 367, 368, 372, 377, 394, 395, 399, 404, 368, - 369, 373, 372, 395, 396, 400, 399, 369, 370, 374, 373, 396, 397, 401, 400, 370, 371, 375, 374, 397, 398, 402, 401, 379, 380, 385, 384, 406, 407, 412, 411, 380, 381, 386, 385, 407, 408, 413, 412, 381, 382, 387, 386, 408, 409, 414, - 413, 382, 383, 388, 387, 409, 410, 415, 414, 384, 385, 390, 389, 411, 412, 417, 416, 385, 386, 391, 390, 412, 413, 418, 417, 386, 387, 392, 391, 413, 414, 419, 418, 387, 388, 393, 392, 414, 415, 420, 419, 389, 390, 395, 394, 416, - 417, 422, 421, 390, 391, 396, 395, 417, 418, 423, 422, 391, 392, 397, 396, 418, 419, 424, 423, 392, 393, 398, 397, 419, 420, 425, 424, 394, 395, 399, 404, 421, 422, 426, 431, 395, 396, 400, 399, 422, 423, 427, 426, 396, 397, 401, - 400, 423, 424, 428, 427, 397, 398, 402, 401, 424, 425, 429, 428, 406, 407, 412, 411, 433, 434, 439, 438, 407, 408, 413, 412, 434, 435, 440, 439, 408, 409, 414, 413, 435, 436, 441, 440, 409, 410, 415, 414, 436, 437, 442, 441, 411, - 412, 417, 416, 438, 439, 444, 443, 412, 413, 418, 417, 439, 440, 445, 444, 413, 414, 419, 418, 440, 441, 446, 445, 414, 415, 420, 419, 441, 442, 447, 446, 416, 417, 422, 421, 443, 444, 449, 448, 417, 418, 423, 422, 444, 445, 450, - 449, 418, 419, 424, 423, 445, 446, 451, 450, 419, 420, 425, 424, 446, 447, 452, 451, 421, 422, 426, 431, 448, 449, 453, 458, 422, 423, 427, 426, 449, 450, 454, 453, 423, 424, 428, 427, 450, 451, 455, 454, 424, 425, 429, 428, 451, - 452, 456, 455, 433, 434, 439, 438, 460, 461, 466, 465, 434, 435, 440, 439, 461, 462, 467, 466, 435, 436, 441, 440, 462, 463, 468, 467, 436, 437, 442, 441, 463, 464, 469, 468, 438, 439, 444, 443, 465, 466, 471, 470, 439, 440, 445, - 444, 466, 467, 472, 471, 440, 441, 446, 445, 467, 468, 473, 472, 441, 442, 447, 446, 468, 469, 474, 473, 443, 444, 449, 448, 470, 471, 476, 475, 444, 445, 450, 449, 471, 472, 477, 476, 445, 446, 451, 450, 472, 473, 478, 477, 446, - 447, 452, 451, 473, 474, 479, 478, 448, 449, 453, 458, 475, 476, 480, 485, 449, 450, 454, 453, 476, 477, 481, 480, 450, 451, 455, 454, 477, 478, 482, 481, 451, 452, 456, 455, 478, 479, 483, 482, 460, 461, 466, 465, 487, 488, 493, - 492, 461, 462, 467, 466, 488, 489, 494, 493, 462, 463, 468, 467, 489, 490, 495, 494, 463, 464, 469, 468, 490, 491, 496, 495, 465, 466, 471, 470, 492, 493, 498, 497, 466, 467, 472, 471, 493, 494, 499, 498, 467, 468, 473, 472, 494, - 495, 500, 499, 468, 469, 474, 473, 495, 496, 501, 500, 470, 471, 476, 475, 497, 498, 503, 502, 471, 472, 477, 476, 498, 499, 504, 503, 472, 473, 478, 477, 499, 500, 505, 504, 473, 474, 479, 478, 500, 501, 506, 505, 475, 476, 480, - 485, 502, 503, 507, 512, 476, 477, 481, 480, 503, 504, 508, 507, 477, 478, 482, 481, 504, 505, 509, 508, 478, 479, 483, 482, 505, 506, 510, 509, 487, 488, 493, 492, 514, 515, 520, 519, 488, 489, 494, 493, 515, 516, 521, 520, 489, - 490, 495, 494, 516, 517, 522, 521, 490, 491, 496, 495, 517, 518, 523, 522, 492, 493, 498, 497, 519, 520, 525, 524, 493, 494, 499, 498, 520, 521, 526, 525, 494, 495, 500, 499, 521, 522, 527, 526, 495, 496, 501, 500, 522, 523, 528, - 527, 497, 498, 503, 502, 524, 525, 530, 529, 498, 499, 504, 503, 525, 526, 531, 530, 499, 500, 505, 504, 526, 527, 532, 531, 500, 501, 506, 505, 527, 528, 533, 532, 502, 503, 507, 512, 529, 530, 534, 539, 503, 504, 508, 507, 530, - 531, 535, 534, 504, 505, 509, 508, 531, 532, 536, 535, 505, 506, 510, 509, 532, 533, 537, 536, 514, 515, 520, 519, 541, 542, 547, 546, 515, 516, 521, 520, 542, 543, 548, 547, 516, 517, 522, 521, 543, 544, 549, 548, 517, 518, 523, - 522, 544, 545, 550, 549, 519, 520, 525, 524, 546, 547, 552, 551, 520, 521, 526, 525, 547, 548, 553, 552, 521, 522, 527, 526, 548, 549, 554, 553, 522, 523, 528, 527, 549, 550, 555, 554, 524, 525, 530, 529, 551, 552, 557, 556, 525, - 526, 531, 530, 552, 553, 558, 557, 526, 527, 532, 531, 553, 554, 559, 558, 527, 528, 533, 532, 554, 555, 560, 559, 529, 530, 534, 539, 556, 557, 561, 566, 530, 531, 535, 534, 557, 558, 562, 561, 531, 532, 536, 535, 558, 559, 563, - 562, 532, 533, 537, 536, 559, 560, 564, 563}; - -const int connTFPOLH[1000]={ - 0, 25, 26, 16, 11, 6, 1, -1, 27, 28, 33, 38, 43, 53, 52, -1, 0, 1, 28, 27, -1, 1, 6, 33, 28, -1, 6, 11, 38, 33, -1, 11, 16, 43, 38, -1, 16, 26, 53, 43, -1, 26, 25, 52, 53, -1, 25, 0, 27, 52, 27, 52, 53, 43, 38, 33, 28, -1, 54, 55, - 60, 65, 70, 80, 79, -1, 27, 28, 55, 54, -1, 28, 33, 60, 55, -1, 33, 38, 65, 60, -1, 38, 43, 70, 65, -1, 43, 53, 80, 70, -1, 53, 52, 79, 80, -1, 52, 27, 54, 79, 54, 79, 80, 70, 65, 60, 55, -1, 81, 82, 87, 92, 97, 107, 106, -1, 54, - 55, 82, 81, -1, 55, 60, 87, 82, -1, 60, 65, 92, 87, -1, 65, 70, 97, 92, -1, 70, 80, 107, 97, -1, 80, 79, 106, 107, -1, 79, 54, 81, 106, 81, 106, 107, 97, 92, 87, 82, -1, 108, 109, 114, 119, 124, 134, 133, -1, 81, 82, 109, 108, -1, - 82, 87, 114, 109, -1, 87, 92, 119, 114, -1, 92, 97, 124, 119, -1, 97, 107, 134, 124, -1, 107, 106, 133, 134, -1, 106, 81, 108, 133, 108, 133, 134, 124, 119, 114, 109, -1, 135, 136, 141, 146, 151, 161, 160, -1, 108, 109, 136, 135, - -1, 109, 114, 141, 136, -1, 114, 119, 146, 141, -1, 119, 124, 151, 146, -1, 124, 134, 161, 151, -1, 134, 133, 160, 161, -1, 133, 108, 135, 160, 135, 160, 161, 151, 146, 141, 136, -1, 162, 163, 168, 173, 178, 188, 187, -1, 135, 136, - 163, 162, -1, 136, 141, 168, 163, -1, 141, 146, 173, 168, -1, 146, 151, 178, 173, -1, 151, 161, 188, 178, -1, 161, 160, 187, 188, -1, 160, 135, 162, 187, 162, 187, 188, 178, 173, 168, 163, -1, 189, 190, 195, 200, 205, 215, 214, -1, - 162, 163, 190, 189, -1, 163, 168, 195, 190, -1, 168, 173, 200, 195, -1, 173, 178, 205, 200, -1, 178, 188, 215, 205, -1, 188, 187, 214, 215, -1, 187, 162, 189, 214, 189, 214, 215, 205, 200, 195, 190, -1, 216, 217, 222, 227, 232, 242, - 241, -1, 189, 190, 217, 216, -1, 190, 195, 222, 217, -1, 195, 200, 227, 222, -1, 200, 205, 232, 227, -1, 205, 215, 242, 232, -1, 215, 214, 241, 242, -1, 214, 189, 216, 241, 216, 241, 242, 232, 227, 222, 217, -1, 243, 244, 249, 254, -259, 269, 268, -1, 216, 217, 244, 243, -1, 217, 222, 249, 244, -1, 222, 227, 254, 249, -1, 227, 232, 259, 254, -1, 232, 242, 269, 259, -1, 242, 241, 268, 269, -1, 241, 216, 243, 268, 243, 268, 269, 259, 254, 249, 244, -1, 270, 271, 276, - 281, 286, 296, 295, -1, 243, 244, 271, 270, -1, 244, 249, 276, 271, -1, 249, 254, 281, 276, -1, 254, 259, 286, 281, -1, 259, 269, 296, 286, -1, 269, 268, 295, 296, -1, 268, 243, 270, 295, 270, 295, 296, 286, 281, 276, 271, -1, 297, 298, - 303, 308, 313, 323, 322, -1, 270, 271, 298, 297, -1, 271, 276, 303, 298, -1, 276, 281, 308, 303, -1, 281, 286, 313, 308, -1, 286, 296, 323, 313, -1, 296, 295, 322, 323, -1, 295, 270, 297, 322, 297, 322, 323, 313, 308, 303, 298, -1, 324, - 325, 330, 335, 340, 350, 349, -1, 297, 298, 325, 324, -1, 298, 303, 330, 325, -1, 303, 308, 335, 330, -1, 308, 313, 340, 335, -1, 313, 323, 350, 340, -1, 323, 322, 349, 350, -1, 322, 297, 324, 349, 324, 349, 350, 340, 335, 330, 325, -1, - 351, 352, 357, 362, 367, 377, 376, -1, 324, 325, 352, 351, -1, 325, 330, 357, 352, -1, 330, 335, 362, 357, -1, 335, 340, 367, 362, -1, 340, 350, 377, 367, -1, 350, 349, 376, 377, -1, 349, 324, 351, 376, 351, 376, 377, 367, 362, 357, 352, - -1, 378, 379, 384, 389, 394, 404, 403, -1, 351, 352, 379, 378, -1, 352, 357, 384, 379, -1, 357, 362, 389, 384, -1, 362, 367, 394, 389, -1, 367, 377, 404, 394, -1, 377, 376, 403, 404, -1, 376, 351, 378, 403, 378, 403, 404, 394, 389, 384, - 379, -1, 405, 406, 411, 416, 421, 431, 430, -1, 378, 379, 406, 405, -1, 379, 384, 411, 406, -1, 384, 389, 416, 411, -1, 389, 394, 421, 416, -1, 394, 404, 431, 421, -1, 404, 403, 430, 431, -1, 403, 378, 405, 430, 405, 430, 431, 421, 416, - 411, 406, -1, 432, 433, 438, 443, 448, 458, 457, -1, 405, 406, 433, 432, -1, 406, 411, 438, 433, -1, 411, 416, 443, 438, -1, 416, 421, 448, 443, -1, 421, 431, 458, 448, -1, 431, 430, 457, 458, -1, 430, 405, 432, 457, 432, 457, 458, 448, - 443, 438, 433, -1, 459, 460, 465, 470, 475, 485, 484, -1, 432, 433, 460, 459, -1, 433, 438, 465, 460, -1, 438, 443, 470, 465, -1, 443, 448, 475, 470, -1, 448, 458, 485, 475, -1, 458, 457, 484, 485, -1, 457, 432, 459, 484, 459, 484, 485, - 475, 470, 465, 460, -1, 486, 487, 492, 497, 502, 512, 511, -1, 459, 460, 487, 486, -1, 460, 465, 492, 487, -1, 465, 470, 497, 492, -1, 470, 475, 502, 497, -1, 475, 485, 512, 502, -1, 485, 484, 511, 512, -1, 484, 459, 486, 511, 486, 511, - 512, 502, 497, 492, 487, -1, 513, 514, 519, 524, 529, 539, 538, -1, 486, 487, 514, 513, -1, 487, 492, 519, 514, -1, 492, 497, 524, 519, -1, 497, 502, 529, 524, -1, 502, 512, 539, 529, -1, 512, 511, 538, 539, -1, 511, 486, 513, 538, 513, - 538, 539, 529, 524, 519, 514, -1, 540, 541, 546, 551, 556, 566, 565, -1, 513, 514, 541, 540, -1, 514, 519, 546, 541, -1, 519, 524, 551, 546, -1, 524, 529, 556, 551, -1, 529, 539, 566, 556, -1, 539, 538, 565, 566, -1, 538, 513, 540, 565 -}; - -const double coordsTF[1701]={ - 0, 0, 0, 0.21606, 0, 0, 0.25207000000000002, 0, 0, 0.32408999999999999, 0, 0, 0.39610999999999996, 0, 0, 0.43212, 0, 0, 0.21606, 0.03601, 0, - 0.25207000000000002, 0.03601, 0, 0.32408999999999999, 0.03601, 0, 0.39610999999999996, 0.03601, 0, 0.43212, 0.03601, 0, 0.21606, 0.10803, 0, 0.25207000000000002, - 0.10803, 0, 0.32408999999999999, 0.10803, 0, 0.39610999999999996, 0.10803, 0, 0.43212, 0.10803, 0, 0.21606, 0.18004999999999999, 0, 0.25207000000000002, - 0.18004999999999999, 0, 0.32408999999999999, 0.18004999999999999, 0, 0.39610999999999996, 0.18004999999999999, 0, 0.43212, 0.18004999999999999, 0, - 0.25207000000000002, 0.21605999999999997, 0, 0.32408999999999999, 0.21605999999999997, 0, 0.39610999999999996, 0.21605999999999997, 0, 0.43212, - 0.21605999999999997, 0, 0, 0.21606, 0, 0.21606, 0.21606, 0, 0, 0, 0.21364999999999998, 0.21606, 0, 0.21364999999999998, 0.25207000000000002, 0, - 0.21364999999999998, 0.32408999999999999, 0, 0.21364999999999998, 0.39610999999999996, 0, 0.21364999999999998, 0.43212, 0, 0.21364999999999998, 0.21606, 0.03601, - 0.21364999999999998, 0.25207000000000002, 0.03601, 0.21364999999999998, 0.32408999999999999, 0.03601, 0.21364999999999998, 0.39610999999999996, 0.03601, - 0.21364999999999998, 0.43212, 0.03601, 0.21364999999999998, 0.21606, 0.10803, 0.21364999999999998, 0.25207000000000002, 0.10803, 0.21364999999999998, - 0.32408999999999999, 0.10803, 0.21364999999999998, 0.39610999999999996, 0.10803, 0.21364999999999998, 0.43212, 0.10803, 0.21364999999999998, 0.21606, - 0.18004999999999999, 0.21364999999999998, 0.25207000000000002, 0.18004999999999999, 0.21364999999999998, 0.32408999999999999, 0.18004999999999999, - 0.21364999999999998, 0.39610999999999996, 0.18004999999999999, 0.21364999999999998, 0.43212, 0.18004999999999999, 0.21364999999999998, 0.25207000000000002, - 0.21605999999999997, 0.21364999999999998, 0.32408999999999999, 0.21605999999999997, 0.21364999999999998, 0.39610999999999996, 0.21605999999999997, - 0.21364999999999998, 0.43212, 0.21605999999999997, 0.21364999999999998, 0, 0.21606, 0.21364999999999998, 0.21606, 0.21606, 0.21364999999999998, 0, 0, - 0.42729999999999996, 0.21606, 0, 0.42729999999999996, 0.25207000000000002, 0, 0.42729999999999996, 0.32408999999999999, 0, 0.42729999999999996, - 0.39610999999999996, 0, 0.42729999999999996, 0.43212, 0, 0.42729999999999996, 0.21606, 0.03601, 0.42729999999999996, 0.25207000000000002, 0.03601, - 0.42729999999999996, 0.32408999999999999, 0.03601, 0.42729999999999996, 0.39610999999999996, 0.03601, 0.42729999999999996, 0.43212, 0.03601, 0.42729999999999996, - 0.21606, 0.10803, 0.42729999999999996, 0.25207000000000002, 0.10803,0.42729999999999996, 0.32408999999999999, 0.10803, 0.42729999999999996, 0.39610999999999996, 0.10803, 0.42729999999999996, 0.43212, 0.10803, - 0.42729999999999996, 0.21606, 0.18004999999999999, 0.42729999999999996, 0.25207000000000002, 0.18004999999999999, 0.42729999999999996, 0.32408999999999999, - 0.18004999999999999, 0.42729999999999996, 0.39610999999999996, 0.18004999999999999, 0.42729999999999996, 0.43212, 0.18004999999999999, 0.42729999999999996, - 0.25207000000000002, 0.21605999999999997, 0.42729999999999996, 0.32408999999999999, 0.21605999999999997, 0.42729999999999996, 0.39610999999999996, - 0.21605999999999997, 0.42729999999999996, 0.43212, 0.21605999999999997, 0.42729999999999996, 0, 0.21606, 0.42729999999999996, 0.21606, 0.21606, - 0.42729999999999996, 0, 0, 0.64094999999999991, 0.21606, 0, 0.64094999999999991, 0.25207000000000002, 0, 0.64094999999999991, 0.32408999999999999, 0, - 0.64094999999999991, 0.39610999999999996, 0, 0.64094999999999991, 0.43212, 0, 0.64094999999999991, 0.21606, 0.03601, 0.64094999999999991, 0.25207000000000002, - 0.03601, 0.64094999999999991, 0.32408999999999999, 0.03601, 0.64094999999999991, 0.39610999999999996, 0.03601, 0.64094999999999991, 0.43212, 0.03601, - 0.64094999999999991, 0.21606, 0.10803, 0.64094999999999991, 0.25207000000000002, 0.10803, 0.64094999999999991, 0.32408999999999999, 0.10803, 0.64094999999999991, - 0.39610999999999996, 0.10803, 0.64094999999999991, 0.43212, 0.10803, 0.64094999999999991, 0.21606, 0.18004999999999999, 0.64094999999999991, 0.25207000000000002, - 0.18004999999999999, 0.64094999999999991, 0.32408999999999999, 0.18004999999999999, 0.64094999999999991, 0.39610999999999996, 0.18004999999999999, - 0.64094999999999991, 0.43212, 0.18004999999999999, 0.64094999999999991, 0.25207000000000002, 0.21605999999999997, 0.64094999999999991, 0.32408999999999999, - 0.21605999999999997, 0.64094999999999991, 0.39610999999999996, 0.21605999999999997, 0.64094999999999991, 0.43212, 0.21605999999999997, 0.64094999999999991, 0, - 0.21606, 0.64094999999999991, 0.21606, 0.21606, 0.64094999999999991, 0, 0, 0.85459999999999992, 0.21606, 0, 0.85459999999999992, 0.25207000000000002, 0, - 0.85459999999999992, 0.32408999999999999, 0, 0.85459999999999992, 0.39610999999999996, 0, 0.85459999999999992, 0.43212, 0, 0.85459999999999992, 0.21606, 0.03601, - 0.85459999999999992, 0.25207000000000002, 0.03601, 0.85459999999999992, 0.32408999999999999, 0.03601, 0.85459999999999992, 0.39610999999999996, 0.03601, - 0.85459999999999992, 0.43212, 0.03601, 0.85459999999999992, 0.21606, 0.10803, 0.85459999999999992, 0.25207000000000002, 0.10803, 0.85459999999999992, - 0.32408999999999999, 0.10803, 0.85459999999999992, 0.39610999999999996, 0.10803, 0.85459999999999992, 0.43212, 0.10803, 0.85459999999999992, 0.21606, - 0.18004999999999999, 0.85459999999999992, 0.25207000000000002, 0.18004999999999999, 0.85459999999999992, 0.32408999999999999, 0.18004999999999999, - 0.85459999999999992, 0.39610999999999996, 0.18004999999999999, 0.85459999999999992, 0.43212, 0.18004999999999999, 0.85459999999999992, 0.25207000000000002, - 0.21605999999999997, 0.85459999999999992, 0.32408999999999999, 0.21605999999999997, 0.85459999999999992, 0.39610999999999996, 0.21605999999999997, - 0.85459999999999992, 0.43212, 0.21605999999999997, 0.85459999999999992, 0,0.21606, 0.85459999999999992, 0.21606, 0.21606, 0.85459999999999992, 0, 0, 1.0682499999999999, 0.21606, 0, 1.0682499999999999, 0.25207000000000002, 0, - 1.0682499999999999, 0.32408999999999999, 0, 1.0682499999999999, 0.39610999999999996, 0, 1.0682499999999999, 0.43212, 0, 1.0682499999999999, 0.21606, 0.03601, - 1.0682499999999999, 0.25207000000000002, 0.03601, 1.0682499999999999, 0.32408999999999999, 0.03601, 1.0682499999999999, 0.39610999999999996, 0.03601, - 1.0682499999999999, 0.43212, 0.03601, 1.0682499999999999, 0.21606, 0.10803, 1.0682499999999999, 0.25207000000000002, 0.10803, 1.0682499999999999, - 0.32408999999999999, 0.10803, 1.0682499999999999, 0.39610999999999996, 0.10803, 1.0682499999999999, 0.43212, 0.10803, 1.0682499999999999, 0.21606, - 0.18004999999999999, 1.0682499999999999, 0.25207000000000002, 0.18004999999999999, 1.0682499999999999, 0.32408999999999999, 0.18004999999999999, - 1.0682499999999999, 0.39610999999999996, 0.18004999999999999, 1.0682499999999999, 0.43212, 0.18004999999999999, 1.0682499999999999, 0.25207000000000002, - 0.21605999999999997, 1.0682499999999999, 0.32408999999999999, 0.21605999999999997, 1.0682499999999999, 0.39610999999999996, 0.21605999999999997, - 1.0682499999999999, 0.43212, 0.21605999999999997, 1.0682499999999999, 0, 0.21606, 1.0682499999999999, 0.21606, 0.21606, 1.0682499999999999, 0, 0, - 1.2818999999999998, 0.21606, 0, 1.2818999999999998, 0.25207000000000002, 0, 1.2818999999999998, 0.32408999999999999, 0, 1.2818999999999998, 0.39610999999999996, - 0, 1.2818999999999998, 0.43212, 0, 1.2818999999999998, 0.21606, 0.03601, 1.2818999999999998, 0.25207000000000002, 0.03601, 1.2818999999999998, - 0.32408999999999999, 0.03601, 1.2818999999999998, 0.39610999999999996, 0.03601, 1.2818999999999998, 0.43212, 0.03601, 1.2818999999999998, 0.21606, 0.10803, - 1.2818999999999998, 0.25207000000000002, 0.10803, 1.2818999999999998, 0.32408999999999999, 0.10803, 1.2818999999999998, 0.39610999999999996, 0.10803, - 1.2818999999999998, 0.43212, 0.10803, 1.2818999999999998, 0.21606, 0.18004999999999999, 1.2818999999999998, 0.25207000000000002, 0.18004999999999999, - 1.2818999999999998, 0.32408999999999999, 0.18004999999999999, 1.2818999999999998, 0.39610999999999996, 0.18004999999999999, 1.2818999999999998, 0.43212, - 0.18004999999999999, 1.2818999999999998, 0.25207000000000002, 0.21605999999999997, 1.2818999999999998, 0.32408999999999999, 0.21605999999999997, - 1.2818999999999998, 0.39610999999999996, 0.21605999999999997, 1.2818999999999998, 0.43212, 0.21605999999999997, 1.2818999999999998, 0, 0.21606, - 1.2818999999999998, 0.21606, 0.21606, 1.2818999999999998, 0, 0, 1.4955499999999999, 0.21606, 0, 1.4955499999999999, 0.25207000000000002, 0, 1.4955499999999999, - 0.32408999999999999, 0, 1.4955499999999999, 0.39610999999999996, 0, 1.4955499999999999, 0.43212, 0, 1.4955499999999999, 0.21606, 0.03601, 1.4955499999999999, - 0.25207000000000002, 0.03601, 1.4955499999999999, 0.32408999999999999, 0.03601, 1.4955499999999999, 0.39610999999999996, 0.03601, 1.4955499999999999, 0.43212, - 0.03601, 1.4955499999999999,0.21606, 0.10803, 1.4955499999999999, 0.25207000000000002, 0.10803, 1.4955499999999999, 0.32408999999999999, 0.10803, 1.4955499999999999, - 0.39610999999999996, 0.10803, 1.4955499999999999, 0.43212, 0.10803, 1.4955499999999999, 0.21606, 0.18004999999999999, 1.4955499999999999, 0.25207000000000002, - 0.18004999999999999, 1.4955499999999999, 0.32408999999999999, 0.18004999999999999, 1.4955499999999999, 0.39610999999999996, 0.18004999999999999, - 1.4955499999999999, 0.43212, 0.18004999999999999, 1.4955499999999999, 0.25207000000000002, 0.21605999999999997, 1.4955499999999999, 0.32408999999999999, - 0.21605999999999997, 1.4955499999999999, 0.39610999999999996, 0.21605999999999997, 1.4955499999999999, 0.43212, 0.21605999999999997, 1.4955499999999999, 0, - 0.21606, 1.4955499999999999, 0.21606, 0.21606, 1.4955499999999999, 0, 0, 1.7091999999999998, 0.21606, 0, 1.7091999999999998, 0.25207000000000002, 0, - 1.7091999999999998, 0.32408999999999999, 0, 1.7091999999999998, 0.39610999999999996, 0, 1.7091999999999998, 0.43212, 0, 1.7091999999999998, 0.21606, 0.03601, - 1.7091999999999998, 0.25207000000000002, 0.03601, 1.7091999999999998, 0.32408999999999999, 0.03601, 1.7091999999999998, 0.39610999999999996, 0.03601, - 1.7091999999999998, 0.43212, 0.03601, 1.7091999999999998, 0.21606, 0.10803, 1.7091999999999998, 0.25207000000000002, 0.10803, 1.7091999999999998, - 0.32408999999999999, 0.10803, 1.7091999999999998, 0.39610999999999996, 0.10803, 1.7091999999999998, 0.43212, 0.10803, 1.7091999999999998, 0.21606, - 0.18004999999999999, 1.7091999999999998, 0.25207000000000002, 0.18004999999999999, 1.7091999999999998, 0.32408999999999999, 0.18004999999999999, - 1.7091999999999998, 0.39610999999999996, 0.18004999999999999, 1.7091999999999998, 0.43212, 0.18004999999999999, 1.7091999999999998, 0.25207000000000002, - 0.21605999999999997, 1.7091999999999998, 0.32408999999999999, 0.21605999999999997, 1.7091999999999998, 0.39610999999999996, 0.21605999999999997, - 1.7091999999999998, 0.43212, 0.21605999999999997, 1.7091999999999998, 0, 0.21606, 1.7091999999999998, 0.21606, 0.21606, 1.7091999999999998, 0, 0, - 1.9228499999999997, 0.21606, 0, 1.9228499999999997, 0.25207000000000002, 0, 1.9228499999999997, 0.32408999999999999, 0, 1.9228499999999997, 0.39610999999999996, - 0, 1.9228499999999997, 0.43212, 0, 1.9228499999999997, 0.21606, 0.03601, 1.9228499999999997, 0.25207000000000002, 0.03601, 1.9228499999999997, - 0.32408999999999999, 0.03601, 1.9228499999999997, 0.39610999999999996, 0.03601, 1.9228499999999997, 0.43212, 0.03601, 1.9228499999999997, 0.21606, 0.10803, - 1.9228499999999997, 0.25207000000000002, 0.10803, 1.9228499999999997, 0.32408999999999999, 0.10803, 1.9228499999999997, 0.39610999999999996, 0.10803, - 1.9228499999999997, 0.43212, 0.10803, 1.9228499999999997, 0.21606, 0.18004999999999999, 1.9228499999999997, 0.25207000000000002, 0.18004999999999999, - 1.9228499999999997, 0.32408999999999999, 0.18004999999999999, 1.9228499999999997, 0.39610999999999996, 0.18004999999999999, 1.9228499999999997, 0.43212, - 0.18004999999999999, 1.9228499999999997, 0.25207000000000002, 0.21605999999999997, 1.9228499999999997, 0.32408999999999999, 0.21605999999999997, - 1.9228499999999997, 0.39610999999999996, 0.21605999999999997,1.9228499999999997, 0.43212, 0.21605999999999997, 1.9228499999999997, 0, 0.21606, 1.9228499999999997, 0.21606, 0.21606, 1.9228499999999997, 0, 0, - 2.1364999999999998, 0.21606, 0, 2.1364999999999998, 0.25207000000000002, 0, 2.1364999999999998, 0.32408999999999999, 0, 2.1364999999999998, 0.39610999999999996, - 0, 2.1364999999999998, 0.43212, 0, 2.1364999999999998, 0.21606, 0.03601, 2.1364999999999998, 0.25207000000000002, 0.03601, 2.1364999999999998, - 0.32408999999999999, 0.03601, 2.1364999999999998, 0.39610999999999996, 0.03601, 2.1364999999999998, 0.43212, 0.03601, 2.1364999999999998, 0.21606, 0.10803, - 2.1364999999999998, 0.25207000000000002, 0.10803, 2.1364999999999998, 0.32408999999999999, 0.10803, 2.1364999999999998, 0.39610999999999996, 0.10803, - 2.1364999999999998, 0.43212, 0.10803, 2.1364999999999998, 0.21606, 0.18004999999999999, 2.1364999999999998, 0.25207000000000002, 0.18004999999999999, - 2.1364999999999998, 0.32408999999999999, 0.18004999999999999, 2.1364999999999998, 0.39610999999999996, 0.18004999999999999, 2.1364999999999998, 0.43212, - 0.18004999999999999, 2.1364999999999998, 0.25207000000000002, 0.21605999999999997, 2.1364999999999998, 0.32408999999999999, 0.21605999999999997, - 2.1364999999999998, 0.39610999999999996, 0.21605999999999997, 2.1364999999999998, 0.43212, 0.21605999999999997, 2.1364999999999998, 0, 0.21606, - 2.1364999999999998, 0.21606, 0.21606, 2.1364999999999998, 0, 0, 2.3501499999999997, 0.21606, 0, 2.3501499999999997, 0.25207000000000002, 0, 2.3501499999999997, - 0.32408999999999999, 0, 2.3501499999999997, 0.39610999999999996, 0, 2.3501499999999997, 0.43212, 0, 2.3501499999999997, 0.21606, 0.03601, 2.3501499999999997, - 0.25207000000000002, 0.03601, 2.3501499999999997, 0.32408999999999999, 0.03601, 2.3501499999999997, 0.39610999999999996, 0.03601, 2.3501499999999997, 0.43212, - 0.03601, 2.3501499999999997, 0.21606, 0.10803, 2.3501499999999997, 0.25207000000000002, 0.10803, 2.3501499999999997, 0.32408999999999999, 0.10803, - 2.3501499999999997, 0.39610999999999996, 0.10803, 2.3501499999999997, 0.43212, 0.10803, 2.3501499999999997, 0.21606, 0.18004999999999999, 2.3501499999999997, - 0.25207000000000002, 0.18004999999999999, 2.3501499999999997, 0.32408999999999999, 0.18004999999999999, 2.3501499999999997, 0.39610999999999996, - 0.18004999999999999, 2.3501499999999997, 0.43212, 0.18004999999999999, 2.3501499999999997, 0.25207000000000002, 0.21605999999999997, 2.3501499999999997, - 0.32408999999999999, 0.21605999999999997, 2.3501499999999997, 0.39610999999999996, 0.21605999999999997, 2.3501499999999997, 0.43212, 0.21605999999999997, - 2.3501499999999997, 0, 0.21606, 2.3501499999999997, 0.21606, 0.21606, 2.3501499999999997, 0, 0, 2.5637999999999996, 0.21606, 0, 2.5637999999999996, - 0.25207000000000002, 0, 2.5637999999999996, 0.32408999999999999, 0, 2.5637999999999996, 0.39610999999999996, 0, 2.5637999999999996, 0.43212, 0, - 2.5637999999999996, 0.21606, 0.03601, 2.5637999999999996, 0.25207000000000002, 0.03601, 2.5637999999999996, 0.32408999999999999, 0.03601, 2.5637999999999996, - 0.39610999999999996,0.03601, 2.5637999999999996, 0.43212, 0.03601, 2.5637999999999996, 0.21606, 0.10803, 2.5637999999999996, 0.25207000000000002, 0.10803, 2.5637999999999996, - 0.32408999999999999, 0.10803, 2.5637999999999996, 0.39610999999999996, 0.10803, 2.5637999999999996, 0.43212, 0.10803, 2.5637999999999996, 0.21606, - 0.18004999999999999, 2.5637999999999996, 0.25207000000000002, 0.18004999999999999, 2.5637999999999996, 0.32408999999999999, 0.18004999999999999, - 2.5637999999999996, 0.39610999999999996, 0.18004999999999999, 2.5637999999999996, 0.43212, 0.18004999999999999, 2.5637999999999996, 0.25207000000000002, - 0.21605999999999997, 2.5637999999999996, 0.32408999999999999, 0.21605999999999997, 2.5637999999999996, 0.39610999999999996, 0.21605999999999997, - 2.5637999999999996, 0.43212, 0.21605999999999997, 2.5637999999999996, 0, 0.21606, 2.5637999999999996, 0.21606, 0.21606, 2.5637999999999996, 0, 0, - 2.7774499999999995, 0.21606, 0, 2.7774499999999995, 0.25207000000000002, 0, 2.7774499999999995, 0.32408999999999999, 0, 2.7774499999999995, 0.39610999999999996, - 0, 2.7774499999999995, 0.43212, 0, 2.7774499999999995, 0.21606, 0.03601, 2.7774499999999995, 0.25207000000000002, 0.03601, 2.7774499999999995, - 0.32408999999999999, 0.03601, 2.7774499999999995, 0.39610999999999996, 0.03601, 2.7774499999999995, 0.43212, 0.03601, 2.7774499999999995, 0.21606, 0.10803, - 2.7774499999999995, 0.25207000000000002, 0.10803, 2.7774499999999995, 0.32408999999999999, 0.10803, 2.7774499999999995, 0.39610999999999996, 0.10803, - 2.7774499999999995, 0.43212, 0.10803, 2.7774499999999995, 0.21606, 0.18004999999999999, 2.7774499999999995, 0.25207000000000002, 0.18004999999999999, - 2.7774499999999995, 0.32408999999999999, 0.18004999999999999, 2.7774499999999995, 0.39610999999999996, 0.18004999999999999, 2.7774499999999995, 0.43212, - 0.18004999999999999, 2.7774499999999995, 0.25207000000000002, 0.21605999999999997, 2.7774499999999995, 0.32408999999999999, 0.21605999999999997, - 2.7774499999999995, 0.39610999999999996, 0.21605999999999997, 2.7774499999999995, 0.43212, 0.21605999999999997, 2.7774499999999995, 0, 0.21606, - 2.7774499999999995, 0.21606, 0.21606, 2.7774499999999995, 0, 0, 2.9910999999999999, 0.21606, 0, 2.9910999999999999, 0.25207000000000002, 0, 2.9910999999999999, - 0.32408999999999999, 0, 2.9910999999999999, 0.39610999999999996, 0, 2.9910999999999999, 0.43212, 0, 2.9910999999999999, 0.21606, 0.03601, 2.9910999999999999, - 0.25207000000000002, 0.03601, 2.9910999999999999, 0.32408999999999999, 0.03601, 2.9910999999999999, 0.39610999999999996, 0.03601, 2.9910999999999999, 0.43212, - 0.03601, 2.9910999999999999, 0.21606, 0.10803, 2.9910999999999999, 0.25207000000000002, 0.10803, 2.9910999999999999, 0.32408999999999999, 0.10803, - 2.9910999999999999, 0.39610999999999996, 0.10803, 2.9910999999999999, 0.43212, 0.10803, 2.9910999999999999, 0.21606, 0.18004999999999999, 2.9910999999999999, - 0.25207000000000002, 0.18004999999999999, 2.9910999999999999, 0.32408999999999999, 0.18004999999999999, 2.9910999999999999, 0.39610999999999996, - 0.18004999999999999, 2.9910999999999999, 0.43212, 0.18004999999999999, 2.9910999999999999, 0.25207000000000002, 0.21605999999999997, 2.9910999999999999, - 0.32408999999999999, 0.21605999999999997, 2.9910999999999999, 0.39610999999999996, 0.21605999999999997, 2.9910999999999999, 0.43212, 0.21605999999999997, - 2.9910999999999999, 0, 0.21606, 2.9910999999999999, 0.21606, 0.21606, 2.9910999999999999, 0, 0, 3.2047499999999998, 0.21606, 0, 3.2047499999999998, - 0.25207000000000002, 0, 3.2047499999999998, 0.32408999999999999, 0, 3.2047499999999998, 0.39610999999999996, 0, 3.2047499999999998, 0.43212, 0, - 3.2047499999999998, 0.21606, 0.03601, 3.2047499999999998, 0.25207000000000002, 0.03601, 3.2047499999999998, 0.32408999999999999, 0.03601, 3.2047499999999998, - 0.39610999999999996, 0.03601, 3.2047499999999998, 0.43212, 0.03601, 3.2047499999999998, 0.21606, 0.10803, 3.2047499999999998, 0.25207000000000002, 0.10803, - 3.2047499999999998, 0.32408999999999999, 0.10803, 3.2047499999999998, 0.39610999999999996, 0.10803, 3.2047499999999998, 0.43212, 0.10803, 3.2047499999999998, - 0.21606, 0.18004999999999999, 3.2047499999999998, 0.25207000000000002, 0.18004999999999999, 3.2047499999999998, 0.32408999999999999, 0.18004999999999999, - 3.2047499999999998, 0.39610999999999996, 0.18004999999999999, 3.2047499999999998, 0.43212, 0.18004999999999999, 3.2047499999999998, 0.25207000000000002, - 0.21605999999999997, 3.2047499999999998, 0.32408999999999999, 0.21605999999999997, 3.2047499999999998, 0.39610999999999996, 0.21605999999999997, - 3.2047499999999998, 0.43212, 0.21605999999999997, 3.2047499999999998, 0, 0.21606, 3.2047499999999998, 0.21606, 0.21606, 3.2047499999999998, 0, 0, - 3.4183999999999997, 0.21606, 0, 3.4183999999999997, 0.25207000000000002, 0, 3.4183999999999997, 0.32408999999999999, 0, 3.4183999999999997, 0.39610999999999996, - 0, 3.4183999999999997, 0.43212, 0, 3.4183999999999997, 0.21606, 0.03601, 3.4183999999999997, 0.25207000000000002, 0.03601, 3.4183999999999997, - 0.32408999999999999, 0.03601, 3.4183999999999997, 0.39610999999999996, 0.03601, 3.4183999999999997, 0.43212, 0.03601, 3.4183999999999997, 0.21606, 0.10803, - 3.4183999999999997, 0.25207000000000002, 0.10803, 3.4183999999999997, 0.32408999999999999, 0.10803, 3.4183999999999997, 0.39610999999999996, 0.10803, - 3.4183999999999997, 0.43212, 0.10803, 3.4183999999999997, 0.21606, 0.18004999999999999, 3.4183999999999997, 0.25207000000000002, 0.18004999999999999, - 3.4183999999999997, 0.32408999999999999, 0.18004999999999999, 3.4183999999999997, 0.39610999999999996, 0.18004999999999999, 3.4183999999999997, 0.43212, - 0.18004999999999999, 3.4183999999999997, 0.25207000000000002, 0.21605999999999997, 3.4183999999999997, 0.32408999999999999, 0.21605999999999997, - 3.4183999999999997, 0.39610999999999996, 0.21605999999999997, 3.4183999999999997, 0.43212, 0.21605999999999997, 3.4183999999999997, 0, 0.21606, - 3.4183999999999997, 0.21606, 0.21606, 3.4183999999999997, 0, 0, 3.6320499999999996, 0.21606, 0, 3.6320499999999996, 0.25207000000000002, 0, 3.6320499999999996, - 0.32408999999999999, 0, 3.6320499999999996, 0.39610999999999996, 0, 3.6320499999999996, 0.43212, 0, 3.6320499999999996, 0.21606, 0.03601, 3.6320499999999996, - 0.25207000000000002, 0.03601, 3.6320499999999996, 0.32408999999999999, 0.03601, 3.6320499999999996, 0.39610999999999996, 0.03601, 3.6320499999999996, 0.43212, 0.03601, - 3.6320499999999996, 0.21606, 0.10803, 3.6320499999999996, 0.25207000000000002, 0.10803, 3.6320499999999996, 0.32408999999999999, 0.10803, 3.6320499999999996, - 0.39610999999999996, 0.10803, 3.6320499999999996, 0.43212, 0.10803, 3.6320499999999996, 0.21606, 0.18004999999999999, 3.6320499999999996, 0.25207000000000002, - 0.18004999999999999, 3.6320499999999996, 0.32408999999999999, 0.18004999999999999, 3.6320499999999996, 0.39610999999999996, 0.18004999999999999, - 3.6320499999999996, 0.43212, 0.18004999999999999, 3.6320499999999996, 0.25207000000000002, 0.21605999999999997, 3.6320499999999996, 0.32408999999999999, - 0.21605999999999997, 3.6320499999999996, 0.39610999999999996, 0.21605999999999997, 3.6320499999999996, 0.43212, 0.21605999999999997, 3.6320499999999996, 0, - 0.21606, 3.6320499999999996, 0.21606, 0.21606, 3.6320499999999996, 0, 0, 3.8456999999999995, 0.21606, 0, 3.8456999999999995, 0.25207000000000002, 0, - 3.8456999999999995, 0.32408999999999999, 0, 3.8456999999999995, 0.39610999999999996, 0, 3.8456999999999995, 0.43212, 0, 3.8456999999999995, 0.21606, 0.03601, - 3.8456999999999995, 0.25207000000000002, 0.03601, 3.8456999999999995, 0.32408999999999999, 0.03601, 3.8456999999999995, 0.39610999999999996, 0.03601, - 3.8456999999999995, 0.43212, 0.03601, 3.8456999999999995, 0.21606, 0.10803, 3.8456999999999995, 0.25207000000000002, 0.10803, 3.8456999999999995, - 0.32408999999999999, 0.10803, 3.8456999999999995, 0.39610999999999996, 0.10803, 3.8456999999999995, 0.43212, 0.10803, 3.8456999999999995, 0.21606, - 0.18004999999999999, 3.8456999999999995, 0.25207000000000002, 0.18004999999999999, 3.8456999999999995, 0.32408999999999999, 0.18004999999999999, - 3.8456999999999995, 0.39610999999999996, 0.18004999999999999, 3.8456999999999995, 0.43212, 0.18004999999999999, 3.8456999999999995, 0.25207000000000002, - 0.21605999999999997, 3.8456999999999995, 0.32408999999999999, 0.21605999999999997, 3.8456999999999995, 0.39610999999999996, 0.21605999999999997, - 3.8456999999999995, 0.43212, 0.21605999999999997, 3.8456999999999995, 0, 0.21606, 3.8456999999999995, 0.21606, 0.21606, 3.8456999999999995, 0, 0, - 4.0593499999999993, 0.21606, 0, 4.0593499999999993, 0.25207000000000002, 0, 4.0593499999999993, 0.32408999999999999, 0, 4.0593499999999993, 0.39610999999999996, - 0, 4.0593499999999993, 0.43212, 0, 4.0593499999999993, 0.21606, 0.03601, 4.0593499999999993, 0.25207000000000002, 0.03601, 4.0593499999999993, - 0.32408999999999999, 0.03601, 4.0593499999999993, 0.39610999999999996, 0.03601, 4.0593499999999993, 0.43212, 0.03601, 4.0593499999999993, 0.21606, 0.10803, - 4.0593499999999993, 0.25207000000000002, 0.10803, 4.0593499999999993, 0.32408999999999999, 0.10803, 4.0593499999999993, 0.39610999999999996, 0.10803, - 4.0593499999999993, 0.43212, 0.10803, 4.0593499999999993, 0.21606, 0.18004999999999999, 4.0593499999999993, 0.25207000000000002, 0.18004999999999999, - 4.0593499999999993, 0.32408999999999999, 0.18004999999999999, 4.0593499999999993, 0.39610999999999996, 0.18004999999999999, 4.0593499999999993, 0.43212, - 0.18004999999999999, 4.0593499999999993, 0.25207000000000002, 0.21605999999999997, 4.0593499999999993, 0.32408999999999999, 0.21605999999999997, - 4.0593499999999993, 0.39610999999999996, 0.21605999999999997, 4.0593499999999993, 0.43212, 0.21605999999999997, 4.0593499999999993, 0, 0.21606, - 4.0593499999999993, 0.21606, 0.21606, 4.0593499999999993, 0, 0, 4.2729999999999997, 0.21606, 0, 4.2729999999999997, 0.25207000000000002, 0, 4.2729999999999997, - 0.32408999999999999, 0, 4.2729999999999997, 0.39610999999999996, 0, 4.2729999999999997, 0.43212, 0, 4.2729999999999997, 0.21606, 0.03601, 4.2729999999999997, - 0.25207000000000002, 0.03601, 4.2729999999999997, 0.32408999999999999, 0.03601, 4.2729999999999997, 0.39610999999999996, 0.03601, 4.2729999999999997, 0.43212, - 0.03601, 4.2729999999999997, 0.21606, 0.10803, 4.2729999999999997, 0.25207000000000002, 0.10803, 4.2729999999999997, 0.32408999999999999, 0.10803, - 4.2729999999999997, 0.39610999999999996, 0.10803, 4.2729999999999997, 0.43212, 0.10803, 4.2729999999999997, 0.21606, 0.18004999999999999, 4.2729999999999997, - 0.25207000000000002, 0.18004999999999999, 4.2729999999999997, 0.32408999999999999, 0.18004999999999999, 4.2729999999999997, 0.39610999999999996, - 0.18004999999999999, 4.2729999999999997, 0.43212, 0.18004999999999999, 4.2729999999999997, 0.25207000000000002, 0.21605999999999997, 4.2729999999999997, - 0.32408999999999999, 0.21605999999999997, 4.2729999999999997, 0.39610999999999996, 0.21605999999999997, 4.2729999999999997, 0.43212, 0.21605999999999997, - 4.2729999999999997, 0, 0.21606, 4.2729999999999997, 0.21606, 0.21606, 4.2729999999999997 -}; - -const int connTFPOLH_I[21]={0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000}; diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTestInterp.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTestInterp.cxx deleted file mode 100644 index b60b3e066..000000000 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTestInterp.cxx +++ /dev/null @@ -1,2213 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "MEDCouplingBasicsTest.hxx" -#include "MEDCouplingUMesh.hxx" -#include "MEDCouplingExtrudedMesh.hxx" -#include "MEDCouplingFieldDouble.hxx" -#include "MEDCouplingMemArray.hxx" -#include "Interpolation2D.txx" -#include "Interpolation3DSurf.txx" -#include "Interpolation3D.txx" -#include "InterpolationCC.txx" -#include "InterpolationCU.txx" -#include "Interpolation2DCurve.txx" -#include "Interpolation1D.txx" - -#include "MEDCouplingNormalizedUnstructuredMesh.txx" -#include "MEDCouplingNormalizedCartesianMesh.txx" - -#include -#include - -using namespace ParaMEDMEM; - -void MEDCouplingBasicsTest::test2DInterpP0P0_1() -{ - MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build2DTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2D myInterpolator; - std::vector > res; - INTERP_KERNEL::IntersectionType types[3]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Convex, INTERP_KERNEL::Geometric2D}; - for(int i=0;i<3;i++) - { - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(types[i]); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[3][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,sumAll(res),1e-12); - res.clear(); - } - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DInterpP0P0PL_1() -{ - MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build2DTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2D myInterpolator; - std::vector > res; - // - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,sumAll(res),1e-12); - // - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DInterpP0P0PL_2() -{ - MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build2DTargetMesh_1(); - // - std::vector cellsIds(targetMesh->getNumberOfCells()); - for(int i=0;igetNumberOfCells();i++) - cellsIds[i]=i; - targetMesh->convertToPolyTypes(cellsIds); - // - MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2D myInterpolator; - std::vector > res; - // - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,sumAll(res),1e-12); - // - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DInterpP0P0PL_3() -{ - MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build2DTargetMesh_1(); - // - std::vector cellsIds(sourceMesh->getNumberOfCells()); - for(int i=0;igetNumberOfCells();i++) - cellsIds[i]=i; - sourceMesh->convertToPolyTypes(cellsIds); - // - MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2D myInterpolator; - std::vector > res; - // - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,sumAll(res),1e-12); - // - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DInterpP0P0PL_4() -{ - MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build2DTargetMesh_1(); - // - std::vector cellsIds(sourceMesh->getNumberOfCells()); - for(int i=0;igetNumberOfCells();i++) - cellsIds[i]=i; - sourceMesh->convertToPolyTypes(cellsIds); - cellsIds.resize(targetMesh->getNumberOfCells()); - for(int i=0;igetNumberOfCells();i++) - cellsIds[i]=i; - targetMesh->convertToPolyTypes(cellsIds); - // - MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2D myInterpolator; - std::vector > res; - // - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,sumAll(res),1e-12); - // - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DInterpP0P1_1() -{ - MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build2DTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2D myInterpolator; - std::vector > res; - INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D}; - for(int i=0;i<2;i++) - { - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(types[i]); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P1"); - CPPUNIT_ASSERT_EQUAL(9,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.083333333333333329,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666,res[3][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666,res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666,res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[5][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.083333333333333329,res[6][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666,res[7][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664,res[8][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664,res[8][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.25,sumAll(res),1e-12); - res.clear(); - } - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DInterpP0P1PL_1() -{ - MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build2DTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2D myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P1"); - CPPUNIT_ASSERT_EQUAL(9,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[5][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[6][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[8][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[8][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(12.,sumAll(res),1e-12); - res.clear(); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DInterpP0P1PL_2() -{ - MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build2DTargetMesh_1(); - // - std::vector cellsIds(sourceMesh->getNumberOfCells()); - for(int i=0;igetNumberOfCells();i++) - cellsIds[i]=i; - sourceMesh->convertToPolyTypes(cellsIds); - // - cellsIds.resize(targetMesh->getNumberOfCells()); - for(int i=0;igetNumberOfCells();i++) - cellsIds[i]=i; - targetMesh->convertToPolyTypes(cellsIds); - // - MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2D myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P1"); - CPPUNIT_ASSERT_EQUAL(9,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[5][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[6][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[8][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[8][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(12.,sumAll(res),1e-12); - res.clear(); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DInterpP1P0_1() -{ - MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build2DTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2D myInterpolator; - std::vector > res; - INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D}; - for(int i=0;i<2;i++) - { - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(types[i]); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664,res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664,res[3][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.083333333333333333,res[1][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.083333333333333333,res[2][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.166666666666666667,res[3][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664,res[2][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664,res[3][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[4][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,sumAll(res),1e-12); - res.clear(); - } - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DInterpP1P0PL_1() -{ - MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build2DTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2D myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.5,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,res[0][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[0][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.333333333333333333,res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[1][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.166666666666666666,res[1][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.166666666666666666,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[2][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.333333333333333333,res[2][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[3][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[3][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[3][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,res[4][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.5,res[4][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,sumAll(res),1e-12); - res.clear(); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DInterpP1P0PL_2() -{ - MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build2DTargetMesh_1(); - // - std::vectorcellsIds(targetMesh->getNumberOfCells()); - for(int i=0;igetNumberOfCells();i++) - cellsIds[i]=i; - targetMesh->convertToPolyTypes(cellsIds); - // - MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2D myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.5,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,res[0][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[0][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.333333333333333333,res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[1][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.166666666666666666,res[1][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.166666666666666666,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[2][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.333333333333333333,res[2][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[3][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[3][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[3][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,res[4][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.5,res[4][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,sumAll(res),1e-12); - res.clear(); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DInterpP1P1_1() -{ - MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build2DTargetMesh_2(); - // - MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2D myInterpolator; - std::vector > res; - INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D}; - for(int i=0;i<2;i++) - { - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(types[i]); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P1"); - CPPUNIT_ASSERT_EQUAL(9,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.08333333333333334,res[0][0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.05416666666666665,res[1][0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.02916666666666666,res[1][1],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.08333333333333334,res[2][1],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.05416666666666665,res[3][0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.02916666666666668,res[3][2],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.1416666666666666,res[4][0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.02499999999999999,res[4][1],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.02499999999999999,res[4][2],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.09999999999999999,res[4][3],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.02916666666666666,res[5][1],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.09583333333333333,res[5][3],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.08333333333333333,res[6][2],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.02916666666666667,res[7][2],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.09583333333333331,res[7][3],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.04166666666666668,res[8][3],1.e-12); - res.clear(); - } - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DInterpP1P1PL_1() -{ - MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build2DTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2D myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P1"); - CPPUNIT_ASSERT_EQUAL(9,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(2.,res[0][0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][1],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(2.,res[2][1],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][2],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(5.,res[4][0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(5.,res[4][3],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[5][1],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[5][3],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[6][2],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][2],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][3],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(2.,res[8][3],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(25.,sumAll(res),1e-12); - res.clear(); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DSurfInterpP0P0_1() -{ - MEDCouplingUMesh *sourceMesh=build3DSurfSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build3DSurfTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3DSurf myInterpolator; - std::vector > res; - INTERP_KERNEL::IntersectionType types[3]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D}; - for(int i=0;i<2;i++) - { - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(types[i]); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25*sqrt(2.),res[3][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.*sqrt(2.),sumAll(res),1e-12); - res.clear(); - } - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DSurfInterpP0P0PL_1() -{ - MEDCouplingUMesh *sourceMesh=build3DSurfSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build3DSurfTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3DSurf myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,sumAll(res),1e-12); - res.clear(); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DSurfInterpP0P1_1() -{ - MEDCouplingUMesh *sourceMesh=build3DSurfSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build3DSurfTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3DSurf myInterpolator; - std::vector > res; - INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D}; - for(int i=0;i<2;i++) - { - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(types[i]); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P1"); - CPPUNIT_ASSERT_EQUAL(9,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664*sqrt(2.),res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664*sqrt(2.),res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.083333333333333329*sqrt(2.),res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666*sqrt(2.),res[3][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666*sqrt(2.),res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666*sqrt(2.),res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[5][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.083333333333333329*sqrt(2.),res[6][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666*sqrt(2.),res[7][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664*sqrt(2.),res[8][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664*sqrt(2.),res[8][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.25*sqrt(2.),sumAll(res),1e-12); - res.clear(); - } - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DSurfInterpP0P1PL_1() -{ - MEDCouplingUMesh *sourceMesh=build3DSurfSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build3DSurfTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3DSurf myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P1"); - CPPUNIT_ASSERT_EQUAL(9,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[5][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[6][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[8][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[8][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(12.,sumAll(res),1e-12); - res.clear(); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DSurfInterpP1P0_1() -{ - MEDCouplingUMesh *sourceMesh=build3DSurfSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build3DSurfTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3DSurf myInterpolator; - std::vector > res; - INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D}; - for(int i=0;i<2;i++) - { - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(types[i]); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25*sqrt(2.),res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664*sqrt(2.),res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664*sqrt(2.),res[3][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.083333333333333333*sqrt(2.),res[1][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.083333333333333333*sqrt(2.),res[2][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.166666666666666667*sqrt(2.),res[3][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664*sqrt(2.),res[2][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664*sqrt(2.),res[3][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25*sqrt(2.),res[4][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.*sqrt(2.),sumAll(res),1e-12); - res.clear(); - } - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DSurfInterpP1P0PL_1() -{ - MEDCouplingUMesh *sourceMesh=build3DSurfSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build3DSurfTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3DSurf myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.5,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,res[0][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[0][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.333333333333333333,res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[1][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.166666666666666666,res[1][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.166666666666666666,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[2][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.333333333333333333,res[2][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[3][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[3][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[3][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,res[4][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.5,res[4][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,sumAll(res),1e-12); - res.clear(); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DSurfInterpP1P1_1() -{ - MEDCouplingUMesh *sourceMesh=build3DSurfSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build3DSurfTargetMesh_2(); - // - MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3DSurf myInterpolator; - std::vector > res; - INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D}; - for(int i=0;i<2;i++) - { - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(types[i]); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P1"); - CPPUNIT_ASSERT_EQUAL(9,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.08333333333333334*sqrt(2.),res[0][0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.05416666666666665*sqrt(2.),res[1][0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.02916666666666666*sqrt(2.),res[1][1],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.08333333333333334*sqrt(2.),res[2][1],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.05416666666666665*sqrt(2.),res[3][0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.02916666666666668*sqrt(2.),res[3][2],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.1416666666666666*sqrt(2.),res[4][0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.02499999999999999*sqrt(2.),res[4][1],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.02499999999999999*sqrt(2.),res[4][2],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.09999999999999999*sqrt(2.),res[4][3],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.02916666666666666*sqrt(2.),res[5][1],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.09583333333333333*sqrt(2.),res[5][3],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.08333333333333333*sqrt(2.),res[6][2],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.02916666666666667*sqrt(2.),res[7][2],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.09583333333333331*sqrt(2.),res[7][3],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.04166666666666668*sqrt(2.),res[8][3],1.e-12); - res.clear(); - } - // - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DSurfInterpP1P1PL_1() -{ - MEDCouplingUMesh *sourceMesh=build3DSurfSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build3DSurfTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3DSurf myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P1"); - CPPUNIT_ASSERT_EQUAL(9,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(2.,res[0][0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][1],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(2.,res[2][1],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][2],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(5.,res[4][0],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(5.,res[4][3],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[5][1],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[5][3],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[6][2],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][2],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][3],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(2.,res[8][3],1.e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(25.,sumAll(res),1e-12); - res.clear(); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DSurfInterpP0P0_2() -{ - MEDCouplingUMesh *sourceMesh=build3DSurfSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build3DSurfTargetMeshPerm_1(); - // - MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3DSurf myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::Triangulation); - { - myInterpolator.setOrientation(2); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25*sqrt(2.),res[3][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.*sqrt(2.),sumAll(res),1e-12); - res.clear(); - } - { - myInterpolator.setOrientation(0); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.125*sqrt(2.),res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25*sqrt(2.),res[3][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.75*sqrt(2.),sumAll(res),1e-12); - res.clear(); - } - { - myInterpolator.setOrientation(1); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25*sqrt(2.),res[3][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.875*sqrt(2.),sumAll(res),1e-12); - res.clear(); - } - { - myInterpolator.setOrientation(-1); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),sumAll(res),1e-12); - res.clear(); - } - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -/*! - * Test of precision option implemented by Fabien that represents distance of "barycenter" to the other cell. - */ -void MEDCouplingBasicsTest::test3DSurfInterpP0P0_3() -{ - INTERP_KERNEL::Interpolation3DSurf myInterpolator; - std::vector > res; - double vecTrans[3]={0.,0.,1.e-10}; - double vec[3]={0.,-1.,0.}; - double pt[3]={-0.3,-0.3,5.e-11}; - const int N=32; - const double deltaA=M_PI/N; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::Triangulation); - myInterpolator.setMaxDistance3DSurfIntersect(1e-9); - for(int i=0;irotate(pt,vec,i*deltaA); - MEDCouplingUMesh *targetMesh=build3DSurfSourceMesh_2(); - targetMesh->translate(vecTrans); - targetMesh->rotate(pt,vec,i*deltaA); - MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(2,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,sumAll(res),1e-12); - sourceMesh->decrRef(); - targetMesh->decrRef(); - } - // - myInterpolator.setMaxDistance3DSurfIntersect(1e-11); - for(int i=0;irotate(pt,vec,i*deltaA); - MEDCouplingUMesh *targetMesh=build3DSurfSourceMesh_2(); - targetMesh->translate(vecTrans); - targetMesh->rotate(pt,vec,i*deltaA); - MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(2,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,sumAll(res),1e-12); - sourceMesh->decrRef(); - targetMesh->decrRef(); - } - // - res.clear(); - myInterpolator.setMaxDistance3DSurfIntersect(-1.);//unactivate fabien lookup - MEDCouplingUMesh *sourceMesh=build3DSurfSourceMesh_2(); - MEDCouplingUMesh *targetMesh=build3DSurfSourceMesh_2(); - targetMesh->translate(vecTrans); - myInterpolator.setBoundingBoxAdjustment(1e-11); - MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper0(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper0(targetMesh); - myInterpolator.interpolateMeshes(sourceWrapper0,targetWrapper0,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(2,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,sumAll(res),1e-12); - sourceMesh->decrRef(); - targetMesh->decrRef(); - // - res.clear(); - sourceMesh=build3DSurfSourceMesh_2(); - targetMesh=build3DSurfSourceMesh_2(); - targetMesh->translate(vecTrans); - myInterpolator.setBoundingBoxAdjustment(1e-9); - MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper1(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper1(targetMesh); - myInterpolator.interpolateMeshes(sourceWrapper1,targetWrapper1,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(2,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,sumAll(res),1e-12); - sourceMesh->decrRef(); - targetMesh->decrRef(); - //keeping the same bbox adj == 1.e-11 but trying rotation - res.clear(); - sourceMesh=build3DSurfSourceMesh_2(); - sourceMesh->rotate(pt,vec,M_PI/4.); - targetMesh=build3DSurfSourceMesh_2(); - targetMesh->translate(vecTrans); - targetMesh->rotate(pt,vec,M_PI/4.); - myInterpolator.setBoundingBoxAdjustment(1e-11); - MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper2(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper2(targetMesh); - myInterpolator.interpolateMeshes(sourceWrapper2,targetWrapper2,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(2,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,sumAll(res),1e-12); - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DInterpP0P0_1() -{ - MEDCouplingUMesh *sourceMesh=build3DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build3DTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3D myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(8,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(8.e6,sumAll(res),1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(20833.33333333333,res[0][0],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(41666.66666666667,res[0][6],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(20833.33333333333,res[0][7],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(20833.33333333333,res[0][8],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(20833.33333333333,res[0][10],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(41666.66666666667,res[1][2],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(166666.6666666667,res[1][7],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(166666.6666666667,res[1][8],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(166666.6666666667,res[2][0],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(20833.33333333333,res[2][5],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(145833.3333333333,res[2][6],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(20833.33333333333,res[2][9],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(20833.33333333333,res[2][11],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(395833.3333333333,res[3][0],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(145833.3333333333,res[3][2],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(20833.33333333331,res[3][3],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(166666.6666666667,res[3][5],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(395833.3333333333,res[3][8],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(20833.33333333333,res[4][1],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(20833.33333333333,res[4][4],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(145833.3333333333,res[4][6],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(20833.33333333333,res[4][9],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(166666.6666666667,res[4][10],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(145833.3333333333,res[5][2],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(20833.33333333331,res[5][3],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(166666.6666666667,res[5][4],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(395833.3333333333,res[5][7],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(395833.3333333333,res[5][10],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(166666.6666666667,res[6][1],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(250000,res[6][6],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(541666.6666666667,res[6][9],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(166666.6666666667,res[6][11],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(83333.33333333331,res[7][0],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(479166.6666666667,res[7][1],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(333333.3333333333,res[7][2],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(624999.9999999997,res[7][3],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(479166.6666666667,res[7][4],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(479166.6666666667,res[7][5],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(83333.33333333333,res[7][6],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(83333.33333333331,res[7][7],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(83333.33333333333,res[7][8],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(83333.33333333333,res[7][9],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(83333.33333333331,res[7][10],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(479166.6666666667,res[7][11],1e-7); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DInterpP0P0PL_1() -{ - MEDCouplingUMesh *sourceMesh=build3DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build3DTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3D myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(8,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][6],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][7],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][10],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][7],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][6],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][6],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][10],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[5][7],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[5][10],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[6][9],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][4],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][5],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][11],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(21.,sumAll(res),1e-12); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DInterpP0P0PL_2() -{ - MEDCouplingUMesh *sourceMesh=build3DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build3DTargetMesh_1(); - std::vector cellsIds(targetMesh->getNumberOfCells()); - for(int i=0;igetNumberOfCells();i++) - cellsIds[i]=i; - targetMesh->convertToPolyTypes(cellsIds); - // - MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3D myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(8,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][6],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][7],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][10],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][7],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][6],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][6],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][10],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[5][7],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[5][10],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[6][9],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][4],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][5],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][11],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(21.,sumAll(res),1e-12); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DInterpP0P0PL_3() -{ - MEDCouplingUMesh *sourceMesh=build3DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build3DTargetMesh_1(); - std::vector cellsIds(sourceMesh->getNumberOfCells()); - for(int i=0;igetNumberOfCells();i++) - cellsIds[i]=i; - sourceMesh->convertToPolyTypes(cellsIds); - // - MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3D myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(8,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][6],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][7],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][10],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][7],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][6],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][6],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][10],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[5][7],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[5][10],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[6][9],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][4],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][5],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][11],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(21.,sumAll(res),1e-12); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DInterpP0P0PL_4() -{ - MEDCouplingUMesh *sourceMesh=build3DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build3DTargetMesh_1(); - std::vector cellsIds(sourceMesh->getNumberOfCells()); - for(int i=0;igetNumberOfCells();i++) - cellsIds[i]=i; - sourceMesh->convertToPolyTypes(cellsIds); - cellsIds.resize(targetMesh->getNumberOfCells()); - for(int j=0;jgetNumberOfCells();j++) - cellsIds[j]=j; - targetMesh->convertToPolyTypes(cellsIds); - // - MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3D myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(8,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][6],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][7],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][10],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][7],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][6],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][6],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][10],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[5][7],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[5][10],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[6][9],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][4],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][5],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][11],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(21.,sumAll(res),1e-12); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DInterpP0P1_1() -{ - MEDCouplingUMesh *sourceMesh=build3DTargetMesh_1(); - MEDCouplingUMesh *targetMesh=build3DSourceMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3D myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P1"); - CPPUNIT_ASSERT_EQUAL(9,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(244444.4444444445,res[0][4],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(145833.3333333333,res[0][5],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(291666.6666666666,res[0][6],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(151388.8888888889,res[0][7],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(125000,res[1][0],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(140277.7777777778,res[1][1],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(119444.4444444444,res[1][2],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(151388.8888888889,res[1][3],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(119444.4444444444,res[1][4],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(151388.8888888889,res[1][5],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(26388.88888888889,res[1][6],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(348611.1111111111,res[2][6],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(151388.8888888888,res[2][7],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(244444.4444444444,res[3][2],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(145833.3333333334,res[3][3],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(291666.6666666666,res[3][6],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(151388.8888888889,res[3][7],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(536111.111111111,res[4][5],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(297222.2222222221,res[4][7],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(223611.1111111111,res[5][1],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(125000,res[5][3],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(125000,res[5][5],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(26388.88888888892,res[5][7],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[6][7],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(536111.1111111109,res[7][3],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(297222.2222222221,res[7][7],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(11111.1111111111,res[8][1],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(11111.11111111111,res[8][2],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(166666.6666666666,res[8][3],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(11111.11111111111,res[8][4],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(166666.6666666667,res[8][5],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(166666.6666666667,res[8][6],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1466666.666666668,res[8][7],1e-7); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DInterpP0P1PL_1() -{ - MEDCouplingUMesh *sourceMesh=build3DTargetMesh_1(); - MEDCouplingUMesh *targetMesh=build3DSourceMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3D myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P1"); - CPPUNIT_ASSERT_EQUAL(9,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][4],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][6],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][5],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[5][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[6][7],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[8][7],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(9.,sumAll(res),1e-12); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DInterpP1P0_1() -{ - MEDCouplingUMesh *sourceMesh=build3DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build3DTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3D myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0"); - CPPUNIT_ASSERT_EQUAL(8,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(125000,res[0][1],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(140277.7777777778,res[1][1],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(223611.1111111111,res[1][5],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(11111.1111111111,res[1][8],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(119444.4444444444,res[2][1],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(244444.4444444445,res[2][3],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(11111.11111111111,res[2][8],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(151388.8888888889,res[3][1],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(145833.3333333333,res[3][3],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(125000,res[3][5],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(536111.1111111109,res[3][7],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(166666.6666666667,res[3][8],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(244444.4444444445,res[4][0],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(119444.4444444445,res[4][1],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(11111.11111111111,res[4][8],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(145833.3333333333,res[5][0],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(151388.8888888889,res[5][1],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(536111.1111111109,res[5][4],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(125000,res[5][5],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(166666.6666666666,res[5][8],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(291666.6666666666,res[6][0],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(26388.88888888889,res[6][1],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(348611.1111111112,res[6][2],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(291666.6666666667,res[6][3],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(166666.6666666666,res[6][8],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(151388.8888888889,res[7][0],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(151388.8888888889,res[7][2],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(151388.8888888889,res[7][3],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(297222.2222222221,res[7][4],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(26388.88888888892,res[7][5],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[7][6],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(297222.2222222222,res[7][7],1e-7); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1466666.666666668,res[7][8],1e-7); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DInterpP1P0PL_1() -{ - MEDCouplingUMesh *sourceMesh=build3DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build3DTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3D myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0"); - CPPUNIT_ASSERT_EQUAL(8,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(3.75,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.25,res[0][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[1][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][5],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[1][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[2][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[2][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[3][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][7],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[3][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[4][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[5][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[5][4],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5,res[5][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[6][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[6][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[6][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[6][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.25,res[7][6],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(3.75,res[7][8],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(21.,sumAll(res),1e-12); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DInterpP1P1_1() -{ - MEDCouplingUMesh *sourceMesh=build3DSourceMesh_2(); - MEDCouplingUMesh *targetMesh=build3DTargetMesh_2(); - // - MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3D myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P1"); - CPPUNIT_ASSERT_EQUAL(8,(int)res.size()); - double res3D[8][28]= {{124999.999883775978, 245370.370390364464, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 203703.703634892299, 187500.000094145857, 0.0, 0.0, 4629.6296266718, 0.0, 215277.777751402784, 209722.222322299582, 0.0, 0.0, 0.0, 0.0, 104166.666590829205, 121296.296368812196, 0.0, 250000.000003472145}, - {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 120370.370368827047, 0.0, 0.0, 38888.888897777797, 0.0, 0.0, 45370.3703701697596, 0.0, 0.0, 45370.3703701697596, 83333.3333263888926, 0.0}, - {0.0, 0.0, 0.0, 97222.2222222221753, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 97222.2222222221608, 0.0, 97222.2222222222044, 41666.6666666666642, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0.0, 277777.777787084982, 199074.074074073927, 0.0, 0.0, 0.0, 4629.62962962962774, 0.0, 321759.259254934732, 83333.3333333333139, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4629.62962667180363, 0.0, 0.0, 251388.88888319055, 194444.444454861077, 0.0, 79629.6296194135939, 250000.000003472145, 0.0, 0.0, 0.0, 0.0}, - {0.0, 0.0, 0.0, 0.0, 85185.1851851851534, 4629.62962962962774, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 118518.518518518511, 0.0, 41666.6666666666642, 83333.3333333333285, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0.0, 324074.07407629228, 0.0, 0.0, 0.0, 247685.185185184964, 6481.48148148147993, 0.0, 173611.11111196311, 0.0, 164814.814814814832, 0.0, 4629.62962962962865, 208333.33333418527, 0.0, 83333.3333333333285, 203703.703697273799, 249999.999999999767, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {125000.000000000015, 423611.111111110775, 134259.259259259241, 194444.444444444351, 164814.814814814745, 164351.851851851825, 203703.703703703592, 249999.999999999825, 0.0, 0.0, 0.0, 0.0, 6481.48148148147902, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, - {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 118518.518518518453, 0.0, 4629.62962962962956, 83333.3333333333139, 85185.1851851851825, 41666.6666666666642, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}}; - int i=0; - double sum = 0; - //cout.precision(18); - for(std::vector >::const_iterator iter1=res.begin();iter1!=res.end();iter1++,i++) - { - //cout<< "res3D[" <::const_iterator iter2=(*iter1).find(j); - if(iter2!=(*iter1).end()) - { - //cout<< iter2->second<< ", "; - sum += iter2->second; - CPPUNIT_ASSERT_DOUBLES_EQUAL(res3D[i][j],(*iter2).second,1.e-5); - } - else - { - //cout << "0.0, "; - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,res3D[i][j],1e-14); - } - } - //cout << "}" << endl; - } - //cout << "Sum = " << sum << endl; - CPPUNIT_ASSERT_DOUBLES_EQUAL(8000000,sum,1.e-5); - //clean-up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DInterpP1P1PL_1() -{ - MEDCouplingUMesh *sourceMesh=build3DSourceMesh_2(); - MEDCouplingUMesh *targetMesh=build3DTargetMesh_2(); - // - MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3D myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P1"); - CPPUNIT_ASSERT_EQUAL(8,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(20.,res[0][24],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(2.,res[1][26],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][21],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(24.,res[3][23],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][14],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(24.,res[5][17],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(24.,res[6][7],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][11],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(97.,sumAll(res),1e-12); - //clean-up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DInterpP0P0Empty() -{ - MEDCouplingUMesh *sourceMesh=MEDCouplingUMesh::New(); - sourceMesh->setMeshDimension(2); - sourceMesh->allocateCells(0); - sourceMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(0,0); - sourceMesh->setCoords(myCoords); - myCoords->decrRef(); - MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New(); - targetMesh->setMeshDimension(2); - targetMesh->allocateCells(0); - targetMesh->finishInsertingCells(); - myCoords=DataArrayDouble::New(); - myCoords->alloc(0,2); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2D myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::testInterpolationCC() -{ - double arr1[3] = { 0/2., 1/2., 2/2. }; - double arr2[4] = { 0/3, 1/3., 2/3., 3/3. }; - MEDCouplingCMesh* mesh[2]; - for ( int i = 0; i < 2; ++i ) - { - const double* arr = i ? arr1 : arr2; - const int nb_coord = i ? 3 : 4; - DataArrayDouble* coords = DataArrayDouble::New(); - coords->useArray( arr, /*ownership=*/false, CPP_DEALLOC, nb_coord, 1 ); - - mesh[i] = MEDCouplingCMesh::New(); - mesh[i]->setCoords( coords, coords, coords ); - coords->decrRef(); - } - MEDCouplingNormalizedCartesianMesh<3> targetWrapper(mesh[1]); - MEDCouplingNormalizedCartesianMesh<3> sourceWrapper(mesh[0]); - CPPUNIT_ASSERT_EQUAL( 27,int( sourceWrapper.getNumberOfElements())); - CPPUNIT_ASSERT_EQUAL( 3, int( sourceWrapper.nbCellsAlongAxis(0))); - CPPUNIT_ASSERT_EQUAL( 3, int( sourceWrapper.nbCellsAlongAxis(1))); - CPPUNIT_ASSERT_EQUAL( 3, int( sourceWrapper.nbCellsAlongAxis(2))); - CPPUNIT_ASSERT_THROW( sourceWrapper.nbCellsAlongAxis(3), INTERP_KERNEL::Exception); - - INTERP_KERNEL::InterpolationCC myInterpolator; - std::vector > res; - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - - CPPUNIT_ASSERT_EQUAL(8,int( res.size())); - CPPUNIT_ASSERT_EQUAL(8,int( res[0].size())); - const double precis = 1e-7; - std::set vals; - double sum = 0; - for ( int i = 0; i < (int)res.size(); ++i ) - for ( std::map::iterator s_v = res[i].begin(); s_v != res[i].end(); ++s_v) - { - sum += s_v->second; - double vvv; -#ifdef WNT - double vv = s_v->second / precis; - if(vv>=0.0) - { - vvv = floor(vv+0.5); - } - else - { - vvv = ceil(vv-0.5); - } -#else - vvv = round( s_v->second / precis ); -#endif - vals.insert( precis * vvv ); - } - //cout << "tgt: " << i << " src: " << s_v->first << " - w: " << s_v->second << endl; - CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0, sum, precis ); - - std::set::iterator v = vals.begin(); - CPPUNIT_ASSERT_EQUAL( 4, int( vals.size()) ); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00462963, *v++, precis ); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00925926, *v++, precis ); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.01851850, *v++, precis ); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03703700, *v++, precis ); - - mesh[0]->decrRef(); - mesh[1]->decrRef(); -} - -void MEDCouplingBasicsTest::testInterpolationCU1D() -{ - MEDCouplingCMesh* meshC = MEDCouplingCMesh::New(); - DataArrayDouble* coords = DataArrayDouble::New(); - double arr[4] = { -1/3., 1/3., 2/3., 4/3. }; - coords->useArray( arr, /*ownership=*/false, CPP_DEALLOC, 4, 1 ); - meshC->setCoords( coords ); - coords->decrRef(); - - MEDCouplingUMesh * meshU = buildCU1DMesh_U(); - - MEDCouplingNormalizedCartesianMesh<1> sourceWrapper(meshC); - MEDCouplingNormalizedUnstructuredMesh<1,1> targetWrapper(meshU); - INTERP_KERNEL::InterpolationCU myInterpolator; - std::vector > res; - const double precis = 1e-13; - myInterpolator.setPrecision(precis); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - -// std::cout.precision(18); -// for ( int i = 0; i < (int)res.size(); ++i ) -// for ( std::map::iterator s_v = res[i].begin(); s_v != res[i].end(); ++s_v) -// { -// std::cout << "CPPUNIT_ASSERT_DOUBLES_EQUAL( "<second<<" ,res["<first<<"],precis);"<decrRef(); - meshU->decrRef(); -} - -void MEDCouplingBasicsTest::testInterpolationCU2D() -{ - MEDCouplingCMesh* meshC = MEDCouplingCMesh::New(); - DataArrayDouble* coords = DataArrayDouble::New(); - double arr[4] = { -1/3., 1/3., 2/3., 4/3. }; - coords->useArray( arr, /*ownership=*/false, CPP_DEALLOC, 4, 1 ); - meshC->setCoords( coords, coords ); - coords->decrRef(); - - MEDCouplingUMesh * meshU = buildCU2DMesh_U(); - - MEDCouplingNormalizedCartesianMesh<2> sourceWrapper(meshC); - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(meshU); - INTERP_KERNEL::InterpolationCU myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - - const double precis = 1e-7; - double sum = sumAll(res); - CPPUNIT_ASSERT_EQUAL(5,int( res.size())); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 1, sum, precis ); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.1111111 ,res[0][0],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0555556 ,res[0][1],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0555556 ,res[0][3],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0277778 ,res[0][4],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0555556 ,res[1][3],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0277778 ,res[1][4],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.1111111 ,res[1][6],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0555556 ,res[1][7],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0277778 ,res[2][4],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0555556 ,res[2][5],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0555556 ,res[2][7],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.1111111 ,res[2][8],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0416667 ,res[3][1],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0138889 ,res[3][2],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0277778 ,res[3][4],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0416667 ,res[3][5],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0138889 ,res[4][1],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0972222 ,res[4][2],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0138889 ,res[4][5],precis); - - std::vector > resRev; - myInterpolator.interpolateMeshesRev(targetWrapper,sourceWrapper,resRev,"P0P0"); - - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[0][0] ,resRev[0][0],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[0][1] ,resRev[1][0],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[3][1] ,resRev[1][3],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[4][1] ,resRev[1][4],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[3][2] ,resRev[2][3],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[4][2] ,resRev[2][4],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[0][3] ,resRev[3][0],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[1][3] ,resRev[3][1],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[0][4] ,resRev[4][0],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[1][4] ,resRev[4][1],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[2][4] ,resRev[4][2],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[3][4] ,resRev[4][3],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[2][5] ,resRev[5][2],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[3][5] ,resRev[5][3],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[4][5] ,resRev[5][4],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[1][6] ,resRev[6][1],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[1][7] ,resRev[7][1],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[2][7] ,resRev[7][2],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( res[2][8] ,resRev[8][2],precis); - - meshC->decrRef(); - meshU->decrRef(); -} - -void MEDCouplingBasicsTest::testInterpolationCU3D() -{ - MEDCouplingCMesh* meshC = MEDCouplingCMesh::New(); - DataArrayDouble* coords = DataArrayDouble::New(); - double arr[4] = { -1/3., 1/3., 2/3., 4/3. }; - coords->useArray( arr, /*ownership=*/false, CPP_DEALLOC, 4, 1 ); - meshC->setCoords( coords, coords, coords ); - coords->decrRef(); - - MEDCouplingUMesh * meshU = buildCU3DMesh_U(); - - MEDCouplingNormalizedCartesianMesh<3> sourceWrapper(meshC); - MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(meshU); - INTERP_KERNEL::InterpolationCU myInterpolator; - std::vector > res; - const double precis = 1e-13; - myInterpolator.setPrecision(precis); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - - double sum = sumAll(res); - CPPUNIT_ASSERT_EQUAL(8,int( res.size())); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 1, sum, precis ); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.02700000000000 ,res[0][0],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00299999999999 ,res[1][0],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.02999999999999 ,res[1][1],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03000000000000 ,res[1][2],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00300000000000 ,res[2][0],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.02999999999999 ,res[2][3],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.02999999999999 ,res[2][6],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00033333333333 ,res[3][0],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00333333333333 ,res[3][1],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00333333333333 ,res[3][2],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00333333333333 ,res[3][3],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03333333333333 ,res[3][4],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03333333333333 ,res[3][5],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00333333333333 ,res[3][6],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03333333333333 ,res[3][7],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03333333333333 ,res[3][8],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00299999999999 ,res[4][0],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.02999999999999 ,res[4][9],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03000000000000 ,res[4][18],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00033333333333 ,res[5][0],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00333333333333 ,res[5][1],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00333333333333 ,res[5][2],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00333333333333 ,res[5][9],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03333333333333 ,res[5][10],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03333333333333 ,res[5][11],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00333333333333 ,res[5][18],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03333333333333 ,res[5][19],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03333333333333 ,res[5][20],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00033333333333 ,res[6][0],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00333333333333 ,res[6][3],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00333333333333 ,res[6][6],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00333333333333 ,res[6][9],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03333333333333 ,res[6][12],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03333333333333 ,res[6][15],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00333333333333 ,res[6][18],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03333333333333 ,res[6][21],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03333333333333 ,res[6][24],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 3.7037037037e-05 ,res[7][0],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00037037037037 ,res[7][1],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00037037037037 ,res[7][2],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00037037037037 ,res[7][3],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00370370370370 ,res[7][4],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00370370370370 ,res[7][5],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00037037037037 ,res[7][6],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00370370370370 ,res[7][7],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00370370370370 ,res[7][8],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00037037037037 ,res[7][9],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00370370370370 ,res[7][10],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00370370370370 ,res[7][11],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00370370370370 ,res[7][12],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03703703703703 ,res[7][13],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03703703703703 ,res[7][14],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00370370370370 ,res[7][15],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03703703703703 ,res[7][16],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03703703703703 ,res[7][17],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00037037037037 ,res[7][18],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00370370370370 ,res[7][19],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00370370370370 ,res[7][20],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00370370370370 ,res[7][21],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03703703703703 ,res[7][22],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03703703703703 ,res[7][23],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.00370370370370 ,res[7][24],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03703703703703 ,res[7][25],precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.03703703703703 ,res[7][26],precis); - - - meshC->decrRef(); - meshU->decrRef(); -} - -void MEDCouplingBasicsTest::test2DInterpP0IntegralUniform() -{ - MEDCouplingUMesh *targetMesh=build2DTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2D myInterpolator; - std::vector > res; - CPPUNIT_ASSERT_EQUAL(5,myInterpolator.toIntegralUniform(targetWrapper,res,"P0")); - CPPUNIT_ASSERT_EQUAL(1,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[0][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][4],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,sumAll(res),1e-12); - res.clear(); - CPPUNIT_ASSERT_EQUAL(1,myInterpolator.fromIntegralUniform(targetWrapper,res,"P0")); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[3][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,sumAll(res),1e-12); - res.clear(); - targetMesh->decrRef(); - // - targetMesh=build2DTargetMeshPerm_1(); - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper2(targetMesh); - INTERP_KERNEL::Interpolation2D myInterpolator2; - CPPUNIT_ASSERT(myInterpolator2.getMeasureAbsStatus()); - CPPUNIT_ASSERT_EQUAL(5,myInterpolator2.toIntegralUniform(targetWrapper2,res,"P0")); - CPPUNIT_ASSERT_EQUAL(1,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[0][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][4],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,sumAll(res),1e-12); - res.clear(); - myInterpolator2.setMeasureAbsStatus(false); - CPPUNIT_ASSERT(!myInterpolator2.getMeasureAbsStatus()); - CPPUNIT_ASSERT_EQUAL(5,myInterpolator2.toIntegralUniform(targetWrapper2,res,"P0")); - CPPUNIT_ASSERT_EQUAL(1,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.125,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[0][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][4],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.75,sumAll(res),1e-12); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DSurfInterpP0IntegralUniform() -{ - MEDCouplingUMesh *targetMesh=build3DSurfTargetMesh_1(); - INTERP_KERNEL::Interpolation3DSurf myInterpolator; - MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh); - std::vector > res; - CPPUNIT_ASSERT_EQUAL(5,myInterpolator.toIntegralUniform(targetWrapper,res,"P0")); - CPPUNIT_ASSERT_EQUAL(1,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25*sqrt(2.),res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[0][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25*sqrt(2.),res[0][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25*sqrt(2.),res[0][4],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.*sqrt(2.),sumAll(res),1e-12); - res.clear(); - CPPUNIT_ASSERT_EQUAL(1,myInterpolator.fromIntegralUniform(targetWrapper,res,"P0")); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25*sqrt(2.),res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25*sqrt(2.),res[3][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25*sqrt(2.),res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.*sqrt(2.),sumAll(res),1e-12); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DInterpP0IntegralUniform() -{ - MEDCouplingUMesh *targetMesh=build3DTargetMesh_1(); - INTERP_KERNEL::Interpolation3D myInterpolator; - MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh); - std::vector > res; - CPPUNIT_ASSERT_EQUAL(8,myInterpolator.toIntegralUniform(targetWrapper,res,"P0")); - CPPUNIT_ASSERT_EQUAL(1,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(125000.,res[0][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(375000.,res[0][1],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(375000.,res[0][2],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1125000.,res[0][3],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(375000.,res[0][4],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1125000.,res[0][5],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1125000.,res[0][6],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(3375000.,res[0][7],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(8000000.,sumAll(res),1e-6); - res.clear(); - CPPUNIT_ASSERT_EQUAL(1,myInterpolator.fromIntegralUniform(targetWrapper,res,"P0")); - CPPUNIT_ASSERT_EQUAL(8,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(125000.,res[0][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(375000.,res[1][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(375000.,res[2][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1125000.,res[3][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(375000.,res[4][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1125000.,res[5][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1125000.,res[6][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(3375000.,res[7][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(8000000.,sumAll(res),1e-6); - res.clear(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DInterpP1IntegralUniform() -{ - MEDCouplingUMesh *targetMesh=build2DSourceMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2D myInterpolator; - std::vector > res; - CPPUNIT_ASSERT_EQUAL(4,myInterpolator.toIntegralUniform(targetWrapper,res,"P1")); - CPPUNIT_ASSERT_EQUAL(1,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.33333333333333331,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666,res[0][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.33333333333333331,res[0][3],1e-12); - res.clear(); - CPPUNIT_ASSERT_EQUAL(1,myInterpolator.fromIntegralUniform(targetWrapper,res,"P1")); - CPPUNIT_ASSERT_EQUAL(4,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.33333333333333331,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666,res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.33333333333333331,res[3][0],1e-12); - res.clear(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DInterpP1IntegralUniform() -{ - MEDCouplingUMesh *sourceMesh=build3DSourceMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(sourceMesh); - INTERP_KERNEL::Interpolation3D myInterpolator; - std::vector > res; - CPPUNIT_ASSERT_EQUAL(9,myInterpolator.toIntegralUniform(targetWrapper,res,"P1")); - CPPUNIT_ASSERT_EQUAL(1,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[0][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[0][1],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(500000.,res[0][2],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[0][3],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[0][4],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(500000.,res[0][5],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[0][6],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[0][7],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(2000000.,res[0][8],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(8000000.,sumAll(res),1e-6); - res.clear(); - CPPUNIT_ASSERT_EQUAL(1,myInterpolator.fromIntegralUniform(targetWrapper,res,"P1")); - CPPUNIT_ASSERT_EQUAL(9,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[0][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[1][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(500000.,res[2][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[3][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[4][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(500000.,res[5][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[6][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[7][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(2000000.,res[8][0],1e-6); - CPPUNIT_ASSERT_DOUBLES_EQUAL(8000000.,sumAll(res),1e-6); - sourceMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DInterpP1P0Bary_1() -{ - MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build2DTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2D myInterpolator; - myInterpolator.setP1P0BaryMethod(true); - std::vector > res; - INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D}; - for(int i=0;i<2;i++) - { - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(types[i]); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666669,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.020833333333333343,res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.020833333333333343,res[0][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664,res[0][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664,res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0625,res[1][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.020833333333333343,res[1][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.020833333333333343,res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0625,res[2][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664,res[2][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0625,res[3][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[3][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0625,res[3][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664,res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.020833333333333343,res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.020833333333333343,res[4][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666,res[4][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,sumAll(res),1e-12); - res.clear(); - } - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DSurfInterpP1P0Bary_1() -{ - MEDCouplingUMesh *sourceMesh=build3DSurfSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build3DSurfTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3DSurf myInterpolator; - myInterpolator.setP1P0BaryMethod(true); - std::vector > res; - INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D}; - for(int i=0;i<2;i++) - { - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(types[i]); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666669*sqrt(2.),res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.020833333333333343*sqrt(2.),res[0][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.020833333333333343*sqrt(2.),res[0][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664*sqrt(2.),res[0][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664*sqrt(2.),res[1][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0625*sqrt(2.),res[1][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.020833333333333343*sqrt(2.),res[1][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.020833333333333343*sqrt(2.),res[2][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0625*sqrt(2.),res[2][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664*sqrt(2.),res[2][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0625*sqrt(2.),res[3][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[3][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0625*sqrt(2.),res[3][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.041666666666666664*sqrt(2.),res[4][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.020833333333333343*sqrt(2.),res[4][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.020833333333333343*sqrt(2.),res[4][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666*sqrt(2.),res[4][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.*sqrt(2.),sumAll(res),1e-12); - res.clear(); - } - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -#include -void MEDCouplingBasicsTest::test3DInterpP1P0Bary_1() -{ - MEDCouplingUMesh *sourceMesh=build3DSourceMesh_2(); - MEDCouplingUMesh *targetMesh=build3DTargetMesh_2(); - // - MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3D myInterpolator; - myInterpolator.setP1P0BaryMethod(true); - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0"); - CPPUNIT_ASSERT_EQUAL(5,(int)res.size()); - - double res3D[5][28]={{104166.66658918398, 885416.666685817763, 135416.666666666541, 36458.3333333335031, 31249.9999999999018, 145833.333333333256, 41666.6666666667516, 124999.999999999971, 177083.333326388849, 0.0, 31249.9999999999636, 0.0, 41666.666620792399, 159722.22229009436, 0.0, 0.0, 41666.6666631944681, 125000, 43499.2283723790752, 164351.851924000395, 36458.3333372396883, 0.0, 0.0, 125000.000001736029, 34722.2221800900952, 13599.5370788455439, 0.0, 167438.27159690368}, - {0.0, 41666.6664479170649, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 125000.000161457952, 0.0, 0.0, 0.0, 0.0, 111111.11112005508, 0.0, 0.0, 291666.666656249959, 41666.6666666666933, 6944.4444415638809, 270833.333520485845, 0.0, 0.0, 124999.999989583303, 41666.6665798612958, 20833.3333186342825, 145833.333354303701, 83333.3333263888198, 27777.7777501651799}, - {0.0, 93750.0000000000728, 125000.000000000058, 0.0, 0.0, 72916.666666666526, 291666.666666666628, 41666.6666666667152, 197916.66666666657, 166666.666666666802, 218750.000000000116, 41666.6666666665697, 0.0, 0.0, 0.0, 0.0, 0.0, 41666.6666666666861, 0.0, 0.0, 0.0, 0.0, 0.0, 41666.6666666666642, 0.0, 0.0, 0.0, 0.0}, - {72916.6666484848247, 82465.2777799315081, 0.0, 0.0, 217447.916666666686, 197916.666666666802, 0.0, 41666.6666666666715, 0.0, 0.0, 0.0, 0.0, 290364.583310396119, 125000.000018181803, 41666.6666666666351, 166666.666666666599, 0.0, 41666.6666666665551, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 27777.7777734705051, 0.0, 0.0, 27777.7778028684952}, - {72916.6666461071727, 172309.027782170655, 70312.5000000000437, 253906.250000000029, 0.0, 0.0, 0.0, 41666.666666666657, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 258246.527775988478, 71180.5555571812583, 253906.250006944378, 41666.6666666666861, 0.0, 41666.6666649305407, 20833.3333186342534, 6944.44445267237552, 0.0, 27777.7777953707919}}; - - double sum = 0; - int i=0; - for(std::vector >::const_iterator iter1=res.begin();iter1!=res.end();iter1++,i++) - { - for(int j=0;j<28;j++) - { - std::map::const_iterator iter2=(*iter1).find(j); - if(iter2!=(*iter1).end()) - { - sum += iter2->second; - CPPUNIT_ASSERT_DOUBLES_EQUAL(res3D[i][j],(*iter2).second,1.e-5); - } - else - { - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,res3D[i][j],1e-14); - } - } - } - CPPUNIT_ASSERT_DOUBLES_EQUAL(8000000,sum,1.e-5); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test3DTo1DInterpP0P0PL_1() -{ - MEDCouplingUMesh *sourceMesh=build3DTargetMesh_1(); - MEDCouplingUMesh *targetMesh=build1DTargetMesh_1(); - // - MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation3D myInterpolator; - std::vector > res; - myInterpolator.setPrecision(1e-12); - myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL(8,(int)res.size()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[0][0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[1][4],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[2][1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[3][5],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[4][2],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[5][6],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[6][3],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,res[7][7],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(8.,sumAll(res),1e-12); - // - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test1DInterp_1() -{ - // c1 c0 c2 - pay attention to cell order! - // S: o---o------o---o - // T: o---o------o---o - // n0 n1 n2 n3 - // - // ---+---+------+---+---> X - // 0. 1. 3. 4. - MEDCouplingUMesh *sourceMesh=build1DMesh(0); - MEDCouplingUMesh *targetMesh=build1DMesh(0.5); - // - MEDCouplingNormalizedUnstructuredMesh<1,1> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<1,1> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation1D myInterpolator; - const double precis = 1e-13; - myInterpolator.setPrecision(precis); - - // P0P0 - std::vector > res; - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - CPPUNIT_ASSERT_EQUAL( 3, int( res.size()) ); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.5, res[0][0], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5, res[0][2], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5, res[1][0], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5, res[1][1], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5, res[2][2], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 3.5, sumAll(res), precis); - - // P1P0 - res.clear(); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0"); - CPPUNIT_ASSERT_EQUAL( 3, int( res.size()) ); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5, res[0][1], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.5, res[0][2], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0, res[1][1], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5, res[2][3], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 3.5, sumAll(res), precis); - - // P0P1 - res.clear(); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P1"); - - CPPUNIT_ASSERT_EQUAL( 4, int( res.size()) ); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5, res[0][1], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.5, res[1][0], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5, res[2][0], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0, res[2][2], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 3.5, sumAll(res), precis); - - // P1P1 - res.clear(); - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P1"); - CPPUNIT_ASSERT_EQUAL( 4, int( res.size()) ); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5, res[0][1], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0, res[1][1], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5, res[1][2], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0, res[2][2], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5, res[2][3], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 3.5, sumAll(res), precis); - - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DCurveInterpP0P0_1() -{ - // coincident meshes - MEDCouplingUMesh *sourceMesh=build2DCurveMesh(0,0); - MEDCouplingUMesh *targetMesh=build2DCurveMesh(0,0); - // - MEDCouplingNormalizedUnstructuredMesh<2,1> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,1> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2DCurve myInterpolator; - const double precis = 1e-13; - myInterpolator.setPrecision(precis); - std::vector > res; - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - - CPPUNIT_ASSERT_EQUAL( 2, int( res.size()) ); - CPPUNIT_ASSERT_DOUBLES_EQUAL( sqrt(2.),res[0][0], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 1., res[1][1], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.+sqrt(2.), sumAll(res), precis); - - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DCurveInterpP0P0_2() -{ - // equal meshes shifted one from another along X by 0.5 - MEDCouplingUMesh *sourceMesh=build2DCurveMesh(0.5,0); - MEDCouplingUMesh *targetMesh=build2DCurveMesh(0,0); - // - MEDCouplingNormalizedUnstructuredMesh<2,1> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,1> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2DCurve myInterpolator; - const double precis = 1e-13; - myInterpolator.setPrecision(precis); - myInterpolator.setMedianPlane(1.);// median line on target - std::vector > res; - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0"); - - double tolInters = myInterpolator.getBoundingBoxAdjustmentAbs() * sqrt(2.); - CPPUNIT_ASSERT_EQUAL( 2, int( res.size()) ); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0,res[0][0], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( tolInters,res[0][1], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5, res[1][1], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5+tolInters, sumAll(res), precis); - - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DCurveInterpP0P1_1() -{ - // coincident meshes - MEDCouplingUMesh *sourceMesh=build2DCurveMesh(0,0); - MEDCouplingUMesh *targetMesh=build2DCurveMesh(0,0); - // - MEDCouplingNormalizedUnstructuredMesh<2,1> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,1> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2DCurve myInterpolator; - const double precis = 1e-13; - myInterpolator.setPrecision(precis); - std::vector > res; - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P1"); - - const double len1 = 1., len0 = sqrt(2.); - CPPUNIT_ASSERT_EQUAL( 3, int( res.size()) ); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5*len1, res[0][1], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5*len0, res[1][0], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5*len1, res[1][1], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5*len0, res[2][0], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( len0+len1, sumAll(res), precis); - - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DCurveInterpP1P0_1() -{ - // coincident meshes - MEDCouplingUMesh *sourceMesh=build2DCurveMesh(0,0); - MEDCouplingUMesh *targetMesh=build2DCurveMesh(0,0); - // - MEDCouplingNormalizedUnstructuredMesh<2,1> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,1> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2DCurve myInterpolator; - const double precis = 1e-13; - myInterpolator.setPrecision(precis); - std::vector > res; - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0"); - - const double len1 = 1., len0 = sqrt(2.); - CPPUNIT_ASSERT_EQUAL( 2, int( res.size()) ); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5*len1, res[1][0], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5*len0, res[0][1], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5*len1, res[1][1], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5*len0, res[0][2], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( len0+len1, sumAll(res), precis); - - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingBasicsTest::test2DCurveInterpP1P1_1() -{ - // coincident meshes - MEDCouplingUMesh *sourceMesh=build2DCurveMesh(0,0); - MEDCouplingUMesh *targetMesh=build2DCurveMesh(0,0); - // - MEDCouplingNormalizedUnstructuredMesh<2,1> sourceWrapper(sourceMesh); - MEDCouplingNormalizedUnstructuredMesh<2,1> targetWrapper(targetMesh); - INTERP_KERNEL::Interpolation2DCurve myInterpolator; - const double precis = 1e-13; - myInterpolator.setPrecision(precis); - std::vector > res; - myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P1"); - - const double len1 = 1., len0 = sqrt(2.); - CPPUNIT_ASSERT_EQUAL( 3, int( res.size()) ); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5*len1, res[0][0], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5*(len0+len1), res[1][1], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.5*len0, res[2][2], precis); - CPPUNIT_ASSERT_DOUBLES_EQUAL( len0+len1, sumAll(res), precis); - - sourceMesh->decrRef(); - targetMesh->decrRef(); -} diff --git a/src/MEDCoupling/Test/MEDCouplingRemapperTest.cxx b/src/MEDCoupling/Test/MEDCouplingRemapperTest.cxx deleted file mode 100644 index b7c30b712..000000000 --- a/src/MEDCoupling/Test/MEDCouplingRemapperTest.cxx +++ /dev/null @@ -1,986 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "MEDCouplingRemapperTest.hxx" -#include "MEDCouplingUMesh.hxx" -#include "MEDCouplingExtrudedMesh.hxx" -#include "MEDCouplingFieldDouble.hxx" -#include "MEDCouplingMemArray.hxx" -#include "MEDCouplingRemapper.hxx" - -#include "MEDCouplingBasicsTest.hxx" - -#include -#include - -using namespace ParaMEDMEM; - -void MEDCouplingRemapperTest::test2DInterpP0P0_1() -{ - MEDCouplingUMesh *sourceMesh=MEDCouplingBasicsTest::build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=MEDCouplingBasicsTest::build2DTargetMesh_1(); - // - MEDCouplingRemapper remapper; - remapper.setPrecision(1e-12); - remapper.setIntersectionType(INTERP_KERNEL::Triangulation); - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0")); - - MEDCouplingFieldDouble *srcField=MEDCouplingFieldDouble::New(ON_CELLS); - srcField->setNature(ConservativeVolumic); - srcField->setMesh(sourceMesh); - DataArrayDouble *array=DataArrayDouble::New(); - array->alloc(sourceMesh->getNumberOfCells(),1); - srcField->setArray(array); - double *ptr=array->getPointer(); - for(int i=0;igetNumberOfCells();i++) - ptr[i]=(double)(i+7); - array->decrRef(); - MEDCouplingFieldDouble *trgfield=remapper.transferField(srcField,4.57); - const double *values=trgfield->getArray()->getConstPointer(); - const double valuesExpected[5]={7.5 ,7. ,7.,8.,7.5}; - CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<5;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12); - trgfield->decrRef(); - // - srcField->setNature(IntegralGlobConstraint); - trgfield=remapper.transferField(srcField,4.57); - values=trgfield->getArray()->getConstPointer(); - const double valuesExpected2[5]={3.75 ,1.75 ,1.75,4.,3.75}; - CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<5;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12); - trgfield->decrRef(); - // - srcField->setNature(ConservativeVolumic); - trgfield=remapper.transferField(srcField,4.57); - values=trgfield->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<5;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12); - trgfield->decrRef(); - // - srcField->setNature(IntegralGlobConstraint); - trgfield=remapper.transferField(srcField,4.57); - values=trgfield->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<5;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12); - trgfield->decrRef(); - // - srcField->setNature(Integral); - trgfield=remapper.transferField(srcField,4.57); - values=trgfield->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<5;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12); - trgfield->decrRef(); - // - srcField->setNature(RevIntegral); - trgfield=remapper.transferField(srcField,4.57); - values=trgfield->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<5;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12); - trgfield->decrRef(); - // - srcField->decrRef(); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingRemapperTest::test2DInterpP0P0R_1() -{ - MEDCouplingUMesh *sourceMesh=MEDCouplingBasicsTest::build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=MEDCouplingBasicsTest::build2DTargetMesh_1(); - // - MEDCouplingRemapper remapper; - remapper.setPrecision(1e-12); - remapper.setIntersectionType(INTERP_KERNEL::Triangulation); - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0")); - - MEDCouplingFieldDouble *targetField=MEDCouplingFieldDouble::New(ON_CELLS); - targetField->setNature(ConservativeVolumic); - targetField->setMesh(sourceMesh); - DataArrayDouble *array=DataArrayDouble::New(); - array->alloc(targetMesh->getNumberOfCells(),1); - targetField->setArray(array); - double *ptr=array->getPointer(); - for(int i=0;igetNumberOfCells();i++) - ptr[i]=(double)(i+7); - array->decrRef(); - // - MEDCouplingFieldDouble *srcfield=remapper.reverseTransferField(targetField,4.57); - const double *values=srcfield->getArray()->getConstPointer(); - const double valuesExpected[2]={8.75 ,9.5}; - CPPUNIT_ASSERT_EQUAL(2,srcfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,srcfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<2;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12); - srcfield->decrRef(); - // - targetField->setNature(IntegralGlobConstraint); - srcfield=remapper.reverseTransferField(targetField,4.57); - values=srcfield->getArray()->getConstPointer(); - const double valuesExpected2[2]={26., 19.}; - CPPUNIT_ASSERT_EQUAL(2,srcfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,srcfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<2;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12); - srcfield->decrRef(); - // - targetField->decrRef(); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingRemapperTest::test2DInterpMultiMethods() -{ - MEDCouplingUMesh *sourceMesh=MEDCouplingBasicsTest::build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=MEDCouplingBasicsTest::build2DTargetMesh_1(); - // - MEDCouplingRemapper remapper; - remapper.setPrecision(1e-12); - remapper.setIntersectionType(INTERP_KERNEL::Triangulation); - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0")); - - MEDCouplingFieldDouble *srcField=MEDCouplingFieldDouble::New(ON_CELLS); - srcField->setNature(ConservativeVolumic); - srcField->setMesh(sourceMesh); - DataArrayDouble *array=DataArrayDouble::New(); - array->alloc(sourceMesh->getNumberOfCells(),1); - srcField->setArray(array); - double *ptr=array->getPointer(); - for(int i=0;igetNumberOfCells();i++) - ptr[i]=(double)(i+7); - array->decrRef(); - MEDCouplingFieldDouble *trgfield=remapper.transferField(srcField,4.57); - const double *values=trgfield->getArray()->getConstPointer(); - const double valuesExpected[5]={7.5 ,7. ,7.,8.,7.5}; - CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<5;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12); - trgfield->decrRef(); - srcField->decrRef(); - // - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P1P0")); - srcField=MEDCouplingFieldDouble::New(ON_NODES); - srcField->setNature(ConservativeVolumic); - srcField->setMesh(sourceMesh); - array=DataArrayDouble::New(); - array->alloc(sourceMesh->getNumberOfNodes(),1); - srcField->setArray(array); - ptr=array->getPointer(); - for(int i=0;igetNumberOfNodes();i++) - ptr[i]=(double)(i+7); - array->decrRef(); - trgfield=remapper.transferField(srcField,4.57); - values=trgfield->getArray()->getConstPointer(); - const double valuesExpected2[5]={7.,7.666666666666667,8.6666666666666661,8.8333333333333339,10.}; - CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<5;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12); - trgfield->decrRef(); - srcField->decrRef(); - // - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(targetMesh,sourceMesh,"P0P1")); - srcField=MEDCouplingFieldDouble::New(ON_CELLS); - srcField->setNature(ConservativeVolumic); - srcField->setMesh(targetMesh); - array=DataArrayDouble::New(); - array->alloc(targetMesh->getNumberOfCells(),1); - srcField->setArray(array); - ptr=array->getPointer(); - for(int i=0;igetNumberOfCells();i++) - ptr[i]=(double)(i+7); - array->decrRef(); - trgfield=remapper.transferField(srcField,4.57); - values=trgfield->getArray()->getConstPointer(); - const double valuesExpected3[4]={7.5,8.5,10.,10.625}; - CPPUNIT_ASSERT_EQUAL(4,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<4;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected3[i0],values[i0],1e-12); - trgfield->decrRef(); - srcField->decrRef(); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); - // - sourceMesh=MEDCouplingBasicsTest::build2DSourceMesh_1(); - targetMesh=MEDCouplingBasicsTest::build2DTargetMesh_2(); - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P1P1")); - srcField=MEDCouplingFieldDouble::New(ON_NODES); - srcField->setNature(ConservativeVolumic); - srcField->setMesh(sourceMesh); - array=DataArrayDouble::New(); - array->alloc(sourceMesh->getNumberOfNodes(),1); - srcField->setArray(array); - ptr=array->getPointer(); - for(int i=0;igetNumberOfNodes();i++) - ptr[i]=(double)(i+7); - array->decrRef(); - trgfield=remapper.transferField(srcField,4.57); - values=trgfield->getArray()->getConstPointer(); - const double valuesExpected4[9]={ 7.,7.35,8.,7.7,8.2857142857142865, - 9.5333333333333332,9.,9.7666666666666657,10.}; - CPPUNIT_ASSERT_EQUAL(9,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<9;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected4[i0],values[i0],1e-12); - trgfield->decrRef(); - srcField->decrRef(); - //clean up - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingRemapperTest::testMultiDimCombi() -{ - // ------------- 2D - MEDCouplingUMesh *sourceMesh=MEDCouplingBasicsTest::build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=MEDCouplingBasicsTest::build2DTargetMesh_1(); - // - MEDCouplingRemapper remapper; - remapper.setPrecision(1e-12); - remapper.setIntersectionType(INTERP_KERNEL::Triangulation); - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0")); - MEDCouplingFieldDouble *srcField=MEDCouplingFieldDouble::New(ON_CELLS); - srcField->setNature(ConservativeVolumic); - srcField->setMesh(sourceMesh); - DataArrayDouble *array=DataArrayDouble::New(); - array->alloc(sourceMesh->getNumberOfCells(),1); - srcField->setArray(array); - double *ptr=array->getPointer(); - for(int i=0;igetNumberOfCells();i++) - ptr[i]=(double)(i+7); - array->decrRef(); - MEDCouplingFieldDouble *trgField=remapper.transferField(srcField,4.57); - const double *values=trgField->getArray()->getConstPointer(); - const double valuesExpected[5]={7.5 ,7. ,7.,8.,7.5}; - CPPUNIT_ASSERT_EQUAL(5,trgField->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgField->getArray()->getNumberOfComponents()); - for(int i0=0;i0<5;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12); - trgField->decrRef(); - srcField->decrRef(); - sourceMesh->decrRef(); - targetMesh->decrRef(); - // ------------- 3D Surf - sourceMesh=MEDCouplingBasicsTest::build3DSurfSourceMesh_1(); - targetMesh=MEDCouplingBasicsTest::build3DSurfTargetMesh_1(); - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0")); - srcField=MEDCouplingFieldDouble::New(ON_CELLS); - srcField->setNature(ConservativeVolumic); - srcField->setMesh(sourceMesh); - array=DataArrayDouble::New(); - array->alloc(sourceMesh->getNumberOfCells(),1); - srcField->setArray(array); - ptr=array->getPointer(); - for(int i=0;igetNumberOfCells();i++) - ptr[i]=(double)(i+8); - array->decrRef(); - trgField=remapper.transferField(srcField,4.57); - CPPUNIT_ASSERT_EQUAL(5,trgField->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgField->getArray()->getNumberOfComponents()); - const double valuesExpected2[5]={8.5,8.,8.,9.,8.5}; - values=trgField->getArray()->getConstPointer(); - for(int i0=0;i0<5;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12); - trgField->decrRef(); - srcField->decrRef(); - sourceMesh->decrRef(); - targetMesh->decrRef(); - // ------------- 3D - sourceMesh=MEDCouplingBasicsTest::build3DSourceMesh_1(); - targetMesh=MEDCouplingBasicsTest::build3DTargetMesh_1(); - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0")); - srcField=MEDCouplingFieldDouble::New(ON_CELLS); - srcField->setNature(ConservativeVolumic); - srcField->setMesh(sourceMesh); - array=DataArrayDouble::New(); - array->alloc(sourceMesh->getNumberOfCells(),1); - srcField->setArray(array); - ptr=array->getPointer(); - for(int i=0;igetNumberOfCells();i++) - ptr[i]=(double)(i+7); - array->decrRef(); - trgField=remapper.transferField(srcField,4.57); - CPPUNIT_ASSERT_EQUAL(8,trgField->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgField->getArray()->getNumberOfComponents()); - const double valuesExpected3[8]={13.166666666666668, 13.888888888888888, 10.722222222222223, 10.870370370370372, - 14.555555555555555, 13.888888888888889, 14.444444444444443, 11.72222222222222}; - values=trgField->getArray()->getConstPointer(); - for(int i0=0;i0<8;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected3[i0],values[i0],1e-12); - trgField->decrRef(); - srcField->decrRef(); - sourceMesh->decrRef(); - targetMesh->decrRef(); - // ------------- 3D -> 1D - sourceMesh=MEDCouplingBasicsTest::build3DTargetMesh_1(); - targetMesh=MEDCouplingBasicsTest::build1DTargetMesh_1(); - remapper.setIntersectionType(INTERP_KERNEL::PointLocator); - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0")); - srcField=MEDCouplingFieldDouble::New(ON_CELLS); - srcField->setNature(ConservativeVolumic); - srcField->setMesh(sourceMesh); - array=DataArrayDouble::New(); - array->alloc(sourceMesh->getNumberOfCells(),1); - srcField->setArray(array); - ptr=array->getPointer(); - for(int i=0;igetNumberOfCells();i++) - ptr[i]=(double)(i+7); - array->decrRef(); - trgField=remapper.transferField(srcField,4.57); - CPPUNIT_ASSERT_EQUAL(8,trgField->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgField->getArray()->getNumberOfComponents()); - const double valuesExpected4[8]={7.,11.,8.,12.,9.,13.,10.,14.}; - values=trgField->getArray()->getConstPointer(); - for(int i0=0;i0<8;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected4[i0],values[i0],1e-12); - trgField->decrRef(); - srcField->decrRef(); - sourceMesh->decrRef(); - targetMesh->decrRef(); - // ------------- 1D -> 3D - sourceMesh=MEDCouplingBasicsTest::build1DTargetMesh_1(); - targetMesh=MEDCouplingBasicsTest::build3DTargetMesh_1(); - remapper.setIntersectionType(INTERP_KERNEL::PointLocator); - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0")); - srcField=MEDCouplingFieldDouble::New(ON_CELLS); - srcField->setNature(ConservativeVolumic); - srcField->setMesh(sourceMesh); - array=DataArrayDouble::New(); - array->alloc(sourceMesh->getNumberOfCells(),1); - srcField->setArray(array); - ptr=array->getPointer(); - for(int i=0;igetNumberOfCells();i++) - ptr[i]=(double)(i+7); - array->decrRef(); - trgField=remapper.transferField(srcField,4.57); - CPPUNIT_ASSERT_EQUAL(8,trgField->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgField->getArray()->getNumberOfComponents()); - const double valuesExpected5[8]={7.,9.,11.,13.,8.,10.,12.,14.}; - values=trgField->getArray()->getConstPointer(); - for(int i0=0;i0<8;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected5[i0],values[i0],1e-12); - trgField->decrRef(); - srcField->decrRef(); - sourceMesh->decrRef(); - targetMesh->decrRef(); - // ------------- 2D -> 1D - sourceMesh=MEDCouplingBasicsTest::build2DTargetMesh_1(); - targetMesh=build1DTargetMesh_2(); - remapper.setIntersectionType(INTERP_KERNEL::PointLocator); - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0")); - srcField=MEDCouplingFieldDouble::New(ON_CELLS); - srcField->setNature(ConservativeVolumic); - srcField->setMesh(sourceMesh); - array=DataArrayDouble::New(); - array->alloc(sourceMesh->getNumberOfCells(),1); - srcField->setArray(array); - ptr=array->getPointer(); - for(int i=0;igetNumberOfCells();i++) - ptr[i]=(double)(i+7); - array->decrRef(); - trgField=remapper.transferField(srcField,4.57); - const double valuesExpected8[5]={9.,8.,11.,7.,11.}; - values=trgField->getArray()->getConstPointer(); - for(int i0=0;i0<5;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected8[i0],values[i0],1e-12); - trgField->decrRef(); - srcField->decrRef(); - sourceMesh->decrRef(); - targetMesh->decrRef(); - // ------------- 1D -> 2D - sourceMesh=build1DTargetMesh_2(); - targetMesh=MEDCouplingBasicsTest::build2DTargetMesh_1(); - remapper.setIntersectionType(INTERP_KERNEL::PointLocator); - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0")); - srcField=MEDCouplingFieldDouble::New(ON_CELLS); - srcField->setNature(ConservativeVolumic); - srcField->setMesh(sourceMesh); - array=DataArrayDouble::New(); - array->alloc(sourceMesh->getNumberOfCells(),1); - srcField->setArray(array); - ptr=array->getPointer(); - for(int i=0;igetNumberOfCells();i++) - ptr[i]=(double)(i+7); - array->decrRef(); - trgField=remapper.transferField(srcField,4.57); - const double valuesExpected9[5]={10.,8.,7.,4.57,10.}; - values=trgField->getArray()->getConstPointer(); - for(int i0=0;i0<5;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected9[i0],values[i0],1e-12); - trgField->decrRef(); - srcField->decrRef(); - sourceMesh->decrRef(); - targetMesh->decrRef(); - // ------------- 2D -> -1D - sourceMesh=MEDCouplingBasicsTest::build2DTargetMesh_1(); - targetMesh=MEDCouplingUMesh::New("an example of -1 D mesh",-1); - srcField=MEDCouplingFieldDouble::New(ON_CELLS); - srcField->setNature(ConservativeVolumic); - srcField->setMesh(sourceMesh); - array=DataArrayDouble::New(); - array->alloc(sourceMesh->getNumberOfCells(),1); - srcField->setArray(array); - ptr=array->getPointer(); - for(int i=0;igetNumberOfCells();i++) - ptr[i]=(double)(i+7); - array->decrRef(); - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0")); - trgField=remapper.transferField(srcField,4.57); - values=trgField->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(1,trgField->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgField->getNumberOfComponents()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,values[0],1e-14); - srcField->decrRef(); - srcField=remapper.reverseTransferField(trgField,4.220173); - CPPUNIT_ASSERT_EQUAL(5,srcField->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,srcField->getNumberOfComponents()); - values=srcField->getArray()->getConstPointer(); - for(int i0=0;i0<5;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,values[i0],1e-14); - srcField->decrRef(); - trgField->setNature(Integral); - srcField=remapper.reverseTransferField(trgField,4.220173); - CPPUNIT_ASSERT_EQUAL(5,srcField->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,srcField->getNumberOfComponents()); - values=srcField->getArray()->getConstPointer(); - const double valuesExpected6[5]={2.28125,1.140625,1.140625,2.28125,2.28125}; - for(int i0=0;i0<5;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected6[i0],values[i0],1e-14); - srcField->decrRef(); - trgField->decrRef(); - // ------------- -1D -> 2D - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(targetMesh,sourceMesh,"P0P0")); - trgField=MEDCouplingFieldDouble::New(ON_CELLS); - trgField->setNature(ConservativeVolumic); - trgField->setMesh(targetMesh); - array=DataArrayDouble::New(); - array->alloc(targetMesh->getNumberOfCells(),1); - trgField->setArray(array); - ptr=array->getPointer(); - ptr[0]=7.; - array->decrRef(); - srcField=remapper.transferField(trgField,4.221073); - values=srcField->getArray()->getConstPointer(); - for(int i0=0;i0<5;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,values[i0],1e-14); - srcField->decrRef(); - trgField->setNature(IntegralGlobConstraint); - srcField=remapper.transferField(trgField,4.221073); - values=srcField->getArray()->getConstPointer(); - const double valuesExpected7[5]={1.75,0.875,0.875,1.75,1.75}; - for(int i0=0;i0<5;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected7[i0],values[i0],1e-14); - srcField->decrRef(); - trgField->setNature(Integral); - srcField=remapper.transferField(trgField,4.221073); - values=srcField->getArray()->getConstPointer(); - for(int i0=0;i0<5;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected7[i0],values[i0],1e-14); - // - srcField->decrRef(); - trgField->decrRef(); - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingRemapperTest::testNatureOfField() -{ - MEDCouplingUMesh *sourceMesh=MEDCouplingBasicsTest::build2DSourceMesh_1(); - MEDCouplingUMesh *targetMesh=build2DTargetMesh_3(); - // - MEDCouplingRemapper remapper; - remapper.setPrecision(1e-12); - remapper.setIntersectionType(INTERP_KERNEL::Triangulation); - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0")); - MEDCouplingFieldDouble *srcField=MEDCouplingFieldDouble::New(ON_CELLS); - srcField->setNature(ConservativeVolumic); - srcField->setMesh(sourceMesh); - DataArrayDouble *array=DataArrayDouble::New(); - array->alloc(sourceMesh->getNumberOfCells(),1); - srcField->setArray(array); - double *ptr=array->getPointer(); - for(int i=0;igetNumberOfCells();i++) - ptr[i]=(double)(i+7); - array->decrRef(); - MEDCouplingFieldDouble *trgfield=remapper.transferField(srcField,4.220173); - const double *values=trgfield->getArray()->getConstPointer(); - const double valuesExpected[4]={7.75, 7.0625, 4.220173,8.0}; - CPPUNIT_ASSERT_EQUAL(4,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<4;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12); - trgfield->decrRef(); - // - srcField->setNature(IntegralGlobConstraint); - trgfield=remapper.transferField(srcField,4.220173); - values=trgfield->getArray()->getConstPointer(); - const double valuesExpected2[4]={2.8374999999999999, 7.3624999999999998, 4.220173, 4.7999999999999998}; - CPPUNIT_ASSERT_EQUAL(4,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<4;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12); - trgfield->decrRef(); - // - srcField->setNature(Integral); - trgfield=remapper.transferField(srcField,4.220173); - values=trgfield->getArray()->getConstPointer(); - const double valuesExpected3[4]={1.24, 4.5199999999999996, 4.220173, 1.9199999999999999}; - CPPUNIT_ASSERT_EQUAL(4,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<4;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected3[i0],values[i0],1e-12); - trgfield->decrRef(); - // - srcField->setNature(RevIntegral); - trgfield=remapper.transferField(srcField,4.220173); - values=trgfield->getArray()->getConstPointer(); - const double valuesExpected9[4]={2.48, 3.766666666666666, 4.220173, 1.9199999999999999}; - CPPUNIT_ASSERT_EQUAL(4,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<4;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected9[i0],values[i0],1e-12); - trgfield->decrRef(); - // - srcField->decrRef(); - // REVERSE *********** - trgfield=MEDCouplingFieldDouble::New(ON_CELLS); - trgfield->setNature(ConservativeVolumic); - trgfield->setMesh(targetMesh); - array=DataArrayDouble::New(); - array->alloc(targetMesh->getNumberOfCells(),1); - trgfield->setArray(array); - ptr=array->getPointer(); - for(int i=0;igetNumberOfCells();i++) - ptr[i]=(double)(i+7); - array->decrRef(); - srcField=remapper.reverseTransferField(trgfield,4.220173); - values=srcField->getArray()->getConstPointer(); - const double valuesExpected4[2]={7.9375, 8.9}; - CPPUNIT_ASSERT_EQUAL(2,srcField->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,srcField->getArray()->getNumberOfComponents()); - for(int i0=0;i0<2;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected4[i0],values[i0],1e-12); - srcField->decrRef(); - // - trgfield->decrRef(); - // - sourceMesh->decrRef(); - targetMesh->decrRef(); - // REVERSE ALL - sourceMesh=build2DTargetMesh_3(); - targetMesh=MEDCouplingBasicsTest::build2DSourceMesh_1(); - // - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0")); - srcField=MEDCouplingFieldDouble::New(ON_CELLS); - srcField->setNature(ConservativeVolumic); - srcField->setMesh(sourceMesh); - array=DataArrayDouble::New(); - array->alloc(sourceMesh->getNumberOfCells(),1); - srcField->setArray(array); - ptr=array->getPointer(); - for(int i=0;igetNumberOfCells();i++) - ptr[i]=(double)(i+7); - array->decrRef(); - trgfield=remapper.transferField(srcField,4.220173); - values=trgfield->getArray()->getConstPointer(); - const double valuesExpected5[2]={7.9375, 8.9}; - CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<2;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected5[i0],values[i0],1e-12); - trgfield->decrRef(); - // - srcField->setNature(IntegralGlobConstraint); - trgfield=remapper.transferField(srcField,4.220173); - values=trgfield->getArray()->getConstPointer(); - const double valuesExpected6[4]={9.25, 15.75}; - CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<2;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected6[i0],values[i0],1e-12); - trgfield->decrRef(); - // - srcField->setNature(Integral); - trgfield=remapper.transferField(srcField,4.220173); - values=trgfield->getArray()->getConstPointer(); - const double valuesExpected7[2]={4.56, 4.3466666666666667}; - CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<2;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected7[i0],values[i0],1e-12); - trgfield->decrRef(); - // - srcField->setNature(RevIntegral); - trgfield=remapper.transferField(srcField,4.220173); - values=trgfield->getArray()->getConstPointer(); - const double valuesExpected10[2]={5.08, 3.56}; - CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); - for(int i0=0;i0<2;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected10[i0],values[i0],1e-12); - trgfield->decrRef(); - // - srcField->decrRef(); - // REVERSE *********** - trgfield=MEDCouplingFieldDouble::New(ON_CELLS); - trgfield->setNature(ConservativeVolumic); - trgfield->setMesh(targetMesh); - array=DataArrayDouble::New(); - array->alloc(targetMesh->getNumberOfCells(),1); - trgfield->setArray(array); - ptr=array->getPointer(); - for(int i=0;igetNumberOfCells();i++) - ptr[i]=(double)(i+7); - array->decrRef(); - srcField=remapper.reverseTransferField(trgfield,4.220173); - values=srcField->getArray()->getConstPointer(); - const double valuesExpected8[4]={7.75, 7.0625,4.220173, 8.0}; - CPPUNIT_ASSERT_EQUAL(4,srcField->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,srcField->getArray()->getNumberOfComponents()); - for(int i0=0;i0<4;i0++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected8[i0],values[i0],1e-12); - srcField->decrRef(); - // - trgfield->decrRef(); - // - sourceMesh->decrRef(); - targetMesh->decrRef(); -} - -void MEDCouplingRemapperTest::testExtruded() -{ - MEDCouplingUMesh *mesh2DS=0; - MEDCouplingUMesh *mesh3DS=build3DExtrudedUMesh_1(mesh2DS); - MEDCouplingExtrudedMesh *extS=MEDCouplingExtrudedMesh::New(mesh3DS,mesh2DS,1); - mesh3DS->decrRef(); - mesh2DS->decrRef(); - MEDCouplingUMesh *mesh2DT=0; - MEDCouplingUMesh *mesh3DT=build3DExtrudedUMesh_1(mesh2DT); - MEDCouplingExtrudedMesh *extT=MEDCouplingExtrudedMesh::New(mesh3DT,mesh2DT,1); - // - // - mesh3DT->decrRef(); - mesh2DT->decrRef(); - // - extS->decrRef(); - extT->decrRef(); -} - -void MEDCouplingRemapperTest::testExtruded2() -{ - MEDCouplingUMesh *meshN,*meshTT,*meshTF; - MEDCouplingBasicsTest::build3DExtrudedUMesh_2(meshN,meshTT,meshTF); - std::vector n; - double pt[3]={300.,300.,0.}; - double v[3]={0.,0.,2.}; - meshN->findNodesOnPlane(pt,v,1e-12,n); - MEDCouplingUMesh *meshN2D=(MEDCouplingUMesh *)meshN->buildFacePartOfMySelfNode(&n[0],&n[0]+n.size(),true); - n.clear(); - bool b=false; - DataArrayInt *da=meshTT->mergeNodes(1e-12,b); - CPPUNIT_ASSERT(b); - da->decrRef(); - meshTT->findNodesOnPlane(pt,v,1e-12,n); - MEDCouplingUMesh *meshTT2D=(MEDCouplingUMesh *)meshTT->buildFacePartOfMySelfNode(&n[0],&n[0]+n.size(),true); - n.clear(); - meshTF->findNodesOnPlane(pt,v,1e-12,n); - MEDCouplingUMesh *meshTF2D=(MEDCouplingUMesh *)meshTF->buildFacePartOfMySelfNode(&n[0],&n[0]+n.size(),true); - n.clear(); - // - MEDCouplingExtrudedMesh *meshNE=MEDCouplingExtrudedMesh::New(meshN,meshN2D,0); - MEDCouplingExtrudedMesh *meshTTE=MEDCouplingExtrudedMesh::New(meshTT,meshTT2D,0); - MEDCouplingExtrudedMesh *meshTFE=MEDCouplingExtrudedMesh::New(meshTF,meshTF2D,0); - // - MEDCouplingRemapper remapper; - remapper.setPrecision(1e-12); - remapper.setIntersectionType(INTERP_KERNEL::Geometric2D); - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(meshNE,meshTTE,"P0P0")); - MEDCouplingFieldDouble *srcField=MEDCouplingFieldDouble::New(ON_CELLS); - srcField->setNature(IntegralGlobConstraint); - srcField->setMesh(meshNE); - DataArrayDouble *array=DataArrayDouble::New(); - array->alloc(meshNE->getNumberOfCells(),1); - srcField->setArray(array); - double vals1[40]={ - 1000.,1000.,1020.,1030.,1040.,1000.,1000.,1070.,1080.,1090.,1000.,1000.,1120.,1130.,1140.,1000.,1000.,1170.,1180.,1190., - 2000.,2000.,2020.,2030.,2040.,2000.,2000.,2070.,2080.,2090.,2000.,2000.,2120.,2130.,2140.,2000.,2000.,2170.,2180.,2190., - }; - CPPUNIT_ASSERT_EQUAL((int)(sizeof(vals1)/sizeof(double)),meshNE->getNumberOfCells()); - std::copy(vals1,vals1+meshNE->getNumberOfCells(),array->getPointer()); - array->decrRef(); - MEDCouplingFieldDouble *trgField=remapper.transferField(srcField,4.220173); - double expected1[200]={ - 800.,800.,800.,800.,800.,800.,800.,800.,800.,800.,1600.,1600.,1600.,1600.,1600.,1600.,1600.,1600.,1600.,1600., - 102.,102.,102.,102.,102.,102.,102.,102.,102.,102.,202.,202.,202.,202.,202.,202.,202.,202.,202.,202., - 103.,103.,103.,103.,103.,103.,103.,103.,103.,103.,203.,203.,203.,203.,203.,203.,203.,203.,203.,203., - 104.,104.,104.,104.,104.,104.,104.,104.,104.,104.,204.,204.,204.,204.,204.,204.,204.,204.,204.,204., - 219.,219.,219.,219.,219.,219.,219.,219.,219.,219.,419.,419.,419.,419.,419.,419.,419.,419.,419.,419., - 221.,221.,221.,221.,221.,221.,221.,221.,221.,221.,421.,421.,421.,421.,421.,421.,421.,421.,421.,421., - 223.,223.,223.,223.,223.,223.,223.,223.,223.,223.,423.,423.,423.,423.,423.,423.,423.,423.,423.,423., - 117.,117.,117.,117.,117.,117.,117.,117.,117.,117.,217.,217.,217.,217.,217.,217.,217.,217.,217.,217., - 118.,118.,118.,118.,118.,118.,118.,118.,118.,118.,218.,218.,218.,218.,218.,218.,218.,218.,218.,218., - 119.,119.,119.,119.,119.,119.,119.,119.,119.,119.,219.,219.,219.,219.,219.,219.,219.,219.,219.,219. - }; - for(int i=0;i<200;i++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],trgField->getArray()->getConstPointer()[i],1e-3);//1e-3 precision due to non coincidence in 1D mesh - CPPUNIT_ASSERT_DOUBLES_EQUAL(std::accumulate(expected1,expected1+200,0.),std::accumulate(vals1,vals1+40,0.),1e-10); - CPPUNIT_ASSERT_DOUBLES_EQUAL(std::accumulate(expected1,expected1+200,0.),std::accumulate(trgField->getArray()->getConstPointer(),trgField->getArray()->getConstPointer()+200,0.),1e-10); - trgField->decrRef(); - // - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(meshNE,meshTFE,"P0P0")); - trgField=remapper.transferField(srcField,4.220173); - double expected2[340]={25.5, 51.25, 51.75, 26., 79., 158.75, 160.25, 80.5, 85.25, 171.25, 172.75, 86.75, 29.25, 58.75, 59.25, 29.75, 25.5, 51.25, 51.75, 26., 79., 158.75, - 160.25, 80.5, 85.25, 171.25, 172.75, 86.75, 29.25, 58.75, 59.25, 29.75, 25.5, 51.25, 51.75, 26., 79., 158.75, 160.25, 80.5, 85.25, 171.25, 172.75, 86.75, - 29.25, 58.75, 59.25, 29.75, 25.5, 51.25, 51.75, 26., 79., 158.75, 160.25, 80.5, 85.25, 171.25, 172.75, 86.75, 29.25, 58.75, 59.25, 29.75, 25.5, 51.25, 51.75, - 26., 79., 158.75, 160.25, 80.5, 85.25, 171.25, 172.75, 86.75, 29.25, 58.75, 59.25, 29.75, 25.5, 51.25, 51.75, 26., 79., 158.75, 160.25, 80.5, 85.25, 171.25, - 172.75, 86.75, 29.25, 58.75, 59.25, 29.75, 25.5, 51.25, 51.75, 26., 79., 158.75, 160.25, 80.5, 85.25, 171.25, 172.75, 86.75, 29.25, 58.75, 59.25, 29.75, 25.5, - 51.25, 51.75, 26., 79., 158.75, 160.25, 80.5, 85.25, 171.25, 172.75, 86.75, 29.25, 58.75, 59.25, 29.75, 25.5, 51.25, 51.75, 26., 79., 158.75, 160.25, 80.5, - 85.25, 171.25, 172.75, 86.75, 29.25, 58.75, 59.25, 29.75, 25.5, 51.25, 51.75, 26., 79., 158.75, 160.25, 80.5, 85.25, 171.25, 172.75, 86.75, 29.25, 58.75, 59.25, - 29.75, 50.5, 101.25, 101.75, 51., 154., 308.75, 310.25, 155.5, 160.25, 321.25, 322.75, 161.75, 54.25, 108.75, 109.25, 54.75, 50.5, 101.25, 101.75, 51., 154., - 308.75, 310.25, 155.5, 160.25, 321.25, 322.75, 161.75, 54.25, 108.75, 109.25, 54.75, 50.5, 101.25, 101.75, 51., 154., 308.75, 310.25, 155.5, 160.25, 321.25, 322.75, - 161.75, 54.25, 108.75, 109.25, 54.75, 50.5, 101.25, 101.75, 51., 154., 308.75, 310.25, 155.5, 160.25, 321.25, 322.75, 161.75, 54.25, 108.75, 109.25, 54.75, 50.5, - 101.25, 101.75, 51., 154., 308.75, 310.25, 155.5, 160.25, 321.25, 322.75, 161.75, 54.25, 108.75, 109.25, 54.75, 50.5, 101.25, 101.75, 51., 154., 308.75, 310.25, - 155.5, 160.25, 321.25, 322.75, 161.75, 54.25, 108.75, 109.25, 54.75, 50.5, 101.25, 101.75, 51., 154., 308.75, 310.25, 155.5, 160.25, 321.25, 322.75, 161.75, 54.25, - 108.75, 109.25, 54.75, 50.5, 101.25, 101.75, 51., 154., 308.75, 310.25, 155.5, 160.25, 321.25, 322.75, 161.75, 54.25, 108.75, 109.25, 54.75, 50.5, 101.25, 101.75, - 51., 154., 308.75, 310.25, 155.5, 160.25, 321.25, 322.75, 161.75, 54.25, 108.75, 109.25, 54.75, 50.5, 101.25, 101.75, 51., 154., 308.75, 310.25, 155.5, 160.25, 321.25, - 322.75, 161.75, 54.25, 108.75, 109.25, 54.75, 800., 800., 800., 800., 800., 800., 800., 800., 800., 800., 1600., 1600., 1600., 1600., 1600., 1600., 1600., - 1600., 1600., 1600.}; - for(int i=0;i<340;i++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],trgField->getArray()->getConstPointer()[i],1e-3);//1e-3 precision due to non coincidence in 1D mesh - CPPUNIT_ASSERT_DOUBLES_EQUAL(std::accumulate(expected2,expected2+340,0.),std::accumulate(vals1,vals1+40,0.),1e-10); - CPPUNIT_ASSERT_DOUBLES_EQUAL(std::accumulate(expected2,expected2+340,0.),std::accumulate(trgField->getArray()->getConstPointer(),trgField->getArray()->getConstPointer()+340,0.),1e-10); - trgField->decrRef(); - srcField->decrRef(); - // - double vals2[200]={ - 100., 200., 300., 400., 500., 600., 700., 800., 900., 1000., 1100., 1200., 1300., 1400., 1500., 1600., 1700., 1800., 1900., 2000, - 101., 201., 301., 401., 501., 601., 701., 801., 901., 1001., 1101., 1201., 1301., 1401., 1501., 1601., 1701., 1801., 1901., 2001, - 102., 202., 302., 402., 502., 602., 702., 802., 902., 1002., 1102., 1202., 1302., 1402., 1502., 1602., 1702., 1802., 1902., 2002, - 103., 203., 303., 403., 503., 603., 703., 803., 903., 1003., 1103., 1203., 1303., 1403., 1503., 1603., 1703., 1803., 1903., 2003, - 104., 204., 304., 404., 504., 604., 704., 804., 904., 1004., 1104., 1204., 1304., 1404., 1504., 1604., 1704., 1804., 1904., 2004, - 105., 205., 305., 405., 505., 605., 705., 805., 905., 1005., 1105., 1205., 1305., 1405., 1505., 1605., 1705., 1805., 1905., 2005, - 106., 206., 306., 406., 506., 606., 706., 806., 906., 1006., 1106., 1206., 1306., 1406., 1506., 1606., 1706., 1806., 1906., 2006, - 107., 207., 307., 407., 507., 607., 707., 807., 907., 1007., 1107., 1207., 1307., 1407., 1507., 1607., 1707., 1807., 1907., 2007, - 108., 208., 308., 408., 508., 608., 708., 808., 908., 1008., 1108., 1208., 1308., 1408., 1508., 1608., 1708., 1808., 1908., 2008, - 109., 209., 309., 409., 509., 609., 709., 809., 909., 1009., 1109., 1209., 1309., 1409., 1509., 1609., 1709., 1809., 1909., 2009. - }; - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(meshNE,meshTTE,"P0P0")); - trgField=MEDCouplingFieldDouble::New(ON_CELLS); - trgField->setNature(ConservativeVolumic); - trgField->setMesh(meshTTE); - array=DataArrayDouble::New(); - array->alloc(meshTTE->getNumberOfCells(),1); - trgField->setArray(array); - std::copy(vals2,vals2+meshTTE->getNumberOfCells(),array->getPointer()); - array->decrRef(); - srcField=remapper.reverseTransferField(trgField,4.220173); - double expected3[40]={ - 550.,550.,551.,552.,553.,550.,550.,554.,555.,556.,550.,550.,554.,555.,556.,550.,550.,557.,558.,559., - 1550.,1550.,1551.,1552.,1553.,1550.,1550.,1554.,1555.,1556.,1550.,1550.,1554.,1555.,1556.,1550.,1550.,1557.,1558.,1559. - }; - for(int i=0;i<40;i++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected3[i],srcField->getArray()->getConstPointer()[i],1e-3);//1e-3 precision due to non coincidence in 1D mesh - srcField->decrRef(); - trgField->decrRef(); - // - double vals3[340]={ - 100., 101., 102., 103., 104., 105., 106., 107., 108., 109., 110., 111., 112., 113., 114., 115., - 200., 201., 202., 203., 204., 205., 206., 207., 208., 209., 210., 211., 212., 213., 214., 215., - 300., 301., 302., 303., 304., 305., 306., 307., 308., 309., 310., 311., 312., 313., 314., 315., - 400., 401., 402., 403., 404., 405., 406., 407., 408., 409., 410., 411., 412., 413., 414., 415., - 500., 501., 502., 503., 504., 505., 506., 507., 508., 509., 510., 511., 512., 513., 514., 515., - 600., 601., 602., 603., 604., 605., 606., 607., 608., 609., 610., 611., 612., 613., 614., 615., - 700., 701., 702., 703., 704., 705., 706., 707., 708., 709., 710., 711., 712., 713., 714., 715., - 800., 801., 802., 803., 804., 805., 806., 807., 808., 809., 810., 811., 812., 813., 814., 815., - 900., 901., 902., 903., 904., 905., 906., 907., 908., 909., 910., 911., 912., 913., 914., 915., - 1000., 1001., 1002., 1003., 1004., 1005., 1006., 1007., 1008., 1009., 1010., 1011., 1012., 1013., 1014., 1015., - 1100., 1101., 1102., 1103., 1104., 1105., 1106., 1107., 1108., 1109., 1110., 1111., 1112., 1113., 1114., 1115., - 1200., 1201., 1202., 1203., 1204., 1205., 1206., 1207., 1208., 1209., 1210., 1211., 1212., 1213., 1214., 1215., - 1300., 1301., 1302., 1303., 1304., 1305., 1306., 1307., 1308., 1309., 1310., 1311., 1312., 1313., 1314., 1315., - 1400., 1401., 1402., 1403., 1404., 1405., 1406., 1407., 1408., 1409., 1410., 1411., 1412., 1413., 1414., 1415., - 1500., 1501., 1502., 1503., 1504., 1505., 1506., 1507., 1508., 1509., 1510., 1511., 1512., 1513., 1514., 1515., - 1600., 1601., 1602., 1603., 1604., 1605., 1606., 1607., 1608., 1609., 1610., 1611., 1612., 1613., 1614., 1615., - 1700., 1701., 1702., 1703., 1704., 1705., 1706., 1707., 1708., 1709., 1710., 1711., 1712., 1713., 1714., 1715., - 1800., 1801., 1802., 1803., 1804., 1805., 1806., 1807., 1808., 1809., 1810., 1811., 1812., 1813., 1814., 1815., - 1900., 1901., 1902., 1903., 1904., 1905., 1906., 1907., 1908., 1909., 1910., 1911., 1912., 1913., 1914., 1915., - 2000., 2001., 2002., 2003., 2004., 2005., 2006., 2007., 2008., 2009., 2010., 2011., 2012., 2013., 2014., 2015., - 116.,216.,316.,416.,516.,616.,716.,816.,916.,1016.,1116.,1216.,1316.,1416.,1516.,1616.,1716.,1816.,1916.,2016. - }; - CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(meshNE,meshTFE,"P0P0")); - trgField=MEDCouplingFieldDouble::New(ON_CELLS); - trgField->setNature(ConservativeVolumic); - trgField->setMesh(meshTFE); - array=DataArrayDouble::New(); - array->alloc(meshTFE->getNumberOfCells(),1); - trgField->setArray(array); - std::copy(vals3,vals3+meshTFE->getNumberOfCells(),array->getPointer()); - array->decrRef(); - srcField=remapper.reverseTransferField(trgField,4.220173); - double expected4[40]={ - 566.,566.,552.5,553.5,554.5,566.,566.,554.5,555.5,556.5,566.,566.,558.5,559.5,560.5,566.,566.,560.5,561.5,562.5, - 1566.,1566.,1552.5,1553.5,1554.5,1566.,1566.,1554.5,1555.5,1556.5,1566.,1566.,1558.5,1559.5,1560.5,1566.,1566.,1560.5,1561.5,1562.5 - }; - for(int i=0;i<40;i++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected4[i],srcField->getArray()->getConstPointer()[i],1e-3);//1e-3 precision due to non coincidence in 1D mesh - srcField->decrRef(); - trgField->decrRef(); - // - meshN2D->decrRef(); - meshTT2D->decrRef(); - meshTF2D->decrRef(); - meshNE->decrRef(); - meshTTE->decrRef(); - meshTFE->decrRef(); - meshN->decrRef(); - meshTT->decrRef(); - meshTF->decrRef(); -} - -MEDCouplingUMesh *MEDCouplingRemapperTest::build1DTargetMesh_2() -{ - double targetCoords[20]={ - 0.59,0.09, 0.69,0.19, 0.21,-0.29,0.31,-0.19, 0.45,0.25,0.65,0.45, - -0.2,-0.2,0.11,0.11, 0.25,0.25, 0.45,0.45 - }; - int targetConn[10]={0,1, 2,3, 4,5, 6,7, 8,9}; - - MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New("my name of mesh 1D 2",1); - targetMesh->allocateCells(5); - for(int i=0;i<5;i++) - targetMesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,targetConn+2*i); - targetMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(10,2); - std::copy(targetCoords,targetCoords+20,myCoords->getPointer()); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - return targetMesh; -} - -MEDCouplingUMesh *MEDCouplingRemapperTest::build2DTargetMesh_3() -{ - double targetCoords[20]={-0.6,-0.4, -0.1,-0.4, 1.1,-0.4, 2.1,-0.4, - -0.6,0.1, -0.1,0.1, 1.1,0.1, 2.1,0.1, - -0.6,1.1, -0.1,1.1}; - int targetConn[16]={0,4,5,1, 1,5,6,2, 2,6,7,3, 4,8,9,5}; - MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New(); - targetMesh->setMeshDimension(2); - targetMesh->allocateCells(4); - for(int i=0;i<4;i++) - targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+4*i); - targetMesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(10,2); - std::copy(targetCoords,targetCoords+20,myCoords->getPointer()); - targetMesh->setCoords(myCoords); - myCoords->decrRef(); - return targetMesh; -} - -MEDCouplingUMesh *MEDCouplingRemapperTest::build3DExtrudedUMesh_1(MEDCouplingUMesh *&mesh2D) -{ - double coords[180]={ - 0.,0.,0., 1.,1.,0., 1.,1.25,0., 0.,1.,0., 1.,1.5,0., 2.,0.,0., 2.,1.,0., 1.,2.,0., 0.,2.,0., 3.,1.,0., - 3.,2.,0., 0.,1.,0., 1.,3.,0., 2.,2.,0., 2.,3.,0., - 0.,0.,1., 1.,1.,1., 1.,1.25,1., 0.,1.,1., 1.,1.5,1., 2.,0.,1., 2.,1.,1., 1.,2.,1., 0.,2.,1., 3.,1.,1., - 3.,2.,1., 0.,1.,1., 1.,3.,1., 2.,2.,1., 2.,3.,1., - 0.,0.,2., 1.,1.,2., 1.,1.25,2., 0.,1.,2., 1.,1.5,2., 2.,0.,2., 2.,1.,2., 1.,2.,2., 0.,2.,2., 3.,1.,2., - 3.,2.,2., 0.,1.,2., 1.,3.,2., 2.,2.,2., 2.,3.,2., - 0.,0.,3., 1.,1.,3., 1.,1.25,3., 0.,1.,3., 1.,1.5,3., 2.,0.,3., 2.,1.,3., 1.,2.,3., 0.,2.,3., 3.,1.,3., - 3.,2.,3., 0.,1.,3., 1.,3.,3., 2.,2.,3., 2.,3.,3.}; - - int conn[354]={ - // 0 - 0,11,1,3,15,26,16,18, 1,2,4,7,13,6,-1,1,16,21,6,-1,6,21,28,13,-1,13,7,22,28,-1,7,4,19,22,-1,4,2,17,19,-1,2,1,16,17,-1,16,21,28,22,19,17, - 1,6,5,3,16,21,20,18, 13,10,9,6,28,25,24,21, - 11,8,7,4,2,1,-1,11,26,16,1,-1,1,16,17,2,-1,2,17,19,4,-1,4,19,22,7,-1,7,8,23,22,-1,8,11,26,23,-1,26,16,17,19,22,23, - 7,12,14,13,22,27,29,28, - // 1 - 15,26,16,18,30,41,31,33, 16,17,19,22,28,21,-1,16,31,36,21,-1,21,36,43,28,-1,28,22,37,43,-1,22,19,34,37,-1,19,17,32,34,-1,17,16,31,32,-1,31,36,43,37,34,32, - 16,21,20,18,31,36,35,33, 28,25,24,21,43,40,39,36, - 26,23,22,19,17,16,-1,26,41,31,16,-1,16,31,32,17,-1,17,32,34,19,-1,19,34,37,22,-1,22,23,38,37,-1,23,26,41,38,-1,41,31,32,34,37,38, - 22,27,29,28,37,42,44,43, - // 2 - 30,41,31,33,45,56,46,48, 31,32,34,37,43,36,-1,31,46,51,36,-1,36,51,58,43,-1,43,37,52,58,-1,37,34,49,52,-1,34,32,47,49,-1,32,31,46,47,-1,46,51,58,52,49,47, - 31,36,35,33,46,51,50,48, 43,40,39,36,58,55,54,51, - 41,38,37,34,32,31,-1,41,56,46,31,-1,31,46,47,32,-1,32,47,49,34,-1,34,49,52,37,-1,37,38,53,52,-1,38,41,56,53,-1,56,46,47,49,52,53, - 37,42,44,43,52,57,59,58 - }; - int conn2[28]={7,12,14,13, 11,8,7,4,2,1, 13,10,9,6, 1,6,5,3, 1,2,4,7,13,6, 0,11,1,3}; - // - MEDCouplingUMesh *ret=MEDCouplingUMesh::New(); - ret->setMeshDimension(3); - ret->allocateCells(18); - // - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn); - ret->insertNextCell(INTERP_KERNEL::NORM_POLYHED,43,conn+8); - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+51); - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+59); - ret->insertNextCell(INTERP_KERNEL::NORM_POLYHED,43,conn+67); - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+110); - // - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+118); - ret->insertNextCell(INTERP_KERNEL::NORM_POLYHED,43,conn+126); - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+169); - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+177); - ret->insertNextCell(INTERP_KERNEL::NORM_POLYHED,43,conn+185); - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+228); - // - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+236); - ret->insertNextCell(INTERP_KERNEL::NORM_POLYHED,43,conn+244); - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+287); - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+295); - ret->insertNextCell(INTERP_KERNEL::NORM_POLYHED,43,conn+303); - ret->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+346); - // - ret->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(60,3); - std::copy(coords,coords+180,myCoords->getPointer()); - ret->setCoords(myCoords); - // - mesh2D=MEDCouplingUMesh::New(); - mesh2D->setMeshDimension(2); - mesh2D->allocateCells(6); - mesh2D->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn2); - mesh2D->insertNextCell(INTERP_KERNEL::NORM_POLYGON,6,conn2+4); - mesh2D->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn2+10); - mesh2D->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn2+14); - mesh2D->insertNextCell(INTERP_KERNEL::NORM_POLYGON,6,conn2+18); - mesh2D->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn2+24); - mesh2D->setCoords(myCoords); - myCoords->decrRef(); - return ret; -} diff --git a/src/MEDCoupling/Test/MEDCouplingRemapperTest.hxx b/src/MEDCoupling/Test/MEDCouplingRemapperTest.hxx deleted file mode 100644 index 61dc0e701..000000000 --- a/src/MEDCoupling/Test/MEDCouplingRemapperTest.hxx +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __MEDCOUPLINGREMAPPERTEST_HXX__ -#define __MEDCOUPLINGREMAPPERTEST_HXX__ - -#include - -#include -#include - -namespace ParaMEDMEM -{ - class MEDCouplingUMesh; - - class MEDCouplingRemapperTest : public CppUnit::TestFixture - { - CPPUNIT_TEST_SUITE(MEDCouplingRemapperTest); - CPPUNIT_TEST( test2DInterpP0P0_1 ); - CPPUNIT_TEST( test2DInterpP0P0R_1 ); - CPPUNIT_TEST( test2DInterpMultiMethods ); - CPPUNIT_TEST( testMultiDimCombi ); - CPPUNIT_TEST( testNatureOfField ); - CPPUNIT_TEST( testExtruded ); - CPPUNIT_TEST( testExtruded2 ); - CPPUNIT_TEST_SUITE_END(); - public: - void test2DInterpP0P0_1(); - void test2DInterpP0P0R_1(); - void test2DInterpMultiMethods(); - void testMultiDimCombi(); - void testNatureOfField(); - void testExtruded(); - void testExtruded2(); - private: - static MEDCouplingUMesh *build1DTargetMesh_2(); - static MEDCouplingUMesh *build2DTargetMesh_3(); - static MEDCouplingUMesh *build3DExtrudedUMesh_1(MEDCouplingUMesh *&mesh2D); - }; -} - -#endif diff --git a/src/MEDCoupling/Test/TestMEDCouplingRemapper.cxx b/src/MEDCoupling/Test/TestMEDCouplingRemapper.cxx deleted file mode 100644 index 80b233001..000000000 --- a/src/MEDCoupling/Test/TestMEDCouplingRemapper.cxx +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "CppUnitTest.hxx" -#include "MEDCouplingRemapperTest.hxx" - -CPPUNIT_TEST_SUITE_REGISTRATION( ParaMEDMEM::MEDCouplingRemapperTest ); - -#include "BasicMainTest.hxx" diff --git a/src/MEDCoupling/MEDCouplingTimeLabel.cxx b/src/MEDCoupling/TimeLabel.cxx similarity index 91% rename from src/MEDCoupling/MEDCouplingTimeLabel.cxx rename to src/MEDCoupling/TimeLabel.cxx index dad0d5900..df03416ec 100644 --- a/src/MEDCoupling/MEDCouplingTimeLabel.cxx +++ b/src/MEDCoupling/TimeLabel.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,8 +16,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#include "MEDCouplingTimeLabel.hxx" +#include "TimeLabel.hxx" using namespace ParaMEDMEM; @@ -25,10 +24,6 @@ unsigned int TimeLabel::GLOBAL_TIME=0; TimeLabel::TimeLabel():_time(GLOBAL_TIME++) { -} - -TimeLabel::~TimeLabel() -{ } TimeLabel& TimeLabel::operator=(const TimeLabel& other) diff --git a/src/MEDCoupling/MEDCouplingTimeLabel.hxx b/src/MEDCoupling/TimeLabel.hxx similarity index 88% rename from src/MEDCoupling/MEDCouplingTimeLabel.hxx rename to src/MEDCoupling/TimeLabel.hxx index 2a8facca7..f0fd6e71f 100644 --- a/src/MEDCoupling/MEDCouplingTimeLabel.hxx +++ b/src/MEDCoupling/TimeLabel.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,19 +16,16 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #ifndef __PARAMEDMEM_TIMELABEL_HXX__ #define __PARAMEDMEM_TIMELABEL_HXX__ -#include "MEDCoupling.hxx" - namespace ParaMEDMEM { /*! * Class representing a label of time of the lastely modified part of this. * More _time is high more the object has been modified recently. */ - class MEDCOUPLING_EXPORT TimeLabel + class TimeLabel { public: TimeLabel& operator=(const TimeLabel& other); @@ -36,10 +33,8 @@ namespace ParaMEDMEM void declareAsNew(); //! This method should be called on high level classes as Field or Mesh to take into acount modifications done in aggragates objects. virtual void updateTime() = 0; - unsigned int getTimeOfThis() const { return _time; } protected: TimeLabel(); - virtual ~TimeLabel(); void updateTimeWith(const TimeLabel& other); private: static unsigned int GLOBAL_TIME; diff --git a/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py b/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py deleted file mode 100644 index 98db6b0d5..000000000 --- a/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2010 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. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -from libMEDCoupling_Swig import * -import unittest - -class MEDCouplingBasicsTest(unittest.TestCase): - def testMesh(self): - tab4=[1, 2, 8, 7, 2, 3, 9, 8, 3, - 4, 10, 9, 4, 5, 11, 10, 5, - 0, 6, 11, 0, 1, 7, 6 ] - nbOfNodes=12 - nbOfCells=6 - coords=[ 0.024155, 0.04183768725682622, -0.305, 0.04831000000000001, -1.015761910347357e-17, - -0.305, 0.09662000000000001, -1.832979297858306e-18, -0.305, 0.120775, 0.04183768725682623, - -0.305, 0.09662000000000001, 0.08367537451365245, -0.305, 0.04831000000000001, 0.08367537451365246, - -0.305, 0.024155, 0.04183768725682622, -0.2863, 0.04831000000000001, -1.015761910347357e-17, -0.2863, - 0.09662000000000001, -1.832979297858306e-18, -0.2863, 0.120775, 0.04183768725682623, -0.2863, 0.09662000000000001, - 0.08367537451365245, -0.2863, 0.04831000000000001, 0.08367537451365246, -0.2863 ] - mesh=MEDCouplingUMesh.New() - mesh.setMeshDimension(2) - mesh.allocateCells(8); - mesh.setName("mesh1") - self.failUnless(mesh.getName()=="mesh1") - for i in range(nbOfCells): - mesh.insertNextCell(NORM_QUAD4,4,tab4[4*i:4*(i+1)]); - pass - mesh.finishInsertingCells() - self.failUnless(mesh.getNumberOfCells()==nbOfCells) - self.failUnless(mesh.getNodalConnectivity().getNbOfElems()==30) - self.failUnless(mesh.getNodalConnectivityIndex().getNbOfElems()==nbOfCells+1) - myCoords=DataArrayDouble.New() - myCoords.setValues(coords,nbOfNodes,3); - self.failUnless(myCoords.getIJ(3,2)==-0.305) - mesh.setCoords(myCoords); - mesh.checkCoherency(); - self.failUnless(mesh.getAllTypes()==[4]) - myFalseConn=DataArrayInt.New() - myFalseConn.setValues(tab4,6,4) - self.failUnless(myFalseConn.getIJ(1,1)==3) - # - field=MEDCouplingFieldDouble.New(ON_CELLS) - field.setMesh(mesh) - field.setNature(Integral) - myCoords=DataArrayDouble.New() - sampleTab=[] - for i in range(nbOfCells*9): - sampleTab.append(float(i)) - myCoords.setValues(sampleTab,nbOfCells,9); - field.setArray(myCoords) - self.failUnless(3==mesh.getSpaceDimension()) - field.checkCoherency() - mesh2=mesh.clone(False) - mesh3=mesh.clone(True) - mesh3=0 - mesh2=0 - ## deep full recursively copy of field -> both field and mesh underneath copied - field2=field.clone(True) - field2.setMesh(field.getMesh().clone(True)) - mesh3=mesh.clone(True) - field3=mesh3.fillFromAnalytic(ON_CELLS,2,"x*IVec+(y+z)*JVec") - field3.applyFunc("u*u*u+cos(u)") - pass - def setUp(self): - pass - pass - -unittest.main() diff --git a/src/MEDCoupling_Swig/MEDCouplingRemapperTest.py b/src/MEDCoupling_Swig/MEDCouplingRemapperTest.py deleted file mode 100644 index 4be38ae90..000000000 --- a/src/MEDCoupling_Swig/MEDCouplingRemapperTest.py +++ /dev/null @@ -1,86 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2010 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. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -from libMEDCouplingRemapper_Swig import * -from math import * -import unittest - -class MEDCouplingBasicsTest(unittest.TestCase): - def testRemapper1(self): - sourceMesh=self.build2DSourceMesh_1(); - targetMesh=self.build2DTargetMesh_1(); - remapper=MEDCouplingRemapper() - remapper.setPrecision(1e-12); - remapper.setIntersectionType(Triangulation); - self.failUnless(remapper.prepare(sourceMesh,targetMesh,"P0P0")==1); - srcField=MEDCouplingFieldDouble.New(ON_CELLS); - srcField.setNature(ConservativeVolumic); - srcField.setMesh(sourceMesh); - array=DataArrayDouble.New(); - ptr=sourceMesh.getNumberOfCells()*[None] - for i in xrange(sourceMesh.getNumberOfCells()): - ptr[i]=float(i+7) - pass - array.setValues(ptr,sourceMesh.getNumberOfCells(),1); - srcField.setArray(array); - trgfield=remapper.transferField(srcField,4.57); - values=trgfield.getArray().getValues(); - valuesExpected=[7.5 ,7. ,7.,8.,7.5]; - for i in xrange(targetMesh.getNumberOfCells()): - self.failUnless(abs(values[i]-valuesExpected[i])<1e-12); - pass - self.failUnless(1==trgfield.getArray().getNumberOfComponents()); - pass - - def build2DSourceMesh_1(self): - sourceCoords=[-0.3,-0.3, 0.7,-0.3, -0.3,0.7, 0.7,0.7] - sourceConn=[0,3,1,0,2,3] - sourceMesh=MEDCouplingUMesh.New("my name of mesh 2D",2) - sourceMesh.allocateCells(2); - sourceMesh.insertNextCell(NORM_TRI3,3,sourceConn[0:3]); - sourceMesh.insertNextCell(NORM_TRI3,3,sourceConn[3:6]); - sourceMesh.finishInsertingCells(); - myCoords=DataArrayDouble.New(); - myCoords.setValues(sourceCoords,4,2); - sourceMesh.setCoords(myCoords); - return sourceMesh; - - def build2DTargetMesh_1(self): - targetCoords=[-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7 ] - targetConn=[0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4] - targetMesh=MEDCouplingUMesh.New(); - targetMesh.setMeshDimension(2); - targetMesh.allocateCells(5); - targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[0:4]); - targetMesh.insertNextCell(NORM_TRI3,3,targetConn[4:7]); - targetMesh.insertNextCell(NORM_TRI3,3,targetConn[7:10]); - targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[10:14]); - targetMesh.insertNextCell(NORM_QUAD4,4,targetConn[14:18]); - targetMesh.finishInsertingCells(); - myCoords=DataArrayDouble.New(); - myCoords.setValues(targetCoords,9,2); - targetMesh.setCoords(myCoords); - return targetMesh; - - def setUp(self): - pass - pass - -unittest.main() diff --git a/src/MEDCoupling_Swig/MEDCouplingTypemaps.i b/src/MEDCoupling_Swig/MEDCouplingTypemaps.i deleted file mode 100644 index 4b8e950b2..000000000 --- a/src/MEDCoupling_Swig/MEDCouplingTypemaps.i +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -static PyObject* convertMesh(ParaMEDMEM::MEDCouplingMesh* mesh, int owner) -{ - PyObject *ret; - if(dynamic_cast(mesh)) - ret=SWIG_NewPointerObj((void*)mesh,SWIGTYPE_p_ParaMEDMEM__MEDCouplingUMesh,owner); - return ret; -} - -static PyObject *convertIntArrToPyList(const int *ptr, int size) -{ - PyObject *ret=PyList_New(size); - for(int i=0;idecrRef();" -%feature("unref") MEDCouplingUMesh "$this->decrRef();" -%feature("unref") DataArrayInt "$this->decrRef();" -%feature("unref") MEDCouplingFieldDouble "$this->decrRef();" - -%ignore ParaMEDMEM::TimeLabel::operator=; -%ignore ParaMEDMEM::MemArray::operator=; -%ignore ParaMEDMEM::MemArray::operator[]; - -%nodefaultctor; -%include "MEDCouplingTimeLabel.hxx" -%include "MEDCouplingRefCountObject.hxx" -%include "MEDCouplingMesh.hxx" -%include "MEDCouplingPointSet.hxx" -%include "MEDCouplingMemArray.hxx" -%include "MEDCouplingMesh.hxx" -%include "NormalizedUnstructuredMesh.hxx" -%include "MEDCouplingField.hxx" -%include "MEDCouplingNatureOfField.hxx" - -namespace ParaMEDMEM -{ - class MEDCouplingUMesh : public ParaMEDMEM::MEDCouplingPointSet - { - public: - static MEDCouplingUMesh *New(); - static MEDCouplingUMesh *New(const char *meshName, int meshDim); - MEDCouplingUMesh *clone(bool recDeepCpy) const; - void updateTime(); - void checkCoherency() const throw(INTERP_KERNEL::Exception); - void setMeshDimension(int meshDim); - void allocateCells(int nbOfCells); - void setCoords(DataArrayDouble *coords); - DataArrayDouble *getCoords() const; - void finishInsertingCells(); - void setConnectivity(DataArrayInt *conn, DataArrayInt *connIndex, bool isComputingTypes=true); - DataArrayInt *getNodalConnectivity() const; - DataArrayInt *getNodalConnectivityIndex() const; - INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const; - int getNumberOfNodesInCell(int cellId) const; - bool isStructured() const; - int getNumberOfCells() const; - int getNumberOfNodes() const; - int getSpaceDimension() const; - int getMeshDimension() const; - int getMeshLength() const; - //tools - void zipCoords(); - DataArrayInt *zipCoordsTraducer(); - void getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const; - MEDCouplingUMesh *buildPartOfMySelf(const int *start, const int *end, bool keepCoords) const; - %extend { - void insertNextCell(INTERP_KERNEL::NormalizedCellType type, int size, PyObject *li) - { - int *tmp=convertPyToNewIntArr(li,size); - self->insertNextCell(type,size,tmp); - delete [] tmp; - } - PyObject *getAllTypes() const - { - std::set result=self->getAllTypes(); - std::set::const_iterator iL=result.begin(); - PyObject *res = PyList_New(result.size()); - for (int i=0;iL!=result.end(); i++, iL++) - PyList_SetItem(res,i,PyInt_FromLong(*iL)); - return res; - } - PyObject *mergeNodes(double precision) - { - bool ret1; - DataArrayInt *ret0=self->mergeNodes(precision,ret1); - PyObject *res = PyList_New(2); - PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 )); - PyList_SetItem(res,1,SWIG_From_bool(ret1)); - return res; - } - } - MEDCouplingFieldDouble *getMeasureField(bool isAbs) const; - static MEDCouplingUMesh *mergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2); - }; -} - -%extend ParaMEDMEM::DataArrayDouble - { - void setValues(PyObject *li, int nbOfTuples, int nbOfElsPerTuple) - { - double *tmp=convertPyToNewDblArr2(li); - self->useArray(tmp,true,CPP_DEALLOC,nbOfTuples,nbOfElsPerTuple); - } - - PyObject *getValues() - { - const double *vals=self->getPointer(); - return convertDblArrToPyList(vals,self->getNbOfElems()); - } - }; - -%extend ParaMEDMEM::DataArrayInt - { - void setValues(PyObject *li, int nbOfTuples, int nbOfElsPerTuple) - { - int *tmp=convertPyToNewIntArr2(li); - self->useArray(tmp,true,CPP_DEALLOC,nbOfTuples,nbOfElsPerTuple); - } - - PyObject *getValues() - { - const int *vals=self->getPointer(); - return convertIntArrToPyList(vals,self->getNbOfElems()); - } - }; - -%include "MEDCouplingField.hxx" - -namespace ParaMEDMEM -{ - class MEDCouplingFieldDouble : public ParaMEDMEM::MEDCouplingField - { - public: - static MEDCouplingFieldDouble *New(TypeOfField type, TypeOfTimeDiscretization td=NO_TIME); - MEDCouplingFieldDouble *clone(bool recDeepCpy) const; - void checkCoherency() const throw(INTERP_KERNEL::Exception); - double getIJ(int tupleId, int compoId) const; - void setArray(DataArrayDouble *array); - void setTime(double val, int dt, int it); - void setStartTime(double val, int dt, int it); - void setEndTime(double val, int dt, int it); - DataArrayDouble *getArray() const { return _array; } - void applyLin(double a, double b, int compoId); - int getNumberOfComponents() const; - int getNumberOfTuples() const throw(INTERP_KERNEL::Exception); - NatureOfField getNature() const { return _nature; } - void setNature(NatureOfField nat) throw(INTERP_KERNEL::Exception); - void updateTime(); - bool mergeNodes(double eps); - void applyFunc(int nbOfComp, const char *func); - void applyFunc(const char *func); - static MEDCouplingFieldDouble *mergeFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2); - %extend { - void setValues(PyObject *li) - { - if(self->getArray()!=0) - { - double *tmp=convertPyToNewDblArr2(li); - int nbTuples=self->getArray()->getNumberOfTuples(); - int nbOfCompo=self->getArray()->getNumberOfComponents(); - self->getArray()->useArray(tmp,true,CPP_DEALLOC,nbTuples,nbOfCompo); - } - else - PyErr_SetString(PyExc_TypeError,"setValuesCpy : field must contain an array behind"); - } - PyObject *getTime() - { - int tmp1,tmp2; - double tmp0=self->getTime(tmp1,tmp2); - PyObject *res = PyList_New(3); - PyList_SetItem(res,0,SWIG_From_double(tmp0)); - PyList_SetItem(res,1,SWIG_From_int(tmp1)); - PyList_SetItem(res,2,SWIG_From_int(tmp2)); - return res; - } - - PyObject *getStartTime() - { - int tmp1,tmp2; - double tmp0=self->getStartTime(tmp1,tmp2); - PyObject *res = PyList_New(3); - PyList_SetItem(res,0,SWIG_From_double(tmp0)); - PyList_SetItem(res,1,SWIG_From_int(tmp1)); - PyList_SetItem(res,2,SWIG_From_int(tmp2)); - return res; - } - - PyObject *getEndTime() - { - int tmp1,tmp2; - double tmp0=self->getEndTime(tmp1,tmp2); - PyObject *res = PyList_New(3); - PyList_SetItem(res,0,SWIG_From_double(tmp0)); - PyList_SetItem(res,1,SWIG_From_int(tmp1)); - PyList_SetItem(res,2,SWIG_From_int(tmp2)); - return res; - } - } - }; -} diff --git a/src/MEDLoader/MEDLoader.cxx b/src/MEDLoader/MEDLoader.cxx deleted file mode 100644 index f68192850..000000000 --- a/src/MEDLoader/MEDLoader.cxx +++ /dev/null @@ -1,1347 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "MEDLoader.hxx" -#include "MEDLoaderBase.hxx" -#include "CellModel.hxx" -#include "MEDCouplingUMesh.hxx" -#include "MEDCouplingMemArray.hxx" -#include "MEDCouplingFieldDouble.hxx" - -extern "C" -{ -#include "med.h" -} - -#include -#include -#include -#include -#include -#include -#include - -med_geometrie_element typmai[MED_NBR_GEOMETRIE_MAILLE+2] = { MED_POINT1, - MED_SEG2, - MED_SEG3, - MED_TRIA3, - MED_TRIA6, - MED_QUAD4, - MED_QUAD8, - MED_TETRA4, - MED_TETRA10, - MED_HEXA8, - MED_HEXA20, - MED_PENTA6, - MED_PENTA15, - MED_PYRA5, - MED_PYRA13, - MED_POLYGONE, - MED_POLYEDRE }; - -med_geometrie_element typmainoeud[1] = { MED_NONE }; - -INTERP_KERNEL::NormalizedCellType typmai2[MED_NBR_GEOMETRIE_MAILLE+2] = { INTERP_KERNEL::NORM_ERROR, - INTERP_KERNEL::NORM_SEG2, - INTERP_KERNEL::NORM_SEG3, - INTERP_KERNEL::NORM_TRI3, - INTERP_KERNEL::NORM_TRI6, - INTERP_KERNEL::NORM_QUAD4, - INTERP_KERNEL::NORM_QUAD8, - INTERP_KERNEL::NORM_TETRA4, - INTERP_KERNEL::NORM_TETRA10, - INTERP_KERNEL::NORM_HEXA8, - INTERP_KERNEL::NORM_HEXA20, - INTERP_KERNEL::NORM_PENTA6, - INTERP_KERNEL::NORM_PENTA15, - INTERP_KERNEL::NORM_PYRA5, - INTERP_KERNEL::NORM_PYRA13, - INTERP_KERNEL::NORM_POLYGON, - INTERP_KERNEL::NORM_POLYHED }; - -med_geometrie_element typmai3[32] = { MED_POINT1,//0 - MED_SEG2,//1 - MED_SEG3,//2 - MED_TRIA3,//3 - MED_QUAD4,//4 - MED_POLYGONE,//5 - MED_TRIA6,//6 - MED_NONE,//7 - MED_QUAD8,//8 - MED_NONE,//9 - MED_NONE,//10 - MED_NONE,//11 - MED_NONE,//12 - MED_NONE,//13 - MED_TETRA4,//14 - MED_PYRA5,//15 - MED_PENTA6,//16 - MED_NONE,//17 - MED_HEXA8,//18 - MED_NONE,//19 - MED_TETRA10,//20 - MED_NONE,//21 - MED_NONE,//22 - MED_PYRA13,//23 - MED_NONE,//24 - MED_PENTA15,//25 - MED_NONE,//26 - MED_NONE,//27 - MED_NONE,//28 - MED_NONE,//29 - MED_HEXA20,//30 - MED_POLYEDRE//31 -}; - -using namespace ParaMEDMEM; - -namespace MEDLoaderNS -{ - class FieldPerTypeCopier - { - public: - FieldPerTypeCopier(double *ptr):_ptr(ptr) { } - void operator()(const MEDLoader::MEDFieldDoublePerCellType& elt) { _ptr=std::copy(elt.getArray(),elt.getArray()+elt.getNbOfValues(),_ptr); } - private: - double *_ptr; - }; - - class ConnReaderML - { - public: - ConnReaderML(const int *c, int val):_conn(c),_val(val) { } - bool operator() (const int& pos) { return _conn[pos]!=_val; } - private: - const int *_conn; - int _val; - }; - - std::string buildStringFromFortran(const char *expr, int lgth); - std::vector getMeshNamesFid(med_idt fid); - void readFieldDoubleDataInMedFile(const char *fileName, const char *meshName, const char *fieldName, std::list& field, - int iteration, int order, ParaMEDMEM::TypeOfField typeOfOutField, double& time); - std::vector getIdsFromFamilies(const char *fileName, const char *meshName, const std::vector& fams); - std::vector getIdsFromGroups(const char *fileName, const char *meshName, const std::vector& grps); - med_int getIdFromMeshName(med_idt fid, const char *meshName, std::string& trueMeshName) throw(INTERP_KERNEL::Exception); - void dispatchElems(int nbOfElemCell, int nbOfElemFace, int& nbOfElem, med_entite_maillage& whichEntity); - void readUMeshDataInMedFile(med_idt fid, med_int meshId, double *&coords, int& nCoords, int& spaceDim, std::list& conn); - int buildMEDSubConnectivityOfOneType(DataArrayInt *conn, DataArrayInt *connIndex, INTERP_KERNEL::NormalizedCellType type, std::vector& conn4MEDFile, - std::vector& connIndex4MEDFile, std::vector& connIndexRk24MEDFile); - MEDCouplingUMesh *readUMeshFromFileLev1(const char *fileName, const char *meshName, int meshDimRelToMax, const std::vector& ids, - const std::vector& typesToKeep, unsigned& meshDimExtract) throw(INTERP_KERNEL::Exception); - void tradMEDFileCoreFrmt2MEDCouplingUMesh(const std::list& medConnFrmt, - DataArrayInt* &conn, - DataArrayInt* &connIndex, - const std::vector& familiesToKeep); - ParaMEDMEM::DataArrayDouble *buildArrayFromRawData(const std::list& fieldPerType); - int buildMEDSubConnectivityOfOneTypesPolyg(DataArrayInt *conn, DataArrayInt *connIndex, std::vector& conn4MEDFile, std::vector& connIndex4MEDFile); - int buildMEDSubConnectivityOfOneTypesPolyh(DataArrayInt *conn, DataArrayInt *connIndex, std::vector& conn4MEDFile, - std::vector& connIndex4MEDFile, std::vector& connIndexRk24MEDFile); - int buildMEDSubConnectivityOfOneTypeStaticTypes(DataArrayInt *conn, DataArrayInt *connIndex, INTERP_KERNEL::NormalizedCellType type, std::vector& conn4MEDFile); - ParaMEDMEM::MEDCouplingFieldDouble *readFieldDoubleLev1(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order, - ParaMEDMEM::TypeOfField typeOfOutField); - void appendFieldDirectly(const char *fileName, ParaMEDMEM::MEDCouplingFieldDouble *f); - void prepareCellFieldDoubleForWriting(const ParaMEDMEM::MEDCouplingFieldDouble *f, std::list& split); - void writeUMeshDirectly(const char *fileName, ParaMEDMEM::MEDCouplingUMesh *mesh, bool forceFromScratch); - void writeFieldAndMeshDirectly(const char *fileName, ParaMEDMEM::MEDCouplingFieldDouble *f, bool forceFromScratch); -} - -const char WHITE_SPACES[]=" \n"; - -/*! - * @param lgth is the size of fam tab. For classical types conn is size of 'lgth'*number_of_nodes_in_type. - * @param index is optionnal only for polys. Set it to 0 if it is not the case. - * @param connLgth is the size of conn in the case of poly. Unsued if it is not the case. - */ -MEDLoader::MEDConnOfOneElemType::MEDConnOfOneElemType(INTERP_KERNEL::NormalizedCellType type, int *conn, int *index, int *fam, int lgth, int connLgth):_lgth(lgth),_fam(fam), - _conn(conn),_index(index), - _global(0),_type(type), - _conn_lgth(connLgth) -{ -} - -void MEDLoader::MEDConnOfOneElemType::setGlobal(int *global) -{ - if(_global!=global) - { - if(_global) - delete [] _global; - _global=global; - } -} - -void MEDLoader::MEDConnOfOneElemType::releaseArray() -{ - delete [] _fam; - delete [] _conn; - delete [] _index; - delete [] _global; -} - -MEDLoader::MEDFieldDoublePerCellType::MEDFieldDoublePerCellType(INTERP_KERNEL::NormalizedCellType type, double *values, int ncomp, int ntuple):_ntuple(ntuple),_ncomp(ncomp),_values(values),_type(type) -{ -} - -void MEDLoader::MEDFieldDoublePerCellType::releaseArray() -{ - delete [] _values; -} - - -std::string MEDLoaderNS::buildStringFromFortran(const char *expr, int lgth) -{ - std::string ret(expr,lgth); - std::string whiteSpaces(WHITE_SPACES); - std::size_t lgthReal=strlen(ret.c_str()); - std::string ret2=ret.substr(0,lgthReal); - std::size_t found=ret2.find_last_not_of(whiteSpaces); - if (found!=std::string::npos) - ret2.erase(found+1); - else - ret2.clear();//ret is all whitespace - return ret2; -} - -std::vector MEDLoaderNS::getMeshNamesFid(med_idt fid) -{ - med_maillage type_maillage; - char maillage_description[MED_TAILLE_DESC+1]; - med_int dim; - char nommaa[MED_TAILLE_NOM+1]; - med_int n=MEDnMaa(fid); - std::vector ret(n); - for(int i=0;i MEDLoader::GetMeshNames(const char *fileName) -{ - med_idt fid=MEDouvrir((char *)fileName,MED_LECTURE); - std::vector ret=MEDLoaderNS::getMeshNamesFid(fid); - MEDfermer(fid); - return ret; -} - -std::vector MEDLoader::GetMeshFamilyNames(const char *fileName, const char *meshName) -{ - med_idt fid=MEDouvrir((char *)fileName,MED_LECTURE); - med_int nfam=MEDnFam(fid,(char *)meshName); - std::vector ret(nfam); - char nomfam[MED_TAILLE_NOM+1]; - med_int numfam; - for(int i=0;i MEDLoader::GetMeshGroupsNames(const char *fileName, const char *meshName) -{ - med_idt fid=MEDouvrir((char *)fileName,MED_LECTURE); - med_int nfam=MEDnFam(fid,(char *)meshName); - std::vector ret; - char nomfam[MED_TAILLE_NOM+1]; - med_int numfam; - for(int i=0;i MEDLoader::GetCellFieldNamesOnMesh(const char *fileName, const char *meshName) -{ - std::vector ret; - med_idt fid=MEDouvrir((char *)fileName,MED_LECTURE); - med_int nbFields=MEDnChamp(fid,0); - // - med_type_champ typcha; - //med_int nbpdtnor=0,pflsize,*pflval,lnsize; - med_int ngauss=0; - med_int numdt=0,numo=0,nbrefmaa; - med_float dt=0.0; - med_booleen local; - //char pflname[MED_TAILLE_NOM+1]=""; - //char locname[MED_TAILLE_NOM+1]=""; - char maa_ass[MED_TAILLE_NOM+1]=""; - char dt_unit[MED_TAILLE_PNOM+1]=""; - char nomcha[MED_TAILLE_NOM+1]=""; - // - for(int i=0;i0) - { - MEDpasdetempsInfo(fid,nomcha,MED_MAILLE,typmai[j],1, &ngauss, &numdt, &numo, dt_unit,&dt, maa_ass, &local, &nbrefmaa); - std::string curMeshName=MEDLoaderNS::buildStringFromFortran(maa_ass,MED_TAILLE_NOM+1); - if(curMeshName==meshName) - { - found=true; - ret.push_back(curFieldName); - } - } - } - } - MEDfermer(fid); - return ret; -} - -std::vector MEDLoader::GetNodeFieldNamesOnMesh(const char *fileName, const char *meshName) -{ - std::vector ret; - med_idt fid=MEDouvrir((char *)fileName,MED_LECTURE); - med_int nbFields=MEDnChamp(fid,0); - // - med_type_champ typcha; - med_int ngauss=0; - med_int numdt=0,numo=0,nbrefmaa; - med_float dt=0.0; - med_booleen local; - char maa_ass[MED_TAILLE_NOM+1]=""; - char dt_unit[MED_TAILLE_PNOM+1]=""; - char nomcha[MED_TAILLE_NOM+1]=""; - // - for(int i=0;i0) - { - MEDpasdetempsInfo(fid,nomcha,MED_NOEUD,MED_NONE,1, &ngauss, &numdt, &numo, dt_unit,&dt, maa_ass, &local, &nbrefmaa); - std::string curMeshName=MEDLoaderNS::buildStringFromFortran(maa_ass,MED_TAILLE_NOM+1); - if(curMeshName==meshName) - { - found=true; - ret.push_back(curFieldName); - } - } - } - MEDfermer(fid); - return ret; -} - -std::vector< std::pair > MEDLoader::GetCellFieldIterations(const char *fileName, const char *fieldName) -{ - std::vector< std::pair > ret; - med_idt fid=MEDouvrir((char *)fileName,MED_LECTURE); - med_int nbFields=MEDnChamp(fid,0); - // - med_type_champ typcha; - med_int ngauss=0; - med_int numdt=0,numo=0,nbrefmaa; - med_float dt=0.0; - med_booleen local; - char maa_ass[MED_TAILLE_NOM+1]=""; - char dt_unit[MED_TAILLE_PNOM+1]=""; - char nomcha[MED_TAILLE_NOM+1]=""; - // - for(int i=0;i > MEDLoader::GetNodeFieldIterations(const char *fileName, const char *fieldName) -{ - std::vector< std::pair > ret; - med_idt fid=MEDouvrir((char *)fileName,MED_LECTURE); - med_int nbFields=MEDnChamp(fid,0); - // - med_type_champ typcha; - med_int ngauss=0; - med_int numdt=0,numo=0,nbrefmaa; - med_float dt=0.0; - med_booleen local; - char maa_ass[MED_TAILLE_NOM+1]=""; - char dt_unit[MED_TAILLE_PNOM+1]=""; - char nomcha[MED_TAILLE_NOM+1]=""; - // - for(int i=0;i& field, - int iteration, int order, ParaMEDMEM::TypeOfField typeOfOutField, double& time) -{ - time=0.; - med_idt fid=MEDouvrir((char *)fileName,MED_LECTURE); - med_int nbFields=MEDnChamp(fid,0); - // - med_type_champ typcha; - char nomcha[MED_TAILLE_NOM+1]=""; - char pflname [MED_TAILLE_NOM+1]=""; - char locname [MED_TAILLE_NOM+1]=""; - std::map tabEnt; - std::map tabType; - std::map tabTypeLgth; - tabEnt[ON_CELLS]=MED_MAILLE; - tabType[ON_CELLS]=typmai; - tabTypeLgth[ON_CELLS]=MED_NBR_GEOMETRIE_MAILLE+2; - tabEnt[ON_NODES]=MED_NOEUD; - tabType[ON_NODES]=typmainoeud; - tabTypeLgth[ON_NODES]=1; - // - for(int i=0;i0) - { - int nval=MEDnVal(fid,(char *)fieldName,tabEnt[typeOfOutField],tabType[typeOfOutField][j],iteration,order,(char *)meshName,MED_COMPACT); - double *valr=new double[ncomp*nval]; - // - med_int ngauss=0; - med_int numdt=0,numo=0,nbrefmaa; - char dt_unit[MED_TAILLE_PNOM+1]=""; - char maa_ass[MED_TAILLE_NOM+1]=""; - med_float dt=0.0; - med_booleen local; - med_int nbPdt=MEDnPasdetemps(fid,(char *)fieldName,MED_MAILLE,tabType[typeOfOutField][j]); - bool found2=false; - for(int k=0;k MEDLoaderNS::getIdsFromFamilies(const char *fileName, const char *meshName, const std::vector& fams) -{ - std::vector ret; - med_idt fid=MEDouvrir((char *)fileName,MED_LECTURE); - med_int nfam=MEDnFam(fid,(char *)meshName); - char nomfam[MED_TAILLE_NOM+1]; - med_int numfam; - for(int i=0;i MEDLoaderNS::getIdsFromGroups(const char *fileName, const char *meshName, const std::vector& grps) -{ - std::vector ret; - med_idt fid=MEDouvrir((char *)fileName,MED_LECTURE); - med_int nfam=MEDnFam(fid,(char *)meshName); - char nomfam[MED_TAILLE_NOM+1]; - med_int numfam; - for(int i=0;i meshes=getMeshNamesFid(fid); - if(meshes.empty()) - throw INTERP_KERNEL::Exception("No mesh in file"); - trueMeshName=meshes[0]; - return 1; - } - std::string meshNameStr(meshName); - std::vector meshes=getMeshNamesFid(fid); - if(meshes.empty()) - throw INTERP_KERNEL::Exception("No mesh in file"); - std::vector::iterator iter=std::find(meshes.begin(),meshes.end(),meshNameStr); - if(iter==meshes.end()) - { - std::ostringstream os2; - os2 << "MeshName '" << meshName << "' not in file : meshes available : "; - std::copy(meshes.begin(),meshes.end(),std::ostream_iterator(os2," ")); - throw INTERP_KERNEL::Exception(os2.str().c_str()); - } - trueMeshName=meshName; - return iter-meshes.begin()+1; -} - -/*! - * This methods allows to merger all entities and to considerate only cell types. - */ -void MEDLoaderNS::dispatchElems(int nbOfElemCell, int nbOfElemFace, int& nbOfElem, med_entite_maillage& whichEntity) -{ - if(nbOfElemCell>=nbOfElemFace) - { - whichEntity=MED_MAILLE; - nbOfElem=nbOfElemCell; - } - else - { - whichEntity=MED_FACE; - nbOfElem=nbOfElemFace; - } -} - -void MEDLoaderNS::readUMeshDataInMedFile(med_idt fid, med_int meshId, double *&coords, int& nCoords, int& spaceDim, std::list& conn) -{ - char nommaa[MED_TAILLE_NOM+1]; - char maillage_description[MED_TAILLE_DESC+1]; - char comp[3*MED_TAILLE_PNOM+1]; - char unit[3*MED_TAILLE_PNOM+1]; - med_maillage type_maillage; - med_int Mdim; - MEDmaaInfo(fid,meshId,nommaa,&Mdim,&type_maillage,maillage_description); - spaceDim=(int)Mdim; - nCoords=MEDnEntMaa(fid,nommaa,MED_COOR,MED_NOEUD,(med_geometrie_element)0,(med_connectivite)0); - coords=new double[nCoords*spaceDim]; - med_repere repere; - MEDcoordLire(fid,nommaa,Mdim,coords,MED_FULL_INTERLACE,MED_ALL,NULL,0,&repere,comp,unit); - med_booleen inoele, inuele; - for(int i=0;i0) - { - int *connTab=new int[(curMedType%100)*curNbOfElem]; - int *fam=new int[curNbOfElem]; - MEDLoader::MEDConnOfOneElemType elem(typmai2[i],connTab,0,fam,curNbOfElem,-1); - int *tmp=new int[curNbOfElem]; - char *noms=new char[MED_TAILLE_PNOM*curNbOfElem+1]; - MEDelementsLire(fid,nommaa,Mdim,connTab,MED_FULL_INTERLACE,noms,&inoele,tmp,&inuele,fam,curNbOfElem,whichEntity,curMedType,MED_NOD); - delete [] tmp; - delete [] noms; - //trying to read global numbering - int *globArr=new int[curNbOfElem]; - if(MEDglobalNumLire(fid,nommaa,globArr,curNbOfElem,whichEntity,curMedType)==0) - elem.setGlobal(globArr); - else - delete [] globArr; - conn.push_back(elem); - } - } - int curNbOfPolyElem; - int curNbOfPolyElemM=MEDnEntMaa(fid,nommaa,MED_CONN,MED_MAILLE,MED_POLYGONE,MED_NOD); - int curNbOfPolyElemF=MEDnEntMaa(fid,nommaa,MED_CONN,MED_FACE,MED_POLYGONE,MED_NOD); - med_entite_maillage whichPolyEntity; - MEDLoaderNS::dispatchElems(curNbOfPolyElemM,curNbOfPolyElemF,curNbOfPolyElem,whichPolyEntity); - if(curNbOfPolyElem>0) - { - med_int arraySize; - MEDpolygoneInfo(fid,nommaa,whichPolyEntity,MED_NOD,&arraySize); - int *index=new int[curNbOfPolyElem+1]; - int *locConn=new int[arraySize]; - int *fam=new int[curNbOfPolyElem]; - MEDLoader::MEDConnOfOneElemType elem(INTERP_KERNEL::NORM_POLYGON,locConn,index,fam,curNbOfPolyElem,arraySize); - MEDpolygoneConnLire(fid,nommaa,index,curNbOfPolyElem+1,locConn,whichPolyEntity,MED_NOD); - MEDfamLire(fid,nommaa,fam,curNbOfPolyElem,MED_MAILLE,MED_POLYGONE); - conn.push_back(elem); - } - curNbOfPolyElem=MEDnEntMaa(fid,nommaa,MED_CONN,MED_MAILLE,MED_POLYEDRE,MED_NOD); - if(curNbOfPolyElem>0) - { - med_int indexFaceLgth,connFaceLgth; - MEDpolyedreInfo(fid,nommaa,MED_NOD,&indexFaceLgth,&connFaceLgth); - int *index=new int[curNbOfPolyElem+1]; - int *indexFace=new int[indexFaceLgth]; - int *locConn=new int[connFaceLgth]; - int *fam=new int[curNbOfPolyElem]; - MEDpolyedreConnLire(fid,nommaa,index,curNbOfPolyElem+1,indexFace,indexFaceLgth,locConn,MED_NOD); - MEDfamLire(fid,nommaa,fam,curNbOfPolyElem,MED_MAILLE,MED_POLYEDRE); - int arraySize=connFaceLgth; - for(int i=0;i - unsigned calculateHighestMeshDim(const std::list& conn) - { - unsigned ret=0; - for(typename std::list::const_iterator iter=conn.begin();iter!=conn.end();iter++) - { - unsigned curDim=INTERP_KERNEL::CellModel::getCellModel((*iter).getType()).getDimension(); - if(ret - void keepSpecifiedMeshDim(typename std::list& conn, unsigned meshDim) - { - for(typename std::list::iterator iter=conn.begin();iter!=conn.end();) - { - unsigned curDim=INTERP_KERNEL::CellModel::getCellModel((*iter).getType()).getDimension(); - if(curDim!=meshDim) - { - (*iter).releaseArray(); - iter=conn.erase(iter); - } - else - iter++; - } - } - - template - void keepTypes(typename std::list& conn, const std::vector& typesToKeep) - { - if(!typesToKeep.empty()) - { - for(typename std::list::iterator iter=conn.begin();iter!=conn.end();) - { - INTERP_KERNEL::NormalizedCellType curType=(*iter).getType(); - if(std::find(typesToKeep.begin(),typesToKeep.end(),curType)==typesToKeep.end()) - { - (*iter).releaseArray(); - iter=conn.erase(iter); - } - else - iter++; - } - } - } -} - -class FieldPerTypeAccumulator -{ -public: - int operator()(int res, const MEDLoader::MEDFieldDoublePerCellType& elt) { return res+elt.getNbOfTuple(); } -}; - -ParaMEDMEM::DataArrayDouble *MEDLoaderNS::buildArrayFromRawData(const std::list& fieldPerType) -{ - ParaMEDMEM::DataArrayDouble *ret=ParaMEDMEM::DataArrayDouble::New(); - int totalNbOfTuple=std::accumulate(fieldPerType.begin(),fieldPerType.end(),0,FieldPerTypeAccumulator()); - int nbOfComp=(*fieldPerType.begin()).getNbComp(); - double *ptr=new double[nbOfComp*totalNbOfTuple]; - ret->useArray(ptr,true,ParaMEDMEM::CPP_DEALLOC,totalNbOfTuple,nbOfComp); - std::for_each(fieldPerType.begin(),fieldPerType.end(),FieldPerTypeCopier(ptr)); - return ret; -} - -class PolyCounterForFams -{ -public: - PolyCounterForFams(int id, const int *index):_id(id),_index(index),_count(0),_sigma(0) { } - void operator()(int val) { if(val==_id) _sigma+=_index[_count+1]-_index[_count]; _count++; } - int getSigma() const { return _sigma; } -private: - int _id; - const int *_index; - int _count; - int _sigma; -}; - -void MEDLoaderNS::tradMEDFileCoreFrmt2MEDCouplingUMesh(const std::list& medConnFrmt, - DataArrayInt* &conn, - DataArrayInt* &connIndex, - const std::vector& familiesToKeep) -{ - bool keepAll=familiesToKeep.empty(); - if(medConnFrmt.empty()) - { - conn=0; - connIndex=0; - return ; - } - std::list::const_iterator iter=medConnFrmt.begin(); - int totalNbOfCells=0; - int totalNbOfMedConn=0; - for(;iter!=medConnFrmt.end();iter++) - { - const INTERP_KERNEL::CellModel& cellMod=INTERP_KERNEL::CellModel::getCellModel((*iter).getType()); - if(keepAll) - totalNbOfCells+=(*iter).getLength(); - else - for(std::vector::const_iterator iter2=familiesToKeep.begin();iter2!=familiesToKeep.end();iter2++) - totalNbOfCells+=std::count((*iter).getFam(),(*iter).getFam()+(*iter).getLength(),*iter2); - if(!cellMod.isDynamic()) - if(keepAll) - totalNbOfMedConn+=(*iter).getLength()*cellMod.getNumberOfNodes(); - else - for(std::vector::const_iterator iter2=familiesToKeep.begin();iter2!=familiesToKeep.end();iter2++) - totalNbOfMedConn+=std::count((*iter).getFam(),(*iter).getFam()+(*iter).getLength(),*iter2)*cellMod.getNumberOfNodes(); - else - if(keepAll) - totalNbOfMedConn+=(*iter).getConnLength(); - else - for(std::vector::const_iterator iter2=familiesToKeep.begin();iter2!=familiesToKeep.end();iter2++) - { - PolyCounterForFams res=std::for_each((*iter).getFam(),(*iter).getFam()+(*iter).getLength(),PolyCounterForFams(*iter2,(*iter).getIndex())); - totalNbOfMedConn+=res.getSigma(); - } - } - connIndex=DataArrayInt::New(); - conn=DataArrayInt::New(); - connIndex->alloc(totalNbOfCells+1,1); - int *connIdxPtr=connIndex->getPointer(); - int connFillId=0; - conn->alloc(totalNbOfMedConn+totalNbOfCells,1); - int *connPtr=conn->getPointer(); - for(iter=medConnFrmt.begin();iter!=medConnFrmt.end();iter++) - { - INTERP_KERNEL::NormalizedCellType type=(*iter).getType(); - const int *sourceConn=(*iter).getArray(); - const int *sourceIndex=(*iter).getIndex(); - const INTERP_KERNEL::CellModel& cellMod=INTERP_KERNEL::CellModel::getCellModel(type); - int nbOfCellsInCurType; - int nbOfNodesIn1Cell=cellMod.getNumberOfNodes(); - nbOfCellsInCurType=(*iter).getLength(); - bool isDyn=cellMod.isDynamic(); - int *tmpConnPtr; - for(int i=0;i(),1)); - else - tmpConnPtr=std::transform(sourceConn,sourceConn+sourceIndex[i+1]-sourceIndex[i],connPtr,std::bind2nd(std::minus(),1)); - connIdxPtr++; - nbOfNodesIn1Cell=tmpConnPtr-connPtr; - connFillId+=nbOfNodesIn1Cell+1; - connPtr=tmpConnPtr; - } - else if(std::find(familiesToKeep.begin(),familiesToKeep.end(),(*iter).getFam()[i])!=familiesToKeep.end()) - { - *connIdxPtr=connFillId; - *connPtr++=type; - if(!isDyn) - tmpConnPtr=std::transform(sourceConn,sourceConn+nbOfNodesIn1Cell,connPtr,std::bind2nd(std::minus(),1)); - else - tmpConnPtr=std::transform(sourceConn,sourceConn+sourceIndex[i+1]-sourceIndex[i],connPtr,std::bind2nd(std::minus(),1)); - connIdxPtr++; - nbOfNodesIn1Cell=tmpConnPtr-connPtr; - connFillId+=nbOfNodesIn1Cell+1; - connPtr=tmpConnPtr; - } - sourceConn+=nbOfNodesIn1Cell; - } - *connIdxPtr=connFillId; - } -} - -namespace MEDLoaderNS -{ - template - void releaseMEDFileCoreFrmt(typename std::list& medConnFrmt) - { - for(typename std::list::iterator iter=medConnFrmt.begin();iter!=medConnFrmt.end();iter++) - (*iter).releaseArray(); - medConnFrmt.clear(); - } -} - -/*! - * This method builds a sub set of connectivity for a given type 'type'. - * @param conn input containing connectivity with MEDCoupling format. - * @param connIndex input containing connectivity index in MEDCoupling format. - * @param type input specifying which cell types will be extracted in conn4MEDFile. - * @param conn4MEDFile output containing the connectivity directly understandable by MEDFile; conn4MEDFile has to be empty before this method called. - * @param connIndex4MEDFile output containing index connectivity understandable by MEDFile; only used by polygons and polyhedrons (it is face nodal connec). - * @param connIndexRk24MEDFile output containing index of rank 2 understandable by MEDFile; only used by polyhedrons. - * @return nb of elements extracted. - */ -int MEDLoaderNS::buildMEDSubConnectivityOfOneTypeStaticTypes(DataArrayInt *conn, DataArrayInt *connIndex, INTERP_KERNEL::NormalizedCellType type, std::vector& conn4MEDFile) -{ - int ret=0; - int nbOfElem=connIndex->getNbOfElems()-1; - const int *connPtr=conn->getPointer(); - const int *connIdxPtr=connIndex->getPointer(); - for(int i=0;i(),1)); - return ret; -} - -int MEDLoaderNS::buildMEDSubConnectivityOfOneTypesPolyg(DataArrayInt *conn, DataArrayInt *connIndex, std::vector& conn4MEDFile, std::vector& connIndex4MEDFile) -{ - int ret=0; - int nbOfElem=connIndex->getNbOfElems()-1; - const int *connPtr=conn->getPointer(); - const int *connIdxPtr=connIndex->getPointer(); - connIndex4MEDFile.push_back(1); - for(int i=0;i(),1)); - return ret; -} - -int MEDLoaderNS::buildMEDSubConnectivityOfOneTypesPolyh(DataArrayInt *conn, DataArrayInt *connIndex, std::vector& conn4MEDFile, std::vector& connIndex4MEDFile, std::vector& connIndexRk24MEDFile) -{ - return 0; -} - -/*! - * This method builds a sub set of connectivity for a given type 'type'. - * @param conn input containing connectivity with MEDCoupling format. - * @param connIndex input containing connectivity index in MEDCoupling format. - * @param type input specifying which cell types will be extracted in conn4MEDFile. - * @param conn4MEDFile output containing the connectivity directly understandable by MEDFile; conn4MEDFile has to be empty before this method called. - * @param connIndex4MEDFile output containing index connectivity understandable by MEDFile; only used by polygons and polyhedrons (it is face nodal connec). - * @param connIndexRk24MEDFile output containing index of rank 2 understandable by MEDFile; only used by polyhedrons. - * @return nb of elements extracted. - */ -int MEDLoaderNS::buildMEDSubConnectivityOfOneType(DataArrayInt *conn, DataArrayInt *connIndex, INTERP_KERNEL::NormalizedCellType type, std::vector& conn4MEDFile, - std::vector& connIndex4MEDFile, std::vector& connIndexRk24MEDFile) -{ - - const INTERP_KERNEL::CellModel& cellMod=INTERP_KERNEL::CellModel::getCellModel(type); - if(!cellMod.isDynamic()) - return buildMEDSubConnectivityOfOneTypeStaticTypes(conn,connIndex,type,conn4MEDFile); - else - { - if(type==INTERP_KERNEL::NORM_POLYGON) - return buildMEDSubConnectivityOfOneTypesPolyg(conn,connIndex,conn4MEDFile,connIndex4MEDFile); - else - return buildMEDSubConnectivityOfOneTypesPolyh(conn,connIndex,conn4MEDFile,connIndex4MEDFile,connIndexRk24MEDFile); - } -} - -/*! - * @param ids is a in vector containing families ids whose cells have to be kept. If empty all cells are kept. - * @param typesToKeep is a in vector that indicates which types to keep after dimension filtering. - * @param meshDimExtract out parameter that gives the mesh dimension. - */ -MEDCouplingUMesh *MEDLoaderNS::readUMeshFromFileLev1(const char *fileName, const char *meshName, int meshDimRelToMax, const std::vector& ids, - const std::vector& typesToKeep, unsigned& meshDimExtract) throw(INTERP_KERNEL::Exception) -{ - //Extraction data from MED file. - med_idt fid=MEDouvrir((char *)fileName,MED_LECTURE); - std::string trueMeshName; - med_int mid=getIdFromMeshName(fid,meshName,trueMeshName); - double *coords; - int nCoords; - int spaceDim; - std::list conn; - readUMeshDataInMedFile(fid,mid,coords,nCoords,spaceDim,conn); - meshDimExtract=MEDLoaderNS::calculateHighestMeshDim(conn); - meshDimExtract=meshDimExtract+meshDimRelToMax; - MEDLoaderNS::keepSpecifiedMeshDim(conn,meshDimExtract); - MEDLoaderNS::keepTypes(conn,typesToKeep); - MEDfermer(fid); - //Put data in returned data structure. - MEDCouplingUMesh *ret=MEDCouplingUMesh::New(); - ret->setName(trueMeshName.c_str()); - ret->setMeshDimension(meshDimExtract); - // - DataArrayDouble *coordsArr=DataArrayDouble::New(); - coordsArr->useArray(coords,true,ParaMEDMEM::CPP_DEALLOC,nCoords,spaceDim); - ret->setCoords(coordsArr); - coordsArr->decrRef(); - // - DataArrayInt *connArr,*connIndexArr; - tradMEDFileCoreFrmt2MEDCouplingUMesh(conn,connArr,connIndexArr,ids); - ret->setConnectivity(connArr,connIndexArr); - //clean-up - if(connArr) - connArr->decrRef(); - if(connIndexArr) - connIndexArr->decrRef(); - releaseMEDFileCoreFrmt(conn); - return ret; -} - -ParaMEDMEM::MEDCouplingFieldDouble *MEDLoaderNS::readFieldDoubleLev1(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order, - ParaMEDMEM::TypeOfField typeOfOutField) -{ - std::list fieldPerCellType; - double time; - readFieldDoubleDataInMedFile(fileName,meshName,fieldName,fieldPerCellType,iteration,order,typeOfOutField,time); - std::vector familiesToKeep; - std::vector typesToKeep; - if(typeOfOutField==ON_CELLS) - for(std::list::const_iterator iter=fieldPerCellType.begin();iter!=fieldPerCellType.end();iter++) - typesToKeep.push_back((*iter).getType()); - unsigned meshDim; - ParaMEDMEM::MEDCouplingUMesh *mesh=readUMeshFromFileLev1(fileName,meshName,meshDimRelToMax,familiesToKeep,typesToKeep,meshDim); - if(typeOfOutField==ON_CELLS) - MEDLoaderNS::keepSpecifiedMeshDim(fieldPerCellType,meshDim); - ParaMEDMEM::MEDCouplingFieldDouble *ret=ParaMEDMEM::MEDCouplingFieldDouble::New(typeOfOutField,ONE_TIME); - ret->setName(fieldName); - ret->setTime(time,iteration,order); - ret->setMesh(mesh); - mesh->decrRef(); - ParaMEDMEM::DataArrayDouble *arr=buildArrayFromRawData(fieldPerCellType); - ret->setArray(arr); - arr->decrRef(); - releaseMEDFileCoreFrmt(fieldPerCellType); - return ret; -} - -MEDCouplingUMesh *MEDLoader::ReadUMeshFromFile(const char *fileName, const char *meshName, int meshDimRelToMax) throw(INTERP_KERNEL::Exception) -{ - std::vector familiesToKeep; - std::vector typesToKeep; - unsigned meshDim; - return MEDLoaderNS::readUMeshFromFileLev1(fileName,meshName,meshDimRelToMax,familiesToKeep,typesToKeep,meshDim); -} - -ParaMEDMEM::MEDCouplingUMesh *MEDLoader::ReadUMeshFromFile(const char *fileName, int meshDimRelToMax) throw(INTERP_KERNEL::Exception) -{ - std::vector familiesToKeep; - std::vector typesToKeep; - unsigned meshDim; - return MEDLoaderNS::readUMeshFromFileLev1(fileName,0,meshDimRelToMax,familiesToKeep,typesToKeep,meshDim); -} - -ParaMEDMEM::MEDCouplingUMesh *MEDLoader::ReadUMeshFromFamilies(const char *fileName, const char *meshName, int meshDimRelToMax, const std::vector& fams) -{ - std::vector familiesToKeep=MEDLoaderNS::getIdsFromFamilies(fileName,meshName,fams); - std::vector typesToKeep; - unsigned meshDim; - return MEDLoaderNS::readUMeshFromFileLev1(fileName,meshName,meshDimRelToMax,familiesToKeep,typesToKeep,meshDim); -} - -ParaMEDMEM::MEDCouplingUMesh *MEDLoader::ReadUMeshFromGroups(const char *fileName, const char *meshName, int meshDimRelToMax, const std::vector& grps) -{ - std::vector familiesToKeep=MEDLoaderNS::getIdsFromGroups(fileName,meshName,grps); - std::vector typesToKeep; - unsigned meshDim; - return MEDLoaderNS::readUMeshFromFileLev1(fileName,meshName,meshDimRelToMax,familiesToKeep,typesToKeep,meshDim); -} - -ParaMEDMEM::MEDCouplingFieldDouble *MEDLoader::ReadFieldDoubleCell(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) -{ - return MEDLoaderNS::readFieldDoubleLev1(fileName,meshName,meshDimRelToMax,fieldName,iteration,order,ON_CELLS); -} - -ParaMEDMEM::MEDCouplingFieldDouble *MEDLoader::ReadFieldDoubleNode(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) -{ - return MEDLoaderNS::readFieldDoubleLev1(fileName,meshName,meshDimRelToMax,fieldName,iteration,order,ON_NODES); -} - -void MEDLoaderNS::writeUMeshDirectly(const char *fileName, ParaMEDMEM::MEDCouplingUMesh *mesh, bool forceFromScratch) -{ - med_idt fid=MEDouvrir((char *)fileName,forceFromScratch?MED_CREATION:MED_LECTURE_ECRITURE); - std::string meshName(mesh->getName()); - if(meshName=="") - { - MEDfermer(fid); - throw INTERP_KERNEL::Exception("MEDCouplingMesh must have a not null name !"); - } - char maa[MED_TAILLE_NOM+1]; - strcpy(maa,meshName.c_str()); - MEDmaaCr(fid,maa,mesh->getSpaceDimension(),MED_NON_STRUCTURE,maa); - std::set allTypes(mesh->getAllTypes()); - DataArrayInt *conn=mesh->getNodalConnectivity(); - DataArrayInt *connIndex=mesh->getNodalConnectivityIndex(); - char familyName[MED_TAILLE_NOM+1]; - std::fill(familyName,familyName+MED_TAILLE_NOM+1,'\0'); - const char DftFamilyName[]="DftFamily"; - std::copy(DftFamilyName,DftFamilyName+sizeof(DftFamilyName),familyName); - for(int i=0;i medConn; - std::vector medConnIndex; - std::vector medConnIndex2; - int nbOfElt=MEDLoaderNS::buildMEDSubConnectivityOfOneType(conn,connIndex,curType,medConn,medConnIndex,medConnIndex2); - if(curMedType!=MED_POLYGONE && curMedType!=MED_POLYEDRE) - MEDconnEcr(fid,maa,mesh->getMeshDimension(),&medConn[0],MED_FULL_INTERLACE,nbOfElt,MED_MAILLE,curMedType,MED_NOD); - else - { - if(curMedType==MED_POLYGONE) - MEDpolygoneConnEcr(fid,maa,&medConnIndex[0],medConnIndex.size(),&medConn[0],MED_MAILLE,MED_NOD); - } - } - } - MEDfamCr(fid,maa,familyName,0,0,0,0,0,0,0); - DataArrayDouble *arr=mesh->getCoords(); - char comp[2*MED_TAILLE_PNOM+1]; - char unit[2*MED_TAILLE_PNOM+1]; - std::fill(comp,comp+2*MED_TAILLE_PNOM,' '); - comp[2*MED_TAILLE_PNOM]='\0'; - char *work=comp; - for(int i=0;igetSpaceDimension();i++,work+=3) - *work='X'+i; - std::fill(unit,unit+2*MED_TAILLE_PNOM+1,'\0'); - MEDcoordEcr(fid,maa,mesh->getSpaceDimension(),arr->getPointer(),MED_FULL_INTERLACE,mesh->getNumberOfNodes(),MED_CART,comp,unit); - MEDfermer(fid); -} - -void MEDLoaderNS::appendFieldDirectly(const char *fileName, ParaMEDMEM::MEDCouplingFieldDouble *f) -{ - med_idt fid=MEDouvrir((char *)fileName,MED_LECTURE_ECRITURE); - int nbComp=f->getNumberOfComponents(); - char *comp=new char[nbComp*MED_TAILLE_PNOM+1]; - std::fill(comp,comp+nbComp*MED_TAILLE_PNOM,' '); - comp[nbComp*MED_TAILLE_PNOM]='\0'; - char *unit=new char[nbComp*MED_TAILLE_PNOM+1]; - std::fill(unit,unit+nbComp*MED_TAILLE_PNOM,' '); - unit[nbComp*MED_TAILLE_PNOM]='\0'; - MEDchampCr(fid,(char *)f->getName(),MED_FLOAT64,comp,unit,nbComp); - med_int numdt,numo; - med_float dt; - ParaMEDMEM::TypeOfTimeDiscretization td=f->getTimeDiscretization(); - if(td==ParaMEDMEM::NO_TIME) - { - numdt=MED_NOPDT; numo=MED_NONOR; dt=0.0; - } - else if(td==ParaMEDMEM::ONE_TIME) - { - int tmp1,tmp2; - double tmp0=f->getTime(tmp1,tmp2); - numdt=(med_int)tmp1; numo=(med_int)tmp2; - dt=(med_float)tmp0; - } - const double *pt=f->getArray()->getConstPointer(); - switch(f->getTypeOfField()) - { - case ParaMEDMEM::ON_CELLS: - { - std::list split; - prepareCellFieldDoubleForWriting(f,split); - for(std::list::const_iterator iter=split.begin();iter!=split.end();iter++) - { - char nommaa[MED_TAILLE_NOM+1]; - std::fill(nommaa,nommaa+MED_TAILLE_NOM,' '); nommaa[MED_TAILLE_NOM]='\0'; - strcpy(nommaa,f->getMesh()->getName()); - MEDchampEcr(fid,(char *)nommaa,(char *)f->getName(),(unsigned char*)pt,MED_FULL_INTERLACE,(*iter).getNbOfTuple(), - (char *)MED_NOGAUSS,MED_ALL,(char *)MED_NOPFL,MED_NO_PFLMOD,MED_MAILLE, - typmai3[(int)(*iter).getType()],numdt,(char *)"",dt,numo); - pt+=(*iter).getNbOfTuple()*nbComp; - } - break; - } - case ParaMEDMEM::ON_NODES: - { - int nbOfTuples=f->getArray()->getNumberOfTuples(); - MEDchampEcr(fid,(char *)f->getMesh()->getName(),(char *)f->getName(),(unsigned char*)pt,MED_FULL_INTERLACE,nbOfTuples,(char *)MED_NOGAUSS, - MED_ALL,(char *)MED_NOPFL,MED_NO_PFLMOD,MED_NOEUD,MED_NONE,numdt,(char *)"",dt,numo); - break; - } - default: - throw INTERP_KERNEL::Exception("Not managed this type of FIELD !"); - } - delete [] comp; - delete [] unit; - MEDfermer(fid); -} - -void MEDLoaderNS::prepareCellFieldDoubleForWriting(const ParaMEDMEM::MEDCouplingFieldDouble *f, std::list& split) -{ - int nbComp=f->getNumberOfComponents(); - const MEDCouplingMesh *mesh=f->getMesh(); - const MEDCouplingUMesh *meshC=dynamic_cast(mesh); - if(!meshC) - throw INTERP_KERNEL::Exception("Not implemented yet for not unstructured mesh !"); - if(!meshC->checkConsecutiveCellTypes()) - throw INTERP_KERNEL::Exception("Unstructuded mesh has not consecutive cell types !"); - const int *connI=meshC->getNodalConnectivityIndex()->getConstPointer(); - const int *conn=meshC->getNodalConnectivity()->getConstPointer(); - int nbOfCells=meshC->getNumberOfCells(); - INTERP_KERNEL::NormalizedCellType curType; - for(const int *pt=connI;pt!=connI+nbOfCells;) - { - curType=(INTERP_KERNEL::NormalizedCellType)conn[*pt]; - const int *pt2=std::find_if(pt+1,connI+nbOfCells,ConnReaderML(conn,(int)curType)); - split.push_back(MEDLoader::MEDFieldDoublePerCellType(curType,0,nbComp,pt2-pt)); - pt=pt2; - } -} - -void MEDLoaderNS::writeFieldAndMeshDirectly(const char *fileName, ParaMEDMEM::MEDCouplingFieldDouble *f, bool forceFromScratch) -{ - std::string meshName(f->getMesh()->getName()); - if(meshName.empty()) - throw INTERP_KERNEL::Exception("Trying to write a mesh (f->getMesh()) with no name ! MED file format needs a not empty mesh name !"); - std::string fieldName(f->getName()); - if(fieldName.empty()) - throw INTERP_KERNEL::Exception("Trying to write a field with no name ! MED file format needs a not empty field name !"); - MEDCouplingUMesh *mesh=dynamic_cast((MEDCouplingMesh *)f->getMesh()); - writeUMeshDirectly(fileName,mesh,forceFromScratch); - appendFieldDirectly(fileName,f); -} - -void MEDLoader::WriteUMesh(const char *fileName, ParaMEDMEM::MEDCouplingUMesh *mesh, bool writeFromScratch) -{ - std::string meshName(mesh->getName()); - if(meshName.empty()) - throw INTERP_KERNEL::Exception("Trying to write a unstructured mesh with no name ! MED file format needs a not empty mesh name !"); - int status=MEDLoaderBase::getStatusOfFile(fileName); - if(status!=MEDLoaderBase::EXIST_RW && status!=MEDLoaderBase::NOT_EXIST) - { - std::ostringstream oss; oss << "File with name \'" << fileName << "\' has not valid permissions !"; - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } - if(writeFromScratch) - { - MEDLoaderNS::writeUMeshDirectly(fileName,mesh,true); - return ; - } - if(status==MEDLoaderBase::NOT_EXIST) - { - MEDLoaderNS::writeUMeshDirectly(fileName,mesh,true); - return; - } - else - { - std::vector meshNames=GetMeshNames(fileName); - std::string fileNameCpp(mesh->getName()); - if(std::find(meshNames.begin(),meshNames.end(),fileNameCpp)==meshNames.end()) - MEDLoaderNS::writeUMeshDirectly(fileName,mesh,false); - else - { - std::ostringstream oss; oss << "File \'" << fileName << "\' already exists and has already a mesh called \""; - oss << fileNameCpp << "\" !"; - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } - } -} - -void MEDLoader::WriteField(const char *fileName, ParaMEDMEM::MEDCouplingFieldDouble *f, bool writeFromScratch) -{ - int status=MEDLoaderBase::getStatusOfFile(fileName); - if(status!=MEDLoaderBase::EXIST_RW && status!=MEDLoaderBase::NOT_EXIST) - { - std::ostringstream oss; oss << "File with name \'" << fileName << "\' has not valid permissions !"; - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } - if(writeFromScratch) - { - MEDLoaderNS::writeFieldAndMeshDirectly(fileName,f,true); - return ; - } - if(status==MEDLoaderBase::NOT_EXIST) - { - MEDLoaderNS::writeFieldAndMeshDirectly(fileName,f,true); - return ; - } - else - { - std::vector meshNames=GetMeshNames(fileName); - std::string fileNameCpp(f->getMesh()->getName()); - if(std::find(meshNames.begin(),meshNames.end(),fileNameCpp)==meshNames.end()) - MEDLoaderNS::writeFieldAndMeshDirectly(fileName,f,false); - else - { - std::ostringstream oss; oss << "File \'" << fileName << "\' already exists and has already a mesh called \""; - oss << fileNameCpp << "\" !"; - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } - } -} - -void MEDLoader::WriteFieldUsingAlreadyWrittenMesh(const char *fileName, ParaMEDMEM::MEDCouplingFieldDouble *f) -{ - f->checkCoherency(); - int status=MEDLoaderBase::getStatusOfFile(fileName); - if(status!=MEDLoaderBase::EXIST_RW) - { - std::ostringstream oss; oss << "File with name \'" << fileName << "\' has not valid permissions or not exists !"; - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } - MEDLoaderNS::appendFieldDirectly(fileName,f); -} diff --git a/src/MEDLoader/MEDLoader.hxx b/src/MEDLoader/MEDLoader.hxx deleted file mode 100644 index cb2f74381..000000000 --- a/src/MEDLoader/MEDLoader.hxx +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __MEDLOADER_HXX__ -#define __MEDLOADER_HXX__ - -#include "InterpKernelException.hxx" -#include "NormalizedUnstructuredMesh.hxx" - -#include -#include - -namespace ParaMEDMEM -{ - class DataArrayInt; - class MEDCouplingUMesh; - class MEDCouplingFieldDouble; -} - -class MEDLoader -{ -public: - class MEDConnOfOneElemType - { - public: - MEDConnOfOneElemType(INTERP_KERNEL::NormalizedCellType type, int *conn, int *index, int *fam, int lgth, int connLgth); - INTERP_KERNEL::NormalizedCellType getType() const { return _type; } - int getLength() const { return _lgth; } - int getConnLength() const { return _conn_lgth; } - int *getArray() const { return _conn; } - int *getIndex() const { return _index; } - int *getFam() const { return _fam; } - void setGlobal(int *global); - void releaseArray(); - private: - int _lgth; - int *_fam; - int *_conn; - int *_index; - int *_global; - int _conn_lgth; - INTERP_KERNEL::NormalizedCellType _type; - }; - - class MEDFieldDoublePerCellType - { - public: - MEDFieldDoublePerCellType(INTERP_KERNEL::NormalizedCellType type, double *values, int ncomp, int ntuple); - INTERP_KERNEL::NormalizedCellType getType() const { return _type; } - int getNbComp() const { return _ncomp; } - int getNbOfTuple() const { return _ntuple; } - int getNbOfValues() const { return _ncomp*_ntuple; } - double *getArray() const { return _values; } - void releaseArray(); - private: - int _ntuple; - int _ncomp; - double *_values; - INTERP_KERNEL::NormalizedCellType _type; - }; - // - static std::vector GetMeshNames(const char *fileName); - static std::vector GetMeshGroupsNames(const char *fileName, const char *meshName); - static std::vector GetMeshFamilyNames(const char *fileName, const char *meshName); - static std::vector GetCellFieldNamesOnMesh(const char *fileName, const char *meshName); - static std::vector GetNodeFieldNamesOnMesh(const char *fileName, const char *meshName); - static std::vector< std::pair > GetCellFieldIterations(const char *fileName, const char *fieldName); - static std::vector< std::pair > GetNodeFieldIterations(const char *fileName, const char *fieldName); - static ParaMEDMEM::MEDCouplingUMesh *ReadUMeshFromFamilies(const char *fileName, const char *meshName, int meshDimRelToMax, const std::vector& fams); - static ParaMEDMEM::MEDCouplingUMesh *ReadUMeshFromGroups(const char *fileName, const char *meshName, int meshDimRelToMax, const std::vector& grps); - static ParaMEDMEM::MEDCouplingUMesh *ReadUMeshFromFile(const char *fileName, const char *meshName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception); - static ParaMEDMEM::MEDCouplingUMesh *ReadUMeshFromFile(const char *fileName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception); - static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldDoubleCell(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order); - static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldDoubleNode(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order); - static void WriteUMesh(const char *fileName, ParaMEDMEM::MEDCouplingUMesh *mesh, bool writeFromScratch); - static void WriteField(const char *fileName, ParaMEDMEM::MEDCouplingFieldDouble *f, bool writeFromScratch); - static void WriteFieldUsingAlreadyWrittenMesh(const char *fileName, ParaMEDMEM::MEDCouplingFieldDouble *f); -private: - MEDLoader(); -}; - -#endif diff --git a/src/MEDLoader/MEDLoaderBase.cxx b/src/MEDLoader/MEDLoaderBase.cxx deleted file mode 100644 index ec50466fd..000000000 --- a/src/MEDLoader/MEDLoaderBase.cxx +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "MEDLoaderBase.hxx" -#include "InterpKernelException.hxx" - -#include - -int MEDLoaderBase::getStatusOfFile(const char *fileName) -{ - std::ifstream ifs; - ifs.open(fileName); - unsigned int res=0; - if((ifs.rdstate() & std::ifstream::failbit)!=0) - { - res+=1; - ifs.close(); - } - std::ofstream ofs(fileName,std::ios_base::app); - if((ofs.rdstate() & std::ofstream::failbit)!=0) - { - ofs.close(); - res+=2; - } - switch(res) - { - case 0: - return EXIST_RW; - case 1: - { - std::ifstream ifs2; - ifs2.open(fileName); - if((ifs2.rdstate() & std::ifstream::failbit)!=0) - return EXIST_WRONLY; - else - return NOT_EXIST; - } - case 2: - return EXIST_RDONLY; - case 3: - return DIR_LOCKED; - default: - throw INTERP_KERNEL::Exception("Internal error !"); - } -} diff --git a/src/MEDLoader/MEDLoaderBase.hxx b/src/MEDLoader/MEDLoaderBase.hxx deleted file mode 100644 index 06df9422b..000000000 --- a/src/MEDLoader/MEDLoaderBase.hxx +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __MEDLOADERBASE_HXX__ -#define __MEDLOADERBASE_HXX__ - -class MEDLoaderBase -{ -public: - static int getStatusOfFile(const char *fileName); -public: - static const int EXIST_RW=0; - static const int NOT_EXIST=1; - static const int EXIST_RDONLY=2; - static const int EXIST_WRONLY=3; - static const int DIR_LOCKED=4; -}; - -#endif diff --git a/src/MEDLoader/Makefile.am b/src/MEDLoader/Makefile.am deleted file mode 100755 index bc5acc7e0..000000000 --- a/src/MEDLoader/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (C) 2007-2010 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. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -include $(top_srcdir)/adm_local/unix/make_common_starter.am - -if !MED_ENABLE_MICROMED - SUBDIRS = . Swig -endif - -#DIST_SUBDIRS = Swig - -lib_LTLIBRARIES = libmedloader.la - -salomeinclude_HEADERS= \ -MEDLoader.hxx MEDLoaderBase.hxx - -dist_libmedloader_la_SOURCES= \ -MEDLoader.cxx MEDLoaderBase.cxx - -libmedloader_la_CPPFLAGS= $(MPI_INCLUDES) $(MED2_INCLUDES) $(HDF5_INCLUDES) @CXXTMPDPTHFLAGS@ \ - -I$(srcdir)/../INTERP_KERNEL \ - -I$(srcdir)/../INTERP_KERNEL/Geometric2D \ - -I$(srcdir)/../INTERP_KERNEL/Bases \ - -I$(srcdir)/../MEDCoupling - -# change motivated by the bug KERNEL4778. -libmedloader_la_LDFLAGS= ../MEDCoupling/libmedcoupling.la \ -../INTERP_KERNEL/libinterpkernel.la $(MPI_LIBS) $(MED2_LIBS) $(HDF5_LIBS) diff --git a/src/MEDLoader/Swig/Makefile.am b/src/MEDLoader/Swig/Makefile.am deleted file mode 100644 index eda6669e2..000000000 --- a/src/MEDLoader/Swig/Makefile.am +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (C) 2007-2010 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. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# MED MEDMEM_SWIG : binding of C++ implementation and Python -# -include $(top_srcdir)/adm_local/unix/make_common_starter.am - -lib_LTLIBRARIES = _libMEDLoader_Swig.la - -salomeinclude_HEADERS = \ - libMEDLoader_Swig.i - -SWIG_DEF = libMEDLoader_Swig.i - -SWIG_FLAGS = @SWIG_FLAGS@ -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../../MEDCoupling -I$(srcdir)/../../MEDCoupling_Swig \ - -I$(srcdir)/../../INTERP_KERNEL -I$(srcdir)/../../INTERP_KERNEL/Bases - -dist__libMEDLoader_Swig_la_SOURCES = $(SWIG_DEF) -nodist__libMEDLoader_Swig_la_SOURCES = libMEDLoader_Swig_wrap.cxx -libMEDLoader_Swig.py: libMEDLoader_Swig_wrap.cxx - -libMEDLoader_Swig_wrap.cxx: $(SWIG_DEF) - $(SWIG) $(SWIG_FLAGS) -o $@ $< - -_libMEDLoader_Swig_la_CPPFLAGS = $(PYTHON_INCLUDES) \ - $(MED2_INCLUDES) $(HDF5_INCLUDES) @CXXTMPDPTHFLAGS@ \ - -I$(srcdir)/../../INTERP_KERNEL \ - -I$(srcdir)/.. -I$(srcdir)/../../MEDCoupling_Swig -I$(srcdir)/../../INTERP_KERNEL/Bases \ - -I$(srcdir)/../../MEDCoupling - -_libMEDLoader_Swig_la_LDFLAGS = -module $(MED2_LIBS) $(HDF5_LIBS) $(PYTHON_LIBS) \ - ../../MEDCoupling/libmedcoupling.la ../../INTERP_KERNEL/libinterpkernel.la \ - ../libmedloader.la - -CLEANFILES = libMEDLoader_Swig_wrap.cxx libMEDLoader_Swig.py - -dist_salomescript_DATA= libMEDLoader_Swig.py - diff --git a/src/MEDLoader/Swig/libMEDLoader_Swig.i b/src/MEDLoader/Swig/libMEDLoader_Swig.i deleted file mode 100644 index 5a5b6087a..000000000 --- a/src/MEDLoader/Swig/libMEDLoader_Swig.i +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -%module libMEDLoader_Swig - -%include std_vector.i -%include std_string.i - -%include "MEDCouplingTypemaps.i" -%include "libMEDCoupling_Swig.i" - -%{ -#include "MEDLoader.hxx" -%} - -#if SWIG_VERSION >= 0x010329 -%template() std::vector; -#endif - -%newobject MEDLoader::ReadUMeshFromFile; -%newobject MEDLoader::ReadFieldDoubleCell; - -class MEDLoader -{ -public: - static std::vector GetMeshNames(const char *fileName); - static std::vector GetMeshGroupsNames(const char *fileName, const char *meshName); - static std::vector GetMeshFamilyNames(const char *fileName, const char *meshName); - static std::vector GetCellFieldNamesOnMesh(const char *fileName, const char *meshName); - static std::vector GetNodeFieldNamesOnMesh(const char *fileName, const char *meshName); - %extend - { - static PyObject *GetCellFieldIterations(const char *fileName, const char *fieldName) - { - std::vector< std::pair > res=MEDLoader::GetCellFieldIterations(fileName,fieldName); - PyObject *ret=PyList_New(res.size()); - int rk=0; - for(std::vector< std::pair >::const_iterator iter=res.begin();iter!=res.end();iter++,rk++) - { - PyObject *elt=PyTuple_New(2); - PyTuple_SetItem(elt,0,SWIG_From_int((*iter).first)); - PyTuple_SetItem(elt,1,SWIG_From_int((*iter).second)); - PyList_SetItem(ret,rk,elt); - } - return ret; - } - } - //std::vector< std::pair > GetNodeFieldIterations(const char *fileName, const char *fieldName); - static ParaMEDMEM::MEDCouplingUMesh *ReadUMeshFromFile(const char *fileName, const char *meshName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception); - static ParaMEDMEM::MEDCouplingUMesh *ReadUMeshFromFile(const char *fileName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception); - static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldDoubleCell(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order); - static void WriteUMesh(const char *fileName, ParaMEDMEM::MEDCouplingUMesh *mesh, bool writeFromScratch); - static void WriteField(const char *fileName, ParaMEDMEM::MEDCouplingFieldDouble *f, bool writeFromScratch); - static void WriteFieldUsingAlreadyWrittenMesh(const char *fileName, ParaMEDMEM::MEDCouplingFieldDouble *f); -}; diff --git a/src/ParaMEDLoader/ParaMEDLoader.cxx b/src/ParaMEDLoader/ParaMEDLoader.cxx deleted file mode 100644 index 6aa090c71..000000000 --- a/src/ParaMEDLoader/ParaMEDLoader.cxx +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "ParaMEDLoader.hxx" -#include "MEDLoader.hxx" -#include "ParaMESH.hxx" -#include "BlockTopology.hxx" -#include "MEDCouplingUMesh.hxx" - -#include - -using namespace ParaMEDMEM; - -ParaMEDLoader::ParaMEDLoader() -{ -} - -void ParaMEDLoader::WriteParaMesh(const char *fileName, ParaMEDMEM::ParaMESH *mesh) -{ - if(!mesh->getBlockTopology()->getProcGroup()->containsMyRank()) - return ; - int myRank=mesh->getBlockTopology()->getProcGroup()->myRank(); - int nbDomains=mesh->getBlockTopology()->getProcGroup()->size(); - std::vector fileNames(nbDomains); - for(int i=0;igetCellMesh()->getName()); - MEDLoader::WriteUMesh(fileNames[myRank].c_str(),dynamic_cast(mesh->getCellMesh()),true); -} - -/*! - * This method builds the master file 'fileName' of a parallel MED file defined in 'fileNames'. - */ -void ParaMEDLoader::WriteMasterFile(const char *fileName, const std::vector& fileNames, const char *meshName) -{ - int nbOfDom=fileNames.size(); - std::ofstream fs(fileName); - fs << "#MED Fichier V 2.3" << " " << std::endl; - fs << "#"<<" " << std::endl; - fs << nbOfDom <<" " << std::endl; - for(int i=0;i -#include - -namespace ParaMEDMEM -{ - class ParaMESH; - class ParaFIELD; -} - -class ParaMEDLoader -{ -public: - static void WriteParaMesh(const char *fileName, ParaMEDMEM::ParaMESH *mesh); - static void WriteMasterFile(const char *fileName, const std::vector& fileNames, const char *meshName); -private: - ParaMEDLoader(); -}; - -#endif diff --git a/src/ParaMEDMEM/ICoCoField.cxx b/src/ParaMEDMEM/ICoCoField.cxx deleted file mode 100644 index 973376921..000000000 --- a/src/ParaMEDMEM/ICoCoField.cxx +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -////////////////////////////////////////////////////////////////////////////// -// File: ICoCoField.cpp -// Directory: $TRIO_U_ROOT/Kernel/ICoCo -// Version: /main/1 -////////////////////////////////////////////////////////////////////////////// - -#include -#include -#include - -using namespace ICoCo; -using std::string; - -Field::Field() { - _name=new string; -} - -Field::~Field() { - delete _name; -} - -void Field::setName(const string& name) { - *_name=name; -} - -const string& Field::getName() const { - return *_name; -} - -const char* Field::getCharName() const { - return _name->c_str(); -} diff --git a/src/ParaMEDMEM/ICoCoTrioField.cxx b/src/ParaMEDMEM/ICoCoTrioField.cxx deleted file mode 100644 index 1e5a14d22..000000000 --- a/src/ParaMEDMEM/ICoCoTrioField.cxx +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -////////////////////////////////////////////////////////////////////////////// -// File: ICoCoTrioField.cpp -// Directory: $TRIO_U_ROOT/Kernel/Framework -// Version: -////////////////////////////////////////////////////////////////////////////// - -#include -#include -#include -#include - -using namespace ICoCo; -using namespace std; - -TrioField::TrioField() : - _type(0), - _connectivity(0), - _coords(0), - _field(0), - _has_field_ownership(false) { } - -TrioField::~TrioField() { - clear(); -} - -// After the call to clear(), all pointers are null and field ownership is false. -// Arrays are deleted if necessary -void TrioField::clear() { - if (_connectivity) - delete[] _connectivity; - if (_coords) - delete[] _coords; - if (_field && _has_field_ownership) - delete[] _field; - _connectivity=0; - _coords=0; - _field=0; - _has_field_ownership=false; -} - -int TrioField::nb_values() const -{ - if (_type==0) - return _nb_elems; - else - if (_type==1) - return _nbnodes; - exit(-1); - return -1; - -} -void TrioField::save(ostream& os) const{ - os <> name; - setName(name); - in>>_type; - in>>_mesh_dim; - in>> _space_dim; - in>> _nbnodes; - in>> _nodes_per_elem; - in>> _nb_elems; - - in>> _itnumber; - if (_connectivity) - delete [] _connectivity; - _connectivity=new int[_nodes_per_elem*_nb_elems]; - for (int i=0;i<_nb_elems;i++) - { - for (int j=0;j<_nodes_per_elem;j++) - in>>_connectivity[i*_nodes_per_elem+j]; - - } - if (_coords) - delete [] _coords; - _coords=new double[_nbnodes*_space_dim]; - for (int i=0;i<_nbnodes;i++) - { - for (int j=0;j<_space_dim;j++) - in>> _coords[i*_space_dim+j] ; - - } - - in>> _time1; - in>>_time2; - in>> _nb_field_components; - int test; - in>> test; - if (test) - { - if (_field) - delete [] _field; - _field=new double[_nb_field_components*nb_values()]; - for (int i=0;i> _field[i*_nb_field_components+j]; - - } - } - else - { - _field=0; - } - in>> _has_field_ownership; -} - void TrioField::print() { - - } - -// After the call to set_standalone(), field ownership is true and field is allocated -// to the size _nb_field_components*_nb_elems. -// The values of the field have been copied if necessary. -void TrioField::set_standalone() { - if (!_field) { - _field=new double[_nb_field_components*_nb_elems]; - _has_field_ownership=true; - - } - else if (!_has_field_ownership) { - double *tmp_field=new double[_nb_field_components*_nb_elems]; - memcpy(tmp_field,_field,_nb_field_components*_nb_elems*sizeof(double)); - _field=tmp_field; - _has_field_ownership=true; - } -} - -// Used to simulate a 0D geometry (Cathare/Trio for example). -void TrioField::dummy_geom() { - _mesh_dim=2; - _space_dim=2; - _nbnodes=3; - _nodes_per_elem=3; - _nb_elems=1; - _itnumber=0; - if (_connectivity) - delete[] _connectivity; - _connectivity=new int[3]; - _connectivity[0]=1; - _connectivity[1]=2; - _connectivity[2]=3; - if (_coords) - delete[] _coords; - _coords=new double[6]; - _coords[0]=0; - _coords[1]=0; - _coords[2]=1; - _coords[3]=0; - _coords[4]=0; - _coords[5]=1; - if (_field && _has_field_ownership) - delete[] _field; - _has_field_ownership=false; - _field=0; -} - -// Surcharge de l'operateur = pour la classe TrioField -// remplace les valeurs trouvee dans le TrioField donnee en parametre -TrioField& TrioField::operator=(const TrioField& NewField){ - - clear(); - _type=NewField._type; - _mesh_dim=NewField._mesh_dim; - _space_dim=NewField._space_dim; - _nbnodes=NewField._nbnodes; - _nodes_per_elem=NewField._nodes_per_elem; - _nb_elems=NewField._nb_elems; - _itnumber=NewField._itnumber; - // std::string _name; // ?? Hérité de la classe mère - _time1=NewField._time1; - _time2=NewField._time2; - _nb_field_components=NewField._nb_field_components; - - if (!NewField._connectivity) - _connectivity=0; - else { - _connectivity=new int[_nodes_per_elem*_nb_elems]; - memcpy( _connectivity,NewField._connectivity,_nodes_per_elem*_nb_elems*sizeof(int)); - } - - if (!NewField._coords) - _coords=0; - else { - _coords=new double[_nbnodes*_space_dim]; - memcpy( _coords,NewField._coords,_nbnodes*_space_dim*sizeof(double)); - } - - //Copie des valeurs du champ - _has_field_ownership=NewField._has_field_ownership; - if (_has_field_ownership) { - _field=new double[_nb_elems*_nb_field_components]; - memcpy(_field,NewField._field,_nb_elems*_nb_field_components*sizeof(double)); - } - else - _field=NewField._field; - - return(*this); - -} - diff --git a/src/ParaMEDMEM/InterpKernelDEC.cxx b/src/ParaMEDMEM/IntersectionDEC.cxx similarity index 78% rename from src/ParaMEDMEM/InterpKernelDEC.cxx rename to src/ParaMEDMEM/IntersectionDEC.cxx index 1eb5a243e..fc209b47e 100644 --- a/src/ParaMEDMEM/InterpKernelDEC.cxx +++ b/src/ParaMEDMEM/IntersectionDEC.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include "CommInterface.hxx" #include "Topology.hxx" @@ -27,18 +26,20 @@ #include "ParaMESH.hxx" #include "DEC.hxx" #include "InterpolationMatrix.hxx" -#include "InterpKernelDEC.hxx" +#include "IntersectionDEC.hxx" #include "ElementLocator.hxx" + + namespace ParaMEDMEM { /*! - \defgroup interpkerneldec InterpKernelDEC + \defgroup intersectiondec IntersectionDEC \section overview Overview - The InterpKernelDEC enables the \ref conservativeremapping of fields between two parallel codes. This remapping is based on the computation of intersection volumes between elements from code A and elements from code B. The computation is possible for 3D meshes, 2D meshes, and 3D-surface meshes. Dimensions must be similar for code A and code B (for instance, though it could be desirable, it is not yet possible to couple 3D surfaces with 2D surfaces). + The IntersectionDEC enables the \ref conservativeremapping of fields between two parallel codes. This remapping is based on the computation of intersection volumes between elements from code A and elements from code B. The computation is possible for 3D meshes, 2D meshes, and 3D-surface meshes. Dimensions must be similar for code A and code B (for instance, though it could be desirable, it is not yet possible to couple 3D surfaces with 2D surfaces). In the present version, only fields lying on elements are considered. @@ -46,15 +47,15 @@ namespace ParaMEDMEM \image latex NonCoincident_small.eps "Example showing the transfer from a field based on a quadrangular mesh to a triangular mesh. In a P0-P0 interpolation, to obtain the value on a triangle, the values on quadrangles are weighted by their intersection area and summed." - A typical use of InterpKernelDEC encompasses two distinct phases : - - A setup phase during which the intersection volumes are computed and the communication structures are setup. This corresponds to calling the InterpKernelDEC::synchronize() method. + A typical use of IntersectionDEC encompasses two distinct phases : + - A setup phase during which the intersection volumes are computed and the communication structures are setup. This corresponds to calling the IntersectionDEC::synchronize() method. - A use phase during which the remappings are actually performed. This corresponds to the calls to sendData() and recvData() which actually trigger the data exchange. The data exchange are synchronous in the current version of the library so that recvData() and sendData() calls must be synchronized on code A and code B processor groups. - The following code excerpt illutrates a typical use of the InterpKernelDEC class. + The following code excerpt illutrates a typical use of the IntersectionDEC class. \code ... - InterpKernelDEC dec(groupA, groupB); + IntersectionDEC dec(groupA, groupB); dec.attachLocalField(field); dec.synchronize(); if (groupA.containsMyRank()) @@ -81,15 +82,15 @@ namespace ParaMEDMEM - \section interpkerneldec_options Options - On top of \ref dec_options, options supported by %InterpKernelDEC objects are + \section intersectiondec_options Options + On top of \ref dec_options, options supported by %IntersectionDEC objects are related to the underlying Intersector class. All the options available in the intersector objects are - available for the %InterpKernelDEC object. The various options available for * intersectors can be reviewed in \ref InterpKerIntersectors. + available for the %IntersectionDEC object. The various options available for * intersectors can be reviewed in \ref InterpKerIntersectors. For instance : \verbatim - InterpKernelDEC dec(source_group, target_group); + IntersectionDEC dec(source_group, target_group); dec.attachLocalField(field); dec.setOptions("DoRotate",false); dec.setOptions("Precision",1e-12); @@ -100,16 +101,16 @@ namespace ParaMEDMEM */ /*! - \addtogroup interpkerneldec + \addtogroup intersectiondec @{ */ - InterpKernelDEC::InterpKernelDEC() + IntersectionDEC::IntersectionDEC() { } /*! - This constructor creates an InterpKernelDEC which has \a source_group as a working side + This constructor creates an IntersectionDEC which has \a source_group as a working side and \a target_group as an idle side. All the processors will actually participate, but intersection computations will be performed on the working side during the \a synchronize() phase. The constructor must be called synchronously on all processors of both processor groups. @@ -117,20 +118,13 @@ namespace ParaMEDMEM \param target_group lazy side ProcessorGroup */ - InterpKernelDEC::InterpKernelDEC(ProcessorGroup& source_group, ProcessorGroup& target_group): + IntersectionDEC::IntersectionDEC(ProcessorGroup& source_group, ProcessorGroup& target_group): DEC(source_group, target_group),_interpolation_matrix(0) { } - InterpKernelDEC::InterpKernelDEC(const int *src_ids_bg, const int *src_ids_end, - const int *trg_ids_bg, const int *trg_ids_end, - const MPI_Comm& world_comm):DEC(src_ids_bg,src_ids_end,trg_ids_bg,trg_ids_end,world_comm), - _interpolation_matrix(0) - { - } - - InterpKernelDEC::~InterpKernelDEC() + IntersectionDEC::~IntersectionDEC() { if (_interpolation_matrix !=0) delete _interpolation_matrix; @@ -148,55 +142,54 @@ namespace ParaMEDMEM the working side during a \a sendData() call. */ - void InterpKernelDEC::synchronize() + void IntersectionDEC::synchronize() { - if(!isInUnion()) - return ; - delete _interpolation_matrix; - _interpolation_matrix = new InterpolationMatrix (_local_field, *_source_group,*_target_group,*this,*this); + ParaMEDMEM::ParaMESH* para_mesh = _local_field->getSupport(); + //cout <<"size of Interpolation Matrix"<containsMyRank()) { //locate the distant meshes - ElementLocator locator(*_local_field, *_target_group, *_source_group); + ElementLocator locator(*para_mesh, *_target_group); - //transfering option from InterpKernelDEC to ElementLocator + //transfering option from IntersectionDEC to ElementLocator locator.setBoundingBoxAdjustment(getBoundingBoxAdjustment()); - MEDCouplingPointSet* distant_mesh=0; + MEDCouplingUMesh* distant_mesh=0; int* distant_ids=0; - std::string distantMeth; for (int i=0; i<_target_group->size(); i++) { // int idistant_proc = (i+_source_group->myRank())%_target_group->size(); - int idistant_proc=i; + int idistant_proc=i; //gathers pieces of the target meshes that can intersect the local mesh locator.exchangeMesh(idistant_proc,distant_mesh,distant_ids); + std::string distantMeth; + locator.exchangeMethod(_method,idistant_proc,distantMeth); if (distant_mesh !=0) { - locator.exchangeMethod(_method,idistant_proc,distantMeth); //adds the contribution of the distant mesh on the local one int idistant_proc_in_union=_union_group->translateRank(_target_group,idistant_proc); std::cout <<"add contribution from proc "<myRank()<addContribution(*distant_mesh,idistant_proc_in_union,distant_ids,_method,distantMeth); + distant_mesh->decrRef(); - delete [] distant_ids; + delete[] distant_ids; distant_mesh=0; distant_ids=0; } - } - _interpolation_matrix->finishContributionW(locator); + } } if (_target_group->containsMyRank()) { - ElementLocator locator(*_local_field, *_source_group, *_target_group); - //transfering option from InterpKernelDEC to ElementLocator + ElementLocator locator(*para_mesh, *_source_group); + //transfering option from IntersectionDEC to ElementLocator locator.setBoundingBoxAdjustment(getBoundingBoxAdjustment()); - MEDCouplingPointSet* distant_mesh=0; + MEDCouplingUMesh* distant_mesh=0; int* distant_ids=0; for (int i=0; i<_source_group->size(); i++) { @@ -205,17 +198,16 @@ namespace ParaMEDMEM //gathers pieces of the target meshes that can intersect the local mesh locator.exchangeMesh(idistant_proc,distant_mesh,distant_ids); std::cout << " Data sent from "<<_union_group->myRank()<<" to source proc "<< idistant_proc<decrRef(); - delete [] distant_ids; + delete[] distant_ids; distant_mesh=0; distant_ids=0; } - } - _interpolation_matrix->finishContributionL(locator); + } } _interpolation_matrix->prepare(); } @@ -224,7 +216,7 @@ namespace ParaMEDMEM /*! Receives the data whether the processor is on the working side or on the lazy side. It must match a \a sendData() call on the other side. */ - void InterpKernelDEC::recvData() + void IntersectionDEC::recvData() { if (_source_group->containsMyRank()) _interpolation_matrix->transposeMultiply(*_local_field->getField()); @@ -232,7 +224,7 @@ namespace ParaMEDMEM { _interpolation_matrix->multiply(*_local_field->getField()); if (getForcedRenormalization()) - renormalizeTargetField(getMeasureAbsStatus()); + renormalizeTargetField(); } } @@ -242,7 +234,7 @@ namespace ParaMEDMEM will be time-interpolated from the field values received. \param time time at which the value is desired */ - void InterpKernelDEC::recvData( double time ) + void IntersectionDEC::recvData( double time ) { _interpolation_matrix->getAccessDEC()->setTime(time); recvData() ; @@ -252,14 +244,14 @@ namespace ParaMEDMEM Sends the data whether the processor is on the working side or on the lazy side. It must match a recvData() call on the other side. */ - void InterpKernelDEC::sendData() + void IntersectionDEC::sendData() { if (_source_group->containsMyRank()) { _interpolation_matrix->multiply(*_local_field->getField()); if (getForcedRenormalization()) - renormalizeTargetField(getMeasureAbsStatus()); + renormalizeTargetField(); } else if (_target_group->containsMyRank()) @@ -271,7 +263,7 @@ namespace ParaMEDMEM \param time time at which the value is available \param deltatime time interval between the value presently sent and the next one. */ - void InterpKernelDEC::sendData( double time , double deltatime ) + void IntersectionDEC::sendData( double time , double deltatime ) { _interpolation_matrix->getAccessDEC()->setTime(time,deltatime); sendData() ; diff --git a/src/ParaMEDMEM/InterpKernelDEC.hxx b/src/ParaMEDMEM/IntersectionDEC.hxx similarity index 75% rename from src/ParaMEDMEM/InterpKernelDEC.hxx rename to src/ParaMEDMEM/IntersectionDEC.hxx index 908f21700..6659155c8 100644 --- a/src/ParaMEDMEM/InterpKernelDEC.hxx +++ b/src/ParaMEDMEM/IntersectionDEC.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,9 +16,8 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef __INTERPKERNELDEC_HXX__ -#define __INTERPKERNELDEC_HXX__ +#ifndef __INTERSECTIONDEC_HXX__ +#define __INTERSECTIONDEC_HXX__ #include "DEC.hxx" #include "MxN_Mapping.hxx" @@ -28,15 +27,12 @@ namespace ParaMEDMEM { class InterpolationMatrix; - class InterpKernelDEC : public DEC, public INTERP_KERNEL::InterpolationOptions + class IntersectionDEC : public DEC, public INTERP_KERNEL::InterpolationOptions { public: - InterpKernelDEC(); - InterpKernelDEC(ProcessorGroup& source_group, ProcessorGroup& target_group); - InterpKernelDEC(const int *src_ids_bg, const int *src_ids_end, - const int *trg_ids_bg, const int *trg_ids_end, - const MPI_Comm& world_comm=MPI_COMM_WORLD); - virtual ~InterpKernelDEC(); + IntersectionDEC(); + IntersectionDEC(ProcessorGroup& source_group, ProcessorGroup& target_group); + virtual ~IntersectionDEC(); void synchronize(); void recvData(); void recvData(double time); diff --git a/src/ParaMEDMEM/MEDLoader/MEDLoader.cxx b/src/ParaMEDMEM/MEDLoader/MEDLoader.cxx new file mode 100644 index 000000000..2cabfb740 --- /dev/null +++ b/src/ParaMEDMEM/MEDLoader/MEDLoader.cxx @@ -0,0 +1,418 @@ +// Copyright (C) 2007-2008 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. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#include "MEDLoader.hxx" +#include "CellModel.hxx" +#include "ParaMESH.hxx" +#include "BlockTopology.hxx" +#include "MEDCouplingUMesh.hxx" + +extern "C" +{ +#include "med.h" +} + +#include +#include +#include +#include + +med_geometrie_element typmai[MED_NBR_GEOMETRIE_MAILLE] = { MED_POINT1, + MED_SEG2, + MED_SEG3, + MED_TRIA3, + MED_TRIA6, + MED_QUAD4, + MED_QUAD8, + MED_TETRA4, + MED_TETRA10, + MED_HEXA8, + MED_HEXA20, + MED_PENTA6, + MED_PENTA15, + MED_PYRA5, + MED_PYRA13 }; + +INTERP_KERNEL::NormalizedCellType typmai2[MED_NBR_GEOMETRIE_MAILLE] = { INTERP_KERNEL::NORM_ERROR, + INTERP_KERNEL::NORM_SEG2, + INTERP_KERNEL::NORM_SEG3, + INTERP_KERNEL::NORM_TRI3, + INTERP_KERNEL::NORM_TRI6, + INTERP_KERNEL::NORM_QUAD4, + INTERP_KERNEL::NORM_QUAD8, + INTERP_KERNEL::NORM_TETRA4, + INTERP_KERNEL::NORM_TETRA10, + INTERP_KERNEL::NORM_HEXA8, + INTERP_KERNEL::NORM_HEXA20, + INTERP_KERNEL::NORM_PENTA6, + INTERP_KERNEL::NORM_PENTA15, + INTERP_KERNEL::NORM_PYRA5, + INTERP_KERNEL::NORM_PYRA13 }; + +using namespace ParaMEDMEM; + +const char WHITE_SPACES[]=" \n"; + +MEDLoader::MEDConnOfOneElemType::MEDConnOfOneElemType(INTERP_KERNEL::NormalizedCellType type, int *conn, int lgth):_lgth(lgth), + _conn(conn),_global(0), + _type(type) +{ +} + +void MEDLoader::MEDConnOfOneElemType::setGlobal(int *global) +{ + if(_global!=global) + { + if(_global) + delete [] _global; + _global=global; + } +} + +void MEDLoader::MEDConnOfOneElemType::releaseArray() +{ + delete [] _conn; + delete [] _global; +} + +std::string buildStringFromFortran(const char *expr, int lgth) +{ + std::string ret(expr,lgth); + std::string whiteSpaces(WHITE_SPACES); + std::size_t lgthReal=strlen(ret.c_str()); + std::string ret2=ret.substr(0,lgthReal); + std::size_t found=ret2.find_last_not_of(whiteSpaces); + if (found!=std::string::npos) + ret2.erase(found+1); + else + ret2.clear();//ret is all whitespace + return ret2; +} + +namespace MEDLoader +{ + med_int getIdFromMeshName(med_idt fid, const char *meshName) throw(INTERP_KERNEL::Exception) + { + if(meshName==0) + return 1; + med_int n=MEDnMaa(fid); + if(n==0) + throw INTERP_KERNEL::Exception("No mesh in file."); + med_maillage type_maillage; + char maillage_description[MED_TAILLE_DESC+1]; + med_int dim; + char nommaa[MED_TAILLE_NOM+1]; + std::ostringstream os; + for(med_int i=1;i<=n;i++) + { + MEDmaaInfo(fid,i,nommaa,&dim,&type_maillage,maillage_description); + std::string cur=buildStringFromFortran(nommaa,sizeof(nommaa)); + if(cur==meshName) + return i; + os << "\'" << cur.c_str() << "\' "; + } + std::ostringstream os2; + os2 << "MeshName '" << meshName << "' not in file : meshes available : " << os.str(); + throw INTERP_KERNEL::Exception(os2.str().c_str()); + } + + void readUMeshDataInMedFile(med_idt fid, med_int meshId, double *&coords, int& nCoords, int& spaceDim, std::list& conn) + { + char nommaa[MED_TAILLE_NOM+1]; + char maillage_description[MED_TAILLE_DESC+1]; + char comp[3*MED_TAILLE_PNOM+1]; + char unit[3*MED_TAILLE_PNOM+1]; + med_maillage type_maillage; + med_int Mdim; + MEDmaaInfo(fid,meshId,nommaa,&Mdim,&type_maillage,maillage_description); + spaceDim=(int)Mdim; + nCoords=MEDnEntMaa(fid,nommaa,MED_COOR,MED_NOEUD,(med_geometrie_element)0,(med_connectivite)0); + coords=new double[nCoords*spaceDim]; + med_repere repere; + MEDcoordLire(fid,nommaa,Mdim,coords,MED_FULL_INTERLACE,MED_ALL,NULL,0,&repere,comp,unit); + med_booleen inoele, inuele; + for(int i=0;icurNbOfElemM) + { + curNbOfElem=curNbOfElemF; + whichEntity=MED_FACE; + } + else + { + curNbOfElem=curNbOfElemM; + whichEntity=MED_MAILLE; + } + if(curNbOfElem>0) + { + int *connTab=new int[(curMedType%100)*curNbOfElem]; + MEDLoader::MEDConnOfOneElemType elem(typmai2[i],connTab,curNbOfElem); + int *tmp=new int[curNbOfElem]; + int *fam=new int[curNbOfElem]; + char *noms=new char[MED_TAILLE_PNOM*curNbOfElem+1]; + MEDelementsLire(fid,nommaa,Mdim,connTab,MED_FULL_INTERLACE,noms,&inoele,tmp,&inuele,fam,curNbOfElem,whichEntity,curMedType,MED_NOD); + delete [] tmp; + delete [] fam; + delete [] noms; + //trying to read global numbering + int *globArr=new int[curNbOfElem]; + if(MEDglobalNumLire(fid,nommaa,globArr,curNbOfElem,whichEntity,curMedType)==0) + elem.setGlobal(globArr); + else + delete [] globArr; + conn.push_back(elem); + } + } + } +} + +unsigned MEDLoader::calculateHighestMeshDim(const std::list& conn) +{ + unsigned ret=0; + for(std::list::const_iterator iter=conn.begin();iter!=conn.end();iter++) + { + unsigned curDim=INTERP_KERNEL::CellModel::getCellModel((*iter).getType()).getDimension(); + if(ret& conn, unsigned meshDim) +{ + for(std::list::iterator iter=conn.begin();iter!=conn.end();) + { + unsigned curDim=INTERP_KERNEL::CellModel::getCellModel((*iter).getType()).getDimension(); + if(curDim!=meshDim) + { + (*iter).releaseArray(); + iter=conn.erase(iter); + } + else + iter++; + } +} + +void MEDLoader::tradMEDFileCoreFrmt2MEDCouplingUMesh(const std::list& medConnFrmt, + DataArrayInt* &conn, + DataArrayInt* &connIndex) +{ + if(medConnFrmt.empty()) + { + conn=0; + connIndex=0; + return ; + } + std::list::const_iterator iter=medConnFrmt.begin(); + int totalNbOfCells=0; + int totalNbOfMedConn=0; + for(;iter!=medConnFrmt.end();iter++) + { + const INTERP_KERNEL::CellModel& cellMod=INTERP_KERNEL::CellModel::getCellModel((*iter).getType()); + totalNbOfCells+=(*iter).getLength(); + if(!cellMod.isDynamic()) + totalNbOfMedConn+=(*iter).getLength()*cellMod.getNumberOfNodes(); + else + throw INTERP_KERNEL::Exception("Polyg/polh not implemented yet !"); + } + connIndex=DataArrayInt::New(); + conn=DataArrayInt::New(); + connIndex->alloc(totalNbOfCells+1,1); + int *connIdxPtr=connIndex->getPointer(); + int connFillId=0; + conn->alloc(totalNbOfMedConn+totalNbOfCells,1); + int *connPtr=conn->getPointer(); + for(iter=medConnFrmt.begin();iter!=medConnFrmt.end();iter++) + { + INTERP_KERNEL::NormalizedCellType type=(*iter).getType(); + int *sourceConn=(*iter).getArray(); + const INTERP_KERNEL::CellModel& cellMod=INTERP_KERNEL::CellModel::getCellModel(type); + int nbOfCellsInCurType; + int nbOfNodesIn1Cell=cellMod.getNumberOfNodes(); + if(!cellMod.isDynamic()) + nbOfCellsInCurType=(*iter).getLength(); + else + throw INTERP_KERNEL::Exception("Polyg/polh not implemented yet !"); + if(!cellMod.isDynamic()) + { + for(int i=0;i(),1)); + connFillId+=nbOfNodesIn1Cell+1; + sourceConn+=nbOfNodesIn1Cell; + } + *connIdxPtr=connFillId; + } + } +} + +void MEDLoader::releaseMEDFileCoreFrmt(std::list& medConnFrmt) +{ + for(std::list::iterator iter=medConnFrmt.begin();iter!=medConnFrmt.end();iter++) + (*iter).releaseArray(); + medConnFrmt.clear(); +} + +/*! + * This method builds a sub set of connectivity for a given type 'type'. + * @param conn input containing connectivity with MEDCoupling format. + * @param connIndex input containing connectivity index in MEDCoupling format. + * @param type input specifying which cell types will be extracted in conn4MEDFile. + * @param conn4MEDFile output containing the connectivity directly understandable by MEDFile; conn4MEDFile has to be empty before this method called. + * @return nb of elements extracted. + */ +int MEDLoader::buildMEDSubConnectivityOfOneType(DataArrayInt *conn, DataArrayInt *connIndex, INTERP_KERNEL::NormalizedCellType type, std::vector& conn4MEDFile) +{ + int ret=0; + int nbOfElem=connIndex->getNbOfElems()-1; + const int *connPtr=conn->getPointer(); + const int *connIdxPtr=connIndex->getPointer(); + for(int i=0;i(),1)); + return ret; +} + +MEDCouplingUMesh *MEDLoader::ReadUMeshFromFile(const char *fileName, const char *meshName, int meshDimRelToMax) throw(INTERP_KERNEL::Exception) +{ + //Extraction data from MED file. + med_idt fid=MEDouvrir((char *)fileName,MED_LECTURE); + med_int mid=getIdFromMeshName(fid,meshName); + unsigned meshDimExtract; + double *coords; + int nCoords; + int spaceDim; + std::list conn; + readUMeshDataInMedFile(fid,mid,coords,nCoords,spaceDim,conn); + meshDimExtract=calculateHighestMeshDim(conn); + meshDimExtract=meshDimExtract+meshDimRelToMax; + keepSpecifiedMeshDim(conn,meshDimExtract); + MEDfermer(fid); + //Put data in returned data structure. + MEDCouplingUMesh *ret=MEDCouplingUMesh::New(); + ret->setName(meshName); + ret->setMeshDimension(meshDimExtract); + // + DataArrayDouble *coordsArr=DataArrayDouble::New(); + coordsArr->useArray(coords,true,ParaMEDMEM::CPP_DEALLOC,nCoords,spaceDim); + ret->setCoords(coordsArr); + coordsArr->decrRef(); + // + DataArrayInt *connArr,*connIndexArr; + tradMEDFileCoreFrmt2MEDCouplingUMesh(conn,connArr,connIndexArr); + ret->setConnectivity(connArr,connIndexArr); + //clean-up + if(connArr) + connArr->decrRef(); + if(connIndexArr) + connIndexArr->decrRef(); + releaseMEDFileCoreFrmt(conn); + return ret; +} + +void MEDLoader::writeUMesh(const char *fileName, ParaMEDMEM::MEDCouplingUMesh *mesh) +{ + med_idt fid=MEDouvrir((char *)fileName,MED_CREATION); + char maa[MED_TAILLE_NOM+1]; + std::fill(maa,maa+MED_TAILLE_NOM+1,'\0'); + const char *meshName=mesh->getName(); + strcpy(maa,meshName); + MEDmaaCr(fid,maa,mesh->getMeshDimension(),MED_NON_STRUCTURE,maa); + std::set allTypes(mesh->getAllTypes()); + DataArrayInt *conn=mesh->getNodalConnectivity(); + DataArrayInt *connIndex=mesh->getNodalConnectivityIndex(); + char familyName[MED_TAILLE_NOM+1]; + std::fill(familyName,familyName+MED_TAILLE_NOM+1,'\0'); + const char DftFamilyName[]="DftFamily"; + std::copy(DftFamilyName,DftFamilyName+sizeof(DftFamilyName),familyName); + for(int i=0;i medConn; + int nbOfElt=buildMEDSubConnectivityOfOneType(conn,connIndex,curType,medConn); + MEDconnEcr(fid,maa,mesh->getMeshDimension(),&medConn[0],MED_FULL_INTERLACE,nbOfElt,MED_MAILLE,curMedType,MED_NOD); + } + } + MEDfamCr(fid,maa,familyName,0,0,0,0,0,0,0); + DataArrayDouble *arr=mesh->getCoords(); + char comp[2*MED_TAILLE_PNOM+1]; + char unit[2*MED_TAILLE_PNOM+1]; + std::fill(comp,comp+2*MED_TAILLE_PNOM,' '); + comp[2*MED_TAILLE_PNOM]='\0'; + char *work=comp; + for(int i=0;igetSpaceDimension();i++,work+=3) + *work='X'+i; + std::fill(unit,unit+2*MED_TAILLE_PNOM+1,'\0'); + MEDcoordEcr(fid,maa,mesh->getSpaceDimension(),arr->getPointer(),MED_FULL_INTERLACE,mesh->getNumberOfNodes(),MED_CART,comp,unit); + MEDfermer(fid); +} + +/*! + * This method builds the master file 'fileName' of a parallel MED file defined in 'fileNames'. + */ +void MEDLoader::writeMasterFile(const char *fileName, const std::vector& fileNames, const char *meshName) +{ + int nbOfDom=fileNames.size(); + std::ofstream fs(fileName); + fs << "#MED Fichier V 2.3" << " " << std::endl; + fs << "#"<<" " << std::endl; + fs << nbOfDom <<" " << std::endl; + for(int i=0;igetBlockTopology()->getProcGroup()->containsMyRank()) + return ; + int myRank=mesh->getBlockTopology()->getProcGroup()->myRank(); + int nbDomains=mesh->getBlockTopology()->getProcGroup()->size(); + std::vector fileNames(nbDomains); + for(int i=0;igetCellMesh()->getName()); + writeUMesh(fileNames[myRank].c_str(),mesh->getCellMesh()); +} + +void MEDLoader::writeParaField(const char *fileName, const char *meshName, ParaMEDMEM::ParaFIELD *f) +{ +} diff --git a/src/ParaMEDMEM/MEDLoader/MEDLoader.hxx b/src/ParaMEDMEM/MEDLoader/MEDLoader.hxx new file mode 100644 index 000000000..b5f7065da --- /dev/null +++ b/src/ParaMEDMEM/MEDLoader/MEDLoader.hxx @@ -0,0 +1,69 @@ +// Copyright (C) 2007-2008 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. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#ifndef __MEDLOADER_HXX__ +#define __MEDLOADER_HXX__ + +#include "InterpKernelException.hxx" +#include "NormalizedUnstructuredMesh.hxx" + +#include +#include + +namespace ParaMEDMEM +{ + class ParaMESH; + class ParaFIELD; + class DataArrayInt; + class MEDCouplingUMesh; +} + +namespace MEDLoader +{ + class MEDConnOfOneElemType + { + public: + MEDConnOfOneElemType(INTERP_KERNEL::NormalizedCellType type, int *conn, int lgth); + INTERP_KERNEL::NormalizedCellType getType() const { return _type; } + int getLength() const { return _lgth; } + int *getArray() const { return _conn; } + void setGlobal(int *global); + void releaseArray(); + private: + int _lgth; + int *_conn; + int *_global; + INTERP_KERNEL::NormalizedCellType _type; + }; + unsigned calculateHighestMeshDim(const std::list& conn); + void keepSpecifiedMeshDim(std::list& conn, unsigned meshDim); + void tradMEDFileCoreFrmt2MEDCouplingUMesh(const std::list& medConnFrmt, + ParaMEDMEM::DataArrayInt* &conn, + ParaMEDMEM::DataArrayInt* &connIndex); + void releaseMEDFileCoreFrmt(std::list& medConnFrmt); + void writeMasterFile(const char *fileName, const std::vector& fileNames, const char *meshName); + int buildMEDSubConnectivityOfOneType(ParaMEDMEM::DataArrayInt *conn, ParaMEDMEM::DataArrayInt *connIndex, + INTERP_KERNEL::NormalizedCellType type, std::vector& conn4MEDFile); + // + ParaMEDMEM::MEDCouplingUMesh *ReadUMeshFromFile(const char *fileName, const char *meshName=0, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception); + void writeUMesh(const char *fileName, ParaMEDMEM::MEDCouplingUMesh *mesh); + void writeParaMesh(const char *fileName, ParaMEDMEM::ParaMESH *mesh); + void writeParaField(const char *fileName, const char *meshName, ParaMEDMEM::ParaFIELD *f); +} + +#endif diff --git a/src/ParaMEDLoader/Makefile.am b/src/ParaMEDMEM/MEDLoader/Makefile.am similarity index 58% rename from src/ParaMEDLoader/Makefile.am rename to src/ParaMEDMEM/MEDLoader/Makefile.am index 624e6148b..372249430 100755 --- a/src/ParaMEDLoader/Makefile.am +++ b/src/ParaMEDMEM/MEDLoader/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2010 CEA/DEN, EDF R&D +# Copyright (C) 2007-2008 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 @@ -16,27 +16,24 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # - include $(top_srcdir)/adm_local/unix/make_common_starter.am -lib_LTLIBRARIES = libparamedloader.la +lib_LTLIBRARIES= libparamedmemmedloader.la salomeinclude_HEADERS= \ -ParaMEDLoader.hxx +MEDLoader.hxx -dist_libparamedloader_la_SOURCES= \ -ParaMEDLoader.cxx +dist_libparamedmemmedloader_la_SOURCES= \ +MEDLoader.cxx #libmedmem_la_LDFLAGS= -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome -libparamedloader_la_CPPFLAGS= $(MPI_INCLUDES) $(MED2_INCLUDES) $(HDF5_INCLUDES) @CXXTMPDPTHFLAGS@ \ - -I$(srcdir)/../INTERP_KERNEL \ - -I$(srcdir)/../INTERP_KERNEL/Geometric2D \ - -I$(srcdir)/../INTERP_KERNEL/Bases \ - -I$(srcdir)/../MEDCoupling \ - -I$(srcdir)/../MEDLoader \ - -I$(srcdir)/../ParaMEDMEM +libparamedmemmedloader_la_CPPFLAGS= $(MPI_INCLUDES) $(MED2_INCLUDES) $(HDF5_INCLUDES) @CXXTMPDPTHFLAGS@ \ + -I$(srcdir)/../../INTERP_KERNEL \ + -I$(srcdir)/../../INTERP_KERNEL/Geometric2D \ + -I$(srcdir)/../../INTERP_KERNEL/Bases \ + -I$(srcdir)/../../MEDCoupling \ + -I$(srcdir)/../ -libparamedloader_la_LDFLAGS= ../ParaMEDMEM/libparamedmem.la \ - ../MEDLoader/libmedloader.la \ - ../MEDCoupling/libmedcoupling.la \ - ../INTERP_KERNEL/libinterpkernel.la $(MPI_LIBS) $(MED2_LIBS) $(HDF5_LIBS) +# change motivated by the bug KERNEL4778. +libparamedmemmedloader_la_LDFLAGS= ../../MEDCoupling/libmedcoupling.la \ +../../INTERP_KERNEL/libinterpkernel.la $(MPI_LIBS) $(MED2_LIBS) $(HDF5_LIBS) diff --git a/src/ParaMEDMEMTest/MPIAccessDECTest.cxx b/src/ParaMEDMEM/Test/MPIAccessDECTest.cxx similarity index 96% rename from src/ParaMEDMEMTest/MPIAccessDECTest.cxx rename to src/ParaMEDMEM/Test/MPIAccessDECTest.cxx index 00ad69dab..f9ae283ac 100644 --- a/src/ParaMEDMEMTest/MPIAccessDECTest.cxx +++ b/src/ParaMEDMEM/Test/MPIAccessDECTest.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include "MPIAccessDECTest.hxx" #include diff --git a/src/ParaMEDMEMTest/MPIAccessDECTest.hxx b/src/ParaMEDMEM/Test/MPIAccessDECTest.hxx similarity index 98% rename from src/ParaMEDMEMTest/MPIAccessDECTest.hxx rename to src/ParaMEDMEM/Test/MPIAccessDECTest.hxx index 5ee346ac3..9f14a40cb 100644 --- a/src/ParaMEDMEMTest/MPIAccessDECTest.hxx +++ b/src/ParaMEDMEM/Test/MPIAccessDECTest.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #ifndef _MPIACCESSDECTEST_HXX_ #define _MPIACCESSDECTEST_HXX_ diff --git a/src/ParaMEDMEMTest/MPIAccessTest.cxx b/src/ParaMEDMEM/Test/MPIAccessTest.cxx similarity index 96% rename from src/ParaMEDMEMTest/MPIAccessTest.cxx rename to src/ParaMEDMEM/Test/MPIAccessTest.cxx index d8413f1fc..e07a55e5f 100644 --- a/src/ParaMEDMEMTest/MPIAccessTest.cxx +++ b/src/ParaMEDMEM/Test/MPIAccessTest.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include "MPIAccessTest.hxx" #include diff --git a/src/ParaMEDMEMTest/MPIAccessTest.hxx b/src/ParaMEDMEM/Test/MPIAccessTest.hxx similarity index 98% rename from src/ParaMEDMEMTest/MPIAccessTest.hxx rename to src/ParaMEDMEM/Test/MPIAccessTest.hxx index ddb899053..308e6d2af 100644 --- a/src/ParaMEDMEMTest/MPIAccessTest.hxx +++ b/src/ParaMEDMEM/Test/MPIAccessTest.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #ifndef _MPIACCESSTEST_HXX_ #define _MPIACCESSTEST_HXX_ diff --git a/src/ParaMEDMEMTest/MPIMainTest.hxx b/src/ParaMEDMEM/Test/MPIMainTest.hxx similarity index 93% rename from src/ParaMEDMEMTest/MPIMainTest.hxx rename to src/ParaMEDMEM/Test/MPIMainTest.hxx index b96d31e33..9d07ab32d 100644 --- a/src/ParaMEDMEMTest/MPIMainTest.hxx +++ b/src/ParaMEDMEM/Test/MPIMainTest.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #ifndef _MPIMAINTEST_HXX_ #define _MPIMAINTEST_HXX_ @@ -33,9 +32,6 @@ #include #include -#ifndef WIN32 -#include -#endif // ============================================================================ /*! @@ -46,10 +42,6 @@ int main(int argc, char* argv[]) { -#ifndef WIN32 - fpu_control_t cw = _FPU_DEFAULT & ~(_FPU_MASK_IM | _FPU_MASK_ZM | _FPU_MASK_OM); - _FPU_SETCW(cw); -#endif MPI_Init(&argc,&argv); int rank; MPI_Comm_rank(MPI_COMM_WORLD,&rank); diff --git a/src/ParaMEDMEM/Test/Makefile.am b/src/ParaMEDMEM/Test/Makefile.am new file mode 100644 index 000000000..2591c99a3 --- /dev/null +++ b/src/ParaMEDMEM/Test/Makefile.am @@ -0,0 +1,102 @@ +# Copyright (C) 2007-2008 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. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +include $(top_srcdir)/adm_local/unix/make_common_starter.am + +lib_LTLIBRARIES = libParaMEDMEMTest.la + +salomeinclude_HEADERS = MPIMainTest.hxx \ + MPIAccessDECTest.hxx \ + MPIAccessTest.hxx \ + ParaMEDMEMTest.hxx + +EXTRA_DIST += MPIMainTest.hxx ParaMEDMEMTest_NonCoincidentDEC.cxx +dist_libParaMEDMEMTest_la_SOURCES= \ + ParaMEDMEMTest.cxx \ + ParaMEDMEMTest_MPIProcessorGroup.cxx \ + ParaMEDMEMTest_BlockTopology.cxx \ + ParaMEDMEMTest_IntersectionDEC.cxx \ + ParaMEDMEMTest_StructuredCoincidentDEC.cxx \ + MPIAccessDECTest.cxx \ + test_AllToAllDEC.cxx \ + test_AllToAllvDEC.cxx \ + test_AllToAllTimeDEC.cxx \ + test_AllToAllvTimeDEC.cxx \ + test_AllToAllvTimeDoubleDEC.cxx \ + MPIAccessTest.cxx \ + test_MPI_Access_Send_Recv.cxx \ + test_MPI_Access_Cyclic_Send_Recv.cxx \ + test_MPI_Access_SendRecv.cxx \ + test_MPI_Access_ISend_IRecv.cxx \ + test_MPI_Access_Cyclic_ISend_IRecv.cxx \ + test_MPI_Access_ISendRecv.cxx \ + test_MPI_Access_Probe.cxx \ + test_MPI_Access_IProbe.cxx \ + test_MPI_Access_Cancel.cxx \ + test_MPI_Access_Send_Recv_Length.cxx \ + test_MPI_Access_ISend_IRecv_Length.cxx \ + test_MPI_Access_ISend_IRecv_Length_1.cxx \ + test_MPI_Access_Time.cxx \ + test_MPI_Access_Time_0.cxx \ + test_MPI_Access_ISend_IRecv_BottleNeck.cxx + + +libParaMEDMEMTest_la_CPPFLAGS= @CPPUNIT_INCLUDES@ \ + $(MPI_INCLUDES) \ + -I$(srcdir)/../../INTERP_KERNEL \ + -I$(srcdir)/../../INTERP_KERNEL/Bases \ + -I$(srcdir)/../../INTERP_KERNEL/Geometric2D \ + -I$(srcdir)/../../ParaMEDMEM \ + -I$(srcdir)/../../MEDCoupling \ + -I$(srcdir)/../MEDLoader + +libParaMEDMEMTest_la_LDFLAGS= ../MEDLoader/libparamedmemmedloader.la @CPPUNIT_LIBS@ $(MPI_LIBS) + +if MED_ENABLE_KERNEL + libParaMEDMEMTest_la_CPPFLAGS+= ${KERNEL_CXXFLAGS} + libParaMEDMEMTest_la_LDFLAGS+= ${KERNEL_LDFLAGS} -lSALOMELocalTrace +endif + +# Executables targets +bin_PROGRAMS = TestParaMEDMEM \ + TestMPIAccessDEC \ + TestMPIAccess + +dist_TestParaMEDMEM_SOURCES = TestParaMEDMEM.cxx +dist_TestMPIAccessDEC_SOURCES = TestMPIAccessDEC.cxx +dist_TestMPIAccess_SOURCES = TestMPIAccess.cxx + +LDADD= $(MED2_LIBS) $(libMEDMEMTest_la_LDFLAGS) -lm $(MPI_LIBS) \ + ../libparamedmem.la libParaMEDMEMTest.la \ + ../../INTERP_KERNEL/libinterpkernel.la + +if MED_ENABLE_KERNEL + LDADD+= -lSALOMEBasics +endif + +if MED_ENABLE_FVM + LDADD += $(FVM_LIBS) + dist_libParaMEDMEMTest_la_SOURCES += ParaMEDMEMTest_NonCoincidentDEC.cxx + libParaMEDMEMTest_la_CPPFLAGS+= -DMED_ENABLE_FVM $(FVM_INCLUDES) + libParaMEDMEMTest_la_LDFLAGS+= $(FVM_LIBS) +endif + +AM_CPPFLAGS= $(libParaMEDMEMTest_la_CPPFLAGS) + +UNIT_TEST_PROG = TestParaMEDMEM diff --git a/src/MEDCoupling/MEDCouplingRefCountObject.cxx b/src/ParaMEDMEM/Test/ParaMEDMEMTest.cxx similarity index 53% rename from src/MEDCoupling/MEDCouplingRefCountObject.cxx rename to src/ParaMEDMEM/Test/ParaMEDMEMTest.cxx index 14f14f23d..f5c43bebd 100644 --- a/src/MEDCoupling/MEDCouplingRefCountObject.cxx +++ b/src/ParaMEDMEM/Test/ParaMEDMEMTest.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,32 +16,32 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +#include "ParaMEDMEMTest.hxx" +#include -#include "MEDCouplingRefCountObject.hxx" +#include +#include -using namespace ParaMEDMEM; +using namespace std; -RefCountObject::RefCountObject():_cnt(1) -{ -} -RefCountObject::RefCountObject(const RefCountObject& other):_cnt(1) -{ -} - -bool RefCountObject::decrRef() -{ - bool ret=((--_cnt)==0); - if(ret) - delete this; - return ret; -} -void RefCountObject::incrRef() const +/*! + * Tool to remove temporary files. + * Allows automatique removal of temporary files in case of test failure. + */ +ParaMEDMEMTest_TmpFilesRemover::~ParaMEDMEMTest_TmpFilesRemover() { - _cnt++; + set::iterator it = myTmpFiles.begin(); + for (; it != myTmpFiles.end(); it++) { + if (access((*it).data(), F_OK) == 0) + remove((*it).data()); + } + myTmpFiles.clear(); + //cout << "~ParaMEDMEMTest_TmpFilesRemover()" << endl; } -RefCountObject::~RefCountObject() +bool ParaMEDMEMTest_TmpFilesRemover::Register(const string theTmpFile) { + return (myTmpFiles.insert(theTmpFile)).second; } diff --git a/src/ParaMEDMEM/Test/ParaMEDMEMTest.hxx b/src/ParaMEDMEM/Test/ParaMEDMEMTest.hxx new file mode 100644 index 000000000..baab1b7af --- /dev/null +++ b/src/ParaMEDMEM/Test/ParaMEDMEMTest.hxx @@ -0,0 +1,136 @@ +// Copyright (C) 2007-2008 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. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#ifndef _ParaMEDMEMTEST_HXX_ +#define _ParaMEDMEMTEST_HXX_ + +#include + +#include +#include +#include +#include "mpi.h" + + +class ParaMEDMEMTest : public CppUnit::TestFixture +{ + CPPUNIT_TEST_SUITE( ParaMEDMEMTest ); + CPPUNIT_TEST(testMPIProcessorGroup_constructor); + CPPUNIT_TEST(testMPIProcessorGroup_boolean); + CPPUNIT_TEST(testMPIProcessorGroup_rank); + CPPUNIT_TEST(testBlockTopology_constructor); + CPPUNIT_TEST(testBlockTopology_serialize); + CPPUNIT_TEST(testIntersectionDEC_2D); + CPPUNIT_TEST(testIntersectionDEC_2DP0P1); + + CPPUNIT_TEST(testSynchronousEqualIntersectionWithoutInterpNativeDEC_2D); + CPPUNIT_TEST(testSynchronousEqualIntersectionWithoutInterpDEC_2D); + CPPUNIT_TEST(testSynchronousEqualIntersectionDEC_2D); + CPPUNIT_TEST(testSynchronousFasterSourceIntersectionDEC_2D); + CPPUNIT_TEST(testSynchronousSlowerSourceIntersectionDEC_2D); + CPPUNIT_TEST(testSynchronousSlowSourceIntersectionDEC_2D); + CPPUNIT_TEST(testSynchronousFastSourceIntersectionDEC_2D); + CPPUNIT_TEST(testAsynchronousEqualIntersectionDEC_2D); + CPPUNIT_TEST(testAsynchronousFasterSourceIntersectionDEC_2D); + CPPUNIT_TEST(testAsynchronousSlowerSourceIntersectionDEC_2D); + CPPUNIT_TEST(testAsynchronousSlowSourceIntersectionDEC_2D); + CPPUNIT_TEST(testAsynchronousFastSourceIntersectionDEC_2D); +#ifdef MED_ENABLE_FVM + //can be added again after FVM correction for 2D + // CPPUNIT_TEST(testNonCoincidentDEC_2D); + CPPUNIT_TEST(testNonCoincidentDEC_3D); +#endif + CPPUNIT_TEST(testStructuredCoincidentDEC); + CPPUNIT_TEST_SUITE_END(); + + +public: + + ParaMEDMEMTest():CppUnit::TestFixture(){} + ~ParaMEDMEMTest(){} + void setUp(){} + void tearDown(){} + void testMPIProcessorGroup_constructor(); + void testMPIProcessorGroup_boolean(); + void testMPIProcessorGroup_rank(); + void testBlockTopology_constructor(); + void testBlockTopology_serialize(); + void testIntersectionDEC_2D(); + void testIntersectionDEC_2DP0P1(); +#ifdef MED_ENABLE_FVM + void testNonCoincidentDEC_2D(); + void testNonCoincidentDEC_3D(); +#endif + void testStructuredCoincidentDEC(); + void testSynchronousEqualIntersectionWithoutInterpNativeDEC_2D(); + void testSynchronousEqualIntersectionWithoutInterpDEC_2D(); + void testSynchronousEqualIntersectionDEC_2D(); + void testSynchronousFasterSourceIntersectionDEC_2D(); + void testSynchronousSlowerSourceIntersectionDEC_2D(); + void testSynchronousSlowSourceIntersectionDEC_2D(); + void testSynchronousFastSourceIntersectionDEC_2D(); + + void testAsynchronousEqualIntersectionDEC_2D(); + void testAsynchronousFasterSourceIntersectionDEC_2D(); + void testAsynchronousSlowerSourceIntersectionDEC_2D(); + void testAsynchronousSlowSourceIntersectionDEC_2D(); + void testAsynchronousFastSourceIntersectionDEC_2D(); + + +private: + void testNonCoincidentDEC(const std::string& filename1, + const std::string& meshname1, + const std::string& filename2, + const std::string& meshname2, + int nbprocsource, double epsilon); + void testAsynchronousIntersectionDEC_2D(double dtA, double tmaxA, + double dtB, double tmaxB, + bool WithPointToPoint, bool Asynchronous, bool WithInterp, const char *srcMeth, const char *targetMeth); + void testIntersectionDEC_2D_(const char *srcMeth, const char *targetMeth); + +}; + +// to automatically remove temporary files from disk +class ParaMEDMEMTest_TmpFilesRemover +{ +public: + ParaMEDMEMTest_TmpFilesRemover() {} + ~ParaMEDMEMTest_TmpFilesRemover(); + bool Register(const std::string theTmpFile); + +private: + std::set myTmpFiles; +}; + +/*! + * Tool to print array to stream. + */ +template +void ParaMEDMEMTest_DumpArray (std::ostream & stream, const T* array, const int length, const std::string text) +{ + stream << text << ": {"; + if (length > 0) { + stream << array[0]; + for (int i = 1; i < length; i++) { + stream << ", " << array[i]; + } + } + stream << "}" << std::endl; +}; + +#endif diff --git a/src/ParaMEDMEMTest/ParaMEDMEMTest_BlockTopology.cxx b/src/ParaMEDMEM/Test/ParaMEDMEMTest_BlockTopology.cxx similarity index 98% rename from src/ParaMEDMEMTest/ParaMEDMEMTest_BlockTopology.cxx rename to src/ParaMEDMEM/Test/ParaMEDMEMTest_BlockTopology.cxx index 780b71f41..f116ff2a7 100644 --- a/src/ParaMEDMEMTest/ParaMEDMEMTest_BlockTopology.cxx +++ b/src/ParaMEDMEM/Test/ParaMEDMEMTest_BlockTopology.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include "ParaMEDMEMTest.hxx" #include diff --git a/src/ParaMEDMEM/Test/ParaMEDMEMTest_IntersectionDEC.cxx b/src/ParaMEDMEM/Test/ParaMEDMEMTest_IntersectionDEC.cxx new file mode 100644 index 000000000..144f888b7 --- /dev/null +++ b/src/ParaMEDMEM/Test/ParaMEDMEMTest_IntersectionDEC.cxx @@ -0,0 +1,541 @@ +// Copyright (C) 2007-2008 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. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#include "ParaMEDMEMTest.hxx" +#include + +#include "CommInterface.hxx" +#include "ProcessorGroup.hxx" +#include "MPIProcessorGroup.hxx" +#include "Topology.hxx" +#include "DEC.hxx" +#include "MxN_Mapping.hxx" +#include "IntersectionDEC.hxx" +#include "ParaMESH.hxx" +#include "ParaFIELD.hxx" +#include "ICoCoMEDField.hxx" +#include "MEDLoader.hxx" + +#include + +// use this define to enable lines, execution of which leads to Segmentation Fault +#define ENABLE_FAULTS + +// use this define to enable CPPUNIT asserts and fails, showing bugs +#define ENABLE_FORCED_FAILURES + + +using namespace std; +using namespace ParaMEDMEM; + +void ParaMEDMEMTest::testIntersectionDEC_2D() +{ + testIntersectionDEC_2D_("P0","P0"); +} + +void ParaMEDMEMTest::testIntersectionDEC_2DP0P1() +{ + //testIntersectionDEC_2D_("P0","P1"); +} + +/* + * Check methods defined in IntersectionDEC.hxx + * + IntersectionDEC(); + IntersectionDEC(ProcessorGroup& local_group, ProcessorGroup& distant_group); + virtual ~IntersectionDEC(); + void synchronize(); + void recvData(); + void sendData(); +*/ + +void ParaMEDMEMTest::testIntersectionDEC_2D_(const char *srcMeth, const char *targetMeth) +{ + std::string srcM(srcMeth); + std::string targetM(targetMeth); + int size; + int rank; + MPI_Comm_size(MPI_COMM_WORLD,&size); + MPI_Comm_rank(MPI_COMM_WORLD,&rank); + + //the test is meant to run on five processors + if (size !=5) return ; + + int nproc_source = 3; + set self_procs; + set procs_source; + set procs_target; + + for (int i=0; icontainsMyRank()) + { + string master = filename_xml1; + + ostringstream strstream; + strstream <getNumberOfCells(); + else + nb_local=mesh->getNumberOfNodes(); + // double * value= new double[nb_local]; + double *value=parafield->getField()->getArray()->getPointer(); + for(int ielem=0; ielemcontainsMyRank()) + { + string master= filename_xml2; + ostringstream strstream; + strstream << master<<(rank-nproc_source+1)<<".med"; + ostringstream meshname ; + meshname<< "Mesh_3_"<getNumberOfCells(); + else + nb_local=mesh->getNumberOfNodes(); + // double * value= new double[nb_local]; + double *value=parafield->getField()->getArray()->getPointer(); + for(int ielem=0; ielemcontainsMyRank()) + { + field_before_int = parafield->getVolumeIntegral(0); + dec.synchronize(); + cout<<"DEC usage"<myRank()==0) + aRemover.Register("./sourcesquareb"); + ostringstream filename; + filename<<"./sourcesquareb_"<myRank()+1; + aRemover.Register(filename.str().c_str()); + MEDLoader::writeParaField("./sourcesquareb","boundary",parafield); + + dec.recvData(); + cout <<"writing"<myRank()==0) + aRemover.Register("./sourcesquare"); + MEDLoader::writeParaField("./sourcesquare","boundary",parafield); + + + filename<<"./sourcesquare_"<myRank()+1; + aRemover.Register(filename.str().c_str()); + field_after_int = parafield->getVolumeIntegral(0); + + + // MPI_Bcast(&field_before_int,1,MPI_DOUBLE,0,MPI_COMM_WORLD); + // MPI_Bcast(&field_after_int,1,MPI_DOUBLE,0,MPI_COMM_WORLD); + + CPPUNIT_ASSERT_DOUBLES_EQUAL(field_before_int, field_after_int, 1e-6); + + } + + //attaching a DEC to the target group + if (target_group->containsMyRank()) + { + dec.synchronize(); + dec.setForcedRenormalization(false); + + dec.recvData(); + MEDLoader::writeParaMesh("./targetsquareb",paramesh); + MEDLoader::writeParaField("./targetsquareb", "boundary",parafield); + if (target_group->myRank()==0) + aRemover.Register("./targetsquareb"); + ostringstream filename; + filename<<"./targetsquareb_"<myRank()+1; + aRemover.Register(filename.str().c_str()); + dec.sendData(); + MEDLoader::writeParaMesh("./targetsquare",paramesh); + MEDLoader::writeParaField("./targetsquare", "boundary",parafield); + + if (target_group->myRank()==0) + aRemover.Register("./targetsquareb"); + + filename<<"./targetsquareb_"<myRank()+1; + aRemover.Register(filename.str().c_str()); + // double field_before_int, field_after_int; + // MPI_Bcast(&field_before_int,1,MPI_DOUBLE,0,MPI_COMM_WORLD); + // MPI_Bcast(&field_after_int,1,MPI_DOUBLE,0,MPI_COMM_WORLD); + + // CPPUNIT_ASSERT_DOUBLES_EQUAL(field_before_int, field_after_int, 1e-6); + + } + + delete source_group; + delete target_group; + delete self_group; + delete parafield; + delete paramesh; + mesh->decrRef(); + + delete icocofield; + + MPI_Barrier(MPI_COMM_WORLD); + cout << "end of IntersectionDEC_2D test"< self_procs; + set procs_source; + set procs_target; + + for (int i=0; icontainsMyRank()) + { + string master = filename_xml1; + + ostringstream strstream; + strstream <getNumberOfCells(); + else + nb_local=mesh->getNumberOfNodes(); + // double * value= new double[nb_local]; + double *value=parafield->getField()->getArray()->getPointer(); + for(int ielem=0; ielemcontainsMyRank()) + { + string master= filename_xml2; + ostringstream strstream; + strstream << master<<(rank-nproc_source+1)<<".med"; + ostringstream meshname ; + meshname<< "Mesh_3_"<getNumberOfCells(); + else + nb_local=mesh->getNumberOfNodes(); + + double *value=parafield->getField()->getArray()->getPointer(); + for(int ielem=0; ielemcontainsMyRank()) + { + cout<<"DEC usage"<getField()->getArray()->getPointer(); + int nb_local=parafield->getField()->getMesh()->getNumberOfCells(); + for (int i=0; icontainsMyRank()) + { + cout<<"DEC usage"< times; + for (double time=0; timegetVolumeIntegral(0); + cout << "testAsynchronousIntersectionDEC_2D" << rank << " time " << time + << " VolumeIntegral " << vi + << " time*10000 " << time*10000 << endl ; + + CPPUNIT_ASSERT_DOUBLES_EQUAL(vi,time*10000,0.001); + } + + } + + delete source_group; + delete target_group; + delete self_group; + delete parafield ; + delete paramesh ; + mesh->decrRef() ; + delete icocofield ; + + cout << "testAsynchronousIntersectionDEC_2D" << rank << " MPI_Barrier " << endl ; + + if (Asynchronous) MPI_Barrier(MPI_COMM_WORLD); + cout << "end of IntersectionDEC_2D test"< #include "CommInterface.hxx" diff --git a/src/ParaMEDMEMTest/ParaMEDMEMTest_NonCoincidentDEC.cxx b/src/ParaMEDMEM/Test/ParaMEDMEMTest_NonCoincidentDEC.cxx similarity index 92% rename from src/ParaMEDMEMTest/ParaMEDMEMTest_NonCoincidentDEC.cxx rename to src/ParaMEDMEM/Test/ParaMEDMEMTest_NonCoincidentDEC.cxx index ee55782a8..743d91b49 100644 --- a/src/ParaMEDMEMTest/ParaMEDMEMTest_NonCoincidentDEC.cxx +++ b/src/ParaMEDMEM/Test/ParaMEDMEMTest_NonCoincidentDEC.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include "ParaMEDMEMTest.hxx" #include @@ -46,11 +45,11 @@ using namespace ParaMEDMEM; using namespace MEDMEM; /* - * Check methods defined in InterpKernelDEC.hxx + * Check methods defined in IntersectionDEC.hxx * - InterpKernelDEC(); - InterpKernelDEC(ProcessorGroup& local_group, ProcessorGroup& distant_group); - virtual ~InterpKernelDEC(); + IntersectionDEC(); + IntersectionDEC(ProcessorGroup& local_group, ProcessorGroup& distant_group); + virtual ~IntersectionDEC(); void synchronize(); void recvData(); void sendData(); @@ -130,10 +129,14 @@ void ParaMEDMEMTest::testNonCoincidentDEC(const string& filename1, ParaMEDMEM::ParaMESH* paramesh; ParaMEDMEM::ParaFIELD* parafield; - string filename_xml1 = getResourceFile(filename1); - string filename_xml2 = getResourceFile(filename2); - //string filename_seq_wr = makeTmpFile(""); - //string filename_seq_med = makeTmpFile("myWrField_seq_pointe221.med"); + string data_dir = getenv("MED_ROOT_DIR") + "/share/salome/resources/med/"; + string tmp_dir = getenv("TMP"); + if (tmp_dir == "") + tmp_dir = "/tmp"; + string filename_xml1 = data_dir + filename1; + string filename_xml2 = data_dir + filename2; + string filename_seq_wr = tmp_dir + "/"; + string filename_seq_med = tmp_dir + "/myWrField_seq_pointe221.med"; // To remove tmp files from disk ParaMEDMEMTest_TmpFilesRemover aRemover; diff --git a/src/ParaMEDMEMTest/ParaMEDMEMTest_StructuredCoincidentDEC.cxx b/src/ParaMEDMEM/Test/ParaMEDMEMTest_StructuredCoincidentDEC.cxx similarity index 84% rename from src/ParaMEDMEMTest/ParaMEDMEMTest_StructuredCoincidentDEC.cxx rename to src/ParaMEDMEM/Test/ParaMEDMEMTest_StructuredCoincidentDEC.cxx index 973ed8760..c0abcf871 100644 --- a/src/ParaMEDMEMTest/ParaMEDMEMTest_StructuredCoincidentDEC.cxx +++ b/src/ParaMEDMEM/Test/ParaMEDMEMTest_StructuredCoincidentDEC.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include "ParaMEDMEMTest.hxx" #include @@ -28,7 +27,6 @@ #include "StructuredCoincidentDEC.hxx" #include "ParaMESH.hxx" #include "ParaFIELD.hxx" -#include "ComponentTopology.hxx" #include "ICoCoMEDField.hxx" #include "MEDLoader.hxx" @@ -75,10 +73,15 @@ void ParaMEDMEMTest::testStructuredCoincidentDEC() { ParaMEDMEM::ParaMESH* paramesh; ParaMEDMEM::ParaFIELD* parafield; - string filename_xml1 = getResourceFile("square1_split"); - string filename_2 = getResourceFile("square1.med"); - //string filename_seq_wr = makeTmpFile(""); - //string filename_seq_med = makeTmpFile("myWrField_seq_pointe221.med"); + string data_dir = getenv("MED_ROOT_DIR"); + string tmp_dir = getenv("TMP"); + if (tmp_dir == "") + tmp_dir = "/tmp"; + string filename_xml1 = data_dir + + "/share/salome/resources/med/square1_split"; + string filename_2 = data_dir + "/share/salome/resources/med/square1.med"; + string filename_seq_wr = tmp_dir + "/"; + string filename_seq_med = tmp_dir + "/myWrField_seq_pointe221.med"; // To remove tmp files from disk ParaMEDMEMTest_TmpFilesRemover aRemover; @@ -102,7 +105,7 @@ void ParaMEDMEMTest::testStructuredCoincidentDEC() { paramesh=new ParaMESH (mesh,source_group,"source mesh"); ParaMEDMEM::ComponentTopology comptopo(6); - parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo); + parafield = new ParaFIELD(ON_CELLS,paramesh, comptopo); int nb_local=mesh->getNumberOfCells(); const int* global_numbering = paramesh->getGlobalNumberingCell(); @@ -112,12 +115,12 @@ void ParaMEDMEMTest::testStructuredCoincidentDEC() { for (int icomp=0; icomp<6; icomp++) value[ielem*6+icomp]=global_numbering[ielem]*6+icomp; - //ICoCo::Field* icocofield=new ICoCo::MEDField((MEDCouplingUMesh *)paramesh->getCellMesh(),parafield->getField()); + ICoCo::Field* icocofield=new ICoCo::MEDField(paramesh,parafield); - dec.attachLocalField(parafield); + dec.attachLocalField(icocofield); dec.synchronize(); dec.sendData(); - //delete icocofield; + delete icocofield; } //loading the geometry for the target group @@ -129,16 +132,16 @@ void ParaMEDMEMTest::testStructuredCoincidentDEC() { paramesh=new ParaMESH (mesh,self_group,"target mesh"); ParaMEDMEM::ComponentTopology comptopo(6, &target_group); - parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo); + parafield = new ParaFIELD(ON_CELLS,paramesh, comptopo); int nb_local=mesh->getNumberOfCells(); double *value=parafield->getField()->getArray()->getPointer(); for (int ielem=0; ielemgetCellMesh(),parafield->getField()); + ICoCo::Field* icocofield=new ICoCo::MEDField(paramesh,parafield); - dec.attachLocalField(parafield); + dec.attachLocalField(icocofield); dec.synchronize(); dec.recvData(); @@ -149,7 +152,7 @@ void ParaMEDMEMTest::testStructuredCoincidentDEC() { for (int icomp = 0; icomp < comptopo.nbLocalComponents(); icomp++) CPPUNIT_ASSERT_DOUBLES_EQUAL(recv_value[i*comptopo.nbLocalComponents()+icomp],(double)(i*6+icomp+first),1e-12); } - //delete icocofield; + delete icocofield; } delete parafield; delete paramesh; diff --git a/src/ParaMEDMEMTest/TestMPIAccess.cxx b/src/ParaMEDMEM/Test/TestMPIAccess.cxx similarity index 95% rename from src/ParaMEDMEMTest/TestMPIAccess.cxx rename to src/ParaMEDMEM/Test/TestMPIAccess.cxx index 5d6955daf..e71974e99 100644 --- a/src/ParaMEDMEMTest/TestMPIAccess.cxx +++ b/src/ParaMEDMEM/Test/TestMPIAccess.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -18,7 +18,7 @@ // // --- include all MPIAccess Test -// + #include "MPIAccessTest.hxx" // --- Registers the fixture into the 'registry' diff --git a/src/ParaMEDMEMTest/TestMPIAccessDEC.cxx b/src/ParaMEDMEM/Test/TestMPIAccessDEC.cxx similarity index 95% rename from src/ParaMEDMEMTest/TestMPIAccessDEC.cxx rename to src/ParaMEDMEM/Test/TestMPIAccessDEC.cxx index 7776eafb9..80431cff1 100644 --- a/src/ParaMEDMEMTest/TestMPIAccessDEC.cxx +++ b/src/ParaMEDMEM/Test/TestMPIAccessDEC.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -18,7 +18,7 @@ // // --- include all MPIAccessDEC Test -// + #include "MPIAccessDECTest.hxx" // --- Registers the fixture into the 'registry' diff --git a/src/ParaMEDMEMTest/TestParaMEDMEM.cxx b/src/ParaMEDMEM/Test/TestParaMEDMEM.cxx similarity index 95% rename from src/ParaMEDMEMTest/TestParaMEDMEM.cxx rename to src/ParaMEDMEM/Test/TestParaMEDMEM.cxx index 8c7be29e7..6bddba11d 100644 --- a/src/ParaMEDMEMTest/TestParaMEDMEM.cxx +++ b/src/ParaMEDMEM/Test/TestParaMEDMEM.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -18,7 +18,7 @@ // // --- include all MEDMEM Test -// + #include "ParaMEDMEMTest.hxx" // --- Registers the fixture into the 'registry' diff --git a/src/ParaMEDMEMTest/test_AllToAllDEC.cxx b/src/ParaMEDMEM/Test/test_AllToAllDEC.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_AllToAllDEC.cxx rename to src/ParaMEDMEM/Test/test_AllToAllDEC.cxx index 498fbc046..5b8d66896 100644 --- a/src/ParaMEDMEMTest/test_AllToAllDEC.cxx +++ b/src/ParaMEDMEM/Test/test_AllToAllDEC.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include diff --git a/src/ParaMEDMEMTest/test_AllToAllTimeDEC.cxx b/src/ParaMEDMEM/Test/test_AllToAllTimeDEC.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_AllToAllTimeDEC.cxx rename to src/ParaMEDMEM/Test/test_AllToAllTimeDEC.cxx index 3e9a55815..f869374a7 100644 --- a/src/ParaMEDMEMTest/test_AllToAllTimeDEC.cxx +++ b/src/ParaMEDMEM/Test/test_AllToAllTimeDEC.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include diff --git a/src/ParaMEDMEMTest/test_AllToAllvDEC.cxx b/src/ParaMEDMEM/Test/test_AllToAllvDEC.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_AllToAllvDEC.cxx rename to src/ParaMEDMEM/Test/test_AllToAllvDEC.cxx index 0a294ba91..7a5c65f59 100644 --- a/src/ParaMEDMEMTest/test_AllToAllvDEC.cxx +++ b/src/ParaMEDMEM/Test/test_AllToAllvDEC.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include diff --git a/src/ParaMEDMEMTest/test_AllToAllvTimeDEC.cxx b/src/ParaMEDMEM/Test/test_AllToAllvTimeDEC.cxx similarity index 96% rename from src/ParaMEDMEMTest/test_AllToAllvTimeDEC.cxx rename to src/ParaMEDMEM/Test/test_AllToAllvTimeDEC.cxx index 5d4cac7b2..e8bbb1f4d 100644 --- a/src/ParaMEDMEMTest/test_AllToAllvTimeDEC.cxx +++ b/src/ParaMEDMEM/Test/test_AllToAllvTimeDEC.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include @@ -151,7 +150,7 @@ void MPIAccessDECTest::test_AllToAllvTimeDEC( bool Asynchronous , bool UseMPINat //rtimedispls[i] = i*mpi_access->TimeExtent() ; } - double timeLoc = 0 ; + double time = 0 ; double deltatime[maxproc] = {1.,2.1,3.2,4.3,5.4,6.5,7.6,8.7,9.8,10.9,11.} ; double maxtime ; double nextdeltatime = deltatime[myrank] ; @@ -162,18 +161,18 @@ void MPIAccessDECTest::test_AllToAllvTimeDEC( bool Asynchronous , bool UseMPINat maxtime = maxreq ; // MyMPIAccessDEC->InitTime( time , nextdeltatime , maxtime ) ; } - time_t begintime = time(NULL) ; + time_t begintime = std::time(NULL) ; // for ( time = 0 ; time <= maxtime ; time+=deltatime[myrank] ) { - for ( timeLoc = 0 ; timeLoc <= maxtime && nextdeltatime != 0 ; timeLoc+=nextdeltatime ) { + for ( time = 0 ; time <= maxtime && nextdeltatime != 0 ; time+=nextdeltatime ) { nextdeltatime = deltatime[myrank] ; - if ( timeLoc != 0 ) { + if ( time != 0 ) { nextdeltatime = deltatime[myrank] ; - if ( timeLoc+nextdeltatime > maxtime ) { + if ( time+nextdeltatime > maxtime ) { nextdeltatime = 0 ; } // MyMPIAccessDEC->NextTime( nextdeltatime ) ; } - MyMPIAccessDEC->setTime( timeLoc , nextdeltatime ) ; + MyMPIAccessDEC->setTime( time , nextdeltatime ) ; cout << "test_AllToAllvTimeDEC" << myrank << "=====TIME " << time << "=====DELTATIME " << nextdeltatime << "=====MAXTIME " << maxtime << " ======" << endl ; int * sendbuf = new int[datamsglength*size] ; @@ -188,11 +187,11 @@ void MPIAccessDECTest::test_AllToAllvTimeDEC( bool Asynchronous , bool UseMPINat if ( UseMPI_Alltoallv ) { const MPI_Comm* comm = MyMPIAccessDEC->getComm(); TimeMessage * aSendTimeMessage = new TimeMessage ; - aSendTimeMessage->time = timeLoc ; + aSendTimeMessage->time = time ; // aSendTimeMessage->deltatime = deltatime[myrank] ; aSendTimeMessage->deltatime = nextdeltatime ; // aSendTimeMessage->maxtime = maxtime ; - aSendTimeMessage->tag = (int ) (timeLoc/deltatime[myrank]) ; + aSendTimeMessage->tag = (int ) (time/deltatime[myrank]) ; TimeMessage * aRecvTimeMessage = new TimeMessage[size] ; interface.allToAllV(aSendTimeMessage, sendtimecounts , stimedispls , mpi_access->timeType() , @@ -324,7 +323,7 @@ void MPIAccessDECTest::test_AllToAllvTimeDEC( bool Asynchronous , bool UseMPINat << " RecvRequests = 0 OK" << endl ; } - time_t endtime = time(NULL) ; + time_t endtime = std::time(NULL) ; cout << "test_AllToAllvTimeDEC" << myrank << " begintime " << begintime << " endtime " << endtime << " elapse " << endtime-begintime << " " << maxtime/deltatime[myrank] << " calls to AllToAll" << endl ; @@ -349,7 +348,7 @@ void MPIAccessDECTest::test_AllToAllvTimeDEC( bool Asynchronous , bool UseMPINat // MPI_Finalize(); - endtime = time(NULL) ; + endtime = std::time(NULL) ; cout << "test_AllToAllvTimeDEC" << myrank << " OK begintime " << begintime << " endtime " << endtime << " elapse " << endtime-begintime << " " << maxtime/deltatime[myrank] diff --git a/src/ParaMEDMEMTest/test_AllToAllvTimeDoubleDEC.cxx b/src/ParaMEDMEM/Test/test_AllToAllvTimeDoubleDEC.cxx similarity index 90% rename from src/ParaMEDMEMTest/test_AllToAllvTimeDoubleDEC.cxx rename to src/ParaMEDMEM/Test/test_AllToAllvTimeDoubleDEC.cxx index 0b717c21f..81813e1a5 100644 --- a/src/ParaMEDMEMTest/test_AllToAllvTimeDoubleDEC.cxx +++ b/src/ParaMEDMEM/Test/test_AllToAllvTimeDoubleDEC.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include @@ -142,35 +141,35 @@ void MPIAccessDECTest::test_AllToAllvTimeDoubleDEC( bool Asynchronous ) { rtimedispls[i] = i ; } - double timeLoc[maxproc] ; + double time[maxproc] ; double deltatime[maxproc] = {1.,2.1,3.2,4.3,5.4,6.5,7.6,8.7,9.8,10.9,11.} ; double maxtime[maxproc] ; double nextdeltatime[maxproc] ; for ( i = 0 ; i < size ; i++ ) { - timeLoc[i] = 0 ; + time[i] = 0 ; maxtime[i] = maxreq ; nextdeltatime[i] = deltatime[i] ; } - time_t begintime = time(NULL) ; - for ( timeLoc[myrank] = 0 ; timeLoc[myrank] <= maxtime[myrank] && nextdeltatime[myrank] != 0 ; - timeLoc[myrank]+=nextdeltatime[myrank] ) { + time_t begintime = std::time(NULL) ; + for ( time[myrank] = 0 ; time[myrank] <= maxtime[myrank] && nextdeltatime[myrank] != 0 ; + time[myrank]+=nextdeltatime[myrank] ) { //local and target times int target ; for ( target = 0 ; target < size ; target++ ) { nextdeltatime[target] = deltatime[target] ; - if ( timeLoc[target] != 0 ) { - if ( timeLoc[target]+nextdeltatime[target] > maxtime[target] ) { + if ( time[target] != 0 ) { + if ( time[target]+nextdeltatime[target] > maxtime[target] ) { nextdeltatime[target] = 0 ; } } if ( target != myrank ) { - while ( timeLoc[myrank] >= timeLoc[target] ) { - timeLoc[target] += deltatime[target] ; + while ( time[myrank] >= time[target] ) { + time[target] += deltatime[target] ; } } } - MyMPIAccessDEC->setTime( timeLoc[myrank] , nextdeltatime[myrank] ) ; - cout << "test" << myrank << "=====TIME " << timeLoc[myrank] << "=====DELTATIME " + MyMPIAccessDEC->setTime( time[myrank] , nextdeltatime[myrank] ) ; + cout << "test" << myrank << "=====TIME " << time[myrank] << "=====DELTATIME " << nextdeltatime[myrank] << "=====MAXTIME " << maxtime[myrank] << " ======" << endl ; double * sendbuf = new double[datamsglength*size] ; @@ -182,7 +181,7 @@ void MPIAccessDECTest::test_AllToAllvTimeDoubleDEC( bool Asynchronous ) { for ( j = 0 ; j < datamsglength ; j++ ) { //sendbuf[j] = myrank*10000 + (j/datamsglength)*100 + j ; sendbuf[target*datamsglength+j] = myrank*1000000 + target*10000 + - (timeLoc[myrank]/deltatime[myrank])*100 + j ; + (time[myrank]/deltatime[myrank])*100 + j ; //cout << " " << (int ) sendbuf[target*datamsglength+j] ; recvbuf[target*datamsglength+j] = -1 ; } @@ -223,18 +222,18 @@ void MPIAccessDECTest::test_AllToAllvTimeDoubleDEC( bool Asynchronous ) { int index = target*datamsglength+j ; if ( j < recvcounts[target] ) { if ( fabs(recvbuf[index] - (target*1000000 + myrank*10000 + - (timeLoc[target]/deltatime[target])*100 + j)) > 101) { + (time[target]/deltatime[target])*100 + j)) > 101) { badrecvbuf = true ; - cout << "test_AllToAllvTimeDoubleDEC" << myrank << " target " << target << " timeLoc[target] " - << timeLoc[target] << " recvbuf[" << index << "] " << (int ) recvbuf[index] + cout << "test_AllToAllvTimeDoubleDEC" << myrank << " target " << target << " time[target] " + << time[target] << " recvbuf[" << index << "] " << (int ) recvbuf[index] << " # " << (int ) (target*1000000 + - myrank*10000 + (timeLoc[target]/deltatime[target])*100 + j) + myrank*10000 + (time[target]/deltatime[target])*100 + j) << endl ; } else if ( badrecvbuf ) { cout << "test_AllToAllvTimeDoubleDEC" << myrank << " recvbuf[" << index << "] " << recvbuf[index] << " ~= " << (int ) (target*1000000 + - myrank*10000 + (timeLoc[target]/deltatime[target])*100 + j) << endl ; + myrank*10000 + (time[target]/deltatime[target])*100 + j) << endl ; } } else if ( recvbuf[index] != -1 ) { @@ -299,7 +298,7 @@ void MPIAccessDECTest::test_AllToAllvTimeDoubleDEC( bool Asynchronous ) { << " RecvRequests = 0 OK" << endl ; } - time_t endtime = time(NULL) ; + time_t endtime = std::time(NULL) ; cout << "test_AllToAllvTimeDoubleDEC" << myrank << " begintime " << begintime << " endtime " << endtime << " elapse " << endtime-begintime << " " << maxtime[myrank]/deltatime[myrank] << " calls to AllToAll" << endl ; @@ -323,7 +322,7 @@ void MPIAccessDECTest::test_AllToAllvTimeDoubleDEC( bool Asynchronous ) { // MPI_Finalize(); - endtime = time(NULL) ; + endtime = std::time(NULL) ; cout << "test_AllToAllvTimeDoubleDEC" << myrank << " OK begintime " << begintime << " endtime " << endtime << " elapse " << endtime-begintime << " " << maxtime[myrank]/deltatime[myrank] diff --git a/src/ParaMEDMEMTest/test_MPI_Access_Cancel.cxx b/src/ParaMEDMEM/Test/test_MPI_Access_Cancel.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_MPI_Access_Cancel.cxx rename to src/ParaMEDMEM/Test/test_MPI_Access_Cancel.cxx index 5b95d0d65..2ac553f3e 100644 --- a/src/ParaMEDMEMTest/test_MPI_Access_Cancel.cxx +++ b/src/ParaMEDMEM/Test/test_MPI_Access_Cancel.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include diff --git a/src/ParaMEDMEMTest/test_MPI_Access_Cyclic_ISend_IRecv.cxx b/src/ParaMEDMEM/Test/test_MPI_Access_Cyclic_ISend_IRecv.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_MPI_Access_Cyclic_ISend_IRecv.cxx rename to src/ParaMEDMEM/Test/test_MPI_Access_Cyclic_ISend_IRecv.cxx index c10f0599a..d2a84289c 100644 --- a/src/ParaMEDMEMTest/test_MPI_Access_Cyclic_ISend_IRecv.cxx +++ b/src/ParaMEDMEM/Test/test_MPI_Access_Cyclic_ISend_IRecv.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include diff --git a/src/ParaMEDMEMTest/test_MPI_Access_Cyclic_Send_Recv.cxx b/src/ParaMEDMEM/Test/test_MPI_Access_Cyclic_Send_Recv.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_MPI_Access_Cyclic_Send_Recv.cxx rename to src/ParaMEDMEM/Test/test_MPI_Access_Cyclic_Send_Recv.cxx index dd67d4d28..b825f90ef 100644 --- a/src/ParaMEDMEMTest/test_MPI_Access_Cyclic_Send_Recv.cxx +++ b/src/ParaMEDMEM/Test/test_MPI_Access_Cyclic_Send_Recv.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include diff --git a/src/ParaMEDMEMTest/test_MPI_Access_IProbe.cxx b/src/ParaMEDMEM/Test/test_MPI_Access_IProbe.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_MPI_Access_IProbe.cxx rename to src/ParaMEDMEM/Test/test_MPI_Access_IProbe.cxx index 5e07db5c5..9d18c902d 100644 --- a/src/ParaMEDMEMTest/test_MPI_Access_IProbe.cxx +++ b/src/ParaMEDMEM/Test/test_MPI_Access_IProbe.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include diff --git a/src/ParaMEDMEMTest/test_MPI_Access_ISendRecv.cxx b/src/ParaMEDMEM/Test/test_MPI_Access_ISendRecv.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_MPI_Access_ISendRecv.cxx rename to src/ParaMEDMEM/Test/test_MPI_Access_ISendRecv.cxx index e11dc7698..6b5411249 100644 --- a/src/ParaMEDMEMTest/test_MPI_Access_ISendRecv.cxx +++ b/src/ParaMEDMEM/Test/test_MPI_Access_ISendRecv.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include diff --git a/src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv.cxx b/src/ParaMEDMEM/Test/test_MPI_Access_ISend_IRecv.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv.cxx rename to src/ParaMEDMEM/Test/test_MPI_Access_ISend_IRecv.cxx index 369952c8a..8d1a9306c 100644 --- a/src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv.cxx +++ b/src/ParaMEDMEM/Test/test_MPI_Access_ISend_IRecv.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include diff --git a/src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_BottleNeck.cxx b/src/ParaMEDMEM/Test/test_MPI_Access_ISend_IRecv_BottleNeck.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_BottleNeck.cxx rename to src/ParaMEDMEM/Test/test_MPI_Access_ISend_IRecv_BottleNeck.cxx index 3482278c2..45cc5439f 100644 --- a/src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_BottleNeck.cxx +++ b/src/ParaMEDMEM/Test/test_MPI_Access_ISend_IRecv_BottleNeck.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include diff --git a/src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_Length.cxx b/src/ParaMEDMEM/Test/test_MPI_Access_ISend_IRecv_Length.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_Length.cxx rename to src/ParaMEDMEM/Test/test_MPI_Access_ISend_IRecv_Length.cxx index bba555e5f..c6dc2743d 100644 --- a/src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_Length.cxx +++ b/src/ParaMEDMEM/Test/test_MPI_Access_ISend_IRecv_Length.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include diff --git a/src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_Length_1.cxx b/src/ParaMEDMEM/Test/test_MPI_Access_ISend_IRecv_Length_1.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_Length_1.cxx rename to src/ParaMEDMEM/Test/test_MPI_Access_ISend_IRecv_Length_1.cxx index f463d68d2..3d09f6d3c 100644 --- a/src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_Length_1.cxx +++ b/src/ParaMEDMEM/Test/test_MPI_Access_ISend_IRecv_Length_1.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include diff --git a/src/ParaMEDMEMTest/test_MPI_Access_Probe.cxx b/src/ParaMEDMEM/Test/test_MPI_Access_Probe.cxx similarity index 98% rename from src/ParaMEDMEMTest/test_MPI_Access_Probe.cxx rename to src/ParaMEDMEM/Test/test_MPI_Access_Probe.cxx index 6f86702dc..2bce97e12 100644 --- a/src/ParaMEDMEMTest/test_MPI_Access_Probe.cxx +++ b/src/ParaMEDMEM/Test/test_MPI_Access_Probe.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include diff --git a/src/ParaMEDMEMTest/test_MPI_Access_SendRecv.cxx b/src/ParaMEDMEM/Test/test_MPI_Access_SendRecv.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_MPI_Access_SendRecv.cxx rename to src/ParaMEDMEM/Test/test_MPI_Access_SendRecv.cxx index 2f7a4d73b..a93fa4af8 100644 --- a/src/ParaMEDMEMTest/test_MPI_Access_SendRecv.cxx +++ b/src/ParaMEDMEM/Test/test_MPI_Access_SendRecv.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include diff --git a/src/ParaMEDMEMTest/test_MPI_Access_Send_Recv.cxx b/src/ParaMEDMEM/Test/test_MPI_Access_Send_Recv.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_MPI_Access_Send_Recv.cxx rename to src/ParaMEDMEM/Test/test_MPI_Access_Send_Recv.cxx index d147b891d..f7e556a97 100644 --- a/src/ParaMEDMEMTest/test_MPI_Access_Send_Recv.cxx +++ b/src/ParaMEDMEM/Test/test_MPI_Access_Send_Recv.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include diff --git a/src/ParaMEDMEMTest/test_MPI_Access_Send_Recv_Length.cxx b/src/ParaMEDMEM/Test/test_MPI_Access_Send_Recv_Length.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_MPI_Access_Send_Recv_Length.cxx rename to src/ParaMEDMEM/Test/test_MPI_Access_Send_Recv_Length.cxx index db48addac..fc55f26f6 100644 --- a/src/ParaMEDMEMTest/test_MPI_Access_Send_Recv_Length.cxx +++ b/src/ParaMEDMEM/Test/test_MPI_Access_Send_Recv_Length.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include diff --git a/src/ParaMEDMEMTest/test_MPI_Access_Time.cxx b/src/ParaMEDMEM/Test/test_MPI_Access_Time.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_MPI_Access_Time.cxx rename to src/ParaMEDMEM/Test/test_MPI_Access_Time.cxx index d25251a2e..1a8eb185b 100644 --- a/src/ParaMEDMEMTest/test_MPI_Access_Time.cxx +++ b/src/ParaMEDMEM/Test/test_MPI_Access_Time.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include diff --git a/src/ParaMEDMEMTest/test_MPI_Access_Time_0.cxx b/src/ParaMEDMEM/Test/test_MPI_Access_Time_0.cxx similarity index 99% rename from src/ParaMEDMEMTest/test_MPI_Access_Time_0.cxx rename to src/ParaMEDMEM/Test/test_MPI_Access_Time_0.cxx index c83eab086..3da138565 100644 --- a/src/ParaMEDMEMTest/test_MPI_Access_Time_0.cxx +++ b/src/ParaMEDMEM/Test/test_MPI_Access_Time_0.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D +// Copyright (C) 2007-2008 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 @@ -16,7 +16,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #include #include #include diff --git a/src/ParaMEDMEMTest/Makefile.am b/src/ParaMEDMEMTest/Makefile.am deleted file mode 100644 index d2a12d21f..000000000 --- a/src/ParaMEDMEMTest/Makefile.am +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright (C) 2007-2010 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. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -include $(top_srcdir)/adm_local/unix/make_common_starter.am - -lib_LTLIBRARIES = libParaMEDMEMTest.la - -salomeinclude_HEADERS = \ - MPIMainTest.hxx \ - MPIAccessDECTest.hxx \ - MPIAccessTest.hxx \ - ParaMEDMEMTest.hxx - -EXTRA_DIST += MPIMainTest.hxx ParaMEDMEMTest_NonCoincidentDEC.cxx - -dist_libParaMEDMEMTest_la_SOURCES = \ - ParaMEDMEMTest.cxx \ - ParaMEDMEMTest_MPIProcessorGroup.cxx \ - ParaMEDMEMTest_BlockTopology.cxx \ - ParaMEDMEMTest_InterpKernelDEC.cxx \ - ParaMEDMEMTest_StructuredCoincidentDEC.cxx \ - ParaMEDMEMTest_MEDLoader.cxx \ - ParaMEDMEMTest_ICocoTrio.cxx \ - ParaMEDMEMTest_Gauthier1.cxx \ - ParaMEDMEMTest_FabienAPI.cxx \ - MPIAccessDECTest.cxx \ - test_AllToAllDEC.cxx \ - test_AllToAllvDEC.cxx \ - test_AllToAllTimeDEC.cxx \ - test_AllToAllvTimeDEC.cxx \ - test_AllToAllvTimeDoubleDEC.cxx \ - MPIAccessTest.cxx \ - test_MPI_Access_Send_Recv.cxx \ - test_MPI_Access_Cyclic_Send_Recv.cxx \ - test_MPI_Access_SendRecv.cxx \ - test_MPI_Access_ISend_IRecv.cxx \ - test_MPI_Access_Cyclic_ISend_IRecv.cxx \ - test_MPI_Access_ISendRecv.cxx \ - test_MPI_Access_Probe.cxx \ - test_MPI_Access_IProbe.cxx \ - test_MPI_Access_Cancel.cxx \ - test_MPI_Access_Send_Recv_Length.cxx \ - test_MPI_Access_ISend_IRecv_Length.cxx \ - test_MPI_Access_ISend_IRecv_Length_1.cxx \ - test_MPI_Access_Time.cxx \ - test_MPI_Access_Time_0.cxx \ - test_MPI_Access_ISend_IRecv_BottleNeck.cxx - - -libParaMEDMEMTest_la_CPPFLAGS = \ - @CPPUNIT_INCLUDES@ \ - $(MPI_INCLUDES) \ - -I$(srcdir)/../INTERP_KERNEL \ - -I$(srcdir)/../INTERP_KERNEL/Bases \ - -I$(srcdir)/../INTERP_KERNEL/Geometric2D \ - -I$(srcdir)/../ParaMEDMEM \ - -I$(srcdir)/../MEDCoupling \ - -I$(srcdir)/../MEDLoader \ - -I$(srcdir)/../ParaMEDLoader - -libParaMEDMEMTest_la_LDFLAGS = \ - ../ParaMEDMEM/libparamedmem.la \ - ../ParaMEDLoader/libparamedloader.la \ - @CPPUNIT_LIBS@ $(MPI_LIBS) - -# Executables targets -bin_PROGRAMS = \ - TestParaMEDMEM \ - TestMPIAccessDEC \ - TestMPIAccess \ - test_perf - -dist_TestParaMEDMEM_SOURCES = TestParaMEDMEM.cxx -dist_TestMPIAccessDEC_SOURCES = TestMPIAccessDEC.cxx -dist_TestMPIAccess_SOURCES = TestMPIAccess.cxx -dist_test_perf_SOURCES = test_perf.cxx - -LDADD = $(MED2_LIBS) $(libMEDMEMTest_la_LDFLAGS) -lm $(MPI_LIBS) \ - libParaMEDMEMTest.la \ - ../INTERP_KERNEL/libinterpkernel.la - -if MED_ENABLE_FVM - LDADD += $(FVM_LIBS) - dist_libParaMEDMEMTest_la_SOURCES += ParaMEDMEMTest_NonCoincidentDEC.cxx - libParaMEDMEMTest_la_CPPFLAGS += -DMED_ENABLE_FVM $(FVM_INCLUDES) - libParaMEDMEMTest_la_LDFLAGS += $(FVM_LIBS) -endif - -AM_CPPFLAGS += $(libParaMEDMEMTest_la_CPPFLAGS) - -UNIT_TEST_PROG = TestParaMEDMEM diff --git a/src/ParaMEDMEMTest/ParaMEDMEMTest.cxx b/src/ParaMEDMEMTest/ParaMEDMEMTest.cxx deleted file mode 100644 index 50425fbc2..000000000 --- a/src/ParaMEDMEMTest/ParaMEDMEMTest.cxx +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "ParaMEDMEMTest.hxx" -#include - -#include -#include -#include -#include -#include - -//================================================================================ -/*! - * \brief Get path to the resources file. - * - * When running 'make test' source file is taken from MED_SRC/resources folder. - * Otherwise, file is searched in ${MED_ROOT_DIR}/share/salome/resources/med folder. - * - * \param filename name of the resource file (should not include a path) - * \return full path to the resource file - */ -//================================================================================ - -std::string ParaMEDMEMTest::getResourceFile( const std::string& filename ) -{ - std::string resourceFile = ""; - - if ( getenv("top_srcdir") ) { - // we are in 'make check' step - resourceFile = getenv("top_srcdir"); - resourceFile += "/resources/"; - } - else if ( getenv("MED_ROOT_DIR") ) { - // use MED_ROOT_DIR env.var - resourceFile = getenv("MED_ROOT_DIR"); - resourceFile += "/share/salome/resources/med/"; - } - resourceFile += filename; - return resourceFile; -} - - -//================================================================================ -/*! - * \brief Returns writable temporary directory - * \return full path to the temporary directory - */ -//================================================================================ - -std::string ParaMEDMEMTest::getTmpDirectory() -{ - std::string path; - - std::list dirs; - if ( getenv("TMP") ) dirs.push_back( getenv("TMP" )); - if ( getenv("TMPDIR") ) dirs.push_back( getenv("TMPDIR" )); - dirs.push_back( "/tmp" ); - - std::string tmpd = ""; - for ( std::list::iterator dir = dirs.begin(); dir != dirs.end() && tmpd == "" ; ++dir ) { - if ( access( dir->data(), W_OK ) == 0 ) { - tmpd = dir->data(); - } - } - - if ( tmpd == "" ) - throw std::runtime_error("Can't find writable temporary directory. Set TMP environment variable"); - - return tmpd; -} - -//================================================================================ -/*! - * \brief Creates a copy of source file (if source file is specified) - * in the temporary directory and returns a path to the tmp file - * - * \param tmpfile name of the temporary file (without path) - * \param srcfile source file - * \return path to the temporary file - */ -//================================================================================ -std::string ParaMEDMEMTest::makeTmpFile( const std::string& tmpfile, const std::string& srcfile ) -{ - std::string tmpf = getTmpDirectory() + "/" + tmpfile; - if ( srcfile != "" ) { - std::string cmd = "cp " + srcfile + " " + tmpf + " ; chmod +w " + tmpf; - system( cmd.c_str() ); - } - return tmpf; -} - - -/*! - * Tool to remove temporary files. - * Allows automatique removal of temporary files in case of test failure. - */ -ParaMEDMEMTest_TmpFilesRemover::~ParaMEDMEMTest_TmpFilesRemover() -{ - std::set::iterator it = myTmpFiles.begin(); - for (; it != myTmpFiles.end(); it++) { - if (access((*it).data(), F_OK) == 0) - remove((*it).data()); - } - myTmpFiles.clear(); - //cout << "~ParaMEDMEMTest_TmpFilesRemover()" << endl; -} - -bool ParaMEDMEMTest_TmpFilesRemover::Register(const std::string theTmpFile) -{ - return (myTmpFiles.insert(theTmpFile)).second; -} diff --git a/src/ParaMEDMEMTest/ParaMEDMEMTest.hxx b/src/ParaMEDMEMTest/ParaMEDMEMTest.hxx deleted file mode 100644 index da4e4873c..000000000 --- a/src/ParaMEDMEMTest/ParaMEDMEMTest.hxx +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _ParaMEDMEMTEST_HXX_ -#define _ParaMEDMEMTEST_HXX_ - -#include - -#include -#include -#include -#include "mpi.h" - - -class ParaMEDMEMTest : public CppUnit::TestFixture -{ - CPPUNIT_TEST_SUITE( ParaMEDMEMTest ); - CPPUNIT_TEST(testMPIProcessorGroup_constructor); - CPPUNIT_TEST(testMPIProcessorGroup_boolean); - CPPUNIT_TEST(testMPIProcessorGroup_rank); - CPPUNIT_TEST(testBlockTopology_constructor); - CPPUNIT_TEST(testBlockTopology_serialize); - CPPUNIT_TEST(testInterpKernelDEC_2D); - CPPUNIT_TEST(testInterpKernelDEC2_2D); - CPPUNIT_TEST(testInterpKernelDEC_2DP0P1); - CPPUNIT_TEST(testInterpKernelDEC_3D); - CPPUNIT_TEST(testInterpKernelDECNonOverlapp_2D_P0P0); - CPPUNIT_TEST(testInterpKernelDECNonOverlapp_2D_P0P1P1P0); - CPPUNIT_TEST(testInterpKernelDEC2DM1D_P0P0); - CPPUNIT_TEST(testInterpKernelDECPartialProcs); - - CPPUNIT_TEST(testSynchronousEqualInterpKernelWithoutInterpNativeDEC_2D); - CPPUNIT_TEST(testSynchronousEqualInterpKernelWithoutInterpDEC_2D); - CPPUNIT_TEST(testSynchronousEqualInterpKernelDEC_2D); - CPPUNIT_TEST(testSynchronousFasterSourceInterpKernelDEC_2D); - CPPUNIT_TEST(testSynchronousSlowerSourceInterpKernelDEC_2D); - CPPUNIT_TEST(testSynchronousSlowSourceInterpKernelDEC_2D); - CPPUNIT_TEST(testSynchronousFastSourceInterpKernelDEC_2D); - CPPUNIT_TEST(testAsynchronousEqualInterpKernelDEC_2D); - CPPUNIT_TEST(testAsynchronousFasterSourceInterpKernelDEC_2D); - CPPUNIT_TEST(testAsynchronousSlowerSourceInterpKernelDEC_2D); - CPPUNIT_TEST(testAsynchronousSlowSourceInterpKernelDEC_2D); - CPPUNIT_TEST(testAsynchronousFastSourceInterpKernelDEC_2D); -#ifdef MED_ENABLE_FVM - //can be added again after FVM correction for 2D - // CPPUNIT_TEST(testNonCoincidentDEC_2D); - CPPUNIT_TEST(testNonCoincidentDEC_3D); -#endif - CPPUNIT_TEST(testStructuredCoincidentDEC); - CPPUNIT_TEST(testStructuredCoincidentDEC); - CPPUNIT_TEST(testICocoTrio1); - CPPUNIT_TEST(testGauthier1); - CPPUNIT_TEST(testGauthier2); - CPPUNIT_TEST(testFabienAPI1); - CPPUNIT_TEST(testMEDLoaderRead1); - CPPUNIT_TEST(testMEDLoaderPolygonRead); - CPPUNIT_TEST(testMEDLoaderPolyhedronRead); - //CPPUNIT_TEST(testMEDLoaderWrite1); - //CPPUNIT_TEST(testMEDLoaderPolygonWrite); - CPPUNIT_TEST_SUITE_END(); - - -public: - - ParaMEDMEMTest():CppUnit::TestFixture(){} - ~ParaMEDMEMTest(){} - void setUp(){} - void tearDown(){} - void testMPIProcessorGroup_constructor(); - void testMPIProcessorGroup_boolean(); - void testMPIProcessorGroup_rank(); - void testBlockTopology_constructor(); - void testBlockTopology_serialize(); - void testInterpKernelDEC_2D(); - void testInterpKernelDEC2_2D(); - void testInterpKernelDEC_2DP0P1(); - void testInterpKernelDEC_3D(); - void testInterpKernelDECNonOverlapp_2D_P0P0(); - void testInterpKernelDECNonOverlapp_2D_P0P1P1P0(); - void testInterpKernelDEC2DM1D_P0P0(); - void testInterpKernelDECPartialProcs(); -#ifdef MED_ENABLE_FVM - void testNonCoincidentDEC_2D(); - void testNonCoincidentDEC_3D(); -#endif - void testStructuredCoincidentDEC(); - void testSynchronousEqualInterpKernelWithoutInterpNativeDEC_2D(); - void testSynchronousEqualInterpKernelWithoutInterpDEC_2D(); - void testSynchronousEqualInterpKernelDEC_2D(); - void testSynchronousFasterSourceInterpKernelDEC_2D(); - void testSynchronousSlowerSourceInterpKernelDEC_2D(); - void testSynchronousSlowSourceInterpKernelDEC_2D(); - void testSynchronousFastSourceInterpKernelDEC_2D(); - - void testAsynchronousEqualInterpKernelDEC_2D(); - void testAsynchronousFasterSourceInterpKernelDEC_2D(); - void testAsynchronousSlowerSourceInterpKernelDEC_2D(); - void testAsynchronousSlowSourceInterpKernelDEC_2D(); - void testAsynchronousFastSourceInterpKernelDEC_2D(); - // - void testICocoTrio1(); - void testGauthier1(); - void testGauthier2(); - void testFabienAPI1(); - // - void testMEDLoaderRead1(); - void testMEDLoaderPolygonRead(); - void testMEDLoaderPolyhedronRead(); - void testMEDLoaderWrite1(); - void testMEDLoaderPolygonWrite(); - - std::string getResourceFile( const std::string& ); - std::string getTmpDirectory(); - std::string makeTmpFile( const std::string&, const std::string& = "" ); - -private: - void testNonCoincidentDEC(const std::string& filename1, - const std::string& meshname1, - const std::string& filename2, - const std::string& meshname2, - int nbprocsource, double epsilon); - void testAsynchronousInterpKernelDEC_2D(double dtA, double tmaxA, - double dtB, double tmaxB, - bool WithPointToPoint, bool Asynchronous, bool WithInterp, const char *srcMeth, const char *targetMeth); - void testInterpKernelDEC_2D_(const char *srcMeth, const char *targetMeth); - void testInterpKernelDEC2_2D_(const char *srcMeth, const char *targetMeth); - void testInterpKernelDEC_3D_(const char *srcMeth, const char *targetMeth); -}; - -// to automatically remove temporary files from disk -class ParaMEDMEMTest_TmpFilesRemover -{ -public: - ParaMEDMEMTest_TmpFilesRemover() {} - ~ParaMEDMEMTest_TmpFilesRemover(); - bool Register(const std::string theTmpFile); - -private: - std::set myTmpFiles; -}; - -/*! - * Tool to print array to stream. - */ -template -void ParaMEDMEMTest_DumpArray (std::ostream & stream, const T* array, const int length, const std::string text) -{ - stream << text << ": {"; - if (length > 0) { - stream << array[0]; - for (int i = 1; i < length; i++) { - stream << ", " << array[i]; - } - } - stream << "}" << std::endl; -}; - -#endif diff --git a/src/ParaMEDMEMTest/ParaMEDMEMTest_FabienAPI.cxx b/src/ParaMEDMEMTest/ParaMEDMEMTest_FabienAPI.cxx deleted file mode 100644 index 92c33f5b3..000000000 --- a/src/ParaMEDMEMTest/ParaMEDMEMTest_FabienAPI.cxx +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "ParaMEDMEMTest.hxx" -#include "CommInterface.hxx" -#include "ProcessorGroup.hxx" -#include "MPIProcessorGroup.hxx" -#include "InterpKernelDEC.hxx" -#include "MEDCouplingUMesh.hxx" -#include "ParaMESH.hxx" -#include "ParaFIELD.hxx" -#include "ComponentTopology.hxx" - -#include - -using namespace ParaMEDMEM; - -void ParaMEDMEMTest::testFabienAPI1() -{ - int size; - int rank; - MPI_Comm_size(MPI_COMM_WORLD,&size); - MPI_Comm_rank(MPI_COMM_WORLD,&rank); - // - if(size!=3) - return ; - int procs_source[1]={0}; - int procs_target[1]={1}; - // - ParaMEDMEM::MEDCouplingUMesh *mesh=0; - ParaMEDMEM::ParaMESH *paramesh=0; - ParaMEDMEM::ParaFIELD *parafield=0; - // - ParaMEDMEM::CommInterface interface; - // - MPI_Barrier(MPI_COMM_WORLD); - double targetCoords[8]={ 0.,0., 1., 0., 0., 1., 1., 1. }; - CommInterface comm; - // - ParaMEDMEM::InterpKernelDEC *dec=new ParaMEDMEM::InterpKernelDEC(procs_source,procs_source+1,procs_target,procs_target+1); - if(dec->isInSourceSide()) - { - mesh=MEDCouplingUMesh::New(); - mesh->setMeshDimension(2); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(4,2); - std::copy(targetCoords,targetCoords+8,myCoords->getPointer()); - mesh->setCoords(myCoords); - myCoords->decrRef(); - int targetConn[4]={0,2,3,1}; - mesh->allocateCells(1); - mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn); - mesh->finishInsertingCells(); - ParaMEDMEM::ComponentTopology comptopo; - paramesh=new ParaMESH(mesh,*dec->getSourceGrp(),"source mesh"); - parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo); - parafield->getField()->setNature(ConservativeVolumic); - double *vals=parafield->getField()->getArray()->getPointer(); - vals[0]=7.; - } - if(dec->isInTargetSide()) - { - mesh=MEDCouplingUMesh::New(); - mesh->setMeshDimension(2); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(4,2); - std::copy(targetCoords,targetCoords+8,myCoords->getPointer()); - mesh->setCoords(myCoords); - myCoords->decrRef(); - int targetConn[6]={0,2,1,2,3,1}; - mesh->allocateCells(2); - mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn); - mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+3); - mesh->finishInsertingCells(); - ParaMEDMEM::ComponentTopology comptopo; - paramesh=new ParaMESH(mesh,*dec->getTargetGrp(),"target mesh"); - parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo); - parafield->getField()->setNature(ConservativeVolumic); - } - dec->attachLocalField(parafield); - dec->synchronize(); - dec->sendRecvData(); - if(dec->isInTargetSide()) - { - const double *valsToTest=parafield->getField()->getArray()->getConstPointer(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(valsToTest[0],7.,1e-14); - CPPUNIT_ASSERT_DOUBLES_EQUAL(valsToTest[1],7.,1e-14); - } - // - delete parafield; - delete paramesh; - if(mesh) - mesh->decrRef(); - delete dec; - MPI_Barrier(MPI_COMM_WORLD); -} diff --git a/src/ParaMEDMEMTest/ParaMEDMEMTest_Gauthier1.cxx b/src/ParaMEDMEMTest/ParaMEDMEMTest_Gauthier1.cxx deleted file mode 100644 index 099d30626..000000000 --- a/src/ParaMEDMEMTest/ParaMEDMEMTest_Gauthier1.cxx +++ /dev/null @@ -1,434 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "ParaMEDMEMTest.hxx" -#include - -#include -#include "CommInterface.hxx" -#include "ProcessorGroup.hxx" -#include "MPIProcessorGroup.hxx" -#include "DEC.hxx" -#include "InterpKernelDEC.hxx" -#include -#include -#include "ICoCoTrioField.hxx" -#include -#include -#include - -using namespace std; -using namespace ParaMEDMEM; -using namespace ICoCo; - -void afficheGauthier1( const TrioField& field, const double *vals, int lgth) -{ - CPPUNIT_ASSERT_EQUAL(lgth,field._nb_elems); - for (int ele=0;ele emetteur_ids; - set recepteur_ids; - emetteur_ids.insert(0); - if(size!=4) - return; - recepteur_ids.insert(1); - if (size >2) - recepteur_ids.insert(2); - if (size >2) - emetteur_ids.insert(3); - if ((rank==0)||(rank==1)) - is_master=1; - - MPIProcessorGroup recepteur_group(comm,recepteur_ids); - MPIProcessorGroup emetteur_group(comm,emetteur_ids); - - - string cas; - if (recepteur_group.containsMyRank()) - { - cas="recepteur"; - //freopen("recpeteur.out","w",stdout); - //freopen("recepteur.err","w",stderr); - - } - else - { - cas="emetteur"; - // freopen("emetteur.out","w",stdout); - //freopen("emetteur.err","w",stderr); - } - double expected[8][4]={ - {1.,1.,1.,1.}, - {40., 40., 1., 1.}, - {1.,1.,1e200,1e200}, - {40.,1.,1e200,1e200}, - {1.,1.,1.,1.}, - {40.,1.,1.,1.}, - {1.,1.,1e200,1e200}, - {20.5,1.,1e200,1e200} - }; - - int expectedLgth[8]={4,4,2,2,4,4,2,2}; - - for (int send=0;send<2;send++) - for (int rec=0;rec<2;rec++) - { - InterpKernelDEC dec_emetteur(emetteur_group, recepteur_group); - dec_emetteur.setOrientation(2); - TrioField champ_emetteur, champ_recepteur; - - if (send==0) - init_quadGauthier1(champ_emetteur,is_master); - else - init_triangleGauthier1(champ_emetteur,is_master); - if (rec==0) - init_triangleGauthier1(champ_recepteur,is_master); - else - init_quadGauthier1(champ_recepteur,is_master); - - if (cas=="emetteur") - { - champ_emetteur._field=new double[champ_emetteur._nb_elems]; - for (int ele=0;ele Genepi_ids; - set entree_chaude_ids; - Genepi_ids.insert(0); - for (int i=1;iP0 - vitesse._type=type; - } - - if (vitesse._type==1) - dec_vit_in_chaude.setMethod("P1"); - - - - dec_vit_in_chaude.attachLocalField((ICoCo::Field*) &vitesse); - - dec_vit_in_chaude.synchronize(); - - - // Envois - receptions - if (entree_chaude_group.containsMyRank()) - { - dec_vit_in_chaude.sendData(); - } - else - { - dec_vit_in_chaude.recvData(); - } - if (entree_chaude_group.containsMyRank() ) - { - if (1) - { - ostringstream save_vit(save_vit_in_2); - vitesse.save(save_vit); - } - } - else - { - - double pmin=1e38, pmax=-1e38; - - for(int i=0;ipmax) pmax=p; - } - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected1[type],pmin,1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[type],pmax,1e-12); - - ostringstream save_vit(save_vit_outs[type]); - vitesse.save(save_vit); - - for(int i=0;i -#include "CommInterface.hxx" -#include "ProcessorGroup.hxx" -#include "MPIProcessorGroup.hxx" -#include "DEC.hxx" -#include "InterpKernelDEC.hxx" -#include -#include -#include "ICoCoTrioField.hxx" -#include -#include - -using namespace std; -using namespace ParaMEDMEM; -using namespace ICoCo; - -typedef enum {sync_and,sync_or} synctype; -void synchronize_bool(bool& stop, synctype s) -{ - int my_stop; - int my_stop_temp = stop?1:0; - if (s==sync_and) - MPI_Allreduce(&my_stop_temp,&my_stop,1,MPI_INTEGER,MPI_MIN,MPI_COMM_WORLD); - else if (s==sync_or) - MPI_Allreduce(&my_stop_temp,&my_stop,1,MPI_INTEGER,MPI_MAX,MPI_COMM_WORLD); - stop =(my_stop==1); -} - -void synchronize_dt(double& dt) -{ - double dttemp=dt; - MPI_Allreduce(&dttemp,&dt,1,MPI_DOUBLE,MPI_MIN,MPI_COMM_WORLD); -} - - -void affiche( const TrioField& field) -{ - cout < emetteur_ids; - set recepteur_ids; - emetteur_ids.insert(0); - recepteur_ids.insert(1); - - MPIProcessorGroup recepteur_group(comm,recepteur_ids); - MPIProcessorGroup emetteur_group(comm,emetteur_ids); - - - string cas; - if (recepteur_group.containsMyRank()) - { - cas="recepteur"; - - } - else - cas="emetteur"; - - InterpKernelDEC dec_emetteur(emetteur_group, recepteur_group); - - TrioField champ_emetteur, champ_recepteur; - - init_triangle(champ_emetteur); - //init_triangle(champ_emetteur); - init_quad(champ_recepteur); - //init_emetteur(champ_recepteur); - - if (cas=="emetteur") - { - champ_emetteur._field=new double[champ_emetteur._nb_elems]; - for (int ele=0;ele - -#include "CommInterface.hxx" -#include "ProcessorGroup.hxx" -#include "MPIProcessorGroup.hxx" -#include "Topology.hxx" -#include "DEC.hxx" -#include "MxN_Mapping.hxx" -#include "InterpKernelDEC.hxx" -#include "ParaMESH.hxx" -#include "ParaFIELD.hxx" -#include "ComponentTopology.hxx" -#include "ICoCoMEDField.hxx" -#include "ParaMEDLoader.hxx" -#include "MEDLoader.hxx" - - -#include -#include - -// use this define to enable lines, execution of which leads to Segmentation Fault -#define ENABLE_FAULTS - -// use this define to enable CPPUNIT asserts and fails, showing bugs -#define ENABLE_FORCED_FAILURES - - -using namespace std; -using namespace ParaMEDMEM; - -void ParaMEDMEMTest::testInterpKernelDEC_2D() -{ - testInterpKernelDEC_2D_("P0","P0"); -} - -void ParaMEDMEMTest::testInterpKernelDEC2_2D() -{ - testInterpKernelDEC2_2D_("P0","P0"); -} - -void ParaMEDMEMTest::testInterpKernelDEC_3D() -{ - testInterpKernelDEC_3D_("P0","P0"); -} - -void ParaMEDMEMTest::testInterpKernelDEC_2DP0P1() -{ - //testInterpKernelDEC_2D_("P0","P1"); -} - -/* - * Check methods defined in InterpKernelDEC.hxx - * - InterpKernelDEC(); - InterpKernelDEC(ProcessorGroup& local_group, ProcessorGroup& distant_group); - virtual ~InterpKernelDEC(); - void synchronize(); - void recvData(); - void sendData(); -*/ - -void ParaMEDMEMTest::testInterpKernelDEC_2D_(const char *srcMeth, const char *targetMeth) -{ - std::string srcM(srcMeth); - std::string targetM(targetMeth); - int size; - int rank; - MPI_Comm_size(MPI_COMM_WORLD,&size); - MPI_Comm_rank(MPI_COMM_WORLD,&rank); - - //the test is meant to run on five processors - if (size !=5) return ; - - int nproc_source = 3; - set self_procs; - set procs_source; - set procs_target; - - for (int i=0; icontainsMyRank()) - { - string master = filename_xml1; - - ostringstream strstream; - strstream <getField()->setNature(ConservativeVolumic); - } - else - parafield = new ParaFIELD(ON_NODES,NO_TIME,paramesh, comptopo); - int nb_local; - if(srcM=="P0") - nb_local=mesh->getNumberOfCells(); - else - nb_local=mesh->getNumberOfNodes(); - // double * value= new double[nb_local]; - double *value=parafield->getField()->getArray()->getPointer(); - for(int ielem=0; ielemgetCellMesh(),parafield->getField()); - dec.setMethod(srcMeth); - dec.attachLocalField(icocofield); - } - - //loading the geometry for the target group - if (target_group->containsMyRank()) - { - string master= filename_xml2; - ostringstream strstream; - strstream << master<<(rank-nproc_source+1)<<".med"; - ostringstream meshname ; - meshname<< "Mesh_3_"<getField()->setNature(ConservativeVolumic); - } - else - parafield = new ParaFIELD(ON_NODES,NO_TIME,paramesh, comptopo); - int nb_local; - if(targetM=="P0") - nb_local=mesh->getNumberOfCells(); - else - nb_local=mesh->getNumberOfNodes(); - // double * value= new double[nb_local]; - double *value=parafield->getField()->getArray()->getPointer(); - for(int ielem=0; ielemgetCellMesh(),parafield->getField()); - dec.setMethod(targetMeth); - dec.attachLocalField(icocofield); - } - - - //attaching a DEC to the source group - double field_before_int; - double field_after_int; - - if (source_group->containsMyRank()) - { - field_before_int = parafield->getVolumeIntegral(0,true); - dec.synchronize(); - cout<<"DEC usage"<myRank()==0) - aRemover.Register("./sourcesquareb"); - ostringstream filename; - filename<<"./sourcesquareb_"<myRank()+1; - aRemover.Register(filename.str().c_str()); - //MEDLoader::WriteField("./sourcesquareb",parafield->getField()); - - dec.recvData(); - cout <<"writing"<myRank()==0) - aRemover.Register("./sourcesquare"); - //MEDLoader::WriteField("./sourcesquare",parafield->getField()); - - - filename<<"./sourcesquare_"<myRank()+1; - aRemover.Register(filename.str().c_str()); - field_after_int = parafield->getVolumeIntegral(0,true); - - - // MPI_Bcast(&field_before_int,1,MPI_DOUBLE,0,MPI_COMM_WORLD); - // MPI_Bcast(&field_after_int,1,MPI_DOUBLE,0,MPI_COMM_WORLD); - - CPPUNIT_ASSERT_DOUBLES_EQUAL(field_before_int, field_after_int, 1e-6); - - } - - //attaching a DEC to the target group - if (target_group->containsMyRank()) - { - dec.synchronize(); - dec.setForcedRenormalization(false); - - dec.recvData(); - ParaMEDLoader::WriteParaMesh("./targetsquareb",paramesh); - //MEDLoader::WriteField("./targetsquareb",parafield->getField()); - if (target_group->myRank()==0) - aRemover.Register("./targetsquareb"); - ostringstream filename; - filename<<"./targetsquareb_"<myRank()+1; - aRemover.Register(filename.str().c_str()); - dec.sendData(); - ParaMEDLoader::WriteParaMesh("./targetsquare",paramesh); - //MEDLoader::WriteField("./targetsquare",parafield->getField()); - - if (target_group->myRank()==0) - aRemover.Register("./targetsquareb"); - - filename<<"./targetsquareb_"<myRank()+1; - aRemover.Register(filename.str().c_str()); - // double field_before_int, field_after_int; - // MPI_Bcast(&field_before_int,1,MPI_DOUBLE,0,MPI_COMM_WORLD); - // MPI_Bcast(&field_after_int,1,MPI_DOUBLE,0,MPI_COMM_WORLD); - - // CPPUNIT_ASSERT_DOUBLES_EQUAL(field_before_int, field_after_int, 1e-6); - - } - - delete source_group; - delete target_group; - delete self_group; - delete parafield; - delete paramesh; - mesh->decrRef(); - - delete icocofield; - - MPI_Barrier(MPI_COMM_WORLD); - cout << "end of InterpKernelDEC_2D test"< self_procs; - set procs_source; - set procs_target; - - for (int i=0; icontainsMyRank()) - { - string master = filename_xml1; - - ostringstream strstream; - strstream <setMesh(mesh); - DataArrayDouble *array=DataArrayDouble::New(); - array->alloc(mcfield->getNumberOfTuples(),1); - mcfield->setArray(array); - array->decrRef(); - mcfield->setNature(ConservativeVolumic); - } - else - { - mcfield = MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME); - mcfield->setMesh(mesh); - DataArrayDouble *array=DataArrayDouble::New(); - array->alloc(mcfield->getNumberOfTuples(),1); - mcfield->setArray(array); - array->decrRef(); - } - int nb_local; - if(srcM=="P0") - nb_local=mesh->getNumberOfCells(); - else - nb_local=mesh->getNumberOfNodes(); - double *value=mcfield->getArray()->getPointer(); - for(int ielem=0; ielemcontainsMyRank()) - { - string master= filename_xml2; - ostringstream strstream; - strstream << master<<(rank-nproc_source+1)<<".med"; - ostringstream meshname ; - meshname<< "Mesh_3_"<setMesh(mesh); - DataArrayDouble *array=DataArrayDouble::New(); - array->alloc(mcfield->getNumberOfTuples(),1); - mcfield->setArray(array); - array->decrRef(); - mcfield->setNature(ConservativeVolumic); - } - else - { - mcfield = MEDCouplingFieldDouble::New(ON_NODES,NO_TIME); - mcfield->setMesh(mesh); - DataArrayDouble *array=DataArrayDouble::New(); - array->alloc(mcfield->getNumberOfTuples(),1); - mcfield->setArray(array); - array->decrRef(); - } - int nb_local; - if(targetM=="P0") - nb_local=mesh->getNumberOfCells(); - else - nb_local=mesh->getNumberOfNodes(); - double *value=mcfield->getArray()->getPointer(); - for(int ielem=0; ielemcontainsMyRank()) - { - dec.synchronize(); - dec.setForcedRenormalization(false); - dec.sendData(); - dec.recvData(); - } - - //attaching a DEC to the target group - if (target_group->containsMyRank()) - { - dec.synchronize(); - dec.setForcedRenormalization(false); - dec.recvData(); - dec.sendData(); - } - delete source_group; - delete target_group; - delete self_group; - mcfield->decrRef(); - mesh->decrRef(); - - MPI_Barrier(MPI_COMM_WORLD); - cout << "end of InterpKernelDEC2_2D test"< self_procs; - set procs_source; - set procs_target; - - for (int i=0; icontainsMyRank()) - { - string master = filename_xml1; - - ostringstream strstream; - strstream <getField()->setNature(ConservativeVolumic); - } - else - parafield = new ParaFIELD(ON_NODES,NO_TIME,paramesh, comptopo); - int nb_local; - if(srcM=="P0") - nb_local=mesh->getNumberOfCells(); - else - nb_local=mesh->getNumberOfNodes(); - // double * value= new double[nb_local]; - double *value=parafield->getField()->getArray()->getPointer(); - for(int ielem=0; ielemgetCellMesh(),parafield->getField()); - dec.setMethod(srcMeth); - dec.attachLocalField(icocofield); - } - - //loading the geometry for the target group - if (target_group->containsMyRank()) - { - string master= filename_xml2; - ostringstream strstream; - strstream << master << ".med"; - ostringstream meshname ; - meshname<< "Mesh_6"; - mesh = MEDLoader::ReadUMeshFromFile(strstream.str().c_str(),meshname.str().c_str(),0); - - paramesh=new ParaMESH (mesh,*target_group,"target mesh"); - // ParaMEDMEM::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT(support,*target_group); - ParaMEDMEM::ComponentTopology comptopo; - if(targetM=="P0") - { - parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo); - parafield->getField()->setNature(ConservativeVolumic); - } - else - parafield = new ParaFIELD(ON_NODES,NO_TIME,paramesh, comptopo); - int nb_local; - if(targetM=="P0") - nb_local=mesh->getNumberOfCells(); - else - nb_local=mesh->getNumberOfNodes(); - // double * value= new double[nb_local]; - double *value=parafield->getField()->getArray()->getPointer(); - for(int ielem=0; ielemgetCellMesh(),parafield->getField()); - dec.setMethod(targetMeth); - dec.attachLocalField(icocofield); - } - //attaching a DEC to the source group - double field_before_int; - double field_after_int; - - if (source_group->containsMyRank()) - { - field_before_int = parafield->getVolumeIntegral(0,true); - dec.synchronize(); - cout<<"DEC usage"<myRank()==0) - aRemover.Register("./sourcesquareb"); - ostringstream filename; - filename<<"./sourcesquareb_"<myRank()+1; - aRemover.Register(filename.str().c_str()); - //MEDLoader::WriteField("./sourcesquareb",parafield->getField()); - - dec.recvData(); - cout <<"writing"<myRank()==0) - aRemover.Register("./sourcesquare"); - //MEDLoader::WriteField("./sourcesquare",parafield->getField()); - - - filename<<"./sourcesquare_"<myRank()+1; - aRemover.Register(filename.str().c_str()); - field_after_int = parafield->getVolumeIntegral(0,true); - - CPPUNIT_ASSERT_DOUBLES_EQUAL(field_before_int, field_after_int, 1e-6); - - } - - //attaching a DEC to the target group - if (target_group->containsMyRank()) - { - dec.synchronize(); - dec.setForcedRenormalization(false); - - dec.recvData(); - ParaMEDLoader::WriteParaMesh("./targetsquareb",paramesh); - //MEDLoader::WriteField("./targetsquareb",parafield->getField()); - if (target_group->myRank()==0) - aRemover.Register("./targetsquareb"); - ostringstream filename; - filename<<"./targetsquareb_"<myRank()+1; - aRemover.Register(filename.str().c_str()); - dec.sendData(); - ParaMEDLoader::WriteParaMesh("./targetsquare",paramesh); - //MEDLoader::WriteField("./targetsquare",parafield->getField()); - - if (target_group->myRank()==0) - aRemover.Register("./targetsquareb"); - - filename<<"./targetsquareb_"<myRank()+1; - aRemover.Register(filename.str().c_str()); - } - delete source_group; - delete target_group; - delete self_group; - delete parafield; - delete paramesh; - mesh->decrRef(); - - delete icocofield; - - MPI_Barrier(MPI_COMM_WORLD); - cout << "end of InterpKernelDEC_3D test"< self_procs; - set procs_source; - set procs_target; - - for (int i=0; icontainsMyRank()) - { - std::ostringstream stream; stream << "sourcemesh2D proc " << rank; - mesh=MEDCouplingUMesh::New(stream.str().c_str(),2); - mesh->allocateCells(2); - mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn4All); - mesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(4,2); - const double *sourceCoords=sourceCoordsAll[rank]; - std::copy(sourceCoords,sourceCoords+8,myCoords->getPointer()); - mesh->setCoords(myCoords); - myCoords->decrRef(); - paramesh=new ParaMESH(mesh,*source_group,"source mesh"); - ParaMEDMEM::ComponentTopology comptopo; - parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo); - double *value=parafield->getField()->getArray()->getPointer(); - value[0]=34+13*((double)rank); - } - else - { - std::ostringstream stream; stream << "targetmesh2D proc " << rank-nproc_source; - mesh=MEDCouplingUMesh::New(stream.str().c_str(),2); - mesh->allocateCells(2); - mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn4All); - mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn4All+4); - mesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(8,2); - const double *targetCoords=targetCoordsAll[rank-nproc_source]; - std::copy(targetCoords,targetCoords+16,myCoords->getPointer()); - mesh->setCoords(myCoords); - myCoords->decrRef(); - paramesh=new ParaMESH (mesh,*target_group,"target mesh"); - ParaMEDMEM::ComponentTopology comptopo; - parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo); - } - //test 1 - Conservative volumic - ParaMEDMEM::InterpKernelDEC dec(*source_group,*target_group); - parafield->getField()->setNature(ConservativeVolumic); - if (source_group->containsMyRank()) - { - dec.setMethod("P0"); - dec.attachLocalField(parafield); - dec.synchronize(); - dec.setForcedRenormalization(false); - dec.sendData(); - } - else - { - dec.setMethod("P0"); - dec.attachLocalField(parafield); - dec.synchronize(); - dec.setForcedRenormalization(false); - dec.recvData(); - const double *res=parafield->getField()->getArray()->getConstPointer(); - const double *expected=targetResults[rank-nproc_source]; - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[0],res[0],1e-13); - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[1],res[1],1e-13); - } - //test 2 - Integral - ParaMEDMEM::InterpKernelDEC dec2(*source_group,*target_group); - parafield->getField()->setNature(Integral); - if (source_group->containsMyRank()) - { - dec2.setMethod("P0"); - dec2.attachLocalField(parafield); - dec2.synchronize(); - dec2.setForcedRenormalization(false); - dec2.sendData(); - } - else - { - dec2.setMethod("P0"); - dec2.attachLocalField(parafield); - dec2.synchronize(); - dec2.setForcedRenormalization(false); - dec2.recvData(); - const double *res=parafield->getField()->getArray()->getConstPointer(); - const double *expected=targetResults2[rank-nproc_source]; - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[0],res[0],1e-13); - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[1],res[1],1e-13); - } - //test 3 - Integral with global constraint - ParaMEDMEM::InterpKernelDEC dec3(*source_group,*target_group); - parafield->getField()->setNature(IntegralGlobConstraint); - if (source_group->containsMyRank()) - { - dec3.setMethod("P0"); - dec3.attachLocalField(parafield); - dec3.synchronize(); - dec3.setForcedRenormalization(false); - dec3.sendData(); - } - else - { - dec3.setMethod("P0"); - dec3.attachLocalField(parafield); - dec3.synchronize(); - dec3.setForcedRenormalization(false); - dec3.recvData(); - const double *res=parafield->getField()->getArray()->getConstPointer(); - const double *expected=targetResults3[rank-nproc_source]; - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[0],res[0],1e-13); - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[1],res[1],1e-13); - } - //test 4 - RevIntegral - ParaMEDMEM::InterpKernelDEC dec4(*source_group,*target_group); - parafield->getField()->setNature(RevIntegral); - if (source_group->containsMyRank()) - { - dec4.setMethod("P0"); - dec4.attachLocalField(parafield); - dec4.synchronize(); - dec4.setForcedRenormalization(false); - dec4.sendData(); - } - else - { - dec4.setMethod("P0"); - dec4.attachLocalField(parafield); - dec4.synchronize(); - dec4.setForcedRenormalization(false); - dec4.recvData(); - const double *res=parafield->getField()->getArray()->getConstPointer(); - const double *expected=targetResults4[rank-nproc_source]; - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[0],res[0],1e-13); - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[1],res[1],1e-13); - } - //test 5 - Conservative volumic reversed - ParaMEDMEM::InterpKernelDEC dec5(*source_group,*target_group); - parafield->getField()->setNature(ConservativeVolumic); - if (source_group->containsMyRank()) - { - dec5.setMethod("P0"); - dec5.attachLocalField(parafield); - dec5.synchronize(); - dec5.setForcedRenormalization(false); - dec5.recvData(); - const double *res=parafield->getField()->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(1,parafield->getField()->getNumberOfTuples()); - const double expected[]={37.8518518518519,43.5333333333333}; - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[rank],res[0],1e-13); - } - else - { - dec5.setMethod("P0"); - dec5.attachLocalField(parafield); - dec5.synchronize(); - dec5.setForcedRenormalization(false); - double *res=parafield->getField()->getArray()->getPointer(); - const double *toSet=targetResults[rank-nproc_source]; - res[0]=toSet[0]; - res[1]=toSet[1]; - dec5.sendData(); - } - //test 6 - Integral reversed - ParaMEDMEM::InterpKernelDEC dec6(*source_group,*target_group); - parafield->getField()->setNature(Integral); - if (source_group->containsMyRank()) - { - dec6.setMethod("P0"); - dec6.attachLocalField(parafield); - dec6.synchronize(); - dec6.setForcedRenormalization(false); - dec6.recvData(); - const double *res=parafield->getField()->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(1,parafield->getField()->getNumberOfTuples()); - const double expected[]={0.794600591715977,1.35631163708087}; - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[rank],res[0],1e-13); - } - else - { - dec6.setMethod("P0"); - dec6.attachLocalField(parafield); - dec6.synchronize(); - dec6.setForcedRenormalization(false); - double *res=parafield->getField()->getArray()->getPointer(); - const double *toSet=targetResults2[rank-nproc_source]; - res[0]=toSet[0]; - res[1]=toSet[1]; - dec6.sendData(); - } - //test 7 - Integral with global constraint reversed - ParaMEDMEM::InterpKernelDEC dec7(*source_group,*target_group); - parafield->getField()->setNature(IntegralGlobConstraint); - if (source_group->containsMyRank()) - { - dec7.setMethod("P0"); - dec7.attachLocalField(parafield); - dec7.synchronize(); - dec7.setForcedRenormalization(false); - dec7.recvData(); - const double *res=parafield->getField()->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(1,parafield->getField()->getNumberOfTuples()); - const double expected[]={36.4592592592593,44.5407407407407}; - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[rank],res[0],1e-13); - } - else - { - dec7.setMethod("P0"); - dec7.attachLocalField(parafield); - dec7.synchronize(); - dec7.setForcedRenormalization(false); - double *res=parafield->getField()->getArray()->getPointer(); - const double *toSet=targetResults3[rank-nproc_source]; - res[0]=toSet[0]; - res[1]=toSet[1]; - dec7.sendData(); - } - //test 8 - Integral with RevIntegral reversed - ParaMEDMEM::InterpKernelDEC dec8(*source_group,*target_group); - parafield->getField()->setNature(RevIntegral); - if (source_group->containsMyRank()) - { - dec8.setMethod("P0"); - dec8.attachLocalField(parafield); - dec8.synchronize(); - dec8.setForcedRenormalization(false); - dec8.recvData(); - const double *res=parafield->getField()->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(1,parafield->getField()->getNumberOfTuples()); - const double expected[]={0.81314102564102553,1.3428994082840233}; - CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[rank],res[0],1e-13); - } - else - { - dec8.setMethod("P0"); - dec8.attachLocalField(parafield); - dec8.synchronize(); - dec8.setForcedRenormalization(false); - double *res=parafield->getField()->getArray()->getPointer(); - const double *toSet=targetResults4[rank-nproc_source]; - res[0]=toSet[0]; - res[1]=toSet[1]; - dec8.sendData(); - } - // - delete parafield; - mesh->decrRef(); - delete paramesh; - delete self_group; - delete target_group; - delete source_group; - // - MPI_Barrier(MPI_COMM_WORLD); -} - -void ParaMEDMEMTest::testInterpKernelDECNonOverlapp_2D_P0P1P1P0() -{ - int size; - int rank; - MPI_Comm_size(MPI_COMM_WORLD,&size); - MPI_Comm_rank(MPI_COMM_WORLD,&rank); - // - if(size!=5) - return ; - int nproc_source = 2; - set self_procs; - set procs_source; - set procs_target; - - for (int i=0; icontainsMyRank()) - { - if(rank==0) - { - double coords[6]={-0.3,-0.3, 0.7,0.7, 0.7,-0.3}; - int conn[3]={0,1,2}; - //int globalNode[3]={1,2,0}; - mesh=MEDCouplingUMesh::New("Source mesh Proc0",2); - mesh->allocateCells(1); - mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,conn); - mesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(3,2); - std::copy(coords,coords+6,myCoords->getPointer()); - mesh->setCoords(myCoords); - myCoords->decrRef(); - } - if(rank==1) - { - double coords[6]={-0.3,-0.3, -0.3,0.7, 0.7,0.7}; - int conn[3]={0,1,2}; - //int globalNode[3]={1,3,2}; - mesh=MEDCouplingUMesh::New("Source mesh Proc1",2); - mesh->allocateCells(1); - mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,conn); - mesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(3,2); - std::copy(coords,coords+6,myCoords->getPointer()); - mesh->setCoords(myCoords); - myCoords->decrRef(); - } - paramesh=new ParaMESH(mesh,*source_group,"source mesh"); - ParaMEDMEM::ComponentTopology comptopo; - parafieldP0 = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo); - parafieldP1 = new ParaFIELD(ON_NODES,NO_TIME,paramesh, comptopo); - double *valueP0=parafieldP0->getField()->getArray()->getPointer(); - double *valueP1=parafieldP1->getField()->getArray()->getPointer(); - parafieldP0->getField()->setNature(ConservativeVolumic); - parafieldP1->getField()->setNature(ConservativeVolumic); - if(rank==0) - { - valueP0[0]=31.; - valueP1[0]=34.; valueP1[1]=77.; valueP1[2]=53.; - } - if(rank==1) - { - valueP0[0]=47.; - valueP1[0]=34.; valueP1[1]=57.; valueP1[2]=77.; - } - } - else - { - const char targetMeshName[]="target mesh"; - if(rank==2) - { - double coords[10]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2 }; - int conn[7]={0,3,4,1, 1,4,2}; - //int globalNode[5]={4,3,0,2,1}; - mesh=MEDCouplingUMesh::New("Target mesh Proc2",2); - mesh->allocateCells(2); - mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn); - mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,conn+4); - mesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(5,2); - std::copy(coords,coords+10,myCoords->getPointer()); - mesh->setCoords(myCoords); - myCoords->decrRef(); - paramesh=new ParaMESH(mesh,*target_group,targetMeshName); - DataArrayInt *da=DataArrayInt::New(); - const int globalNumberingP2[5]={0,1,2,3,4}; - da->useArray(globalNumberingP2,false,CPP_DEALLOC,5,1); - paramesh->setNodeGlobal(da); - da->decrRef(); - } - if(rank==3) - { - double coords[6]={0.2,0.2, 0.7,-0.3, 0.7,0.2}; - int conn[3]={0,2,1}; - //int globalNode[3]={1,0,5}; - mesh=MEDCouplingUMesh::New("Target mesh Proc3",2); - mesh->allocateCells(1); - mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,conn); - mesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(3,2); - std::copy(coords,coords+6,myCoords->getPointer()); - mesh->setCoords(myCoords); - myCoords->decrRef(); - paramesh=new ParaMESH(mesh,*target_group,targetMeshName); - DataArrayInt *da=DataArrayInt::New(); - const int globalNumberingP3[3]={4,2,5}; - da->useArray(globalNumberingP3,false,CPP_DEALLOC,3,1); - paramesh->setNodeGlobal(da); - da->decrRef(); - } - if(rank==4) - { - double coords[12]={-0.3,0.2, -0.3,0.7, 0.2,0.7, 0.2,0.2, 0.7,0.7, 0.7,0.2}; - int conn[8]={0,1,2,3, 3,2,4,5}; - //int globalNode[6]={2,6,7,1,8,5}; - mesh=MEDCouplingUMesh::New("Target mesh Proc4",2); - mesh->allocateCells(2); - mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn); - mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn+4); - mesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(6,2); - std::copy(coords,coords+12,myCoords->getPointer()); - mesh->setCoords(myCoords); - myCoords->decrRef(); - paramesh=new ParaMESH(mesh,*target_group,targetMeshName); - DataArrayInt *da=DataArrayInt::New(); - const int globalNumberingP4[6]={3,6,7,4,8,5}; - da->useArray(globalNumberingP4,false,CPP_DEALLOC,6,1); - paramesh->setNodeGlobal(da); - da->decrRef(); - } - ParaMEDMEM::ComponentTopology comptopo; - parafieldP0 = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo); - parafieldP1 = new ParaFIELD(ON_NODES,NO_TIME,paramesh, comptopo); - parafieldP0->getField()->setNature(ConservativeVolumic); - parafieldP1->getField()->setNature(ConservativeVolumic); - } - // test 1 - P0 P1 - ParaMEDMEM::InterpKernelDEC dec(*source_group,*target_group); - if (source_group->containsMyRank()) - { - dec.setMethod("P0"); - dec.attachLocalField(parafieldP0); - dec.synchronize(); - dec.setForcedRenormalization(false); - dec.sendData(); - dec.recvData(); - const double *valueP0=parafieldP0->getField()->getArray()->getPointer(); - if(rank==0) - { - CPPUNIT_ASSERT_DOUBLES_EQUAL(34.42857143,valueP0[0],1e-7); - } - if(rank==1) - { - CPPUNIT_ASSERT_DOUBLES_EQUAL(44.,valueP0[0],1e-7); - } - } - else - { - dec.setMethod("P1"); - dec.attachLocalField(parafieldP1); - dec.synchronize(); - dec.setForcedRenormalization(false); - dec.recvData(); - const double *res=parafieldP1->getField()->getArray()->getConstPointer(); - if(rank==2) - { - const double expectP2[5]={39.0, 31.0, 31.0, 47.0, 39.0}; - CPPUNIT_ASSERT_EQUAL(5,parafieldP1->getField()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,parafieldP1->getField()->getNumberOfComponents()); - for(int kk=0;kk<5;kk++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(expectP2[kk],res[kk],1e-12); - } - if(rank==3) - { - const double expectP3[3]={39.0, 31.0, 31.0}; - CPPUNIT_ASSERT_EQUAL(3,parafieldP1->getField()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,parafieldP1->getField()->getNumberOfComponents()); - for(int kk=0;kk<3;kk++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(expectP3[kk],res[kk],1e-12); - } - if(rank==4) - { - const double expectP4[6]={47.0, 47.0, 47.0, 39.0, 39.0, 31.0}; - CPPUNIT_ASSERT_EQUAL(6,parafieldP1->getField()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,parafieldP1->getField()->getNumberOfComponents()); - for(int kk=0;kk<6;kk++) - CPPUNIT_ASSERT_DOUBLES_EQUAL(expectP4[kk],res[kk],1e-12); - } - dec.sendData(); - } - // - delete parafieldP0; - delete parafieldP1; - mesh->decrRef(); - delete paramesh; - delete self_group; - delete target_group; - delete source_group; - // - MPI_Barrier(MPI_COMM_WORLD); -} - -void ParaMEDMEMTest::testInterpKernelDEC2DM1D_P0P0() -{ - int size; - int rank; - MPI_Comm_size(MPI_COMM_WORLD,&size); - MPI_Comm_rank(MPI_COMM_WORLD,&rank); - // - if(size!=3) - return ; - int nproc_source=2; - set procs_source; - set procs_target; - // - for (int i=0; icontainsMyRank()) - { - double targetCoords[18]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7 }; - mesh=MEDCouplingUMesh::New(); - mesh->setMeshDimension(2); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(9,2); - std::copy(targetCoords,targetCoords+18,myCoords->getPointer()); - mesh->setCoords(myCoords); - myCoords->decrRef(); - if(rank==0) - { - int targetConn[7]={0,3,4,1, 1,4,2}; - mesh->allocateCells(2); - mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn); - mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+4); - mesh->finishInsertingCells(); - } - else - { - int targetConn[11]={4,5,2, 6,7,4,3, 7,8,5,4}; - mesh->allocateCells(3); - mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn); - mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+3); - mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+7); - mesh->finishInsertingCells(); - } - ParaMEDMEM::ComponentTopology comptopo; - paramesh=new ParaMESH(mesh,*source_group,"source mesh"); - parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo); - parafield->getField()->setNature(ConservativeVolumic); - double *vals=parafield->getField()->getArray()->getPointer(); - if(rank==0) - { vals[0]=7.; vals[1]=8.; } - else - { vals[0]=9.; vals[1]=10.; vals[2]=11.; } - } - else - { - mesh=MEDCouplingUMesh::New("an example of -1 D mesh",-1); - ParaMEDMEM::ComponentTopology comptopo; - paramesh=new ParaMESH(mesh,*target_group,"target mesh"); - parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo); - parafield->getField()->setNature(ConservativeVolumic); - } - ParaMEDMEM::InterpKernelDEC dec(*source_group,*target_group); - if(source_group->containsMyRank()) - { - dec.setMethod("P0"); - dec.attachLocalField(parafield); - dec.synchronize(); - dec.setForcedRenormalization(false); - dec.sendData(); - dec.recvData(); - const double *res=parafield->getField()->getArray()->getConstPointer(); - if(rank==0) - { - CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,res[0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,res[1],1e-12); - } - else - { - CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,res[0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,res[1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,res[2],1e-12); - } - } - else - { - dec.setMethod("P0"); - dec.attachLocalField(parafield); - dec.synchronize(); - dec.setForcedRenormalization(false); - dec.recvData(); - const double *res=parafield->getField()->getArray()->getConstPointer(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,res[0],1e-12); - dec.sendData(); - } - ParaMEDMEM::InterpKernelDEC dec2(*source_group,*target_group); - dec2.setMethod("P0"); - parafield->getField()->setNature(IntegralGlobConstraint); - if(source_group->containsMyRank()) - { - double *vals=parafield->getField()->getArray()->getPointer(); - if(rank==0) - { vals[0]=7.; vals[1]=8.; } - else - { vals[0]=9.; vals[1]=10.; vals[2]=11.; } - dec2.attachLocalField(parafield); - dec2.synchronize(); - dec2.sendData(); - dec2.recvData(); - const double *res=parafield->getField()->getArray()->getConstPointer(); - if(rank==0) - { - CPPUNIT_ASSERT_DOUBLES_EQUAL(11.25,res[0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(5.625,res[1],1e-12); - } - else - { - CPPUNIT_ASSERT_DOUBLES_EQUAL(5.625,res[0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(11.25,res[1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(11.25,res[2],1e-12); - } - } - else - { - dec2.attachLocalField(parafield); - dec2.synchronize(); - dec2.recvData(); - const double *res=parafield->getField()->getArray()->getConstPointer(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(45.,res[0],1e-12); - dec2.sendData(); - } - // - ParaMEDMEM::InterpKernelDEC dec3(*source_group,*target_group); - dec3.setMethod("P0"); - parafield->getField()->setNature(Integral); - if(source_group->containsMyRank()) - { - double *vals=parafield->getField()->getArray()->getPointer(); - if(rank==0) - { vals[0]=7.; vals[1]=8.; } - else - { vals[0]=9.; vals[1]=10.; vals[2]=11.; } - dec3.attachLocalField(parafield); - dec3.synchronize(); - dec3.sendData(); - dec3.recvData(); - const double *res=parafield->getField()->getArray()->getConstPointer(); - if(rank==0) - { - CPPUNIT_ASSERT_DOUBLES_EQUAL(11.25,res[0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(5.625,res[1],1e-12); - } - else - { - CPPUNIT_ASSERT_DOUBLES_EQUAL(5.625,res[0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(11.25,res[1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(11.25,res[2],1e-12); - } - } - else - { - dec3.attachLocalField(parafield); - dec3.synchronize(); - dec3.recvData(); - const double *res=parafield->getField()->getArray()->getConstPointer(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(45.,res[0],1e-12); - dec3.sendData(); - } - // - ParaMEDMEM::InterpKernelDEC dec4(*source_group,*target_group); - dec4.setMethod("P0"); - parafield->getField()->setNature(RevIntegral); - if(source_group->containsMyRank()) - { - double *vals=parafield->getField()->getArray()->getPointer(); - if(rank==0) - { vals[0]=7.; vals[1]=8.; } - else - { vals[0]=9.; vals[1]=10.; vals[2]=11.; } - dec4.attachLocalField(parafield); - dec4.synchronize(); - dec4.sendData(); - dec4.recvData(); - const double *res=parafield->getField()->getArray()->getConstPointer(); - if(rank==0) - { - CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,res[0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,res[1],1e-12); - } - else - { - CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,res[0],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,res[1],1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,res[2],1e-12); - } - } - else - { - dec4.attachLocalField(parafield); - dec4.synchronize(); - dec4.recvData(); - const double *res=parafield->getField()->getArray()->getConstPointer(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,res[0],1e-12); - dec4.sendData(); - } - delete parafield; - delete paramesh; - mesh->decrRef(); - delete target_group; - delete source_group; - // - MPI_Barrier(MPI_COMM_WORLD); -} - -void ParaMEDMEMTest::testInterpKernelDECPartialProcs() -{ - int size; - int rank; - MPI_Comm_size(MPI_COMM_WORLD,&size); - MPI_Comm_rank(MPI_COMM_WORLD,&rank); - // - if(size!=3) - return ; - set procs_source; - set procs_target; - // - procs_source.insert(0); - procs_target.insert(1); - // - ParaMEDMEM::MEDCouplingUMesh *mesh=0; - ParaMEDMEM::ParaMESH *paramesh=0; - ParaMEDMEM::ParaFIELD *parafield=0; - // - ParaMEDMEM::CommInterface interface; - // - MPI_Barrier(MPI_COMM_WORLD); - double targetCoords[8]={ 0.,0., 1., 0., 0., 1., 1., 1. }; - CommInterface comm; - int grpIds[2]={0,1}; - MPI_Group grp,group_world; - comm.commGroup(MPI_COMM_WORLD,&group_world); - comm.groupIncl(group_world,2,grpIds,&grp); - MPI_Comm partialComm; - comm.commCreate(MPI_COMM_WORLD,grp,&partialComm); - // - ProcessorGroup* target_group=0; - ProcessorGroup* source_group=0; - // - ParaMEDMEM::InterpKernelDEC *dec=0; - if(rank==0 || rank==1) - { - target_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_target,partialComm); - source_group = new ParaMEDMEM::MPIProcessorGroup(interface,procs_source,partialComm); - if(source_group->containsMyRank()) - { - mesh=MEDCouplingUMesh::New(); - mesh->setMeshDimension(2); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(4,2); - std::copy(targetCoords,targetCoords+8,myCoords->getPointer()); - mesh->setCoords(myCoords); - myCoords->decrRef(); - int targetConn[4]={0,2,3,1}; - mesh->allocateCells(1); - mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn); - mesh->finishInsertingCells(); - ParaMEDMEM::ComponentTopology comptopo; - paramesh=new ParaMESH(mesh,*source_group,"source mesh"); - parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo); - parafield->getField()->setNature(ConservativeVolumic); - double *vals=parafield->getField()->getArray()->getPointer(); - vals[0]=7.; - dec=new ParaMEDMEM::InterpKernelDEC(*source_group,*target_group); - dec->attachLocalField(parafield); - dec->synchronize(); - dec->sendData(); - dec->recvData(); - } - else - { - mesh=MEDCouplingUMesh::New(); - mesh->setMeshDimension(2); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(4,2); - std::copy(targetCoords,targetCoords+8,myCoords->getPointer()); - mesh->setCoords(myCoords); - myCoords->decrRef(); - int targetConn[6]={0,2,1,2,3,1}; - mesh->allocateCells(2); - mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn); - mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+3); - mesh->finishInsertingCells(); - ParaMEDMEM::ComponentTopology comptopo; - paramesh=new ParaMESH(mesh,*target_group,"target mesh"); - parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo); - parafield->getField()->setNature(ConservativeVolumic); - dec=new ParaMEDMEM::InterpKernelDEC(*source_group,*target_group); - dec->attachLocalField(parafield); - dec->synchronize(); - dec->recvData(); - dec->sendData(); - } - } - delete parafield; - delete paramesh; - if(mesh) - mesh->decrRef(); - delete target_group; - delete source_group; - delete dec; - MPI_Barrier(MPI_COMM_WORLD); -} - -/*! - * Tests an asynchronous exchange between two codes - * one sends data with dtA as an interval, the max time being tmaxA - * the other one receives with dtB as an interval, the max time being tmaxB - */ -void ParaMEDMEMTest::testAsynchronousInterpKernelDEC_2D(double dtA, double tmaxA, - double dtB, double tmaxB, bool WithPointToPoint, bool Asynchronous, - bool WithInterp, const char *srcMeth, const char *targetMeth) -{ - std::string srcM(srcMeth); - std::string targetM(targetMeth); - int size; - int rank; - MPI_Comm_size(MPI_COMM_WORLD,&size); - MPI_Comm_rank(MPI_COMM_WORLD,&rank); - - //the test is meant to run on five processors - if (size !=5) return ; - - int nproc_source = 3; - set self_procs; - set procs_source; - set procs_target; - - for (int i=0; icontainsMyRank()) - { - string master = filename_xml1; - - ostringstream strstream; - strstream <getField()->setNature(ConservativeVolumic);//InvertIntegral);//ConservativeVolumic); - } - else - parafield = new ParaFIELD(ON_NODES,NO_TIME,paramesh, comptopo); - - int nb_local; - if(srcM=="P0") - nb_local=mesh->getNumberOfCells(); - else - nb_local=mesh->getNumberOfNodes(); - // double * value= new double[nb_local]; - double *value=parafield->getField()->getArray()->getPointer(); - for(int ielem=0; ielemgetCellMesh(),parafield->getField()); - - dec.attachLocalField(icocofield); - - - } - - //loading the geometry for the target group - if (target_group->containsMyRank()) - { - string master= filename_xml2; - ostringstream strstream; - strstream << master<<(rank-nproc_source+1)<<".med"; - ostringstream meshname ; - meshname<< "Mesh_3_"<getField()->setNature(ConservativeVolumic);//InvertIntegral);//ConservativeVolumic); - } - else - parafield = new ParaFIELD(ON_NODES,NO_TIME,paramesh, comptopo); - - int nb_local; - if(targetM=="P0") - nb_local=mesh->getNumberOfCells(); - else - nb_local=mesh->getNumberOfNodes(); - - double *value=parafield->getField()->getArray()->getPointer(); - for(int ielem=0; ielemgetCellMesh(),parafield->getField()); - - dec.attachLocalField(icocofield); - } - - - //attaching a DEC to the source group - - if (source_group->containsMyRank()) - { - cout<<"DEC usage"<getField()->getArray()->getPointer(); - int nb_local=parafield->getField()->getMesh()->getNumberOfCells(); - for (int i=0; icontainsMyRank()) - { - cout<<"DEC usage"< times; - for (double time=0; timegetVolumeIntegral(0,true); - cout << "testAsynchronousInterpKernelDEC_2D" << rank << " time " << time - << " VolumeIntegral " << vi - << " time*10000 " << time*10000 << endl ; - - CPPUNIT_ASSERT_DOUBLES_EQUAL(vi,time*10000,0.001); - } - - } - - delete source_group; - delete target_group; - delete self_group; - delete parafield ; - delete paramesh ; - mesh->decrRef() ; - delete icocofield ; - - cout << "testAsynchronousInterpKernelDEC_2D" << rank << " MPI_Barrier " << endl ; - - if (Asynchronous) MPI_Barrier(MPI_COMM_WORLD); - cout << "end of InterpKernelDEC_2D test"< -#include "MEDLoader.hxx" -#include "MEDCouplingUMesh.hxx" -#include "MEDCouplingFieldDouble.hxx" - -#include -#include -#include -#include - -using namespace std; -using namespace INTERP_KERNEL; -using namespace ParaMEDMEM; - -void ParaMEDMEMTest::testMEDLoaderRead1() -{ - string fileName=getResourceFile("pointe_import22.med"); - vector meshNames=MEDLoader::GetMeshNames(fileName.c_str()); - CPPUNIT_ASSERT_EQUAL(1,(int)meshNames.size()); - MEDCouplingUMesh *mesh=MEDLoader::ReadUMeshFromFile(fileName.c_str(),meshNames[0].c_str(),0); - CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension()); - CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(16,mesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(3,(int)mesh->getAllTypes().size()); - for(int i=0;i<12;i++) - CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,mesh->getTypeOfCell(i)); - for(int i=12;i<14;i++) - CPPUNIT_ASSERT_EQUAL(NORM_HEXA8,mesh->getTypeOfCell(i)); - for(int i=14;i<16;i++) - CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,mesh->getTypeOfCell(i)); - CPPUNIT_ASSERT_EQUAL(90,mesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(701,std::accumulate(mesh->getNodalConnectivity()->getPointer(),mesh->getNodalConnectivity()->getPointer()+90,0)); - CPPUNIT_ASSERT_EQUAL(711,std::accumulate(mesh->getNodalConnectivityIndex()->getPointer(),mesh->getNodalConnectivityIndex()->getPointer()+17,0)); - CPPUNIT_ASSERT_DOUBLES_EQUAL(46.,std::accumulate(mesh->getCoords()->getPointer(),mesh->getCoords()->getPointer()+57,0),1e-12); - mesh->decrRef(); - // - vector families=MEDLoader::GetMeshFamilyNames(fileName.c_str(),meshNames[0].c_str()); - CPPUNIT_ASSERT_EQUAL(8,(int)families.size()); - CPPUNIT_ASSERT(families[2]=="FAMILLE_ELEMENT_3"); - // - vector families2; - families2.push_back(families[2]); - mesh=MEDLoader::ReadUMeshFromFamilies(fileName.c_str(),meshNames[0].c_str(),0,families2); - CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension()); - CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(2,mesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllTypes().size()); - CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,mesh->getTypeOfCell(0)); - CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,mesh->getTypeOfCell(1)); - CPPUNIT_ASSERT_EQUAL(11,mesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(132,std::accumulate(mesh->getNodalConnectivity()->getPointer(),mesh->getNodalConnectivity()->getPointer()+11,0)); - CPPUNIT_ASSERT_EQUAL(16,std::accumulate(mesh->getNodalConnectivityIndex()->getPointer(),mesh->getNodalConnectivityIndex()->getPointer()+3,0)); - CPPUNIT_ASSERT_DOUBLES_EQUAL(46.,std::accumulate(mesh->getCoords()->getPointer(),mesh->getCoords()->getPointer()+57,0),1e-12); - mesh->decrRef(); - // - vector groups=MEDLoader::GetMeshGroupsNames(fileName.c_str(),meshNames[0].c_str()); - CPPUNIT_ASSERT_EQUAL(5,(int)groups.size()); - CPPUNIT_ASSERT(groups[0]=="groupe1"); - CPPUNIT_ASSERT(groups[1]=="groupe2"); - CPPUNIT_ASSERT(groups[2]=="groupe3"); - CPPUNIT_ASSERT(groups[3]=="groupe4"); - CPPUNIT_ASSERT(groups[4]=="groupe5"); - vector groups2; - groups2.push_back(groups[0]); - mesh=MEDLoader::ReadUMeshFromGroups(fileName.c_str(),meshNames[0].c_str(),0,groups2); - CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension()); - CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(7,mesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllTypes().size()); - for(int i=0;i<6;i++) - CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,mesh->getTypeOfCell(i)); - CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,mesh->getTypeOfCell(6)); - CPPUNIT_ASSERT_EQUAL(36,mesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(254,std::accumulate(mesh->getNodalConnectivity()->getPointer(),mesh->getNodalConnectivity()->getPointer()+36,0)); - CPPUNIT_ASSERT_EQUAL(141,std::accumulate(mesh->getNodalConnectivityIndex()->getPointer(),mesh->getNodalConnectivityIndex()->getPointer()+8,0)); - CPPUNIT_ASSERT_DOUBLES_EQUAL(46.,std::accumulate(mesh->getCoords()->getPointer(),mesh->getCoords()->getPointer()+57,0),1e-12); - mesh->decrRef(); - // - std::vector fieldsName=MEDLoader::GetCellFieldNamesOnMesh(fileName.c_str(),meshNames[0].c_str()); - CPPUNIT_ASSERT_EQUAL(2,(int)fieldsName.size()); - CPPUNIT_ASSERT(fieldsName[0]=="fieldcelldoublescalar"); - CPPUNIT_ASSERT(fieldsName[1]=="fieldcelldoublevector"); - std::vector > its0=MEDLoader::GetCellFieldIterations(fileName.c_str(),fieldsName[0].c_str()); - CPPUNIT_ASSERT_EQUAL(1,(int)its0.size()); - CPPUNIT_ASSERT_EQUAL(-1,its0[0].first); - CPPUNIT_ASSERT_EQUAL(-1,its0[0].second); - std::vector > its1=MEDLoader::GetCellFieldIterations(fileName.c_str(),fieldsName[1].c_str()); - CPPUNIT_ASSERT_EQUAL(1,(int)its1.size()); - CPPUNIT_ASSERT_EQUAL(-1,its1[0].first); - CPPUNIT_ASSERT_EQUAL(-1,its1[0].second); - // - MEDCouplingFieldDouble *field0=MEDLoader::ReadFieldDoubleCell(fileName.c_str(),meshNames[0].c_str(),0,fieldsName[0].c_str(),its0[0].first,its0[0].second); - field0->checkCoherency(); - CPPUNIT_ASSERT(field0->getName()==fieldsName[0]); - CPPUNIT_ASSERT_EQUAL(1,field0->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(16,field0->getNumberOfTuples()); - const double expectedValues[16]={1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,3.,3.,2.,2.}; - double diffValue[16]; - std::transform(field0->getArray()->getPointer(),field0->getArray()->getPointer()+16,expectedValues,diffValue,std::minus()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::max_element(diffValue,diffValue+16),1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::min_element(diffValue,diffValue+16),1e-12); - const MEDCouplingUMesh *constMesh=dynamic_cast(field0->getMesh()); - CPPUNIT_ASSERT(constMesh); - CPPUNIT_ASSERT_EQUAL(3,constMesh->getSpaceDimension()); - CPPUNIT_ASSERT_EQUAL(3,constMesh->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(16,constMesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(19,constMesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllTypes().size()); - for(int i=0;i<12;i++) - CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,constMesh->getTypeOfCell(i)); - for(int i=12;i<14;i++) - CPPUNIT_ASSERT_EQUAL(NORM_HEXA8,constMesh->getTypeOfCell(i)); - for(int i=14;i<16;i++) - CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,constMesh->getTypeOfCell(i)); - CPPUNIT_ASSERT_EQUAL(90,constMesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(701,std::accumulate(constMesh->getNodalConnectivity()->getPointer(),constMesh->getNodalConnectivity()->getPointer()+90,0)); - CPPUNIT_ASSERT_EQUAL(711,std::accumulate(constMesh->getNodalConnectivityIndex()->getPointer(),constMesh->getNodalConnectivityIndex()->getPointer()+17,0)); - CPPUNIT_ASSERT_DOUBLES_EQUAL(46.,std::accumulate(constMesh->getCoords()->getPointer(),constMesh->getCoords()->getPointer()+57,0),1e-12); - field0->decrRef(); - // - MEDCouplingFieldDouble *field1=MEDLoader::ReadFieldDoubleCell(fileName.c_str(),meshNames[0].c_str(),0,fieldsName[1].c_str(),its1[0].first,its1[0].second); - field1->checkCoherency(); - CPPUNIT_ASSERT(field1->getName()==fieldsName[1]); - CPPUNIT_ASSERT_EQUAL(3,field1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(16,field1->getNumberOfTuples()); - const double expectedValues2[48]={1.,0.,1.,1.,0.,1.,1.,0.,1.,2.,1.,0.,2.,1.,0.,2.,1.,0.,3.,0.,1.,3.,0.,1.,3.,0.,1.,4.,1.,0.,4.,1.,0.,4.,1.,0.,6.,1.,1.,6.,0.,0.,5.,0.,0.,5.,1.,1.}; - double diffValue2[48]; - std::transform(field1->getArray()->getPointer(),field1->getArray()->getPointer()+48,expectedValues2,diffValue2,std::minus()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::max_element(diffValue2,diffValue2+48),1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::min_element(diffValue2,diffValue2+48),1e-12); - constMesh=dynamic_cast(field1->getMesh()); - CPPUNIT_ASSERT(constMesh); - CPPUNIT_ASSERT_EQUAL(3,constMesh->getSpaceDimension()); - CPPUNIT_ASSERT_EQUAL(3,constMesh->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(16,constMesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(19,constMesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllTypes().size()); - for(int i=0;i<12;i++) - CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,constMesh->getTypeOfCell(i)); - for(int i=12;i<14;i++) - CPPUNIT_ASSERT_EQUAL(NORM_HEXA8,constMesh->getTypeOfCell(i)); - for(int i=14;i<16;i++) - CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,constMesh->getTypeOfCell(i)); - CPPUNIT_ASSERT_EQUAL(90,constMesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(701,std::accumulate(constMesh->getNodalConnectivity()->getPointer(),constMesh->getNodalConnectivity()->getPointer()+90,0)); - CPPUNIT_ASSERT_EQUAL(711,std::accumulate(constMesh->getNodalConnectivityIndex()->getPointer(),constMesh->getNodalConnectivityIndex()->getPointer()+17,0)); - CPPUNIT_ASSERT_DOUBLES_EQUAL(46.,std::accumulate(constMesh->getCoords()->getPointer(),constMesh->getCoords()->getPointer()+57,0),1e-12); - field1->decrRef(); - //fields on nodes - std::vector fieldsNameNode=MEDLoader::GetNodeFieldNamesOnMesh(fileName.c_str(),meshNames[0].c_str()); - CPPUNIT_ASSERT_EQUAL(2,(int)fieldsNameNode.size()); - CPPUNIT_ASSERT(fieldsNameNode[0]=="fieldnodedouble"); - CPPUNIT_ASSERT(fieldsNameNode[1]=="fieldnodeint"); - std::vector > its0Node=MEDLoader::GetNodeFieldIterations(fileName.c_str(),fieldsNameNode[0].c_str()); - CPPUNIT_ASSERT_EQUAL(3,(int)its0Node.size()); - CPPUNIT_ASSERT_EQUAL(1,its0Node[0].first); - CPPUNIT_ASSERT_EQUAL(-1,its0Node[0].second); - CPPUNIT_ASSERT_EQUAL(2,its0Node[1].first); - CPPUNIT_ASSERT_EQUAL(-1,its0Node[1].second); - CPPUNIT_ASSERT_EQUAL(-1,its0Node[2].first);//strange but like that - CPPUNIT_ASSERT_EQUAL(-1,its0Node[2].second); - MEDCouplingFieldDouble *field0Nodes=MEDLoader::ReadFieldDoubleNode(fileName.c_str(),meshNames[0].c_str(),0,fieldsNameNode[0].c_str(),its0Node[0].first,its0Node[0].second); - field0Nodes->checkCoherency(); - CPPUNIT_ASSERT(field0Nodes->getName()==fieldsNameNode[0]); - CPPUNIT_ASSERT_EQUAL(1,field0Nodes->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(19,field0Nodes->getNumberOfTuples()); - const double expectedValues3[19]={1.,1.,1.,2.,2.,2.,3.,3.,3.,4.,4.,4.,5.,5.,5.,6.,6.,6.,7.}; - double diffValue3[19]; - std::transform(field0Nodes->getArray()->getPointer(),field0Nodes->getArray()->getPointer()+19,expectedValues3,diffValue3,std::minus()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::max_element(diffValue3,diffValue3+19),1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::min_element(diffValue3,diffValue3+19),1e-12); - constMesh=dynamic_cast(field0Nodes->getMesh()); - CPPUNIT_ASSERT(constMesh); - field0Nodes->decrRef(); - // - field0Nodes=MEDLoader::ReadFieldDoubleNode(fileName.c_str(),meshNames[0].c_str(),0,fieldsNameNode[0].c_str(),its0Node[1].first,its0Node[1].second); - field0Nodes->checkCoherency(); - CPPUNIT_ASSERT(field0Nodes->getName()==fieldsNameNode[0]); - CPPUNIT_ASSERT_EQUAL(1,field0Nodes->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(19,field0Nodes->getNumberOfTuples()); - const double expectedValues4[19]={1.,2.,2.,2.,3.,3.,3.,4.,4.,4.,5.,5.,5.,6.,6.,6.,7.,7.,7.}; - std::transform(field0Nodes->getArray()->getPointer(),field0Nodes->getArray()->getPointer()+19,expectedValues4,diffValue3,std::minus()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::max_element(diffValue3,diffValue3+19),1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::min_element(diffValue3,diffValue3+19),1e-12); - constMesh=dynamic_cast(field0Nodes->getMesh()); - CPPUNIT_ASSERT(constMesh); - CPPUNIT_ASSERT_EQUAL(3,constMesh->getSpaceDimension()); - CPPUNIT_ASSERT_EQUAL(3,constMesh->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(16,constMesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(19,constMesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllTypes().size()); - for(int i=0;i<12;i++) - CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,constMesh->getTypeOfCell(i)); - for(int i=12;i<14;i++) - CPPUNIT_ASSERT_EQUAL(NORM_HEXA8,constMesh->getTypeOfCell(i)); - for(int i=14;i<16;i++) - CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,constMesh->getTypeOfCell(i)); - CPPUNIT_ASSERT_EQUAL(90,constMesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(701,std::accumulate(constMesh->getNodalConnectivity()->getPointer(),constMesh->getNodalConnectivity()->getPointer()+90,0)); - CPPUNIT_ASSERT_EQUAL(711,std::accumulate(constMesh->getNodalConnectivityIndex()->getPointer(),constMesh->getNodalConnectivityIndex()->getPointer()+17,0)); - CPPUNIT_ASSERT_DOUBLES_EQUAL(46.,std::accumulate(constMesh->getCoords()->getPointer(),constMesh->getCoords()->getPointer()+57,0),1e-12); - field0Nodes->decrRef(); - // - field0Nodes=MEDLoader::ReadFieldDoubleNode(fileName.c_str(),meshNames[0].c_str(),0,fieldsNameNode[0].c_str(),its0Node[2].first,its0Node[2].second); - field0Nodes->checkCoherency(); - CPPUNIT_ASSERT(field0Nodes->getName()==fieldsNameNode[0]); - CPPUNIT_ASSERT_EQUAL(1,field0Nodes->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(19,field0Nodes->getNumberOfTuples()); - const double expectedValues5[19]={1.,1.,1.,2.,2.,2.,3.,3.,3.,4.,4.,4.,5.,5.,5.,6.,6.,6.,7.}; - std::transform(field0Nodes->getArray()->getPointer(),field0Nodes->getArray()->getPointer()+19,expectedValues5,diffValue3,std::minus()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::max_element(diffValue3,diffValue3+19),1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::min_element(diffValue3,diffValue3+19),1e-12); - constMesh=dynamic_cast(field0Nodes->getMesh()); - CPPUNIT_ASSERT(constMesh); - CPPUNIT_ASSERT_EQUAL(3,constMesh->getSpaceDimension()); - CPPUNIT_ASSERT_EQUAL(3,constMesh->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(16,constMesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(19,constMesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllTypes().size()); - for(int i=0;i<12;i++) - CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,constMesh->getTypeOfCell(i)); - for(int i=12;i<14;i++) - CPPUNIT_ASSERT_EQUAL(NORM_HEXA8,constMesh->getTypeOfCell(i)); - for(int i=14;i<16;i++) - CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,constMesh->getTypeOfCell(i)); - CPPUNIT_ASSERT_EQUAL(90,constMesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(701,std::accumulate(constMesh->getNodalConnectivity()->getPointer(),constMesh->getNodalConnectivity()->getPointer()+90,0)); - CPPUNIT_ASSERT_EQUAL(711,std::accumulate(constMesh->getNodalConnectivityIndex()->getPointer(),constMesh->getNodalConnectivityIndex()->getPointer()+17,0)); - CPPUNIT_ASSERT_DOUBLES_EQUAL(46.,std::accumulate(constMesh->getCoords()->getPointer(),constMesh->getCoords()->getPointer()+57,0),1e-12); - field0Nodes->decrRef(); -} - -void ParaMEDMEMTest::testMEDLoaderPolygonRead() -{ - string fileName=getResourceFile("polygones.med"); - vector meshNames=MEDLoader::GetMeshNames(fileName.c_str()); - CPPUNIT_ASSERT_EQUAL(1,(int)meshNames.size()); - CPPUNIT_ASSERT(meshNames[0]=="Bord"); - MEDCouplingUMesh *mesh=MEDLoader::ReadUMeshFromFile(fileName.c_str(),meshNames[0].c_str(),0); - mesh->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension()); - CPPUNIT_ASSERT_EQUAL(2,mesh->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(538,mesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(579,mesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllTypes().size()); - for(int i=0;i<514;i++) - CPPUNIT_ASSERT_EQUAL(NORM_QUAD4,mesh->getTypeOfCell(i)); - for(int i=514;i<538;i++) - CPPUNIT_ASSERT_EQUAL(NORM_POLYGON,mesh->getTypeOfCell(i)); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,std::accumulate(mesh->getCoords()->getPointer(),mesh->getCoords()->getPointer()+1737,0),1e-12); - const double expectedVals1[12]={1.4851585216522212,-0.5,0.,1.4851585216522212,-0.4,0.,1.4851585216522212,-0.3,0., 1.5741585216522211, -0.5, 0. }; - double diffValue1[12]; - std::transform(mesh->getCoords()->getPointer(),mesh->getCoords()->getPointer()+12,expectedVals1,diffValue1,std::minus()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::max_element(diffValue1,diffValue1+12),1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::min_element(diffValue1,diffValue1+12),1e-12); - CPPUNIT_ASSERT_EQUAL(2768,mesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(651050,std::accumulate(mesh->getNodalConnectivity()->getPointer(),mesh->getNodalConnectivity()->getPointer()+2768,0)); - CPPUNIT_ASSERT_EQUAL(725943,std::accumulate(mesh->getNodalConnectivityIndex()->getPointer(),mesh->getNodalConnectivityIndex()->getPointer()+539,0)); - mesh->decrRef(); - // - std::vector fieldsName=MEDLoader::GetCellFieldNamesOnMesh(fileName.c_str(),meshNames[0].c_str()); - CPPUNIT_ASSERT_EQUAL(3,(int)fieldsName.size()); - CPPUNIT_ASSERT(fieldsName[0]=="bord_:_distorsion"); - CPPUNIT_ASSERT(fieldsName[1]=="bord_:_familles"); - CPPUNIT_ASSERT(fieldsName[2]=="bord_:_non-ortho"); - std::vector > its0=MEDLoader::GetCellFieldIterations(fileName.c_str(),fieldsName[0].c_str()); - CPPUNIT_ASSERT_EQUAL(1,(int)its0.size()); - MEDCouplingFieldDouble *field=MEDLoader::ReadFieldDoubleCell(fileName.c_str(),meshNames[0].c_str(),0,fieldsName[0].c_str(),its0[0].first,its0[0].second); - field->checkCoherency(); - CPPUNIT_ASSERT(field->getName()==fieldsName[0]); - CPPUNIT_ASSERT_EQUAL(1,field->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(538,field->getNumberOfTuples()); - const MEDCouplingUMesh *constMesh=dynamic_cast(field->getMesh()); - CPPUNIT_ASSERT(constMesh); - CPPUNIT_ASSERT_EQUAL(3,constMesh->getSpaceDimension()); - CPPUNIT_ASSERT_EQUAL(2,constMesh->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(538,constMesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(579,constMesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(2,(int)constMesh->getAllTypes().size()); - for(int i=0;i<514;i++) - CPPUNIT_ASSERT_EQUAL(NORM_QUAD4,constMesh->getTypeOfCell(i)); - for(int i=514;i<538;i++) - CPPUNIT_ASSERT_EQUAL(NORM_POLYGON,constMesh->getTypeOfCell(i)); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,std::accumulate(constMesh->getCoords()->getPointer(),constMesh->getCoords()->getPointer()+1737,0),1e-12); - std::transform(constMesh->getCoords()->getPointer(),constMesh->getCoords()->getPointer()+12,expectedVals1,diffValue1,std::minus()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::max_element(diffValue1,diffValue1+12),1e-12); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::min_element(diffValue1,diffValue1+12),1e-12); - CPPUNIT_ASSERT_EQUAL(2768,constMesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(651050,std::accumulate(constMesh->getNodalConnectivity()->getPointer(),constMesh->getNodalConnectivity()->getPointer()+2768,0)); - CPPUNIT_ASSERT_EQUAL(725943,std::accumulate(constMesh->getNodalConnectivityIndex()->getPointer(),constMesh->getNodalConnectivityIndex()->getPointer()+539,0)); - const double *values=field->getArray()->getPointer(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(2.87214203182918,std::accumulate(values,values+538,0.),1e-12); - field->decrRef(); -} - -void ParaMEDMEMTest::testMEDLoaderPolyhedronRead() -{ - string fileName=getResourceFile("poly3D.med"); - vector meshNames=MEDLoader::GetMeshNames(fileName.c_str()); - CPPUNIT_ASSERT_EQUAL(1,(int)meshNames.size()); - CPPUNIT_ASSERT(meshNames[0]=="poly3D"); - MEDCouplingUMesh *mesh=MEDLoader::ReadUMeshFromFile(fileName.c_str(),meshNames[0].c_str(),0); - mesh->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension()); - CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(3,mesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllTypes().size()); - CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,mesh->getTypeOfCell(0)); - CPPUNIT_ASSERT_EQUAL(NORM_POLYHED,mesh->getTypeOfCell(1)); - CPPUNIT_ASSERT_EQUAL(NORM_POLYHED,mesh->getTypeOfCell(2)); - CPPUNIT_ASSERT_EQUAL(98,mesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(725,std::accumulate(mesh->getNodalConnectivity()->getPointer(),mesh->getNodalConnectivity()->getPointer()+98,0)); - CPPUNIT_ASSERT_DOUBLES_EQUAL(110.,std::accumulate(mesh->getCoords()->getPointer(),mesh->getCoords()->getPointer()+57,0),1e-12); - CPPUNIT_ASSERT_EQUAL(155,std::accumulate(mesh->getNodalConnectivityIndex()->getPointer(),mesh->getNodalConnectivityIndex()->getPointer()+4,0)); - mesh->decrRef(); - // - mesh=MEDLoader::ReadUMeshFromFile(fileName.c_str(),meshNames[0].c_str(),-1); - mesh->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension()); - CPPUNIT_ASSERT_EQUAL(2,mesh->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(17,mesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(3,(int)mesh->getAllTypes().size()); - for(int i=0;i<6;i++) - CPPUNIT_ASSERT_EQUAL(NORM_TRI3,mesh->getTypeOfCell(i)); - for(int i=6;i<14;i++) - CPPUNIT_ASSERT_EQUAL(NORM_QUAD4,mesh->getTypeOfCell(i)); - for(int i=14;i<17;i++) - CPPUNIT_ASSERT_EQUAL(NORM_POLYGON,mesh->getTypeOfCell(i)); - CPPUNIT_ASSERT_DOUBLES_EQUAL(110.,std::accumulate(mesh->getCoords()->getPointer(),mesh->getCoords()->getPointer()+57,0),1e-12); - CPPUNIT_ASSERT_EQUAL(83,mesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(619,std::accumulate(mesh->getNodalConnectivity()->getPointer(),mesh->getNodalConnectivity()->getPointer()+83,0)); - mesh->decrRef(); - // - vector families=MEDLoader::GetMeshFamilyNames(fileName.c_str(),meshNames[0].c_str()); - CPPUNIT_ASSERT_EQUAL(4,(int)families.size()); - CPPUNIT_ASSERT(families[0]=="FAMILLE_FACE_POLYGONS3"); - CPPUNIT_ASSERT(families[1]=="FAMILLE_FACE_QUAD41"); - CPPUNIT_ASSERT(families[2]=="FAMILLE_FACE_TRIA32"); - CPPUNIT_ASSERT(families[3]=="FAMILLE_ZERO"); - vector families2; - families2.push_back(families[0]); - mesh=MEDLoader::ReadUMeshFromFamilies(fileName.c_str(),meshNames[0].c_str(),-1,families2); - mesh->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension()); - CPPUNIT_ASSERT_EQUAL(2,mesh->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(3,mesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(1,(int)mesh->getAllTypes().size()); - for(int i=0;i<3;i++) - CPPUNIT_ASSERT_EQUAL(NORM_POLYGON,mesh->getTypeOfCell(i)); - CPPUNIT_ASSERT_EQUAL(19,mesh->getNodalConnectivity()->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(117,std::accumulate(mesh->getNodalConnectivity()->getPointer(),mesh->getNodalConnectivity()->getPointer()+19,0)); - mesh->decrRef(); - // - mesh=MEDLoader::ReadUMeshFromFamilies(fileName.c_str(),meshNames[0].c_str(),0,families2); - CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension()); - CPPUNIT_ASSERT_EQUAL(0,mesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(0,(int)mesh->getAllTypes().size()); - mesh->decrRef(); -} - -void ParaMEDMEMTest::testMEDLoaderWrite1() -{ - const char meshName[]="MEDLoaderWrite1"; - string outFileName=makeTmpFile("toto22137.med"); - double targetCoords[18]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7 }; - int targetConn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4}; - MEDCouplingUMesh *mesh=MEDCouplingUMesh::New(); - mesh->setMeshDimension(2); - mesh->allocateCells(5); - mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn); - mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+4); - mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+7); - mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+10); - mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+14); - mesh->finishInsertingCells(); - DataArrayDouble *myCoords=DataArrayDouble::New(); - myCoords->alloc(9,2); - std::copy(targetCoords,targetCoords+18,myCoords->getPointer()); - mesh->setCoords(myCoords); - myCoords->decrRef(); - mesh->checkCoherency(); - CPPUNIT_ASSERT_EQUAL(2,mesh->getSpaceDimension()); - CPPUNIT_ASSERT_EQUAL(2,mesh->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(5,mesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(9,mesh->getNumberOfNodes()); - bool normalThrow=false; - try - { - MEDLoader::WriteUMesh(outFileName.c_str(),mesh,true); - } - catch(INTERP_KERNEL::Exception& e) - { - normalThrow=true; - } - CPPUNIT_ASSERT(normalThrow); - mesh->setName(meshName); - MEDLoader::WriteUMesh(outFileName.c_str(),mesh,true); - mesh->decrRef(); - // - mesh=MEDLoader::ReadUMeshFromFile(outFileName.c_str(),meshName,0); - CPPUNIT_ASSERT_EQUAL(2,mesh->getSpaceDimension()); - CPPUNIT_ASSERT_EQUAL(2,mesh->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(5,mesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(9,mesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllTypes().size()); - for(int i=0;i<2;i++) - CPPUNIT_ASSERT_EQUAL(NORM_TRI3,mesh->getTypeOfCell(i)); - for(int i=2;i<5;i++) - CPPUNIT_ASSERT_EQUAL(NORM_QUAD4,mesh->getTypeOfCell(i)); - CPPUNIT_ASSERT_DOUBLES_EQUAL(3.6,std::accumulate(mesh->getCoords()->getPointer(),mesh->getCoords()->getPointer()+18,0.),1.e-12); - mesh->decrRef(); -} - -void ParaMEDMEMTest::testMEDLoaderPolygonWrite() -{ - string fileName=getResourceFile("polygones.med"); - vector meshNames=MEDLoader::GetMeshNames(fileName.c_str()); - CPPUNIT_ASSERT_EQUAL(1,(int)meshNames.size()); - CPPUNIT_ASSERT(meshNames[0]=="Bord"); - MEDCouplingUMesh *mesh=MEDLoader::ReadUMeshFromFile(fileName.c_str(),meshNames[0].c_str(),0); - mesh->checkCoherency(); - string outFileName=makeTmpFile("toto22138.med"); - MEDLoader::WriteUMesh(outFileName.c_str(),mesh,true); - // - MEDCouplingUMesh *mesh2=MEDLoader::ReadUMeshFromFile(outFileName.c_str(),meshNames[0].c_str(),0); - // - mesh2->decrRef(); - mesh->decrRef(); -} diff --git a/src/ParaMEDMEMTest/test_perf.cxx b/src/ParaMEDMEMTest/test_perf.cxx deleted file mode 100644 index 9c40165c0..000000000 --- a/src/ParaMEDMEMTest/test_perf.cxx +++ /dev/null @@ -1,337 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include -#include -#include -#include "ParaMEDMEMTest.hxx" -#include - -#include "CommInterface.hxx" -#include "ProcessorGroup.hxx" -#include "MPIProcessorGroup.hxx" -#include "Topology.hxx" -#include "DEC.hxx" -#include "MxN_Mapping.hxx" -#include "InterpKernelDEC.hxx" -#include "ParaMESH.hxx" -#include "ParaFIELD.hxx" -#include "ComponentTopology.hxx" -#include "ICoCoMEDField.hxx" -#include "MEDLoader.hxx" - -#include -#include - -// use this define to enable lines, execution of which leads to Segmentation Fault -#define ENABLE_FAULTS - -// use this define to enable CPPUNIT asserts and fails, showing bugs -#define ENABLE_FORCED_FAILURES - -#ifndef CLK_TCK -#include -#define CLK_TCK sysconf(_SC_CLK_TCK); -#endif - -using namespace std; -using namespace ParaMEDMEM; - -void testInterpKernelDEC_2D(const string& filename1, const string& meshname1, - const string& filename2, const string& meshname2, - int nproc_source, double epsilon, bool tri, bool all); -void get_time( float *telps, float *tuser, float *tsys, float *tcpu ); - -int main(int argc, char *argv[]) -{ - string filename1, filename2; - string meshname1, meshname2; - int nproc_source=1, rank; - double epsilon=1.e-6; - int count=0; - bool tri=false; - bool all=false; - - MPI_Init(&argc,&argv); - - for(int i=1;i self_procs; - set procs_source; - set procs_target; - - for (int i=0; icontainsMyRank()){ - string master = filename_xml1; - - ostringstream strstream; - if( nproc_source == 1 ) - strstream <getNumberOfCells(); - double *value=parafield->getField()->getArray()->getPointer(); - for(int ielem=0; ielemgetCellMesh(),parafield->getField()); - - dec.attachLocalField(icocofield); - } - - //loading the geometry for the target group - if (target_group->containsMyRank()){ - string master= filename_xml2; - ostringstream strstream; - if( (size-nproc_source) == 1 ) - strstream << master<<".med"; - else - strstream << master<<(rank-nproc_source+1)<<".med"; - ostringstream meshname ; - if( (size-nproc_source) == 1 ) - meshname<< meshname2; - else - meshname<< meshname2<<"_"<incrRef(); - - paramesh=new ParaMESH (mesh,*target_group,"target mesh"); - ParaMEDMEM::ComponentTopology comptopo; - parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo); - - int nb_local=mesh->getNumberOfCells(); - double *value=parafield->getField()->getArray()->getPointer(); - for(int ielem=0; ielemgetCellMesh(),parafield->getField()); - - dec.attachLocalField(icocofield); - } - - - //attaching a DEC to the source group - double field_before_int; - double field_after_int; - - if (source_group->containsMyRank()){ - field_before_int = parafield->getVolumeIntegral(0,true); - get_time( &telps, &tcpu_u, &tcpu_s, &tcpu ); - dec.synchronize(); - get_time( &telps, &tcpu_u, &tcpu_s, &tcpu ); - if( rank == 0 ) - cout << "SYNCHRONIZE : Telapse = " << telps << " TuserCPU = " << tcpu_u << " TsysCPU = " << tcpu_s << " TCPU = " << tcpu << endl; - cout<<"DEC usage"< -#include -#include -#include -#include - -#include "RENUMBER_BOOSTRenumbering.hxx" - -void BOOSTRenumbering::renumber(const int* graph,const int* index_graph,int nb_cell,std::vector& iperm,std::vector& perm) -{ - iperm.resize(nb_cell,0); - perm.resize(nb_cell,0); - - typedef boost::adjacency_list > > Graph; - typedef boost::graph_traits::vertex_descriptor Vertex; - typedef boost::graph_traits::vertices_size_type size_type; - Graph G(nb_cell); - for (int i=0;i::type - index_map = boost::get(boost::vertex_index, G); - boost::cuthill_mckee_ordering(G, iperm.rbegin(), boost::get(boost::vertex_color, G), - boost::make_degree_map(G)); - for (size_type c = 0; c != iperm.size(); ++c) - perm[index_map[iperm[c]]] = c; - for(int i=0;i& iperm,std::vector& perm); -}; - -#endif /*BOOSTRENUMBERING_HXX_*/ diff --git a/src/RENUMBER/RENUMBER_METISRenumbering.cxx b/src/RENUMBER/RENUMBER_METISRenumbering.cxx deleted file mode 100644 index 3a98fdf0c..000000000 --- a/src/RENUMBER/RENUMBER_METISRenumbering.cxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -extern "C" -{ -#include "metis.h" -} - -#include "RENUMBER_METISRenumbering.hxx" - -void METISRenumbering::renumber(const int* graph,const int* index_graph,int nb_cell,std::vector& iperm,std::vector& perm) -{ - iperm.resize(nb_cell,0); - perm.resize(nb_cell,0); - int num_flag=1; - int options=0; - METIS_NodeND(&nb_cell,(int*)index_graph,(int*)graph,&num_flag,&options,&iperm[0],&perm[0]); -} diff --git a/src/RENUMBER/RENUMBER_METISRenumbering.hxx b/src/RENUMBER/RENUMBER_METISRenumbering.hxx deleted file mode 100644 index f590a0ebd..000000000 --- a/src/RENUMBER/RENUMBER_METISRenumbering.hxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef METISRENUMBERING_HXX_ -#define METISRENUMBERING_HXX_ - -#include "RENUMBER_Renumbering.hxx" - -class METISRenumbering:public Renumbering -{ -public: - virtual void renumber(const int* graph,const int* index_graph,int nb_cell,std::vector& iperm,std::vector& perm); -}; - -#endif /*METISRENUMBERING_HXX_*/ diff --git a/src/RENUMBER/RENUMBER_Renumbering.cxx b/src/RENUMBER/RENUMBER_Renumbering.cxx deleted file mode 100644 index 83f12ed41..000000000 --- a/src/RENUMBER/RENUMBER_Renumbering.cxx +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - diff --git a/src/RENUMBER/RENUMBER_Renumbering.hxx b/src/RENUMBER/RENUMBER_Renumbering.hxx deleted file mode 100644 index 2c5afe43e..000000000 --- a/src/RENUMBER/RENUMBER_Renumbering.hxx +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef RENUMBERING_HXX_ -#define RENUMBERING_HXX_ -#include - -class Renumbering -{ -public: - virtual void renumber(const int* graphe,const int* index_graphe,int nb_cell,std::vector& iperm,std::vector& perm)=0; -}; - -#endif /*RENUMBERING_HXX_*/ diff --git a/src/RENUMBER/RenumberingFactory.cxx b/src/RENUMBER/RenumberingFactory.cxx deleted file mode 100644 index 36f256929..000000000 --- a/src/RENUMBER/RenumberingFactory.cxx +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "RenumberingFactory.hxx" -#include "RENUMBER_Renumbering.hxx" -#ifdef ENABLE_METIS -#include "RENUMBER_METISRenumbering.hxx" -#endif -#ifdef ENABLE_BOOST -#include "RENUMBER_BOOSTRenumbering.hxx" -#endif - -#include - -using namespace std; - -namespace MED_RENUMBER -{ - Renumbering* RenumberingFactory(const string &s) - { -#ifdef ENABLE_METIS -#ifdef ENABLE_BOOST - if (s=="METIS") - { - return new METISRenumbering; - } - else if(s=="BOOST") - { - return new BOOSTRenumbering; - } - else - { - std::cerr << "The method has to be METIS or BOOST" << std::endl; - return 0; - } -#endif -#ifndef ENABLE_BOOST - if (s=="METIS") - { - return new METISRenumbering; - } - else - { - std::cerr << "The method has to be METIS!" << std::endl; - return 0; - } -#endif -#endif -#ifndef ENABLE_METIS -#ifdef ENABLE_BOOST - if (s=="BOOST") - { - return new BOOSTRenumbering; - } - else - { - std::cerr << "The method has to be BOOST!" << std::endl; - return 0; - } -#endif -#ifndef ENABLE_BOOST - std::cerr << "Error, no method compiled" << std::endl; - return 0; -#endif -#endif - } -} diff --git a/src/RENUMBER/RenumberingFactory.hxx b/src/RENUMBER/RenumberingFactory.hxx deleted file mode 100644 index 3ddd2cab8..000000000 --- a/src/RENUMBER/RenumberingFactory.hxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef RENUMBERINGFACTORY_HXX_ -#define RENUMBERINGFACTORY_HXX_ - -#include -#include "RENUMBER_Renumbering.hxx" - -namespace MED_RENUMBER -{ - Renumbering* RenumberingFactory(const std::string& s); -} - -#endif /*RENUMBERINGFACTORY_HXX_*/ diff --git a/src/RENUMBER/renumbering.cxx b/src/RENUMBER/renumbering.cxx deleted file mode 100644 index c06003951..000000000 --- a/src/RENUMBER/renumbering.cxx +++ /dev/null @@ -1,366 +0,0 @@ -// Copyright (C) 2007-2010 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include -#include -#include -#include - -#include "MEDMEM_Family.hxx" -#include "MEDMEM_Mesh.hxx" -#include "MEDMEM_Meshing.hxx" -#include "MEDMEM_MedMeshDriver.hxx" -#include "MEDMEM_Connectivity.hxx" -#include "MEDMEM_Field.hxx" -#include "MEDMEM_DriversDef.hxx" -#include "MEDMEM_Med.hxx" -#include "MEDMEM_MedMeshDriver22.hxx" - -#include "RenumberingFactory.hxx" - -#include -using namespace MEDMEM; -using namespace std; -using namespace MED_EN; -using namespace MED_RENUMBER; - -void computeNeighbour(const MESH* mesh,const medGeometryElement& Type, vector >& neighbour, int& ntot,int& nb_cell) -{ - CONNECTIVITY* conn = (CONNECTIVITY*)mesh->getConnectivityptr(); - conn->calculateFullDescendingConnectivity(MED_CELL); - const int* rev_conn=mesh->getReverseConnectivity(MED_EN::MED_DESCENDING, MED_EN::MED_CELL); - const int* rev_conn_index=mesh->getReverseConnectivityIndex(MED_EN::MED_DESCENDING, MED_EN::MED_CELL); - int nb_face= mesh->getNumberOfElementsWithPoly(MED_FACE,MED_ALL_ELEMENTS); - int nb_edge = mesh->getNumberOfElementsWithPoly(MED_EDGE,MED_ALL_ELEMENTS); - nb_cell= mesh->getNumberOfElementsWithPoly(MED_CELL,Type); - - int nb_constituent; - if(mesh->getMeshDimension()==2) - nb_constituent = nb_edge; - else if (mesh->getMeshDimension()==3) - nb_constituent = nb_face; - else - throw MEDEXCEPTION("Wrong dimension"); - - neighbour.resize(nb_cell,(list)0); - ntot=0; - for(int i=0;i& iperm) -{ - if(Type==MED_POLYHEDRA) - { - int *conn_face_index_init=(int*)mesh.getPolyhedronFacesIndex(); - int *conn_index_init=(int*)mesh.getPolyhedronIndex(MED_FULL_INTERLACE); - int *conn_init=(int*)mesh.getPolyhedronConnectivity(MED_FULL_INTERLACE); - - int *conn_index_renum=new int[nb_cell+1]; - int *conn_face_index_renum=new int[conn_index_init[nb_cell]]; - int *conn_renum=new int[conn_face_index_init[conn_index_init[nb_cell]-1]-1]; - - int i_cell,i_face,i_conn; - int iter_face=0; - int iter_conn=0; - int i2; - conn_index_renum[0]=1; - conn_face_index_renum[0]=1; - for(i_cell=0;i_cellsetNodal(conn_renum,MED_CELL,Type); - delete[] conn_renum; - delete[] conn_index_renum; - } -} - -void changeFamily(MESH* mesh, const medGeometryElement& Type, const vector& perm) -{ - int nb_families=mesh->getNumberOfFamilies(MED_CELL); - for (int i=0;igetFamily(MED_CELL,i+1); - if (!family->isOnAllElements()) - { - int nb_elem=family->getNumberOfElements(Type); - int *number=(int *)family->getNumber(Type); - for(int j=0;j mesh_names,f_names; - nb_mesh=med_struct.getNumberOfMeshes(); - nb_fields=med_struct.getNumberOfFields(); - mesh_names=med_struct.getMeshNames(); - f_names=med_struct.getFieldNames(); - if(nb_mesh!=1) - { - cout << "There are many meshes in the file" << endl; - return -1; - } - if(mesh_names[0].c_str()!=meshname) - { - cout << "Mesh name does not match" << endl; - return -1; - } - vector field_names; - vector iternumber; - vector ordernumber; - vector types; - int nb_fields_tot=0; - for (int ifield = 0; ifield < nb_fields; ifield++) - { - deque dtit=med_struct.getFieldIteration(f_names[ifield]); - for (deque::const_iterator iter =dtit.begin(); iter!=dtit.end(); iter++) - { - field_names.push_back(f_names[ifield]); - iternumber.push_back(iter->dt); - ordernumber.push_back(iter->it); - ++nb_fields_tot; - FIELD_* field = med_struct.getField(f_names[ifield],iter->dt,iter->it); - if (dynamic_cast*>(field)) - types.push_back(1); - else - types.push_back(0); - - } - } - t_read_st=clock(); - - // Reading mesh - MESH myMesh; - myMesh.setName(meshname); - MED_MESH_RDONLY_DRIVER22 *drv22=new MED_MESH_RDONLY_DRIVER22(filename_in,&myMesh); - drv22->desactivateFacesComputation(); - int newDrv=myMesh.addDriver(*drv22); - delete drv22; - myMesh.read(newDrv); - int nb_type=myMesh.getNumberOfTypesWithPoly(MED_CELL); - if (nb_type!=1) - { - cout << "Mesh must have only one type of cell" << endl; - return -1; - } - medGeometryElement *Types = myMesh.getTypesWithPoly(MED_CELL); - medGeometryElement Type=Types[0]; - delete[] Types; - - t_read_mesh=clock(); - MESH* workMesh=new MESH(myMesh); - cout << "Building the graph "; - cout.flush(); - int ntot,nb_cell; - vector > neighbour; - computeNeighbour(workMesh,Type,neighbour,ntot,nb_cell); - int* graph=new int[ntot]; - int* graph_index=new int[nb_cell+1]; - graph_index[0]=1; - int count=0; - for(int i=0;i::const_iterator it=neighbour[i].begin();it!=neighbour[i].end();++it) - { - graph[count]=*it; - ++count; - } - graph_index[i+1]=count+1; - } - - - // Compute permutation - vector iperm,perm; - Renumbering* renumb= RenumberingFactory(type_renum); - renumb->renumber(graph,graph_index,nb_cell,iperm,perm); - delete renumb; - delete workMesh; - t_compute_graph=clock(); - cout << " : " << (t_compute_graph-t_read_mesh)/(double) CLOCKS_PER_SEC << "s" << endl; - cout.flush(); - - // Connectivity - cout << "Computing connectivity"; - cout.flush(); - MESH meshRenum(myMesh); - changeConnectivity(meshRenum,Type,nb_cell,iperm); - t_connectiv=clock(); - cout << " : " << (t_connectiv-t_compute_graph)/(double) CLOCKS_PER_SEC << "s" << endl; - cout.flush(); - - // Familles - cout << "Computing families "; - cout.flush(); - changeFamily(&meshRenum,Type,perm); - int drv3=meshRenum.addDriver(MED_DRIVER,filename_out,meshRenum.getName()); - meshRenum.write(drv3); - t_family=clock(); - cout << " : " << (t_family-t_connectiv)/(double) CLOCKS_PER_SEC << "s" << endl; - cout.flush(); - - // Fields - cout << "Computing fields "; - cout.flush(); - bool exist_type; - for(int ifield=0;ifield myField(MED_DRIVER,filename_in,field_names[ifield],iternumber[ifield],ordernumber[ifield]); - FIELD newField(myField); - const SUPPORT* mySupport=newField.getSupport(); - const medGeometryElement *typesOfSupport = mySupport->getTypes(); - for(int t=0;tgetNumberOfTypes();++t) - { - if(typesOfSupport[t]==Type) - { - exist_type=true; - break; - } - } - if(exist_type) - { - for(int i=0;igetNumberOfElements(Type);++i) - { - for(int j=0;j