5#ifndef ONED_TVDLF_ELT_H
6#define ONED_TVDLF_ELT_H
32 bool flag =
false,
int index = 0);
74 if((x < LEFT) || (x > RIGHT)) {
76 problem =
" The OneD_TVDLF_Elt::get_s method has been called for an element \n";
77 problem +=
" whose range does not bracket the given global coordinate.\n";
81 return -1.0 + 2 * (x - LEFT) / (RIGHT - LEFT);
87 double get_x(
double s)
const;
169 std::list< contribution > CONT_LIST;
186 return (LEFT + RIGHT + s *
get_dx()) / 2;
194 return EXTERNAL_FACE_I;
198 return Q + SLOPE * s * (RIGHT - LEFT) / 2;
A matrix class that constructs a DENSE matrix as a row major std::vector of DenseVectors.
An DenseVector class – a dense vector object.
A generic runtime exception.
A class to represent a one dimensional hyperbolic system of equations.
void add_contribution(OneD_TVDLF_Elt *ptr, const DenseVector< double > &s_range, int index)
Allow the connection of this element to another element.
OneD_Hyperbolic_System * system_ptr
double get_x(double s) const
Get the global position of the local coordinate.
void set_slope(const DenseVector< double > value)
The concentration is approximated by a linear function in each element.
void clear_contributions()
Clear the record of contributions to this element.
void set_external_flag(bool flag)
Set the external flag.
DenseVector< double > contributed_Q()
Find the integral contributions to this black/red element from the contributed red/black element.
void set_Q_mid(const DenseVector< double > value)
Set the value of the 'concentration' stored in this element.
void contributed_flux_in_left(const double &dt, DenseVector< double > &flux_in_left, const double ¤t_time)
Compute the flux into this element through the left face over a given time step.
~OneD_TVDLF_Elt()
An empty destructor.
DenseVector< double > get_Q(double s) const
Get the value of the 'concentration' stored in this element.
double get_dx() const
Get the size of the element.
DenseMatrix< double > get_Jac_flux_fn(const double s) const
Get the Jacobian of the flux function evaluated for the concentration value stored in this elt.
int get_external_face_i() const
Get the exterior boundary number.
DenseVector< double > get_source_fn(const double s) const
Get the value of the source function term in this element at a given local coordinate.
DenseVector< double > get_slope() const
The concentration is approximated by a linear function in each element.
double get_s(double x) const
Convert a global coordinate into a local coordinate within this element If the global coordinate is o...
bool get_external_flag() const
Get the external flag.
DenseVector< double > get_flux_fn(const double s) const
Get the flux function evaluated for the concentration value stored in this elt.
void contributed_flux_out_right(const double &dt, DenseVector< double > &flux_out_right, const double ¤t_time)
Compute the flux out of this element through the right face over a given time step.
DenseVector< double > get_int_Q(const double s0, const double s1)
Get the integral of Q over a sub-element.
double get_max_dt() const
Get the maximum allowable time step for this element by using information about the size of the eleme...
void set_external_face_i(int i)
Set the local coordinate of the external face.
A collection of OO numerical routines aimed at simple (typical) applied problems in continuum mechani...