* 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 * *
| 142 | * * |
| 143 | *******************************************************************************/ |
| 144 | int |
| 145 | main(int argc, char* argv[]) |
| 146 | { |
| 147 | // Initialize PETSc, MPI, and SAMRAI. |
| 148 | IBTKInit ibtk_init(argc, argv, MPI_COMM_WORLD); |
| 149 | |
| 150 | // Increase maximum patch data component indices |
| 151 | SAMRAIManager::setMaxNumberPatchDataEntries(2500); |
| 152 | |
| 153 | { // cleanup dynamically allocated objects prior to shutdown |
| 154 | |
| 155 | // Parse command line options, set some standard options from the input |
| 156 | // file, initialize the restart database (if this is a restarted run), |
| 157 | // and enable file logging. |
| 158 | Pointer<AppInitializer> app_initializer = new AppInitializer(argc, argv, "IBLevelSet.log"); |
| 159 | Pointer<Database> input_db = app_initializer->getInputDatabase(); |
| 160 | |
| 161 | // Get various standard options set in the input file. |
| 162 | const bool dump_viz_data = app_initializer->dumpVizData(); |
| 163 | const int viz_dump_interval = app_initializer->getVizDumpInterval(); |
| 164 | const bool uses_visit = dump_viz_data && !app_initializer->getVisItDataWriter().isNull(); |
| 165 | |
| 166 | const bool dump_restart_data = app_initializer->dumpRestartData(); |
| 167 | const int restart_dump_interval = app_initializer->getRestartDumpInterval(); |
| 168 | const string restart_dump_dirname = app_initializer->getRestartDumpDirectory(); |
| 169 | if (dump_restart_data && (restart_dump_interval > 0) && !restart_dump_dirname.empty()) |
| 170 | { |
| 171 | Utilities::recursiveMkdir(restart_dump_dirname); |
| 172 | } |
| 173 | |
| 174 | const bool dump_postproc_data = app_initializer->dumpPostProcessingData(); |
| 175 | const int postproc_data_dump_interval = app_initializer->getPostProcessingDataDumpInterval(); |
| 176 | const string postproc_data_dump_dirname = app_initializer->getPostProcessingDataDumpDirectory(); |
| 177 | if (dump_postproc_data && (postproc_data_dump_interval > 0) && !postproc_data_dump_dirname.empty()) |
| 178 | { |
| 179 | Utilities::recursiveMkdir(postproc_data_dump_dirname); |
| 180 | } |
| 181 | |
| 182 | const bool dump_timer_data = app_initializer->dumpTimerData(); |
| 183 | const int timer_dump_interval = app_initializer->getTimerDumpInterval(); |
| 184 | |
| 185 | // Setup solid information |
| 186 | circle.R = input_db->getDouble("R"); |
| 187 | circle.X0[0] = input_db->getDouble("XCOM"); |
| 188 | circle.X0[1] = input_db->getDouble("YCOM"); |
| 189 | #if (NDIM == 3) |
| 190 | circle.X0[2] = input_db->getDouble("ZCOM"); |
| 191 | #endif |
| 192 | circle.Uinf = input_db->getDouble("UINF"); |
| 193 | circle.freq = input_db->getDouble("FREQ"); |
| 194 | |
| 195 | // Create major algorithm and data objects that comprise the |
| 196 | // application. These objects are configured from the input database |
| 197 | // and, if this is a restarted run, from the restart database. |
| 198 | Pointer<INSVCStaggeredHierarchyIntegrator> navier_stokes_integrator = |
| 199 | new INSVCStaggeredConservativeHierarchyIntegrator( |
| 200 | "INSVCStaggeredConservativeHierarchyIntegrator", |
| 201 | app_initializer->getComponentDatabase("INSVCStaggeredConservativeHierarchyIntegrator")); |
nothing calls this directly
no test coverage detected