From d376034e727dd44549d95e491aaa2d3b97d2da7a Mon Sep 17 00:00:00 2001 From: Haibing Shao <haibing.shao@ufz.de> Date: Sat, 2 Dec 2023 19:11:36 +0100 Subject: [PATCH] call FCT in ComponentTransport process fixup! calculate D and F in ComponentTransport remove the pass of D and F matrix declare and reclaim D and F locally move FCT feature to a separate function activate the switch use the switch built in stabilizer move to stabilizer add include clean not needed lib clang-format clang-format switch off when OGS_USE_PETSC USE_PETSC move ifdef to FluxCorrectedTransport class --- .../ComponentTransportProcess.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ProcessLib/ComponentTransport/ComponentTransportProcess.cpp b/ProcessLib/ComponentTransport/ComponentTransportProcess.cpp index bdf611726c1..fdd0b9ea028 100644 --- a/ProcessLib/ComponentTransport/ComponentTransportProcess.cpp +++ b/ProcessLib/ComponentTransport/ComponentTransportProcess.cpp @@ -18,9 +18,12 @@ #include "MathLib/LinAlg/Eigen/EigenTools.h" #include "MathLib/LinAlg/FinalizeMatrixAssembly.h" #include "MathLib/LinAlg/FinalizeVectorAssembly.h" +#include "MathLib/LinAlg/GlobalMatrixVectorTypes.h" #include "MathLib/LinAlg/LinAlg.h" #include "MeshLib/Utils/getOrCreateMeshProperty.h" #include "NumLib/DOF/ComputeSparsityPattern.h" +#include "NumLib/NumericalStability/FluxCorrectedTransport.h" +#include "NumLib/NumericalStability/NumericalStabilization.h" #include "NumLib/ODESolver/NonlinearSystem.h" #include "ProcessLib/CoupledSolutionsForStaggeredScheme.h" #include "ProcessLib/SurfaceFlux/SurfaceFlux.h" @@ -220,6 +223,16 @@ void ComponentTransportProcess::assembleConcreteProcess( _asm_mat_cache.assemble(t, dt, x, x_prev, process_id, M, K, b, dof_tables, _global_assembler, _local_assemblers, pv.getActiveElementIDs()); + + if (process_id == _process_data.hydraulic_process_id) + { + return; + } + auto const matrix_specification = getMatrixSpecifications(process_id); + + NumLib::computeFluxCorrectedTransport(_process_data.stabilizer, t, dt, x, + x_prev, process_id, + matrix_specification, M, K, b); } void ComponentTransportProcess::assembleWithJacobianConcreteProcess( @@ -515,6 +528,5 @@ void ComponentTransportProcess::preOutputConcreteProcess( INFO("[time] Computing residuum flow rates took {:g} s", time_residuum.elapsed()); } - } // namespace ComponentTransport } // namespace ProcessLib -- GitLab