22%{
33#include < mpi.h>
44#include < vector>
5+ #include < pcu_defines.h>
6+ #include < PCU.h>
57#include < PCU_C.h>
68#include < pcu_util.h>
79#include < gmi.h>
4042
4143/* PCU RELATED WRAPPERS */
4244/* ==== FROM PCU.h ====*/
43- MPI_Comm PCU_Get_Comm (void );
44- int PCU_Comm_Init (void );
45- int PCU_Comm_Free (void );
45+ int PCU_Comm_Init (PCU_t* h);
46+ int PCU_Comm_Free (PCU_t* h);
4647
47- int PCU_Comm_Self (void );
48- int PCU_Comm_Peers (void );
48+ int PCU_Comm_Self (PCU_t h );
49+ int PCU_Comm_Peers (PCU_t h );
4950double PCU_Time (void );
50- bool PCU_Comm_Initialized (void );
51+ bool PCU_Comm_Initialized (PCU_t h);
52+ %include<pcu_defines.h>
53+ %include<PCU.h>
54+ %template (Add_int) pcu::PCU::Add<int >;
55+ %template (Min_int) pcu::PCU::Min<int >;
56+ %template (Max_int) pcu::PCU::Max<int >;
57+ %template (Exscan_int) pcu::PCU::Exscan<int >;
58+ %template (ALLgather_int) pcu::PCU::Allgather<int >;
59+ %template (Add_size_t) pcu::PCU::Add<size_t >;
60+ %template (Min_size_t) pcu::PCU::Min<size_t >;
61+ %template (Max_size_t) pcu::PCU::Max<size_t >;
62+ %template (Exscan_size_t) pcu::PCU::Exscan<size_t >;
63+ %template (ALLgather_size_t) pcu::PCU::Allgather<size_t >;
64+ %template (Add_long) pcu::PCU::Add<long >;
65+ %template (Min_long) pcu::PCU::Min<long >;
66+ %template (Max_long) pcu::PCU::Max<long >;
67+ %template (Exscan_long) pcu::PCU::Exscan<long >;
68+ %template (ALLgather_long) pcu::PCU::Allgather<long >;
69+ %template (Add_double) pcu::PCU::Add<double >;
70+ %template (Min_double) pcu::PCU::Min<double >;
71+ %template (Max_double) pcu::PCU::Max<double >;
72+ %template (Exscan_double) pcu::PCU::Exscan<double >;
73+ %template (ALLgather_double) pcu::PCU::Allgather<double >;
5174
5275/* ==== FROM pcu_util.h ====*/
5376void PCU_Assert_Fail (const char * msg);
@@ -221,7 +244,7 @@ void lion_set_verbosity(int lvl);
221244 local_min = val;
222245 }
223246 self->end (it);
224- PCU_Min_Doubles (&local_min, 1 );
247+ self-> getPCU ()-> Min (&local_min, 1 );
225248 return local_min;
226249 }
227250 double getMaxOfScalarField (apf::Field* field)
@@ -238,7 +261,7 @@ void lion_set_verbosity(int lvl);
238261 local_max = val;
239262 }
240263 self->end (it);
241- PCU_Max_Doubles (&local_max, 1 );
264+ self-> getPCU ()-> Max (&local_max, 1 );
242265 return local_max;
243266 }
244267 bool isBoundingModelRegion (int rtag, int dim, int tag)
@@ -262,16 +285,17 @@ void lion_set_verbosity(int lvl);
262285
263286#define __attribute__ (x )
264287%ignore apf::fail;
288+ %ignore apf::writeCGNS;
265289%include<apf.h>
266290%include<apfNumbering.h>
267291%include<apfShape.h>
268292
269293
270294
271295namespace apf {
272- apf::Mesh2* makeEmptyMdsMesh (gmi_model* model, int dim, bool isMatched);
273- apf::Mesh2* loadMdsMesh (const char * modelfile, const char * meshfile);
274- apf::Mesh2* loadMdsMesh (gmi_model* model, const char * meshfile);
296+ apf::Mesh2* makeEmptyMdsMesh (gmi_model* model, int dim, bool isMatched, pcu::PCU *PCUObj );
297+ apf::Mesh2* loadMdsMesh (const char * modelfile, const char * meshfile, pcu::PCU *PCUObj );
298+ apf::Mesh2* loadMdsMesh (gmi_model* model, const char * meshfile, pcu::PCU *PCUObj );
275299 void writeASCIIVtkFiles (const char * prefix, apf::Mesh2* m);
276300 /* void writeVtkFiles(const char* prefix, apf::Mesh* m, int cellDim = -1); */
277301 /* void writeVtkFiles(const char* prefix, apf::Mesh* m, */
0 commit comments