Commit d14c0dd9 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#820 Extend DevPrint() to solid outputs.

parent 2be02f6b
......@@ -108,11 +108,10 @@ namespace HappyHeart
{
auto& variational_formulation = GetNonCstVariationalFormulation();
const auto& numbering_subset = variational_formulation.GetNumberingSubset();
variational_formulation.SolveNonLinear(numbering_subset, numbering_subset);
}
} //namespace Policy
......
......@@ -226,6 +226,10 @@ namespace HappyHeart
inline void VariationalFormulationHyperElasticity<HyperelasticLawT, TimeSchemeT>
::ComputeResidual()
{
decltype(auto) variable_holder = this->GetNonCstVariableHolder();
variable_holder.solid_newton_index = this->GetSnes().GetSnesIteration(__FILE__, __LINE__);
const auto& numbering_subset = GetNumberingSubset();
auto& vectors_and_matrices = this->GetNonCstVectorsAndMatrices();
......@@ -269,14 +273,8 @@ namespace HappyHeart
BoundaryConditionMethod::penalization
>(numbering_subset, numbering_subset);
// std::string filename = parent::GetOutputDirectory(numbering_subset) + "/solid_solve_residual_call_0_time_"
// + std::to_string(parent::GetTimeManager().NtimeModified()) + "_it_1_"
// + "it_newton_" + std::to_string(parent::GetSnes().GetSnesIteration(__FILE__, __LINE__)) + ".m"; NOT THE SNES INDEXED IN CURRENT COMP FILES
//
// rhs.View(parent::MpiHappyHeart(),
// filename,
// __FILE__, __LINE__,
// PETSC_VIEWER_ASCII_MATLAB);
variable_holder.template DevPrint<DevPhase::solid_newton>(rhs,
"solid_solve_residual");
}
......@@ -288,6 +286,9 @@ namespace HappyHeart
inline void VariationalFormulationHyperElasticity<HyperelasticLawT, TimeSchemeT>
::ComputeTangent()
{
decltype(auto) variable_holder = this->GetNonCstVariableHolder();
variable_holder.solid_newton_index = this->GetSnes().GetSnesIteration(__FILE__, __LINE__);
const auto& numbering_subset = GetNumberingSubset();
const auto& vectors_and_matrices = this->GetVectorsAndMatrices();
......@@ -308,14 +309,10 @@ namespace HappyHeart
BoundaryConditionMethod::penalization
>(numbering_subset, numbering_subset);
std::string filename = parent::GetOutputDirectory(numbering_subset) + "/solid_solve_tangent_call_0_time_"
+ std::to_string(parent::GetTimeManager().NtimeModified()) + "_it_1_"
+ "it_newton_" + std::to_string(parent::GetSnes().GetSnesIteration(__FILE__, __LINE__)) + ".m";
system_matrix.View(parent::MpiHappyHeart(),
filename,
__FILE__, __LINE__,
PETSC_VIEWER_ASCII_MATLAB);
variable_holder.template DevPrint<DevPhase::solid_newton>(system_matrix,
"solid_solve_tangent");
}
......
......@@ -37,7 +37,8 @@ namespace HappyHeart
{
none,
newton_fp,
dH
dH,
solid_newton
};
......@@ -176,6 +177,7 @@ namespace HappyHeart
unsigned int dh_index = 0u;
unsigned int solid_newton_index = 0u;
private:
......
......@@ -116,7 +116,7 @@ namespace HappyHeart
template<DevPhase DevPhaseT, class GlobalLinearAlgebraT>
void VariableHolder::DevPrint(const GlobalLinearAlgebraT& linear_algebra,
std::string&& filename) const
std::string&& filename) const
{
std::ostringstream oconv;
......@@ -134,6 +134,9 @@ namespace HappyHeart
case DevPhase::dH:
oconv << "_dH_" << dh_index;
break;
case DevPhase::solid_newton:
oconv << "_solid_newton_" << solid_newton_index;
break;
}
oconv << ".m";
......
Markdown is supported
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