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

Method construct_ctu_mhd_source

Source/mhd/Castro_mhd.cpp:8–753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6using namespace amrex;
7
8advance_status
9Castro::construct_ctu_mhd_source(Real time, Real dt)
10{
11 advance_status status {};
12
13 if (!do_hydro) {
14 return status;
15 }
16
17 if (verbose && ParallelDescriptor::IOProcessor())
18 std::cout << "... mhd ...!!! " << std::endl << std::endl;
19
20 const auto dx = geom.CellSizeArray();
21
22 MultiFab& S_new = get_new_data(State_Type);
23
24 MultiFab& Bx_new= get_new_data(Mag_Type_x);
25 MultiFab& By_new= get_new_data(Mag_Type_y);
26 MultiFab& Bz_new= get_new_data(Mag_Type_z);
27
28 MultiFab& old_source = get_old_data(Source_Type);
29
30
31 //MultiFab electric[AMREX_SPACEDIM];
32 //for (int j = 0; j < AMREX_SPACEDIM; j++)
33 //{
34 // electric[j].define(getEdgeBoxArray(j), dmap, 1, 0);
35 // electric[j].setVal(0.0);
36 //}
37
38
39 BL_ASSERT(NUM_GROW == 6);
40
41
42#ifdef _OPENMP
43#pragma omp parallel
44#endif
45 {
46
47 FArrayBox flux[AMREX_SPACEDIM], E[AMREX_SPACEDIM];
48
49 FArrayBox q;
50 FArrayBox qaux;
51 FArrayBox srcQ;
52
53 FArrayBox flatn;
54 FArrayBox flatg;
55
56 FArrayBox qleft[AMREX_SPACEDIM];
57 FArrayBox qright[AMREX_SPACEDIM];
58
59 FArrayBox flxx1D;
60 FArrayBox flxy1D;
61 FArrayBox flxz1D;
62
63 FArrayBox ux_left;
64 FArrayBox ux_right;
65 FArrayBox uy_left;

Callers 1

do_advance_ctuMethod · 0.80

Calls 3

src_to_primFunction · 0.85
flattenFunction · 0.85
isValidMethod · 0.80

Tested by

no test coverage detected