From 6de5196be1ad54aa062ae81e62d59361c81b1fb1 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 8 Jun 2012 10:54:30 +0000 Subject: [PATCH] Make DirectedBoundingBox available at runtime via InterpolationOptions Add -dbb option --- src/ParaMEDMEMTest/test_perf.cxx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/ParaMEDMEMTest/test_perf.cxx b/src/ParaMEDMEMTest/test_perf.cxx index 413b363cf..b34fa2f19 100644 --- a/src/ParaMEDMEMTest/test_perf.cxx +++ b/src/ParaMEDMEMTest/test_perf.cxx @@ -55,7 +55,8 @@ 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); + int nproc_source, double epsilon, bool tri, bool all, + bool dbb); void get_time( float *telps, float *tuser, float *tsys, float *tcpu ); int main(int argc, char *argv[]) @@ -67,6 +68,7 @@ int main(int argc, char *argv[]) int count=0; bool tri=false; bool all=false; + bool dbb=false; MPI_Init(&argc,&argv); @@ -99,6 +101,9 @@ int main(int argc, char *argv[]) else if( strcmp(argv[i],"-all") == 0 ){ all = true; } + else if( strcmp(argv[i],"-dbb") == 0 ){ + dbb = true; + } } if( count != 4 ){ @@ -107,14 +112,15 @@ int main(int argc, char *argv[]) } MPI_Comm_rank(MPI_COMM_WORLD,&rank); - testInterpKernelDEC_2D(filename1,meshname1,filename2,meshname2,nproc_source,epsilon,tri,all); + testInterpKernelDEC_2D(filename1,meshname1,filename2,meshname2,nproc_source,epsilon,tri,all,dbb); MPI_Finalize(); } void testInterpKernelDEC_2D(const string& filename_xml1, const string& meshname1, const string& filename_xml2, const string& meshname2, - int nproc_source, double epsilon, bool tri, bool all) + int nproc_source, double epsilon, bool tri, bool all, + bool dbb) { float tcpu, tcpu_u, tcpu_s, telps; int size; @@ -146,6 +152,8 @@ void testInterpKernelDEC_2D(const string& filename_xml1, const string& meshname1 else dec.setIntersectionType(INTERP_KERNEL::Convex); + dec.setUseDirectedBoundingBox(dbb); + ParaMEDMEM::MEDCouplingUMesh* mesh; ParaMEDMEM::ParaMESH* paramesh; ParaMEDMEM::ParaFIELD* parafield; @@ -181,6 +189,7 @@ void testInterpKernelDEC_2D(const string& filename_xml1, const string& meshname1 ParaMEDMEM::ComponentTopology comptopo; parafield = new ParaFIELD(ON_CELLS, NO_TIME, paramesh, comptopo); + parafield->getField()->setNature( Integral ); int nb_local=mesh->getNumberOfCells(); double *value=parafield->getField()->getArray()->getPointer(); @@ -214,6 +223,7 @@ void testInterpKernelDEC_2D(const string& filename_xml1, const string& meshname1 paramesh=new ParaMESH (mesh,*target_group,"target mesh"); ParaMEDMEM::ComponentTopology comptopo; parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo); + parafield->getField()->setNature( Integral ); int nb_local=mesh->getNumberOfCells(); double *value=parafield->getField()->getArray()->getPointer(); -- 2.39.2