[P]arallel [Hi]gh-order [Li]brary for [P]DEs
Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
|
The mapping shape functions evaluated at the desired nodes (facet set included in volume grid nodes for consistency). More...
#include <operators.h>
Public Member Functions | |
mapping_shape_functions (const int nstate_input, const unsigned int max_degree_input, const unsigned int grid_degree_input) | |
Constructor. | |
void | build_1D_shape_functions_at_grid_nodes (const dealii::FESystem< 1, 1 > &finite_element, const dealii::Quadrature< 1 > &quadrature) |
Constructs the volume operator and gradient operator. More... | |
void | build_1D_shape_functions_at_flux_nodes (const dealii::FESystem< 1, 1 > &finite_element, const dealii::Quadrature< 1 > &quadrature, const dealii::Quadrature< 0 > &face_quadrature) |
Constructs the volume, gradient, surface, and surface gradient operator. More... | |
void | build_1D_shape_functions_at_volume_flux_nodes (const dealii::FESystem< 1, 1 > &finite_element, const dealii::Quadrature< 1 > &quadrature) |
Constructs the volume and volume gradient operator. More... | |
![]() | |
SumFactorizedOperators (const int nstate_input, const unsigned int max_degree_input, const unsigned int grid_degree_input) | |
Precompute 1D operator in constructor. | |
void | matrix_vector_mult (const std::vector< real > &input_vect, std::vector< real > &output_vect, const dealii::FullMatrix< double > &basis_x, const dealii::FullMatrix< double > &basis_y, const dealii::FullMatrix< double > &basis_z, const bool adding=false, const double factor=1.0) override |
Computes a matrix-vector product using sum-factorization. Pass the one-dimensional basis, where x runs the fastest, then y, and z runs the slowest. Also, assume each one-dimensional basis is the same size. More... | |
void | divergence_matrix_vector_mult (const dealii::Tensor< 1, dim, std::vector< real >> &input_vect, std::vector< real > &output_vect, const dealii::FullMatrix< double > &basis_x, const dealii::FullMatrix< double > &basis_y, const dealii::FullMatrix< double > &basis_z, const dealii::FullMatrix< double > &gradient_basis_x, const dealii::FullMatrix< double > &gradient_basis_y, const dealii::FullMatrix< double > &gradient_basis_z) |
Computes the divergence using the sum factorization matrix-vector multiplication. More... | |
void | divergence_matrix_vector_mult_1D (const dealii::Tensor< 1, dim, std::vector< real >> &input_vect, std::vector< real > &output_vect, const dealii::FullMatrix< double > &basis, const dealii::FullMatrix< double > &gradient_basis) |
Computes the divergence using sum-factorization where the basis are the same in each direction. | |
void | gradient_matrix_vector_mult (const std::vector< real > &input_vect, dealii::Tensor< 1, dim, std::vector< real >> &output_vect, const dealii::FullMatrix< double > &basis_x, const dealii::FullMatrix< double > &basis_y, const dealii::FullMatrix< double > &basis_z, const dealii::FullMatrix< double > &gradient_basis_x, const dealii::FullMatrix< double > &gradient_basis_y, const dealii::FullMatrix< double > &gradient_basis_z) |
Computes the gradient of a scalar using sum-factorization. | |
void | gradient_matrix_vector_mult_1D (const std::vector< real > &input_vect, dealii::Tensor< 1, dim, std::vector< real >> &output_vect, const dealii::FullMatrix< double > &basis, const dealii::FullMatrix< double > &gradient_basis) |
Computes the gradient of a scalar using sum-factorization where the basis are the same in each direction. | |
void | inner_product (const std::vector< real > &input_vect, const std::vector< real > &weight_vect, std::vector< real > &output_vect, const dealii::FullMatrix< double > &basis_x, const dealii::FullMatrix< double > &basis_y, const dealii::FullMatrix< double > &basis_z, const bool adding=false, const double factor=1.0) override |
Computes the inner product between a matrix and a vector multiplied by some weight function. More... | |
void | divergence_two_pt_flux_Hadamard_product (const dealii::Tensor< 1, dim, dealii::FullMatrix< real >> &input_mat, std::vector< real > &output_vect, const std::vector< real > &weights, const dealii::FullMatrix< double > &basis, const double scaling=2.0) |
Computes the divergence of the 2pt flux Hadamard products, then sums the rows. More... | |
void | surface_two_pt_flux_Hadamard_product (const dealii::FullMatrix< real > &input_mat, std::vector< real > &output_vect_vol, std::vector< real > &output_vect_surf, const std::vector< real > &weights, const std::array< dealii::FullMatrix< double >, 2 > &surf_basis, const unsigned int iface, const unsigned int dim_not_zero, const double scaling=2.0) |
Computes the surface cross Hadamard products for skew-symmetric form from Eq. (15) in Chan, Jesse. "Skew-symmetric entropy stable modal discontinuous Galerkin formulations." Journal of Scientific Computing 81.1 (2019): 459-485. | |
void | two_pt_flux_Hadamard_product (const dealii::FullMatrix< real > &input_mat, dealii::FullMatrix< real > &output_mat, const dealii::FullMatrix< double > &basis, const std::vector< real > &weights, const int direction) |
Computes the Hadamard product ONLY for 2pt flux calculations. More... | |
void | sum_factorized_Hadamard_sparsity_pattern (const unsigned int rows_size, const unsigned int columns_size, std::vector< std::array< unsigned int, dim >> &rows, std::vector< std::array< unsigned int, dim >> &columns) |
Computes the rows and columns vectors with non-zero indices for sum-factorized Hadamard products. | |
void | sum_factorized_Hadamard_basis_assembly (const unsigned int rows_size_1D, const unsigned int columns_size_1D, const std::vector< std::array< unsigned int, dim >> &rows, const std::vector< std::array< unsigned int, dim >> &columns, const dealii::FullMatrix< double > &basis, const std::vector< double > &weights, std::array< dealii::FullMatrix< double >, dim > &basis_sparse) |
Constructs the \( n^d \times n\) basis operator storing all non-zero entries for a "sum-factorized" Hadamard product. | |
void | sum_factorized_Hadamard_surface_sparsity_pattern (const unsigned int rows_size, const unsigned int columns_size, std::vector< unsigned int > &rows, std::vector< unsigned int > &columns, const int dim_not_zero) |
Computes the rows and columns vectors with non-zero indices for surface sum-factorized Hadamard products. | |
void | sum_factorized_Hadamard_surface_basis_assembly (const unsigned int rows_size, const unsigned int columns_size_1D, const std::vector< unsigned int > &rows, const std::vector< unsigned int > &columns, const dealii::FullMatrix< double > &basis, const std::vector< double > &weights, dealii::FullMatrix< double > &basis_sparse, const int dim_not_zero) |
Constructs the \( n^{d-1} \times n\) basis operator storing all non-zero entries for a "sum-factorized" surface Hadamard product. | |
void | matrix_vector_mult_1D (const std::vector< real > &input_vect, std::vector< real > &output_vect, const dealii::FullMatrix< double > &basis_x, const bool adding=false, const double factor=1.0) |
Apply the matrix vector operation using the 1D operator in each direction. More... | |
void | inner_product_1D (const std::vector< real > &input_vect, const std::vector< real > &weight_vect, std::vector< real > &output_vect, const dealii::FullMatrix< double > &basis_x, const bool adding=false, const double factor=1.0) |
Apply the inner product operation using the 1D operator in each direction. | |
void | matrix_vector_mult_surface_1D (const unsigned int face_number, const std::vector< real > &input_vect, std::vector< real > &output_vect, const std::array< dealii::FullMatrix< double >, 2 > &basis_surf, const dealii::FullMatrix< double > &basis_vol, const bool adding=false, const double factor=1.0) |
Apply sum-factorization matrix vector multiplication on a surface. More... | |
void | inner_product_surface_1D (const unsigned int face_number, const std::vector< real > &input_vect, const std::vector< real > &weight_vect, std::vector< real > &output_vect, const std::array< dealii::FullMatrix< double >, 2 > &basis_surf, const dealii::FullMatrix< double > &basis_vol, const bool adding=false, const double factor=1.0) |
Apply sum-factorization inner product on a surface. | |
void | Hadamard_product (const dealii::FullMatrix< real > &input_mat1, const dealii::FullMatrix< real > &input_mat2, dealii::FullMatrix< real > &output_mat) |
Computes a single Hadamard product. More... | |
![]() | |
virtual | ~OperatorsBase ()=default |
Destructor. | |
OperatorsBase (const int nstate_input, const unsigned int max_degree_input, const unsigned int grid_degree_input) | |
Constructor. | |
dealii::FullMatrix< double > | tensor_product (const dealii::FullMatrix< double > &basis_x, const dealii::FullMatrix< double > &basis_y, const dealii::FullMatrix< double > &basis_z) |
Returns the tensor product of matrices passed. | |
dealii::FullMatrix< double > | tensor_product_state (const int nstate, const dealii::FullMatrix< double > &basis_x, const dealii::FullMatrix< double > &basis_y, const dealii::FullMatrix< double > &basis_z) |
Returns the tensor product of matrices passed, but makes it sparse diagonal by state. More... | |
double | compute_factorial (double n) |
Standard function to compute factorial of a number. | |
Public Attributes | |
unsigned int | current_degree |
Stores the degree of the current poly degree. | |
unsigned int | current_grid_degree |
Stores the degree of the current grid degree. | |
basis_functions< dim, n_faces, real > | mapping_shape_functions_grid_nodes |
Object of mapping shape functions evaluated at grid nodes. | |
basis_functions< dim, n_faces, real > | mapping_shape_functions_flux_nodes |
Object of mapping shape functions evaluated at flux nodes. | |
![]() | |
dealii::FullMatrix< double > | oneD_vol_operator |
Stores the one dimensional volume operator. | |
std::array< dealii::FullMatrix< double >, 2 > | oneD_surf_operator |
Stores the one dimensional surface operator. More... | |
dealii::FullMatrix< double > | oneD_grad_operator |
Stores the one dimensional gradient operator. | |
std::array< dealii::FullMatrix< double >, 2 > | oneD_surf_grad_operator |
Stores the one dimensional surface gradient operator. | |
![]() | |
const unsigned int | max_degree |
Max polynomial degree. | |
const unsigned int | max_grid_degree |
Max grid degree. | |
const int | nstate |
Number of states. | |
Additional Inherited Members | |
![]() | |
unsigned int | max_grid_degree_check |
Check to see if the metrics used are a higher order then the initialized grid. | |
const MPI_Comm | mpi_communicator |
MPI communicator. | |
dealii::ConditionalOStream | pcout |
Parallel std::cout that only outputs on mpi_rank==0. | |
The mapping shape functions evaluated at the desired nodes (facet set included in volume grid nodes for consistency).
The finite element passed has to be the metric finite element. That is the one collocated on the mapping support points. By default, we use Gauss-Lobatto-Legendre as the mapping support points.
Definition at line 1026 of file operators.h.
void PHiLiP::OPERATOR::mapping_shape_functions< dim, n_faces, real >::build_1D_shape_functions_at_flux_nodes | ( | const dealii::FESystem< 1, 1 > & | finite_element, |
const dealii::Quadrature< 1 > & | quadrature, | ||
const dealii::Quadrature< 0 > & | face_quadrature | ||
) |
Constructs the volume, gradient, surface, and surface gradient operator.
Function builds the 1D operators in mapping_shape_functions_flux_nodes.
Definition at line 2164 of file operators.cpp.
void PHiLiP::OPERATOR::mapping_shape_functions< dim, n_faces, real >::build_1D_shape_functions_at_grid_nodes | ( | const dealii::FESystem< 1, 1 > & | finite_element, |
const dealii::Quadrature< 1 > & | quadrature | ||
) |
Constructs the volume operator and gradient operator.
This function assures that the shape functions are collocated on the grid nodes. Also, makes for easier function calls. Function builds the 1D operators in mapping_shape_functions_grid_nodes. Note that at grid nodes, we do NOT need any surface information.
Definition at line 2155 of file operators.cpp.
void PHiLiP::OPERATOR::mapping_shape_functions< dim, n_faces, real >::build_1D_shape_functions_at_volume_flux_nodes | ( | const dealii::FESystem< 1, 1 > & | finite_element, |
const dealii::Quadrature< 1 > & | quadrature | ||
) |
Constructs the volume and volume gradient operator.
Often times, we only need the values at just the volume flux nodes. Function builds the 1D operators in mapping_shape_functions_flux_nodes.
Definition at line 2176 of file operators.cpp.