22#include "libmesh/linear_implicit_system.h"
52 const std::string &
name,
53 const unsigned int number);
This class encapsulates functionality that allows us to solve conservation laws.
virtual std::string system_type() const override
static TemporalDiscretizationType string_to_enum(std::string string_type)
Convert between string and enum for TemporalDiscretizationType.
void assemble_mass_matrix()
Helper functions called by assemble_all_matrices().
void solve_conservation_law()
Solve the conservation law.
std::vector< std::unique_ptr< SparseMatrix< Number > > > _avg_matrices
The "flux average" element boundary matrices.
void assemble_advection_matrices()
unsigned int get_n_time_steps()
LinearImplicitSystem Parent
The type of the parent.
TemporalDiscretizationType
Define an enumeration for temporal discretization types ForwardEuler = 1st-order Explicit Euler RK4 =...
void set_n_time_steps(unsigned int n_time_steps_in)
Set/get the number of time-steps.
Real _time
The current time in the conservation law solve.
unsigned int get_write_interval()
std::vector< std::unique_ptr< SparseMatrix< Number > > > _advection_matrices
The "advection" matrices.
virtual ~ClawSystem()
Destructor.
std::vector< std::unique_ptr< SparseMatrix< Number > > > _boundary_condition_matrices
The "boundary condition" matrices.
void set_temporal_discretization_type(TemporalDiscretizationType td_in)
Set/get the temporal discretization type.
TemporalDiscretizationType _temporal_discretization_type
String that defines the type of temporal discretization that we use.
void assemble_all_matrices()
Assemble the matrices we need to solve a conservation law.
void set_LxF_constant(Real LxF_constant_in)
Set/get the Lax-Friedrichs constant.
SparseMatrix< Number > & get_jump_matrix()
void set_write_interval(unsigned int write_interval_in)
Set/get write_interval.
std::unique_ptr< SparseMatrix< Number > > _mass_matrix
The mass matrix.
SparseMatrix< Number > & get_advection_matrix(unsigned int dim)
void assemble_boundary_condition_matrices()
void write_out_discretization_matrices()
Print discretization matrices to file in MATLAB-readable format.
void set_time(Real time_in)
Set/get the current time in the conservation law solve.
void assemble_avg_coupling_matrices()
SparseMatrix< Number > & get_boundary_condition_matrix(unsigned int dim)
SparseMatrix< Number > & get_mass_matrix()
Get a reference to one of the discretization matrices.
void assemble_jump_coupling_matrix()
Real _delta_t
The time step size.
static std::string enum_to_string(TemporalDiscretizationType enum_type)
unsigned int _n_time_steps
The number of time steps.
void set_delta_t(Real delta_t_in)
Set/get the time-step size.
SparseMatrix< Number > & get_avg_matrix(unsigned int dim)
virtual void process_parameters_file(const std::string ¶meters_filename)
Set parameters for this system (e.g.
unsigned int _write_interval
The time step interval between writing out solutions.
Real _LxF_constant
The constant C in the Lax-Friedrichs flux.
virtual void assemble_claw_rhs(NumericVector< Number > &)=0
Assemble the right-hand side vector.
virtual void init_data() override
Initialize the system (e.g.
virtual void print_info()
Print out some info about the system's configuration.
std::unique_ptr< SparseMatrix< Number > > _jump_matrix
The "jump" element boundary matrix.
TemporalDiscretizationType get_temporal_discretization_type()
This is the EquationSystems class.
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and linear solvers ...
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
const std::string & name() const
unsigned int number() const
The libMesh namespace provides an interface to certain functionality in the library.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real