32 #ifndef OOMPH_FLUX_TRANSPORT_ELEMENTS_HEADER 33 #define OOMPH_FLUX_TRANSPORT_ELEMENTS_HEADER 37 #include <oomph-lib-config.h> 40 #include "../generic/elements.h" 53 template<
unsigned DIM>
60 virtual inline unsigned nflux()
const {
return 0;}
75 std::ostringstream error_stream;
76 error_stream <<
"Default empty flux function called\n" 77 <<
"This should be overloaded with a specific flux function\n" 78 <<
"in a derived class\n";
80 OOMPH_CURRENT_FUNCTION,
81 OOMPH_EXCEPTION_LOCATION);
145 residuals,jacobian,mass_matrix,2);
181 void output(std::ostream &outfile,
const unsigned &nplot);
void output(std::ostream &outfile)
Output the element data — typically the values at the nodes in a format suitable for post-processing...
A general Finite Element class.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Compute the element's residual Vector.
FluxTransportEquations()
Constructor.
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) ...
virtual unsigned nflux() const
Return the number of fluxes (default zero)
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 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...
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
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 ...
double interpolated_u_flux_transport(const Vector< double > &s, const unsigned &i)
Return the i-th unknown at the local coordinate s.
void fill_in_contribution_to_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &mass_matrix)
Assemble the contributions to the mass matrix and residuals.
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 Jacob...
virtual ~FluxTransportEquations()
Empty destructor.
void calculate_element_averages(double *&average_values)
Compute the average values of the fluxes.
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 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...
static DenseMatrix< double > Dummy_matrix
Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case w...
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...