diff --git a/ProcessLib/LIE/SmallDeformation/LocalAssembler/IntegrationPointDataFracture.h b/ProcessLib/LIE/SmallDeformation/LocalAssembler/IntegrationPointDataFracture.h index 26d4bed65cb2fecbac46f1c029d4f3e215e19af7..38ff2ae055a01cff005c562c4cd626d4817c934a 100644 --- a/ProcessLib/LIE/SmallDeformation/LocalAssembler/IntegrationPointDataFracture.h +++ b/ProcessLib/LIE/SmallDeformation/LocalAssembler/IntegrationPointDataFracture.h @@ -45,8 +45,7 @@ struct IntegrationPointDataFracture final _material_state_variables; Eigen::MatrixXd _C; - double _detJ = 0.0; - double _integralMeasure; + double integration_weight; void pushBackState() { diff --git a/ProcessLib/LIE/SmallDeformation/LocalAssembler/IntegrationPointDataMatrix.h b/ProcessLib/LIE/SmallDeformation/LocalAssembler/IntegrationPointDataMatrix.h index eec2bfaf1916f6e8ba1d01b4daec8883f877b585..acc7157c73bd06efd70f4f4b3f930f037cd484ec 100644 --- a/ProcessLib/LIE/SmallDeformation/LocalAssembler/IntegrationPointDataMatrix.h +++ b/ProcessLib/LIE/SmallDeformation/LocalAssembler/IntegrationPointDataMatrix.h @@ -41,8 +41,7 @@ struct IntegrationPointDataMatrix final _material_state_variables; typename BMatricesType::KelvinMatrixType _C; - double _detJ; - double _integralMeasure; + double integration_weight; typename ShapeMatricesType::NodalRowVectorType N; typename ShapeMatricesType::GlobalDimNodalMatrixType dNdx; diff --git a/ProcessLib/LIE/SmallDeformation/LocalAssembler/SmallDeformationLocalAssemblerFracture-impl.h b/ProcessLib/LIE/SmallDeformation/LocalAssembler/SmallDeformationLocalAssemblerFracture-impl.h index 339a2223b3f5315a49c14ca38a3c6482e838450a..7326b9c07819ca580081ecc2682896953b77ac56 100644 --- a/ProcessLib/LIE/SmallDeformation/LocalAssembler/SmallDeformationLocalAssemblerFracture-impl.h +++ b/ProcessLib/LIE/SmallDeformation/LocalAssembler/SmallDeformationLocalAssemblerFracture-impl.h @@ -67,8 +67,9 @@ SmallDeformationLocalAssemblerFracture<ShapeFunction, IntegrationMethod, _ip_data.emplace_back(*_process_data._fracture_model); auto const& sm = _shape_matrices[ip]; auto& ip_data = _ip_data[ip]; - ip_data._detJ = sm.detJ; - ip_data._integralMeasure = sm.integralMeasure; + ip_data.integration_weight = + _integration_method.getWeightedPoint(ip).getWeight() * + sm.integralMeasure * sm.detJ; ip_data._h_matrices.setZero(DisplacementDim, ShapeFunction::NPOINTS * DisplacementDim); @@ -119,11 +120,9 @@ void SmallDeformationLocalAssemblerFracture< for (unsigned ip = 0; ip < n_integration_points; ip++) { x_position.setIntegrationPoint(ip); - auto const& wp = _integration_method.getWeightedPoint(ip); auto& ip_data = _ip_data[ip]; - auto const& detJ = ip_data._detJ; - auto const& integralMeasure = ip_data._integralMeasure; + auto const& integration_weight = ip_data.integration_weight; auto const& H = ip_data._h_matrices; auto& mat = ip_data._fracture_material; auto& sigma = ip_data._sigma; @@ -149,12 +148,12 @@ void SmallDeformationLocalAssemblerFracture< w_prev, w, sigma_prev, sigma, C, state); // r_[u] += H^T*Stress - local_b.noalias() -= H.transpose() * R.transpose() * sigma * detJ * - wp.getWeight() * integralMeasure; + local_b.noalias() -= + H.transpose() * R.transpose() * sigma * integration_weight; // J_[u][u] += H^T*C*H - local_J.noalias() += H.transpose() * R.transpose() * C * R * H * detJ * - wp.getWeight() * integralMeasure; + local_J.noalias() += + H.transpose() * R.transpose() * C * R * H * integration_weight; } } diff --git a/ProcessLib/LIE/SmallDeformation/LocalAssembler/SmallDeformationLocalAssemblerMatrix-impl.h b/ProcessLib/LIE/SmallDeformation/LocalAssembler/SmallDeformationLocalAssemblerMatrix-impl.h index 095bb3fea9f25c8d2ddb334e3d0a3fc6341509dc..660684984c34449185bb0923747117168bf9d54b 100644 --- a/ProcessLib/LIE/SmallDeformation/LocalAssembler/SmallDeformationLocalAssemblerMatrix-impl.h +++ b/ProcessLib/LIE/SmallDeformation/LocalAssembler/SmallDeformationLocalAssemblerMatrix-impl.h @@ -68,8 +68,9 @@ SmallDeformationLocalAssemblerMatrix<ShapeFunction, IntegrationMethod, auto const& sm = shape_matrices[ip]; ip_data.N = sm.N; ip_data.dNdx = sm.dNdx; - ip_data._detJ = sm.detJ; - ip_data._integralMeasure = sm.integralMeasure; + ip_data.integration_weight = + _integration_method.getWeightedPoint(ip).getWeight() * + sm.integralMeasure * sm.detJ; // Initialize current time step values ip_data._sigma.setZero(KelvinVectorDimensions<DisplacementDim>::value); @@ -119,9 +120,7 @@ void SmallDeformationLocalAssemblerMatrix<ShapeFunction, IntegrationMethod, for (unsigned ip = 0; ip < n_integration_points; ip++) { x_position.setIntegrationPoint(ip); - auto const& wp = _integration_method.getWeightedPoint(ip); - auto const& detJ = _ip_data[ip]._detJ; - auto const& integralMeasure = _ip_data[ip]._integralMeasure; + auto const& w = _ip_data[ip].integration_weight; auto const& N = _ip_data[ip].N; auto const& dNdx = _ip_data[ip].dNdx; @@ -156,10 +155,8 @@ void SmallDeformationLocalAssemblerMatrix<ShapeFunction, IntegrationMethod, KelvinMatrixType<DisplacementDim> C; std::tie(sigma, state, C) = std::move(*solution); - local_b.noalias() -= - B.transpose() * sigma * detJ * wp.getWeight() * integralMeasure; - local_Jac.noalias() += - B.transpose() * C * B * detJ * wp.getWeight() * integralMeasure; + local_b.noalias() -= B.transpose() * sigma * w; + local_Jac.noalias() += B.transpose() * C * B * w; } } diff --git a/ProcessLib/LIE/SmallDeformation/LocalAssembler/SmallDeformationLocalAssemblerMatrixNearFracture-impl.h b/ProcessLib/LIE/SmallDeformation/LocalAssembler/SmallDeformationLocalAssemblerMatrixNearFracture-impl.h index e48045f508c5729514ab87f1709695d193be35a1..e9cd5c8ed6cf307e97c911ff9d3e790fe9a1aceb 100644 --- a/ProcessLib/LIE/SmallDeformation/LocalAssembler/SmallDeformationLocalAssemblerMatrixNearFracture-impl.h +++ b/ProcessLib/LIE/SmallDeformation/LocalAssembler/SmallDeformationLocalAssemblerMatrixNearFracture-impl.h @@ -85,8 +85,9 @@ SmallDeformationLocalAssemblerMatrixNearFracture<ShapeFunction, auto const& sm = shape_matrices[ip]; ip_data.N = sm.N; ip_data.dNdx = sm.dNdx; - ip_data._detJ = sm.detJ; - ip_data._integralMeasure = sm.integralMeasure; + ip_data.integration_weight = + _integration_method.getWeightedPoint(ip).getWeight() * + sm.integralMeasure * sm.detJ; // Initialize current time step values ip_data._sigma.setZero(KelvinVectorDimensions<DisplacementDim>::value); @@ -198,9 +199,7 @@ void SmallDeformationLocalAssemblerMatrixNearFracture< x_position.setIntegrationPoint(ip); auto& ip_data = _ip_data[ip]; - auto const& wp = _integration_method.getWeightedPoint(ip); - auto const ip_factor = - ip_data._detJ * wp.getWeight() * ip_data._integralMeasure; + auto const& w = _ip_data[ip].integration_weight; auto const& N = ip_data.N; auto const& dNdx = ip_data.dNdx; @@ -253,32 +252,31 @@ void SmallDeformationLocalAssemblerMatrixNearFracture< // r_u = B^T * Sigma = B^T * C * B * (u+phi*[u]) // r_[u] = (phi*B)^T * Sigma = (phi*B)^T * C * B * (u+phi*[u]) - local_b_u.noalias() -= B.transpose() * sigma * ip_factor; + local_b_u.noalias() -= B.transpose() * sigma * w; for (unsigned i = 0; i < n_fractures; i++) { vec_local_b_g[i].noalias() -= - levelsets[i] * B.transpose() * sigma * ip_factor; + levelsets[i] * B.transpose() * sigma * w; } // J_uu += B^T * C * B - local_J_uu.noalias() += B.transpose() * C * B * ip_factor; + local_J_uu.noalias() += B.transpose() * C * B * w; for (unsigned i = 0; i < n_fractures; i++) { // J_u[u] += B^T * C * (levelset * B) vec_local_J_ug[i].noalias() += - B.transpose() * C * (levelsets[i] * B) * ip_factor; + B.transpose() * C * (levelsets[i] * B) * w; // J_[u]u += (levelset * B)^T * C * B vec_local_J_gu[i].noalias() += - (levelsets[i] * B.transpose()) * C * B * ip_factor; + (levelsets[i] * B.transpose()) * C * B * w; for (unsigned j = 0; j < n_fractures; j++) { // J_[u][u] += (levelset * B)^T * C * (levelset * B) vec_local_J_gg[i][j].noalias() += - (levelsets[i] * B.transpose()) * C * (levelsets[j] * B) * - ip_factor; + (levelsets[i] * B.transpose()) * C * (levelsets[j] * B) * w; } } }