|
Medusa
1.1
Coordinate Free Mehless Method implementation
|
|
Go to the documentation of this file. 1 #ifndef MEDUSA_BITS_APPROXIMATIONS_MONOMIALS_FWD_HPP_
2 #define MEDUSA_BITS_APPROXIMATIONS_MONOMIALS_FWD_HPP_
19 template <
int dimension>
21 template <
int dimension>
23 template <
int dimension>
25 template <
int dimension>
37 template <
class vec_t>
47 Eigen::Matrix<int, dim, Eigen::Dynamic>
powers_;
90 const Eigen::Matrix<int, dim, Eigen::Dynamic>&
powers()
const {
return powers_; }
102 const std::vector<vector_t>& = {})
const;
116 template <
typename operator_t>
118 const std::vector<vector_t>& support = {},
scalar_t scale = 1)
const;
121 const std::vector<vector_t>& support = {},
scalar_t scale = 1)
const;
124 const std::vector<vector_t>& support = {},
scalar_t scale = 1)
const;
127 const std::vector<vector_t>& support = {},
scalar_t scale = 1)
const;
130 const std::vector<vector_t>& support = {},
scalar_t scale = 1)
const;
135 template <
typename operator_t>
138 return op.applyAt0(*
this, index, support, scale);
144 scalar_t evalOpAt0(
int index,
const Der1<dim>& der1,
const std::vector<vector_t>& = {},
147 scalar_t evalOpAt0(
int index,
const Der2<dim>& der2,
const std::vector<vector_t>& = {},
151 scalar_t evalOpAt0(
int index,
const Derivative<dim>& der,
const std::vector<vector_t>& = {},
156 friend std::ostream&
operator<<(std::ostream& os,
const Monomials<V>& m);
161 #endif // MEDUSA_BITS_APPROXIMATIONS_MONOMIALS_FWD_HPP_
Root namespace for the whole library.
Scalar scalar_t
Type of the elements, alias of Scalar.
static const shape_flags lap
Indicates to calculate laplace shapes.
@ dim
Number of elements of this matrix.
vec_t vector_t
Vector type.
scalar_t eval(int index, const vector_t &point, const std::vector< vector_t > &={}) const
Evaluates index-th monomial' at point.
scalar_t evalAt0(int index, const std::vector< vector_t > &={}) const
Evaluate index-th monomial at zero.
scalar_t evalOp(int index, const vector_t &point, operator_t op, const std::vector< vector_t > &support={}, scalar_t scale=1) const
Apply an operator at a given point.
friend std::ostream & operator<<(std::ostream &os, const Monomials< V > &m)
Output basic info about given Monomial basis.
@ dim
Dimensionality of the function domain.
Monomials()=default
Construct empty monomial basis with size = 0.
Monomials(const std::vector< std::vector< int >> &powers)
Construct monomial basis from monomials with specific powers.
A class representing Monomial basis.
vector_t::scalar_t scalar_t
Scalar type.
Represents a second derivative wrt. var1 and var2.
void setFromPowers(const std::vector< std::vector< int >> &powers)
Constructs basis from a vector of powers.
Represents a general derivative .
Represents the Laplacian operator.
Represents a first derivative wrt. var.
const Eigen::Matrix< int, dim, Eigen::Dynamic > & powers() const
Get saved monomial powers.
static Monomials< vec_t > tensorBasis(int order)
Construct a tensor basis of monomials ranging from 0 up to order (inclusive) in each dimension.
scalar_t evalOpAt0(int index, const operator_t&op, const std::vector< vector_t > &support={}, scalar_t scale=1) const
Evaluate an operator on index-th monomial at zero.
int size() const
Return number of monomials in this basis.
Eigen::Matrix< int, dim, Eigen::Dynamic > powers_
A vector describing monomials with the powers of every coordinate.
static std::vector< std::vector< int > > generatePowers(int max_order, int dim)
Generate powers for dim-d monomials up to max_order.