MCPcopy Create free account
hub / github.com/AMReX-Astro/Castro / construct_old_geom_source

Method construct_old_geom_source

Source/sources/Castro_geom.cpp:12–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10///
11
12void
13Castro::construct_old_geom_source(MultiFab& source, const MultiFab& state_in, Real time, Real dt)
14{
15
16 amrex::ignore_unused(source);
17 amrex::ignore_unused(state_in);
18 amrex::ignore_unused(time);
19 amrex::ignore_unused(dt);
20
21 if (geom.Coord() == 0) {
22 return;
23 }
24
25 if (use_geom_source == 0) {
26 return;
27 }
28
29#if AMREX_SPACEDIM <= 2
30 const Real strt_time = ParallelDescriptor::second();
31
32 MultiFab geom_src(grids, dmap, source.nComp(), 0);
33
34 geom_src.setVal(0.0);
35
36 if (geom.Coord() == 1) {
37 fill_RZ_geom_source(time, dt, state_in, geom_src);
38 } else {
39 fill_RTheta_geom_source(time, dt, state_in, geom_src);
40 }
41
42 Real mult_factor = 1.0;
43
44 MultiFab::Saxpy(source, mult_factor, geom_src, 0, 0, source.nComp(), 0); // NOLINT(readability-suspicious-call-argument)
45
46 if (verbose > 1)
47 {
48 const int IOProc = ParallelDescriptor::IOProcessorNumber();
49 amrex::Real run_time = ParallelDescriptor::second() - strt_time;
50
51#ifdef BL_LAZY
52 Lazy::QueueReduction( [=] () mutable {
53#endif
54 ParallelDescriptor::ReduceRealMax(run_time,IOProc);
55
56 amrex::Print() << "Castro::construct_old_geom_source() time = " << run_time << "\n" << "\n";
57#ifdef BL_LAZY
58 });
59#endif
60 }
61
62#endif
63}
64
65
66

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected