RTP acceleration: assemble only once
This MR adds an option <is_linear>
to the ComponentTransport process.
With this option
- the process assembly is done only once and the assembled global matrices/vectors are reused subsequently
- the non-linear solver converges after one iteration
That can greatly speed up the solution of linear simulations. However, it's the sole responsibility of the user to use this flag correctly. OGS does not check if there are any non-linearities in the model.
I've implemented the feature for monolithic coupling. A test with the global implicit approach is included. Other use cases have not been implemented/tested, yet.
Implementation idea by @HBShaoUFZ and @renchao-lu.
-
Feature description was added to the changelog -
Tests covering your feature were added? -
Any new feature or behavior change was documented?
Some performance measurements on my machine. (speedup is roughly a factor of 4)
$ OMP_NUM_THREADS=1 ctest -R ogs-Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/1d_decay_chain_GIA --repeat-until-fail 3
Test project /home/lehmannc/prog/ogs6/build/release
Start 265: ogs-Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/1d_decay_chain_GIA
Test #265: ogs-Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/1d_decay_chain_GIA ................. Passed 41.28 sec
Start 265: ogs-Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/1d_decay_chain_GIA
Test #265: ogs-Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/1d_decay_chain_GIA ................. Passed 41.66 sec
Start 265: ogs-Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/1d_decay_chain_GIA
1/2 Test #265: ogs-Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/1d_decay_chain_GIA ................. Passed 40.25 sec
Start 266: ogs-Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/1d_decay_chain_GIA_asm_only_once
Test #266: ogs-Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/1d_decay_chain_GIA_asm_only_once ... Passed 9.93 sec
Start 266: ogs-Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/1d_decay_chain_GIA_asm_only_once
Test #266: ogs-Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/1d_decay_chain_GIA_asm_only_once ... Passed 9.88 sec
Start 266: ogs-Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/1d_decay_chain_GIA_asm_only_once
2/2 Test #266: ogs-Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/1d_decay_chain_GIA_asm_only_once ... Passed 10.22 sec
100% tests passed, 0 tests failed out of 2
Edited by Christoph Lehmann