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

Method construct_old_thermo_source

Source/sources/Castro_thermo.cpp:5–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3using namespace amrex;
4
5void
6Castro::construct_old_thermo_source(MultiFab& source, MultiFab& state_in,
7 Real time, Real dt)
8{
9
10 amrex::ignore_unused(time);
11 amrex::ignore_unused(dt);
12
13#ifndef MHD
14 if (!(time_integration_method == SpectralDeferredCorrections)) {
15 return;
16 }
17#endif
18
19 const Real strt_time = ParallelDescriptor::second();
20
21 MultiFab thermo_src(grids, dmap, source.nComp(), 0);
22
23 thermo_src.setVal(0.0);
24
25 fill_thermo_source(state_in, thermo_src);
26
27 Real mult_factor = 1.0;
28
29 MultiFab::Saxpy(source, mult_factor, thermo_src, 0, 0, source.nComp(), 0); // NOLINT(readability-suspicious-call-argument)
30
31 if (verbose > 1)
32 {
33 const int IOProc = ParallelDescriptor::IOProcessorNumber();
34 Real run_time = ParallelDescriptor::second() - strt_time;
35
36#ifdef BL_LAZY
37 Lazy::QueueReduction( [=] () mutable {
38#endif
39 ParallelDescriptor::ReduceRealMax(run_time,IOProc);
40
41 amrex::Print() << "Castro::construct_old_thermo_source() time = " << run_time << "\n" << "\n";
42#ifdef BL_LAZY
43 });
44#endif
45 }
46
47}
48
49
50

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected