| 207 | *******************************************************************************/ |
| 208 | |
| 209 | int |
| 210 | main(int argc, char* argv[]) |
| 211 | { |
| 212 | // Initialize IBAMR and libraries. Deinitialization is handled by this object as well. |
| 213 | IBTKInit ibtk_init(argc, argv, MPI_COMM_WORLD); |
| 214 | const LibMeshInit& init = ibtk_init.getLibMeshInit(); |
| 215 | |
| 216 | { // cleanup dynamically allocated objects prior to shutdown |
| 217 | |
| 218 | // Parse command line options, set some standard options from the input |
| 219 | // file, initialize the restart database (if this is a restarted run), |
| 220 | // and enable file logging. |
| 221 | Pointer<AppInitializer> app_initializer = new AppInitializer(argc, argv, "IB.log"); |
| 222 | Pointer<Database> input_db = app_initializer->getInputDatabase(); |
| 223 | |
| 224 | // Setup user-defined kernel function. |
| 225 | LEInteractor::s_kernel_fcn = &kernel; |
| 226 | LEInteractor::s_kernel_fcn_stencil_size = 8; |
| 227 | |
| 228 | // Get various standard options set in the input file. |
| 229 | const bool dump_viz_data = app_initializer->dumpVizData(); |
| 230 | const int viz_dump_interval = app_initializer->getVizDumpInterval(); |
| 231 | const bool uses_visit = dump_viz_data && app_initializer->getVisItDataWriter(); |
| 232 | #ifdef LIBMESH_HAVE_EXODUS_API |
| 233 | const bool uses_exodus = dump_viz_data && !app_initializer->getExodusIIFilename().empty(); |
| 234 | #else |
| 235 | const bool uses_exodus = false; |
| 236 | if (!app_initializer->getExodusIIFilename().empty()) |
| 237 | { |
| 238 | plog << "WARNING: libMesh was compiled without Exodus support, so no " |
| 239 | << "Exodus output will be written in this program.\n"; |
| 240 | } |
| 241 | #endif |
| 242 | const string exodus_filename = app_initializer->getExodusIIFilename(); |
| 243 | |
| 244 | const bool dump_restart_data = app_initializer->dumpRestartData(); |
| 245 | const int restart_dump_interval = app_initializer->getRestartDumpInterval(); |
| 246 | const string restart_dump_dirname = app_initializer->getRestartDumpDirectory(); |
| 247 | const string restart_read_dirname = app_initializer->getRestartReadDirectory(); |
| 248 | const int restart_restore_num = app_initializer->getRestartRestoreNumber(); |
| 249 | |
| 250 | const bool dump_postproc_data = app_initializer->dumpPostProcessingData(); |
| 251 | const int postproc_data_dump_interval = app_initializer->getPostProcessingDataDumpInterval(); |
| 252 | const string postproc_data_dump_dirname = app_initializer->getPostProcessingDataDumpDirectory(); |
| 253 | if (dump_postproc_data && (postproc_data_dump_interval > 0) && !postproc_data_dump_dirname.empty()) |
| 254 | { |
| 255 | Utilities::recursiveMkdir(postproc_data_dump_dirname); |
| 256 | } |
| 257 | |
| 258 | const bool dump_timer_data = app_initializer->dumpTimerData(); |
| 259 | const int timer_dump_interval = app_initializer->getTimerDumpInterval(); |
| 260 | |
| 261 | // Create a simple FE mesh. |
| 262 | Mesh solid_mesh(init.comm(), NDIM); |
| 263 | const double dx = input_db->getDouble("DX"); |
| 264 | const double ds = input_db->getDouble("MFAC") * dx; |
| 265 | string elem_type = input_db->getString("ELEM_TYPE"); |
| 266 | const double R = 0.5; |
nothing calls this directly
no test coverage detected