25#include "external/json.hpp"
30using json = nlohmann::json;
85 const std::string
file,
90 std::size_t
pos = std::string(
__FILE__).find_last_of(
"/");
96 std::vector<QuadratureRule<dim>>
rules;
101 json
order_data = data[std::to_string(order)];
106 std::vector<std::vector<Float>> nodes =
order_data[
"nodes"];
113 rule.weights = Eigen::Map<EigMat<Float>> (
114 ((std::vector<Float>)
order_data[
"weights"]).data(), 1,
rule.num_nodes
125template std::vector<QuadratureRule<1>>
load_rules(
126 const std::string
file,
130template std::vector<QuadratureRule<2>>
load_rules(
131 const std::string
file,
135template std::vector<QuadratureRule<3>>
load_rules(
136 const std::string
file,
const Float float_eps
Numerical infinitesimal.
std::vector< QuadratureRule< dim > > load_rules(const std::string file, ConstEigRef< EigColVec< Index > > orders)
Loads quadrature rules from the specified json file assumed to be located in the same directory as th...
bool compare_with_tol(const Complex val, const Complex val_ref, const Float tol, const uint8_t mode)
Compares two complex numbers within a given tolerance based on a given rule.
const Eigen::Ref< const EigObj > ConstEigRef
Read-only reference to an Eigen object.
double Float
Floating point number.
std::complex< Float > Complex
Complex floating point number.
Eigen::Matrix< T, N, 1 > EigColVecN
Fixed-size column vector of size N containing type T.
std::size_t Index
Unsigned integer type for indices and container sizes.
Primary namespace for the OpenBEM library.