* For each run, the input filename and restart information (if needed) must * * be given on the command line. For non-restarted case, command line is: * * * * executable * *
| 319 | * * |
| 320 | *******************************************************************************/ |
| 321 | int |
| 322 | main(int argc, char* argv[]) |
| 323 | { |
| 324 | // Initialize IBAMR and libraries. Deinitialization is handled by this object as well. |
| 325 | IBTKInit ibtk_init(argc, argv, MPI_COMM_WORLD); |
| 326 | const LibMeshInit& init = ibtk_init.getLibMeshInit(); |
| 327 | |
| 328 | // Increase maximum patch data component indices |
| 329 | SAMRAIManager::setMaxNumberPatchDataEntries(2500); |
| 330 | |
| 331 | { // cleanup dynamically allocated objects prior to shutdown |
| 332 | |
| 333 | // Parse command line options, set some standard options from the input |
| 334 | // file, initialize the restart database (if this is a restarted run), |
| 335 | // and enable file logging. |
| 336 | Pointer<AppInitializer> app_initializer = new AppInitializer(argc, argv, "IBLevelSet.log"); |
| 337 | Pointer<Database> input_db = app_initializer->getInputDatabase(); |
| 338 | |
| 339 | // Get various standard options set in the input file. |
| 340 | const bool dump_viz_data = app_initializer->dumpVizData(); |
| 341 | const int viz_dump_interval = app_initializer->getVizDumpInterval(); |
| 342 | const bool uses_visit = dump_viz_data && !app_initializer->getVisItDataWriter().isNull(); |
| 343 | #ifdef LIBMESH_HAVE_EXODUS_API |
| 344 | const bool uses_exodus = dump_viz_data && !app_initializer->getExodusIIFilename().empty(); |
| 345 | #else |
| 346 | const bool uses_exodus = false; |
| 347 | if (!app_initializer->getExodusIIFilename().empty()) |
| 348 | { |
| 349 | plog << "WARNING: libMesh was compiled without Exodus support, so no " |
| 350 | << "Exodus output will be written in this program.\n"; |
| 351 | } |
| 352 | #endif |
| 353 | const string exodus_filename = app_initializer->getExodusIIFilename(); |
| 354 | |
| 355 | const bool dump_restart_data = app_initializer->dumpRestartData(); |
| 356 | const int restart_dump_interval = app_initializer->getRestartDumpInterval(); |
| 357 | const string restart_dump_dirname = app_initializer->getRestartDumpDirectory(); |
| 358 | if (dump_restart_data && (restart_dump_interval > 0) && !restart_dump_dirname.empty()) |
| 359 | { |
| 360 | Utilities::recursiveMkdir(restart_dump_dirname); |
| 361 | } |
| 362 | |
| 363 | const bool dump_postproc_data = app_initializer->dumpPostProcessingData(); |
| 364 | const int postproc_data_dump_interval = app_initializer->getPostProcessingDataDumpInterval(); |
| 365 | const string postproc_data_dump_dirname = app_initializer->getPostProcessingDataDumpDirectory(); |
| 366 | if (dump_postproc_data && (postproc_data_dump_interval > 0) && !postproc_data_dump_dirname.empty()) |
| 367 | { |
| 368 | Utilities::recursiveMkdir(postproc_data_dump_dirname); |
| 369 | } |
| 370 | |
| 371 | const bool dump_timer_data = app_initializer->dumpTimerData(); |
| 372 | const int timer_dump_interval = app_initializer->getTimerDumpInterval(); |
| 373 | |
| 374 | // Setup solid information |
| 375 | circle.R = input_db->getDouble("R"); |
| 376 | circle.X0[0] = input_db->getDouble("XCOM"); |
| 377 | circle.X0[1] = input_db->getDouble("YCOM"); |
| 378 | #if (NDIM == 3) |
nothing calls this directly
no test coverage detected