49 template<
unsigned NNODE_1D>
55 template <
unsigned NNODE_1D>
59 outfile <<
"ZONE I=" << NNODE_1D << std::endl;
62 unsigned n_dim = this->nodal_dimension();
65 for(
unsigned l=0;l<NNODE_1D;l++)
68 for(
unsigned i=0;
i<n_dim;
i++)
70 outfile << this->node_pt(l)->x(
i) <<
" ";
73 unsigned initial_nvalue = this->node_pt(l)->nvalue();
75 for(
unsigned i=0;
i<initial_nvalue;
i++)
77 outfile << this->node_pt(l)->is_pinned(
i) <<
" ";
87 template <
unsigned NNODE_1D>
89 const unsigned& nplot)
97 unsigned n_dim = this->nodal_dimension();
100 outfile <<
"ZONE I=" << nplot << std::endl;
102 for(
unsigned l=0;l<nplot;l++)
104 s[0] = -1.0 + l*2.0/(nplot-1);
106 for(
unsigned i=0;
i<n_dim;
i++)
109 outfile << this->interpolated_x(s,
i) <<
" ";
111 for(
unsigned i=0;
i<NNODE_1D;
i++)
113 outfile << psi(
i) <<
" ";
115 outfile << std::endl;
117 outfile << std::endl;
124 template<
unsigned NNODE_1D>
143 face_element_pt->
set_halo(Non_halo_proc_ID);
165 face_element_pt->
node_pt(0) = this->node_pt(0);
184 face_element_pt->
nbulk_value(0) = this->required_nvalue(0);
189 face_element_pt->
node_pt(0) = this->node_pt(NNODE_1D-1);
207 face_element_pt->
nbulk_value(0) = this->required_nvalue(NNODE_1D-1);
212 std::ostringstream error_message;
213 error_message <<
"Face_index should only take " 214 <<
"the values +/-1, not " << face_index << std::endl;
217 OOMPH_CURRENT_FUNCTION,
218 OOMPH_EXCEPTION_LOCATION);
231 template<
unsigned NNODE_1D>
237 template <
unsigned NNODE_1D>
241 outfile <<
"ZONE I=" << NNODE_1D <<
", J=" << NNODE_1D << std::endl;
244 unsigned n_dim = this->nodal_dimension();
247 for(
unsigned l2=0;l2<NNODE_1D;l2++)
249 for(
unsigned l1=0;l1<NNODE_1D;l1++)
251 unsigned l = l2*NNODE_1D + l1;
254 for(
unsigned i=0;
i<n_dim;
i++)
256 outfile << this->node_pt(l)->x(
i) <<
" ";
259 unsigned initial_nvalue = this->node_pt(l)->nvalue();
261 for(
unsigned i=0;
i<initial_nvalue;
i++)
263 outfile << this->node_pt(l)->is_pinned(
i) <<
" ";
265 outfile << std::endl;
268 outfile << std::endl;
275 template <
unsigned NNODE_1D>
277 const unsigned &n_plot)
283 outfile <<
"ZONE I=" << n_plot <<
", J=" << n_plot << std::endl;
286 unsigned n_dim = this->nodal_dimension();
289 for(
unsigned l2=0;l2<n_plot;l2++)
291 s[1] = -1.0 + l2*2.0/(n_plot-1);
292 for(
unsigned l1=0;l1<n_plot;l1++)
294 s[0] = -1.0 + l1*2.0/(n_plot-1);
297 for (
unsigned i=0;
i<n_dim;
i++)
299 outfile << this->interpolated_x(s,
i) <<
" " ;
301 outfile << std::endl;
304 outfile << std::endl;
314 template<
unsigned NNODE_1D>
316 const int &face_index,
329 face_element_pt->
set_halo(Non_halo_proc_ID);
357 unsigned bulk_number;
368 for(
unsigned i=0;
i<NNODE_1D;
i++)
370 bulk_number =
i*NNODE_1D;
371 face_element_pt->
node_pt(
i) = this->node_pt(bulk_number);
375 face_element_pt->
nbulk_value(
i) = this->required_nvalue(bulk_number);
388 for(
unsigned i=0;
i<NNODE_1D;
i++)
391 face_element_pt->
node_pt(
i) = this->node_pt(bulk_number);
395 face_element_pt->
nbulk_value(
i) = this->required_nvalue(bulk_number);
408 for(
unsigned i=0;
i<NNODE_1D;
i++)
410 bulk_number = NNODE_1D*
i + NNODE_1D-1;
411 face_element_pt->
node_pt(
i) = this->node_pt(bulk_number);
415 face_element_pt->
nbulk_value(
i)=this->required_nvalue(bulk_number);
428 for(
unsigned i=0;
i<NNODE_1D;
i++)
430 bulk_number = NNODE_1D*(NNODE_1D-1) +
i;
431 face_element_pt->
node_pt(
i) = this->node_pt(bulk_number);
435 face_element_pt->
nbulk_value(
i)=this->required_nvalue(bulk_number);
441 std::ostringstream error_message;
442 error_message <<
"Face index should only take the values +/- 1 or +/- 2," 443 <<
" not " << face_index << std::endl;
445 OOMPH_CURRENT_FUNCTION,
446 OOMPH_EXCEPTION_LOCATION);
458 template<
unsigned NNODE_1D>
464 template <
unsigned NNODE_1D>
468 outfile <<
"ZONE I=" << NNODE_1D <<
", J=" << NNODE_1D
469 <<
", K=" << NNODE_1D<< std::endl;
472 unsigned n_dim = this->nodal_dimension();
475 for(
unsigned l3=0;l3<NNODE_1D;l3++)
477 for(
unsigned l2=0;l2<NNODE_1D;l2++)
479 for(
unsigned l1=0;l1<NNODE_1D;l1++)
481 unsigned l = l3*NNODE_1D*NNODE_1D+l2*NNODE_1D + l1;
484 for(
unsigned i=0;
i<n_dim;
i++)
486 outfile << this->node_pt(l)->x(
i) <<
" ";
489 unsigned initial_nvalue = this->node_pt(l)->nvalue();
491 for(
unsigned i=0;
i<initial_nvalue;
i++)
493 outfile << this->node_pt(l)->is_pinned(
i) <<
" ";
495 outfile << std::endl;
499 outfile << std::endl;
505 template <
unsigned NNODE_1D>
507 output(std::ostream &outfile,
const unsigned &n_plot)
513 outfile <<
"ZONE I=" << n_plot <<
", J=" << n_plot
514 <<
", K=" << n_plot << std::endl;
517 unsigned n_dim = this->nodal_dimension();
520 for(
unsigned l3=0;l3<n_plot;l3++)
522 s[2] = -1.0 + l3*2.0/(n_plot-1);
523 for(
unsigned l2=0;l2<n_plot;l2++)
525 s[1] = -1.0 + l2*2.0/(n_plot-1);
526 for(
unsigned l1=0;l1<n_plot;l1++)
528 s[0] = -1.0 + l1*2.0/(n_plot-1);
531 for (
unsigned i=0;
i<n_dim;
i++)
533 outfile << this->interpolated_x(s,
i) <<
" " ;
535 outfile << std::endl;
539 outfile << std::endl;
547 template<
unsigned NNODE_1D>
552 oomph_info <<
" WARNING UNTESTED CODE" << std::endl;
564 face_element_pt->
set_halo(Non_halo_proc_ID);
599 for (
unsigned i=0;
i<(NNODE_1D*NNODE_1D);
i++)
601 face_element_pt->
node_pt(
i)= this->node_pt(
i);
622 for (
unsigned i=0;
i<(NNODE_1D*NNODE_1D);
i++)
625 = this->node_pt(
i+(NNODE_1D*NNODE_1D)*(NNODE_1D-1));
649 for (
unsigned i=0;
i<NNODE_1D;
i++)
651 for (
unsigned j=0;j<NNODE_1D;j++)
653 face_element_pt->
node_pt(count)
654 = this->node_pt(j+
i*(NNODE_1D*NNODE_1D));
681 for (
unsigned i=0;
i<NNODE_1D;
i++)
683 for (
unsigned j=0;j<NNODE_1D;j++)
685 face_element_pt->
node_pt(count)=
686 this->node_pt(j+
i*(NNODE_1D*NNODE_1D)+(NNODE_1D*(NNODE_1D-1)));
712 for (
unsigned i=0;
i<NNODE_1D;
i++)
714 for (
unsigned j=0;j<NNODE_1D;j++)
716 unsigned jj=j*NNODE_1D+
i*(NNODE_1D*NNODE_1D);
717 face_element_pt->
node_pt(count) = this->node_pt(jj);
744 for (
unsigned i=0;
i<NNODE_1D;
i++)
746 for (
unsigned j=0;j<NNODE_1D;j++)
748 unsigned jj=j*NNODE_1D+
i*(NNODE_1D*NNODE_1D)+(NNODE_1D-1);
749 face_element_pt->
node_pt(count) = this->node_pt(jj);
763 std::ostringstream error_message;
765 <<
"Face index should only take the values +/- 1, +/- 2 or +/- 3," 766 <<
" not " << face_index << std::endl;
768 OOMPH_CURRENT_FUNCTION,
769 OOMPH_EXCEPTION_LOCATION);
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 face s0 = -1.0.
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = 1.0.
void face2(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the east face (s0 = 1.0)
int & face_index()
Index of the face (a number that uniquely identifies the face in the element)
void face2(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the back face (s2 = -1.0)
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 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)
BulkCoordinateDerivativesFctPt & bulk_coordinate_derivatives_fct_pt()
Return the pointer to the function that returns the derivatives of the bulk coordinates wrt the face ...
static std::map< unsigned, Vector< double > > z
unsigned & bulk_node_number(const unsigned &n)
Return the bulk node number that corresponds to the n-th local node number.
int & normal_sign()
Sign of outer unit normal (relative to cross-products of tangent vectors in the corresponding "bulk" ...
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 back and front faces, along which s0 is fixed.
void set_halo(const unsigned &non_halo_proc_ID)
Label the element as halo and specify processor that holds non-halo counterpart.
void nbulk_value_resize(const unsigned &i)
Resize the storage for the number of values originally stored at the local nodes to i entries...
static GaussLobattoLegendre< 1, NNODE_1D > integral
Default integration rule: Gaussian integration of same 'order' as the element.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
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 output(std::ostream &outfile)
Output with default number of plot points.
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 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 face3(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the right face (s0 = 1.0)
void face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the west face (s0 = -1.0)
FiniteElement *& bulk_element_pt()
Pointer to higher-dimensional "bulk" element.
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...
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the down face (s1 = -1.0)
void face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the left face (s0 = -1.0)
CoordinateMappingFctPt & face_to_bulk_coordinate_fct_pt()
Return the pointer to the function that maps the face coordinate to the bulk coordinate.
void face5(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the front face (s2 = 1.0)
void bulk_node_number_resize(const unsigned &i)
Resize the storage for the bulk node numbers.
unsigned & nbulk_value(const unsigned &n)
Return the number of values originally stored at local node n (before the FaceElement added additiona...
void face3(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the north face (s1 = 1.0)