Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: no member named 'max_iter' in namespace 'integrator_rp' when using BackwardEuler #1659

Open
chongchonghe opened this issue Oct 16, 2024 · 1 comment

Comments

@chongchonghe
Copy link

I'm trying to use burner with BackwardEuler integrator in Quokka. I compile a small test and got: error: no member named 'max_iter' in namespace 'integrator_rp'.

I don't know which are the minimal files to include in CMakeLists.txt to make burner work, so I'm including as much as possible:

include_directories(../../../extern/Microphysics/integration)
include_directories(../../../extern/Microphysics/EOS)
include_directories(../../../extern/Microphysics/interfaces)
include_directories(../../../extern/Microphysics/networks)
include_directories(../../../extern/Microphysics/integration/BackwardEuler)
include_directories(../../../extern/Microphysics/integration/utils)

and the part of the relevant code looks like this:

// Microphysics
#include <network.H>
#include <eos_type.H>
#include <eos.H>
#include <burn_type.H>
#include <burner.H>
#include <extern_parameters.H>

...

{
  burn_t burn_state;
  burn_state.rho = rho;
  burn_state.T = T_gas;
  burn_state.xn[0] = Erad0; // assuming NumSpec = 1
  burn_state.T_fixed = -1.0_rt;
  burn_state.e = 0.0_rt;
  burn_state.i = i;
  burn_state.j = j;
  burn_state.k = k;
  burner(burn_state, dt);
}

However, I got the following error:

In file included from /Users/cche/softwares/quokka/quokka.copy3/src/cooling/GrackleLikeCooling.cpp:11:
In file included from /Users/cche/softwares/quokka/quokka.copy3/src/cooling/GrackleLikeCooling.hpp:20:
In file included from /Users/cche/softwares/quokka/quokka.copy3/src/hydro/hydro_system.hpp:29:
In file included from /Users/cche/softwares/quokka/quokka.copy3/src/radiation/radiation_system.hpp:39:
In file included from /Users/cche/softwares/quokka/quokka.copy3/extern/Microphysics/interfaces/burner.H:5:
In file included from /Users/cche/softwares/quokka/quokka.copy3/src/problems/RadhydroUniformAdvecting/../../../extern/Microphysics/integration/integrator.H:7:
In file included from /Users/cche/softwares/quokka/quokka.copy3/src/problems/RadhydroUniformAdvecting/../../../extern/Microphysics/integration/BackwardEuler/actual_integrator.H:11:
/Users/cche/softwares/quokka/quokka.copy3/src/problems/RadhydroUniformAdvecting/../../../extern/Microphysics/integration/BackwardEuler/be_integrator.H:54:47: error: no member named 'max_iter' in namespace 'integrator_rp'
   54 |     for (int iter = 1; iter <= integrator_rp::max_iter; iter++) {
      |                                ~~~~~~~~~~~~~~~^
/Users/cche/softwares/quokka/quokka.copy3/src/problems/RadhydroUniformAdvecting/../../../extern/Microphysics/integration/BackwardEuler/be_integrator.H:139:37: error: no member named 'tol' in namespace 'integrator_rp'
  139 |         if (b_norm < integrator_rp::tol * y_norm) {
      |                      ~~~~~~~~~~~~~~~^
2 errors generated.

The same code but include_directories(../../../extern/Microphysics/integration/VODE) doesn't have this issue. Any idea what could be going on?

@yut23
Copy link
Collaborator

yut23 commented Oct 16, 2024

It looks like CMakeLists.txt is currently hardcoded to use the runtime parameters for VODE:

set(VODEparamfile "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/integration/VODE/_parameters")

You can try changing it to ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/integration/BackwardEuler/_parameters and see if that works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants