Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions src/model/BloodVessel.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class BloodVessel : public Block {
* @param dofhandler Degree-of-freedom handler to register variables and
* equations at
*/
void setup_dofs(DOFHandler& dofhandler);
void setup_dofs(DOFHandler& dofhandler) override;

/**
* @brief Update the constant contributions of the element in a sparse
Expand All @@ -179,7 +179,8 @@ class BloodVessel : public Block {
* @param system System to update contributions at
* @param parameters Parameters of the model
*/
void update_constant(SparseSystem& system, std::vector<double>& parameters);
void update_constant(SparseSystem& system,
std::vector<double>& parameters) override;

/**
* @brief Update the solution-dependent contributions of the element in a
Expand All @@ -190,9 +191,10 @@ class BloodVessel : public Block {
* @param y Current solution
* @param dy Current derivate of the solution
*/
void update_solution(SparseSystem& system, std::vector<double>& parameters,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& y,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& dy);
void update_solution(
SparseSystem& system, std::vector<double>& parameters,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& y,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& dy) override;

/**
* @brief Set the gradient of the block contributions with respect to the
Expand All @@ -207,7 +209,8 @@ class BloodVessel : public Block {
void update_gradient(Eigen::SparseMatrix<double>& jacobian,
Eigen::Matrix<double, Eigen::Dynamic, 1>& residual,
Eigen::Matrix<double, Eigen::Dynamic, 1>& alpha,
std::vector<double>& y, std::vector<double>& dy);
std::vector<double>& y,
std::vector<double>& dy) override;

/**
* @brief Number of triplets of element
Expand Down
15 changes: 9 additions & 6 deletions src/model/BloodVesselCRL.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class BloodVesselCRL : public Block {
* @param dofhandler Degree-of-freedom handler to register variables and
* equations at
*/
void setup_dofs(DOFHandler& dofhandler);
void setup_dofs(DOFHandler& dofhandler) override;

/**
* @brief Update the constant contributions of the element in a sparse
Expand All @@ -158,7 +158,8 @@ class BloodVesselCRL : public Block {
* @param system System to update contributions at
* @param parameters Parameters of the model
*/
void update_constant(SparseSystem& system, std::vector<double>& parameters);
void update_constant(SparseSystem& system,
std::vector<double>& parameters) override;

/**
* @brief Update the solution-dependent contributions of the element in a
Expand All @@ -169,9 +170,10 @@ class BloodVesselCRL : public Block {
* @param y Current solution
* @param dy Current derivate of the solution
*/
void update_solution(SparseSystem& system, std::vector<double>& parameters,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& y,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& dy);
void update_solution(
SparseSystem& system, std::vector<double>& parameters,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& y,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& dy) override;

/**
* @brief Set the gradient of the block contributions with respect to the
Expand All @@ -186,7 +188,8 @@ class BloodVesselCRL : public Block {
void update_gradient(Eigen::SparseMatrix<double>& jacobian,
Eigen::Matrix<double, Eigen::Dynamic, 1>& residual,
Eigen::Matrix<double, Eigen::Dynamic, 1>& alpha,
std::vector<double>& y, std::vector<double>& dy);
std::vector<double>& y,
std::vector<double>& dy) override;

/**
* @brief Number of triplets of element
Expand Down
10 changes: 6 additions & 4 deletions src/model/BloodVesselJunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,16 @@ class BloodVesselJunction : public Block {
* @param dofhandler Degree-of-freedom handler to register variables and
* equations at
*/
void setup_dofs(DOFHandler& dofhandler);
void setup_dofs(DOFHandler& dofhandler) override;

/**
* @brief Update the constant contributions of the element in a sparse system
*
* @param system System to update contributions at
* @param parameters Parameters of the model
*/
void update_constant(SparseSystem& system, std::vector<double>& parameters);
void update_constant(SparseSystem& system,
std::vector<double>& parameters) override;

/**
* @brief Update the solution-dependent contributions of the element in a
Expand All @@ -201,7 +202,7 @@ class BloodVesselJunction : public Block {
virtual void update_solution(
SparseSystem& system, std::vector<double>& parameters,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& y,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& dy);
const Eigen::Matrix<double, Eigen::Dynamic, 1>& dy) override;

/**
* @brief Set the gradient of the block contributions with respect to the
Expand All @@ -216,7 +217,8 @@ class BloodVesselJunction : public Block {
void update_gradient(Eigen::SparseMatrix<double>& jacobian,
Eigen::Matrix<double, Eigen::Dynamic, 1>& residual,
Eigen::Matrix<double, Eigen::Dynamic, 1>& alpha,
std::vector<double>& y, std::vector<double>& dy);
std::vector<double>& y,
std::vector<double>& dy) override;

/**
* @brief Number of triplets of element
Expand Down
5 changes: 3 additions & 2 deletions src/model/BloodVesselRC.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ class BloodVesselRC : public Block {
/// @brief Local IDs of the parameters
enum ParamId { RPD = 0, CP = 1 };

void setup_dofs(DOFHandler& dofhandler);
void update_constant(SparseSystem& system, std::vector<double>& parameters);
void setup_dofs(DOFHandler& dofhandler) override;
void update_constant(SparseSystem& system,
std::vector<double>& parameters) override;

/// @brief Number of triplets of element
TripletsContributions num_triplets{5, 1, 0};
Expand Down
10 changes: 6 additions & 4 deletions src/model/ChamberElastanceInductorExponential.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ class ChamberElastanceInductorExponential : public ChamberElastanceInductor {
VASO = 4,
};

void update_time(SparseSystem& system, std::vector<double>& parameters);
void update_solution(SparseSystem& system, std::vector<double>& parameters,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& y,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& dy);
void update_time(SparseSystem& system,
std::vector<double>& parameters) override;
void update_solution(
SparseSystem& system, std::vector<double>& parameters,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& y,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& dy) override;

/// @brief Number of triplets of element
TripletsContributions num_triplets{6, 2, 1};
Expand Down
15 changes: 9 additions & 6 deletions src/model/ChamberSphere.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class ChamberSphere : public Block {
* @param dofhandler Degree-of-freedom handler to register variables and
* equations at
*/
void setup_dofs(DOFHandler& dofhandler);
void setup_dofs(DOFHandler& dofhandler) override;

/**
* @brief Update the constant contributions of the element in a sparse
Expand All @@ -191,7 +191,8 @@ class ChamberSphere : public Block {
* @param system System to update contributions at
* @param parameters Parameters of the model
*/
void update_constant(SparseSystem& system, std::vector<double>& parameters);
void update_constant(SparseSystem& system,
std::vector<double>& parameters) override;

/**
* @brief Update the time-dependent contributions of the element in a sparse
Expand All @@ -200,7 +201,8 @@ class ChamberSphere : public Block {
* @param system System to update contributions at
* @param parameters Parameters of the model
*/
void update_time(SparseSystem& system, std::vector<double>& parameters);
void update_time(SparseSystem& system,
std::vector<double>& parameters) override;

/**
* @brief Update the solution-dependent contributions of the element in a
Expand All @@ -211,9 +213,10 @@ class ChamberSphere : public Block {
* @param y Current solution
* @param dy Current derivate of the solution
*/
void update_solution(SparseSystem& system, std::vector<double>& parameters,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& y,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& dy);
void update_solution(
SparseSystem& system, std::vector<double>& parameters,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& y,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& dy) override;

/**
* @brief Update the elastance functions which depend on time
Expand Down
14 changes: 8 additions & 6 deletions src/model/ClosedLoopCoronaryBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,22 @@ class ClosedLoopCoronaryBC : public Block {
* @param dofhandler Degree-of-freedom handler to register variables and
* equations at
*/
void setup_dofs(DOFHandler& dofhandler);
void setup_dofs(DOFHandler& dofhandler) override;

/**
* @brief Setup parameters that depend on the model
*
*/
virtual void setup_model_dependent_params() = 0;
virtual void setup_model_dependent_params() override = 0;

/**
* @brief Update the constant contributions of the element in a sparse system
*
* @param system System to update contributions at
* @param parameters Parameters of the model
*/
void update_constant(SparseSystem& system, std::vector<double>& parameters);
void update_constant(SparseSystem& system,
std::vector<double>& parameters) override;

/**
* @brief Update the solution-dependent contributions of the element in a
Expand All @@ -152,9 +153,10 @@ class ClosedLoopCoronaryBC : public Block {
* @param y Current solution
* @param dy Current derivate of the solution
*/
void update_solution(SparseSystem& system, std::vector<double>& parameters,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& y,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& dy);
void update_solution(
SparseSystem& system, std::vector<double>& parameters,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& y,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& dy) override;

/**
* @brief Number of triplets of element
Expand Down
2 changes: 1 addition & 1 deletion src/model/ClosedLoopCoronaryLeftBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class ClosedLoopCoronaryLeftBC : public ClosedLoopCoronaryBC {
* @brief Setup parameters that depend on the model
*
*/
void setup_model_dependent_params();
void setup_model_dependent_params() override;
};

#endif // SVZERODSOLVER_MODEL_CLOSEDLOOPCORONARYLEFTBC_HPP_
2 changes: 1 addition & 1 deletion src/model/ClosedLoopCoronaryRightBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class ClosedLoopCoronaryRightBC : public ClosedLoopCoronaryBC {
* @brief Setup parameters that depend on the model
*
*/
void setup_model_dependent_params();
void setup_model_dependent_params() override;
};

#endif // SVZERODSOLVER_MODEL_CLOSEDLOOPCORONARYRIGHTBC_HPP_
17 changes: 10 additions & 7 deletions src/model/ClosedLoopHeartPulmonary.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class ClosedLoopHeartPulmonary : public Block {
* @param dofhandler Degree-of-freedom handler to register variables and
* equations at
*/
void setup_dofs(DOFHandler& dofhandler);
void setup_dofs(DOFHandler& dofhandler) override;

/**
* @brief Update the constant contributions of the element in a sparse
Expand All @@ -204,7 +204,8 @@ class ClosedLoopHeartPulmonary : public Block {
* @param system System to update contributions at
* @param parameters Parameters of the model
*/
void update_constant(SparseSystem& system, std::vector<double>& parameters);
void update_constant(SparseSystem& system,
std::vector<double>& parameters) override;

/**
* @brief Update the time-dependent contributions of the element in a sparse
Expand All @@ -213,7 +214,8 @@ class ClosedLoopHeartPulmonary : public Block {
* @param system System to update contributions at
* @param parameters Parameters of the model
*/
void update_time(SparseSystem& system, std::vector<double>& parameters);
void update_time(SparseSystem& system,
std::vector<double>& parameters) override;

/**
* @brief Update the solution-dependent contributions of the element in a
Expand All @@ -224,16 +226,17 @@ class ClosedLoopHeartPulmonary : public Block {
* @param y Current solution
* @param dy Current derivate of the solution
*/
void update_solution(SparseSystem& system, std::vector<double>& parameters,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& y,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& dy);
void update_solution(
SparseSystem& system, std::vector<double>& parameters,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& y,
const Eigen::Matrix<double, Eigen::Dynamic, 1>& dy) override;

/**
* @brief Modify the solution after solving it
*
* @param y Current solution
*/
void post_solve(Eigen::Matrix<double, Eigen::Dynamic, 1>& y);
void post_solve(Eigen::Matrix<double, Eigen::Dynamic, 1>& y) override;

/**
* @brief Number of triplets of element
Expand Down
5 changes: 3 additions & 2 deletions src/model/ClosedLoopRCRBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class ClosedLoopRCRBC : public Block {
* @param dofhandler Degree-of-freedom handler to register variables and
* equations at
*/
void setup_dofs(DOFHandler& dofhandler);
void setup_dofs(DOFHandler& dofhandler) override;

/**
* @brief Update the constant contributions of the element in a sparse
Expand All @@ -150,7 +150,8 @@ class ClosedLoopRCRBC : public Block {
* @param system System to update contributions at
* @param parameters Parameters of the model
*/
void update_constant(SparseSystem& system, std::vector<double>& parameters);
void update_constant(SparseSystem& system,
std::vector<double>& parameters) override;

/**
* @brief Number of triplets of element
Expand Down
8 changes: 5 additions & 3 deletions src/model/FlowReferenceBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,16 @@ class FlowReferenceBC : public Block {
* @param dofhandler Degree-of-freedom handler to register variables and
* equations at
*/
void setup_dofs(DOFHandler& dofhandler);
void setup_dofs(DOFHandler& dofhandler) override;

/**
* @brief Update the constant contributions of the element in a sparse system
*
* @param system System to update contributions at
* @param parameters Parameters of the model
*/
void update_constant(SparseSystem& system, std::vector<double>& parameters);
void update_constant(SparseSystem& system,
std::vector<double>& parameters) override;

/**
* @brief Update the time-dependent contributions of the element in a sparse
Expand All @@ -114,7 +115,8 @@ class FlowReferenceBC : public Block {
* @param system System to update contributions at
* @param parameters Parameters of the model
*/
void update_time(SparseSystem& system, std::vector<double>& parameters);
void update_time(SparseSystem& system,
std::vector<double>& parameters) override;

/**
* @brief Number of triplets of element
Expand Down
8 changes: 5 additions & 3 deletions src/model/Junction.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,16 @@ class Junction : public Block {
* @param dofhandler Degree-of-freedom handler to register variables and
* equations at
*/
void setup_dofs(DOFHandler& dofhandler);
void setup_dofs(DOFHandler& dofhandler) override;

/**
* @brief Update the constant contributions of the element in a sparse system
*
* @param system System to update contributions at
* @param parameters Parameters of the model
*/
void update_constant(SparseSystem& system, std::vector<double>& parameters);
void update_constant(SparseSystem& system,
std::vector<double>& parameters) override;

/**
* @brief Set the gradient of the block contributions with respect to the
Expand All @@ -132,7 +133,8 @@ class Junction : public Block {
void update_gradient(Eigen::SparseMatrix<double>& jacobian,
Eigen::Matrix<double, Eigen::Dynamic, 1>& residual,
Eigen::Matrix<double, Eigen::Dynamic, 1>& alpha,
std::vector<double>& y, std::vector<double>& dy);
std::vector<double>& y,
std::vector<double>& dy) override;

/**
* @brief Number of triplets of element
Expand Down
Loading
Loading