43 template<
unsigned NNODE_1D>
49 template<
unsigned NNODE_1D>
53 outfile <<
"ZONE I=" << NNODE_1D << std::endl;
56 unsigned n_dim = this->nodal_dimension();
59 for (
unsigned l = 0; l < NNODE_1D; l++)
62 for (
unsigned i = 0;
i < n_dim;
i++)
64 outfile << this->node_pt(l)->x(
i) <<
" ";
67 unsigned initial_nvalue = this->node_pt(l)->nvalue();
69 for (
unsigned i = 0;
i < initial_nvalue;
i++)
71 outfile << this->node_pt(l)->is_pinned(
i) <<
" ";
81 template<
unsigned NNODE_1D>
83 const unsigned& nplot)
91 unsigned n_dim = this->nodal_dimension();
94 outfile <<
"ZONE I=" << nplot << std::endl;
96 for (
unsigned l = 0; l < nplot; l++)
98 s[0] = -1.0 + l * 2.0 / (nplot - 1);
100 for (
unsigned i = 0;
i < n_dim;
i++)
103 outfile << this->interpolated_x(
s,
i) <<
" ";
105 for (
unsigned i = 0;
i < NNODE_1D;
i++)
107 outfile << psi(
i) <<
" ";
109 outfile << std::endl;
111 outfile << std::endl;
118 template<
unsigned NNODE_1D>
120 const int& face_index,
FaceElement* face_element_pt)
136 face_element_pt->
set_halo(Non_halo_proc_ID);
158 face_element_pt->
node_pt(0) = this->node_pt(0);
177 face_element_pt->
nbulk_value(0) = this->required_nvalue(0);
182 face_element_pt->
node_pt(0) = this->node_pt(NNODE_1D - 1);
200 face_element_pt->
nbulk_value(0) = this->required_nvalue(NNODE_1D - 1);
205 std::ostringstream error_message;
206 error_message <<
"Face_index should only take "
207 <<
"the values +/-1, not " << face_index << std::endl;
210 OOMPH_CURRENT_FUNCTION,
211 OOMPH_EXCEPTION_LOCATION);
223 template<
unsigned NNODE_1D>
229 template<
unsigned NNODE_1D>
233 outfile <<
"ZONE I=" << NNODE_1D <<
", J=" << NNODE_1D << std::endl;
236 unsigned n_dim = this->nodal_dimension();
239 for (
unsigned l2 = 0; l2 < NNODE_1D; l2++)
241 for (
unsigned l1 = 0; l1 < NNODE_1D; l1++)
243 unsigned l = l2 * NNODE_1D + l1;
246 for (
unsigned i = 0;
i < n_dim;
i++)
248 outfile << this->node_pt(l)->x(
i) <<
" ";
251 unsigned initial_nvalue = this->node_pt(l)->nvalue();
253 for (
unsigned i = 0;
i < initial_nvalue;
i++)
255 outfile << this->node_pt(l)->is_pinned(
i) <<
" ";
257 outfile << std::endl;
260 outfile << std::endl;
267 template<
unsigned NNODE_1D>
269 const unsigned& n_plot)
275 outfile <<
"ZONE I=" << n_plot <<
", J=" << n_plot << std::endl;
278 unsigned n_dim = this->nodal_dimension();
281 for (
unsigned l2 = 0; l2 < n_plot; l2++)
283 s[1] = -1.0 + l2 * 2.0 / (n_plot - 1);
284 for (
unsigned l1 = 0; l1 < n_plot; l1++)
286 s[0] = -1.0 + l1 * 2.0 / (n_plot - 1);
289 for (
unsigned i = 0;
i < n_dim;
i++)
291 outfile << this->interpolated_x(
s,
i) <<
" ";
293 outfile << std::endl;
296 outfile << std::endl;
304 template<
unsigned NNODE_1D>
306 const int& face_index,
FaceElement* face_element_pt)
318 face_element_pt->
set_halo(Non_halo_proc_ID);
346 unsigned bulk_number;
357 for (
unsigned i = 0;
i < NNODE_1D;
i++)
359 bulk_number =
i * NNODE_1D;
360 face_element_pt->
node_pt(
i) = this->node_pt(bulk_number);
364 face_element_pt->
nbulk_value(
i) = this->required_nvalue(bulk_number);
377 for (
unsigned i = 0;
i < NNODE_1D;
i++)
380 face_element_pt->
node_pt(
i) = this->node_pt(bulk_number);
384 face_element_pt->
nbulk_value(
i) = this->required_nvalue(bulk_number);
397 for (
unsigned i = 0;
i < NNODE_1D;
i++)
399 bulk_number = NNODE_1D *
i + NNODE_1D - 1;
400 face_element_pt->
node_pt(
i) = this->node_pt(bulk_number);
404 face_element_pt->
nbulk_value(
i) = this->required_nvalue(bulk_number);
417 for (
unsigned i = 0;
i < NNODE_1D;
i++)
419 bulk_number = NNODE_1D * (NNODE_1D - 1) +
i;
420 face_element_pt->
node_pt(
i) = this->node_pt(bulk_number);
424 face_element_pt->
nbulk_value(
i) = this->required_nvalue(bulk_number);
430 std::ostringstream error_message;
432 <<
"Face index should only take the values +/- 1 or +/- 2,"
433 <<
" not " << face_index << std::endl;
435 OOMPH_CURRENT_FUNCTION,
436 OOMPH_EXCEPTION_LOCATION);
448 template<
unsigned NNODE_1D>
454 template<
unsigned NNODE_1D>
458 outfile <<
"ZONE I=" << NNODE_1D <<
", J=" << NNODE_1D <<
", K=" << NNODE_1D
462 unsigned n_dim = this->nodal_dimension();
465 for (
unsigned l3 = 0; l3 < NNODE_1D; l3++)
467 for (
unsigned l2 = 0; l2 < NNODE_1D; l2++)
469 for (
unsigned l1 = 0; l1 < NNODE_1D; l1++)
471 unsigned l = l3 * NNODE_1D * NNODE_1D + l2 * NNODE_1D + l1;
474 for (
unsigned i = 0;
i < n_dim;
i++)
476 outfile << this->node_pt(l)->x(
i) <<
" ";
479 unsigned initial_nvalue = this->node_pt(l)->nvalue();
481 for (
unsigned i = 0;
i < initial_nvalue;
i++)
483 outfile << this->node_pt(l)->is_pinned(
i) <<
" ";
485 outfile << std::endl;
489 outfile << std::endl;
495 template<
unsigned NNODE_1D>
497 const unsigned& n_plot)
503 outfile <<
"ZONE I=" << n_plot <<
", J=" << n_plot <<
", K=" << n_plot
507 unsigned n_dim = this->nodal_dimension();
510 for (
unsigned l3 = 0; l3 < n_plot; l3++)
512 s[2] = -1.0 + l3 * 2.0 / (n_plot - 1);
513 for (
unsigned l2 = 0; l2 < n_plot; l2++)
515 s[1] = -1.0 + l2 * 2.0 / (n_plot - 1);
516 for (
unsigned l1 = 0; l1 < n_plot; l1++)
518 s[0] = -1.0 + l1 * 2.0 / (n_plot - 1);
521 for (
unsigned i = 0;
i < n_dim;
i++)
523 outfile << this->interpolated_x(
s,
i) <<
" ";
525 outfile << std::endl;
529 outfile << std::endl;
537 template<
unsigned NNODE_1D>
539 const int& face_index,
FaceElement* face_element_pt)
541 oomph_info <<
" WARNING UNTESTED CODE" << std::endl;
553 face_element_pt->
set_halo(Non_halo_proc_ID);
587 for (
unsigned i = 0;
i < (NNODE_1D * NNODE_1D);
i++)
589 face_element_pt->
node_pt(
i) = this->node_pt(
i);
610 for (
unsigned i = 0;
i < (NNODE_1D * NNODE_1D);
i++)
613 this->node_pt(
i + (NNODE_1D * NNODE_1D) * (NNODE_1D - 1));
637 for (
unsigned i = 0;
i < NNODE_1D;
i++)
639 for (
unsigned j = 0; j < NNODE_1D; j++)
641 face_element_pt->
node_pt(count) =
642 this->node_pt(j +
i * (NNODE_1D * NNODE_1D));
669 for (
unsigned i = 0;
i < NNODE_1D;
i++)
671 for (
unsigned j = 0; j < NNODE_1D; j++)
673 face_element_pt->
node_pt(count) = this->node_pt(
674 j +
i * (NNODE_1D * NNODE_1D) + (NNODE_1D * (NNODE_1D - 1)));
700 for (
unsigned i = 0;
i < NNODE_1D;
i++)
702 for (
unsigned j = 0; j < NNODE_1D; j++)
704 unsigned jj = j * NNODE_1D +
i * (NNODE_1D * NNODE_1D);
705 face_element_pt->
node_pt(count) = this->node_pt(jj);
732 for (
unsigned i = 0;
i < NNODE_1D;
i++)
734 for (
unsigned j = 0; j < NNODE_1D; j++)
737 j * NNODE_1D +
i * (NNODE_1D * NNODE_1D) + (NNODE_1D - 1);
738 face_element_pt->
node_pt(count) = this->node_pt(jj);
752 std::ostringstream error_message;
754 <<
"Face index should only take the values +/- 1, +/- 2 or +/- 3,"
755 <<
" not " << face_index << std::endl;
757 OOMPH_CURRENT_FUNCTION,
758 OOMPH_EXCEPTION_LOCATION);
FaceElements are elements that coincide with the faces of higher-dimensional "bulk" elements....
CoordinateMappingFctPt & face_to_bulk_coordinate_fct_pt()
Return the pointer to the function that maps the face coordinate to the bulk coordinate.
void bulk_node_number_resize(const unsigned &i)
Resize the storage for the bulk node numbers.
int & face_index()
Index of the face (a number that uniquely identifies the face in the element)
unsigned & nbulk_value(const unsigned &n)
Return the number of values originally stored at local node n (before the FaceElement added additiona...
FiniteElement *& bulk_element_pt()
Pointer to higher-dimensional "bulk" element.
BulkCoordinateDerivativesFctPt & bulk_coordinate_derivatives_fct_pt()
Return the pointer to the function that returns the derivatives of the bulk coordinates wrt the face ...
int & normal_sign()
Sign of outer unit normal (relative to cross-products of tangent vectors in the corresponding "bulk" ...
unsigned & bulk_node_number(const unsigned &n)
Return the bulk node number that corresponds to the n-th local node number.
void nbulk_value_resize(const unsigned &i)
Resize the storage for the number of values originally stored at the local nodes to i entries.
void set_nodal_dimension(const unsigned &nodal_dim)
Set the dimension of the nodes in the element. This will typically only be required when constructing...
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
void set_halo(const unsigned &non_halo_proc_ID)
Label the element as halo and specify processor that holds non-halo counterpart.
static std::map< unsigned, Vector< double > > z
An OomphLibError object which should be thrown when an run-time error is encountered....
static GaussLobattoLegendre< 1, NNODE_1D > integral
Default integration rule: Gaussian integration of same 'order' as the element.
General QLegendreElement class.
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
void output()
Doc the command line arguments.
void shape(const double &s, double *Psi)
Definition for 1D Lagrange shape functions. The value of all the shape functions at the local coordin...
void faces0(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for both faces – the bulk coordinate is fixed on both.
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = 1.0.
void face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = -1.0.
void faces1(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the north and south faces, along which s1 is fixed.
void faces0(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the east and west faces, along which s0 is fixed.
void face2(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the east face (s0 = 1.0)
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the south face (s1 = -1.0)
void face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the west face (s0 = -1.0)
void face3(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the north face (s1 = 1.0)
void faces2(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the left and right faces, along which s2 is fixed.
void faces0(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the back and front faces, along which s0 is fixed.
void faces1(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the up and down faces, along which s1 is fixed.
void face4(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the up face (s1 = 1.0)
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the down face (s1 = -1.0)
void face2(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the back face (s2 = -1.0)
void face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the left face (s0 = -1.0)
void face5(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the front face (s2 = 1.0)
void face3(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the right face (s0 = 1.0)
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...