![]() |
Vulpes
0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
|
Namespaces | |
| namespace | internal |
Classes | |
| struct | DataBoomerAMG |
| struct | DataGAMG |
| class | LinearSolver |
| A linear solver class wrapping PETSc KSP solvers. More... | |
| class | SparseMatrix |
| class | Tensor |
| Ultra-lightweight wrapper for PETSc Vec with Eigen mapping. Loads only the data and maps it using externally provided cell IDs. For now it considers only tensors which are stored in a flatten array. More... | |
| class | Vector |
| A wrapper around PETSc Vec for distributed vectors. More... | |
Enumerations | |
| enum | DataLayout { ColumnMajor , RowMajor } |
Functions | |
| template<typename CellManagerType, typename DofHandlerType> | |
| Vector | constantModalCoefficients (CellManagerType &cell_manager, const DofHandlerType &dof_handler, double value=1.0) |
| Coefficients of a constant function in a modal DG space. | |
| void | setPETScOptionValue (const std::string &name, const std::string &value) |
| double | dot (const Vector &a, const Vector &b) |
| void | extractComponent (const Vector &blocked_vec, std::size_t f, Vector &comp) |
| Extract one scalar component from a blocked vector into an existing scalar vector (owned entries; ghost entries untouched). | |
| template<typename DofHandlerType> | |
| Vector | extractComponent (const Vector &blocked_vec, const DofHandlerType &dof_handler, std::size_t f) |
| Extract one scalar component from a blocked vector into a new vector. | |
| template<std::size_t NFields, typename DofHandlerType> | |
| std::vector< Vector > | extractAllComponents (const Vector &blocked_vec, const DofHandlerType &dof_handler) |
| Extract all scalar components from a blocked vector. | |
| template<std::size_t NFields, typename DofHandlerType> | |
| Vector | mergeBlockedVector (const std::vector< Vector > &scalars, const DofHandlerType &dof_handler) |
| Merge scalar vectors into a blocked vector. | |
| void | addComponent (const Vector &scalar_vec, Vector &blocked_vec, std::size_t f) |
| Add a scalar vector into one stride of a blocked vector. | |
| void | extractDiagonalBlockComponent (const SparseMatrix &blocked_mat, std::size_t component, SparseMatrix &scalar_mat, double zero_tol=0.0) |
| Extract one scalar diagonal component from a blocked matrix. | |
| template<std::size_t NFields> | |
| void | mergeDiagonalBlockedMatrix (const std::array< std::reference_wrapper< const SparseMatrix >, NFields > &scalar_components, SparseMatrix &blocked_mat, double zero_tol=0.0) |
| Merge scalar diagonal component matrices into a blocked matrix. | |
Variables | |
| static constexpr PetscInt | kMaxDenseExtractSize = 2000 |
| Largest scalar dimension for which the dense helpers below call toEigenDense(). Beyond it the O(N^2) dense allocation would exhaust memory, so these helpers abort. | |
|
inline |
Add a scalar vector into one stride of a blocked vector.
Deduces the block size from the size ratio blocked/scalar and calls VecSetBlockSize before scattering, so this works even when blocked_vec was constructed without an explicit block size (e.g. from a size-only constructor).
| scalar_vec | Scalar source vector (block size 1) |
| blocked_vec | Blocked destination vector (accumulates with ADD_VALUES) |
| f | Component (stride) index to scatter into |
| Vector vulpes::la::constantModalCoefficients | ( | CellManagerType & | cell_manager, |
| const DofHandlerType & | dof_handler, | ||
| double | value = 1.0 ) |
Coefficients of a constant function in a modal DG space.
The constant is represented exactly by the first basis function of each cell, which is the constant mode of the modal Legendre basis, so the coefficients are computed cell by cell without solving any system. Only the coefficients of the owned cells are set (the others are zero). Typical use: near null space of the Laplacian for algebraic multigrid (see la::SparseMatrix::setNearNullSpace()).
| cell_manager | Cell manager of the modal FE space |
| dof_handler | The DOF handler |
| value | The constant value |
|
inline |
Extract all scalar components from a blocked vector.
| NFields | Number of components in the blocked vector |
| DofHandlerType | Type of the DOF handler used to build output vectors |
| blocked_vec | Input blocked vector |
| dof_handler | DOF handler for extracted scalar vectors |
|
inline |
Extract one scalar component from a blocked vector into a new vector.
| DofHandlerType | Type of the DOF handler used to build output vector |
| blocked_vec | Input blocked vector |
| dof_handler | DOF handler for the extracted scalar vector |
| f | Component index to extract |
f of the blocked input
|
inline |
Extract one scalar component from a blocked vector into an existing scalar vector (owned entries; ghost entries untouched).
Deduces the block size from the size ratio blocked/scalar and calls VecSetBlockSize before gathering, so this works even when blocked_vec was constructed without an explicit block size (e.g. from a size-only constructor such as an RK stage scratch vector). Symmetric counterpart to addComponent (which uses VecStrideScatter).
| blocked_vec | Input blocked vector |
| f | Component index to extract |
| comp | Scalar vector receiving component f |
|
inline |
Extract one scalar diagonal component from a blocked matrix.
| blocked_mat | Input blocked matrix |
| component | Component index to extract from diagonal blocks |
| scalar_mat | Output scalar matrix receiving extracted entries |
| zero_tol | Values with absolute value <= zero_tol are skipped |
|
inline |
Merge scalar vectors into a blocked vector.
| NFields | Number of components in the output blocked vector |
| DofHandlerType | Type of the DOF handler used to build output vector |
| scalars | Scalar vectors to merge, one per component |
| dof_handler | DOF handler for the merged blocked vector |
NFields
|
inline |
Merge scalar diagonal component matrices into a blocked matrix.
| NFields | Number of fields/components in blocked matrix |
| scalar_components | Scalar component matrices to merge on block diagonal |
| blocked_mat | Output blocked matrix |
| zero_tol | Values with absolute value <= zero_tol are skipped |
|
inline |
Set an option in the global PETSc database. This function just wraps PetscOptionsSetValue and checks the error return value.
|
staticconstexpr |
Largest scalar dimension for which the dense helpers below call toEigenDense(). Beyond it the O(N^2) dense allocation would exhaust memory, so these helpers abort.