| 65 | |
| 66 | |
| 67 | void |
| 68 | Castro::construct_new_geom_source(MultiFab& source, const MultiFab& state_old, |
| 69 | const MultiFab& state_new, Real time, Real dt) |
| 70 | { |
| 71 | |
| 72 | amrex::ignore_unused(source); |
| 73 | amrex::ignore_unused(state_old); |
| 74 | amrex::ignore_unused(state_new); |
| 75 | amrex::ignore_unused(time); |
| 76 | amrex::ignore_unused(dt); |
| 77 | |
| 78 | if (geom.Coord() == 0) { |
| 79 | return; |
| 80 | } |
| 81 | |
| 82 | if (use_geom_source == 0) { |
| 83 | return; |
| 84 | } |
| 85 | |
| 86 | #if AMREX_SPACEDIM <= 2 |
| 87 | const Real strt_time = ParallelDescriptor::second(); |
| 88 | |
| 89 | MultiFab geom_src(grids, dmap, source.nComp(), 0); |
| 90 | |
| 91 | geom_src.setVal(0.0); |
| 92 | |
| 93 | // Subtract off the old-time value first |
| 94 | Real old_time = time - dt; |
| 95 | |
| 96 | if (geom.Coord() == 1) { |
| 97 | fill_RZ_geom_source(old_time, dt, state_old, geom_src); |
| 98 | } else { |
| 99 | fill_RTheta_geom_source(old_time, dt, state_old, geom_src); |
| 100 | } |
| 101 | |
| 102 | Real mult_factor = -0.5; |
| 103 | |
| 104 | MultiFab::Saxpy(source, mult_factor, geom_src, 0, 0, source.nComp(), 0); // NOLINT(readability-suspicious-call-argument) |
| 105 | |
| 106 | // Time center with the new data |
| 107 | |
| 108 | geom_src.setVal(0.0); |
| 109 | |
| 110 | mult_factor = 0.5; |
| 111 | |
| 112 | if (geom.Coord() == 1) { |
| 113 | fill_RZ_geom_source(time, dt, state_new, geom_src); |
| 114 | } else { |
| 115 | fill_RTheta_geom_source(time, dt, state_new, geom_src); |
| 116 | } |
| 117 | |
| 118 | MultiFab::Saxpy(source, mult_factor, geom_src, 0, 0, source.nComp(), 0); // NOLINT(readability-suspicious-call-argument) |
| 119 | |
| 120 | if (verbose > 1) |
| 121 | { |
| 122 | const int IOProc = ParallelDescriptor::IOProcessorNumber(); |
| 123 | Real run_time = ParallelDescriptor::second() - strt_time; |
| 124 |
nothing calls this directly
no outgoing calls
no test coverage detected