Commit 29e7fca5 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#820 Empirically correct the factor 2. I currently get on my dev operator;...

#820 Empirically correct the factor 2. I currently get on my dev operator; this will require further investigation later!
parent e6ff619f
......@@ -361,8 +361,6 @@ namespace HappyHeart
}
{
auto& delta_residual = GetNonCstDeltaResidual();
GlobalVectorWithCoefficient with_coeff(delta_residual, 1.);
GetSolidDeltaResidualOperator().Assemble(std::make_tuple(std::ref(with_coeff)),
......
......@@ -44,7 +44,6 @@ namespace HappyHeart
{
const auto& elementary_data = parent::GetElementaryData();
const unsigned int Ncomponent = elementary_data.GetGeomEltDimension();
const unsigned int square_Ncomponent = NumericNS::Square(Ncomponent);
const unsigned int Nnode = elementary_data.Nnode();
const auto mesh_dimension = elementary_data.GetGeomMeshRegionDimension();
......@@ -125,8 +124,8 @@ namespace HappyHeart
{
auto& elementary_data = parent::GetNonCstElementaryData();
const auto& local_midpoint_position = GetMidpointPosition();
auto& local_midpoint_position = GetNonCstMidpointPosition();
const auto& rhs_part = this->vector_parent::template GetLocalVector<EnumUnderlyingType(LocalVectorIndex::rhs_part)>();
const auto& infos_at_quad_pt_list = elementary_data.GetInformationsAtQuadraturePointList();
......@@ -196,8 +195,6 @@ namespace HappyHeart
const cauchy_green_tensor_type& cauchy_green_tensor,
LocalVector& dW)
{
// static_cast<void>(pressure); // See #7.
auto& invariant_holder = this->GetNonCstInvariantHolder();
invariant_holder.template Update(cauchy_green_tensor);
......@@ -223,10 +220,21 @@ namespace HappyHeart
#ifndef NDEBUG
invariant_holder.Reset();
#endif // NDEBUG
static bool first = true;
if (first)
{
std::cout << "================================================================================================" << std::endl;
std::cout << "[WARNING] Empirical hack: I have a factor 2. I don't explain with operator, so "
"I temporarily put this 0.5 factor to compensate it." << std::endl;
std::cout << "================================================================================================" << std::endl;
first = false;
}
Seldon::Mlt(.5, dW); // \todo #820 Empirical hack!
}
template <class HyperelasticLawT>
void SolidDeltaResidual<HyperelasticLawT>
::PrepareInternalDataForQuadraturePoint(const InformationsAtQuadraturePoint& infos_at_quad_pt,
......@@ -321,8 +329,6 @@ namespace HappyHeart
derivative_green_lagrange.Update(gradient_displacement);
const auto& transposed_De = derivative_green_lagrange.GetTransposed();
// double pressure_value = -99;
// ===================================================================================
// Then compute the derivates of W, required to build both bilinear and linear terms.
// ===================================================================================
......@@ -379,7 +385,6 @@ namespace HappyHeart
{
return hyperelastic_law_;
}
} // namespace LocalVariationalOperatorNS
......
......@@ -82,13 +82,12 @@ namespace HappyHeart
{
void Update2D(const CauchyGreenTensor& cauchy_green_tensor, LocalVector& result)
{
assert(result.GetM() == 3);
result(0) = 0.5*(cauchy_green_tensor.xx() - 1.);
result(1) = 0.5*(cauchy_green_tensor.yy() - 1.);
result(0) = 0.5 * (cauchy_green_tensor.xx() - 1.);
result(1) = 0.5 * (cauchy_green_tensor.yy() - 1.);
result(2) = cauchy_green_tensor.xy();
}
......@@ -97,14 +96,15 @@ namespace HappyHeart
{
assert(result.GetM() == 6);
result(0) = 0.5*(cauchy_green_tensor.xx() - 1.);
result(1) = 0.5*(cauchy_green_tensor.yy() - 1.);
result(2) = 0.5*(cauchy_green_tensor.zz() - 1.);
result(0) = 0.5 * (cauchy_green_tensor.xx() - 1.);
result(1) = 0.5 * (cauchy_green_tensor.yy() - 1.);
result(2) = 0.5 * (cauchy_green_tensor.zz() - 1.);
result(3) = cauchy_green_tensor.xy();
result(4) = cauchy_green_tensor.yz();
result(5) = cauchy_green_tensor.xz();
}
} // namespace anonymous
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment