28 #ifndef OOMPH_FLUX_TRANSPORT_ELEMENTS_HEADER
29 #define OOMPH_FLUX_TRANSPORT_ELEMENTS_HEADER
33 #include <oomph-lib-config.h>
36 #include "../generic/elements.h"
47 template<
unsigned DIM>
52 virtual inline unsigned nflux()
const
72 std::ostringstream error_stream;
74 <<
"Default empty flux function called\n"
75 <<
"This should be overloaded with a specific flux function\n"
76 <<
"in a derived class\n";
78 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
93 DShape& dtestdx)
const = 0;
102 DShape& dtestdx)
const = 0;
143 residuals, jacobian, mass_matrix, 2);
181 void output(std::ostream& outfile,
const unsigned& nplot);
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
A general Finite Element class.
Base class for the flux transport equations templated by the dimension DIM. The equations that are so...
void fill_in_contribution_to_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &mass_matrix)
Assemble the contributions to the mass matrix and residuals.
virtual double dshape_and_dtest_eulerian_at_knot_flux_transport(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
Shape/test functions and derivs w.r.t. to global coords at integration point ipt; return Jacobian of ...
virtual unsigned u_index_flux_transport(const unsigned &i) const
Return the index at which the i-th unknown value is stored. The default value, i, is appropriate for ...
virtual void fill_in_generic_residual_contribution_flux_transport(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, unsigned flag)
Compute the residuals for the Navier–Stokes equations; flag=1(or 0): do (or don't) compute the Jacobi...
void calculate_element_averages(double *&average_values)
Compute the average values of the fluxes.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Compute the element's residual Vector and the jacobian matrix Virtual function can be overloaded by h...
virtual void dflux_du(const Vector< double > &u, RankThreeTensor< double > &df_du)
Return the flux derivatives as a funciton of the unknowns Default finite-different implementation.
double interpolated_u_flux_transport(const Vector< double > &s, const unsigned &i)
Return the i-th unknown at the local coordinate s.
virtual double dshape_and_dtest_eulerian_flux_transport(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
Shape/test functions and derivs w.r.t. to global coords at local coord. s; return Jacobian of mapping...
FluxTransportEquations()
Constructor.
double du_dt_flux_transport(const unsigned &n, const unsigned &i) const
i-th component of du/dt at local node n. Uses suitably interpolated value for hanging nodes.
virtual void flux(const Vector< double > &u, DenseMatrix< double > &f)
Return the flux as a function of the unknown. This interface could (should) be generalised)
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Compute the element's residual Vector.
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Add the element's contribution to its residuals vector, jacobian matrix and mass matrix.
virtual ~FluxTransportEquations()
Empty destructor.
virtual unsigned nflux() const
Return the number of fluxes (default zero)
void output(std::ostream &outfile)
Output the element data — typically the values at the nodes in a format suitable for post-processing.
static DenseMatrix< double > Dummy_matrix
Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case w...
An OomphLibError object which should be thrown when an run-time error is encountered....
////////////////////////////////////////////////////////////////// //////////////////////////////////...
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...