Manicore
Library to implement schemes on n-dimensionnal manifolds.
Public Member Functions | List of all members
Manicore::Exporter< dimension > Class Template Reference

Evaluate vector of discrete unknowns and store them in files. More...

#include <exporter.hpp>

Inheritance diagram for Manicore::Exporter< dimension >:
Inheritance graph
[legend]

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...
 

Detailed Description

template<size_t dimension>
class Manicore::Exporter< dimension >

Evaluate vector of discrete unknowns and store them in files.

This class compute and store all the necessary data when constructed.

Template Parameters
dimensionDimension of the manifold

Constructor & Destructor Documentation

◆ Exporter()

template<size_t dimension>
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.

Parameters
meshReference to the mesh used
rPolynomial degree
accDegree of the quadrature

Member Function Documentation

◆ save()

template<size_t dimension>
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.

Remarks
The DDR_Spaces::potential() operator returns the Hodge star of the potential
Parameters
kForm degree
Fu_hReturn the discrete vector in \(\mathcal{P}_r\Lambda^k(\mathbb{R}^d)\) in a given cell iT
filenameName and location to write the data
starApply the Hodge star before exporting an 1-form

◆ saveSq()

template<size_t dimension>
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 \)

Parameters
kForm degree
Fu_hReturn the discrete vector in \(\mathcal{P}_r\Lambda^k(\mathbb{R}^d)\) in a given cell iT
filenameName and location to write the data

The documentation for this class was generated from the following files: