DiFfRG
Loading...
Searching...
No Matches
DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ > Class Template Referenceabstract

#include <ldg.hh>

Inheritance diagram for DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >:
DiFfRG::AbstractAssembler< Discretization_::VectorType, Discretization_::SparseMatrixType, Discretization_::dim > DiFfRG::LDG::Assembler< Discretization_, Model_ >

Public Types

using Discretization = Discretization_
 
using Model = Model_
 
using NumberType = typename Discretization::NumberType
 
using VectorType = typename Discretization::VectorType
 
using Components = typename Discretization::Components
 
- Public Types inherited from DiFfRG::AbstractAssembler< Discretization_::VectorType, Discretization_::SparseMatrixType, Discretization_::dim >
using NumberType
 

Public Member Functions

 LDGAssemblerBase (Discretization &discretization, Model &model, const JSONValue &json)
 
virtual IndexSet get_differential_indices () const override
 Obtain the dofs which contain time derivatives.
 
const auto & get_discretization () const
 
auto & get_discretization ()
 
virtual void reinit () override
 Reinitialize the assembler. This is necessary if the mesh has changed, e.g. after a mesh refinement.
 
virtual void rebuild_jacobian_sparsity ()=0
 
virtual void set_time (double t) override
 Set the current time. The assembler should usually just forward this to the numerical model.
 
virtual void refinement_indicator (Vector< double > &, const VectorType &)=0
 
double average_time_variable_residual_assembly ()
 
uint num_variable_residuals () const
 
double average_time_variable_jacobian_assembly ()
 
uint num_variable_jacobians () const
 
- Public Member Functions inherited from DiFfRG::AbstractAssembler< Discretization_::VectorType, Discretization_::SparseMatrixType, Discretization_::dim >
virtual void attach_data_output (DataOutput< dim, VectorType > &data_out, const VectorType &solution, const VectorType &variables=VectorType(), const VectorType &dt_solution=VectorType(), const VectorType &residual=VectorType())=0
 Attach any data output to the DataOutput object provided. This can be used to extract additional data from the solution and write it to the output file. This includes both derivatives and other spatial functions, as well as single values that can be appended to the .csv file.
 
virtual const get_type::SparsityPattern< SparseMatrixType > & get_sparsity_pattern_jacobian () const=0
 Obtain the sparsity pattern of the jacobian matrix.
 
virtual void reinit_vector (VectorType &vector) const=0
 Reinitialize an arbitrary vector so that it has the correct size and structure.
 
virtual const SparseMatrixType & get_mass_matrix () const=0
 Obtain the mass matrix.
 
virtual void residual_variables (VectorType &residual, const VectorType &variables, const VectorType &spatial_solution)
 When coupling the spatial discretization to additional variables, this function should calculate the residual for the additional variables.
 
virtual void jacobian_variables (FullMatrix< NumberType > &jacobian, const VectorType &variables, const VectorType &spatial_solution)
 When coupling the spatial discretization to additional variables, this function should calculate the jacobian for the additional variables.
 
void mass (VectorType &mass, const VectorType &solution_global, NumberType weight)
 Calculates the mass \(m_i(u)\) for an ODE.
 
virtual void mass (VectorType &mass, const VectorType &solution_global, const VectorType &solution_global_dot, NumberType weight)=0
 Calculates the mass \(m(u, \partial_t u)\) for a DAE.
 
void residual (VectorType &residual, const VectorType &solution_global, NumberType weight, NumberType weight_mass, const VectorType &variables=VectorType())
 Calculates the residual for an ODE.
 
virtual void residual (VectorType &residual, const VectorType &solution_global, NumberType weight, const VectorType &solution_global_dot, NumberType weight_mass, const VectorType &variables=VectorType())=0
 Calculates the residual for a DAE.
 
void jacobian_mass (SparseMatrixType &jacobian, const VectorType &solution_global, NumberType mass_weight=1.)
 Calculates the jacobian of the mass function for an ODE.
 
virtual void jacobian_mass (SparseMatrixType &jacobian, const VectorType &solution_global, const VectorType &solution_global_dot, NumberType alpha=1., NumberType beta=1.)=0
 Calculates the jacobian of the mass function for a DAE.
 
void jacobian (SparseMatrixType &jacobian, const VectorType &solution_global, NumberType weight, NumberType mass_weight, const VectorType &variables=VectorType())
 Calculates the jacobian of the residual function for an ODE.
 
virtual void jacobian (SparseMatrixType &jacobian, const VectorType &solution_global, NumberType weight, const VectorType &solution_global_dot, NumberType alpha, NumberType beta, const VectorType &variables=VectorType())=0
 Calculates the jacobian of the residual function for a DAE.
 

Static Public Attributes

static constexpr uint dim = Discretization::dim
 

Protected Attributes

Discretizationdiscretization
 
Modelmodel
 
const FiniteElement< dim > & fe
 
const DoFHandler< dim > & dof_handler
 
const Mapping< dim > & mapping
 
uint threads
 
uint batch_size
 
DoFHandler< dim >::cell_iterator EoM_cell
 
DoFHandler< dim >::cell_iterator old_EoM_cell
 
const double EoM_abs_tol
 
const uint EoM_max_iter
 
Point< dimEoM
 
FullMatrix< NumberTypeextractor_jacobian
 
FullMatrix< NumberTypeextractor_jacobian_u
 
FullMatrix< NumberTypeextractor_jacobian_du
 
FullMatrix< NumberTypeextractor_jacobian_ddu
 
std::vector< types::global_dof_index > extractor_dof_indices
 
std::vector< double > timings_variable_residual
 
std::vector< double > timings_variable_jacobian
 

Member Typedef Documentation

◆ Components

template<typename Discretization_ , typename Model_ >
using DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::Components = typename Discretization::Components

◆ Discretization

template<typename Discretization_ , typename Model_ >
using DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::Discretization = Discretization_

◆ Model

template<typename Discretization_ , typename Model_ >
using DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::Model = Model_

◆ NumberType

template<typename Discretization_ , typename Model_ >
using DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::NumberType = typename Discretization::NumberType

◆ VectorType

template<typename Discretization_ , typename Model_ >
using DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::VectorType = typename Discretization::VectorType

Constructor & Destructor Documentation

◆ LDGAssemblerBase()

template<typename Discretization_ , typename Model_ >
DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::LDGAssemblerBase ( Discretization & discretization,
Model & model,
const JSONValue & json )
inline

Member Function Documentation

◆ average_time_variable_jacobian_assembly()

template<typename Discretization_ , typename Model_ >
double DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::average_time_variable_jacobian_assembly ( )
inline

◆ average_time_variable_residual_assembly()

template<typename Discretization_ , typename Model_ >
double DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::average_time_variable_residual_assembly ( )
inline

◆ get_differential_indices()

template<typename Discretization_ , typename Model_ >
virtual IndexSet DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::get_differential_indices ( ) const
inlineoverridevirtual

Obtain the dofs which contain time derivatives.

Returns
IndexSet The indices of the dofs which contain time derivatives

Implements DiFfRG::AbstractAssembler< Discretization_::VectorType, Discretization_::SparseMatrixType, Discretization_::dim >.

◆ get_discretization() [1/2]

template<typename Discretization_ , typename Model_ >
auto & DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::get_discretization ( )
inline

◆ get_discretization() [2/2]

template<typename Discretization_ , typename Model_ >
const auto & DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::get_discretization ( ) const
inline

◆ num_variable_jacobians()

template<typename Discretization_ , typename Model_ >
uint DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::num_variable_jacobians ( ) const
inline

◆ num_variable_residuals()

template<typename Discretization_ , typename Model_ >
uint DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::num_variable_residuals ( ) const
inline

◆ rebuild_jacobian_sparsity()

template<typename Discretization_ , typename Model_ >
virtual void DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::rebuild_jacobian_sparsity ( )
pure virtual

◆ refinement_indicator()

template<typename Discretization_ , typename Model_ >
virtual void DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::refinement_indicator ( Vector< double > & ,
const VectorType &  )
pure virtual

◆ reinit()

template<typename Discretization_ , typename Model_ >
virtual void DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::reinit ( )
inlineoverridevirtual

Reinitialize the assembler. This is necessary if the mesh has changed, e.g. after a mesh refinement.

Implements DiFfRG::AbstractAssembler< Discretization_::VectorType, Discretization_::SparseMatrixType, Discretization_::dim >.

Reimplemented in DiFfRG::LDG::Assembler< Discretization_, Model_ >.

◆ set_time()

template<typename Discretization_ , typename Model_ >
virtual void DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::set_time ( double t)
inlineoverridevirtual

Set the current time. The assembler should usually just forward this to the numerical model.

Parameters
tThe current time

Implements DiFfRG::AbstractAssembler< Discretization_::VectorType, Discretization_::SparseMatrixType, Discretization_::dim >.

Member Data Documentation

◆ batch_size

template<typename Discretization_ , typename Model_ >
uint DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::batch_size
protected

◆ dim

template<typename Discretization_ , typename Model_ >
uint DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::dim = Discretization::dim
staticconstexpr

◆ discretization

template<typename Discretization_ , typename Model_ >
Discretization& DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::discretization
protected

◆ dof_handler

template<typename Discretization_ , typename Model_ >
const DoFHandler<dim>& DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::dof_handler
protected

◆ EoM

template<typename Discretization_ , typename Model_ >
Point<dim> DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::EoM
mutableprotected

◆ EoM_abs_tol

template<typename Discretization_ , typename Model_ >
const double DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::EoM_abs_tol
protected

◆ EoM_cell

template<typename Discretization_ , typename Model_ >
DoFHandler<dim>::cell_iterator DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::EoM_cell
mutableprotected

◆ EoM_max_iter

template<typename Discretization_ , typename Model_ >
const uint DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::EoM_max_iter
protected

◆ extractor_dof_indices

template<typename Discretization_ , typename Model_ >
std::vector<types::global_dof_index> DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::extractor_dof_indices
protected

◆ extractor_jacobian

template<typename Discretization_ , typename Model_ >
FullMatrix<NumberType> DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::extractor_jacobian
protected

◆ extractor_jacobian_ddu

template<typename Discretization_ , typename Model_ >
FullMatrix<NumberType> DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::extractor_jacobian_ddu
protected

◆ extractor_jacobian_du

template<typename Discretization_ , typename Model_ >
FullMatrix<NumberType> DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::extractor_jacobian_du
protected

◆ extractor_jacobian_u

template<typename Discretization_ , typename Model_ >
FullMatrix<NumberType> DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::extractor_jacobian_u
protected

◆ fe

template<typename Discretization_ , typename Model_ >
const FiniteElement<dim>& DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::fe
protected

◆ mapping

template<typename Discretization_ , typename Model_ >
const Mapping<dim>& DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::mapping
protected

◆ model

template<typename Discretization_ , typename Model_ >
Model& DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::model
protected

◆ old_EoM_cell

template<typename Discretization_ , typename Model_ >
DoFHandler<dim>::cell_iterator DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::old_EoM_cell
protected

◆ threads

template<typename Discretization_ , typename Model_ >
uint DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::threads
protected

◆ timings_variable_jacobian

template<typename Discretization_ , typename Model_ >
std::vector<double> DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::timings_variable_jacobian
protected

◆ timings_variable_residual

template<typename Discretization_ , typename Model_ >
std::vector<double> DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::timings_variable_residual
protected

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