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

#873 Parameter: make the base constructor protected, as the class should...

#873 Parameter: make the base constructor protected, as the class should always be built through ParameterInstance. This will be crucial to handle properly time dependancy.
parent 16739f59
......@@ -24,6 +24,7 @@
namespace HappyHeart
{
/*!
* \brief Initialize properly a Parameter from the informations given in the input file.
*
......
......@@ -19,12 +19,9 @@ namespace HappyHeart
{
ThreeDimensionalParameter::~ThreeDimensionalParameter() = default;
void ThreeDimensionalParameter::SupplWrite(std::ostream& out) const
{
out << "# This parameter is defined from three scalar parameters:" << std::endl;
......@@ -35,7 +32,6 @@ namespace HappyHeart
out << std::endl;
GetScalarParameterZ().Write(out);
}
} // namespace ParameterNS
......
......@@ -98,7 +98,7 @@ namespace HappyHeart
//! Alias to return type.
using return_type = typename traits::return_type;
public:
protected:
/// \name Special members.
///@{
......@@ -122,6 +122,8 @@ namespace HappyHeart
const GeometricMeshRegion& geometric_mesh_region,
std::function<double(double)>&& time_dependant_factor = [](const double) { return 1.; } );
public:
//! Destructor.
virtual ~Parameter() = default;
......
......@@ -40,7 +40,7 @@ namespace HappyHeart
{
assert(IsConstant() && "This method is relevant only for spatially constant parameters.");
return SupplGetConstantValue() * GetTimeDependancyFactor();
return SupplGetConstantValue();
}
......@@ -51,7 +51,7 @@ namespace HappyHeart
if (IsConstant())
return GetConstantValue();
return SupplGetValue(quad_pt, geom_elt) * GetTimeDependancyFactor();
return SupplGetValue(quad_pt, geom_elt);
}
......
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