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

#969 Reorganize Poromechanics implicit step.

parent 7e819f87
This diff is collapsed.
......@@ -9,7 +9,7 @@
//
#include "ModelInstances/UnderDevelopment/Poromechanics/ImplicitStepFluid/GlobalVariationalOperatorInstances/Darcy.hpp"
#include "ModelInstances/UnderDevelopment/Poromechanics/ImplicitStep/ImplicitStepFluid/GlobalVariationalOperatorInstances/Darcy.hpp"
namespace HappyHeart
......
......@@ -8,8 +8,8 @@
// Copyright (c) 2015 Inria. All rights reserved.
//
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_FLUID_x_GLOBAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HPP_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_FLUID_x_GLOBAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HPP_
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_x_IMPLICIT_STEP_FLUID_x_GLOBAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HPP_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_x_IMPLICIT_STEP_FLUID_x_GLOBAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HPP_
# include "Parameters/Parameter.hpp"
......@@ -17,21 +17,21 @@
# include "Operators/GlobalVariationalOperator/GlobalVariationalOperator.hpp"
# include "ModelInstances/UnderDevelopment/Poromechanics/ImplicitStepFluid/LocalVariationalOperatorInstances/Darcy.hpp"
# include "ModelInstances/UnderDevelopment/Poromechanics/ImplicitStep/ImplicitStepFluid/LocalVariationalOperatorInstances/Darcy.hpp"
namespace HappyHeart
{
namespace PoromechanicsNS
{
namespace GlobalVariationalOperatorNS
{
/*!
* \brief Implementation of global Darcy operator.
*
......@@ -43,37 +43,37 @@ namespace HappyHeart
Darcy,
LocalVariationalOperatorNS::Darcy
>
{
public:
//! \copydoc doxygen_hide_alias_self
using self = Darcy;
//! Alias to unique pointer.
using const_unique_ptr = std::unique_ptr<const self>;
//! Returns the name of the operator.
static const std::string& ClassName();
//! Convenient alias to pinpoint the GlobalVariationalOperator parent.
using parent = GlobalVariationalOperator
<
self,
LocalVariationalOperatorNS::Darcy
>;
//! Friendship to the parent class so that the CRTP can reach private methods defined below.
friend parent;
public:
/// \name Special members.
///@{
/*!
* \brief Constructor.
*
......@@ -94,26 +94,26 @@ namespace HappyHeart
double internal_friction,
const TimeManager& time_manager,
const QuadratureRulePerTopology* const quadrature_rule_per_topology = nullptr);
//! Destructor.
~Darcy() = default;
//! Copy constructor.
Darcy(const Darcy&) = default;
//! Move constructor.
Darcy(Darcy&&) = default;
//! Copy affectation.
Darcy& operator=(const Darcy&) = default;
//! Move affectation.
Darcy& operator=(Darcy&&) = default;
///@}
/*!
* \brief Assemble into one or several vectors.
*
......@@ -130,37 +130,37 @@ namespace HappyHeart
void Assemble(LinearAlgebraTupleT&& global_vector_with_coeff_tuple,
ImplicitStepFluidNS::IsFullDarcy is_full_darcy,
const Domain& domain = Domain()) const;
private:
void
SetComputeEltArrayArguments(const LocalFEltSpace& local_felt_space,
typename parent::local_variational_operator_type& local_operator,
std::tuple<ImplicitStepFluidNS::IsFullDarcy>&& additional_arguments) const;
public:
// \todo #820 Just for debug purpose!
const ParameterAtDof<ParameterNS::Type::vector>& GetVelocitySolutionParam() const noexcept;
private:
// \todo #820 Just for debug purpose!
const ParameterAtDof<ParameterNS::Type::vector>& velocity_solution_;
};
} // namespace GlobalVariationalOperatorNS
} //namespace PoromechanicsNS
} // namespace HappyHeart
# include "ModelInstances/UnderDevelopment/Poromechanics/ImplicitStepFluid/GlobalVariationalOperatorInstances/Darcy.hxx"
# include "ModelInstances/UnderDevelopment/Poromechanics/ImplicitStep/ImplicitStepFluid/GlobalVariationalOperatorInstances/Darcy.hxx"
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_FLUID_x_GLOBAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HPP_
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_x_IMPLICIT_STEP_FLUID_x_GLOBAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HPP_
//! \file
//! \file
//
//
// Darcy.hxx
......@@ -8,22 +8,22 @@
// Copyright (c) 2015 Inria. All rights reserved.
//
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_FLUID_x_GLOBAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HXX_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_FLUID_x_GLOBAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HXX_
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_x_IMPLICIT_STEP_FLUID_x_GLOBAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HXX_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_x_IMPLICIT_STEP_FLUID_x_GLOBAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HXX_
namespace HappyHeart
{
namespace PoromechanicsNS
{
namespace GlobalVariationalOperatorNS
{
template<class LinearAlgebraTupleT>
inline void Darcy
::Assemble(LinearAlgebraTupleT&& global_vector_with_coeff_tuple,
......@@ -34,21 +34,21 @@ namespace HappyHeart
domain,
is_full_darcy);
}
inline const ParameterAtDof<ParameterNS::Type::vector>& Darcy::GetVelocitySolutionParam() const noexcept
{
return velocity_solution_;
}
} // namespace GlobalVariationalOperatorNS
} //namespace PoromechanicsNS
} // namespace HappyHeart
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_FLUID_x_GLOBAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HXX_
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_x_IMPLICIT_STEP_FLUID_x_GLOBAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HXX_
......@@ -8,7 +8,7 @@
// Copyright (c) 2015 Inria. All rights reserved.
//
#include "ModelInstances/UnderDevelopment/Poromechanics/ImplicitStepFluid/LocalVariationalOperatorInstances/Darcy.hpp"
#include "ModelInstances/UnderDevelopment/Poromechanics/ImplicitStep/ImplicitStepFluid/LocalVariationalOperatorInstances/Darcy.hpp"
namespace HappyHeart
......
......@@ -8,8 +8,8 @@
// Copyright (c) 2015 Inria. All rights reserved.
//
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_FLUID_x_LOCAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HPP_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_FLUID_x_LOCAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HPP_
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_x_IMPLICIT_STEP_FLUID_x_LOCAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HPP_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_x_IMPLICIT_STEP_FLUID_x_LOCAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HPP_
# include <memory>
# include <vector>
......@@ -27,25 +27,25 @@
namespace HappyHeart
{
namespace PoromechanicsNS
{
namespace ImplicitStepFluidNS
{
enum class IsFullDarcy { yes, no, undetermined };
} // namespace ImplicitStepFluidNS
namespace LocalVariationalOperatorNS
{
/*!
* \brief Implementation of local Darcy operator.
*
......@@ -56,29 +56,29 @@ namespace HappyHeart
: public ::HappyHeart::Advanced::LocalVariationalOperatorNS::LinearLocalVariationalOperator<LocalVector>,
private Crtp::Porosity<Darcy>
{
public:
//! \copydoc doxygen_hide_alias_self
using self = Darcy;
//! Alias to unique pointer.
using unique_ptr = std::unique_ptr<self>;
//! Alias to parent.
using parent = LinearLocalVariationalOperator<LocalVector>;
//! Alias to porosity parent.
using porosity_parent = Crtp::Porosity<self>;
//! Returns the name of the operator.
static const std::string& ClassName();
public:
/// \name Special members.
///@{
/*!
* \brief Constructor.
*
......@@ -101,26 +101,26 @@ namespace HappyHeart
const ParameterAtDof<ParameterNS::Type::vector>& velFtr,
const ParameterAtDof<ParameterNS::Type::scalar>& pressure_solution,
double internal_friction);
//! Destructor.
virtual ~Darcy();
//! Copy constructor.
Darcy(const Darcy&) = delete;
//! Move constructor.
Darcy(Darcy&&) = delete;
//! Copy affectation.
Darcy& operator=(const Darcy&) = delete;
//! Move affectation.
Darcy& operator=(Darcy&&) = delete;
///@}
/*!
* \brief Compute the elementary \a OperatorNatureT.
*
......@@ -131,22 +131,22 @@ namespace HappyHeart
*
*/
void ComputeEltArray();
//! Set the IsFulDarcy setting.
void SetIsFullDarcy(ImplicitStepFluidNS::IsFullDarcy value);
private:
//! Internal friction (Dporo in Freefem script).
double GetInternalFriction() const noexcept;
//! \todo #820 Document...
const ParameterAtDof<ParameterNS::Type::vector>& GetVelocitySolution() const noexcept;
//! \todo #820 Change name...
const ParameterAtDof<ParameterNS::Type::vector>& GetVelSHalfVhf() const noexcept;
//! \todo #820 Document...
const ParameterAtDof<ParameterNS::Type::scalar>& GetPressureSolution() const noexcept;
......@@ -155,33 +155,33 @@ namespace HappyHeart
//! Density of the fluid.
const ScalarParameter<>& GetDensity() const noexcept;
//! Get the IsFulDarcy setting.
ImplicitStepFluidNS::IsFullDarcy GetIsFullDarcy() const noexcept;
private:
//! Internal friction (Dporo in Freefem script).
const double internal_friction_;
//! \todo #820 Document...
const ParameterAtDof<ParameterNS::Type::vector>& velocity_solution_;
//! \todo #820 Bruno's name currently used!
const ParameterAtDof<ParameterNS::Type::vector>& velSHalfVhf_;
const ParameterAtDof<ParameterNS::Type::vector>& velFtr_;
//! \todo #820 Document...
const ParameterAtDof<ParameterNS::Type::scalar>& pressure_solution_;
//! Time manager.
const TimeManager& time_manager_;
//! Density of the fluid.
const ScalarParameter<>& density_;
//! Whether all terms are computed or not (ture in NewtonFPmixt, false just after that).
// \todo #820 Using it dynamically makes it possible to use the same operator for both cases.
// However for performance we would earn a bit defining two different operators where
......@@ -189,18 +189,18 @@ namespace HappyHeart
ImplicitStepFluidNS::IsFullDarcy is_full_darcy_ = ImplicitStepFluidNS::IsFullDarcy::undetermined;
};
} // namespace LocalVariationalOperatorNS
} // namespace PoromechanicsNS
} // namespace HappyHeart
# include "ModelInstances/UnderDevelopment/Poromechanics/ImplicitStepFluid/LocalVariationalOperatorInstances/Darcy.hxx"
# include "ModelInstances/UnderDevelopment/Poromechanics/ImplicitStep/ImplicitStepFluid/LocalVariationalOperatorInstances/Darcy.hxx"
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_FLUID_x_LOCAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HPP_
#endif // HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_x_IMPLICIT_STEP_FLUID_x_LOCAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HPP_
......@@ -8,73 +8,73 @@
// Copyright (c) 2015 Inria. All rights reserved.
//
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_FLUID_x_LOCAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HXX_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_FLUID_x_LOCAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HXX_
#ifndef HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_x_IMPLICIT_STEP_FLUID_x_LOCAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HXX_
# define HAPPY_HEART_x_MODEL_INSTANCES_x_UNDER_DEVELOPMENT_x_POROMECHANICS_x_IMPLICIT_STEP_x_IMPLICIT_STEP_FLUID_x_LOCAL_VARIATIONAL_OPERATOR_INSTANCES_x_DARCY_HXX_
namespace HappyHeart
{
namespace PoromechanicsNS
{
namespace LocalVariationalOperatorNS
{
inline double Darcy::GetInternalFriction() const noexcept
{
return internal_friction_;
}
inline const ParameterAtDof<ParameterNS::Type::vector>& Darcy::GetVelocitySolution() const noexcept
{
return velocity_solution_;
}
inline const ParameterAtDof<ParameterNS::Type::scalar>& Darcy::GetPressureSolution() const noexcept
{
return pressure_solution_;
}
inline const TimeManager& Darcy::GetTimeManager() const noexcept
{
return time_manager_;
}
inline const ScalarParameter<>& Darcy::GetDensity() const noexcept
{
return density_;
}
inline ImplicitStepFluidNS::IsFullDarcy Darcy::GetIsFullDarcy() const noexcept
{
assert(is_full_darcy_ != ImplicitStepFluidNS::IsFullDarcy::undetermined);
return is_full_darcy_;
}