From d78989d6890db7a764c0a4d839bf9c9f3275035d Mon Sep 17 00:00:00 2001 From: Tom Fischer <thomas.fischer@ufz.de> Date: Fri, 5 Apr 2024 08:15:13 +0200 Subject: [PATCH] [PL/LF] Use shape matrix cache as in other processes --- .../LiquidFlow/LiquidFlowLocalAssembler-impl.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h b/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h index 82404610c26..99bc458dfdc 100644 --- a/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h +++ b/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h @@ -143,15 +143,16 @@ void LiquidFlowLocalAssembler<ShapeFunction, GlobalDim>:: _process_data.element_rotation_matrices[_element.getID()].transpose() * _process_data.specific_body_force; - auto const& N = _process_data.shape_matrix_cache - .NsHigherOrder<typename ShapeFunction::MeshElement>(); + auto const& Ns = _process_data.shape_matrix_cache + .NsHigherOrder<typename ShapeFunction::MeshElement>(); for (unsigned ip = 0; ip < n_integration_points; ip++) { auto const& ip_data = _ip_data[ip]; + auto const& N = Ns[ip]; double p = 0.; - NumLib::shapeFunctionInterpolate(local_x, N[ip], p); + NumLib::shapeFunctionInterpolate(local_x, N, p); vars.liquid_phase_pressure = p; // Compute density: @@ -176,7 +177,7 @@ void LiquidFlowLocalAssembler<ShapeFunction, GlobalDim>:: // Assemble mass matrix, M local_M.noalias() += (porosity * ddensity_dpressure / fluid_density + storage) * - N[ip].transpose() * N[ip] * ip_data.integration_weight; + N.transpose() * N * ip_data.integration_weight; // Compute viscosity: auto const viscosity = @@ -295,14 +296,15 @@ void LiquidFlowLocalAssembler<ShapeFunction, GlobalDim>:: _process_data.element_rotation_matrices[_element.getID()].transpose() * _process_data.specific_body_force; - auto const& N = _process_data.shape_matrix_cache - .NsHigherOrder<typename ShapeFunction::MeshElement>(); + auto const& Ns = _process_data.shape_matrix_cache + .NsHigherOrder<typename ShapeFunction::MeshElement>(); for (unsigned ip = 0; ip < n_integration_points; ip++) { auto const& ip_data = _ip_data[ip]; + auto const& N = Ns[ip]; double p = 0.; - NumLib::shapeFunctionInterpolate(local_x, N[ip], p); + NumLib::shapeFunctionInterpolate(local_x, N, p); vars.liquid_phase_pressure = p; // Compute density: -- GitLab