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

#718 Hyperelasticity: rename more appropriately attributes.

parent 862036ff
......@@ -21,7 +21,7 @@ transient = {
-- Maximum time, if set to zero run a case.
-- Expected format: VALUE
-- Constraint: v >= 0.
timeMax = 5.5e-4
timeMax = 1.5e-4
} -- transient
......
......@@ -206,23 +206,23 @@ namespace HappyHeart
/// \name Accessors to vectors and matrices specific to the elastic problem.
///@{
const GlobalVector& GetVectorCurrentDisplacement() const noexcept;
const GlobalVector& GetVectorDisplacementPreviousTimeIteration() const noexcept;
GlobalVector& GetNonCstVectorCurrentDisplacement() noexcept;
GlobalVector& GetNonCstVectorDisplacementPreviousTimeIteration() noexcept;
const GlobalVector& GetVectorCurrentVelocity() const noexcept;
const GlobalVector& GetVectorVelocityPreviousTimeIteration() const noexcept;
GlobalVector& GetNonCstVectorCurrentVelocity() noexcept;
GlobalVector& GetNonCstVectorVelocityPreviousTimeIteration() noexcept;
const GlobalMatrix& GetMatrixCurrentDisplacement() const noexcept;
const GlobalMatrix& GetMatrixDisplacementPreviousTimeIteration() const noexcept;
public: //todo #691
GlobalMatrix& GetNonCstMatrixCurrentDisplacement() noexcept;
GlobalMatrix& GetNonCstMatrixDisplacementPreviousTimeIteration() noexcept;
const GlobalMatrix& GetMatrixCurrentVelocity() const noexcept;
const GlobalMatrix& GetMatrixVelocityPreviousTimeIteration() const noexcept;
GlobalMatrix& GetNonCstMatrixCurrentVelocity() noexcept;
GlobalMatrix& GetNonCstMatrixVelocityPreviousTimeIteration() noexcept;
const GlobalMatrix& GetMass() const noexcept;
......@@ -285,16 +285,16 @@ namespace HappyHeart
///@{
//! Vector current displacement.
GlobalVector::unique_ptr vector_current_displacement_ = nullptr;
GlobalVector::unique_ptr vector_displacement_previous_time_iteration_ = nullptr;
//! Vector current velocity.
GlobalVector::unique_ptr vector_current_velocity_ = nullptr;
GlobalVector::unique_ptr vector_velocity_previous_time_iteration_ = nullptr;
//! Matrix current displacement.
GlobalMatrix::unique_ptr matrix_current_displacement_ = nullptr;
GlobalMatrix::unique_ptr matrix_displacement_previous_time_iteration_ = nullptr;
//! Matrix current velocity.
GlobalMatrix::unique_ptr matrix_current_velocity_ = nullptr;
GlobalMatrix::unique_ptr matrix_velocity_previous_time_iteration_ = nullptr;
//! Mass matrix.
GlobalMatrix::unique_ptr mass_ = nullptr;
......
......@@ -142,14 +142,14 @@ namespace HappyHeart
auto& rhs = this->GetNonCstSystemRhs(GetNumberingSubset());
// Compute the system RHS. The rhs is effectively zeroed through the first MatMult call.
const auto& current_displacement_matrix = GetMatrixCurrentDisplacement();
const auto& current_velocity_matrix = GetMatrixCurrentVelocity();
const auto& displacement_previous_time_iteration_matrix = GetMatrixDisplacementPreviousTimeIteration();
const auto& velocity_previous_time_iteration_matrix = GetMatrixVelocityPreviousTimeIteration();
const auto& current_displacement_vector = GetVectorCurrentDisplacement();
const auto& current_velocity_vector = GetVectorCurrentVelocity();
const auto& displacement_previous_time_iteration_vector = GetVectorDisplacementPreviousTimeIteration();
const auto& velocity_previous_time_iteration_vector = GetVectorVelocityPreviousTimeIteration();
Wrappers::Petsc::MatMult(current_displacement_matrix, current_displacement_vector, rhs, __FILE__, __LINE__);
Wrappers::Petsc::MatMultAdd(current_velocity_matrix, current_velocity_vector, rhs, rhs, __FILE__, __LINE__);
Wrappers::Petsc::MatMult(displacement_previous_time_iteration_matrix, displacement_previous_time_iteration_vector, rhs, __FILE__, __LINE__);
Wrappers::Petsc::MatMultAdd(velocity_previous_time_iteration_matrix, velocity_previous_time_iteration_vector, rhs, rhs, __FILE__, __LINE__);
DofSourcePolicyT::AddToRhs(rhs);
}
......@@ -205,11 +205,11 @@ namespace HappyHeart
mass_ = std::make_unique<GlobalMatrix>(system_matrix);
stiffness_ = std::make_unique<GlobalMatrix>(system_matrix);
matrix_current_displacement_ = std::make_unique<GlobalMatrix>(system_matrix);
matrix_current_velocity_ = std::make_unique<GlobalMatrix>(system_matrix);
matrix_displacement_previous_time_iteration_ = std::make_unique<GlobalMatrix>(system_matrix);
matrix_velocity_previous_time_iteration_ = std::make_unique<GlobalMatrix>(system_matrix);
vector_current_velocity_ = std::make_unique<GlobalVector>(system_rhs);
vector_current_displacement_ = std::make_unique<GlobalVector>(system_rhs);
vector_velocity_previous_time_iteration_ = std::make_unique<GlobalVector>(system_rhs);
vector_displacement_previous_time_iteration_ = std::make_unique<GlobalVector>(system_rhs);
}
......@@ -248,26 +248,26 @@ namespace HappyHeart
{
// Displacement matrix.
auto& current_displacement_matrix = GetNonCstMatrixCurrentDisplacement();
current_displacement_matrix.Copy(mass, __FILE__, __LINE__);
auto& displacement_previous_time_iteration_matrix = GetNonCstMatrixDisplacementPreviousTimeIteration();
displacement_previous_time_iteration_matrix.Copy(mass, __FILE__, __LINE__);
const auto coefficient =
2. * GetVolumicMass().GetConstantValue() / Utilities::Square(parent::GetTimeManager().GetTimeStep());
current_displacement_matrix.Scale(coefficient, __FILE__, __LINE__);
displacement_previous_time_iteration_matrix.Scale(coefficient, __FILE__, __LINE__);
Wrappers::Petsc::AXPY(-.5,
stiffness,
current_displacement_matrix,
displacement_previous_time_iteration_matrix,
__FILE__, __LINE__);
}
{
// Velocity matrix.
auto& current_velocity_matrix = GetNonCstMatrixCurrentVelocity();
current_velocity_matrix.Copy(mass, __FILE__, __LINE__);
current_velocity_matrix.Scale(2. * GetVolumicMass().GetConstantValue() / parent::GetTimeManager().GetTimeStep(),
auto& velocity_previous_time_iteration_matrix = GetNonCstMatrixVelocityPreviousTimeIteration();
velocity_previous_time_iteration_matrix.Copy(mass, __FILE__, __LINE__);
velocity_previous_time_iteration_matrix.Scale(2. * GetVolumicMass().GetConstantValue() / parent::GetTimeManager().GetTimeStep(),
__FILE__, __LINE__);
}
}
......@@ -281,7 +281,7 @@ namespace HappyHeart
>
void VariationalFormulationElasticity<VolumicIndexT, SurfacicIndexT, DofSourcePolicyT>::UpdateDisplacement()
{
GetNonCstVectorCurrentDisplacement().Copy(parent::GetSystemSolution(GetNumberingSubset()),
GetNonCstVectorDisplacementPreviousTimeIteration().Copy(parent::GetSystemSolution(GetNumberingSubset()),
__FILE__, __LINE__);
}
......@@ -294,17 +294,17 @@ namespace HappyHeart
>
void VariationalFormulationElasticity<VolumicIndexT, SurfacicIndexT, DofSourcePolicyT>::UpdateVelocity()
{
const auto& current_displacement_vector = GetVectorCurrentDisplacement();
const auto& displacement_previous_time_iteration_vector = GetVectorDisplacementPreviousTimeIteration();
const auto& system_solution = parent::GetSystemSolution(GetNumberingSubset());
auto& current_velocity_vector = GetNonCstVectorCurrentVelocity();
auto& velocity_previous_time_iteration_vector = GetNonCstVectorVelocityPreviousTimeIteration();
assert(parent::GetTimeManager().GetStaticOrDynamic() == StaticOrDynamic::dynamic_);
{
// Update first the velocity.
Wrappers::Petsc::AccessVectorContent<Utilities::Access::read_only> solution(system_solution, __FILE__, __LINE__);
Wrappers::Petsc::AccessVectorContent<Utilities::Access::read_only> displacement_prev(current_displacement_vector, __FILE__, __LINE__);
Wrappers::Petsc::AccessVectorContent<Utilities::Access::read_and_write> velocity(current_velocity_vector, __FILE__, __LINE__);
Wrappers::Petsc::AccessVectorContent<Utilities::Access::read_only> displacement_prev(displacement_previous_time_iteration_vector, __FILE__, __LINE__);
Wrappers::Petsc::AccessVectorContent<Utilities::Access::read_and_write> velocity(velocity_previous_time_iteration_vector, __FILE__, __LINE__);
const unsigned int size = velocity.GetSize(__FILE__, __LINE__);
assert(size == solution.GetSize(__FILE__, __LINE__));
......@@ -442,10 +442,10 @@ namespace HappyHeart
class DofSourcePolicyT
>
inline const GlobalVector& VariationalFormulationElasticity<VolumicIndexT, SurfacicIndexT, DofSourcePolicyT>
::GetVectorCurrentDisplacement() const noexcept
::GetVectorDisplacementPreviousTimeIteration() const noexcept
{
assert(!(!vector_current_displacement_));
return *vector_current_displacement_;
assert(!(!vector_displacement_previous_time_iteration_));
return *vector_displacement_previous_time_iteration_;
}
......@@ -456,9 +456,9 @@ namespace HappyHeart
class DofSourcePolicyT
>
inline GlobalVector& VariationalFormulationElasticity<VolumicIndexT, SurfacicIndexT, DofSourcePolicyT>
::GetNonCstVectorCurrentDisplacement() noexcept
::GetNonCstVectorDisplacementPreviousTimeIteration() noexcept
{
return const_cast<GlobalVector&>(GetVectorCurrentDisplacement());
return const_cast<GlobalVector&>(GetVectorDisplacementPreviousTimeIteration());
}
......@@ -469,10 +469,10 @@ namespace HappyHeart
class DofSourcePolicyT
>
inline const GlobalVector& VariationalFormulationElasticity<VolumicIndexT, SurfacicIndexT, DofSourcePolicyT>
::GetVectorCurrentVelocity() const noexcept
::GetVectorVelocityPreviousTimeIteration() const noexcept
{
assert(!(!vector_current_velocity_));
return *vector_current_velocity_;
assert(!(!vector_velocity_previous_time_iteration_));
return *vector_velocity_previous_time_iteration_;
}
......@@ -483,9 +483,9 @@ namespace HappyHeart
class DofSourcePolicyT
>
inline GlobalVector& VariationalFormulationElasticity<VolumicIndexT, SurfacicIndexT, DofSourcePolicyT>
::GetNonCstVectorCurrentVelocity() noexcept
::GetNonCstVectorVelocityPreviousTimeIteration() noexcept
{
return const_cast<GlobalVector&>(GetVectorCurrentVelocity());
return const_cast<GlobalVector&>(GetVectorVelocityPreviousTimeIteration());
}
......@@ -496,10 +496,10 @@ namespace HappyHeart
class DofSourcePolicyT
>
inline const GlobalMatrix& VariationalFormulationElasticity<VolumicIndexT, SurfacicIndexT, DofSourcePolicyT>
::GetMatrixCurrentDisplacement() const noexcept
::GetMatrixDisplacementPreviousTimeIteration() const noexcept
{
assert(!(!matrix_current_displacement_));
return *matrix_current_displacement_;
assert(!(!matrix_displacement_previous_time_iteration_));
return *matrix_displacement_previous_time_iteration_;
}
......@@ -510,9 +510,9 @@ namespace HappyHeart
class DofSourcePolicyT
>
inline GlobalMatrix& VariationalFormulationElasticity<VolumicIndexT, SurfacicIndexT, DofSourcePolicyT>
::GetNonCstMatrixCurrentDisplacement() noexcept
::GetNonCstMatrixDisplacementPreviousTimeIteration() noexcept
{
return const_cast<GlobalMatrix&>(GetMatrixCurrentDisplacement());
return const_cast<GlobalMatrix&>(GetMatrixDisplacementPreviousTimeIteration());
}
......@@ -523,10 +523,10 @@ namespace HappyHeart
class DofSourcePolicyT
>
inline const GlobalMatrix& VariationalFormulationElasticity<VolumicIndexT, SurfacicIndexT, DofSourcePolicyT>
::GetMatrixCurrentVelocity() const noexcept
::GetMatrixVelocityPreviousTimeIteration() const noexcept
{
assert(!(!matrix_current_velocity_));
return *matrix_current_velocity_;
assert(!(!matrix_velocity_previous_time_iteration_));
return *matrix_velocity_previous_time_iteration_;
}
......@@ -537,9 +537,9 @@ namespace HappyHeart
class DofSourcePolicyT
>
inline GlobalMatrix& VariationalFormulationElasticity<VolumicIndexT, SurfacicIndexT, DofSourcePolicyT>
::GetNonCstMatrixCurrentVelocity() noexcept
::GetNonCstMatrixVelocityPreviousTimeIteration() noexcept
{
return const_cast<GlobalMatrix&>(GetMatrixCurrentVelocity());
return const_cast<GlobalMatrix&>(GetMatrixVelocityPreviousTimeIteration());
}
......
......@@ -58,6 +58,16 @@ namespace HappyHeart
variational_formulation.ComputeSystemRhs();
variational_formulation.ApplyEssentialBoundaryCondition<OperatorNS::Nature::nonlinear>(numbering_subset, numbering_subset);
variational_formulation.GetSystemMatrix(numbering_subset, numbering_subset).View(variational_formulation.MpiHappyHeart(),
"/Users/sebastien/Desktop/elastic_matrix.m",
__FILE__, __LINE__,
PETSC_VIEWER_ASCII_MATLAB);
variational_formulation.GetSystemRhs(numbering_subset).View(variational_formulation.MpiHappyHeart(),
"/Users/sebastien/Desktop/elastic_rhs.data",
__FILE__, __LINE__);
variational_formulation.SolveLinear<IsFactorized::no>(numbering_subset, numbering_subset);
}
......
......@@ -127,26 +127,26 @@ namespace HappyHeart
{
// Displacement matrix.
auto& current_displacement_matrix = GetNonCstMatrixCurrentDisplacement();
current_displacement_matrix.Copy(mass, __FILE__, __LINE__);
auto& displacement_previous_time_iteration_matrix = GetNonCstMatrixDisplacementPreviousTimeIteration();
displacement_previous_time_iteration_matrix.Copy(mass, __FILE__, __LINE__);
const auto coefficient =
2. * GetVolumicMass().GetConstantValue() / Utilities::Square(parent::GetTimeManager().GetTimeStep());
current_displacement_matrix.Scale(coefficient, __FILE__, __LINE__);
displacement_previous_time_iteration_matrix.Scale(coefficient, __FILE__, __LINE__);
Wrappers::Petsc::AXPY(-.5,
stiffness,
current_displacement_matrix,
displacement_previous_time_iteration_matrix,
__FILE__, __LINE__);
}
{
// Velocity matrix.
auto& current_velocity_matrix = GetNonCstMatrixCurrentVelocity();
current_velocity_matrix.Copy(mass, __FILE__, __LINE__);
current_velocity_matrix.Scale(2. * GetVolumicMass().GetConstantValue() / parent::GetTimeManager().GetTimeStep(),
auto& velocity_previous_time_iteration_matrix = GetNonCstMatrixVelocityPreviousTimeIteration();
velocity_previous_time_iteration_matrix.Copy(mass, __FILE__, __LINE__);
velocity_previous_time_iteration_matrix.Scale(2. * GetVolumicMass().GetConstantValue() / parent::GetTimeManager().GetTimeStep(),
__FILE__, __LINE__);
}
}
......
......@@ -178,11 +178,11 @@ namespace HappyHeart
const GlobalMatrix& GetMatrixDisplacement() const noexcept;
GlobalMatrix& GetNonCstMatrixCurrentDisplacement() noexcept;
GlobalMatrix& GetNonCstMatrixDisplacementPreviousTimeIteration() noexcept;
const GlobalMatrix& GetMatrixVelocity() const noexcept;
GlobalMatrix& GetNonCstMatrixCurrentVelocity() noexcept;
GlobalMatrix& GetNonCstMatrixVelocityPreviousTimeIteration() noexcept;
const GlobalMatrix& GetMass() const noexcept;
......
......@@ -85,7 +85,7 @@ namespace HappyHeart
inline GlobalMatrix& VariationalFormulationElasticity
::GetNonCstMatrixCurrentDisplacement() noexcept
::GetNonCstMatrixDisplacementPreviousTimeIteration() noexcept
{
return const_cast<GlobalMatrix&>(GetMatrixDisplacement());
}
......@@ -102,7 +102,7 @@ namespace HappyHeart
inline GlobalMatrix& VariationalFormulationElasticity
::GetNonCstMatrixCurrentVelocity() noexcept
::GetNonCstMatrixVelocityPreviousTimeIteration() noexcept
{
return const_cast<GlobalMatrix&>(GetMatrixVelocity());
}
......
......@@ -46,7 +46,7 @@ namespace HappyHeart
time_manager,
god_of_dof,
std::move(boundary_condition_list),
1., // contribution of DofSource must be removed from rhs in elastic case.
1., // contribution of DofSource must be removed from rhs in elastic case.
dof_source);
variational_formulation_->Init(input_parameter_data);
......
......@@ -137,7 +137,7 @@ namespace HappyHeart
auto& vm = this->GetNonCstVectorsAndMatrices();
// Update first the velocity: it needs the not-yet-updated previous displacement.
auto& velocity_prev_time_it = vm.GetNonCstCurrentVelocity();
auto& velocity_prev_time_it = vm.GetNonCstVelocityPreviousTimeIteration();
velocity_prev_time_it.Scale(-1., __FILE__, __LINE__);
......@@ -154,7 +154,7 @@ namespace HappyHeart
__FILE__, __LINE__);
// Then update displacement.
vm.GetNonCstCurrentDisplacement().Copy(newest_displacement, __FILE__, __LINE__);
vm.GetNonCstDisplacementPreviousTimeIteration().Copy(newest_displacement, __FILE__, __LINE__);
newest_displacement.template Print<MpiScale::processor_wise>(this->MpiHappyHeart(),
output_dir + "solid_displacement_prev_it.hhdata",
__FILE__, __LINE__);
......@@ -255,6 +255,8 @@ namespace HappyHeart
{
auto& vm = GetNonCstVectorsAndMatrices();
vm.GetEvaluationState().View(this->MpiHappyHeart(), __FILE__, __LINE__);
// Assemble stiffness (depends upon the time scheme; vm types is used here to call the proper
// assembling operation(s)).
HyperelasticityNS::Private::AssembleStiffness(this->GetStiffnessOperator(),
......@@ -263,7 +265,6 @@ namespace HappyHeart
}
template
<
class LawPolicyT,
......@@ -272,22 +273,23 @@ namespace HappyHeart
inline void VariationalFormulationHyperElasticity<LawPolicyT, TimeSchemeT>
::ComputeResidual()
{
std::cout << "COMPUTE RESIDUAL"<< std::endl;
const auto& numbering_subset = GetNumberingSubset();
this->GetNonCstSystemRhs(numbering_subset).ZeroEntries(__FILE__, __LINE__);
auto& rhs = this->GetNonCstSystemRhs(numbering_subset);
auto& vectors_and_matrices = this->GetNonCstVectorsAndMatrices();
auto& current_displacement = vectors_and_matrices.GetNonCstCurrentDisplacement();
auto& current_velocity = vectors_and_matrices.GetNonCstCurrentVelocity();
auto& displacement_previous_time_iteration = vectors_and_matrices.GetNonCstDisplacementPreviousTimeIteration();
auto& velocity_previous_time_iteration = vectors_and_matrices.GetNonCstVelocityPreviousTimeIteration();
std::lock_guard<std::mutex> lock(this->GetMutex());
auto& helper_vector = this->GetNonCstHelperGlobalVector<0>();
helper_vector.Copy(vectors_and_matrices.GetEvaluationState(), __FILE__, __LINE__);
Wrappers::Petsc::AXPY(-1., current_displacement, helper_vector, __FILE__, __LINE__);
Wrappers::Petsc::AXPY(- this->GetTimeManager().GetTimeStep(), current_velocity, helper_vector,
Wrappers::Petsc::AXPY(-1., displacement_previous_time_iteration, helper_vector, __FILE__, __LINE__);
Wrappers::Petsc::AXPY(- this->GetTimeManager().GetTimeStep(), velocity_previous_time_iteration, helper_vector,
__FILE__, __LINE__);
auto& dynamic_contribution_to_rhs = this->GetNonCstHelperGlobalVector<1>();
......@@ -301,6 +303,10 @@ namespace HappyHeart
dof_source_parent::AddToRhs(rhs);
// vectors_and_matrices.GetDisplacementPreviousTimeIteration().View(this->MpiHappyHeart(), __FILE__, __LINE__);
this->template ApplyEssentialBoundaryCondition<OperatorNS::Nature::linear>(numbering_subset,
numbering_subset);
}
......@@ -314,6 +320,7 @@ namespace HappyHeart
inline void VariationalFormulationHyperElasticity<LawPolicyT, TimeSchemeT>
::ComputeTangent()
{
std::cout << "COMPUTE TANGENT"<< std::endl;
const auto& numbering_subset = GetNumberingSubset();
this->GetNonCstSystemMatrix(numbering_subset, numbering_subset).ZeroEntries(__FILE__, __LINE__);
......@@ -324,6 +331,27 @@ namespace HappyHeart
{
system_matrix.Copy(vectors_and_matrices.GetMassPerSquareTime(), __FILE__, __LINE__);
static bool is_first = true;
if (is_first)
{
is_first = false;
vectors_and_matrices.GetMassPerSquareTime().View(this->MpiHappyHeart(), "/Users/sebastien/Desktop/mass.m",
__FILE__, __LINE__,
PETSC_VIEWER_ASCII_MATLAB);
vectors_and_matrices.GetMatrixNewStiffness().View(this->MpiHappyHeart(), "/Users/sebastien/Desktop/new_stiffness.m",
__FILE__, __LINE__,
PETSC_VIEWER_ASCII_MATLAB);
// vectors_and_matrices.GetMatrixStiffnessPreviousTimeIteration().View(this->MpiHappyHeart(), "/Users/sebastien/Desktop/current_stiffness.m",
// __FILE__, __LINE__,
// PETSC_VIEWER_ASCII_MATLAB);
}
HyperelasticityNS::Private::ComputeDynamicTimeSchemeTangentContribution(vectors_and_matrices, system_matrix);
}
......@@ -355,6 +383,7 @@ namespace HappyHeart
void VariationalFormulationHyperElasticity<LawPolicyT, TimeSchemeT>
::UpdateVectorsAndMatrices()
{
std::cout << "UPDATE VM" << std::endl;
auto& vm = this->GetNonCstVectorsAndMatrices();
{
......@@ -367,14 +396,14 @@ namespace HappyHeart
{
// Compute some matrices and vectors through arithmetical operations (e.g. vector for midpoint position).
const bool is_dynamic_iteration = this->GetTimeManager().GetStaticOrDynamic() == StaticOrDynamic::dynamic_;
const bool is_dynamic_iteration = true;
HyperelasticityNS::Private::PreSnesTimeSchemeDependantUpdate(is_dynamic_iteration, vm);
}
{
// Update relevant ghosts.
vm.GetNonCstEvaluationState().UpdateGhosts(__FILE__, __LINE__);
vm.GetNonCstCurrentDisplacement().UpdateGhosts(__FILE__, __LINE__);
vm.GetNonCstDisplacementPreviousTimeIteration().UpdateGhosts(__FILE__, __LINE__);
HyperelasticityNS::Private::PreSnesTimeSchemeDependantUpdateGhosts(vm);
}
......
......@@ -58,7 +58,7 @@ int main(int argc, char ** argv)
FSI_EINS::Policy::Hyperelasticity
<
HyperelasticityNS::LawNS::CiarletGeymonat,
HyperelasticityNS::TimeScheme::midpoint
HyperelasticityNS::TimeScheme::half_sum
>;
#else
......
......@@ -95,7 +95,6 @@ namespace HappyHeart
}
#endif // NDEBUG
formulation.UpdateVectorsAndMatrices();
formulation.ComputeResidual();
......
......@@ -97,15 +97,15 @@ namespace HappyHeart
GlobalMatrix& GetNonCstMassPerSquareTime() noexcept;
const GlobalVector& GetCurrentVelocity() const noexcept;
const GlobalVector& GetVelocityPreviousTimeIteration() const noexcept;
const GlobalVector& GetCurrentDisplacement() const noexcept;
const GlobalVector& GetDisplacementPreviousTimeIteration() const noexcept;
const GlobalVector& GetEvaluationState() const noexcept;
GlobalVector& GetNonCstCurrentVelocity() noexcept;
GlobalVector& GetNonCstVelocityPreviousTimeIteration() noexcept;
GlobalVector& GetNonCstCurrentDisplacement() noexcept;
GlobalVector& GetNonCstDisplacementPreviousTimeIteration() noexcept;
GlobalVector& GetNonCstEvaluationState() noexcept;
......@@ -137,10 +137,10 @@ namespace HappyHeart
//! Velocity from previous time iteration.
GlobalVector::unique_ptr current_velocity_ = nullptr;
GlobalVector::unique_ptr velocity_previous_time_iteration_ = nullptr;
//! Displacement from previous time iteration.
GlobalVector::unique_ptr current_displacement_ = nullptr;
GlobalVector::unique_ptr displacement_previous_time_iteration_ = nullptr;
//! evaluation state of the residual of the problem (only useful in SNES method)
GlobalVector::unique_ptr evaluation_state_ = nullptr;
......
......@@ -33,8 +33,8 @@ namespace HappyHeart
mass_per_square_time_ = std::make_unique<GlobalMatrix>(system_matrix);
evaluation_state_ = std::make_unique<GlobalVector>(system_rhs);
current_velocity_ = std::make_unique<GlobalVector>(system_rhs);
current_displacement_ = std::make_unique<GlobalVector>(system_rhs);
velocity_previous_time_iteration_ = std::make_unique<GlobalVector>(system_rhs);
displacement_previous_time_iteration_ = std::make_unique<GlobalVector>(system_rhs);
force_ = std::make_unique<GlobalVector>(system_rhs);
vector_new_stiffness_ = std::make_unique<GlobalVector>(system_rhs);
......@@ -68,25 +68,25 @@ namespace HappyHeart
template<class DerivedT>
inline const GlobalVector& VectorsAndMatricesCrtp<DerivedT>::GetCurrentVelocity() const noexcept
inline const GlobalVector& VectorsAndMatricesCrtp<DerivedT>::GetVelocityPreviousTimeIteration() const noexcept
{