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

PETSc stages #8

Merged
merged 8 commits into from
Dec 17, 2023
Merged

PETSc stages #8

merged 8 commits into from
Dec 17, 2023

Conversation

IskanderI
Copy link
Collaborator

@IskanderI IskanderI commented Dec 10, 2023

Added 4 stages:

  1. Thermal solver
  2. SNES Solve
  3. Advect markers
  4. Saving output

I am not sure about Thermal solver since it usually solves very fast.
We should maybe discuss what is the best place to put stages.

Here is a short snippet on run with -log_view now.
image

IskanderI and others added 4 commits May 17, 2023 15:42
new feature: changing inflow boundary - it can change inflow velocity in a given time.
I rewrote reading from dat file - now bvel_velin can be an array and it writes to a different array. In time which is given in a different array(velin_time_delims) it takes corresponding velocity and assigns it as bc.velin. The same function calculates bc.velout as before. It is all similar to function BCGetBGStrainRates. I also added separate folder in tests with example how it can be used. This function doesnt change any workflow in usual models with only one velocity.
- To use it specify velin_num_periods (INT) for a numbers of changing periods
- velin_time_delims (ARRAY) in Ma for an age when to change for a next period (one less than period number!)
- bvel_velin (ARRAY) velocities for specified period

With changing face_out parameter to -1, 0 or 1 it is possible to change the behaviour of opposite boundary
-"-1" can move the same way (e.g. compress from both sides or pull from both sides),
-"0" don 't move opposite direction (as before)
-"1" move the same direction (as before)
lamem_input file also has been updated
@boriskaus
Copy link
Contributor

Thanks a lot, this is great!

Does the thermal solver also take this little time in the Diffusion solver benchmark?

@boriskaus boriskaus changed the title Petsc stages PETSc stages Dec 10, 2023
@IskanderI
Copy link
Collaborator Author

IskanderI commented Dec 10, 2023

Thanks a lot, this is great!

Does the thermal solver also take this little time in the Diffusion solver benchmark?

No it does not show up there.

I put profiler for thermal diffusion in timestep look already.
I put it at
ierr = JacResInitTemp(&lm->jr); CHKERRQ(ierr);

But to measure thermal diffuion in Diffusion solver benchmark I will need to put it in Initial guess part of the code.
Probably this function.
ierr = LaMEMLibDiffuseTemp(lm); CHKERRQ(ierr);

@boriskaus
Copy link
Contributor

Also note that the adjoint tests fail with this:

[0]PETSC ERROR: Duplicate stage name given: Thermal solver

this requires fixing.

@boriskaus
Copy link
Contributor

ok, now this works and I'm in principle happy to merge it. For consistency it would be good if you can increment the version of LaMEM such that we release a new version (easier when doing benchmarking later).
Can you please add that (also in the documentation)?

@boriskaus
Copy link
Contributor

Thanks - you also need to change it in the LaMEM.h file (I believe) as the version number of LaMEM is printed at the beginning of the simulation.

@boriskaus boriskaus merged commit 8b60dc5 into UniMainzGeo:master Dec 17, 2023
2 checks passed
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.

2 participants