27 #ifndef OOMPH_FLUX_CONTROL_ELEMENTS
28 #define OOMPH_FLUX_CONTROL_ELEMENTS
45 template <
class ELEMENT>
class NavierStokesFluxControlElement;
52 template <
class ELEMENT>
60 double* prescribed_outflow_value_pt) :
77 for (
unsigned e=0;
e<n_el;
e++)
84 unsigned n_node = f_el_pt->
nnode();
85 for(
unsigned n=0;
n<n_node;
n++)
113 double volume_flux = 0.0;
117 for (
unsigned e=0;
e<n_el;
e++)
207 template <
class ELEMENT>
222 ELEMENT* elem_pt =
new ELEMENT;
224 if(elem_pt->dim()==3)
231 "This flux element will not work correctly if nodes are hanging\n",
232 "NavierStokesFluxControlElement::Constructor",
260 std::list<std::pair<unsigned long, unsigned> >& block_lookup_list)
283 void output(std::ostream &outfile,
const unsigned &nplot)
311 unsigned n_node = this->
nnode();
315 for(
unsigned i=0;
i<n_node;
i++) {
test[
i] = psi[
i];}
329 unsigned n_node = this->
nnode();
332 Shape psif(n_node), testf(n_node);
344 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
363 for(
unsigned l=0;l<n_node;l++)
376 for (
unsigned i=0;
i<
Dim;
i++)
378 traction[
i] = pressure*unit_normal[
i];
382 for(
unsigned l=0;l<n_node;l++)
385 for(
unsigned i=0;
i<
Dim;
i++)
392 residuals[local_eqn] += traction[
i]*testf[l]*
W;
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Array< double, 1, 3 > e(1./3., 0.5, 2.)
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
RowVector3d w
Definition: Matrix_resize_int.cpp:3
double value(const unsigned &i) const
Definition: nodes.h:293
int & face_index()
Definition: elements.h:4626
void outer_unit_normal(const Vector< double > &s, Vector< double > &unit_normal) const
Compute outer unit normal at the specified local coordinate.
Definition: elements.cc:6006
double interpolated_x(const Vector< double > &s, const unsigned &i) const
Definition: elements.h:4528
double J_eulerian_at_knot(const unsigned &ipt) const
Definition: elements.cc:5328
Definition: elements.h:1313
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
virtual void output(std::ostream &outfile)
Definition: elements.h:3050
virtual void build_face_element(const int &face_index, FaceElement *face_element_pt)
Definition: elements.cc:5132
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
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition: elements.h:1963
double nodal_position(const unsigned &n, const unsigned &i) const
Definition: elements.h:2317
virtual void shape_at_knot(const unsigned &ipt, Shape &psi) const
Definition: elements.cc:3220
Definition: elements.h:73
Data *& external_data_pt(const unsigned &i)
Return a pointer to i-th external data object.
Definition: elements.h:659
unsigned add_external_data(Data *const &data_pt, const bool &fd=true)
Definition: elements.cc:307
static DenseMatrix< double > Dummy_matrix
Definition: elements.h:227
unsigned add_internal_data(Data *const &data_pt, const bool &fd=true)
Definition: elements.cc:62
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.
FiniteElement * finite_element_pt(const unsigned &e) const
Definition: mesh.h:473
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
Definition: mesh.h:448
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
Definition: navier_stokes_flux_control_elements.h:351
void fill_in_generic_residual_contribution_fluid_traction(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: flux_control_elements_bk.h:324
unsigned Pressure_data_id
Definition: flux_control_elements_bk.h:410
void output(std::ostream &outfile, const unsigned &nplot)
Output function: x,y,[z],u,v,[w],p in tecplot format.
Definition: flux_control_elements_bk.h:283
double get_volume_flux()
Function to get the integral of the volume flux.
Definition: navier_stokes_flux_control_elements.h:416
unsigned nblock_types()
Definition: flux_control_elements_bk.h:252
double shape_and_test_at_knot(const unsigned &ipt, Shape &psi, Shape &test) const
Definition: flux_control_elements_bk.h:306
void output(std::ostream &outfile)
Overload the output function.
Definition: flux_control_elements_bk.h:280
~NavierStokesFluxControlElement()
Destructor should not delete anything.
Definition: flux_control_elements_bk.h:248
unsigned Dim
The highest dimension of the problem.
Definition: flux_control_elements_bk.h:413
virtual int u_local_eqn(const unsigned &n, const unsigned &i)
Definition: flux_control_elements_bk.h:301
void fill_in_contribution_to_residuals(Vector< double > &residuals)
This function returns just the residuals.
Definition: flux_control_elements_bk.h:264
void add_pressure_data(Data *pressure_data_pt)
Definition: flux_control_elements_bk.h:288
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned > > &block_lookup_list)
Definition: flux_control_elements_bk.h:259
NavierStokesFluxControlElement(FiniteElement *const &element_pt, const int &face_index)
Definition: flux_control_elements_bk.h:215
Definition: navier_stokes_surface_power_elements.h:52
Definition: flux_control_elements_bk.h:54
double * Prescribed_outflow_value_pt
Pointer to the value that stores the prescribed outflow.
Definition: flux_control_elements_bk.h:189
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Definition: flux_control_elements_bk.h:110
NetFluxControlElement(const NetFluxControlElement &)
Broken copy constructor.
Definition: flux_control_elements_bk.h:96
NetFluxControlElement(Mesh *flux_control_mesh_pt, double *prescribed_outflow_value_pt)
Definition: flux_control_elements_bk.h:59
Data * Pressure_data_pt
Definition: flux_control_elements_bk.h:182
Data * pressure_data_pt() const
Definition: flux_control_elements_bk.h:104
~NetFluxControlElement()
Empty Destructor - Data gets deleted automatically.
Definition: flux_control_elements_bk.h:93
Mesh * Flux_control_mesh_pt
Definition: flux_control_elements_bk.h:186
unsigned ndim() const
Return (Eulerian) spatial dimension of the node.
Definition: nodes.h:1054
Definition: oomph_definitions.h:267
Definition: refineable_elements.h:97
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
Definition: oomph_utilities.cc:212
@ W
Definition: quadtree.h:63
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
Definition: indexed_view.cpp:20
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61