From: eap Date: Thu, 18 Dec 2008 20:33:08 +0000 (+0000) Subject: MEDMEM Industrialization 2008 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=86c77688de7223357a8491c403d455270f6a366b;p=tools%2Fmedcoupling.git MEDMEM Industrialization 2008 --- diff --git a/src/ParaMEDMEM/ParaFIELD.cxx b/src/ParaMEDMEM/ParaFIELD.cxx index 94450a82f..86e45f030 100644 --- a/src/ParaMEDMEM/ParaFIELD.cxx +++ b/src/ParaMEDMEM/ParaFIELD.cxx @@ -143,7 +143,8 @@ attached and it therefore recreates one. It therefore takes ownership over _supp ParaFIELD::ParaFIELD(MEDMEM::FIELD* subdomain_field, const ProcessorGroup& proc_group): _field(subdomain_field), _support(new UnstructuredParaSUPPORT(subdomain_field->getSupport(), proc_group)), -_component_topology(ComponentTopology(_field->getNumberOfComponents())), +_component_topology(_field->getNumberOfComponents()), +// _component_topology(ComponentTopology(_field->getNumberOfComponents())), _has_field_ownership(false), _has_support_ownership(true) { diff --git a/src/ParaMEDMEM/ParaFIELD.hxx b/src/ParaMEDMEM/ParaFIELD.hxx index 2fcd5356b..7141e51b8 100644 --- a/src/ParaMEDMEM/ParaFIELD.hxx +++ b/src/ParaMEDMEM/ParaFIELD.hxx @@ -42,7 +42,8 @@ public: private: MEDMEM::FIELD* getSupportVolumes(const MEDMEM::SUPPORT& support) const; MEDMEM::FIELD* _field; - const ParaMEDMEM::ComponentTopology& _component_topology; + ParaMEDMEM::ComponentTopology _component_topology; +// const ParaMEDMEM::ComponentTopology& _component_topology; ParaMEDMEM::Topology* _topology; const ParaMEDMEM::ParaSUPPORT* _support; diff --git a/src/ParaMEDMEM/Test/ParaMEDMEMTest.hxx b/src/ParaMEDMEM/Test/ParaMEDMEMTest.hxx index 4972bd510..91dc11521 100644 --- a/src/ParaMEDMEM/Test/ParaMEDMEMTest.hxx +++ b/src/ParaMEDMEM/Test/ParaMEDMEMTest.hxx @@ -32,40 +32,40 @@ 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_2D_P0P1); - CPPUNIT_TEST(testIntersectionDEC_2D_P1P0); - CPPUNIT_TEST(testIntersectionDEC_2D_P1dP0); - - CPPUNIT_TEST(testIntersectionDEC_3D); - CPPUNIT_TEST(testIntersectionDEC_3D_P0P1); - CPPUNIT_TEST(testIntersectionDEC_3D_P1P0); - CPPUNIT_TEST(testIntersectionDEC_3D_P1dP0); - - 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(testAsynchronousEqualIntersectionDEC_2D_P0P1); +// 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_2D_P0P1); +// CPPUNIT_TEST(testIntersectionDEC_2D_P1P0); +// CPPUNIT_TEST(testIntersectionDEC_2D_P1dP0); + +// CPPUNIT_TEST(testIntersectionDEC_3D); +// CPPUNIT_TEST(testIntersectionDEC_3D_P0P1); +// CPPUNIT_TEST(testIntersectionDEC_3D_P1P0); +// CPPUNIT_TEST(testIntersectionDEC_3D_P1dP0); + +// 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(testAsynchronousEqualIntersectionDEC_2D_P0P1); CPPUNIT_TEST(testAsynchronousFasterSourceIntersectionDEC_2D_P1P0); CPPUNIT_TEST(testAsynchronousSlowerSourceIntersectionDEC_2D_P1dP0); CPPUNIT_TEST_SUITE_END(); diff --git a/src/ParaMEDMEM/Test/ParaMEDMEMTest_IntersectionDEC.cxx b/src/ParaMEDMEM/Test/ParaMEDMEMTest_IntersectionDEC.cxx index 75bc9cbb4..fd4cf270e 100644 --- a/src/ParaMEDMEM/Test/ParaMEDMEMTest_IntersectionDEC.cxx +++ b/src/ParaMEDMEM/Test/ParaMEDMEMTest_IntersectionDEC.cxx @@ -602,15 +602,15 @@ void ParaMEDMEMTest::testAsynchronousFastSourceIntersectionDEC_2D() } void ParaMEDMEMTest::testAsynchronousEqualIntersectionDEC_2D_P0P1() { - //testAsynchronousIntersectionDEC_2D(0.1,1,0.1,1,true,true,true, "P0","P1"); + testAsynchronousIntersectionDEC_2D(0.1,1,0.1,1,true,true,true, "P0","P1"); } void ParaMEDMEMTest::testAsynchronousFasterSourceIntersectionDEC_2D_P1P0() { - //testAsynchronousIntersectionDEC_2D(0.09,1,0.1,1,true,true,true, "P1","P0"); + testAsynchronousIntersectionDEC_2D(0.09,1,0.1,1,true,true,true, "P1","P0"); } void ParaMEDMEMTest::testAsynchronousSlowerSourceIntersectionDEC_2D_P1dP0() { - //testAsynchronousIntersectionDEC_2D(0.11,1,0.1,1,true,true,true, "P1d","P0"); + testAsynchronousIntersectionDEC_2D(0.11,1,0.1,1,true,true,true, "P1d","P0"); } /*! @@ -660,7 +660,7 @@ void ParaMEDMEMTest::testAsynchronousIntersectionDEC_2D(double dtA, double tmaxA // MEDMEM::FIELD* field; ParaMEDMEM::ParaMESH* paramesh; ParaMEDMEM::ParaFIELD* parafield; - ParaMEDMEM::ParaSUPPORT* parasupport ; + ParaMEDMEM::ParaSUPPORT* parasupport = 0; double * value ; ICoCo::Field* icocofield ; @@ -787,6 +787,8 @@ void ParaMEDMEMTest::testAsynchronousIntersectionDEC_2D(double dtA, double tmaxA } double* value = const_cast (parafield->getField()->getValue()); int nb_local=parafield->getField()->getSupport()->getNumberOfElements(MED_EN::MED_ALL_ELEMENTS); + if ( srcMethod == "P1d" ) + nb_local *= support->getTypes()[0] % 100; for (int i=0; igetEntity() != MED_EN::MED_NODE ) // getVolumeIntegral() is not defined on nodes + CPPUNIT_ASSERT_DOUBLES_EQUAL(vi,time*10000,0.001); } } @@ -830,7 +833,7 @@ void ParaMEDMEMTest::testAsynchronousIntersectionDEC_2D(double dtA, double tmaxA delete mesh ; delete paramesh ; delete parafield ; - delete parasupport ; + //delete parasupport ; delete [] value ; delete icocofield ; delete support ;