[P]arallel [Hi]gh-order [Li]brary for [P]DEs
Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
|
ESFR correction matrix for AUX EQUATION without jac dependence. More...
#include <operators.h>
Public Member Functions | |
local_Flux_Reconstruction_operator_aux (const int nstate_input, const unsigned int max_degree_input, const unsigned int grid_degree_input, const Parameters::AllParameters::Flux_Reconstruction_Aux FR_param_aux_input) | |
Constructor. | |
void | get_FR_aux_correction_parameter (const unsigned int curr_cell_degree, double &k) |
Gets the FR correction parameter for the auxiliary equations and stores. More... | |
void | build_1D_volume_operator (const dealii::FESystem< 1, 1 > &finite_element, const dealii::Quadrature< 1 > &quadrature) |
Assembles the one dimensional operator. | |
![]() | |
local_Flux_Reconstruction_operator (const int nstate_input, const unsigned int max_degree_input, const unsigned int grid_degree_input, const Parameters::AllParameters::Flux_Reconstruction FR_param_input) | |
Constructor. | |
void | get_Huynh_g2_parameter (const unsigned int curr_cell_degree, double &c) |
Evaluates Huynh's g2 parameter for flux reconstruction. | |
void | get_spectral_difference_parameter (const unsigned int curr_cell_degree, double &c) |
Evaluates the spectral difference parameter for flux reconstruction. More... | |
void | get_c_negative_FR_parameter (const unsigned int curr_cell_degree, double &c) |
Evaluates the flux reconstruction parameter at the bottom limit where the scheme is unstable. More... | |
void | get_c_negative_divided_by_two_FR_parameter (const unsigned int curr_cell_degree, double &c) |
Evaluates the flux reconstruction parameter at the bottom limit where the scheme is unstable, divided by 2. More... | |
void | get_c_plus_parameter (const unsigned int curr_cell_degree, double &c) |
Gets the FR correction parameter corresponding to the maximum timestep. More... | |
void | get_FR_correction_parameter (const unsigned int curr_cell_degree, double &c) |
Gets the FR correction parameter for the primary equation and stores. More... | |
void | build_local_Flux_Reconstruction_operator (const dealii::FullMatrix< double > &local_Mass_Matrix, const dealii::FullMatrix< double > &pth_derivative, const unsigned int n_dofs, const double c, dealii::FullMatrix< double > &Flux_Reconstruction_operator) |
Computes a single local Flux_Reconstruction operator (ESFR correction operator) on the fly for a local element. More... | |
void | build_1D_volume_operator (const dealii::FESystem< 1, 1 > &finite_element, const dealii::Quadrature< 1 > &quadrature) |
Assembles the one dimensional operator. | |
dealii::FullMatrix< double > | build_dim_Flux_Reconstruction_operator (const dealii::FullMatrix< double > &local_Mass_Matrix, const int nstate, const unsigned int n_dofs) |
Computes the dim sized flux reconstruction operator with simplified tensor product form. More... | |
dealii::FullMatrix< double > | build_dim_Flux_Reconstruction_operator_directly (const int nstate, const unsigned int n_dofs, dealii::FullMatrix< double > &pth_deriv, dealii::FullMatrix< double > &mass_matrix) |
Computes the dim sized flux reconstruction operator for general Mass Matrix (needed for curvilinear). 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. | |
const Parameters::AllParameters::Flux_Reconstruction_Aux | FR_param_aux_type |
Flux reconstruction parameter type. | |
double | FR_param_aux |
Flux reconstruction paramater value. | |
![]() | |
unsigned int | current_degree |
Stores the degree of the current poly degree. | |
const Parameters::AllParameters::Flux_Reconstruction | FR_param_type |
Flux reconstruction parameter type. | |
double | FR_param |
Flux reconstruction paramater value. | |
![]() | |
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. | |
ESFR correction matrix for AUX EQUATION without jac dependence.
NOTE Auxiliary equation is a vector in dim, so theres an ESFR correction for each dim -> Flux_Reconstruction_aux also a vector of dim ie/ local_Flux_Reconstruction_operator_aux[degree_index][dimension_index] = Flux_Reconstruction_operator for AUX eaquation in direction dimension_index for polynomial degree of degree_index+1
Definition at line 655 of file operators.h.
void PHiLiP::OPERATOR::local_Flux_Reconstruction_operator_aux< dim, n_faces, real >::get_FR_aux_correction_parameter | ( | const unsigned int | curr_cell_degree, |
double & | k | ||
) |
Gets the FR correction parameter for the auxiliary equations and stores.
These values are name specified in parameters/all_parameters.h, passed through control file/or test and here converts/stores as value. Please note that in all the functions within this that evaluate the parameter, we divide the value in the literature by 2.0 because our basis are contructed by an orthonormal Legendre basis rather than the orthogonal basis in the literature. Also, we have the additional scaling by pow(pow(2.0,curr_cell_degree),2) because our basis functions are defined on a reference element between [0,1], whereas the values in the literature are based on [-1,1]. For further details please refer to Cicchino, Alexander, and Siva Nadarajah. "A new norm and stability condition for tensor product flux reconstruction schemes." Journal of Computational Physics 429 (2021): 110025.
Definition at line 1668 of file operators.cpp.