43 template<
unsigned NNODE_1D>
45 template<
unsigned NNODE_1D>
47 template<
unsigned NNODE_1D>
57 template <
unsigned NNODE_1D>
66 template <
unsigned NNODE_1D>
68 const unsigned &n_plot)
74 outfile <<
"ZONE I=" << n_plot << std::endl;
77 unsigned n_dim = this->nodal_dimension();
80 for(
unsigned l=0;l<n_plot;l++)
82 s[0] = l*1.0/(n_plot-1);
84 for (
unsigned i=0;
i<n_dim;
i++)
86 outfile << interpolated_x(s,
i) <<
" " ;
98 template <
unsigned NNODE_1D>
101 output(file_pt, NNODE_1D);
107 template <
unsigned NNODE_1D>
115 fprintf(file_pt,
"ZONE I=%i\n",n_plot);
118 unsigned n_dim = this->nodal_dimension();
121 for(
unsigned l=0;l<n_plot;l++)
123 s[0] = l*1.0/(n_plot-1);
126 for (
unsigned i=0;
i<n_dim;
i++)
129 fprintf(file_pt,
"%g ",interpolated_x(s,
i));
132 fprintf(file_pt,
"\n");
135 fprintf(file_pt,
"\n");
142 namespace TElement1FaceToBulkCoordinates
163 namespace TElement1BulkCoordinateDerivatives
168 unsigned &interior_direction)
171 dsbulk_dsface(0,0) = 0.0;
174 interior_direction=0;
182 template<
unsigned NNODE_1D>
194 face_element_pt->
set_halo(Non_halo_proc_ID);
215 face_element_pt->
node_pt(0) = node_pt(0);
234 face_element_pt->
nbulk_value(0) = required_nvalue(0);
239 face_element_pt->
node_pt(0) = node_pt(NNODE_1D-1);
256 face_element_pt->
nbulk_value(0) = required_nvalue(NNODE_1D-1);
261 std::ostringstream error_message;
262 error_message <<
"Face_index should only take " 263 <<
"the values +/-1, not " << face_index << std::endl;
266 OOMPH_CURRENT_FUNCTION,
267 OOMPH_EXCEPTION_LOCATION);
286 {{2,6,5,1},{2,7,8,0},{0,3,4,1}};
293 namespace TElement2FaceToBulkCoordinates
312 s_bulk[0] = 1.0 - s[0];
323 namespace TElement2BulkCoordinateDerivatives
328 unsigned &interior_direction)
331 dsbulk_dsface(0,0) = 0.0;
333 dsbulk_dsface(1,0) = 1.0;
336 interior_direction=0;
343 unsigned &interior_direction)
346 dsbulk_dsface(0,0) = 1.0;
348 dsbulk_dsface(1,0) = 0.0;
351 interior_direction=1;
357 unsigned &interior_direction)
360 dsbulk_dsface(0,0) = -1.0;
362 dsbulk_dsface(1,0) = 1.0;
365 interior_direction=0;
375 template<
unsigned NNODE_1D>
387 face_element_pt->
set_halo(Non_halo_proc_ID);
391 const unsigned n_face_nodes = NNODE_1D;
410 for (
unsigned i=0;
i<n_face_nodes;
i++)
414 face_element_pt->
node_pt(
i)=node_pt(bulk_number);
417 face_element_pt->
nbulk_value(
i) = required_nvalue(bulk_number);
484 std::ostringstream error_message;
485 error_message <<
"Face_index should only take " 486 <<
"the values 0, 1 or 2 not " << face_index << std::endl;
489 OOMPH_CURRENT_FUNCTION,
490 OOMPH_EXCEPTION_LOCATION);
501 template<
unsigned NNODE_1D>
505 output(outfile, NNODE_1D);
513 template<
unsigned NNODE_1D>
521 unsigned n_dim = this->nodal_dimension();
524 outfile << tecplot_zone_string(nplot);
527 unsigned num_plot_points=nplot_points(nplot);
528 for (
unsigned iplot=0;iplot<num_plot_points;iplot++)
531 get_s_plot(iplot,nplot,s);
533 for(
unsigned i=0;
i<n_dim;
i++)
535 outfile << interpolated_x(s,
i) <<
" ";
537 outfile << std::endl;
541 write_tecplot_zone_footer(outfile,nplot);
548 template<
unsigned NNODE_1D>
551 output(file_pt, NNODE_1D);
559 template<
unsigned NNODE_1D>
567 unsigned n_dim = this->nodal_dimension();
570 fprintf(file_pt,
"%s \n",tecplot_zone_string(nplot).c_str());
573 unsigned num_plot_points=nplot_points(nplot);
574 for (
unsigned iplot=0;iplot<num_plot_points;iplot++)
577 get_s_plot(iplot,nplot,s);
579 for(
unsigned i=0;
i<n_dim;
i++)
581 fprintf(file_pt,
"%g ", interpolated_x(s,
i));
584 fprintf(file_pt,
"\n");
589 write_tecplot_zone_footer(file_pt,nplot);
603 template<
unsigned NNODE_1D>
606 output(outfile, NNODE_1D);
614 template<
unsigned NNODE_1D>
622 unsigned n_dim = this->nodal_dimension();
625 outfile << tecplot_zone_string(nplot);
628 unsigned num_plot_points=nplot_points(nplot);
629 for (
unsigned iplot=0;iplot<num_plot_points;iplot++)
632 get_s_plot(iplot,nplot,s);
634 for(
unsigned i=0;
i<n_dim;
i++)
636 outfile << interpolated_x(s,
i) <<
" ";
642 write_tecplot_zone_footer(outfile,nplot);
650 template<
unsigned NNODE_1D>
653 output(file_pt, NNODE_1D);
660 template<
unsigned NNODE_1D>
668 unsigned n_dim = this->nodal_dimension();
671 fprintf(file_pt,
"%s \n",tecplot_zone_string(nplot).c_str());
674 unsigned num_plot_points=nplot_points(nplot);
675 for (
unsigned iplot=0;iplot<num_plot_points;iplot++)
678 get_s_plot(iplot,nplot,s);
680 for(
unsigned i=0;
i<n_dim;
i++)
682 fprintf(file_pt,
"%g ", interpolated_x(s,
i));
685 fprintf(file_pt,
"\n");
690 write_tecplot_zone_footer(file_pt,nplot);
698 namespace TElement3FaceToBulkCoordinates
727 s_bulk[0] = 1 - s[0] - s[1];
737 {{1,2,3},{0,2,3},{0,1,3},{1,2,0}};
742 {{1,2,3,7,8,9},{0,2,3,5,8,6},{0,1,3,4,9,6},{1,2,0,7,5,4}};
749 template<
unsigned NNODE_1D>
761 face_element_pt->
set_halo(Non_halo_proc_ID);
765 const unsigned n_face_nodes = (NNODE_1D*(NNODE_1D+1))/2;
785 for (
unsigned i=0;
i<n_face_nodes;
i++)
789 face_element_pt->
node_pt(
i)=node_pt(bulk_number);
792 face_element_pt->
nbulk_value(
i) = required_nvalue(bulk_number);
860 std::ostringstream error_message;
861 error_message <<
"Face_index should only take " 862 <<
"the values 0, 1, 2 or 3, not " 863 << face_index << std::endl;
866 OOMPH_CURRENT_FUNCTION,
867 OOMPH_EXCEPTION_LOCATION);
876 template<
unsigned DIM>
892 const int &face_index,
FaceElement* face_element_pt)
911 const int &face_index,
918 const unsigned n_face_nodes = 7;
935 unsigned bulk_number = Central_node_on_face[face_index];
936 face_element_pt->
node_pt(n_face_nodes-1)=node_pt(bulk_number);
939 face_element_pt->
nbulk_value(n_face_nodes-1) = required_nvalue(bulk_number);
961 set_lagrangian_dimension(static_cast<SolidNode*>(node_pt(0))->nlagrangian());
980 set_lagrangian_dimension(static_cast<SolidNode*>(node_pt(0))->nlagrangian());
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.
int & face_index()
Index of the face (a number that uniquely identifies the face in the element)
BulkCoordinateDerivativesFctPt & bulk_coordinate_derivatives_fct_pt()
Return the pointer to the function that returns the derivatives of the bulk coordinates wrt the face ...
void faces0(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for both faces – the bulk coordinate is fixed on both.
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 face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = 0.0.
static TGauss< 1, NNODE_1D > Default_integration_scheme
Default integration rule: Gaussian integration of same 'order' as the element.
void set_halo(const unsigned &non_halo_proc_ID)
Label the element as halo and specify processor that holds non-halo counterpart.
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s1 = 0.
void build_face_element(const int &face_index, FaceElement *face_element_pt)
static TGauss< 2, NNODE_1D > Default_integration_scheme
Default integration rule: Gaussian integration of same 'order' as the element.
void nbulk_value_resize(const unsigned &i)
Resize the storage for the number of values originally stored at the local nodes to i entries...
const unsigned Node_on_face[3][2]
Assign the nodal translation schemes.
void face2(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the sloping face.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
void output(std::ostream &outfile)
Output with default number of plot points.
static TGauss< 3, NNODE_1D > Default_integration_scheme
Default integration rule: Gaussian integration of same 'order' as the element.
void face0(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the "left" face along which s0 is fixed.
void face2(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s2 = 0.
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s1 = 0.
FiniteElement *& bulk_element_pt()
Pointer to higher-dimensional "bulk" element.
void face2(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s2 = 0.
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...
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.
unsigned & nbulk_value(const unsigned &n)
Return the number of values originally stored at local node n (before the FaceElement added additiona...
void build_face_element(const int &face_index, FaceElement *face_element_pt)
The face element for is the same in the two-dimesional case.
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = 1.0.
SolidFiniteElement class.
void face1(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the "bottom" face along which s1 is fixed.
void face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = 0.