5 #ifndef _heat_equation_derived_interface_h_
6 #define _heat_equation_derived_interface_h_
9 #include <deal2lkit/parsed_function.h>
24 #include "data/assembly.h"
28 template <
int dim,
typename LAC=LADealII>
31 typedef FEValuesCache<dim,dim> Scratch;
32 typedef Assembly::CopyData::piDoMUSPreconditioner<dim,dim> CopyPreconditioner;
33 typedef Assembly::CopyData::piDoMUSSystem<dim,dim> CopySystem;
49 return update_default;
53 template<
typename Number>
61 template<
typename Number>
68 this->
reinit(alpha, cell, fe_cache);
70 auto &JxW = fe_cache.get_JxW_values();
74 auto &us = fe_cache.get_values(
"solution",
"u", scalar, alpha);
75 auto &us_dot = fe_cache.get_values(
"solution_dot",
"u_dot", scalar, alpha);
76 auto &grad_us = fe_cache.get_gradients(
"solution",
"gradu", scalar, alpha);
79 for (
unsigned int q=0; q<us.size(); ++q)
81 const Number &u = us[q];
82 const Number &u_dot = us_dot[q];
85 energy += (u_dot*u + 0.5*(grad_u*grad_u))*JxW[q];
Definition: conservative.h:20
UpdateFlags get_preconditioner_flags() const
Definition: heat_equation.h:47
Definition: lac_type.h:33
void system_energy(const typename DoFHandler< dim >::active_cell_iterator &cell, Scratch &fe_cache, CopySystem &data, Number &energy) const
Definition: heat_equation.h:62
HeatEquation()
Definition: heat_equation.h:40
Definition: heat_equation.h:29
void reinit(const Number &alpha, const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, FEValuesCache< dim, spacedim > &fe_cache) const
Definition: old_interface.h:470
double alpha
Definition: old_interface.h:391
void preconditioner_energy(const typename DoFHandler< dim >::active_cell_iterator &, Scratch &, CopyPreconditioner &, Number &) const
Definition: heat_equation.h:54