Manicore
Library to implement schemes on n-dimensionnal manifolds.
|
Evaluate vector of discrete unknowns and store them in files. More...
#include <exporter.hpp>
Public Member Functions | |
Exporter (Mesh< dimension > const *mesh, int r, int acc) | |
Constructor. More... | |
int | save (size_t k, std::function< Eigen::VectorXd(size_t iT)> Fu_h, const char *filename, bool star=false) const |
Write a csv file with the point-wise value of the discrete function. More... | |
int | saveSq (size_t k, std::function< Eigen::VectorXd(size_t iT)> Fu_h, const char *filename) const |
Write a csv file with the point-wise value of the contraction of the function with itself. More... | |
Evaluate vector of discrete unknowns and store them in files.
This class compute and store all the necessary data when constructed.
dimension | Dimension of the manifold |
Exporter::Exporter | ( | Mesh< dimension > const * | mesh, |
int | r, | ||
int | acc | ||
) |
Constructor.
The constructor store the mapping between the cell and the embedding at each point. This may requires a significant amount of space. The location chosen to print the value are computed using the quadrature formulas. The degree acc, is not directly the number of location per cell, but the degree of the formula used.
The distribution may not be uniform, and may depends of the triangulation of the reference element in each cell.
mesh | Reference to the mesh used |
r | Polynomial degree |
acc | Degree of the quadrature |
int Exporter::save | ( | size_t | k, |
std::function< Eigen::VectorXd(size_t iT)> | Fu_h, | ||
const char * | filename, | ||
bool | star = false |
||
) | const |
Write a csv file with the point-wise value of the discrete function.
By default, this use the identification between 0-forms and function, and between 1-forms and vector. In 2D, there is an ambiguity between \(1\) and \(n-1\) forms. By default, this function will print an \(1\)-form, set star=true to reverse the behavior.
k | Form degree |
Fu_h | Return the discrete vector in \(\mathcal{P}_r\Lambda^k(\mathbb{R}^d)\) in a given cell iT |
filename | Name and location to write the data |
star | Apply the Hodge star before exporting an 1-form |
int Exporter::saveSq | ( | size_t | k, |
std::function< Eigen::VectorXd(size_t iT)> | Fu_h, | ||
const char * | filename | ||
) | const |
Write a csv file with the point-wise value of the contraction of the function with itself.
Compute \( u^i u_i \)
k | Form degree |
Fu_h | Return the discrete vector in \(\mathcal{P}_r\Lambda^k(\mathbb{R}^d)\) in a given cell iT |
filename | Name and location to write the data |