![]() |
Vulpes
0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
|
This class works as a cache table for computing efficiently the value of the basis function and its derivatives for each cell. More...
#include <fe_values.hpp>
Classes | |
| struct | ReferenceTables |
| Reference-frame tables written by evalOnReferenceFrame. More... | |
Public Types | |
| using | real_t = double |
| using | index_t = int32_t |
| using | PhysicalQPts = Eigen::Matrix<real_t, Dim, -1> |
| using | FeValuesScalar = Eigen::Matrix<real_t, -1, -1> |
| using | FeValuesGrad = Eigen::Matrix<Eigen::Vector<real_t, Dim>, -1, -1> |
| using | QuadtratureWeigths = Eigen::Vector<real_t, -1> |
Public Member Functions | |
| constexpr const auto & | getShapeEval () const |
| constexpr const auto & | getGradEval () const |
| constexpr const auto & | weights () const |
| constexpr auto & | weights () |
| constexpr const auto & | qpts () const |
| constexpr auto & | qpts () |
| constexpr const auto & | weightsRef () const |
| constexpr auto & | weightsRef () |
| constexpr const auto & | qptsRef () const |
| constexpr auto & | qptsRef () |
| constexpr const void * | tabulatedBasis () const |
| Basis tabulated by the last evalOnReferenceFrame, to compare by address. | |
| constexpr std::uint64_t | stamp () const |
| void | setStampEnabled (bool enabled) |
| constexpr const Eigen::Vector< real_t, Dim > & | getFaceNormal () const |
| void | setFaceNormal (const Eigen::Vector< real_t, Dim > &normal) |
| constexpr bool | hasFaceNeigh () const |
| void | setHasFaceNeigh (bool has_neigh) |
| index_t | getCellId () const |
| void | setCellId (index_t cell_id) |
| real_t | basisScaling () const |
| sqrt(det J) of the cell mapping, the factor scaled bases are divided by | |
| void | setBasisScaling (real_t scaling) |
| index_t | getFaceId () const |
| void | setFaceId (index_t face_id) |
| template<typename FloatType, typename Polynomial> | |
| void | evalOnReferenceFrame (const std::vector< Polynomial > &basis, const qrule::QuadratureRule< FloatType, Dim > &qrule) |
| Compute and cache the evaluation of the basis on the quadrature points passed as argument. This is usually called just once with quadrature points mapped on the reference cell. | |
| void | saveReferenceFrame (ReferenceTables &tables) const |
| Copies the reference-frame tables of the last evalOnReferenceFrame. | |
| void | loadReferenceFrame (const ReferenceTables &tables) |
| template<typename MappingType> | |
| void | evalAndApplyMapping (const MappingType &mapping, UpdateFlagsType flags) |
| Update the local cache values on the physical element by passing the mapping and a flag signaling which values to update (e.g., gradients, quadrature points, ...). | |
| void | createNeighValues () |
| auto & | neighValues () |
| const auto & | neighValues () const |
Protected Member Functions | |
| void | resizeTables (int64_t basis_size, int64_t nodes_size) |
| template<typename FloatType, typename Polynomial> | |
| void | evalSparseBasis (const std::vector< Polynomial > &basis, const qrule::QuadratureRule< FloatType, Dim > &qrule) |
Static Protected Member Functions | |
| static std::uint64_t | nextStamp () |
Protected Attributes | |
| FeValuesScalar | m_scalar_shapes |
| FeValuesGrad | m_grads_shapes |
| PhysicalQPts | m_physical_qpts |
| QuadtratureWeigths | m_quadrature_weights |
| Eigen::Vector< real_t, Dim > | m_face_normal |
| bool | m_face_has_neigh |
| index_t | m_cell_id |
| real_t | m_basis_scaling = 1.0 |
| index_t | m_face_id |
| FeValuesScalar | m_scalar_shapes_ref |
| FeValuesGrad | m_grads_shapes_ref |
| PhysicalQPts | m_physical_qpts_ref |
| QuadtratureWeigths | m_quadrature_weights_ref |
| const void * | m_tabulated_basis = nullptr |
| std::uint64_t | m_stamp = 0 |
| bool | m_stamp_enabled = false |
| std::vector< double > | m_pow_table |
| std::unique_ptr< FeValues< Dim > > | m_fe_values_neigh |
This class works as a cache table for computing efficiently the value of the basis function and its derivatives for each cell.
The values of the basis function and its derivatives are saved for the reference element (when calling evalOnReferenceFrame) and the then they are updated for each cell (when calling evalAndApplyMapping). Computing the values on the reference cell is usually expensive since the polynomial of the basis function is saved in arbitrary precision. The update is usually fast and involves computing some properties of the mapping function. We minimize the computations by indicating what needs an update using UpdateFlags.
In DG elements it happens that a cell needs the values of the neighbour. To accommodate this necessity the class owns a pointer to the FeValues of the neighbour.
| using vulpes::fe::FeValues< Dim >::FeValuesGrad = Eigen::Matrix<Eigen::Vector<real_t, Dim>, -1, -1> |
| using vulpes::fe::FeValues< Dim >::FeValuesScalar = Eigen::Matrix<real_t, -1, -1> |
| using vulpes::fe::FeValues< Dim >::index_t = int32_t |
| using vulpes::fe::FeValues< Dim >::PhysicalQPts = Eigen::Matrix<real_t, Dim, -1> |
| using vulpes::fe::FeValues< Dim >::QuadtratureWeigths = Eigen::Vector<real_t, -1> |
| using vulpes::fe::FeValues< Dim >::real_t = double |
|
inline |
sqrt(det J) of the cell mapping, the factor scaled bases are divided by
|
inline |
|
inline |
Update the local cache values on the physical element by passing the mapping and a flag signaling which values to update (e.g., gradients, quadrature points, ...).
|
inline |
Compute and cache the evaluation of the basis on the quadrature points passed as argument. This is usually called just once with quadrature points mapped on the reference cell.
|
inlineprotected |
|
inline |
|
inline |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inline |
Restores tables saved by saveReferenceFrame, with the same effect as the evalOnReferenceFrame call that produced them.
|
inline |
|
inline |
|
inlinestaticprotected |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineprotected |
|
inline |
Copies the reference-frame tables of the last evalOnReferenceFrame.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineconstexpr |
Changes with the cell, the basis scaling (fields projected on scaled bases are divided by it) and every evalOnReferenceFrame, loadReferenceFrame and evalAndApplyMapping, taking the next value of a counter shared by all FeValues<Dim>. It does not follow writes through the non-const accessors, nor changes of the vectors behind projected fields. Zero unless enabled with setStampEnabled.
|
inlineconstexpr |
Basis tabulated by the last evalOnReferenceFrame, to compare by address.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |