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