/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/discretization/FV/assembler/KurganovTadmor.hh Source File#
|
DiFfRG
|
KurganovTadmor.hh
Go to the documentation of this file.
47 ScratchData(const Mapping<dim> &mapping, const FiniteElement<dim> &fe, const Quadrature<dim> &quadrature,
178 mapping(discretization.get_mapping()), triangulation(discretization.get_triangulation()), json(json),
199 virtual void attach_data_output(DataOutput<dim, VectorType> &data_out, const VectorType &solution,
229 mass_matrix = SparseMatrix<NumberType>(sparsity_pattern_mass, IdentityMatrix(dof_handler.n_dofs()));
243 virtual const SparseMatrix<NumberType> &get_mass_matrix() const override { return mass_matrix; }
245 virtual void residual_variables(VectorType &residual, const VectorType &variables, const VectorType &) override
256 void readouts(DataOutput<dim, VectorType> &data_out, const VectorType &, const VectorType &variables) const
265 virtual void mass(VectorType &mass, const VectorType &solution_global, const VectorType &solution_global_dot,
273 const auto cell_worker = [&](const Iterator &cell, Scratch &scratch_data, CopyData ©_data) {
309 MeshWorker::mesh_loop(dof_handler.begin_active(), dof_handler.end(), cell_worker, copier, scratch_data,
313 virtual void residual(VectorType &residual, const VectorType &solution_global, NumberType weight,
322 const auto cell_worker = [&](const Iterator &cell, Scratch &scratch_data, CopyData ©_data) {
365 MeshWorker::mesh_loop(dof_handler.begin_active(), dof_handler.end(), cell_worker, copier, scratch_data,
370 virtual void jacobian_mass(SparseMatrix<NumberType> &jacobian, const VectorType &solution_global,
379 const auto cell_worker = [&](const Iterator &cell, Scratch &scratch_data, CopyData ©_data) {
422 MeshWorker::mesh_loop(dof_handler.begin_active(), dof_handler.end(), cell_worker, copier, scratch_data,
427 virtual void jacobian(SparseMatrix<NumberType> &jacobian, const VectorType &solution_global, NumberType weight,
436 const auto cell_worker = [&](const Iterator &cell, Scratch &scratch_data, CopyData ©_data) {
486 MeshWorker::mesh_loop(dof_handler.begin_active(), dof_handler.end(), cell_worker, copier, scratch_data,
555 ss << " Reinit: " << average_time_reinit() * 1000 << "ms (" << num_reinits() << ")" << std::endl;
556 ss << " Residual: " << average_time_residual_assembly() * 1000 << "ms (" << num_residuals() << ")"
558 ss << " Jacobian: " << average_time_jacobian_assembly() * 1000 << "ms (" << num_jacobians() << ")"
This is the general assembler interface for any kind of discretization. An assembler is responsible f...
Definition abstract_assembler.hh:39
Class to manage writing to files. FEM functions are written to vtk files and other data is written to...
Definition data_output.hh:20
FEOutput< dim, VectorType > & fe_output()
Returns a reference to the FEOutput object used to write FEM functions to .vtu files and ....
Vector< NumberType > VectorType
Definition discretization.hh:35
Definition KurganovTadmor.hh:147
Assembler(Discretization &discretization, Model &model, const JSONValue &json)
Definition KurganovTadmor.hh:176
double average_time_jacobian_assembly() const
Definition KurganovTadmor.hh:583
uint num_residuals() const
Definition KurganovTadmor.hh:581
Triangulation< dim >::cell_iterator old_EoM_cell
Definition KurganovTadmor.hh:606
virtual void reinit() override
Reinitialize the assembler. This is necessary if the mesh has changed, e.g. after a mesh refinement.
Definition KurganovTadmor.hh:219
const DoFHandler< dim > & dof_handler
Definition KurganovTadmor.hh:596
virtual void set_time(double t) override
Set the current time. The assembler should usually just forward this to the numerical model.
Definition KurganovTadmor.hh:237
const QGauss< dim > quadrature
Definition KurganovTadmor.hh:610
const Mapping< dim > & mapping
Definition KurganovTadmor.hh:597
virtual void mass(VectorType &mass, const VectorType &solution_global, const VectorType &solution_global_dot, NumberType weight) override
Definition KurganovTadmor.hh:265
virtual void jacobian(SparseMatrix< NumberType > &jacobian, const VectorType &solution_global, NumberType weight, const VectorType &solution_global_dot, NumberType alpha, NumberType beta, const VectorType &variables=VectorType()) override
Definition KurganovTadmor.hh:427
const uint EoM_max_iter
Definition KurganovTadmor.hh:608
typename Discretization::VectorType VectorType
Definition KurganovTadmor.hh:170
double average_time_residual_assembly() const
Definition KurganovTadmor.hh:573
SparsityPattern sparsity_pattern_jacobian
Definition KurganovTadmor.hh:613
SparsityPattern sparsity_pattern_mass
Definition KurganovTadmor.hh:612
static constexpr auto e_tie(T &&...t)
Definition KurganovTadmor.hh:159
virtual void jacobian_mass(SparseMatrix< NumberType > &jacobian, const VectorType &solution_global, const VectorType &solution_global_dot, NumberType alpha=1., NumberType beta=1.) override
Definition KurganovTadmor.hh:370
static constexpr auto v_tie(T &&...t)
Definition KurganovTadmor.hh:154
const uint batch_size
Definition KurganovTadmor.hh:603
double average_time_reinit() const
Definition KurganovTadmor.hh:563
static constexpr uint n_components
Definition KurganovTadmor.hh:174
uint num_reinits() const
Definition KurganovTadmor.hh:571
uint num_jacobians() const
Definition KurganovTadmor.hh:591
typename Discretization::NumberType NumberType
Definition KurganovTadmor.hh:169
virtual void attach_data_output(DataOutput< dim, VectorType > &data_out, const VectorType &solution, const VectorType &variables, const VectorType &dt_solution=VectorType(), const VectorType &residual=VectorType())
Definition KurganovTadmor.hh:199
Triangulation< dim >::cell_iterator EoM_cell
Definition KurganovTadmor.hh:605
SparseMatrix< NumberType > mass_matrix
Definition KurganovTadmor.hh:614
virtual const SparseMatrix< NumberType > & get_mass_matrix() const override
Obtain the mass matrix.
Definition KurganovTadmor.hh:243
std::vector< double > timings_jacobian
Definition KurganovTadmor.hh:618
virtual void residual(VectorType &residual, const VectorType &solution_global, NumberType weight, const VectorType &solution_global_dot, NumberType weight_mass, const VectorType &variables=VectorType()) override
Definition KurganovTadmor.hh:313
Discretization & discretization
Definition KurganovTadmor.hh:594
void log(const std::string logger)
Definition KurganovTadmor.hh:551
typename Discretization::Components Components
Definition KurganovTadmor.hh:172
virtual IndexSet get_differential_indices() const override
Obtain the dofs which contain time derivatives.
Definition KurganovTadmor.hh:197
virtual void reinit_vector(VectorType &vec) const override
Definition KurganovTadmor.hh:191
const double EoM_abs_tol
Definition KurganovTadmor.hh:607
virtual const SparsityPattern & get_sparsity_pattern_jacobian() const override
Obtain the sparsity pattern of the jacobian matrix.
Definition KurganovTadmor.hh:239
std::vector< double > timings_residual
Definition KurganovTadmor.hh:617
virtual void residual_variables(VectorType &residual, const VectorType &variables, const VectorType &) override
Definition KurganovTadmor.hh:245
void build_sparsity(SparsityPattern &sparsity_pattern, const DoFHandler< dim > &to_dofh, const DoFHandler< dim > &from_dofh, const int stencil=1, bool add_extractor_dofs=false) const
Definition KurganovTadmor.hh:491
Discretization_ Discretization
Definition KurganovTadmor.hh:167
std::vector< double > timings_reinit
Definition KurganovTadmor.hh:616
virtual void jacobian_variables(FullMatrix< NumberType > &jacobian, const VectorType &variables, const VectorType &) override
Definition KurganovTadmor.hh:250
const Triangulation< dim > & triangulation
Definition KurganovTadmor.hh:598
void readouts(DataOutput< dim, VectorType > &data_out, const VectorType &, const VectorType &variables) const
Definition KurganovTadmor.hh:256
Definition quadrature.hh:56
size_t size() const
A simple NxM-matrix class, which is used for cell-wise Jacobians.
Definition tuples.hh:156
Definition types.hh:6
Definition complex_math.hh:10
Definition KurganovTadmor.hh:133
std::array< double, 2 > values
Definition KurganovTadmor.hh:135
std::array< uint, 2 > cell_indices
Definition KurganovTadmor.hh:134
Definition KurganovTadmor.hh:132
std::vector< CopyFaceData_I > face_data
Definition KurganovTadmor.hh:137
uint cell_index
Definition KurganovTadmor.hh:139
Definition KurganovTadmor.hh:102
FullMatrix< NumberType > cell_jacobian
Definition KurganovTadmor.hh:103
void reinit(const FEInterfaceValues< dim > &fe_iv, uint n_extractors)
Definition KurganovTadmor.hh:107
std::vector< types::global_dof_index > joint_dof_indices
Definition KurganovTadmor.hh:105
FullMatrix< NumberType > extractor_cell_jacobian
Definition KurganovTadmor.hh:104
Definition KurganovTadmor.hh:101
FullMatrix< NumberType > extractor_cell_jacobian
Definition KurganovTadmor.hh:117
std::vector< CopyDataFace_J > face_data
Definition KurganovTadmor.hh:120
FullMatrix< NumberType > cell_jacobian
Definition KurganovTadmor.hh:116
FullMatrix< NumberType > cell_mass_jacobian
Definition KurganovTadmor.hh:118
std::vector< types::global_dof_index > local_dof_indices
Definition KurganovTadmor.hh:119
void reinit(const Iterator &cell, uint dofs_per_cell, uint n_extractors)
Definition KurganovTadmor.hh:122
Definition KurganovTadmor.hh:75
Vector< NumberType > cell_residual
Definition KurganovTadmor.hh:76
std::vector< types::global_dof_index > joint_dof_indices
Definition KurganovTadmor.hh:77
void reinit(const FEInterfaceValues< dim > &fe_iv)
Definition KurganovTadmor.hh:79
Definition KurganovTadmor.hh:74
void reinit(const Iterator &cell, uint dofs_per_cell)
Definition KurganovTadmor.hh:91
Vector< NumberType > cell_mass
Definition KurganovTadmor.hh:87
std::vector< CopyDataFace_R > face_data
Definition KurganovTadmor.hh:89
std::vector< types::global_dof_index > local_dof_indices
Definition KurganovTadmor.hh:88
Vector< NumberType > cell_residual
Definition KurganovTadmor.hh:86
Class to hold data for each assembly thread, i.e. FEValues for cells, interfaces, as well as pre-allo...
Definition KurganovTadmor.hh:42
typename Discretization::NumberType NumberType
Definition KurganovTadmor.hh:44
Vector< NumberType > VectorType
Definition KurganovTadmor.hh:45
const uint n_components
Definition KurganovTadmor.hh:65
std::vector< VectorType > solution
Definition KurganovTadmor.hh:69
std::vector< VectorType > solution_dot
Definition KurganovTadmor.hh:70
ScratchData(const ScratchData< Discretization > &scratch_data)
Definition KurganovTadmor.hh:56
ScratchData(const Mapping< dim > &mapping, const FiniteElement< dim > &fe, const Quadrature< dim > &quadrature, const UpdateFlags update_flags=update_values|update_gradients|update_quadrature_points|update_JxW_values)
Definition KurganovTadmor.hh:47
FEValues< dim > fe_values
Definition KurganovTadmor.hh:67
static constexpr int dim
Definition KurganovTadmor.hh:43
Definition tuples.hh:34
A class to store a tuple with elements that can be accessed by name. The names are stored as FixedStr...
Definition tuples.hh:56
Generated by