27#ifndef OOMPH_NAVIER_STOKES_FLUX_CONTROL_ELEMENTS
28#define OOMPH_NAVIER_STOKES_FLUX_CONTROL_ELEMENTS
32#include <oomph-lib-config.h>
37#include "../navier_stokes/navier_stokes_surface_power_elements.h"
128 for (
unsigned e = 0;
e <
n_el;
e++)
205 std::ostringstream error_message;
206 error_message <<
"Dof_number_for_unknown hasn't been set yet!\n"
207 <<
"Please do so using the dof_number_for_unknown()\n"
208 <<
"access function\n";
250 std::ostringstream error_message;
251 error_message <<
"Dof_number_for_unknown hasn't been set yet!\n"
252 <<
"Please do so using the dof_number_for_unknown()\n"
253 <<
"access function\n";
281 for (
unsigned e = 0;
e <
n_el;
e++)
295 "NavierStokesFluxControlElements",
347 template<
class ELEMENT>
365 ELEMENT*
elem_pt =
new ELEMENT;
373 std::ostringstream error_message;
375 <<
"This element does not work properly with refineable bulk \n"
376 <<
"elements in 3D. Please use the refineable version\n"
493 for (
unsigned i = 0;
i <
Dim;
i++)
502 for (
unsigned i = 0;
i <
Dim;
i++)
524 if (local_unknown >= 0)
562 template<
class ELEMENT>
619 for (
unsigned i = 0;
i < this->
Dim;
i++)
663 for (
unsigned i = 0;
i < this->
Dim;
i++)
699 for (
unsigned i = 0;
i < this->
Dim;
i++)
740 if (local_unknown >= 0)
A class that represents a collection of data; each Data object may contain many different individual ...
double value(const unsigned &i) const
Return i-th stored value. This function is not virtual so that it can be inlined. This means that if ...
int & face_index()
Index of the face (a number that uniquely identifies the face in the element)
void outer_unit_normal(const Vector< double > &s, Vector< double > &unit_normal) const
Compute outer unit normal at the specified local coordinate.
FiniteElement *& bulk_element_pt()
Pointer to higher-dimensional "bulk" element.
double J_eulerian_at_knot(const unsigned &ipt) const
Return the Jacobian of the mapping from local to global coordinates at the ipt-th integration point O...
A general Finite Element class.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Return the local equation number corresponding to the i-th value at the n-th local node.
unsigned dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
unsigned nnode() const
Return the number of nodes.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
virtual void shape_at_knot(const unsigned &ipt, Shape &psi) const
Return the geometric shape function at the ipt-th integration point.
A Generalised Element class.
Data *& external_data_pt(const unsigned &i)
Return a pointer to i-th external data object.
unsigned add_internal_data(Data *const &data_pt, const bool &fd=true)
Add a (pointer to an) internal data object to the element and return the index required to obtain it ...
unsigned long eqn_number(const unsigned &ieqn_local) const
Return the global equation number corresponding to the ieqn_local-th local equation number.
static DenseMatrix< double > Dummy_matrix
Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case w...
int external_local_eqn(const unsigned &i, const unsigned &j)
Return the local equation number corresponding to the j-th value stored at the i-th external data.
unsigned add_external_data(Data *const &data_pt, const bool &fd=true)
Add a (pointer to an) external data object to the element and return its index (i....
Class that contains data for hanging nodes.
Node *const & master_node_pt(const unsigned &i) const
Return a pointer to the i-th master node.
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.
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
unsigned long nelement() const
Return number of elements in the mesh.
A class of element to impose an applied boundary pressure to Navier-Stokes elements to control to con...
double get_volume_flux()
Function to get the integral of the volume flux.
double shape_and_test_at_knot(const unsigned &ipt, Shape &psi, Shape &test) const
Function to compute the shape and test functions and to return the Jacobian of mapping.
~NavierStokesFluxControlElement()
Destructor should not delete anything.
void fill_in_generic_residual_contribution_fluid_traction(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
This function returns the residuals for the traction function flag=1(or 0): do (or don't) compute the...
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
This function returns the residuals and the Jacobian including the Jacobian contribution from the flu...
unsigned Dim
The highest dimension of the problem.
NavierStokesFluxControlElement(FiniteElement *const &element_pt, const int &face_index, const bool &called_from_refineable_constructor=false)
Constructor, which takes a "bulk" element and face index.
virtual int u_local_eqn(const unsigned &n, const unsigned &i)
Access function that returns the local equation numbers for velocity components. u_local_eqn(n,...
void fill_in_contribution_to_residuals(Vector< double > &residuals)
This function returns just the residuals.
A class of elements that allow the determination of the power input and various other fluxes over the...
double get_volume_flux()
Get integral of volume flux.
A class for an element that controls the net fluid flux across a boundary by the imposition of an unk...
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Add the element's contribution to its residual vector: i.e. the flux constraint.
unsigned ndof_types() const
The number of "DOF types" that degrees of freedom in this element are sub-divided into - it's set to ...
void fill_in_generic_residual_contribution_flux_control(Vector< double > &residuals)
This function returns the residuals for the flux control master element.
unsigned Dim
spatial dim of NS system
Mesh * Flux_control_mesh_pt
Mesh of elements which impose the pressure which controls the net flux.
Data * pressure_data_pt() const
Function to return a pointer to the Data object whose single value is the pressure applied by the Nav...
~NetFluxControlElement()
Empty Destructor - Data gets deleted automatically.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
This function returns the residuals, but adds nothing to the Jacobian as this element's Jacobian cont...
unsigned Dof_number_for_unknown
The id number of the "DOF type" to which the degree of freedom in this element is added to....
unsigned & dof_number_for_unknown()
Function to set / get the nodal value of the "DOF type" to which the degree of freedom in this elemen...
NetFluxControlElement(const NetFluxControlElement &dummy)=delete
Broken copy constructor.
NetFluxControlElement(Mesh *flux_control_mesh_pt, double *prescribed_flux_value_pt)
Constructor takes a mesh of TemplateFreeNavierStokesFluxControlElementBase elements that impose the p...
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned > > &dof_lookup_list) const
Create a list of pairs for all unknowns in this element, so that the first entry in each pair contain...
unsigned dim() const
Broken assignment operator.
Data * Pressure_data_pt
Data object whose single value is the pressure applied by the elements in the Flux_control_mesh_pt.
double * Prescribed_flux_value_pt
Pointer to the value that stores the prescribed flux.
unsigned ndim() const
Return (Eulerian) spatial dimension of the node.
bool is_hanging() const
Test whether the node is geometrically hanging.
HangInfo *const & hanging_pt() const
Return pointer to hanging node data (this refers to the geometric hanging node status) (const version...
A base class for elements that can have hanging nodes but are not refineable as such....
An OomphLibError object which should be thrown when an run-time error is encountered....
RefineableElements are FiniteElements that may be subdivided into children to provide a better local ...
int local_hang_eqn(Node *const &node_pt, const unsigned &i)
Access function that returns the local equation number for the hanging node variables (values stored ...
A class of element to impose an applied boundary pressure to Navier-Stokes elements to control to con...
unsigned ncont_interpolated_values() const
Number of continuously interpolated values are the same as those in the bulk element.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
This function returns the residuals and the Jacobian including the Jacobian contribution from the flu...
void refineable_fill_in_generic_residual_contribution_fluid_traction(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
This function returns the residuals for the traction function flag=1(or 0): do (or don't) compute the...
~RefineableNavierStokesFluxControlElement()
Destructor should not delete anything.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
This function returns just the residuals.
RefineableNavierStokesFluxControlElement(FiniteElement *const &element_pt, const int &face_index)
Constructor, which takes a "bulk" element and the face index.
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
A template free base class for an element to imposes an applied boundary pressure to the Navier-Stoke...
unsigned & pressure_data_id()
Access function gives id of external Data object whose single value is the pressure applied by the el...
virtual double get_volume_flux()=0
Pure virtual function to calculate integral of the volume flux.
TemplateFreeNavierStokesFluxControlElementBase()
Empty constructor.
virtual ~TemplateFreeNavierStokesFluxControlElementBase()
Empty virtual destructor.
void add_pressure_data(Data *pressure_data_pt)
Function adds to the external data the Data object whose single value is the pressure applied by the ...
unsigned Pressure_data_id
Id of external Data object whose single value is the pressure applied by the elements.
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).