Changeset 1656
- Timestamp:
- 03/13/08 16:27:32 (2 years ago)
- Location:
- MOAB/trunk/tools/iMesh
- Files:
-
- 2 modified
-
iMesh_MOAB.cpp (modified) (3 diffs)
-
partest.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp
r1655 r1656 4 4 #include "MBCN.hpp" 5 5 #include "MeshTopoUtil.hpp" 6 #include "FileOptions.hpp" 7 8 #ifdef USE_MPI 9 #include "mpi.h" 10 #endif 6 11 7 12 #include <iostream> … … 13 18 bool haveDeletedEntities; 14 19 public: 15 MBiMesh() : haveDeletedEntities(false) {} 20 MBiMesh(int proc_rank = 0, int proc_size = 0) 21 : MBCore(proc_rank, proc_size), haveDeletedEntities(false) 22 {} 23 16 24 virtual ~MBiMesh(); 17 25 bool have_deleted_ents( bool reset ) { … … 233 241 iMesh_Instance *instance, int *err, int options_len) 234 242 { 235 MBInterface* core = new MBiMesh(); 243 std::string tmp_options(options, options_len); 244 FileOptions opts(tmp_options.c_str()); 245 246 MBInterface* core; 247 248 MBErrorCode result = opts.get_null_option("PARALLEL"); 249 if (MB_SUCCESS == result) { 250 #ifdef USE_MPI 251 int rank, size; 252 MPI_Comm_rank(MPI_COMM_WORLD, &rank); 253 MPI_Comm_size(MPI_COMM_WORLD, &size); 254 core = new MBiMesh(rank, size); 255 #else 256 mError->set_last_error( "PARALLEL option not valid, this instance" 257 " compiled for serial execution.\n" ); 258 *err = MB_NOT_IMPLEMENTED; 259 return; 260 #endif 261 } 262 else core = new MBiMesh(); 263 236 264 *instance = reinterpret_cast<iMesh_Instance>(core); 237 265 if (0 == *instance) { -
MOAB/trunk/tools/iMesh/partest.cpp
r1655 r1656 5 5 6 6 7 #define IMESH_ASSERT(ierr) if (ierr!=0) printf("imesh asser \n");7 #define IMESH_ASSERT(ierr) if (ierr!=0) printf("imesh assert\n"); 8 8 #define IMESH_NULL 0 9 9 … … 17 17 18 18 imesh = IMESH_NULL; 19 iMesh_newMesh(" ", &imesh, &ierr, 0);19 iMesh_newMesh("PARALLEL", &imesh, &ierr, 8); 20 20 IMESH_ASSERT(ierr); 21 21
![(please configure the [header_logo] section in trac.ini)](/projects/ITAPS/chrome/common/trac_banner.png)