| 112 | const std::string DummyRefine::s_op_name = "DUMMY_REFINE"; |
| 113 | |
| 114 | int |
| 115 | main(int argc, char* argv[]) |
| 116 | { |
| 117 | // Initialize IBAMR and libraries. Deinitialization is handled by this object as well. |
| 118 | IBTKInit ibtk_init(argc, argv, MPI_COMM_WORLD); |
| 119 | |
| 120 | { // cleanup dynamically allocated objects prior to shutdown |
| 121 | |
| 122 | // Parse command line options, set some standard options from the input |
| 123 | // file, initialize the restart database (if this is a restarted run), |
| 124 | // and enable file logging. |
| 125 | Pointer<AppInitializer> app_initializer = new AppInitializer(argc, argv, "adv_diff.log"); |
| 126 | Pointer<Database> input_db = app_initializer->getInputDatabase(); |
| 127 | |
| 128 | // Get various standard options set in the input file. |
| 129 | const bool dump_viz_data = app_initializer->dumpVizData(); |
| 130 | const int viz_dump_interval = app_initializer->getVizDumpInterval(); |
| 131 | const bool uses_visit = dump_viz_data && app_initializer->getVisItDataWriter(); |
| 132 | |
| 133 | const bool dump_restart_data = app_initializer->dumpRestartData(); |
| 134 | const int restart_dump_interval = app_initializer->getRestartDumpInterval(); |
| 135 | const string restart_dump_dirname = app_initializer->getRestartDumpDirectory(); |
| 136 | |
| 137 | const bool dump_timer_data = app_initializer->dumpTimerData(); |
| 138 | const int timer_dump_interval = app_initializer->getTimerDumpInterval(); |
| 139 | |
| 140 | Pointer<Database> main_db = app_initializer->getComponentDatabase("Main"); |
| 141 | |
| 142 | // Create major algorithm and data objects that comprise the |
| 143 | // application. These objects are configured from the input database |
| 144 | // and, if this is a restarted run, from the restart database. |
| 145 | Pointer<AdvDiffHierarchyIntegrator> time_integrator; |
| 146 | const string solver_type = main_db->getStringWithDefault("solver_type", "GODUNOV"); |
| 147 | if (solver_type == "GODUNOV") |
| 148 | { |
| 149 | Pointer<AdvectorExplicitPredictorPatchOps> predictor = new AdvectorExplicitPredictorPatchOps( |
| 150 | "AdvectorExplicitPredictorPatchOps", |
| 151 | app_initializer->getComponentDatabase("AdvectorExplicitPredictorPatchOps")); |
| 152 | time_integrator = new AdvDiffPredictorCorrectorHierarchyIntegrator( |
| 153 | "AdvDiffPredictorCorrectorHierarchyIntegrator", |
| 154 | app_initializer->getComponentDatabase("AdvDiffPredictorCorrectorHierarchyIntegrator"), |
| 155 | predictor); |
| 156 | } |
| 157 | else if (solver_type == "SEMI_IMPLICIT") |
| 158 | { |
| 159 | time_integrator = new AdvDiffSemiImplicitHierarchyIntegrator( |
| 160 | "AdvDiffSemiImplicitHierarchyIntegrator", |
| 161 | app_initializer->getComponentDatabase("AdvDiffSemiImplicitHierarchyIntegrator")); |
| 162 | } |
| 163 | else |
| 164 | { |
| 165 | TBOX_ERROR("Unsupported solver type: " << solver_type << "\n" |
| 166 | << "Valid options are: GODUNOV, SEMI_IMPLICIT"); |
| 167 | } |
| 168 | Pointer<CartesianGridGeometry<NDIM>> grid_geometry = new CartesianGridGeometry<NDIM>( |
| 169 | "CartesianGeometry", app_initializer->getComponentDatabase("CartesianGeometry")); |
| 170 | Pointer<PatchHierarchy<NDIM>> patch_hierarchy = new PatchHierarchy<NDIM>("PatchHierarchy", grid_geometry); |
| 171 | Pointer<StandardTagAndInitialize<NDIM>> error_detector = |
nothing calls this directly
no test coverage detected