PRISMS-PF Manual v3.0-pre
All Classes Functions Variables Enumerations Pages
matrixFreeOperator< dim, degree, number > Class Template Referenceabstract

This is the abstract base class for the matrix-free implementation of some PDE. More...

#include <matrix_free_operator.h>

Inheritance diagram for matrixFreeOperator< dim, degree, number >:

Public Types

using VectorType = dealii::LinearAlgebra::distributed::Vector< number >
 
using value_type = number
 
using size_type = dealii::VectorizedArray< number >
 

Public Member Functions

 matrixFreeOperator ()=default
 Default constructor.
 
 matrixFreeOperator (const userInputParameters< dim > &_user_inputs, const std::map< unsigned int, variableAttributes > &_attributes_list)
 Constructor for concurrent solves.
 
 matrixFreeOperator (const userInputParameters< dim > &_user_inputs, const unsigned int &_current_index, const std::map< unsigned int, variableAttributes > &_attributes_list)
 Constructor for single solves.
 
void initialize (std::shared_ptr< const dealii::MatrixFree< dim, number, size_type > > _data, const std::vector< unsigned int > &selected_field_indexes=std::vector< unsigned int >())
 Initialize operator.
 
dealii::types::global_dof_index m () const
 Return the number of DoFs.
 
number el (const unsigned int &row, const unsigned int &col) const
 Return the value of the matrix entry. This function is only valid when row == col and when the diagonal is initialized. Additionally, this is only used so that we may compile. Trying to use this function will throw an error.
 
void clear ()
 Release all memory and return to state like having called the default constructor.
 
void initialize_dof_vector (VectorType &dst, unsigned int dof_handler_index=0) const
 Initialize a given vector with the MatrixFree object that this object contains.
 
void set_constrained_entries_to_one (VectorType &dst) const
 Set constrained entries to one.
 
std::shared_ptr< const dealii::MatrixFree< dim, number, size_type > > get_matrix_free () const
 Get read access to the MatrixFree object stored with this operator.
 
const std::shared_ptr< dealii::DiagonalMatrix< VectorType > > & get_matrix_diagonal_inverse () const
 Get read access to the inverse diagonal of this operator.
 
void add_global_to_local_mapping (const std::unordered_map< std::pair< unsigned int, dependencyType >, unsigned int, pairHash > &_global_to_local_solution)
 Add the mappings from global to local solution vectors.
 
void add_src_solution_subset (const std::vector< VectorType * > &_src_solution_subset=std::vector< VectorType * >())
 Add the solution subset for src vector.
 
void vmult (VectorType &dst, const VectorType &src) const
 Matrix-vector multiplication.
 
void Tvmult (VectorType &dst, const VectorType &src) const
 Transpose matrix-vector multiplication.
 
void compute_explicit_update (std::vector< VectorType * > &dst, const std::vector< VectorType * > &src) const
 Compute the explicit update.
 
void compute_postprocess_explicit_update (std::vector< VectorType * > &dst, const std::vector< VectorType * > &src) const
 Compute the explicit update for postprocessed fields.
 
void compute_nonexplicit_auxiliary_update (std::vector< VectorType * > &dst, const std::vector< VectorType * > &src) const
 Compute a nonexplicit auxiliary update.
 
void compute_residual (VectorType &dst, const VectorType &src) const
 Compute the residual of this operator. This is the b in Ax=b.
 
void compute_diagonal (unsigned int field_index)
 Compute the diagonal of this operator.
 

Protected Member Functions

virtual void compute_explicit_RHS (variableContainer< dim, degree, number > &variable_list, const dealii::Point< dim, size_type > &q_point_loc) const =0
 User-implemented class for the RHS of explicit equations.
 
virtual void compute_nonexplicit_RHS (variableContainer< dim, degree, number > &variable_list, const dealii::Point< dim, size_type > &q_point_loc) const =0
 User-implemented class for the RHS of nonexplicit equations.
 
virtual void compute_nonexplicit_LHS (variableContainer< dim, degree, number > &variable_list, const dealii::Point< dim, size_type > &q_point_loc) const =0
 User-implemented class for the LHS of nonexplicit equations.
 
virtual void compute_postprocess_explicit_RHS (variableContainer< dim, degree, number > &variable_list, const dealii::Point< dim, size_type > &q_point_loc) const =0
 User-implemented class for the RHS of postprocessed explicit equations.
 

Protected Attributes

const userInputParameters< dim > & user_inputs
 The user-inputs.
 
const unsigned int current_index = numbers::invalid_index
 The current index that is being solved.
 

Detailed Description

template<int dim, int degree, typename number>
class matrixFreeOperator< dim, degree, number >

This is the abstract base class for the matrix-free implementation of some PDE.

Template Parameters
dimThe number of dimensions in the problem.
degreeThe polynomial degree of the shape functions.
numberDatatype to use for LinearAlgebra::distributed::Vector<number>. Either double or float.

The documentation for this class was generated from the following file: