Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
LowRankBilinear.h
Go to the documentation of this file.
1#ifndef model_LowRankBilinear_H_
2#define model_LowRankBilinear_H_
3#include <Eigen/Dense>
4namespace model
5{
6 // Optional positive-semidefinite contribution F^T F, separate from sparse triplets.
7 template<class Form>
8 Eigen::MatrixXd lowRankBilinearRows(const Form& form)
9 {
10 if constexpr(requires { form.lowRankPenaltyRows(); })
11 {
12 return form.lowRankPenaltyRows();
13 }
14 else
15 {
16 return Eigen::MatrixXd(0,form.field().gSize());
17 }
18 }
19}
20#endif
Eigen::MatrixXd lowRankBilinearRows(const Form &form)