* 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 * *
| 73 | * * |
| 74 | *******************************************************************************/ |
| 75 | int |
| 76 | main(int argc, char* argv[]) |
| 77 | { |
| 78 | // Initialize IBAMR and libraries. Deinitialization is handled by this object as well. |
| 79 | IBTKInit ibtk_init(argc, argv, MPI_COMM_WORLD); |
| 80 | |
| 81 | { // cleanup dynamically allocated objects prior to shutdown |
| 82 | |
| 83 | // Parse command line options, set some standard options from the input |
| 84 | // file, initialize the restart database (if this is a restarted run), |
| 85 | // and enable file logging. |
| 86 | Pointer<AppInitializer> app_initializer = new AppInitializer(argc, argv, "CIB.log"); |
| 87 | Pointer<Database> input_db = app_initializer->getInputDatabase(); |
| 88 | |
| 89 | // Get various standard options set in the input file. |
| 90 | const bool dump_viz_data = app_initializer->dumpVizData(); |
| 91 | const int viz_dump_interval = app_initializer->getVizDumpInterval(); |
| 92 | const bool uses_visit = dump_viz_data && !app_initializer->getVisItDataWriter().isNull(); |
| 93 | |
| 94 | const bool dump_restart_data = app_initializer->dumpRestartData(); |
| 95 | const int restart_dump_interval = app_initializer->getRestartDumpInterval(); |
| 96 | const string restart_dump_dirname = app_initializer->getRestartDumpDirectory(); |
| 97 | |
| 98 | const bool dump_postproc_data = app_initializer->dumpPostProcessingData(); |
| 99 | const int postproc_data_dump_interval = app_initializer->getPostProcessingDataDumpInterval(); |
| 100 | const string postproc_data_dump_dirname = app_initializer->getPostProcessingDataDumpDirectory(); |
| 101 | if (dump_postproc_data && (postproc_data_dump_interval > 0) && !postproc_data_dump_dirname.empty()) |
| 102 | { |
| 103 | Utilities::recursiveMkdir(postproc_data_dump_dirname); |
| 104 | } |
| 105 | |
| 106 | const bool dump_timer_data = app_initializer->dumpTimerData(); |
| 107 | const int timer_dump_interval = app_initializer->getTimerDumpInterval(); |
| 108 | |
| 109 | // Create major algorithm and data objects that comprise the |
| 110 | // application. These objects are configured from the input database |
| 111 | // and, if this is a restarted run, from the restart database. |
| 112 | |
| 113 | // INS integrator |
| 114 | Pointer<INSStaggeredHierarchyIntegrator> navier_stokes_integrator = new INSStaggeredHierarchyIntegrator( |
| 115 | "INSStaggeredHierarchyIntegrator", |
| 116 | app_initializer->getComponentDatabase("INSStaggeredHierarchyIntegrator")); |
| 117 | |
| 118 | // CIB method |
| 119 | unsigned int num_structures = 1; |
| 120 | Pointer<CIBMethod> ib_method_ops = |
| 121 | new CIBMethod("CIBMethod", app_initializer->getComponentDatabase("CIBMethod"), num_structures); |
| 122 | |
| 123 | // Krylov solver for INS integrator that solves for [u,p,U,L] |
| 124 | Pointer<CIBStaggeredStokesSolver> CIBSolver = |
| 125 | new CIBStaggeredStokesSolver("CIBStaggeredStokesSolver", |
| 126 | input_db->getDatabase("CIBStaggeredStokesSolver"), |
| 127 | navier_stokes_integrator, |
| 128 | ib_method_ops, |
| 129 | "SP_"); |
| 130 | |
| 131 | // Register the Krylov solver with INS integrator |
| 132 | navier_stokes_integrator->setStokesSolver(CIBSolver); |
nothing calls this directly
no test coverage detected