| 311 | *******************************************************************************/ |
| 312 | |
| 313 | int |
| 314 | main(int argc, char** argv) |
| 315 | { |
| 316 | // Initialize IBAMR and libraries. Deinitialization is handled by this object as well. |
| 317 | IBTKInit ibtk_init(argc, argv, MPI_COMM_WORLD); |
| 318 | const LibMeshInit& init = ibtk_init.getLibMeshInit(); |
| 319 | |
| 320 | PetscOptionsSetValue(nullptr, "-ksp_rtol", "1e-16"); |
| 321 | PetscOptionsSetValue(nullptr, "-ksp_rtol", "1e-16"); |
| 322 | PetscOptionsSetValue(nullptr, "-stokes_ksp_atol", "1e-14"); |
| 323 | PetscOptionsSetValue(nullptr, "-stokes_ksp_rtol", "1e-14"); |
| 324 | |
| 325 | { // cleanup dynamically allocated objects prior to shutdown |
| 326 | // prevent a warning about timer initializations |
| 327 | TimerManager::createManager(nullptr); |
| 328 | |
| 329 | // Parse command line options, set some standard options from the input |
| 330 | // file, initialize the restart database (if this is a restarted run), |
| 331 | // and enable file logging. |
| 332 | Pointer<AppInitializer> app_initializer = new AppInitializer(argc, argv, "IB.log"); |
| 333 | Pointer<Database> input_db = app_initializer->getInputDatabase(); |
| 334 | |
| 335 | // Get various standard options set in the input file. |
| 336 | const bool dump_viz_data = app_initializer->dumpVizData(); |
| 337 | const int viz_dump_interval = app_initializer->getVizDumpInterval(); |
| 338 | const bool uses_visit = dump_viz_data && app_initializer->getVisItDataWriter(); |
| 339 | #ifdef LIBMESH_HAVE_EXODUS_API |
| 340 | const bool uses_exodus = dump_viz_data && !app_initializer->getExodusIIFilename().empty(); |
| 341 | #else |
| 342 | const bool uses_exodus = false; |
| 343 | if (!app_initializer->getExodusIIFilename().empty()) |
| 344 | { |
| 345 | plog << "WARNING: libMesh was compiled without Exodus support, so no " |
| 346 | << "Exodus output will be written in this program.\n"; |
| 347 | } |
| 348 | #endif |
| 349 | const string block1_exodus_filename = app_initializer->getExodusIIFilename("block1"); |
| 350 | const string block2_exodus_filename = app_initializer->getExodusIIFilename("block2"); |
| 351 | const string beam_exodus_filename = app_initializer->getExodusIIFilename("beam"); |
| 352 | |
| 353 | const bool dump_restart_data = app_initializer->dumpRestartData(); |
| 354 | const int restart_dump_interval = app_initializer->getRestartDumpInterval(); |
| 355 | const string restart_dump_dirname = app_initializer->getRestartDumpDirectory(); |
| 356 | |
| 357 | // Create a simple FE mesh. |
| 358 | const double dx = input_db->getDouble("DX"); |
| 359 | const double ds_block = input_db->getDouble("BLOCK_MFAC") * dx; |
| 360 | const double ds_beam = input_db->getDouble("BEAM_MFAC") * dx; |
| 361 | |
| 362 | string block_elem_type = input_db->getStringWithDefault("BLOCK_ELEM_TYPE", "QUAD9"); |
| 363 | string beam_elem_type = input_db->getStringWithDefault("BEAM_ELEM_TYPE", "QUAD9"); |
| 364 | |
| 365 | Mesh block1_mesh(init.comm(), NDIM); |
| 366 | MeshTools::Generation::build_square(block1_mesh, |
| 367 | ceil(0.5 / ds_block), |
| 368 | ceil(0.5 / ds_block), |
| 369 | 0.0, |
| 370 | 0.5, |
nothing calls this directly
no test coverage detected