/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/discretization/variables/assembler/variables.hh Source File#
|
DiFfRG
|
variables.hh
Go to the documentation of this file.
35 template <typename Model_> class Assembler : public AbstractAssembler<Vector<double>, SparseMatrix<double>, 0>
47 Assembler(Model &model, const JSONValue &json) : model(model), threads(json.get_uint("/discretization/threads"))
58 virtual void attach_data_output(DataOutput<dim, VectorType> &data_out, const VectorType &solution,
77 virtual void residual_variables(VectorType &residual, const VectorType &variables, const VectorType &) override
94 void readouts(DataOutput<dim, VectorType> &data_out, const VectorType &, const VectorType &variables) const
105 virtual void residual(VectorType &, const VectorType &, NumberType, const VectorType &, NumberType,
111 virtual void jacobian_mass(SparseMatrix<NumberType> &, const VectorType &, const VectorType &, NumberType,
116 virtual void jacobian(SparseMatrix<NumberType> &, const VectorType &, NumberType, const VectorType &, NumberType,
126 ss << " Residual: " << average_time_residual_assembly() * 1000 << "ms (" << num_residuals() << ")"
128 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
The basic assembler that can be used for any standard CG scheme with flux and source.
Definition variables.hh:36
virtual void reinit() override
Reinitialize the assembler. This is necessary if the mesh has changed, e.g. after a mesh refinement.
Definition variables.hh:67
virtual void reinit_vector(VectorType &vec) const override
Reinitialize an arbitrary vector so that it has the correct size and structure.
Definition variables.hh:54
virtual void residual_variables(VectorType &residual, const VectorType &variables, const VectorType &) override
When coupling the spatial discretization to additional variables, this function should calculate the ...
Definition variables.hh:77
std::vector< double > timings_jacobian
Definition variables.hh:163
virtual void set_time(double t) override
Set the current time. The assembler should usually just forward this to the numerical model.
Definition variables.hh:69
virtual void residual(VectorType &, const VectorType &, NumberType, const VectorType &, NumberType, const VectorType &variables=VectorType()) override
Definition variables.hh:105
virtual IndexSet get_differential_indices() const override
Obtain the dofs which contain time derivatives.
Definition variables.hh:56
void log(const std::string logger) const
Definition variables.hh:122
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())
Attach any data output to the DataOutput object provided. This can be used to extract additional data...
Definition variables.hh:58
SparsityPattern sparsity_pattern_mass
Definition variables.hh:158
void readouts(DataOutput< dim, VectorType > &data_out, const VectorType &, const VectorType &variables) const
Definition variables.hh:94
virtual void jacobian_mass(SparseMatrix< NumberType > &, const VectorType &, const VectorType &, NumberType, NumberType) override
Definition variables.hh:111
virtual const SparseMatrix< NumberType > & get_mass_matrix() const override
Obtain the mass matrix.
Definition variables.hh:75
typename Model_::Components Components
Definition variables.hh:44
SparsityPattern sparsity_pattern_jacobian
Definition variables.hh:159
double average_time_jacobian_assembly()
Definition variables.hh:143
std::vector< double > timings_residual
Definition variables.hh:162
Assembler(Model &model, const JSONValue &json)
Definition variables.hh:47
SparseMatrix< NumberType > mass_matrix
Definition variables.hh:160
virtual void jacobian(SparseMatrix< NumberType > &, const VectorType &, NumberType, const VectorType &, NumberType, NumberType, const VectorType &variables=VectorType()) override
Definition variables.hh:116
virtual void mass(VectorType &, const VectorType &, const VectorType &, NumberType) override
Definition variables.hh:103
virtual const SparsityPattern & get_sparsity_pattern_jacobian() const override
Obtain the sparsity pattern of the jacobian matrix.
Definition variables.hh:71
double average_time_residual_assembly()
Definition variables.hh:133
virtual void jacobian_variables(FullMatrix< NumberType > &jacobian, const VectorType &variables, const VectorType &) override
Definition variables.hh:85
Definition complex_math.hh:10
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