From 751aa373c0d48f61eec4d733520d35b85ee23e3c Mon Sep 17 00:00:00 2001 From: Wenqing Wang <wenqing.wang@ufz.de> Date: Wed, 30 Aug 2017 16:06:03 +0200 Subject: [PATCH] [HM] Fixed a bug in the extrapolation of velocity --- ProcessLib/HydroMechanics/HydroMechanicsFEM.h | 6 ++---- ProcessLib/HydroMechanics/HydroMechanicsProcess-impl.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ProcessLib/HydroMechanics/HydroMechanicsFEM.h b/ProcessLib/HydroMechanics/HydroMechanicsFEM.h index 00da123f9ab..a439d753902 100644 --- a/ProcessLib/HydroMechanics/HydroMechanicsFEM.h +++ b/ProcessLib/HydroMechanics/HydroMechanicsFEM.h @@ -499,7 +499,7 @@ public: auto const local_x = current_solution.get(indices); cache.clear(); - auto cache_vec = MathLib::createZeroedMatrix<Eigen::Matrix< + auto cache_matrix = MathLib::createZeroedMatrix<Eigen::Matrix< double, DisplacementDim, Eigen::Dynamic, Eigen::RowMajor>>( cache, DisplacementDim, num_intpts); @@ -510,8 +510,6 @@ public: Eigen::Map<typename ShapeMatricesTypePressure::template VectorType< pressure_size> const>(local_x.data() + pressure_index, pressure_size); - using GlobalDimVectorType = - typename ShapeMatricesTypePressure::GlobalDimVectorType; unsigned const n_integration_points = _integration_method.getNumberOfPoints(); @@ -529,7 +527,7 @@ public: // Compute the velocity auto const& dNdx_p = _ip_data[ip].dNdx_p; - cache_vec.col(ip).noalias() = + cache_matrix.col(ip).noalias() = -K_over_mu * dNdx_p * p - K_over_mu * rho_fr * b; } diff --git a/ProcessLib/HydroMechanics/HydroMechanicsProcess-impl.h b/ProcessLib/HydroMechanics/HydroMechanicsProcess-impl.h index 40d1565e622..37f1ee599b9 100644 --- a/ProcessLib/HydroMechanics/HydroMechanicsProcess-impl.h +++ b/ProcessLib/HydroMechanics/HydroMechanicsProcess-impl.h @@ -166,7 +166,7 @@ void HydroMechanicsProcess<DisplacementDim>::initializeConcreteProcess( Base::_secondary_variables.addSecondaryVariable( "velocity", makeExtrapolator( - 1, getExtrapolator(), _local_assemblers, + mesh.getDimension(), getExtrapolator(), _local_assemblers, &LocalAssemblerInterface::getIntPtDarcyVelocity)); } -- GitLab