38 template<
unsigned NNODE_1D>
40 template<
unsigned NNODE_1D>
42 template<
unsigned NNODE_1D>
52 template<
unsigned NNODE_1D>
61 template<
unsigned NNODE_1D>
63 const unsigned& n_plot)
69 outfile <<
"ZONE I=" << n_plot << std::endl;
72 unsigned n_dim = this->nodal_dimension();
75 for (
unsigned l = 0; l < n_plot; l++)
77 s[0] = l * 1.0 / (n_plot - 1);
79 for (
unsigned i = 0;
i < n_dim;
i++)
81 outfile << interpolated_x(
s,
i) <<
" ";
92 template<
unsigned NNODE_1D>
101 template<
unsigned NNODE_1D>
109 fprintf(file_pt,
"ZONE I=%i\n", n_plot);
112 unsigned n_dim = this->nodal_dimension();
115 for (
unsigned l = 0; l < n_plot; l++)
117 s[0] = l * 1.0 / (n_plot - 1);
120 for (
unsigned i = 0;
i < n_dim;
i++)
123 fprintf(file_pt,
"%g ", interpolated_x(
s,
i));
126 fprintf(file_pt,
"\n");
129 fprintf(file_pt,
"\n");
136 namespace TElement1FaceToBulkCoordinates
157 namespace TElement1BulkCoordinateDerivatives
162 unsigned& interior_direction)
165 dsbulk_dsface(0, 0) = 0.0;
168 interior_direction = 0;
176 template<
unsigned NNODE_1D>
188 face_element_pt->
set_halo(Non_halo_proc_ID);
209 face_element_pt->
node_pt(0) = node_pt(0);
228 face_element_pt->
nbulk_value(0) = required_nvalue(0);
233 face_element_pt->
node_pt(0) = node_pt(NNODE_1D - 1);
250 face_element_pt->
nbulk_value(0) = required_nvalue(NNODE_1D - 1);
255 std::ostringstream error_message;
256 error_message <<
"Face_index should only take "
257 <<
"the values +/-1, not " << face_index << std::endl;
260 OOMPH_CURRENT_FUNCTION,
261 OOMPH_EXCEPTION_LOCATION);
276 {2, 4, 1}, {2, 5, 0}, {0, 3, 1}};
280 {2, 6, 5, 1}, {2, 7, 8, 0}, {0, 3, 4, 1}};
287 namespace TElement2FaceToBulkCoordinates
306 s_bulk[0] = 1.0 -
s[0];
317 namespace TElement2BulkCoordinateDerivatives
322 unsigned& interior_direction)
325 dsbulk_dsface(0, 0) = 0.0;
327 dsbulk_dsface(1, 0) = 1.0;
330 interior_direction = 0;
337 unsigned& interior_direction)
340 dsbulk_dsface(0, 0) = 1.0;
342 dsbulk_dsface(1, 0) = 0.0;
345 interior_direction = 1;
351 unsigned& interior_direction)
354 dsbulk_dsface(0, 0) = -1.0;
356 dsbulk_dsface(1, 0) = 1.0;
359 interior_direction = 0;
369 template<
unsigned NNODE_1D>
381 face_element_pt->
set_halo(Non_halo_proc_ID);
385 const unsigned n_face_nodes = NNODE_1D;
404 for (
unsigned i = 0;
i < n_face_nodes;
i++)
408 face_element_pt->
node_pt(
i) = node_pt(bulk_number);
411 face_element_pt->
nbulk_value(
i) = required_nvalue(bulk_number);
478 std::ostringstream error_message;
479 error_message <<
"Face_index should only take "
480 <<
"the values 0, 1 or 2 not " << face_index << std::endl;
483 OOMPH_CURRENT_FUNCTION,
484 OOMPH_EXCEPTION_LOCATION);
492 template<
unsigned NNODE_1D>
496 output(outfile, NNODE_1D);
503 template<
unsigned NNODE_1D>
505 const unsigned& nplot)
511 unsigned n_dim = this->nodal_dimension();
514 outfile << tecplot_zone_string(nplot);
517 unsigned num_plot_points = nplot_points(nplot);
518 for (
unsigned iplot = 0; iplot < num_plot_points; iplot++)
521 get_s_plot(iplot, nplot,
s);
523 for (
unsigned i = 0;
i < n_dim;
i++)
525 outfile << interpolated_x(
s,
i) <<
" ";
527 outfile << std::endl;
531 write_tecplot_zone_footer(outfile, nplot);
537 template<
unsigned NNODE_1D>
540 output(file_pt, NNODE_1D);
547 template<
unsigned NNODE_1D>
554 unsigned n_dim = this->nodal_dimension();
557 fprintf(file_pt,
"%s \n", tecplot_zone_string(nplot).c_str());
560 unsigned num_plot_points = nplot_points(nplot);
561 for (
unsigned iplot = 0; iplot < num_plot_points; iplot++)
564 get_s_plot(iplot, nplot,
s);
566 for (
unsigned i = 0;
i < n_dim;
i++)
568 fprintf(file_pt,
"%g ", interpolated_x(
s,
i));
571 fprintf(file_pt,
"\n");
576 write_tecplot_zone_footer(file_pt, nplot);
588 template<
unsigned NNODE_1D>
591 output(outfile, NNODE_1D);
598 template<
unsigned NNODE_1D>
600 const unsigned& nplot)
606 unsigned n_dim = this->nodal_dimension();
609 outfile << tecplot_zone_string(nplot);
612 unsigned num_plot_points = nplot_points(nplot);
613 for (
unsigned iplot = 0; iplot < num_plot_points; iplot++)
616 get_s_plot(iplot, nplot,
s);
618 for (
unsigned i = 0;
i < n_dim;
i++)
620 outfile << interpolated_x(
s,
i) <<
" ";
626 write_tecplot_zone_footer(outfile, nplot);
633 template<
unsigned NNODE_1D>
636 output(file_pt, NNODE_1D);
643 template<
unsigned NNODE_1D>
650 unsigned n_dim = this->nodal_dimension();
653 fprintf(file_pt,
"%s \n", tecplot_zone_string(nplot).c_str());
656 unsigned num_plot_points = nplot_points(nplot);
657 for (
unsigned iplot = 0; iplot < num_plot_points; iplot++)
660 get_s_plot(iplot, nplot,
s);
662 for (
unsigned i = 0;
i < n_dim;
i++)
664 fprintf(file_pt,
"%g ", interpolated_x(
s,
i));
667 fprintf(file_pt,
"\n");
672 write_tecplot_zone_footer(file_pt, nplot);
679 namespace TElement3FaceToBulkCoordinates
708 s_bulk[0] = 1 -
s[0] -
s[1];
718 {1, 2, 3}, {0, 2, 3}, {0, 1, 3}, {1, 2, 0}};
732 template<
unsigned NNODE_1D>
744 face_element_pt->
set_halo(Non_halo_proc_ID);
748 const unsigned n_face_nodes = (NNODE_1D * (NNODE_1D + 1)) / 2;
768 for (
unsigned i = 0;
i < n_face_nodes;
i++)
772 face_element_pt->
node_pt(
i) = node_pt(bulk_number);
775 face_element_pt->
nbulk_value(
i) = required_nvalue(bulk_number);
842 std::ostringstream error_message;
843 error_message <<
"Face_index should only take "
844 <<
"the values 0, 1, 2 or 3, not " << face_index
848 OOMPH_CURRENT_FUNCTION,
849 OOMPH_EXCEPTION_LOCATION);
857 template<
unsigned DIM>
874 const int& face_index,
FaceElement* face_element_pt)
894 const int& face_index,
FaceElement* face_element_pt)
900 const unsigned n_face_nodes = 7;
917 unsigned bulk_number = Central_node_on_face[face_index];
918 face_element_pt->
node_pt(n_face_nodes - 1) = node_pt(bulk_number);
922 required_nvalue(bulk_number);
936 const int& face_index,
FaceElement* face_element_pt)
944 ->set_lagrangian_dimension(
956 const int& face_index,
FaceElement* face_element_pt)
964 ->set_lagrangian_dimension(
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.
An OomphLibError object which should be thrown when an run-time error is encountered....
////////////////////////////////////////////////////////////////////// //////////////////////////////...
A Class for nodes that deform elastically (i.e. position is an unknown in the problem)....
unsigned nlagrangian() const
Return number of lagrangian coordinates.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
void build_face_element(const int &face_index, FaceElement *face_element_pt)
The face element for is the same in the two-dimesional case.
Specialisation for two-dimensional elements, in which the highest order polynomial is cubic,...
Specialisation for three-dimensional elements, in which the highest order polynomial is quartic,...
static TGauss< 1, NNODE_1D > Default_integration_scheme
Default integration rule: Gaussian integration of same 'order' as the element.
static TGauss< 2, NNODE_1D > Default_integration_scheme
Default integration rule: Gaussian integration of same 'order' as the element.
static TGauss< 3, NNODE_1D > Default_integration_scheme
Default integration rule: Gaussian integration of same 'order' as the element.
const unsigned Node_on_face[3][2]
Assign the nodal translation schemes.
void output()
Doc the command line arguments.
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 face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = 0.0.
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, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the "left" face along which s0 is fixed.
void face1(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the "bottom" face along which s1 is fixed.
void face2(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the sloping face.
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s1 = 0.
void face2(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s2 = 0.
void face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = 0.
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s1 = 0.
void face2(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s2 = 0.
void face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = 0.
void face3(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the sloping face.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...