Skip to content
Snippets Groups Projects
Commit 499cc02c authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[PL] Fetch the curves once in create, not assembly

ctest runtime drops from 7.33 to 7 time units ~ 4.5%
parent 1447030f
No related branches found
No related tags found
No related merge requests found
...@@ -107,7 +107,8 @@ std::unique_ptr<Process> createRichardsFlowProcess( ...@@ -107,7 +107,8 @@ std::unique_ptr<Process> createRichardsFlowProcess(
specific_body_force, specific_body_force,
has_gravity, has_gravity,
mass_lump, mass_lump,
curves}; *curves.at("curve_PC_S"),
*curves.at("curve_S_Krel")};
SecondaryVariableCollection secondary_variables; SecondaryVariableCollection secondary_variables;
NumLib::NamedFunctionCaller named_function_caller( NumLib::NamedFunctionCaller named_function_caller(
......
...@@ -82,9 +82,9 @@ public: ...@@ -82,9 +82,9 @@ public:
assert(local_matrix_size == ShapeFunction::NPOINTS * NUM_NODAL_DOF); assert(local_matrix_size == ShapeFunction::NPOINTS * NUM_NODAL_DOF);
MathLib::PiecewiseLinearInterpolation const& interpolated_Pc = MathLib::PiecewiseLinearInterpolation const& interpolated_Pc =
*_process_data.curves.at("curve_PC_S"); _process_data.interpolated_Pc;
MathLib::PiecewiseLinearInterpolation const& interpolated_Kr = MathLib::PiecewiseLinearInterpolation const& interpolated_Kr =
*_process_data.curves.at("curve_S_Krel"); _process_data.interpolated_Kr;
auto local_M = MathLib::createZeroedMatrix<NodalMatrixType>( auto local_M = MathLib::createZeroedMatrix<NodalMatrixType>(
local_M_data, local_matrix_size, local_matrix_size); local_M_data, local_matrix_size, local_matrix_size);
......
...@@ -33,9 +33,8 @@ struct RichardsFlowProcessData ...@@ -33,9 +33,8 @@ struct RichardsFlowProcessData
Parameter<double> const& specific_body_force_, Parameter<double> const& specific_body_force_,
bool const has_gravity_, bool const has_gravity_,
bool const has_mass_lumping_, bool const has_mass_lumping_,
std::map<std::string, MathLib::PiecewiseLinearInterpolation const& interpolated_Pc_,
std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const& MathLib::PiecewiseLinearInterpolation const& interpolated_Kr_)
curves_)
: intrinsic_permeability(intrinsic_permeability_), : intrinsic_permeability(intrinsic_permeability_),
porosity(porosity_), porosity(porosity_),
viscosity(viscosity_), viscosity(viscosity_),
...@@ -44,7 +43,8 @@ struct RichardsFlowProcessData ...@@ -44,7 +43,8 @@ struct RichardsFlowProcessData
specific_body_force(specific_body_force_), specific_body_force(specific_body_force_),
has_gravity(has_gravity_), has_gravity(has_gravity_),
has_mass_lumping(has_mass_lumping_), has_mass_lumping(has_mass_lumping_),
curves(curves_) interpolated_Pc(interpolated_Pc_),
interpolated_Kr(interpolated_Kr_)
{ {
} }
...@@ -57,7 +57,8 @@ struct RichardsFlowProcessData ...@@ -57,7 +57,8 @@ struct RichardsFlowProcessData
specific_body_force(other.specific_body_force), specific_body_force(other.specific_body_force),
has_gravity(other.has_gravity), has_gravity(other.has_gravity),
has_mass_lumping(other.has_mass_lumping), has_mass_lumping(other.has_mass_lumping),
curves(other.curves) interpolated_Pc(other.interpolated_Pc),
interpolated_Kr(other.interpolated_Kr)
{ {
} }
...@@ -78,9 +79,8 @@ struct RichardsFlowProcessData ...@@ -78,9 +79,8 @@ struct RichardsFlowProcessData
Parameter<double> const& specific_body_force; Parameter<double> const& specific_body_force;
bool const has_gravity; bool const has_gravity;
bool const has_mass_lumping; bool const has_mass_lumping;
std::map<std::string, MathLib::PiecewiseLinearInterpolation const& interpolated_Pc;
std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const& MathLib::PiecewiseLinearInterpolation const& interpolated_Kr;
curves;
}; };
} // namespace RichardsFlow } // namespace RichardsFlow
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment