| 330 | *******************************************************************************/ |
| 331 | |
| 332 | int |
| 333 | main(int argc, char* argv[]) |
| 334 | { |
| 335 | // Initialize libMesh, PETSc, MPI, and SAMRAI. |
| 336 | LibMeshInit init(argc, argv); |
| 337 | SAMRAI_MPI::setCommunicator(PETSC_COMM_WORLD); |
| 338 | SAMRAI_MPI::setCallAbortInSerialInsteadOfExit(); |
| 339 | SAMRAIManager::startup(); |
| 340 | |
| 341 | { // cleanup dynamically allocated objects prior to shutdown |
| 342 | |
| 343 | // Parse command line options, set some standard options from the input |
| 344 | // file, initialize the restart database (if this is a restarted run), |
| 345 | // and enable file logging. |
| 346 | tbox::Pointer<AppInitializer> app_initializer = new AppInitializer(argc, argv, "IB.log"); |
| 347 | tbox::Pointer<tbox::Database> input_db = app_initializer->getInputDatabase(); |
| 348 | |
| 349 | // Get various standard options set in the input file. |
| 350 | const bool dump_viz_data = app_initializer->dumpVizData(); |
| 351 | const int viz_dump_interval = app_initializer->getVizDumpInterval(); |
| 352 | const bool uses_visit = dump_viz_data && app_initializer->getVisItDataWriter(); |
| 353 | |
| 354 | const bool uses_exodus = dump_viz_data && !app_initializer->getExodusIIFilename().empty(); |
| 355 | |
| 356 | const string viz_dump_dirname = app_initializer->getVizDumpDirectory(); |
| 357 | const string beam_filename = viz_dump_dirname + "/beam.ex2"; |
| 358 | const string bndry_beam_filename = viz_dump_dirname + "/bndry_beam.ex2"; |
| 359 | const string bndry_housing_filename = viz_dump_dirname + "/bndry_housing.ex2"; |
| 360 | |
| 361 | const bool dump_postproc_data = app_initializer->dumpPostProcessingData(); |
| 362 | const int postproc_data_dump_interval = app_initializer->getPostProcessingDataDumpInterval(); |
| 363 | const string postproc_data_dump_dirname = app_initializer->getPostProcessingDataDumpDirectory(); |
| 364 | if (dump_postproc_data && (postproc_data_dump_interval > 0) && !postproc_data_dump_dirname.empty()) |
| 365 | { |
| 366 | Utilities::recursiveMkdir(postproc_data_dump_dirname); |
| 367 | } |
| 368 | |
| 369 | const bool dump_timer_data = app_initializer->dumpTimerData(); |
| 370 | const int timer_dump_interval = app_initializer->getTimerDumpInterval(); |
| 371 | |
| 372 | // Create a simple FE mesh. |
| 373 | |
| 374 | string housing_elem_type = input_db->getStringWithDefault("HOUSING_ELEM_TYPE", "HEX8"); |
| 375 | string beam_elem_type = input_db->getString("BEAM_ELEM_TYPE"); |
| 376 | double mfac_b = input_db->getDouble("MFAC"); |
| 377 | const double n_cycles = input_db->getDouble("NCYCLE"); |
| 378 | if (beam_elem_type == "TET10" || beam_elem_type == "HEX27") mfac_b *= 2.0; |
| 379 | dx = input_db->getDouble("DX"); |
| 380 | const double ds_b = mfac_b * dx; |
| 381 | |
| 382 | lambda_s = input_db->getDouble("LAMBDA_S"); |
| 383 | |
| 384 | mu_s = input_db->getDouble("MU_S"); |
| 385 | bulk_mod = input_db->getDouble("BULK_MOD"); |
| 386 | shear_mod = input_db->getDouble("SHEAR_MOD"); |
| 387 | |
| 388 | rho_s = input_db->getDouble("RHO_S"); |
| 389 |
nothing calls this directly
no test coverage detected