/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/discretization/FEM/assembler/common.hh Source File#
|
DiFfRG
|
common.hh
Go to the documentation of this file.
67 threads(json.get_uint("/discretization/threads")), batch_size(json.get_uint("/discretization/batch_size")),
83 virtual void attach_data_output(DataOutput<dim, VectorType> &data_out, const VectorType &solution,
136 virtual void refinement_indicator(Vector<double> & /*indicator*/, const VectorType & /*solution*/) = 0;
169 EoM_cell, solution_global, dof_handler, mapping, EoMfun, [&](const auto &p, const auto &) { return p; },
174 std::vector<Tensor<1, dim, typename VectorType::value_type>> gradients(dof_handler.get_fe().n_components());
200 void extract(std::array<NumberType, Components::count_extractors()> &data, const VectorType &solution_global,
209 [&](const auto &p, const auto &values) { return postprocess ? model.EoM_postprocess(p, values) : p; },
218 std::vector<Tensor<1, dim, typename VectorType::value_type>> gradients(dof_handler.get_fe().n_components());
237 bool jacobian_extractors(FullMatrix<NumberType> &extractor_jacobian, const VectorType &solution_global,
242 extractor_jacobian_u = FullMatrix<NumberType>(Components::count_extractors(), Components::count_fe_functions());
250 FullMatrix<NumberType>(Components::count_extractors(), Components::count_fe_functions() * dim * dim);
255 [&](const auto &p, const auto &values) { return model.EoM_postprocess(p, values); }, EoM_abs_tol,
262 std::vector<Tensor<1, dim, typename VectorType::value_type>> gradients(dof_handler.get_fe().n_components());
296 if (extractor_jacobian.m() != Components::count_extractors() || extractor_jacobian.n() != n_dofs)
306 extractor_jacobian_du(e, component_i * dim + d1) * fe_v.shape_grad_component(i, 0, component_i)[d1];
308 extractor_jacobian(e, i) += extractor_jacobian_ddu(e, component_i * dim * dim + d1 * dim + d2) *
This is the general assembler interface for any kind of discretization. An assembler is responsible f...
Definition abstract_assembler.hh:39
void jacobian(SparseMatrixType &jacobian, const VectorType &solution_global, NumberType weight, NumberType mass_weight, const VectorType &variables=VectorType())
Definition abstract_assembler.hh:251
void residual(VectorType &residual, const VectorType &solution_global, NumberType weight, NumberType weight_mass, const VectorType &variables=VectorType())
Definition abstract_assembler.hh:177
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 ....
The basic assembler that can be used for any standard CG scheme with flux and source.
Definition common.hh:39
uint num_variable_jacobians() const
Definition common.hh:334
const auto & get_discretization() const
Definition common.hh:105
typename Discretization::NumberType NumberType
Definition common.hh:58
virtual void residual_variables(VectorType &residual, const VectorType &variables, const VectorType &spatial_solution) override
Definition common.hh:138
double average_time_variable_jacobian_assembly()
Definition common.hh:326
uint num_variable_residuals() const
Definition common.hh:324
FullMatrix< NumberType > extractor_jacobian
Definition common.hh:351
virtual void set_time(double t) override
Set the current time. The assembler should usually just forward this to the numerical model.
Definition common.hh:134
double average_time_variable_residual_assembly()
Definition common.hh:316
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
Definition common.hh:200
typename Discretization::Components Components
Definition common.hh:61
bool jacobian_extractors(FullMatrix< NumberType > &extractor_jacobian, const VectorType &solution_global, const VectorType &variables)
Definition common.hh:237
FullMatrix< NumberType > extractor_jacobian_du
Definition common.hh:353
virtual void refinement_indicator(Vector< double > &, const VectorType &)=0
void readouts(DataOutput< dim, VectorType > &data_out, const VectorType &solution_global, const VectorType &variables) const
Definition common.hh:163
virtual void jacobian_variables(FullMatrix< NumberType > &jacobian, const VectorType &variables, const VectorType &spatial_solution) override
Definition common.hh:150
FullMatrix< NumberType > extractor_jacobian_ddu
Definition common.hh:354
std::vector< double > timings_variable_jacobian
Definition common.hh:358
DoFHandler< dim >::cell_iterator old_EoM_cell
Definition common.hh:347
std::vector< double > timings_variable_residual
Definition common.hh:357
virtual void reinit() override
Reinitialize the assembler. This is necessary if the mesh has changed, e.g. after a mesh refinement.
Definition common.hh:108
typename Discretization::VectorType VectorType
Definition common.hh:59
virtual IndexSet get_differential_indices() const override
Obtain the dofs which contain time derivatives.
Definition common.hh:77
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()) override
Definition common.hh:83
std::vector< types::global_dof_index > extractor_dof_indices
Definition common.hh:355
virtual void rebuild_jacobian_sparsity()=0
FullMatrix< NumberType > extractor_jacobian_u
Definition common.hh:352
FEMAssembler(Discretization &discretization, Model &model, const JSONValue &json)
Definition common.hh:64
Definition complex_math.hh:10
dealii::Point< dim > get_EoM_point(typename dealii::DoFHandler< dim >::cell_iterator &EoM_cell, const VectorType &sol, const dealii::DoFHandler< dim > &dof_handler, const dealii::Mapping< dim > &mapping, const EoMFUN &get_EoM, const EoMPFUN &EoM_postprocess=[](const auto &p, const auto &values) { return p;}, const double EoM_abs_tol=1e-5, const uint max_iter=100)
Get the EoM point for a given solution and model.
Definition eom.hh:674
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