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

(optionally) add T/e correction term to Strang Jacobians #1595

Open
wants to merge 25 commits into
base: development
Choose a base branch
from

Conversation

zingale
Copy link
Member

@zingale zingale commented Jun 26, 2024

this is the dT/dX |_e term that appears in all species
it is now controlled by integrator.correct_jacobian_for_const_e

@zingale
Copy link
Member Author

zingale commented Jun 26, 2024

closes #729

@zingale
Copy link
Member Author

zingale commented Jun 27, 2024

some Strang data using burn_cell. Build as:

make NETWORK_DIR=subch_simple

then run the old way:

./main3d.gnu.ex inputs_subch_simple integrator.jacobian=1 unit_test.nsteps=1 integrator.correct_jacobian_for_const_e=0

and it take 8084 steps.

Running with the new correction, integrator.correct_jacobian_for_const_e=1 and it takes

6788 steps

@zingale
Copy link
Member Author

zingale commented Jun 27, 2024

curiously, with aprox21, it goes the other way, and we are slower

@zingale
Copy link
Member Author

zingale commented Jun 27, 2024

for He-C-Fe-group, using the correction terms speeds things up by 4x

./main3d.gnu.ex inputs_subch_simple integrator.jacobian=1 unit_test.nsteps=1 integrator.correct_jacobian_for_const_e=1 unit_test.tmax=1.e-2

104499 without the corrections
24735 with the corrections

@zingale
Copy link
Member Author

zingale commented Jun 27, 2024

Here's some test_react runs:

  • aprox13

    with new terms:

    Run time = 2.016436636
    min number of rhs calls: 6
    avg number of rhs calls: 96
    max number of rhs calls: 1171
    min number of steps: 3
    avg number of steps: 75
    max number of steps: 878
    

    without new terms:

    Run time = 2.397303023
    min number of rhs calls: 6
    avg number of rhs calls: 116
    max number of rhs calls: 3932
    min number of steps: 3
    avg number of steps: 94
    max number of steps: 3767
    
  • subch_simple (using inputs_aprox13):

    with new terms:

    Run time = 101.0353978
    min number of rhs calls: 6
    avg number of rhs calls: 3962
    max number of rhs calls: 147079
    min number of steps: 3
    avg number of steps: 2219
    max number of steps: 79369
    

    without new terms:

    Run time = 100.0271792
    min number of rhs calls: 6
    avg number of rhs calls: 3975
    max number of rhs calls: 157375
    min number of steps: 3
    avg number of steps: 2284
    max number of steps: 86380
    

@zingale zingale changed the title [WIP] add a runtime parameter to disable the T/e correction term in Jacobians add a runtime parameter to disable the T/e correction term in Jacobians Jun 28, 2024
@zingale zingale changed the title add a runtime parameter to disable the T/e correction term in Jacobians (optionally) add T/e correction term to Strang Jacobians Jun 28, 2024
@zingale
Copy link
Member Author

zingale commented Jul 12, 2024

here's a Castro run with these changes:
http://groot.astro.sunysb.edu/Castro/test-suite/gfortran/2024-07-12-002/index.html

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

Successfully merging this pull request may close these issues.

1 participant