[P]arallel [Hi]gh-order [Li]brary for [P]DEs
Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
|
Operator base class. More...
#include <operators.h>
Public Member Functions | |
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. | |
virtual 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)=0 |
virtual function to be defined. | |
virtual 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)=0 |
virtual function to be defined. | |
Public Attributes | |
const unsigned int | max_degree |
Max polynomial degree. | |
const unsigned int | max_grid_degree |
Max grid degree. | |
const int | nstate |
Number of states. | |
Protected Attributes | |
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. | |
Operator base class.
This base class constructs 4 different types of operators: volume, surface, flux and metric. In addition it has corresponding functions to compute the operators. The general operator form order is: vector of degree, vector of state (for flux operators), vector of face (for surface operators), vector of dim (for gradient operators), FullMatrix of quadrature points or degrees of freedom. In more detail for each type of operator: (1) Volume Operators: Always start as a vector of polynomial degree, then if its a flux vector of state variables, then dimension, then Matrix where the evaluations happen on Volume Cubature nodes. (2) Surface Operators: Always start as a vector of polynomial degree, then if its a flux vector of state variables, then the face index which goes from face 0 clockwise as-per dealii standard to nfaces, then dimension, then Matrix where the evaluations happen on Volume Cubature nodes. Lastly, currently assume tensor-product elements so \(n_{faces} = 2.0 * dim\). (3) Flux Operators: See above. It is important to note that since flux operators are "collocated" on the cubature set, the number of degrees of freedom of the flux basis MUST equal the number of cubature nodes. Importantly on the surface, the flux basis interpolates from the volume to the surface, thus corresponds to volume cubature nodes collocation. (4) Metric Operators: Since the solution polynomial degree for each state varies, along with the local grid element's polynomial degree varying, the operators distinguish between polynomial degree (for solution or flux) and grid degree (for element). Explicitly, they first go vector of grid_degree, then vector of polynomial degree for the ones that are applied on the flux nodes. The mapping-support-points follow the standard from dealii, where they are always Gauss-Legendre-Lobatto quadrature nodes making the polynomial elements continuous in a sense.
Definition at line 53 of file operators.h.
dealii::FullMatrix< double > PHiLiP::OPERATOR::OperatorsBase< dim, n_faces, real >::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.
An example for this would be a multi-state mass matrix. When the mass matrix is constructed, it is not templated by nstate. Also, if each 1D mass matrix is multi-state then their tensor product does not match the dim multi-state mass matrix. Instead, only if the states match, then do the tensor product. This results in a diagonal sparse matrix by state number, with each state's block being a dim-ordered tensor product.
Definition at line 106 of file operators.cpp.