Assembler< Discretization_, Model_ > Class Template Reference#

DiFfRG: DiFfRG::LDG::Assembler< Discretization_, Model_ > Class Template Reference
DiFfRG
Discretization Framework for functional Renormalization Group flows

The LDG assembler that can be used for any LDG scheme, with as many levels as one wants. More...

#include <ldg.hh>

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

Classes

struct  PointEvaluation
 

Public Types

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

Public Member Functions

 Assembler (Discretization &discretization, Model &model, const ConfigTree &config)
 
virtual void reinit_vector (VectorType &vec) const override
 
virtual void reinit_matrix (SparseMatrixType &matrix) const override
 
virtual MPI_Comm get_communicator () const override
 The communicator this assembler's linear algebra lives on.
 
virtual void reinit_solution_view (SolutionView< VectorType > &view) const override
 
virtual void attach_data_output (OutputFrame< dim, VectorType > &data_out, const VectorType &solution, const VectorType &variables, const VectorType &dt_solution=VectorType(), const VectorType &residual=VectorType()) override
 Attach all intermediate (ldg) vectors to the data output.
 
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 () override
 
virtual void refinement_indicator (Vector< double > &indicator, const VectorType &solution_global) override
 
virtual const BlockSparsityPattern & get_sparsity_pattern_jacobian () const override
 Obtain the sparsity pattern of the jacobian matrix.
 
virtual const BlockSparseMatrix< NumberType > & get_mass_matrix () const override
 Obtain the mass matrix.
 
virtual void mass (VectorType &residual, const VectorType &solution_global, const VectorType &solution_global_dot, NumberType weight) override
 Construct the mass.
 
virtual void residual (VectorType &residual, const VectorType &solution_global, NumberType weight, const VectorType &solution_global_dot, NumberType weight_mass, const VectorType &variables=VectorType()) override
 Construct the system residual, i.e. Res = grad(flux) - source.
 
virtual void jacobian_mass (BlockSparseMatrix< NumberType > &jacobian, const VectorType &solution_global, const VectorType &solution_global_dot, NumberType alpha=1., NumberType beta=1.) override
 
virtual void jacobian (BlockSparseMatrix< NumberType > &jacobian, const VectorType &solution_global, NumberType weight, const VectorType &solution_global_dot, NumberType alpha, NumberType beta, const VectorType &variables=VectorType()) override
 Construct the system jacobian, i.e. dRes/du.
 
SummaryEvent summary () const override
 
double average_time_reinit () const
 
uint num_reinits () const
 
double average_time_residual_assembly () const
 
uint num_residuals () const
 
double average_time_jacobian_assembly () const
 
uint num_jacobians () const
 
- Public Member Functions inherited from DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >
 LDGAssemblerBase (Discretization &discretization, Model &model, const ConfigTree &config)
 
virtual IndexSet get_differential_indices () const override
 Obtain the dofs which contain time derivatives.
 
const auto & get_discretization () const
 
auto & get_discretization ()
 
virtual void set_time (double t) override
 Set the current time. The assembler should usually just forward this to the numerical model.
 
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 (OutputFrame< dim, VectorType > &data_out, const VectorType &solution, const VectorType &variables=VectorType(), const VectorType &dt_solution=VectorType(), const VectorType &residual=VectorType())=0
 Contribute the assembler's fields and model readouts to one scoped output frame.
 
virtual void attach_data_output (DataOutput< dim, VectorType > &, const VectorType &, const VectorType &=VectorType(), const VectorType &=VectorType(), const VectorType &=VectorType())=delete
 
virtual void reinit_vector (VectorType &vector) const=0
 Reinitialize an arbitrary vector so that it has the correct size and structure.
 
virtual void reinit_matrix (SparseMatrixType &matrix) const=0
 Reinitialize a matrix to the jacobian's sparsity pattern.
 
virtual void reinit_solution_view (SolutionView< VectorType > &view) const=0
 Establish the layout of a fully-replicated read-only view of the solution.
 
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
 
static constexpr uint stencil = Components::count_fe_subsystems()
 
- Static Public Attributes inherited from DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >
static constexpr uint dim = Discretization::dim
 

Protected Member Functions

void rebuild_ldg_vectors (const VectorType &sol) const
 
template<int k>
void rebuild_ldg_jacobian (const VectorType &sol) const
 
template<int from, int to, typename VectorType , typename VectorTypeldg >
void build_ldg_vector (const VectorType &solution_global, VectorTypeldg &ldg_vector, VectorTypeldg &ldg_vector_tmp) const
 Build the LDG vector at level 'to', which takes information from level 'from'.
 
template<int from, int to, typename VectorType >
void build_ldg_jacobian (const VectorType &solution_global, BlockSparseMatrix< NumberType > &ldg_jacobian, BlockSparseMatrix< NumberType > &ldg_jacobian_tmp) const
 Build the LDG jacobian at level 'to', which takes information from level 'from'.
 
void build_ldg_sparsity (BlockSparsityPattern &sparsity_pattern, const DoFHandler< dim > &to_dofh, const DoFHandler< dim > &from_dofh, const int stencil=1, bool add_extractor_dofs=false) const
 Create a sparsity pattern for matrices between the DoFs of two DoFHandlers, with given stencil size.
 
void build_inverse (const SparseMatrix< NumberType > &in, SparseMatrix< NumberType > &out) const
 Build the inverse of matrix in and save the result to out.
 
template<typename RawPotential >
auto evaluate_at (const Point< dim > &x, const typename DoFHandler< dim >::cell_iterator &x_cell, const VectorType &solution_global, const RawPotential &raw_potential) const
 Evaluate every LDG subsystem at x, which lies in x_cell.
 
void readouts (OutputFrame< dim, VectorType > &data_out, const VectorType &solution_global, const VectorType &variables) const
 
void extract (std::array< NumberType, Components::count_extractors()> &data, const VectorType &solution_global, const VectorType &variables, bool search_EoM, bool set_EoM, bool postprocess) const
 
bool jacobian_extractors (FullMatrix< NumberType > &extractor_jacobian, const VectorType &solution_global, const VectorType &variables)
 
virtual void residual_variables (VectorType &residual, const VectorType &variables, const VectorType &spatial_solution) override
 
virtual void jacobian_variables (FullMatrix< NumberType > &jacobian, const VectorType &variables, const VectorType &spatial_solution) override
 
AssemblySchedule schedule_for (const double cost_ns) const
 
- Protected Member Functions inherited from DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >
AssemblySchedule schedule_for (const double cost_ns) const
 
void update_assembly_schedules ()
 
auto extractor_raw_potential (const VectorType &solution_global) const
 
std::pair< Point< dim >, typename DoFHandler< dim >::cell_iterator > resolve_extractor_point (const Point< dim > &EoM_point, const typename DoFHandler< dim >::cell_iterator &EoM_cell_, const VectorType &solution_global) const
 

Static Protected Member Functions

template<typename... T>
static constexpr auto v_tie (T &&...t)
 
template<typename... T>
static constexpr auto e_tie (T &&...t)
 

Protected Attributes

QGauss< dim > quadrature
 
QGauss< dim - 1 > quadrature_face
 
std::vector< const DoFHandler< dim > * > dof_handler_list
 
array< BlockVector< NumberType >, Components::count_fe_subsystems()> sol_vector
 
array< BlockVector< NumberType >, Components::count_fe_subsystems()> sol_vector_tmp
 
array< Vector< NumberType >, Components::count_fe_subsystems()> sol_vector_vec_tmp
 
BlockSparsityPattern sparsity_pattern_jacobian
 
BlockSparsityPattern sparsity_pattern_mass
 
array< BlockSparsityPattern, Components::count_fe_subsystems()> sparsity_pattern_ug
 
array< BlockSparsityPattern, Components::count_fe_subsystems()> sparsity_pattern_gu
 
array< BlockSparsityPattern, Components::count_fe_subsystems()> sparsity_pattern_wg
 
array< BlockSparseMatrix< NumberType >, Components::count_fe_subsystems()> jacobian_tmp
 
BlockSparseMatrix< NumberType > mass_matrix
 
SparseMatrix< NumberType > component_mass_matrix_inverse
 
array< BlockSparseMatrix< NumberType >, Components::count_fe_subsystems()> j_ug
 
array< BlockSparseMatrix< NumberType >, Components::count_fe_subsystems()> j_gu
 
array< BlockSparseMatrix< NumberType >, Components::count_fe_subsystems()> j_wg
 
array< BlockSparseMatrix< NumberType >, Components::count_fe_subsystems()> j_wg_tmp
 
std::vector< double > timings_reinit
 
std::vector< double > timings_residual
 
std::vector< double > timings_jacobian
 
array< bool, Components::count_fe_subsystems()> ldg_matrix_built
 
array< bool, Components::count_fe_subsystems()> jacobian_tmp_built
 
Discretization & discretization
 
const DoFHandler< dim > & dof_handler
 
const FiniteElement< dim > & fe
 
const Mapping< dim > & mapping
 
Model & model
 
const Config::EoMConfig EoM_config
 
std::vector< types::global_dof_index > extractor_dof_indices
 
Point< dim > EoM
 
DoFHandler< dim >::cell_iterator EoM_cell
 
std::optional< Point< dim > > EoM_minimum_guess
 
FullMatrix< NumberType > extractor_jacobian_u
 
DoFHandler< dim >::cell_iterator old_EoM_cell
 
DoFHandler< dim >::cell_iterator old_extractor_cell
 
std::vector< double > timings_variable_jacobian
 
std::vector< double > timings_variable_residual
 
- Protected Attributes inherited from DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >
Discretization & discretization
 
Model & model
 
ReportPort report_port
 
const FiniteElement< dim > & fe
 
const DoFHandler< dim > & dof_handler
 
const Mapping< dim > & mapping
 
uint n_owned_cells = 0
 
const AssemblyScheduleOverrides schedule_overrides
 
DoFHandler< dim >::cell_iterator EoM_cell
 
DoFHandler< dim >::cell_iterator old_EoM_cell
 
DoFHandler< dim >::cell_iterator old_extractor_cell
 
const Config::EoMConfig EoM_config
 
Point< dim > EoM
 
std::optional< Point< dim > > EoM_minimum_guess
 
DiFfRG::internal::PotentialSystemCache< dim, NumberType > potential_cache
 
FullMatrix< NumberType > extractor_jacobian
 
FullMatrix< NumberType > extractor_jacobian_u
 
FullMatrix< NumberType > extractor_jacobian_du
 
FullMatrix< NumberType > extractor_jacobian_ddu
 
std::vector< types::global_dof_index > extractor_dof_indices
 
std::vector< double > timings_variable_residual
 
std::vector< double > timings_variable_jacobian
 

Static Protected Attributes

static constexpr int nothing = 0
 

Private Types

using Base = LDGAssemblerBase<Discretization_, Model_>
 

Private Member Functions

template<typename... T>
auto fe_conv (std::tuple< T &... > &t) const
 
template<typename... T>
auto fe_more_conv (std::tuple< T &... > &t) const
 
template<typename... T>
auto ref_conv (std::tuple< T &... > &t) const
 

Detailed Description

template<typename Discretization_, typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
class DiFfRG::LDG::Assembler< Discretization_, Model_ >

The LDG assembler that can be used for any LDG scheme, with as many levels as one wants.

Template Parameters
DiscretizationDiscretization on which to assemble
ModelThe model class which contains the physical equations.

Member Typedef Documentation

◆ Base

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
using DiFfRG::LDG::Assembler< Discretization_, Model_ >::Base = LDGAssemblerBase<Discretization_, Model_>
private

◆ Components

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
using DiFfRG::LDG::Assembler< Discretization_, Model_ >::Components = typename Discretization::Components

◆ Discretization

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
using DiFfRG::LDG::Assembler< Discretization_, Model_ >::Discretization = Discretization_

◆ Model

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
using DiFfRG::LDG::Assembler< Discretization_, Model_ >::Model = Model_

◆ NumberType

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
using DiFfRG::LDG::Assembler< Discretization_, Model_ >::NumberType = typename Discretization::NumberType

◆ SparseMatrixType

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
using DiFfRG::LDG::Assembler< Discretization_, Model_ >::SparseMatrixType = typename Discretization::SparseMatrixType

◆ VectorType

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
using DiFfRG::LDG::Assembler< Discretization_, Model_ >::VectorType = typename Discretization::VectorType

Constructor & Destructor Documentation

◆ Assembler()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
DiFfRG::LDG::Assembler< Discretization_, Model_ >::Assembler ( Discretization & discretization,
Model & model,
const ConfigTree & config )
inline

Member Function Documentation

◆ attach_data_output()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
virtual void DiFfRG::LDG::Assembler< Discretization_, Model_ >::attach_data_output ( OutputFrame< dim, VectorType > & data_out,
const VectorType & solution,
const VectorType & variables,
const VectorType & dt_solution = VectorType(),
const VectorType & residual = VectorType() )
inlineoverridevirtual

Attach all intermediate (ldg) vectors to the data output.

Parameters
data_outThe scoped output frame
solThe current global solution

◆ average_time_jacobian_assembly()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
double DiFfRG::LDG::Assembler< Discretization_, Model_ >::average_time_jacobian_assembly ( ) const
inline

◆ average_time_reinit()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
double DiFfRG::LDG::Assembler< Discretization_, Model_ >::average_time_reinit ( ) const
inline

◆ average_time_residual_assembly()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
double DiFfRG::LDG::Assembler< Discretization_, Model_ >::average_time_residual_assembly ( ) const
inline

◆ build_inverse()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
void DiFfRG::LDG::Assembler< Discretization_, Model_ >::build_inverse ( const SparseMatrix< NumberType > & in,
SparseMatrix< NumberType > & out ) const
inlineprotected

Build the inverse of matrix in and save the result to out.

Parameters
inThe matrix to invert. Must have a valid sparsity pattern.
outThe matrix to store the result. Must have a valid sparsity pattern.

◆ build_ldg_jacobian()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
template<int from, int to, typename VectorType >
void DiFfRG::LDG::Assembler< Discretization_, Model_ >::build_ldg_jacobian ( const VectorType & solution_global,
BlockSparseMatrix< NumberType > & ldg_jacobian,
BlockSparseMatrix< NumberType > & ldg_jacobian_tmp ) const
inlineprotected

Build the LDG jacobian at level 'to', which takes information from level 'from'.

Template Parameters
fromLevel to take information from.
toLevel to write information to.
Parameters
solution_globalThe solution at level 'from'
ldg_jacobianWhere to store the result.
ldg_jacobian_tmpA temporary of the same size as ldg_jacobian.

◆ build_ldg_sparsity()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
void DiFfRG::LDG::Assembler< Discretization_, Model_ >::build_ldg_sparsity ( BlockSparsityPattern & sparsity_pattern,
const DoFHandler< dim > & to_dofh,
const DoFHandler< dim > & from_dofh,
const int stencil = 1,
bool add_extractor_dofs = false ) const
inlineprotected

Create a sparsity pattern for matrices between the DoFs of two DoFHandlers, with given stencil size.

Parameters
sparsity_patternThe pattern to store the result in.
dofh_toDoFHandler giving the row DoFs.
dofh_fromDoFHandler giving the column DoFs.
stencilStencil size of the resulting pattern.

◆ build_ldg_vector()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
template<int from, int to, typename VectorType , typename VectorTypeldg >
void DiFfRG::LDG::Assembler< Discretization_, Model_ >::build_ldg_vector ( const VectorType & solution_global,
VectorTypeldg & ldg_vector,
VectorTypeldg & ldg_vector_tmp ) const
inlineprotected

Build the LDG vector at level 'to', which takes information from level 'from'.

Template Parameters
fromLevel to take information from.
toLevel to write information to.
Parameters
solution_globalThe solution at level 'from'
ldg_vectorWhere to store the result.
ldg_vector_tmpA temporary of the same size as ldg_vector.

◆ e_tie()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
template<typename... T>
static constexpr auto DiFfRG::LDG::Assembler< Discretization_, Model_ >::e_tie ( T &&... t)
inlinestaticconstexprprotected

◆ evaluate_at()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
template<typename RawPotential >
auto DiFfRG::LDG::Assembler< Discretization_, Model_ >::evaluate_at ( const Point< dim > & x,
const typename DoFHandler< dim >::cell_iterator & x_cell,
const VectorType & solution_global,
const RawPotential & raw_potential ) const
inlineprotected

Evaluate every LDG subsystem at x, which lies in x_cell.

Each subsystem carries its own DoFHandler over the same triangulation, so the cell has to be re-addressed per subsystem before its FEValues can be reinit'ed. Only subsystem 0 (the solution proper) has gradients and hessians read off it; the LDG levels are values only.

◆ extract()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
void DiFfRG::LDG::Assembler< Discretization_, Model_ >::extract ( std::array< NumberType, Components::count_extractors()> & data,
const VectorType & solution_global,
const VectorType & variables,
bool search_EoM,
bool set_EoM,
bool postprocess ) const
inlineprotected

◆ fe_conv()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
template<typename... T>
auto DiFfRG::LDG::Assembler< Discretization_, Model_ >::fe_conv ( std::tuple< T &... > & t) const
inlineprivate

◆ fe_more_conv()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
template<typename... T>
auto DiFfRG::LDG::Assembler< Discretization_, Model_ >::fe_more_conv ( std::tuple< T &... > & t) const
inlineprivate

◆ get_communicator()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
virtual MPI_Comm DiFfRG::LDG::Assembler< Discretization_, Model_ >::get_communicator ( ) const
inlineoverridevirtual

The communicator this assembler's linear algebra lives on.

MPI_COMM_SELF for a serial discretization, so callers never branch on the build type.

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

◆ get_mass_matrix()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
virtual const BlockSparseMatrix< NumberType > & DiFfRG::LDG::Assembler< Discretization_, Model_ >::get_mass_matrix ( ) const
inlineoverridevirtual

Obtain the mass matrix.

Returns
const SparseMatrixType& The mass matrix

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

◆ get_sparsity_pattern_jacobian()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
virtual const BlockSparsityPattern & DiFfRG::LDG::Assembler< Discretization_, Model_ >::get_sparsity_pattern_jacobian ( ) const
inlineoverridevirtual

Obtain the sparsity pattern of the jacobian matrix.

Returns
const SparsityPattern<VectorType>& The sparsity pattern of the jacobian matrix

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

◆ jacobian()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
virtual void DiFfRG::LDG::Assembler< Discretization_, Model_ >::jacobian ( BlockSparseMatrix< NumberType > & jacobian,
const VectorType & solution_global,
NumberType weight,
const VectorType & solution_global_dot,
NumberType alpha,
NumberType beta,
const VectorType & variables = VectorType() )
inlineoverridevirtual

Construct the system jacobian, i.e. dRes/du.

Parameters
jacobianThe result is stored here.
solution_globalThe current global solution.
weightA factor to multiply the whole jacobian with.

◆ jacobian_extractors()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
bool DiFfRG::LDG::Assembler< Discretization_, Model_ >::jacobian_extractors ( FullMatrix< NumberType > & extractor_jacobian,
const VectorType & solution_global,
const VectorType & variables )
inlineprotected

◆ jacobian_mass()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
virtual void DiFfRG::LDG::Assembler< Discretization_, Model_ >::jacobian_mass ( BlockSparseMatrix< NumberType > & jacobian,
const VectorType & solution_global,
const VectorType & solution_global_dot,
NumberType alpha = 1.,
NumberType beta = 1. )
inlineoverridevirtual

◆ jacobian_variables()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
virtual void DiFfRG::LDG::Assembler< Discretization_, Model_ >::jacobian_variables ( FullMatrix< NumberType > & jacobian,
const VectorType & variables,
const VectorType & spatial_solution )
inlineoverrideprotectedvirtual

◆ mass()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
virtual void DiFfRG::LDG::Assembler< Discretization_, Model_ >::mass ( VectorType & residual,
const VectorType & solution_global,
const VectorType & solution_global_dot,
NumberType weight )
inlineoverridevirtual

Construct the mass.

Parameters
residualThe result is stored here.
solution_globalThe current global solution.
weightA factor to multiply the whole residual with.

◆ num_jacobians()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
uint DiFfRG::LDG::Assembler< Discretization_, Model_ >::num_jacobians ( ) const
inline

◆ num_reinits()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
uint DiFfRG::LDG::Assembler< Discretization_, Model_ >::num_reinits ( ) const
inline

◆ num_residuals()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
uint DiFfRG::LDG::Assembler< Discretization_, Model_ >::num_residuals ( ) const
inline

◆ readouts()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
void DiFfRG::LDG::Assembler< Discretization_, Model_ >::readouts ( OutputFrame< dim, VectorType > & data_out,
const VectorType & solution_global,
const VectorType & variables ) const
inlineprotected

◆ rebuild_jacobian_sparsity()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
virtual void DiFfRG::LDG::Assembler< Discretization_, Model_ >::rebuild_jacobian_sparsity ( )
inlineoverridevirtual

◆ rebuild_ldg_jacobian()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
template<int k>
void DiFfRG::LDG::Assembler< Discretization_, Model_ >::rebuild_ldg_jacobian ( const VectorType & sol) const
inlineprotected

◆ rebuild_ldg_vectors()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
void DiFfRG::LDG::Assembler< Discretization_, Model_ >::rebuild_ldg_vectors ( const VectorType & sol) const
inlineprotected

◆ ref_conv()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
template<typename... T>
auto DiFfRG::LDG::Assembler< Discretization_, Model_ >::ref_conv ( std::tuple< T &... > & t) const
inlineprivate

◆ refinement_indicator()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
virtual void DiFfRG::LDG::Assembler< Discretization_, Model_ >::refinement_indicator ( Vector< double > & indicator,
const VectorType & solution_global )
inlineoverridevirtual

◆ reinit()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
virtual void DiFfRG::LDG::Assembler< Discretization_, Model_ >::reinit ( )
inlineoverridevirtual

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

Reimplemented from DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >.

◆ reinit_matrix()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
virtual void DiFfRG::LDG::Assembler< Discretization_, Model_ >::reinit_matrix ( SparseMatrixType & matrix) const
inlineoverridevirtual

◆ reinit_solution_view()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
virtual void DiFfRG::LDG::Assembler< Discretization_, Model_ >::reinit_solution_view ( SolutionView< VectorType > & view) const
inlineoverridevirtual

◆ reinit_vector()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
virtual void DiFfRG::LDG::Assembler< Discretization_, Model_ >::reinit_vector ( VectorType & vec) const
inlineoverridevirtual

◆ residual()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
virtual void DiFfRG::LDG::Assembler< Discretization_, Model_ >::residual ( VectorType & residual,
const VectorType & solution_global,
NumberType weight,
const VectorType & solution_global_dot,
NumberType weight_mass,
const VectorType & variables = VectorType() )
inlineoverridevirtual

Construct the system residual, i.e. Res = grad(flux) - source.

Parameters
residualThe result is stored here.
solution_globalThe current global solution.
weightA factor to multiply the whole residual with.

◆ residual_variables()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
virtual void DiFfRG::LDG::Assembler< Discretization_, Model_ >::residual_variables ( VectorType & residual,
const VectorType & variables,
const VectorType & spatial_solution )
inlineoverrideprotectedvirtual

◆ schedule_for()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
AssemblySchedule DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::schedule_for ( const double cost_ns) const
inlineprotected

◆ summary()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
SummaryEvent DiFfRG::LDG::Assembler< Discretization_, Model_ >::summary ( ) const
inlineoverridevirtual

Return aggregate assembly statistics for the run summary.

Reimplemented from DiFfRG::AbstractAssembler< Discretization_::VectorType, Discretization_::SparseMatrixType, Discretization_::dim >.

◆ v_tie()

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
template<typename... T>
static constexpr auto DiFfRG::LDG::Assembler< Discretization_, Model_ >::v_tie ( T &&... t)
inlinestaticconstexprprotected

Member Data Documentation

◆ component_mass_matrix_inverse

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
SparseMatrix<NumberType> DiFfRG::LDG::Assembler< Discretization_, Model_ >::component_mass_matrix_inverse
protected

◆ dim

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
uint DiFfRG::LDG::Assembler< Discretization_, Model_ >::dim = Discretization::dim
staticconstexpr

◆ discretization

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
Discretization& DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::discretization
protected

◆ dof_handler

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

◆ dof_handler_list

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
std::vector<const DoFHandler<dim> *> DiFfRG::LDG::Assembler< Discretization_, Model_ >::dof_handler_list
protected

◆ EoM

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
Point<dim> DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::EoM
mutableprotected

◆ EoM_cell

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

◆ EoM_config

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
const Config::EoMConfig DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::EoM_config
protected

◆ EoM_minimum_guess

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
std::optional<Point<dim> > DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::EoM_minimum_guess
mutableprotected

◆ extractor_dof_indices

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

◆ extractor_jacobian_u

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
FullMatrix<NumberType> DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::extractor_jacobian_u
protected

◆ fe

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

◆ j_gu

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
array<BlockSparseMatrix<NumberType>, Components::count_fe_subsystems()> DiFfRG::LDG::Assembler< Discretization_, Model_ >::j_gu
mutableprotected

◆ j_ug

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
array<BlockSparseMatrix<NumberType>, Components::count_fe_subsystems()> DiFfRG::LDG::Assembler< Discretization_, Model_ >::j_ug
protected

◆ j_wg

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
array<BlockSparseMatrix<NumberType>, Components::count_fe_subsystems()> DiFfRG::LDG::Assembler< Discretization_, Model_ >::j_wg
mutableprotected

◆ j_wg_tmp

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
array<BlockSparseMatrix<NumberType>, Components::count_fe_subsystems()> DiFfRG::LDG::Assembler< Discretization_, Model_ >::j_wg_tmp
mutableprotected

◆ jacobian_tmp

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
array<BlockSparseMatrix<NumberType>, Components::count_fe_subsystems()> DiFfRG::LDG::Assembler< Discretization_, Model_ >::jacobian_tmp
protected

◆ jacobian_tmp_built

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
array<bool, Components::count_fe_subsystems()> DiFfRG::LDG::Assembler< Discretization_, Model_ >::jacobian_tmp_built
mutableprotected

◆ ldg_matrix_built

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
array<bool, Components::count_fe_subsystems()> DiFfRG::LDG::Assembler< Discretization_, Model_ >::ldg_matrix_built
mutableprotected

◆ mapping

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

◆ mass_matrix

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
BlockSparseMatrix<NumberType> DiFfRG::LDG::Assembler< Discretization_, Model_ >::mass_matrix
protected

◆ model

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
Model& DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::model
protected

◆ nothing

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
int DiFfRG::LDG::Assembler< Discretization_, Model_ >::nothing = 0
staticconstexprprotected

◆ old_EoM_cell

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

◆ old_extractor_cell

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
DoFHandler<dim>::cell_iterator DiFfRG::LDG::LDGAssemblerBase< Discretization_, Model_ >::old_extractor_cell
protected

◆ quadrature

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
QGauss<dim> DiFfRG::LDG::Assembler< Discretization_, Model_ >::quadrature
protected

◆ quadrature_face

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
QGauss<dim - 1> DiFfRG::LDG::Assembler< Discretization_, Model_ >::quadrature_face
protected

◆ sol_vector

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
array<BlockVector<NumberType>, Components::count_fe_subsystems()> DiFfRG::LDG::Assembler< Discretization_, Model_ >::sol_vector
mutableprotected

◆ sol_vector_tmp

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
array<BlockVector<NumberType>, Components::count_fe_subsystems()> DiFfRG::LDG::Assembler< Discretization_, Model_ >::sol_vector_tmp
mutableprotected

◆ sol_vector_vec_tmp

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
array<Vector<NumberType>, Components::count_fe_subsystems()> DiFfRG::LDG::Assembler< Discretization_, Model_ >::sol_vector_vec_tmp
mutableprotected

◆ sparsity_pattern_gu

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
array<BlockSparsityPattern, Components::count_fe_subsystems()> DiFfRG::LDG::Assembler< Discretization_, Model_ >::sparsity_pattern_gu
protected

◆ sparsity_pattern_jacobian

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
BlockSparsityPattern DiFfRG::LDG::Assembler< Discretization_, Model_ >::sparsity_pattern_jacobian
protected

◆ sparsity_pattern_mass

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
BlockSparsityPattern DiFfRG::LDG::Assembler< Discretization_, Model_ >::sparsity_pattern_mass
protected

◆ sparsity_pattern_ug

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
array<BlockSparsityPattern, Components::count_fe_subsystems()> DiFfRG::LDG::Assembler< Discretization_, Model_ >::sparsity_pattern_ug
protected

◆ sparsity_pattern_wg

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
array<BlockSparsityPattern, Components::count_fe_subsystems()> DiFfRG::LDG::Assembler< Discretization_, Model_ >::sparsity_pattern_wg
protected

◆ stencil

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
uint DiFfRG::LDG::Assembler< Discretization_, Model_ >::stencil = Components::count_fe_subsystems()
staticconstexpr

◆ timings_jacobian

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
std::vector<double> DiFfRG::LDG::Assembler< Discretization_, Model_ >::timings_jacobian
protected

◆ timings_reinit

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
std::vector<double> DiFfRG::LDG::Assembler< Discretization_, Model_ >::timings_reinit
protected

◆ timings_residual

template<typename Discretization_ , typename Model_ = typename DiFfRG::internal::assembler_model_of<Discretization_>::type>
std::vector<double> DiFfRG::LDG::Assembler< Discretization_, Model_ >::timings_residual
protected

◆ timings_variable_jacobian

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

◆ timings_variable_residual

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

The documentation for this class was generated from the following file:
  • /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/discretization/FEM/assembler/ldg.hh