9 template<
typename precision>
11 : num_nodes(num_nodes)
13 if (this->num_nodes == 0) {
14 throw invalid_argument(
"Any quadrature requires at least one quadrature nodes.");
18 template<
typename precision>
23 template<
typename precision>
29 template<
typename precision>
35 template<
typename precision>
41 template<
typename precision>
47 template<
typename precision>
53 template<
typename precision>
56 return this->num_nodes;
59 template<
typename precision>
66 template<
typename precision>
73 template<
typename precision>
79 template<
typename precision>
82 using cvec = Eigen::Array<precision, Eigen::Dynamic, 1>;
83 const cvec row_sums = this->get_q_mat().rowwise().sum();
84 Eigen::Map<const cvec> nodes(this->get_nodes().
data(), this->get_nodes().size());
85 return (row_sums - nodes).maxCoeff();
98 template<
typename precision>
105 for (
size_t i = 0; i < this->num_nodes; i++){
106 this->b_mat(0,i) = this->q_vec[i];
virtual size_t get_num_nodes() const
virtual const vector< precision > & get_nodes() const
virtual void compute_nodes()
static Matrix< scalar > compute_s_matrix(const Matrix< scalar > &q_mat)
Compute node-to-node quadrature matrix \( S \) from a given quadrature matrix \( Q \)...
virtual const Matrix< precision > & get_s_mat() const
Not implemented yet exception.
virtual bool right_is_node() const
virtual bool left_is_node() const
static Matrix< scalar > compute_q_matrix(const vector< scalar > &from, const vector< scalar > &to)
Compute quadrature matrix \( Q \) between two sets of nodes.
virtual const vector< precision > & get_q_vec() const
static vector< scalar > compute_q_vec(const vector< scalar > &nodes)
Compute vector \( q \) for integration from \( 0 \) to \( 1 \) for given set of nodes.
virtual void compute_weights()
Eigen::Matrix< scalar, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > Matrix
virtual const Matrix< precision > & get_b_mat() const
precision expected_error() const
Compute a rough estimate of the numerical error...
virtual const Matrix< precision > & get_q_mat() const