HArD::Core3D
Hybrid Arbitrary Degree::Core 3D - Library to implement 3D schemes with vertex, edge, face and cell polynomials as unknowns
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
Manicore

Classes

class  HArDCore3D::DDR_PEC
 
class  HArDCore3D::DDR_Spaces
 
struct  HArDCore3D::DDR_Spaces::DDR_function_type
 

Typedefs

typedef Eigen::KroneckerProduct< Eigen::MatrixXd, Eigen::MatrixXd > HArDCore3D::DDR_PEC::Kronecker
 
typedef std::function< double(const Eigen::Vector3d &)> HArDCore3D::DDR_Spaces::DDR_function_type::scalar
 
typedef std::function< Eigen::Vector3d(const Eigen::Vector3d &)> HArDCore3D::DDR_Spaces::DDR_function_type::vector
 

Functions

 HArDCore3D::DDR_PEC::DDR_PEC (Mesh const &mesh, int r, bool use_threads=true, std::ostream &output=std::cout)
 Constructor.
 
Kronecker HArDCore3D::DDR_PEC::get_mass (size_t k, size_t d, size_t i) const
 Return the mass matrix for the k-forms on the i-th d-cell.
 
Kronecker HArDCore3D::DDR_PEC::get_trace (size_t k, size_t d, size_t i, size_t j) const
 Return the trace for the k-forms on the i-th d-cell onto its j-th (d-1)-neighbour.
 
const Eigen::MatrixXd & HArDCore3D::DDR_PEC::get_diff (size_t l, size_t d) const
 Getters for the generic operators matrices.
 
const Eigen::MatrixXd & HArDCore3D::DDR_PEC::get_Koszul (size_t l, size_t d) const
 
const Eigen::MatrixXd & HArDCore3D::DDR_PEC::get_diff_as_degr (size_t l, size_t d) const
 
const Eigen::MatrixXd & HArDCore3D::DDR_PEC::get_trimmed (size_t l, size_t d) const
 
const Eigen::MatrixXd & HArDCore3D::DDR_PEC::get_reduced_Koszul_m1 (size_t l, size_t d) const
 
Eigen::Matrix< double,-1,-1, 0, 3, 3 > HArDCore3D::DDR_PEC::get_exterior_trace (size_t k, size_t d, size_t i_cell) const
 Trace of a k form from the global space to the mesh element of dimension d with index i_cell.
 
Eigen::Matrix< double,-1,-1, 0, 3, 3 > HArDCore3D::DDR_PEC::get_hodge_star (size_t k, size_t d, size_t i_cell) const
 Gets the continuous Hodge star on k forms on the mesh element of dimension d with index i.
 
Eigen::MatrixXd HArDCore3D::DDR_PEC::discrete_hodge_star (size_t k, size_t d, size_t i_cell) const
 Takes a k form on the polynomial k basis to a d-k form on the d-k basis (deals with scaling) on the mesh element of dimension d with index i_cell.
 
Eigen::MatrixXd HArDCore3D::DDR_PEC::discrete_inv_hodge_star (size_t k, size_t d, size_t i_cell) const
 e.g. discrete_inv_hodge_star(d-k,d,i) * potential(k,d,i) is the potential P^k in PL(r,k,d)
 
double HArDCore3D::DDR_PEC::evaluate_scalar_basis (Eigen::Vector3d const &x, size_t d, size_t i_cell, int i_basis) const
 
Eigen::Matrix< double,-1, 1, 0, 3, 1 > HArDCore3D::DDR_PEC::evaluate_basis (Eigen::Vector3d const &x, size_t k, size_t d, size_t i_cell, int i_basis) const
 Evaluate at point x, the i th basis function of PL(r,k,d) in the cell with index i_cell.
 
Eigen::Matrix< double,-1, 1, 0, 3, 1 > HArDCore3D::DDR_PEC::evaluate_basis (Eigen::Vector3d const &x, size_t k, size_t d, size_t i, Eigen::VectorXd const &b) const
 Evaluate at point x, the sum of the coefficients b times the basis of PL(r,k,d) in the cell with index i_cell.
 
double HArDCore3D::DDR_PEC::get_scaling (size_t d, size_t i) const
 Gets scaling of the i-th d-cell.
 
 HArDCore3D::DDR_Spaces::DDR_Spaces (Mesh const &mesh, int r, bool use_threads=true, std::ostream &output=std::cout)
 Constructor.
 
const MeshHArDCore3D::DDR_Spaces::mesh () const
 Return the mesh.
 
int HArDCore3D::DDR_Spaces::degree () const
 Return the polynomial degree.
 
Eigen::VectorXd HArDCore3D::DDR_Spaces::interpolate (const DDR_function_type &, size_t k) const
 Returns the interpolate of the given function as a k-form.
 
const Eigen::MatrixXd & HArDCore3D::DDR_Spaces::full_diff (size_t k, size_t d, size_t i_cell) const
 Returns \star d in PL(r,d-k-1,d), the Hodge star of the full discrete exterior derivative of a discrete k-form on the mesh element of dimension d with index i_cell.
 
Eigen::MatrixXd HArDCore3D::DDR_Spaces::compose_diff (size_t k, size_t d, size_t i_cell) const
 Returns \star \ul{d}^k in PLtrimmed(r,d-k-1,d) on the cell (including its boundary), the Hodge star of the discrete exterior derivative of a discrete k-form on the mesh element of dimension d with index i_cell (discrete subspace of X^{k+1})
 
const Eigen::MatrixXd & HArDCore3D::DDR_Spaces::potential (size_t k, size_t d, size_t i_cell) const
 Returns \star P^k in PL(r,d-k,d), the Hodge star of the potential of a discrete k-form on the mesh element of dimension d with index i_cell.
 
GlobalDOFSpace constHArDCore3D::DDR_Spaces::dofspace (size_t k) const
 Returns the dofspace associated to discrete k-forms.
 
Eigen::Matrix< double,-1, 1, 0, 3, 1 > HArDCore3D::DDR_Spaces::evaluate_basis (Eigen::Vector3d const &x, size_t k, size_t d, size_t i_cell, Eigen::VectorXd const &b) const
 Evaluate at point x, the sum of the coefficients b times the basis of PL(r,k,d) in the cell with index i_cell.
 
Eigen::Matrix< double,-1, 1, 0, 3, 1 > HArDCore3D::DDR_Spaces::evaluate_basis (Eigen::Vector3d const &x, size_t k, size_t d, size_t i_cell, int i_basis) const
 Evaluate at point x, the i th basis function of PL(r,k,d) in the cell with index i_cell.
 
DDR_PEC::Kronecker HArDCore3D::DDR_Spaces::get_mass (size_t k, size_t d, size_t i_cell) const
 Returns the mass matrix for the k-forms on the mesh element of dimension d with index i_cell.
 
Eigen::Matrix< double,-1,-1, 0, 3, 3 > HArDCore3D::DDR_Spaces::get_hodge_star (size_t k, size_t d, size_t i_cell) const
 Gets the continuous Hodge star on k forms on the mesh element of dimension d with index i.
 
Eigen::MatrixXd HArDCore3D::DDR_Spaces::discrete_hodge_star (size_t k, size_t d, size_t i_cell) const
 Takes a k form on the polynomial k basis to a d-k form on the d-k basis (deals with scaling) on the mesh element of dimension d with index i_cell.
 
Eigen::MatrixXd HArDCore3D::DDR_Spaces::discrete_inv_hodge_star (size_t k, size_t d, size_t i_cell) const
 e.g. discrete_inv_hodge_star(d-k, d, i_cell) * potential(k, d, i_cell) is the potential P^k in PL(r,k,d)
 
Eigen::Matrix< double,-1,-1, 0, 3, 3 > HArDCore3D::DDR_Spaces::get_exterior_trace (size_t k, size_t d, size_t i_cell) const
 Trace of a k form from the global space to the mesh element of dimension d with index i_cell.
 
Eigen::MatrixXd HArDCore3D::DDR_Spaces::computeL2Product (size_t k, size_t i_cell, const double penalty_factor=0.1) const
 Computes the L2 product for discrete k-forms on the highest dimensional cell with index i_cell.
 
std::vector< VectorRd > HArDCore3D::DDR_Spaces::computeVertexValues (size_t k, const Eigen::VectorXd &u) const
 Computes the averaged vertex values of a discrete k-form u using the potential.
 

Variables

std::variant< scalar, vectorHArDCore3D::DDR_Spaces::DDR_function_type::func
 
int HArDCore3D::DDR_Spaces::DDR_function_type::dqr [4] = {-1,-1,-1,-1}
 
std::array< Eigen::MatrixXd, 4 > HArDCore3D::DDR_Spaces::DDR_Operators::full_diff
 
std::array< Eigen::MatrixXd, 4 > HArDCore3D::DDR_Spaces::DDR_Operators::diff
 
std::array< Eigen::MatrixXd, 4 > HArDCore3D::DDR_Spaces::DDR_Operators::P
 

Detailed Description

Typedef Documentation

◆ Kronecker

typedef Eigen::KroneckerProduct<Eigen::MatrixXd,Eigen::MatrixXd> HArDCore3D::DDR_PEC::Kronecker

◆ scalar

◆ vector

typedef std::function<Eigen::Vector3d(const Eigen::Vector3d &)> HArDCore3D::DDR_Spaces::DDR_function_type::vector

Function Documentation

◆ compose_diff()

Eigen::MatrixXd DDR_Spaces::compose_diff ( size_t  k,
size_t  d,
size_t  i_cell 
) const

Returns \star \ul{d}^k in PLtrimmed(r,d-k-1,d) on the cell (including its boundary), the Hodge star of the discrete exterior derivative of a discrete k-form on the mesh element of dimension d with index i_cell (discrete subspace of X^{k+1})

◆ computeL2Product()

Eigen::MatrixXd DDR_Spaces::computeL2Product ( size_t  k,
size_t  i_cell,
const double  penalty_factor = 0.1 
) const

Computes the L2 product for discrete k-forms on the highest dimensional cell with index i_cell.

Non recursive calculation of the inner products

◆ computeVertexValues()

std::vector< VectorRd > DDR_Spaces::computeVertexValues ( size_t  k,
const Eigen::VectorXd &  u 
) const

Computes the averaged vertex values of a discrete k-form u using the potential.

◆ DDR_PEC()

DDR_PEC::DDR_PEC ( Mesh const mesh,
int  r,
bool  use_threads = true,
std::ostream &  output = std::cout 
)

Constructor.



◆ DDR_Spaces()

DDR_Spaces::DDR_Spaces ( Mesh const mesh,
int  r,
bool  use_threads = true,
std::ostream &  output = std::cout 
)

Constructor.

◆ degree()

int HArDCore3D::DDR_Spaces::degree ( ) const
inline

Return the polynomial degree.

◆ discrete_hodge_star() [1/2]

Eigen::MatrixXd DDR_PEC::discrete_hodge_star ( size_t  k,
size_t  d,
size_t  i_cell 
) const

Takes a k form on the polynomial k basis to a d-k form on the d-k basis (deals with scaling) on the mesh element of dimension d with index i_cell.

◆ discrete_hodge_star() [2/2]

Eigen::MatrixXd DDR_Spaces::discrete_hodge_star ( size_t  k,
size_t  d,
size_t  i_cell 
) const

Takes a k form on the polynomial k basis to a d-k form on the d-k basis (deals with scaling) on the mesh element of dimension d with index i_cell.

◆ discrete_inv_hodge_star() [1/2]

Eigen::MatrixXd DDR_PEC::discrete_inv_hodge_star ( size_t  k,
size_t  d,
size_t  i_cell 
) const

e.g. discrete_inv_hodge_star(d-k,d,i) * potential(k,d,i) is the potential P^k in PL(r,k,d)

◆ discrete_inv_hodge_star() [2/2]

Eigen::MatrixXd DDR_Spaces::discrete_inv_hodge_star ( size_t  k,
size_t  d,
size_t  i_cell 
) const

e.g. discrete_inv_hodge_star(d-k, d, i_cell) * potential(k, d, i_cell) is the potential P^k in PL(r,k,d)

◆ dofspace()

GlobalDOFSpace const & HArDCore3D::DDR_Spaces::dofspace ( size_t  k) const
inline

Returns the dofspace associated to discrete k-forms.

◆ evaluate_basis() [1/4]

Eigen::Matrix< double,-1, 1, 0, 3, 1 > DDR_PEC::evaluate_basis ( Eigen::Vector3d const x,
size_t  k,
size_t  d,
size_t  i,
Eigen::VectorXd const b 
) const

Evaluate at point x, the sum of the coefficients b times the basis of PL(r,k,d) in the cell with index i_cell.

◆ evaluate_basis() [2/4]

Eigen::Matrix< double,-1, 1, 0, 3, 1 > DDR_Spaces::evaluate_basis ( Eigen::Vector3d const x,
size_t  k,
size_t  d,
size_t  i_cell,
Eigen::VectorXd const b 
) const

Evaluate at point x, the sum of the coefficients b times the basis of PL(r,k,d) in the cell with index i_cell.

◆ evaluate_basis() [3/4]

Eigen::Matrix< double,-1, 1, 0, 3, 1 > DDR_PEC::evaluate_basis ( Eigen::Vector3d const x,
size_t  k,
size_t  d,
size_t  i_cell,
int  i_basis 
) const

Evaluate at point x, the i th basis function of PL(r,k,d) in the cell with index i_cell.

◆ evaluate_basis() [4/4]

Eigen::Matrix< double,-1, 1, 0, 3, 1 > DDR_Spaces::evaluate_basis ( Eigen::Vector3d const x,
size_t  k,
size_t  d,
size_t  i_cell,
int  i_basis 
) const

Evaluate at point x, the i th basis function of PL(r,k,d) in the cell with index i_cell.

◆ evaluate_scalar_basis()

double DDR_PEC::evaluate_scalar_basis ( Eigen::Vector3d const x,
size_t  d,
size_t  i_cell,
int  i_basis 
) const

◆ full_diff()

const Eigen::MatrixXd & DDR_Spaces::full_diff ( size_t  k,
size_t  d,
size_t  i_cell 
) const

Returns \star d in PL(r,d-k-1,d), the Hodge star of the full discrete exterior derivative of a discrete k-form on the mesh element of dimension d with index i_cell.

◆ get_diff()

const Eigen::MatrixXd & HArDCore3D::DDR_PEC::get_diff ( size_t  l,
size_t  d 
) const
inline

Getters for the generic operators matrices.

◆ get_diff_as_degr()

const Eigen::MatrixXd & HArDCore3D::DDR_PEC::get_diff_as_degr ( size_t  l,
size_t  d 
) const
inline

◆ get_exterior_trace() [1/2]

Eigen::Matrix< double,-1,-1, 0, 3, 3 > DDR_PEC::get_exterior_trace ( size_t  k,
size_t  d,
size_t  i_cell 
) const

Trace of a k form from the global space to the mesh element of dimension d with index i_cell.

◆ get_exterior_trace() [2/2]

Eigen::Matrix< double,-1,-1, 0, 3, 3 > DDR_Spaces::get_exterior_trace ( size_t  k,
size_t  d,
size_t  i_cell 
) const

Trace of a k form from the global space to the mesh element of dimension d with index i_cell.

◆ get_hodge_star() [1/2]

Eigen::Matrix< double,-1,-1, 0, 3, 3 > DDR_PEC::get_hodge_star ( size_t  k,
size_t  d,
size_t  i_cell 
) const

Gets the continuous Hodge star on k forms on the mesh element of dimension d with index i.

◆ get_hodge_star() [2/2]

Eigen::Matrix< double,-1,-1, 0, 3, 3 > DDR_Spaces::get_hodge_star ( size_t  k,
size_t  d,
size_t  i_cell 
) const

Gets the continuous Hodge star on k forms on the mesh element of dimension d with index i.

◆ get_Koszul()

const Eigen::MatrixXd & HArDCore3D::DDR_PEC::get_Koszul ( size_t  l,
size_t  d 
) const
inline

◆ get_mass() [1/2]

DDR_PEC::Kronecker DDR_PEC::get_mass ( size_t  k,
size_t  d,
size_t  i 
) const

Return the mass matrix for the k-forms on the i-th d-cell.

◆ get_mass() [2/2]

DDR_PEC::Kronecker DDR_Spaces::get_mass ( size_t  k,
size_t  d,
size_t  i_cell 
) const

Returns the mass matrix for the k-forms on the mesh element of dimension d with index i_cell.

◆ get_reduced_Koszul_m1()

const Eigen::MatrixXd & HArDCore3D::DDR_PEC::get_reduced_Koszul_m1 ( size_t  l,
size_t  d 
) const
inline

◆ get_scaling()

double DDR_PEC::get_scaling ( size_t  d,
size_t  i 
) const

Gets scaling of the i-th d-cell.

◆ get_trace()

DDR_PEC::Kronecker DDR_PEC::get_trace ( size_t  k,
size_t  d,
size_t  i,
size_t  j 
) const

Return the trace for the k-forms on the i-th d-cell onto its j-th (d-1)-neighbour.

◆ get_trimmed()

const Eigen::MatrixXd & HArDCore3D::DDR_PEC::get_trimmed ( size_t  l,
size_t  d 
) const
inline

◆ interpolate()

Eigen::VectorXd DDR_Spaces::interpolate ( const DDR_function_type func,
size_t  k 
) const

Returns the interpolate of the given function as a k-form.

◆ mesh()

const Mesh & HArDCore3D::DDR_Spaces::mesh ( ) const
inline

Return the mesh.

◆ potential()

const Eigen::MatrixXd & DDR_Spaces::potential ( size_t  k,
size_t  d,
size_t  i_cell 
) const

Returns \star P^k in PL(r,d-k,d), the Hodge star of the potential of a discrete k-form on the mesh element of dimension d with index i_cell.

Variable Documentation

◆ diff

std::array<Eigen::MatrixXd,4> HArDCore3D::DDR_Spaces::DDR_Operators::diff

◆ dqr

int HArDCore3D::DDR_Spaces::DDR_function_type::dqr[4] = {-1,-1,-1,-1}

◆ full_diff

std::array<Eigen::MatrixXd,4> HArDCore3D::DDR_Spaces::DDR_Operators::full_diff

◆ func

std::variant<scalar,vector> HArDCore3D::DDR_Spaces::DDR_function_type::func

◆ P

std::array<Eigen::MatrixXd,4> HArDCore3D::DDR_Spaces::DDR_Operators::P