26 #ifndef OOMPH_IMPOSE_PARALL_ELEMENTS_HEADER
27 #define OOMPH_IMPOSE_PARALL_ELEMENTS_HEADER
31 #include <oomph-lib-config.h>
43 template<
class ELEMENT>
62 const unsigned&
id = 0)
72 unsigned dim = element_pt->
dim();
100 residuals, jacobian, 1);
110 void output(std::ostream& outfile,
const unsigned& nplot)
122 const unsigned&
i)
const
140 const unsigned& flag)
143 unsigned n_node =
nnode();
146 unsigned dim_el =
dim();
156 int local_unknown = 0;
167 for (
unsigned i = 0;
i < dim_el + 1;
i++)
169 u_index[
i] = el_pt->u_index_nst(
i);
173 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
191 for (
unsigned j = 0;
j < n_node;
j++)
194 for (
unsigned i = 0;
i < dim_el + 1;
i++)
208 unsigned first_index =
212 for (
unsigned l = 0; l < dim_el; l++)
223 for (
unsigned j = 0;
j < n_node;
j++)
231 unsigned first_index =
235 for (
unsigned l = 0; l < dim_el; l++)
243 for (
unsigned i = 0;
i < dim_el + 1;
i++)
246 residuals[local_eqn] +=
247 interpolated_u[
i] * tang_vec[l][
i] * psi(
j) *
W;
253 for (
unsigned jj = 0; jj < n_node; jj++)
258 if (local_unknown >= 0)
260 jacobian(local_eqn, local_unknown) +=
261 tang_vec[l][
i] * psi(jj) * psi(
j) *
W;
270 for (
unsigned i = 0;
i < dim_el + 1;
i++)
281 residuals[local_eqn] -=
282 (*Pressure_pt) * norm_vec[
i] * psi(
j) *
W;
286 for (
unsigned l = 0; l < dim_el; l++)
289 residuals[local_eqn] += tang_vec[l][
i] * psi(
j) *
lambda[l] *
W;
295 for (
unsigned jj = 0; jj < n_node; jj++)
308 if (local_unknown >= 0)
310 jacobian(local_eqn, local_unknown) +=
311 tang_vec[l][
i] * psi(jj) * psi(
j) *
W;
334 return 2 * (this->
dim()) + 1;
354 std::list<std::pair<unsigned long, unsigned>>& dof_lookup_list)
const
357 std::pair<unsigned, unsigned> dof_lookup;
360 const unsigned n_node = this->
nnode();
363 const unsigned dim_el = this->
dim();
367 const unsigned dim_bulk = dim_el + 1;
377 for (
unsigned node_i = 0; node_i < n_node; node_i++)
385 for (
unsigned velocity_i = 0; velocity_i < dim_bulk; velocity_i++)
405 dof_lookup.second = velocity_i;
406 dof_lookup_list.push_front(dof_lookup);
416 for (
unsigned dim_i = 0; dim_i < dim_el; dim_i++)
434 dof_lookup.first = this->
eqn_number(local_eqn);
435 dof_lookup.second = dim_i + dim_bulk;
438 dof_lookup_list.push_front(dof_lookup);
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
cout<< "The eigenvalues of A are:"<< endl<< ces.eigenvalues()<< endl;cout<< "The matrix of eigenvectors, V, is:"<< endl<< ces.eigenvectors()<< endl<< endl;complex< float > lambda
Definition: ComplexEigenSolver_compute.cpp:9
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
RowVector3d w
Definition: Matrix_resize_int.cpp:3
unsigned index_of_first_value_assigned_by_face_element(const unsigned &face_id=0) const
Definition: nodes.h:2061
Definition: elements.h:4338
Vector< unsigned > Bulk_node_number
Definition: elements.h:4403
FiniteElement * Bulk_element_pt
Pointer to the associated higher-dimensional "bulk" element.
Definition: elements.h:4399
int & face_index()
Definition: elements.h:4626
double zeta_nodal(const unsigned &n, const unsigned &k, const unsigned &i) const
Definition: elements.h:4497
void add_additional_values(const Vector< unsigned > &nadditional_values, const unsigned &id)
Definition: elements.h:4428
FiniteElement *& bulk_element_pt()
Pointer to higher-dimensional "bulk" element.
Definition: elements.h:4735
double J_eulerian_at_knot(const unsigned &ipt) const
Definition: elements.cc:5328
void continuous_tangent_and_outer_unit_normal(const Vector< double > &s, Vector< Vector< double >> &tang_vec, Vector< double > &unit_normal) const
Definition: elements.cc:5512
Definition: elements.h:4998
Definition: elements.h:1313
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
double nodal_value(const unsigned &n, const unsigned &i) const
Definition: elements.h:2593
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 dim() const
Definition: elements.h:2611
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
virtual void shape_at_knot(const unsigned &ipt, Shape &psi) const
Definition: elements.cc:3220
unsigned long eqn_number(const unsigned &ieqn_local) const
Definition: elements.h:704
static DenseMatrix< double > Dummy_matrix
Definition: elements.h:227
Definition: impose_parallel_outflow_element.h:46
void fill_in_generic_contribution_to_residuals_parall_lagr_multiplier(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Definition: impose_parallel_outflow_element.h:137
unsigned ndof_types() const
Definition: impose_parallel_outflow_element.h:327
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
Definition: impose_parallel_outflow_element.h:353
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in the residuals.
Definition: impose_parallel_outflow_element.h:87
unsigned Id
Lagrange Id.
Definition: impose_parallel_outflow_element.h:52
double * Pressure_pt
pointer to imposed pressure – if null then no pressure imposed.
Definition: impose_parallel_outflow_element.h:49
void output(std::ostream &outfile, const unsigned &nplot)
Output function: x,y,[z],u,v,[w],p in tecplot format.
Definition: impose_parallel_outflow_element.h:110
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Fill in contribution from Jacobian.
Definition: impose_parallel_outflow_element.h:95
double *& pressure_pt()
Access function for the pressure.
Definition: impose_parallel_outflow_element.h:129
void output(std::ostream &outfile)
Overload the output function.
Definition: impose_parallel_outflow_element.h:104
ImposeParallelOutflowElement(FiniteElement *const &element_pt, const int &face_index, const unsigned &id=0)
Definition: impose_parallel_outflow_element.h:60
double zeta_nodal(const unsigned &n, const unsigned &k, const unsigned &i) const
Definition: impose_parallel_outflow_element.h:120
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 value(const unsigned &i) const
Definition: nodes.cc:2408
char char char int int * k
Definition: level2_impl.h:374
@ W
Definition: quadtree.h:63
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2