Skip to content

Commit

Permalink
Remove unused AUX_UPDATE (#2614)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpkatz authored Oct 8, 2023
1 parent 8395eb8 commit 09d4627
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 87 deletions.
1 change: 0 additions & 1 deletion .github/workflows/good_defines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ AMREX_USE_CUDA
AMREX_USE_GPU
AMREX_USE_OMP
AUX_THERMO
AUX_UPDATE
BL_FORT_USE_LOWERCASE
BL_FORT_USE_UNDERSCORE
BL_FORT_USE_UPPERCASE
Expand Down
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 23.11

* The compile option USE_AUX_UPDATE has been removed. If you want to
manually update the auxiliary parameters, you can use an external
source term or you can use the problem post-timestep hook. (#2614)

# 23.10

* True-SDC no longer evolves density as part of the reaction system
Expand Down
11 changes: 0 additions & 11 deletions Docs/source/FlowChart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,6 @@ of each step.

Only Strang+CTU and simplified-SDC support retries.

#. [AUX_UPDATE] *Auxiliary quantity evolution*

Auxiliary variables in Castro are those that obey a continuity
equation (with optional sources) that are passed into the EOS, but
not subjected to the constraint on mass fractions (summing to one).

The advection and source terms are already dealt with in the
main hydrodynamics advance (above step). A user-supplied routine
ca_auxupdate can be provided here to further update these
quantities.

#. [POINTMASS] *Point mass*

If ``castro.point_mass_fix_solution`` is set, then we
Expand Down
7 changes: 0 additions & 7 deletions Docs/source/build_system.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,6 @@ Hydrodynamics and Source Term Parameters
Simulation Flow Parameters
^^^^^^^^^^^^^^^^^^^^^^^^^^

* ``USE_AUX_UPDATE``: some networks define auxiliary quantities, which in general
Castro will advect, but not otherwise change. If we set ``USE_AUX_UPDATE=TRUE``
then Castro will call a user-supplied routine ``advance_aux()`` that can
change the auxiliary quantities.

.. index:: USE_AUX_UPDATE

* ``USE_POST_SIM``: if this is defined, then Castro will call the user-defined
routine ``problem_post_simulation()`` after the full evolution of the problem
has ended.
Expand Down
4 changes: 0 additions & 4 deletions Exec/Make.Castro
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,6 @@ ifeq ($(USE_SHOCK_VAR), TRUE)
DEFINES += -DSHOCK_VAR
endif

ifeq ($(USE_AUX_UPDATE), TRUE)
DEFINES += -DAUX_UPDATE
endif

ifeq ($(USE_POST_SIM), TRUE)
DEFINES += -DDO_PROBLEM_POST_SIMULATION
endif
Expand Down
10 changes: 0 additions & 10 deletions Source/driver/Castro.H
Original file line number Diff line number Diff line change
Expand Up @@ -997,16 +997,6 @@ public:
///
void expand_state(amrex::MultiFab& S, amrex::Real time, int ng);

#ifdef AUX_UPDATE

///
/// Calculate auxiliary variables at new timestep
///
/// @param time current time
/// @param dt timestep
///
void advance_aux(amrex::Real time, amrex::Real dt);
#endif


// Hydrodynamics
Expand Down
30 changes: 0 additions & 30 deletions Source/driver/Castro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2534,36 +2534,6 @@ Castro::okToContinue ()
return test;
}

#ifdef AUX_UPDATE
void
Castro::advance_aux(Real time, Real dt)
{
BL_PROFILE("Castro::advance_aux()");

if (verbose && ParallelDescriptor::IOProcessor()) {
std::cout << "... special update for auxiliary variables \n";
}

MultiFab& S_old = get_old_data(State_Type);
MultiFab& S_new = get_new_data(State_Type);

#ifdef AMREX_USE_OMP
#pragma omp parallel
#endif
for (MFIter mfi(S_old, TilingIfNotGPU()); mfi.isValid(); ++mfi)
{
const Box& box = mfi.tilebox();
FArrayBox& old_fab = S_old[mfi];
FArrayBox& new_fab = S_new[mfi];
void ca_auxupdate(BL_TO_FORTRAN(old_fab),
BL_TO_FORTRAN(new_fab),
box.loVect(), box.hiVect(),
&dt);
}
}
#endif


void
Castro::FluxRegCrseInit() {
BL_PROFILE("Castro::FluxRegCrseInit");
Expand Down
20 changes: 0 additions & 20 deletions Source/driver/Castro_F.H
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,6 @@

#include <AMReX_BLFort.H>

#ifdef __cplusplus
#include <AMReX.H>
extern "C"
{
#endif


#ifdef AUX_UPDATE
void ca_auxupdate
(BL_FORT_FAB_ARG(state_old),
BL_FORT_FAB_ARG(state_new),
const int* lo, const int* hi,
const amrex::Real * dt);
#endif

#ifdef __cplusplus
}
#endif


#ifdef MAESTRO_INIT
BL_FORT_PROC_DECL(CA_INITDATA_MAESTRO,ca_initdata_maestro)
(const int* lo, const int* hi, const int& MAESTRO_init_type,
Expand Down
4 changes: 0 additions & 4 deletions Source/driver/Castro_advance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ Castro::advance (Real time,
}

for (int lev = level; lev <= max_level_to_advance; ++lev) {
#ifdef AUX_UPDATE
getLevel(lev).advance_aux(time, dt);
#endif

#ifdef GRAVITY
// Update the point mass.
if (use_point_mass == 1) {
Expand Down

0 comments on commit 09d4627

Please sign in to comment.