oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM > Class Template Referenceabstract

#include <discontinuous_galerkin_space_time_unsteady_heat_mixed_order_elements.h>

+ Inheritance diagram for oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >:

Public Member Functions

 SpaceTimeUnsteadyHeatMixedOrderEquations ()
 
 SpaceTimeUnsteadyHeatMixedOrderEquations (const SpaceTimeUnsteadyHeatMixedOrderEquations &dummy)=delete
 Broken copy constructor. More...
 
void disable_ALE ()
 
void enable_ALE ()
 
void compute_norm (double &norm)
 Compute norm of FE solution. More...
 
void output (std::ostream &outfile)
 Output with default number of plot points. More...
 
void output (std::ostream &outfile, const unsigned &nplot)
 
void output (FILE *file_pt)
 C_style output with default number of plot points. More...
 
void output (FILE *file_pt, const unsigned &nplot)
 
void output_fct (std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
 
virtual void output_fct (std::ostream &outfile, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
 
void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 Get error and norm against exact solution. More...
 
void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 Get error and norm against exact solution. More...
 
void output_element_paraview (std::ofstream &outfile, const unsigned &nplot)
 
unsigned nscalar_paraview () const
 
void scalar_value_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
 
void scalar_value_fct_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt) const
 
void scalar_value_fct_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt) const
 
std::string scalar_name_paraview (const unsigned &i) const
 
SpaceTimeUnsteadyHeatSourceFctPtsource_fct_pt ()
 Access function: Pointer to source function. More...
 
SpaceTimeUnsteadyHeatSourceFctPt source_fct_pt () const
 Access function: Pointer to source function. Const version. More...
 
virtual void get_source_ust_heat (const double &t, const unsigned &ipt, const Vector< double > &x, double &source) const
 
const doublealpha () const
 Alpha parameter (thermal inertia) More...
 
double *& alpha_pt ()
 Pointer to Alpha parameter (thermal inertia) More...
 
const doublebeta () const
 Beta parameter (thermal conductivity) More...
 
double *& beta_pt ()
 Pointer to Beta parameter (thermal conductivity) More...
 
void get_flux (const Vector< double > &s, Vector< double > &flux) const
 Get flux: flux[i]=du/dx_i. More...
 
void fill_in_contribution_to_residuals (Vector< double > &residuals)
 Compute element residual Vector (wrapper) More...
 
void fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 Compute element residual Vector and element Jacobian matrix (wrapper) More...
 
double interpolated_u_ust_heat (const Vector< double > &s) const
 Return FE representation of function value u(s) at local coordinate s. More...
 
virtual unsigned u_index_ust_heat () const
 
double interpolated_u_ust_heat (const unsigned &t, const Vector< double > &s) const
 
double du_dt_ust_heat (const unsigned &n) const
 
double interpolated_du_dt_ust_heat (const Vector< double > &s) const
 
unsigned self_test ()
 Self-test: Return 0 for OK. More...
 
virtual double dshape_and_dtest_eulerian_ust_heat (const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
 
virtual double dshape_and_dtest_eulerian_at_knot_ust_heat (const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
 
- Public Member Functions inherited from oomph::FiniteElement
void set_dimension (const unsigned &dim)
 
void set_nodal_dimension (const unsigned &nodal_dim)
 
void set_nnodal_position_type (const unsigned &nposition_type)
 Set the number of types required to interpolate the coordinate. More...
 
void set_n_node (const unsigned &n)
 
int nodal_local_eqn (const unsigned &n, const unsigned &i) const
 
double dJ_eulerian_at_knot (const unsigned &ipt, Shape &psi, DenseMatrix< double > &djacobian_dX) const
 
 FiniteElement ()
 Constructor. More...
 
virtual ~FiniteElement ()
 
 FiniteElement (const FiniteElement &)=delete
 Broken copy constructor. More...
 
virtual bool local_coord_is_valid (const Vector< double > &s)
 Broken assignment operator. More...
 
virtual void move_local_coord_back_into_element (Vector< double > &s) const
 
void get_centre_of_gravity_and_max_radius_in_terms_of_zeta (Vector< double > &cog, double &max_radius) const
 
virtual void local_coordinate_of_node (const unsigned &j, Vector< double > &s) const
 
virtual void local_fraction_of_node (const unsigned &j, Vector< double > &s_fraction)
 
virtual double local_one_d_fraction_of_node (const unsigned &n1d, const unsigned &i)
 
virtual void set_macro_elem_pt (MacroElement *macro_elem_pt)
 
MacroElementmacro_elem_pt ()
 Access function to pointer to macro element. More...
 
void get_x (const Vector< double > &s, Vector< double > &x) const
 
void get_x (const unsigned &t, const Vector< double > &s, Vector< double > &x)
 
virtual void get_x_from_macro_element (const Vector< double > &s, Vector< double > &x) const
 
virtual void get_x_from_macro_element (const unsigned &t, const Vector< double > &s, Vector< double > &x)
 
virtual void set_integration_scheme (Integral *const &integral_pt)
 Set the spatial integration scheme. More...
 
Integral *const & integral_pt () const
 Return the pointer to the integration scheme (const version) More...
 
virtual void shape (const Vector< double > &s, Shape &psi) const =0
 
virtual void shape_at_knot (const unsigned &ipt, Shape &psi) const
 
virtual void dshape_local (const Vector< double > &s, Shape &psi, DShape &dpsids) const
 
virtual void dshape_local_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsids) const
 
virtual void d2shape_local (const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
 
virtual void d2shape_local_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsids, DShape &d2psids) const
 
virtual double J_eulerian (const Vector< double > &s) const
 
virtual double J_eulerian_at_knot (const unsigned &ipt) const
 
void check_J_eulerian_at_knots (bool &passed) const
 
void check_jacobian (const double &jacobian) const
 
double dshape_eulerian (const Vector< double > &s, Shape &psi, DShape &dpsidx) const
 
virtual double dshape_eulerian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsidx) const
 
virtual double dshape_eulerian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsi, DenseMatrix< double > &djacobian_dX, RankFourTensor< double > &d_dpsidx_dX) const
 
double d2shape_eulerian (const Vector< double > &s, Shape &psi, DShape &dpsidx, DShape &d2psidx) const
 
virtual double d2shape_eulerian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsidx, DShape &d2psidx) const
 
virtual void assign_nodal_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void describe_local_dofs (std::ostream &out, const std::string &current_string) const
 
virtual void describe_nodal_local_dofs (std::ostream &out, const std::string &current_string) const
 
virtual void assign_all_generic_local_eqn_numbers (const bool &store_local_dof_pt)
 
Node *& node_pt (const unsigned &n)
 Return a pointer to the local node n. More...
 
Node *const & node_pt (const unsigned &n) const
 Return a pointer to the local node n (const version) More...
 
unsigned nnode () const
 Return the number of nodes. More...
 
virtual unsigned nnode_1d () const
 
double raw_nodal_position (const unsigned &n, const unsigned &i) const
 
double raw_nodal_position (const unsigned &t, const unsigned &n, const unsigned &i) const
 
double raw_dnodal_position_dt (const unsigned &n, const unsigned &i) const
 
double raw_dnodal_position_dt (const unsigned &n, const unsigned &j, const unsigned &i) const
 
double raw_nodal_position_gen (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double raw_nodal_position_gen (const unsigned &t, const unsigned &n, const unsigned &k, const unsigned &i) const
 
double raw_dnodal_position_gen_dt (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double raw_dnodal_position_gen_dt (const unsigned &j, const unsigned &n, const unsigned &k, const unsigned &i) const
 
double nodal_position (const unsigned &n, const unsigned &i) const
 
double nodal_position (const unsigned &t, const unsigned &n, const unsigned &i) const
 
double dnodal_position_dt (const unsigned &n, const unsigned &i) const
 Return the i-th component of nodal velocity: dx/dt at local node n. More...
 
double dnodal_position_dt (const unsigned &n, const unsigned &j, const unsigned &i) const
 
double nodal_position_gen (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double nodal_position_gen (const unsigned &t, const unsigned &n, const unsigned &k, const unsigned &i) const
 
double dnodal_position_gen_dt (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double dnodal_position_gen_dt (const unsigned &j, const unsigned &n, const unsigned &k, const unsigned &i) const
 
virtual void get_dresidual_dnodal_coordinates (RankThreeTensor< double > &dresidual_dnodal_coordinates)
 
virtual unsigned required_nvalue (const unsigned &n) const
 
unsigned nnodal_position_type () const
 
bool has_hanging_nodes () const
 
unsigned nodal_dimension () const
 Return the required Eulerian dimension of the nodes in this element. More...
 
virtual unsigned nvertex_node () const
 
virtual Nodevertex_node_pt (const unsigned &j) const
 
virtual Nodeconstruct_node (const unsigned &n)
 
virtual Nodeconstruct_node (const unsigned &n, TimeStepper *const &time_stepper_pt)
 
virtual Nodeconstruct_boundary_node (const unsigned &n)
 
virtual Nodeconstruct_boundary_node (const unsigned &n, TimeStepper *const &time_stepper_pt)
 
int get_node_number (Node *const &node_pt) const
 
virtual Nodeget_node_at_local_coordinate (const Vector< double > &s) const
 
double raw_nodal_value (const unsigned &n, const unsigned &i) const
 
double raw_nodal_value (const unsigned &t, const unsigned &n, const unsigned &i) const
 
double nodal_value (const unsigned &n, const unsigned &i) const
 
double nodal_value (const unsigned &t, const unsigned &n, const unsigned &i) const
 
unsigned dim () const
 
virtual ElementGeometry::ElementGeometry element_geometry () const
 Return the geometry type of the element (either Q or T usually). More...
 
virtual double interpolated_x (const Vector< double > &s, const unsigned &i) const
 Return FE interpolated coordinate x[i] at local coordinate s. More...
 
virtual double interpolated_x (const unsigned &t, const Vector< double > &s, const unsigned &i) const
 
virtual void interpolated_x (const Vector< double > &s, Vector< double > &x) const
 Return FE interpolated position x[] at local coordinate s as Vector. More...
 
virtual void interpolated_x (const unsigned &t, const Vector< double > &s, Vector< double > &x) const
 
virtual double interpolated_dxdt (const Vector< double > &s, const unsigned &i, const unsigned &t)
 
virtual void interpolated_dxdt (const Vector< double > &s, const unsigned &t, Vector< double > &dxdt)
 
unsigned ngeom_data () const
 
Datageom_data_pt (const unsigned &j)
 
void position (const Vector< double > &zeta, Vector< double > &r) const
 
void position (const unsigned &t, const Vector< double > &zeta, Vector< double > &r) const
 
void dposition_dt (const Vector< double > &zeta, const unsigned &t, Vector< double > &drdt)
 
virtual double zeta_nodal (const unsigned &n, const unsigned &k, const unsigned &i) const
 
void interpolated_zeta (const Vector< double > &s, Vector< double > &zeta) const
 
void locate_zeta (const Vector< double > &zeta, GeomObject *&geom_object_pt, Vector< double > &s, const bool &use_coordinate_as_initial_guess=false)
 
virtual void node_update ()
 
virtual void identify_field_data_for_interactions (std::set< std::pair< Data *, unsigned >> &paired_field_data)
 
virtual void identify_geometric_data (std::set< Data * > &geometric_data_pt)
 
virtual double s_min () const
 Min value of local coordinate. More...
 
virtual double s_max () const
 Max. value of local coordinate. More...
 
double size () const
 
virtual double compute_physical_size () const
 
virtual void point_output_data (const Vector< double > &s, Vector< double > &data)
 
void point_output (std::ostream &outfile, const Vector< double > &s)
 
virtual unsigned nplot_points_paraview (const unsigned &nplot) const
 
virtual unsigned nsub_elements_paraview (const unsigned &nplot) const
 
void output_paraview (std::ofstream &file_out, const unsigned &nplot) const
 
virtual void write_paraview_output_offset_information (std::ofstream &file_out, const unsigned &nplot, unsigned &counter) const
 
virtual void write_paraview_type (std::ofstream &file_out, const unsigned &nplot) const
 
virtual void write_paraview_offsets (std::ofstream &file_out, const unsigned &nplot, unsigned &offset_sum) const
 
virtual void output (const unsigned &t, std::ostream &outfile, const unsigned &n_plot) const
 
virtual void output_fct (std::ostream &outfile, const unsigned &n_plot, const double &time, const SolutionFunctorBase &exact_soln) const
 Output a time-dependent exact solution over the element. More...
 
virtual void get_s_plot (const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
 
virtual std::string tecplot_zone_string (const unsigned &nplot) const
 
virtual void write_tecplot_zone_footer (std::ostream &outfile, const unsigned &nplot) const
 
virtual void write_tecplot_zone_footer (FILE *file_pt, const unsigned &nplot) const
 
virtual unsigned nplot_points (const unsigned &nplot) const
 
virtual void compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 Calculate the norm of the error and that of the exact solution. More...
 
virtual void compute_error (FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 Calculate the norm of the error and that of the exact solution. More...
 
virtual void compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_abs_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error)
 
void integrate_fct (FiniteElement::SteadyExactSolutionFctPt integrand_fct_pt, Vector< double > &integral)
 Integrate Vector-valued function over element. More...
 
void integrate_fct (FiniteElement::UnsteadyExactSolutionFctPt integrand_fct_pt, const double &time, Vector< double > &integral)
 Integrate Vector-valued time-dep function over element. More...
 
virtual void build_face_element (const int &face_index, FaceElement *face_element_pt)
 
virtual unsigned get_bulk_node_number (const int &face_index, const unsigned &i) const
 
virtual int face_outer_unit_normal_sign (const int &face_index) const
 Get the sign of the outer unit normal on the face given by face_index. More...
 
virtual unsigned nnode_on_face () const
 
void face_node_number_error_check (const unsigned &i) const
 Range check for face node numbers. More...
 
virtual CoordinateMappingFctPt face_to_bulk_coordinate_fct_pt (const int &face_index) const
 
virtual BulkCoordinateDerivativesFctPt bulk_coordinate_derivatives_fct_pt (const int &face_index) const
 
- Public Member Functions inherited from oomph::GeneralisedElement
 GeneralisedElement ()
 Constructor: Initialise all pointers and all values to zero. More...
 
virtual ~GeneralisedElement ()
 Virtual destructor to clean up any memory allocated by the object. More...
 
 GeneralisedElement (const GeneralisedElement &)=delete
 Broken copy constructor. More...
 
void operator= (const GeneralisedElement &)=delete
 Broken assignment operator. More...
 
Data *& internal_data_pt (const unsigned &i)
 Return a pointer to i-th internal data object. More...
 
Data *const & internal_data_pt (const unsigned &i) const
 Return a pointer to i-th internal data object (const version) More...
 
Data *& external_data_pt (const unsigned &i)
 Return a pointer to i-th external data object. More...
 
Data *const & external_data_pt (const unsigned &i) const
 Return a pointer to i-th external data object (const version) More...
 
unsigned long eqn_number (const unsigned &ieqn_local) const
 
int local_eqn_number (const unsigned long &ieqn_global) const
 
unsigned add_external_data (Data *const &data_pt, const bool &fd=true)
 
bool external_data_fd (const unsigned &i) const
 
void exclude_external_data_fd (const unsigned &i)
 
void include_external_data_fd (const unsigned &i)
 
void flush_external_data ()
 Flush all external data. More...
 
void flush_external_data (Data *const &data_pt)
 Flush the object addressed by data_pt from the external data array. More...
 
unsigned ninternal_data () const
 Return the number of internal data objects. More...
 
unsigned nexternal_data () const
 Return the number of external data objects. More...
 
unsigned ndof () const
 Return the number of equations/dofs in the element. More...
 
void dof_vector (const unsigned &t, Vector< double > &dof)
 Return the vector of dof values at time level t. More...
 
void dof_pt_vector (Vector< double * > &dof_pt)
 Return the vector of pointers to dof values. More...
 
void set_internal_data_time_stepper (const unsigned &i, TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 
void assign_internal_eqn_numbers (unsigned long &global_number, Vector< double * > &Dof_pt)
 
void describe_dofs (std::ostream &out, const std::string &current_string) const
 
void add_internal_value_pt_to_map (std::map< unsigned, double * > &map_of_value_pt)
 
virtual void assign_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void complete_setup_of_dependencies ()
 
virtual void get_residuals (Vector< double > &residuals)
 
virtual void get_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
virtual void get_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &mass_matrix)
 
virtual void get_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
 
virtual void get_dresiduals_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam)
 
virtual void get_djacobian_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
 
virtual void get_djacobian_and_dmass_matrix_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
 
virtual void get_hessian_vector_products (Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
 
virtual void get_inner_products (Vector< std::pair< unsigned, unsigned >> const &history_index, Vector< double > &inner_product)
 
virtual void get_inner_product_vectors (Vector< unsigned > const &history_index, Vector< Vector< double >> &inner_product_vector)
 
virtual void compute_norm (Vector< double > &norm)
 
virtual unsigned ndof_types () const
 
virtual void get_dof_numbers_for_unknowns (std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
 
- Public Member Functions inherited from oomph::GeomObject
 GeomObject ()
 Default constructor. More...
 
 GeomObject (const unsigned &ndim)
 
 GeomObject (const unsigned &nlagrangian, const unsigned &ndim)
 
 GeomObject (const unsigned &nlagrangian, const unsigned &ndim, TimeStepper *time_stepper_pt)
 
 GeomObject (const GeomObject &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const GeomObject &)=delete
 Broken assignment operator. More...
 
virtual ~GeomObject ()
 (Empty) destructor More...
 
unsigned nlagrangian () const
 Access function to # of Lagrangian coordinates. More...
 
unsigned ndim () const
 Access function to # of Eulerian coordinates. More...
 
void set_nlagrangian_and_ndim (const unsigned &n_lagrangian, const unsigned &n_dim)
 Set # of Lagrangian and Eulerian coordinates. More...
 
TimeStepper *& time_stepper_pt ()
 
TimeSteppertime_stepper_pt () const
 
virtual void position (const double &t, const Vector< double > &zeta, Vector< double > &r) const
 
virtual void dposition (const Vector< double > &zeta, DenseMatrix< double > &drdzeta) const
 
virtual void d2position (const Vector< double > &zeta, RankThreeTensor< double > &ddrdzeta) const
 
virtual void d2position (const Vector< double > &zeta, Vector< double > &r, DenseMatrix< double > &drdzeta, RankThreeTensor< double > &ddrdzeta) const
 

Protected Member Functions

virtual void shape_ust_heat (const Vector< double > &s, Shape &psi) const =0
 Shape functions w.r.t. to local coords. More...
 
virtual void dshape_local_ust_heat (const Vector< double > &s, Shape &psi, DShape &dpsidx) const =0
 Shape functions & derivs. w.r.t. to local coords. More...
 
virtual void dtest_local_ust_heat (const Vector< double > &s, Shape &test, DShape &dtestdx) const =0
 Test functions & derivs. w.r.t. to local coords. More...
 
virtual void fill_in_generic_residual_contribution_ust_heat (Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
 
- Protected Member Functions inherited from oomph::FiniteElement
virtual void assemble_local_to_eulerian_jacobian (const DShape &dpsids, DenseMatrix< double > &jacobian) const
 
virtual void assemble_local_to_eulerian_jacobian2 (const DShape &d2psids, DenseMatrix< double > &jacobian2) const
 
virtual void assemble_eulerian_base_vectors (const DShape &dpsids, DenseMatrix< double > &interpolated_G) const
 
template<unsigned DIM>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual double invert_jacobian_mapping (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual double local_to_eulerian_mapping (const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
double local_to_eulerian_mapping (const DShape &dpsids, DenseMatrix< double > &inverse_jacobian) const
 
virtual double local_to_eulerian_mapping_diagonal (const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual void dJ_eulerian_dnodal_coordinates (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<unsigned DIM>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
virtual void d_dshape_eulerian_dnodal_coordinates (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<unsigned DIM>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
virtual void transform_derivatives (const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
 
void transform_derivatives_diagonal (const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
 
virtual void transform_second_derivatives (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<unsigned DIM>
void transform_second_derivatives_template (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<unsigned DIM>
void transform_second_derivatives_diagonal (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
virtual void fill_in_jacobian_from_nodal_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
void fill_in_jacobian_from_nodal_by_fd (DenseMatrix< double > &jacobian)
 
virtual void update_before_nodal_fd ()
 
virtual void reset_after_nodal_fd ()
 
virtual void update_in_nodal_fd (const unsigned &i)
 
virtual void reset_in_nodal_fd (const unsigned &i)
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 Zero-d specialisation of function to calculate inverse of jacobian mapping. More...
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 One-d specialisation of function to calculate inverse of jacobian mapping. More...
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 Two-d specialisation of function to calculate inverse of jacobian mapping. More...
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void transform_second_derivatives_template (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<>
void transform_second_derivatives_template (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<>
void transform_second_derivatives_diagonal (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<>
void transform_second_derivatives_diagonal (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
- Protected Member Functions inherited from oomph::GeneralisedElement
unsigned add_internal_data (Data *const &data_pt, const bool &fd=true)
 
bool internal_data_fd (const unsigned &i) const
 
void exclude_internal_data_fd (const unsigned &i)
 
void include_internal_data_fd (const unsigned &i)
 
void clear_global_eqn_numbers ()
 
void add_global_eqn_numbers (std::deque< unsigned long > const &global_eqn_numbers, std::deque< double * > const &global_dof_pt)
 
virtual void assign_internal_and_external_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void assign_additional_local_eqn_numbers ()
 
int internal_local_eqn (const unsigned &i, const unsigned &j) const
 
int external_local_eqn (const unsigned &i, const unsigned &j)
 
void fill_in_jacobian_from_internal_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_internal_by_fd (DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_external_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_external_by_fd (DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
virtual void update_before_internal_fd ()
 
virtual void reset_after_internal_fd ()
 
virtual void update_in_internal_fd (const unsigned &i)
 
virtual void reset_in_internal_fd (const unsigned &i)
 
virtual void update_before_external_fd ()
 
virtual void reset_after_external_fd ()
 
virtual void update_in_external_fd (const unsigned &i)
 
virtual void reset_in_external_fd (const unsigned &i)
 
virtual void fill_in_contribution_to_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &mass_matrix)
 
virtual void fill_in_contribution_to_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
 
virtual void fill_in_contribution_to_dresiduals_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam)
 
virtual void fill_in_contribution_to_djacobian_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
 
virtual void fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
 
virtual void fill_in_contribution_to_hessian_vector_products (Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
 
virtual void fill_in_contribution_to_inner_products (Vector< std::pair< unsigned, unsigned >> const &history_index, Vector< double > &inner_product)
 
virtual void fill_in_contribution_to_inner_product_vectors (Vector< unsigned > const &history_index, Vector< Vector< double >> &inner_product_vector)
 

Protected Attributes

SpaceTimeUnsteadyHeatSourceFctPt Source_fct_pt
 Pointer to source function: More...
 
bool ALE_is_disabled
 
doubleAlpha_pt
 Pointer to Alpha parameter (thermal inertia) More...
 
doubleBeta_pt
 Pointer to Beta parameter (thermal conductivity) More...
 
- Protected Attributes inherited from oomph::FiniteElement
MacroElementMacro_elem_pt
 Pointer to the element's macro element (NULL by default) More...
 
- Protected Attributes inherited from oomph::GeomObject
unsigned NLagrangian
 Number of Lagrangian (intrinsic) coordinates. More...
 
unsigned Ndim
 Number of Eulerian coordinates. More...
 
TimeStepperGeom_object_time_stepper_pt
 

Static Private Attributes

static double Default_alpha_parameter = 1.0
 Default value for Alpha parameter (thermal inertia) More...
 
static double Default_beta_parameter = 1.0
 Default value for Beta parameter (thermal conductivity) More...
 

Additional Inherited Members

- Public Types inherited from oomph::SpaceTimeUnsteadyHeatEquationsBase
typedef void(* SpaceTimeUnsteadyHeatSourceFctPt) (const double &time, const Vector< double > &x, double &u)
 
typedef void(* SpaceTimeUnsteadyHeatSourceFctPt) (const double &time, const Vector< double > &x, double &u)
 
typedef void(* SpaceTimeUnsteadyHeatSourceFctPt) (const double &time, const Vector< double > &x, double &u)
 
- Public Types inherited from oomph::FiniteElement
typedef void(* SteadyExactSolutionFctPt) (const Vector< double > &, Vector< double > &)
 
typedef void(* UnsteadyExactSolutionFctPt) (const double &, const Vector< double > &, Vector< double > &)
 
- Static Public Attributes inherited from oomph::FiniteElement
static double Tolerance_for_singular_jacobian = 1.0e-16
 Tolerance below which the jacobian is considered singular. More...
 
static bool Accept_negative_jacobian = false
 
static bool Suppress_output_while_checking_for_inverted_elements
 
- Static Public Attributes inherited from oomph::GeneralisedElement
static bool Suppress_warning_about_repeated_internal_data
 
static bool Suppress_warning_about_repeated_external_data = true
 
static double Default_fd_jacobian_step = 1.0e-8
 
- Static Protected Attributes inherited from oomph::FiniteElement
static const unsigned Default_Initial_Nvalue = 0
 Default value for the number of values at a node. More...
 
static const double Node_location_tolerance = 1.0e-14
 
static const unsigned N2deriv [] = {0, 1, 3, 6}
 
- Static Protected Attributes inherited from oomph::GeneralisedElement
static DenseMatrix< doubleDummy_matrix
 
static std::deque< double * > Dof_pt_deque
 

Detailed Description

template<unsigned SPATIAL_DIM>
class oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >

A class for all isoparametric elements that solve the SpaceTimeUnsteadyHeatMixedOrder equations.

\[ \frac{\partial^2 u}{\partial x_i^2}=\frac{\partial u}{\partial t}+f(t,x_j) \]

This contains the generic maths. Shape functions, geometric mapping etc. must get implemented in derived class. Note that this class assumes an isoparametric formulation, i.e. that the scalar unknown is interpolated using the same shape funcitons as the position.

Constructor & Destructor Documentation

◆ SpaceTimeUnsteadyHeatMixedOrderEquations() [1/2]

template<unsigned SPATIAL_DIM>
oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::SpaceTimeUnsteadyHeatMixedOrderEquations ( )
inline

Constructor: Initialises the Source_fct_pt to null and sets flag to use ALE formulation of the equations. Also, set Alpha (thermal inertia) and Beta (thermal conductivity) parameters to defaults (both one for natural scaling).

83  : Source_fct_pt(0), ALE_is_disabled(false)
84  {
85  // Set Alpha parameter to default (one for natural scaling)
87 
88  // Set Beta parameter to default (one for natural scaling)
90  } // End of SpaceTimeUnsteadyHeatMixedOrderEquations
SpaceTimeUnsteadyHeatSourceFctPt Source_fct_pt
Pointer to source function:
Definition: discontinuous_galerkin_space_time_unsteady_heat_mixed_order_elements.h:703
static double Default_alpha_parameter
Default value for Alpha parameter (thermal inertia)
Definition: discontinuous_galerkin_space_time_unsteady_heat_mixed_order_elements.h:719
bool ALE_is_disabled
Definition: discontinuous_galerkin_space_time_unsteady_heat_mixed_order_elements.h:708
static double Default_beta_parameter
Default value for Beta parameter (thermal conductivity)
Definition: discontinuous_galerkin_space_time_unsteady_heat_mixed_order_elements.h:723
double * Beta_pt
Pointer to Beta parameter (thermal conductivity)
Definition: discontinuous_galerkin_space_time_unsteady_heat_mixed_order_elements.h:714
double * Alpha_pt
Pointer to Alpha parameter (thermal inertia)
Definition: discontinuous_galerkin_space_time_unsteady_heat_mixed_order_elements.h:711

References oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::Alpha_pt, oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::Beta_pt, oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::Default_alpha_parameter, and oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::Default_beta_parameter.

◆ SpaceTimeUnsteadyHeatMixedOrderEquations() [2/2]

template<unsigned SPATIAL_DIM>
oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::SpaceTimeUnsteadyHeatMixedOrderEquations ( const SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM > &  dummy)
delete

Broken copy constructor.

Member Function Documentation

◆ alpha()

template<unsigned SPATIAL_DIM>
const double& oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::alpha ( ) const
inline

Alpha parameter (thermal inertia)

411  {
412  // Return the value of Alpha
413  return *Alpha_pt;
414  } // End of alpha

References oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::Alpha_pt.

◆ alpha_pt()

template<unsigned SPATIAL_DIM>
double*& oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::alpha_pt ( )
inline

Pointer to Alpha parameter (thermal inertia)

419  {
420  // Return the pointer to Alpha
421  return Alpha_pt;
422  } // End of alpha_pt

References oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::Alpha_pt.

◆ beta()

template<unsigned SPATIAL_DIM>
const double& oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::beta ( ) const
inline

Beta parameter (thermal conductivity)

427  {
428  // Return the pointer to Beta
429  return *Beta_pt;
430  } // End of beta

References oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::Beta_pt.

◆ beta_pt()

template<unsigned SPATIAL_DIM>
double*& oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::beta_pt ( )
inline

Pointer to Beta parameter (thermal conductivity)

435  {
436  // Return the pointer to Beta
437  return Beta_pt;
438  } // End of beta_pt

References oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::Beta_pt.

◆ compute_error() [1/2]

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::compute_error ( std::ostream &  outfile,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt,
double error,
double norm 
)
virtual

Get error and norm against exact solution.

Validate against exact solution

Solution is provided via function pointer. Plot error at a given number of plot points.

Reimplemented from oomph::FiniteElement.

530  {
531  // Initialise error value
532  error = 0.0;
533 
534  // Initialise norm value
535  norm = 0.0;
536 
537  // Vector of local coordinates
538  Vector<double> s(SPATIAL_DIM + 1, 0.0);
539 
540  // Vector for spatial coordinates
541  Vector<double> spatial_coordinates(SPATIAL_DIM, 0.0);
542 
543  // Set the value of n_intpt
544  unsigned n_intpt = integral_pt()->nweight();
545 
546  // Tecplot header info
547  outfile << "ZONE" << std::endl;
548 
549  // Exact solution vector (here it's simply a scalar)
550  Vector<double> exact_soln(1, 0.0);
551 
552  // Loop over the integration points
553  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
554  {
555  // Assign values of s
556  for (unsigned i = 0; i < SPATIAL_DIM + 1; i++)
557  {
558  // Get the i-th local coordinate at the ipt-th integration point
559  s[i] = integral_pt()->knot(ipt, i);
560  }
561 
562  // Get the integral weight
563  double w = integral_pt()->weight(ipt);
564 
565  // Get jacobian of mapping
566  double J = J_eulerian(s);
567 
568  // Premultiply the weights and the Jacobian
569  double W = w * J;
570 
571  // Get FE function value
572  double u_fe = interpolated_u_ust_heat(s);
573 
574  // Loop over the spatial coordinates
575  for (unsigned i = 0; i < SPATIAL_DIM; i++)
576  {
577  // Assign the i-th spatial coordinate
578  spatial_coordinates[i] = interpolated_x(s, i);
579 
580  // Output the i-th coordinate at the point
581  outfile << spatial_coordinates[i] << " ";
582  }
583 
584  // Output the i-th coordinate at this point
585  outfile << interpolated_x(s, SPATIAL_DIM) << " ";
586 
587  // Get exact solution at this point
588  (*exact_soln_pt)(spatial_coordinates, exact_soln);
589 
590  // Output the error
591  outfile << exact_soln[0] << " " << exact_soln[0] - u_fe << std::endl;
592 
593  // Add to (exact) solution norm value
594  norm += exact_soln[0] * exact_soln[0] * W;
595 
596  // Update the error norm value
597  error += (exact_soln[0] - u_fe) * (exact_soln[0] - u_fe) * W;
598  } // for (unsigned ipt=0;ipt<n_intpt;ipt++)
599  } // End of compute_error
int i
Definition: BiCGSTAB_step_by_step.cpp:9
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
RowVector3d w
Definition: Matrix_resize_int.cpp:3
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
Definition: elements.cc:3962
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition: elements.h:1963
virtual double J_eulerian(const Vector< double > &s) const
Definition: elements.cc:4103
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
double interpolated_u_ust_heat(const Vector< double > &s) const
Return FE representation of function value u(s) at local coordinate s.
Definition: discontinuous_galerkin_space_time_unsteady_heat_mixed_order_elements.h:514
RealScalar s
Definition: level1_cplx_impl.h:130
void exact_soln(const double &time, const Vector< double > &x, Vector< double > &soln)
Definition: unstructured_two_d_curved.cc:301
int error
Definition: calibrate.py:297
@ W
Definition: quadtree.h:63

References calibrate::error, ProblemParameters::exact_soln(), i, J, s, w, and oomph::QuadTreeNames::W.

◆ compute_error() [2/2]

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::compute_error ( std::ostream &  outfile,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt,
const double time,
double error,
double norm 
)
virtual

Get error and norm against exact solution.

Validate against exact solution at time t.

Solution is provided via function pointer. Plot error at a given number of plot points.

Reimplemented from oomph::FiniteElement.

615  {
616  // Initialise error value
617  error = 0.0;
618 
619  // Initialise norm value
620  norm = 0.0;
621 
622  // Storage for the time value
623  double interpolated_t = 0.0;
624 
625  // Vector of local coordinates
626  Vector<double> s(SPATIAL_DIM + 1, 0.0);
627 
628  // Vector for spatial coordinates
629  Vector<double> spatial_coordinates(SPATIAL_DIM, 0.0);
630 
631  // Set the value of n_intpt
632  unsigned n_int_pt = integral_pt()->nweight();
633 
634  // Exact solution vector (here it's simply a scalar)
635  Vector<double> exact_soln(1, 0.0);
636 
637  // Loop over the integration points
638  for (unsigned ipt = 0; ipt < n_int_pt; ipt++)
639  {
640  // Assign values of s
641  for (unsigned i = 0; i < SPATIAL_DIM + 1; i++)
642  {
643  s[i] = integral_pt()->knot(ipt, i);
644  }
645 
646  // Get the integral weight
647  double w = integral_pt()->weight(ipt);
648 
649  // Get jacobian of mapping
650  double J = J_eulerian(s);
651 
652  // Premultiply the weights and the Jacobian
653  double W = w * J;
654 
655  // Get FE function value
656  double u_fe = interpolated_u_ust_heat(s);
657 
658  // Loop over the spatial coordinates
659  for (unsigned i = 0; i < SPATIAL_DIM; i++)
660  {
661  // Assign the i-th spatial coordinate
662  spatial_coordinates[i] = interpolated_x(s, i);
663  }
664 
665  // Get the time value
666  interpolated_t = interpolated_x(s, SPATIAL_DIM);
667 
668  // Get the exact solution at this point
669  (*exact_soln_pt)(interpolated_t, spatial_coordinates, exact_soln);
670 
671  // Add to (exact) solution norm value
672  norm += exact_soln[0] * exact_soln[0] * W;
673 
674  // Update the error norm value
675  error += (exact_soln[0] - u_fe) * (exact_soln[0] - u_fe) * W;
676  } // for (unsigned ipt=0;ipt<n_intpt;ipt++)
677 
678  // The number of plot points
679  unsigned n_plot = 3;
680 
681  // Tecplot header info
682  outfile << tecplot_zone_string(n_plot);
683 
684  // Get the number of plot points
685  unsigned num_plot_points = nplot_points(n_plot);
686 
687  // Loop over plot points
688  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
689  {
690  // Get local coordinates of plot point
691  get_s_plot(iplot, n_plot, s);
692 
693  // Loop over the spatial coordinates
694  for (unsigned i = 0; i < SPATIAL_DIM; i++)
695  {
696  // Assign the i-th spatial coordinate
697  spatial_coordinates[i] = interpolated_x(s, i);
698 
699  // Output the i-th coordinate at the point
700  outfile << spatial_coordinates[i] << " ";
701  }
702 
703  // Get the time value
704  interpolated_t = interpolated_x(s, SPATIAL_DIM);
705 
706  // Get FE function value
707  double u_fe = interpolated_u_ust_heat(s);
708 
709  // Output the time value at this point
710  outfile << interpolated_t << " ";
711 
712  // Get the exact solution at this point
713  (*exact_soln_pt)(interpolated_t, spatial_coordinates, exact_soln);
714 
715  // Output the exact solution at this point
716  outfile << exact_soln[0] - u_fe << std::endl;
717  } // for (unsigned iplot=0;iplot<num_plot_points;iplot++)
718 
719  // Write tecplot footer (e.g. FE connectivity lists)
720  write_tecplot_zone_footer(outfile, n_plot);
721  } // End of compute_error
virtual std::string tecplot_zone_string(const unsigned &nplot) const
Definition: elements.h:3161
virtual void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
Definition: elements.h:3148
virtual unsigned nplot_points(const unsigned &nplot) const
Definition: elements.h:3186
virtual void write_tecplot_zone_footer(std::ostream &outfile, const unsigned &nplot) const
Definition: elements.h:3174

References calibrate::error, ProblemParameters::exact_soln(), i, J, s, w, and oomph::QuadTreeNames::W.

◆ compute_norm()

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::compute_norm ( double norm)
virtual

Compute norm of FE solution.

Reimplemented from oomph::GeneralisedElement.

245  {
246  // Initialise
247  norm = 0.0;
248 
249  // Vector of local coordinates
250  Vector<double> s(SPATIAL_DIM + 1, 0.0);
251 
252  // Vector for coordinates
253  Vector<double> x(SPATIAL_DIM + 1, 0.0);
254 
255  // Set the value of n_intpt
256  unsigned n_intpt = integral_pt()->nweight();
257 
258  // Loop over the integration points
259  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
260  {
261  // Assign values of s
262  for (unsigned i = 0; i < SPATIAL_DIM + 1; i++)
263  {
264  // Get the i-th local coordinate at the ipt-th integration point
265  s[i] = integral_pt()->knot(ipt, i);
266  }
267 
268  // Get the integral weight
269  double w = integral_pt()->weight(ipt);
270 
271  // Get Jacobian of mapping
272  double J = J_eulerian(s);
273 
274  // Pre-multiply the weights and the Jacobian
275  double W = w * J;
276 
277  // Get FE function value
278  double u = interpolated_u_ust_heat(s);
279 
280  // Update the norm value
281  norm += u * u * W;
282  } // for (unsigned ipt=0;ipt<n_intpt;ipt++)
283  } // End of compute_norm
list x
Definition: plotDoE.py:28

References i, J, s, w, oomph::QuadTreeNames::W, and plotDoE::x.

◆ disable_ALE()

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::disable_ALE ( )
inlinevirtual

Disable ALE, i.e. assert the mesh is not moving – you do this at your own risk!

Reimplemented from oomph::FiniteElement.

100  {
101  // Set the flag to true
102  ALE_is_disabled = true;
103  } // End of disable_ALE

References oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::ALE_is_disabled.

◆ dshape_and_dtest_eulerian_at_knot_ust_heat()

template<unsigned SPATIAL_DIM>
virtual double oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::dshape_and_dtest_eulerian_at_knot_ust_heat ( const unsigned ipt,
Shape psi,
DShape dpsidx,
Shape test,
DShape dtestdx 
) const
pure virtual

Shape/test functions and derivs w.r.t. to global coords at integration point ipt; return Jacobian of mapping

Implemented in oomph::QUnsteadyHeatMixedOrderSpaceTimeElement< SPATIAL_DIM, NNODE_1D >.

◆ dshape_and_dtest_eulerian_ust_heat()

template<unsigned SPATIAL_DIM>
virtual double oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::dshape_and_dtest_eulerian_ust_heat ( const Vector< double > &  s,
Shape psi,
DShape dpsidx,
Shape test,
DShape dtestdx 
) const
pure virtual

Shape/test functions and derivs w.r.t. to global coords at local coordinate s; return Jacobian of mapping

Implemented in oomph::QUnsteadyHeatMixedOrderSpaceTimeElement< SPATIAL_DIM, NNODE_1D >.

◆ dshape_local_ust_heat()

template<unsigned SPATIAL_DIM>
virtual void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::dshape_local_ust_heat ( const Vector< double > &  s,
Shape psi,
DShape dpsidx 
) const
protectedpure virtual

◆ dtest_local_ust_heat()

template<unsigned SPATIAL_DIM>
virtual void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::dtest_local_ust_heat ( const Vector< double > &  s,
Shape test,
DShape dtestdx 
) const
protectedpure virtual

Test functions & derivs. w.r.t. to local coords.

Implemented in oomph::QUnsteadyHeatMixedOrderSpaceTimeElement< SPATIAL_DIM, NNODE_1D >.

◆ du_dt_ust_heat()

template<unsigned SPATIAL_DIM>
double oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::du_dt_ust_heat ( const unsigned n) const
inline

Calculate du/dt at the n-th local node. Uses suitably interpolated value for hanging nodes.

594  {
595  // Storage for the local coordinates
596  Vector<double> s(SPATIAL_DIM + 1, 0.0);
597 
598  // Get the local coordinate at the n-th node
600 
601  // Return the interpolated du/dt value
603  } // End of du_dt_ust_heat
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
virtual void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Definition: elements.h:1842
double interpolated_du_dt_ust_heat(const Vector< double > &s) const
Definition: discontinuous_galerkin_space_time_unsteady_heat_mixed_order_elements.h:608

References oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::interpolated_du_dt_ust_heat(), oomph::FiniteElement::local_coordinate_of_node(), n, and s.

◆ enable_ALE()

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::enable_ALE ( )
inlinevirtual

(Re-)enable ALE, i.e. take possible mesh motion into account when evaluating the time-derivative. Note: By default, ALE is enabled, at the expense of possibly creating unnecessary work in problems where the mesh is, in fact, stationary.

Reimplemented from oomph::FiniteElement.

111  {
112  // Set the flag to false
113  ALE_is_disabled = false;
114  } // End of enable_ALE

References oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::ALE_is_disabled.

◆ fill_in_contribution_to_jacobian()

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::fill_in_contribution_to_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inlinevirtual

Compute element residual Vector and element Jacobian matrix (wrapper)

Reimplemented from oomph::FiniteElement.

507  {
508  // Call the generic routine with the flag set to 1
509  fill_in_generic_residual_contribution_ust_heat(residuals, jacobian, 1);
510  } // End of fill_in_contribution_to_jacobian
virtual void fill_in_generic_residual_contribution_ust_heat(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Definition: discontinuous_galerkin_space_time_unsteady_heat_mixed_order_elements.cc:66

References oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::fill_in_generic_residual_contribution_ust_heat().

◆ fill_in_contribution_to_residuals()

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::fill_in_contribution_to_residuals ( Vector< double > &  residuals)
inlinevirtual

Compute element residual Vector (wrapper)

Reimplemented from oomph::GeneralisedElement.

496  {
497  // Call the generic residuals function with flag set to 0
498  // using a dummy matrix argument
500  residuals, GeneralisedElement::Dummy_matrix, 0);
501  } // End of fill_in_contribution_to_residuals
static DenseMatrix< double > Dummy_matrix
Definition: elements.h:227

References oomph::GeneralisedElement::Dummy_matrix, and oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::fill_in_generic_residual_contribution_ust_heat().

◆ fill_in_generic_residual_contribution_ust_heat()

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::fill_in_generic_residual_contribution_ust_heat ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
const unsigned flag 
)
protectedvirtual

Compute element residual Vector only (if flag=and/or element Jacobian matrix

Compute element residual vector and/or element Jacobian matrix

flag=0: compute only residual vector flag=1: compute both

Pure version without hanging nodes

Reimplemented in oomph::RefineableSpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >.

70  {
71  // Find out how many nodes there are
72  unsigned n_node = nnode();
73 
74  // Find the index at which the variable is stored
75  unsigned u_nodal_index = u_index_ust_heat();
76 
77  // Set up memory for the shape functions
78  Shape psi(n_node);
79 
80  // Set up memory for the test functions
81  Shape test(n_node);
82 
83  // Allocate space for the derivatives of the shape functions
84  DShape dpsidx(n_node, SPATIAL_DIM + 1);
85 
86  // Allocate space for the derivatives of the test functions
87  DShape dtestdx(n_node, SPATIAL_DIM + 1);
88 
89  // Set the value of n_intpt
90  unsigned n_intpt = integral_pt()->nweight();
91 
92  // Storage for the local coordinates
93  Vector<double> s(SPATIAL_DIM + 1, 0.0);
94 
95  // Get the Alpha parameter
96  double alpha_local = alpha();
97 
98  // Get the Beta parameter
99  double beta_local = beta();
100 
101  // Integer to hold the local equation
102  int local_eqn = 0;
103 
104  // Integer to hold the local unknowns
105  int local_unknown = 0;
106 
107  // Loop over the integration points
108  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
109  {
110  // Assign values of s
111  for (unsigned i = 0; i < SPATIAL_DIM + 1; i++)
112  {
113  // Calculate the i-th local coordinate
114  s[i] = integral_pt()->knot(ipt, i);
115  }
116 
117  // Get the integral weight
118  double w = integral_pt()->weight(ipt);
119 
120  // Call the derivatives of the shape and test functions
122  ipt, psi, dpsidx, test, dtestdx);
123 
124  // Premultiply the weights and the Jacobian
125  double W = w * J;
126 
127  // Storage for the interpolated time value
128  double interpolated_t = 0.0;
129 
130  // Storage for the interpolated solution value
131  double interpolated_u = 0.0;
132 
133  // Storage for the interpolated time-derivative of the solution
134  double interpolated_dudt = 0.0;
135 
136  // Storage for the spatial coordinates
137  Vector<double> interpolated_x(SPATIAL_DIM, 0.0);
138 
139  // Storage for the spatial derivatives of the solution
140  Vector<double> interpolated_dudx(SPATIAL_DIM, 0.0);
141 
142  // Storage for the mesh velocity
143  Vector<double> mesh_velocity(SPATIAL_DIM, 0.0);
144 
145  //-------------------------------------------------
146  // Calculate derivatives and source function value:
147  //-------------------------------------------------
148  // Loop over the nodes
149  for (unsigned l = 0; l < n_node; l++)
150  {
151  // Get the nodal value at the l-th node
152  double u_value = raw_nodal_value(l, u_nodal_index);
153 
154  // Update the interpolated time value
155  interpolated_t += raw_nodal_position(l, SPATIAL_DIM) * psi(l);
156 
157  // Loop over the coordinate directions (both spatial AND time)
158  for (unsigned j = 0; j < SPATIAL_DIM; j++)
159  {
160  // Update the interpolated x value
161  interpolated_x[j] += raw_nodal_position(l, j) * psi(l);
162 
163  // Update the interpolated du/dx_j value
164  interpolated_dudx[j] += u_value * dpsidx(l, j);
165  }
166 
167  // Update the interpolated u value
168  interpolated_u += u_value * psi(l);
169 
170  // Update the interpolated du/dt value
171  interpolated_dudt += u_value * dpsidx(l, SPATIAL_DIM);
172  } // for (unsigned l=0;l<n_node;l++)
173 
174  // Initialise the source term value
175  double source = 0.0;
176 
177  // Get the interpolated source term value
178  get_source_ust_heat(interpolated_t, ipt, interpolated_x, source);
179 
180  //---------------------------------
181  // Assemble residuals and Jacobian:
182  //---------------------------------
183  // Loop over the nodes (or equivalently the test functions)
184  for (unsigned l = 0; l < n_node; l++)
185  {
186  // Get the local equation number
187  local_eqn = nodal_local_eqn(l, u_nodal_index);
188 
189  // If it's not a boundary condition
190  if (local_eqn >= 0)
191  {
192  // Add source term and time derivative
193  residuals[local_eqn] +=
194  (source + alpha_local * interpolated_dudt) * test(l) * W;
195 
196  // Loop over the coordinate directions
197  for (unsigned k = 0; k < SPATIAL_DIM; k++)
198  {
199  // Add in the contribution from the Laplace operator
200  residuals[local_eqn] +=
201  beta_local * interpolated_dudx[k] * dtestdx(l, k) * W;
202  }
203 
204  //------------------------
205  // Calculate the Jacobian:
206  //------------------------
207  // If we also need to construct the Jacobian
208  if (flag)
209  {
210  // Loop over the velocity shape functions again
211  for (unsigned l2 = 0; l2 < n_node; l2++)
212  {
213  // Get the local equation number
214  local_unknown = nodal_local_eqn(l2, u_nodal_index);
215 
216  // If we're at a non-zero degree of freedom add in the entry
217  if (local_unknown >= 0)
218  {
219  // Add in the time derivative contribution
220  jacobian(local_eqn, local_unknown) +=
221  (alpha_local * test(l) * dpsidx(l2, SPATIAL_DIM) * W);
222 
223  // Laplace operator
224  for (unsigned i = 0; i < SPATIAL_DIM; i++)
225  {
226  // Add the test function contribution to the Jacobian
227  jacobian(local_eqn, local_unknown) +=
228  (beta_local * dpsidx(l2, i) * dtestdx(l, i) * W);
229  }
230  } // if (local_unknown>=0)
231  } // for (unsigned l2=0;l2<n_node;l2++)
232  } // if (flag)
233  } // if (local_eqn>=0)
234  } // for (unsigned l=0;l<n_node;l++)
235  } // for (unsigned ipt=0;ipt<n_intpt;ipt++)
236  } // End of fill_in_generic_residual_contribution_ust_heat
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Definition: elements.h:1432
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
double raw_nodal_value(const unsigned &n, const unsigned &i) const
Definition: elements.h:2576
double raw_nodal_position(const unsigned &n, const unsigned &i) const
Definition: elements.cc:1686
virtual double dshape_and_dtest_eulerian_at_knot_ust_heat(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
const double & beta() const
Beta parameter (thermal conductivity)
Definition: discontinuous_galerkin_space_time_unsteady_heat_mixed_order_elements.h:426
virtual unsigned u_index_ust_heat() const
Definition: discontinuous_galerkin_space_time_unsteady_heat_mixed_order_elements.h:550
const double & alpha() const
Alpha parameter (thermal inertia)
Definition: discontinuous_galerkin_space_time_unsteady_heat_mixed_order_elements.h:410
virtual void get_source_ust_heat(const double &t, const unsigned &ipt, const Vector< double > &x, double &source) const
Definition: discontinuous_galerkin_space_time_unsteady_heat_mixed_order_elements.h:389
char char char int int * k
Definition: level2_impl.h:374
squared absolute sa ArrayBase::abs2 DOXCOMMA MatrixBase::cwiseAbs2 sa Eigen::abs2 DOXCOMMA Eigen::pow DOXCOMMA ArrayBase::square nearest sa Eigen::floor DOXCOMMA Eigen::ceil DOXCOMMA ArrayBase::round nearest integer not less than the given sa Eigen::floor DOXCOMMA ArrayBase::ceil not a number test
Definition: GlobalFunctions.h:109
void source(const Vector< double > &x, Vector< double > &f)
Source function.
Definition: unstructured_two_d_circle.cc:46
Definition: indexed_view.cpp:20
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References alpha, beta, i, J, j, k, s, TestProblem::source(), Eigen::test, w, and oomph::QuadTreeNames::W.

Referenced by oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::fill_in_contribution_to_jacobian(), and oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::fill_in_contribution_to_residuals().

◆ get_flux()

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::get_flux ( const Vector< double > &  s,
Vector< double > &  flux 
) const
inline

Get flux: flux[i]=du/dx_i.

443  {
444  // Find out how many nodes there are in the element
445  unsigned n_node = nnode();
446 
447  // Find the index at which the variable is stored
448  unsigned u_nodal_index = u_index_ust_heat();
449 
450  // Set up memory for the shape and test functions
451  Shape psi(n_node);
452 
453  // Set up memory for the derivatives of the shape functions
454  DShape dpsidx(n_node, SPATIAL_DIM + 1);
455 
456  //------------dshape_eulerian(s,psi,dpsidx)----------------------------
457  // Find the element dimension
458  const unsigned el_dim = this->dim();
459 
460  // Get the values of the shape functions and their local derivatives;
461  // temporarily stored in dpsi
462  dshape_local_ust_heat(s, psi, dpsidx);
463 
464  // Allocate memory for the inverse jacobian
465  DenseMatrix<double> inverse_jacobian(el_dim);
466 
467  // Now calculate the inverse jacobian
468  local_to_eulerian_mapping(dpsidx, inverse_jacobian);
469 
470  // Now set the values of the derivatives to be dpsidx
471  transform_derivatives(inverse_jacobian, dpsidx);
472  //------------dshape_eulerian(s,psi,dpsidx)----------------------------
473 
474  // Loop over the entries of the flux vector
475  for (unsigned j = 0; j < SPATIAL_DIM; j++)
476  {
477  // Initialise j-th flux entry to zero
478  flux[j] = 0.0;
479  }
480 
481  // Loop over nodes
482  for (unsigned l = 0; l < n_node; l++)
483  {
484  // Loop over derivative directions
485  for (unsigned j = 0; j < SPATIAL_DIM; j++)
486  {
487  // Update the flux value
488  flux[j] += nodal_value(l, u_nodal_index) * dpsidx(l, j);
489  }
490  } // for (unsigned l=0;l<n_node;l++)
491  } // End of get_flux
double nodal_value(const unsigned &n, const unsigned &i) const
Definition: elements.h:2593
unsigned dim() const
Definition: elements.h:2611
virtual double local_to_eulerian_mapping(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Definition: elements.h:1508
virtual void transform_derivatives(const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
Definition: elements.cc:2833
virtual void dshape_local_ust_heat(const Vector< double > &s, Shape &psi, DShape &dpsidx) const =0
Shape functions & derivs. w.r.t. to local coords.
void flux(const double &time, const Vector< double > &x, double &flux)
Get flux applied along boundary x=0.
Definition: pretend_melt.cc:59
unsigned el_dim
dimension
Definition: overloaded_cartesian_element_body.h:30

References oomph::FiniteElement::dim(), oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::dshape_local_ust_heat(), el_dim, ProblemParameters::flux(), j, oomph::FiniteElement::local_to_eulerian_mapping(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), oomph::FiniteElement::transform_derivatives(), and oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::u_index_ust_heat().

◆ get_source_ust_heat()

template<unsigned SPATIAL_DIM>
virtual void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::get_source_ust_heat ( const double t,
const unsigned ipt,
const Vector< double > &  x,
double source 
) const
inlinevirtual

Get source term at continous time t and (Eulerian) position x. Virtual so it can be overloaded in derived multi-physics elements.

393  {
394  // If no source function has been set, return zero
395  if (Source_fct_pt == 0)
396  {
397  // Set the source term value to zero
398  source = 0.0;
399  }
400  // Otherwise return the appropriate value
401  else
402  {
403  // Get source strength
404  (*Source_fct_pt)(t, x, source);
405  }
406  } // End of get_source_ust_heat
t
Definition: plotPSD.py:36

References TestProblem::source(), oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::Source_fct_pt, plotPSD::t, and plotDoE::x.

◆ interpolated_du_dt_ust_heat()

template<unsigned SPATIAL_DIM>
double oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::interpolated_du_dt_ust_heat ( const Vector< double > &  s) const
inline

Return FE representation of function value du/dt(s) at local coordinate s

609  {
610  // Find number of nodes
611  unsigned n_node = nnode();
612 
613  // Find the index at which the variable is stored
614  unsigned u_nodal_index = u_index_ust_heat();
615 
616  // Local shape function
617  Shape psi(n_node);
618 
619  // Allocate space for the derivatives of the shape functions
620  DShape dpsidx(n_node, SPATIAL_DIM + 1);
621 
622  //------------dshape_eulerian(s,psi,dpsidx)----------------------------
623  // Find the element dimension
624  const unsigned el_dim = this->dim();
625 
626  // Get the values of the shape functions and their local derivatives;
627  // temporarily stored in dpsi
628  dshape_local_ust_heat(s, psi, dpsidx);
629 
630  // Allocate memory for the inverse jacobian
631  DenseMatrix<double> inverse_jacobian(el_dim);
632 
633  // Now calculate the inverse jacobian
634  local_to_eulerian_mapping(dpsidx, inverse_jacobian);
635 
636  // Now set the values of the derivatives to be dpsidx
637  transform_derivatives(inverse_jacobian, dpsidx);
638  //------------dshape_eulerian(s,psi,dpsidx)----------------------------
639 
640  // Initialise value of du/dt
641  double interpolated_dudt = 0.0;
642 
643  // Loop over the local nodes and sum
644  for (unsigned l = 0; l < n_node; l++)
645  {
646  // Update the interpolated du/dt value
647  interpolated_dudt +=
648  nodal_value(l, u_nodal_index) * dpsidx(l, SPATIAL_DIM);
649  }
650 
651  // Return the interpolated du/dt value
652  return interpolated_dudt;
653  } // End of interpolated_du_dt_ust_heat

References oomph::FiniteElement::dim(), oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::dshape_local_ust_heat(), el_dim, oomph::FiniteElement::local_to_eulerian_mapping(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), oomph::FiniteElement::transform_derivatives(), and oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::u_index_ust_heat().

Referenced by oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::du_dt_ust_heat().

◆ interpolated_u_ust_heat() [1/2]

template<unsigned SPATIAL_DIM>
double oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::interpolated_u_ust_heat ( const unsigned t,
const Vector< double > &  s 
) const
inline

Return FE representation of function value u(s) at local coordinate s at previous time t (t=0: present) DRAIG: This needs to be broken; doesn't make sense in space-time elements!

563  {
564  // Find number of nodes
565  unsigned n_node = nnode();
566 
567  // Find the index at which the variable is stored
568  unsigned u_nodal_index = u_index_ust_heat();
569 
570  // Local shape function
571  Shape psi(n_node);
572 
573  // Find values of shape function
574  shape_ust_heat(s, psi);
575 
576  // Initialise value of u
577  double interpolated_u = 0.0;
578 
579  // Loop over the local nodes and sum
580  for (unsigned l = 0; l < n_node; l++)
581  {
582  // Update the interpolated u value
583  interpolated_u += nodal_value(t, l, u_nodal_index) * psi[l];
584  }
585 
586  // Return the interpolated u value
587  return interpolated_u;
588  } // End of interpolated_u_ust_heat
virtual void shape_ust_heat(const Vector< double > &s, Shape &psi) const =0
Shape functions w.r.t. to local coords.

References oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), s, oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::shape_ust_heat(), plotPSD::t, and oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::u_index_ust_heat().

◆ interpolated_u_ust_heat() [2/2]

template<unsigned SPATIAL_DIM>
double oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::interpolated_u_ust_heat ( const Vector< double > &  s) const
inline

Return FE representation of function value u(s) at local coordinate s.

515  {
516  // Find number of nodes
517  unsigned n_node = nnode();
518 
519  // Find the index at which the variable is stored
520  unsigned u_nodal_index = u_index_ust_heat();
521 
522  // Local shape function
523  Shape psi(n_node);
524 
525  // Find values of the shape functions at local coordinate s
526  shape_ust_heat(s, psi);
527 
528  // Initialise value of u
529  double interpolated_u = 0.0;
530 
531  // Loop over the local nodes and sum
532  for (unsigned l = 0; l < n_node; l++)
533  {
534  // Update the interpolated u value
535  interpolated_u += nodal_value(l, u_nodal_index) * psi[l];
536  }
537 
538  // Return the interpolated u value
539  return interpolated_u;
540  } // End of interpolated_u_ust_heat

References oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), s, oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::shape_ust_heat(), and oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::u_index_ust_heat().

Referenced by oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::scalar_value_paraview().

◆ nscalar_paraview()

template<unsigned SPATIAL_DIM>
unsigned oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::nscalar_paraview ( ) const
inlinevirtual

Number of scalars/fields output by this element. Reimplements broken virtual function in base class.

Reimplemented from oomph::FiniteElement.

192  {
193  // Only one field to output
194  return 1;
195  } // End of nscalar_paraview

◆ output() [1/4]

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::output ( FILE *  file_pt)
inlinevirtual

C_style output with default number of plot points.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QUnsteadyHeatMixedOrderSpaceTimeElement< SPATIAL_DIM, NNODE_1D >.

139  {
140  // Number of plot points
141  unsigned nplot = 5;
142 
143  // Output the solution
144  output(file_pt, nplot);
145  } // End of output
void output(std::ostream &outfile)
Output with default number of plot points.
Definition: discontinuous_galerkin_space_time_unsteady_heat_mixed_order_elements.h:122

References oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::output().

◆ output() [2/4]

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::output ( FILE *  file_pt,
const unsigned nplot 
)
virtual

C-style output FE representation of soln: x,y,u or x,y,z,u at nplot^SPATIAL_DIM plot points

C-style output function: x,t,u or x,y,t,u at nplot points in each coordinate direction

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QUnsteadyHeatMixedOrderSpaceTimeElement< SPATIAL_DIM, NNODE_1D >.

365  {
366  // Vector of local coordinates
367  Vector<double> s(SPATIAL_DIM + 1, 0.0);
368 
369  // Tecplot header info
370  fprintf(file_pt, "%s", tecplot_zone_string(nplot).c_str());
371 
372  // Get the number of plot points
373  unsigned num_plot_points = nplot_points(nplot);
374 
375  // Loop over plot points
376  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
377  {
378  // Get local coordinates of plot point
379  get_s_plot(iplot, nplot, s);
380 
381  // Loop over the coordinate directions
382  for (unsigned i = 0; i < SPATIAL_DIM + 1; i++)
383  {
384  // Print the i-th coordinate value at local coordinate s
385  fprintf(file_pt, "%g ", interpolated_x(s, i));
386  }
387 
388  // Output the interpolated solution value at local coordinate s
389  fprintf(file_pt, "%g \n", interpolated_u_ust_heat(s));
390  } // for (unsigned iplot=0;iplot<num_plot_points;iplot++)
391 
392  // Write tecplot footer (e.g. FE connectivity lists)
393  write_tecplot_zone_footer(file_pt, nplot);
394  } // End of output

References i, and s.

◆ output() [3/4]

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::output ( std::ostream &  outfile)
inlinevirtual

Output with default number of plot points.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QUnsteadyHeatMixedOrderSpaceTimeElement< SPATIAL_DIM, NNODE_1D >.

123  {
124  // Number of plot points
125  unsigned nplot = 5;
126 
127  // Output the solution
128  output(outfile, nplot);
129  } // End of output

Referenced by oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::output(), and oomph::QUnsteadyHeatMixedOrderSpaceTimeElement< SPATIAL_DIM, NNODE_1D >::output().

◆ output() [4/4]

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::output ( std::ostream &  outfile,
const unsigned nplot 
)
virtual

Output FE representation of soln: x,y,u or x,y,z,u at nplot^SPATIAL_DIM plot points

Output function: x,t,u or x,y,t,u at nplot points in each coordinate direction

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QUnsteadyHeatMixedOrderSpaceTimeElement< SPATIAL_DIM, NNODE_1D >.

325  {
326  // Vector of local coordinates
327  Vector<double> s(SPATIAL_DIM + 1, 0.0);
328 
329  // Tecplot header info
330  outfile << tecplot_zone_string(nplot);
331 
332  // Get the number of plot points
333  unsigned num_plot_points = nplot_points(nplot);
334 
335  // Loop over plot points
336  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
337  {
338  // Get local coordinates of plot point
339  get_s_plot(iplot, nplot, s);
340 
341  // Loop over the coordinate directions
342  for (unsigned i = 0; i < SPATIAL_DIM + 1; i++)
343  {
344  // Output the interpolated coordinate
345  outfile << interpolated_x(s, i) << " ";
346  }
347 
348  // Calculate the interpolated solution value
349  outfile << interpolated_u_ust_heat(s) << std::endl;
350  } // for (unsigned iplot=0;iplot<num_plot_points;iplot++)
351 
352  // Write tecplot footer (e.g. FE connectivity lists)
353  write_tecplot_zone_footer(outfile, nplot);
354  } // End of output

References i, and s.

◆ output_element_paraview()

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::output_element_paraview ( std::ofstream &  file_out,
const unsigned nplot 
)

C-style output FE representation of soln: x,y,u or x,y,z,u at nplot^SPATIAL_DIM plot points

Output function: x,t,u or x,y,t,u at nplot points in each coordinate direction

733  {
734  // Change the scientific format so that E is used rather than e
735  file_out.setf(std::ios_base::uppercase);
736 
737  // Make variables to hold the number of nodes and elements
738  unsigned number_of_nodes = this->nplot_points_paraview(nplot);
739 
740  // Make variables to hold the number of elements
741  unsigned total_number_of_elements = this->nsub_elements_paraview(nplot);
742 
743  //------------------
744  // File Declaration:
745  //------------------
746  // Insert the necessary lines plus header of file, and
747  // number of nodes and elements
748  file_out << "<?xml version=\"1.0\"?>\n"
749  << "<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" "
750  << "byte_order=\"LittleEndian\">\n"
751  << "<UnstructuredGrid>\n"
752  << "<Piece NumberOfPoints=\"" << number_of_nodes
753  << "\" NumberOfCells=\"" << total_number_of_elements << "\">\n";
754 
755  //------------
756  // Point Data:
757  //------------
758  // Check the number of degrees of freedom
759  unsigned ndof = this->nscalar_paraview();
760 
761  // Point data is going in here
762  file_out << "<PointData ";
763 
764  // Insert just the first scalar name, since paraview reads everything
765  // else after that as being of the same type. Get information from
766  // first element.
767  file_out << "Scalars=\"" << this->scalar_name_paraview(0) << "\">\n";
768 
769  // Loop over i scalar fields and j number of elements
770  for (unsigned i = 0; i < ndof; i++)
771  {
772  file_out << "<DataArray type=\"Float32\" "
773  << "Name=\"" << this->scalar_name_paraview(i) << "\" "
774  << "format=\"ascii\""
775  << ">\n";
776 
777  // Output the i-th scalar field with nplot plot points
778  this->scalar_value_paraview(file_out, i, nplot);
779 
780  // Close of the DataArray
781  file_out << "</DataArray>\n";
782  }
783 
784  // Close off the PointData set
785  file_out << "</PointData>\n";
786 
787  //------------------
788  // Geometric Points:
789  //------------------
790  // Always has to be 3 components for an unstructured grid
791  file_out << "<Points>\n"
792  << "<DataArray type=\"Float32\""
793  << " NumberOfComponents=\"" << 3 << "\" "
794  << "format=\"ascii\">\n";
795 
796  // Print the plot points
797  this->output_paraview(file_out, nplot);
798 
799  // Close off the geometric points set
800  file_out << "</DataArray>\n"
801  << "</Points>\n";
802 
803  //-------
804  // Cells:
805  //-------
806  file_out << "<Cells>\n"
807  << "<DataArray type=\"Int32\" Name=\""
808  << "connectivity\" format=\"ascii\">\n";
809 
810  // Make counter for keeping track of all the local elements,
811  // because Paraview requires global coordinates
812  unsigned counter = 0;
813 
814  // Write connectivity with the local elements
815  this->write_paraview_output_offset_information(file_out, nplot, counter);
816 
817  // Output header stuff
818  file_out << "</DataArray>\n"
819  << "<DataArray type=\"Int32\" "
820  << "Name=\"offsets\" format=\"ascii\">\n";
821 
822  // Make variable that holds the current offset number
823  unsigned offset_sum = 0;
824 
825  // Write the offset for the specific elements
826  this->write_paraview_offsets(file_out, nplot, offset_sum);
827 
828  // Add in header information
829  file_out << "</DataArray>\n"
830  << "<DataArray type=\"UInt8\" Name=\"types\">\n";
831 
832  // Get the type the element has
833  this->write_paraview_type(file_out, nplot);
834 
835  // Finish off the data set
836  file_out << "</DataArray>\n"
837  << "</Cells>\n";
838 
839  //--------------
840  // File Closure:
841  //--------------
842  file_out << "</Piece>\n"
843  << "</UnstructuredGrid>\n"
844  << "</VTKFile>";
845  } // End of output_element_paraview
virtual unsigned nplot_points_paraview(const unsigned &nplot) const
Definition: elements.h:2862
virtual void write_paraview_type(std::ofstream &file_out, const unsigned &nplot) const
Definition: elements.h:2964
virtual unsigned nsub_elements_paraview(const unsigned &nplot) const
Definition: elements.h:2876
void output_paraview(std::ofstream &file_out, const unsigned &nplot) const
Definition: elements.h:2889
virtual void write_paraview_offsets(std::ofstream &file_out, const unsigned &nplot, unsigned &offset_sum) const
Definition: elements.h:2976
virtual void write_paraview_output_offset_information(std::ofstream &file_out, const unsigned &nplot, unsigned &counter) const
Definition: elements.h:2952
unsigned ndof() const
Return the number of equations/dofs in the element.
Definition: elements.h:835
unsigned nscalar_paraview() const
Definition: discontinuous_galerkin_space_time_unsteady_heat_mixed_order_elements.h:191
void scalar_value_paraview(std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
Definition: discontinuous_galerkin_space_time_unsteady_heat_mixed_order_elements.h:200
std::string scalar_name_paraview(const unsigned &i) const
Definition: discontinuous_galerkin_space_time_unsteady_heat_mixed_order_elements.h:348

References i.

◆ output_fct() [1/2]

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::output_fct ( std::ostream &  outfile,
const unsigned nplot,
const double time,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt 
)
virtual

Output exact soln: x,y,u_exact or x,y,z,u_exact at nplot^SPATIAL_DIM plot points (time-dependent version)

Output exact solution at a given number of plot points: x,t,u_exact or x,y,t,u_exact Solution is provided via function pointer.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QUnsteadyHeatMixedOrderSpaceTimeElement< SPATIAL_DIM, NNODE_1D >.

465  {
466  // Storage for the time value
467  double interpolated_t = 0.0;
468 
469  // Vector of local coordinates
470  Vector<double> s(SPATIAL_DIM + 1, 0.0);
471 
472  // Vector for spatial coordinates
473  Vector<double> spatial_coordinates(SPATIAL_DIM, 0.0);
474 
475  // Tecplot header info
476  outfile << tecplot_zone_string(nplot);
477 
478  // Exact solution vector (here it's simply a scalar)
479  Vector<double> exact_soln(1, 0.0);
480 
481  // Get the number of plot points
482  unsigned num_plot_points = nplot_points(nplot);
483 
484  // Loop over plot points
485  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
486  {
487  // Get local coordinates of plot point
488  get_s_plot(iplot, nplot, s);
489 
490  // Loop over the spatial coordinates
491  for (unsigned i = 0; i < SPATIAL_DIM; i++)
492  {
493  // Assign the i-th spatial coordinate
494  spatial_coordinates[i] = interpolated_x(s, i);
495 
496  // Output the i-th coordinate at the point
497  outfile << spatial_coordinates[i] << " ";
498  }
499 
500  // Get the time value
501  interpolated_t = interpolated_x(s, SPATIAL_DIM);
502 
503  // Output the time value at this point
504  outfile << interpolated_t << " ";
505 
506  // Get the exact solution at this point
507  (*exact_soln_pt)(interpolated_t, spatial_coordinates, exact_soln);
508 
509  // Output the exact solution at this point
510  outfile << exact_soln[0] << std::endl;
511  } // for (unsigned iplot=0;iplot<num_plot_points;iplot++)
512 
513  // Write tecplot footer (e.g. FE connectivity lists)
514  write_tecplot_zone_footer(outfile, nplot);
515  } // End of output_fct

References ProblemParameters::exact_soln(), i, and s.

◆ output_fct() [2/2]

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::output_fct ( std::ostream &  outfile,
const unsigned nplot,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt 
)
virtual

Output exact soln: x,y,u_exact or x,y,z,u_exact at nplot^SPATIAL_DIM plot points

Output exact solution at a given number of plot points: x,t,u_exact or x,y,t,u_exact Solution is provided via function pointer.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QUnsteadyHeatMixedOrderSpaceTimeElement< SPATIAL_DIM, NNODE_1D >.

407  {
408  // Vector of local coordinates
409  Vector<double> s(SPATIAL_DIM + 1, 0.0);
410 
411  // Vector for spatial coordinates
412  Vector<double> spatial_coordinates(SPATIAL_DIM, 0.0);
413 
414  // Tecplot header info
415  outfile << tecplot_zone_string(nplot);
416 
417  // Exact solution vector (here it's simply a scalar)
418  Vector<double> exact_soln(1, 0.0);
419 
420  // Get the number of plot points
421  unsigned num_plot_points = nplot_points(nplot);
422 
423  // Loop over plot points
424  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
425  {
426  // Get local coordinates of plot point
427  get_s_plot(iplot, nplot, s);
428 
429  // Loop over the spatial coordinates
430  for (unsigned i = 0; i < SPATIAL_DIM; i++)
431  {
432  // Assign the i-th spatial coordinate
433  spatial_coordinates[i] = interpolated_x(s, i);
434 
435  // Output the i-th coordinate at the point
436  outfile << spatial_coordinates[i] << " ";
437  }
438 
439  // Output the time value at this point
440  outfile << interpolated_x(s, SPATIAL_DIM) << " ";
441 
442  // Get the exact solution at this point
443  (*exact_soln_pt)(spatial_coordinates, exact_soln);
444 
445  // Output the exact solution at this point
446  outfile << exact_soln[0] << std::endl;
447  } // for (unsigned iplot=0;iplot<num_plot_points;iplot++)
448 
449  // Write tecplot footer (e.g. FE connectivity lists)
450  write_tecplot_zone_footer(outfile, nplot);
451  } // End of output_fct

References ProblemParameters::exact_soln(), i, and s.

Referenced by oomph::QUnsteadyHeatMixedOrderSpaceTimeElement< SPATIAL_DIM, NNODE_1D >::output_fct().

◆ scalar_name_paraview()

template<unsigned SPATIAL_DIM>
std::string oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::scalar_name_paraview ( const unsigned i) const
inlinevirtual

Name of the i-th scalar field. Default implementation returns V1 for the first one, V2 for the second etc.

Reimplemented from oomph::FiniteElement.

349  {
350  // If we're outputting the solution
351  if (i == 0)
352  {
353  // There's only one field to output
354  return "U";
355  }
356  // Never get here
357  else
358  {
359  std::stringstream error_stream;
360  error_stream << "These unsteady heat elements only store 1 field, \n"
361  << "but i is currently " << i << std::endl;
362  throw OomphLibError(
363  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
364 
365  // Dummy return
366  return " ";
367  }
368  } // End of scalar_name_paraview
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References i, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ scalar_value_fct_paraview() [1/2]

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::scalar_value_fct_paraview ( std::ofstream &  file_out,
const unsigned i,
const unsigned nplot,
const double time,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt 
) const
inlinevirtual

Write values of the i-th scalar field at the plot points. Needs to be implemented for each new specific element type.

Reimplemented from oomph::FiniteElement.

294  {
295 #ifdef PARANOID
296  if (i != 0)
297  {
298  std::stringstream error_stream;
299  error_stream << "Space-time unsteady heat elements only store a single "
300  << "field so i must be 0 rather than " << i << std::endl;
301  throw OomphLibError(
302  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
303  }
304 #endif
305 
306  // Get the number of plot points
307  unsigned local_loop = this->nplot_points_paraview(nplot);
308 
309  // Loop over the plot points
310  for (unsigned j = 0; j < local_loop; j++)
311  {
312  // Storage for the local coordinates
313  Vector<double> s(SPATIAL_DIM + 1);
314 
315  // Storage for the time value
316  double interpolated_t = 0.0;
317 
318  // Storage for the global coordinates
319  Vector<double> spatial_coordinates(SPATIAL_DIM);
320 
321  // Get the local coordinate of the required plot point
322  this->get_s_plot(j, nplot, s);
323 
324  // Loop over the spatial coordinates
325  for (unsigned i = 0; i < SPATIAL_DIM; i++)
326  {
327  // Assign the i-th spatial coordinate
328  spatial_coordinates[i] = interpolated_x(s, i);
329  }
330 
331  // Get the time value
332  interpolated_t = interpolated_x(s, SPATIAL_DIM);
333 
334  // Exact solution vector (here it's simply a scalar)
335  Vector<double> exact_soln(1, 0.0);
336 
337  // Get the exact solution at this point
338  (*exact_soln_pt)(interpolated_t, spatial_coordinates, exact_soln);
339 
340  // Output the interpolated solution value
341  file_out << exact_soln[0] << std::endl;
342  } // for (unsigned j=0;j<local_loop;j++)
343  } // End of scalar_value_fct_paraview

References ProblemParameters::exact_soln(), oomph::FiniteElement::get_s_plot(), i, oomph::FiniteElement::interpolated_x(), j, oomph::FiniteElement::nplot_points_paraview(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

◆ scalar_value_fct_paraview() [2/2]

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::scalar_value_fct_paraview ( std::ofstream &  file_out,
const unsigned i,
const unsigned nplot,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt 
) const
inlinevirtual

Write values of the i-th scalar field at the plot points. Needs to be implemented for each new specific element type.

Reimplemented from oomph::FiniteElement.

240  {
241 #ifdef PARANOID
242  if (i != 0)
243  {
244  std::stringstream error_stream;
245  error_stream << "Space-time unsteady heat elements only store a single "
246  << "field so i must be 0 rather than " << i << std::endl;
247  throw OomphLibError(
248  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
249  }
250 #endif
251 
252  // Get the number of plot points
253  unsigned local_loop = this->nplot_points_paraview(nplot);
254 
255  // Loop over the plot points
256  for (unsigned j = 0; j < local_loop; j++)
257  {
258  // Storage for the local coordinates
259  Vector<double> s(SPATIAL_DIM + 1);
260 
261  // Storage for the global coordinates
262  Vector<double> spatial_coordinates(SPATIAL_DIM);
263 
264  // Get the local coordinate of the required plot point
265  this->get_s_plot(j, nplot, s);
266 
267  // Loop over the spatial coordinates
268  for (unsigned i = 0; i < SPATIAL_DIM; i++)
269  {
270  // Assign the i-th spatial coordinate
271  spatial_coordinates[i] = interpolated_x(s, i);
272  }
273 
274  // Exact solution vector (here it's simply a scalar)
275  Vector<double> exact_soln(1, 0.0);
276 
277  // Get the exact solution at this point
278  (*exact_soln_pt)(spatial_coordinates, exact_soln);
279 
280  // Output the interpolated solution value
281  file_out << exact_soln[0] << std::endl;
282  } // for (unsigned j=0;j<local_loop;j++)
283  } // End of scalar_value_fct_paraview

References ProblemParameters::exact_soln(), oomph::FiniteElement::get_s_plot(), i, oomph::FiniteElement::interpolated_x(), j, oomph::FiniteElement::nplot_points_paraview(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

◆ scalar_value_paraview()

template<unsigned SPATIAL_DIM>
void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::scalar_value_paraview ( std::ofstream &  file_out,
const unsigned i,
const unsigned nplot 
) const
inlinevirtual

Write values of the i-th scalar field at the plot points. Needs to be implemented for each new specific element type.

Reimplemented from oomph::FiniteElement.

203  {
204 #ifdef PARANOID
205  if (i != 0)
206  {
207  std::stringstream error_stream;
208  error_stream << "Space-time unsteady heat elements only store a single "
209  << "field so i must be 0 rather than " << i << std::endl;
210  throw OomphLibError(
211  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
212  }
213 #endif
214 
215  // Get the number of plot points
216  unsigned local_loop = this->nplot_points_paraview(nplot);
217 
218  // Loop over the plot points
219  for (unsigned j = 0; j < local_loop; j++)
220  {
221  // Storage for the local coordinates
222  Vector<double> s(SPATIAL_DIM + 1);
223 
224  // Get the local coordinate of the required plot point
225  this->get_s_plot(j, nplot, s);
226 
227  // Output the interpolated solution value
228  file_out << this->interpolated_u_ust_heat(s) << std::endl;
229  }
230  } // End of scalar_value_paraview

References oomph::FiniteElement::get_s_plot(), i, oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::interpolated_u_ust_heat(), j, oomph::FiniteElement::nplot_points_paraview(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

◆ self_test()

template<unsigned SPATIAL_DIM>
unsigned oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::self_test
virtual

Self-test: Return 0 for OK.

Reimplemented from oomph::FiniteElement.

291  {
292  // Initialise the boolean variable
293  bool passed = true;
294 
295  // Check lower-level stuff
296  if (FiniteElement::self_test() != 0)
297  {
298  // If we get here then the lower-level self-tests did not pass
299  passed = false;
300  }
301 
302  // If the self-tests passed
303  if (passed)
304  {
305  // Return the value zero
306  return 0;
307  }
308  // If the self-tests didn't pass
309  else
310  {
311  // Return the value one
312  return 1;
313  }
314  } // End of self_test
virtual unsigned self_test()
Definition: elements.cc:4440

References oomph::FiniteElement::self_test().

◆ shape_ust_heat()

template<unsigned SPATIAL_DIM>
virtual void oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::shape_ust_heat ( const Vector< double > &  s,
Shape psi 
) const
protectedpure virtual

◆ source_fct_pt() [1/2]

template<unsigned SPATIAL_DIM>
SpaceTimeUnsteadyHeatSourceFctPt& oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::source_fct_pt ( )
inlinevirtual

Access function: Pointer to source function.

Implements oomph::SpaceTimeUnsteadyHeatEquationsBase.

373  {
374  // Return the source function pointer
375  return Source_fct_pt;
376  } // End of source_fct_pt

References oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::Source_fct_pt.

Referenced by oomph::RefineableSpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::further_build().

◆ source_fct_pt() [2/2]

template<unsigned SPATIAL_DIM>
SpaceTimeUnsteadyHeatSourceFctPt oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::source_fct_pt ( ) const
inline

Access function: Pointer to source function. Const version.

381  {
382  // Return the source function pointer
383  return Source_fct_pt;
384  }

References oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::Source_fct_pt.

◆ u_index_ust_heat()

template<unsigned SPATIAL_DIM>
virtual unsigned oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::u_index_ust_heat ( ) const
inlinevirtual

Return the index at which the unknown value is stored. The default value, 0, is appropriate for single-physics problems, when there is only one variable, the value that satisfies the unsteady heat equation. In derived multi-physics elements, this function should be overloaded to reflect the chosen storage scheme. Note that these equations require that the unknown is always stored at the same index at each node.

551  {
552  // Return the default value
553  return 0;
554  } // End of u_index_ust_heat

Referenced by oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::get_flux(), oomph::RefineableSpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::get_interpolated_values(), oomph::RefineableSpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::get_Z2_flux(), oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::interpolated_du_dt_ust_heat(), and oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::interpolated_u_ust_heat().

Member Data Documentation

◆ ALE_is_disabled

template<unsigned SPATIAL_DIM>
bool oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::ALE_is_disabled
protected

Boolean flag to indicate if ALE formulation is disabled when time-derivatives are computed. Only set to true if you're sure that the mesh is stationary.

Referenced by oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::disable_ALE(), oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::enable_ALE(), and oomph::RefineableSpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::further_build().

◆ Alpha_pt

◆ Beta_pt

◆ Default_alpha_parameter

template<unsigned SPATIAL_DIM>
double oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::Default_alpha_parameter = 1.0
staticprivate

Default value for Alpha parameter (thermal inertia)

Static default value for the Alpha parameter (thermal inertia): One for natural scaling

Referenced by oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::SpaceTimeUnsteadyHeatMixedOrderEquations().

◆ Default_beta_parameter

template<unsigned SPATIAL_DIM>
double oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::Default_beta_parameter = 1.0
staticprivate

Default value for Beta parameter (thermal conductivity)

Static default value for the Beta parameter (thermal conductivity): One for natural scaling

Referenced by oomph::SpaceTimeUnsteadyHeatMixedOrderEquations< SPATIAL_DIM >::SpaceTimeUnsteadyHeatMixedOrderEquations().

◆ Source_fct_pt


The documentation for this class was generated from the following files: