33 #ifndef OOMPH_GENERIC_ELEMENTS_HEADER 34 #define OOMPH_GENERIC_ELEMENTS_HEADER 38 #include <oomph-lib-config.h> 154 #ifdef RANGE_CHECKING 155 if(i >= Ninternal_data)
157 std::ostringstream error_message;
158 error_message <<
"Range Error: Internal data " << i
159 <<
" is not in the range (0," 160 << Ninternal_data-1 <<
")";
162 OOMPH_CURRENT_FUNCTION,
163 OOMPH_EXCEPTION_LOCATION);
175 #ifdef RANGE_CHECKING 176 if(i >= Ninternal_data)
178 std::ostringstream error_message;
179 error_message <<
"Range Error: Internal data " << i
180 <<
" is not in the range (0," 181 << Ninternal_data-1 <<
")";
183 OOMPH_CURRENT_FUNCTION,
184 OOMPH_EXCEPTION_LOCATION);
195 #ifdef RANGE_CHECKING 196 if(i >= Ninternal_data)
198 std::ostringstream error_message;
199 error_message <<
"Range Error: Internal data " << i
200 <<
" is not in the range (0," 201 << Ninternal_data-1 <<
")";
203 OOMPH_CURRENT_FUNCTION,
204 OOMPH_EXCEPTION_LOCATION);
221 const &global_eqn_numbers,
223 const &global_dof_pt);
243 const bool &store_local_dof_pt);
255 const bool &store_local_dof_pt)
270 #ifdef RANGE_CHECKING 271 if(i >= Ninternal_data)
273 std::ostringstream error_message;
274 error_message <<
"Range Error: Internal data " << i
275 <<
" is not in the range (0," 276 << Ninternal_data-1 <<
")";
278 OOMPH_CURRENT_FUNCTION,
279 OOMPH_EXCEPTION_LOCATION);
286 std::ostringstream error_message;
287 error_message <<
"Range Error: value " << j <<
" at internal data " 289 <<
" is not in the range (0," 290 << n_value -1 <<
")";
292 OOMPH_CURRENT_FUNCTION,
293 OOMPH_EXCEPTION_LOCATION);
299 if(Data_local_eqn==0)
302 "Internal local equation numbers have not been allocated",
303 OOMPH_CURRENT_FUNCTION,
304 OOMPH_EXCEPTION_LOCATION);
308 return Data_local_eqn[
i][j];
316 #ifdef RANGE_CHECKING 317 if(i >= Nexternal_data)
319 std::ostringstream error_message;
320 error_message <<
"Range Error: External data " << i
321 <<
" is not in the range (0," 322 << Nexternal_data-1 <<
")";
324 OOMPH_CURRENT_FUNCTION,
325 OOMPH_EXCEPTION_LOCATION);
332 std::ostringstream error_message;
333 error_message <<
"Range Error: value " << j <<
" at internal data " 335 <<
" is not in the range (0," 336 << n_value -1 <<
")";
338 OOMPH_CURRENT_FUNCTION,
339 OOMPH_EXCEPTION_LOCATION);
344 if(Data_local_eqn==0)
347 "External local equation numbers have not been allocated",
348 OOMPH_CURRENT_FUNCTION,
349 OOMPH_EXCEPTION_LOCATION);
354 return Data_local_eqn[Ninternal_data +
i][j];
363 "Empty fill_in_contribution_to_residuals() has been called.\n";
365 "This function is called from the default implementations of\n";
367 "get_residuals() and get_jacobian();\n";
369 "and must calculate the residuals vector without initialising any of ";
370 error_message +=
"its entries.\n\n";
373 "If you do not wish to use these defaults, you must overload both\n";
375 "get_residuals() and get_jacobian(), which must initialise the entries\n";
377 "of the residuals vector and jacobian matrix to zero.\n";
380 "N.B. the default get_jacobian() function employs finite differencing\n";
383 OOMPH_CURRENT_FUNCTION,
384 OOMPH_EXCEPTION_LOCATION);
397 const bool &fd_all_data=
false);
408 const bool &fd_all_data=
false)
430 const bool &fd_all_data=
false);
442 const bool &fd_all_data=
false)
543 double*
const ¶meter_pt,
555 double*
const ¶meter_pt,
567 double*
const ¶meter_pt,
586 Vector<std::pair<unsigned,unsigned> >
const &history_index,
625 #ifdef RANGE_CHECKING 626 if(i >= Ninternal_data)
628 std::ostringstream error_message;
629 error_message <<
"Range Error: Internal data " << i
630 <<
" is not in the range (0," 631 << Ninternal_data - 1 <<
")";
633 OOMPH_CURRENT_FUNCTION,
634 OOMPH_EXCEPTION_LOCATION);
644 #ifdef RANGE_CHECKING 645 if(i >= Ninternal_data)
647 std::ostringstream error_message;
648 error_message <<
"Range Error: Internal data " << i
649 <<
" is not in the range (0," 650 << Ninternal_data - 1 <<
")";
652 OOMPH_CURRENT_FUNCTION,
653 OOMPH_EXCEPTION_LOCATION);
664 #ifdef RANGE_CHECKING 665 if(i >= Nexternal_data)
667 std::ostringstream error_message;
668 error_message <<
"Range Error: External data " << i
669 <<
" is not in the range (0," 670 << Nexternal_data - 1 <<
")";
672 OOMPH_CURRENT_FUNCTION,
673 OOMPH_EXCEPTION_LOCATION);
677 return Data_pt[Ninternal_data +
i];
683 #ifdef RANGE_CHECKING 684 if(i >= Nexternal_data)
686 std::ostringstream error_message;
687 error_message <<
"Range Error: External data " << i
688 <<
" is not in the range (0," 689 << Nexternal_data - 1 <<
")";
691 OOMPH_CURRENT_FUNCTION,
692 OOMPH_EXCEPTION_LOCATION);
696 return Data_pt[Ninternal_data +
i];
711 #ifdef RANGE_CHECKING 712 if(ieqn_local >= Ndof)
714 std::ostringstream error_message;
715 error_message <<
"Range Error: Equation number " << ieqn_local
716 <<
" is not in the range (0," 719 OOMPH_CURRENT_FUNCTION,
720 OOMPH_EXCEPTION_LOCATION);
723 return Eqn_number[ieqn_local];
734 const unsigned n_dof = this->
Ndof;
736 for(
unsigned n=0;n<n_dof;n++)
739 if(ieqn_global==Eqn_number[n]) {
return n;}
761 #ifdef RANGE_CHECKING 762 if(i >= Nexternal_data)
764 std::ostringstream error_message;
765 error_message <<
"Range Error: Internal data " << i
766 <<
" is not in the range (0," 767 << Nexternal_data-1 <<
")";
769 OOMPH_CURRENT_FUNCTION,
770 OOMPH_EXCEPTION_LOCATION);
774 return Data_fd[Ninternal_data +
i];
783 #ifdef RANGE_CHECKING 784 if(i >= Nexternal_data)
786 std::ostringstream error_message;
787 error_message <<
"Range Error: External data " << i
788 <<
" is not in the range (0," 789 << Nexternal_data - 1 <<
")";
791 OOMPH_CURRENT_FUNCTION,
792 OOMPH_EXCEPTION_LOCATION);
797 Data_fd[Ninternal_data +
i] =
false;
804 #ifdef RANGE_CHECKING 805 if(i >= Nexternal_data)
807 std::ostringstream error_message;
808 error_message <<
"Range Error: External data " << i
809 <<
" is not in the range (0," 810 << Nexternal_data - 1 <<
")";
812 OOMPH_CURRENT_FUNCTION,
813 OOMPH_EXCEPTION_LOCATION);
818 Data_fd[Ninternal_data +
i] =
true;
843 std::stringstream error_stream;
844 error_stream <<
"Internal dof array not set up in element.\n" 845 <<
"In order to set it up you must call\n" 846 <<
" Problem::enable_store_local_dof_in_elements()\n" 847 <<
"before the call to Problem::assign_eqn_numbers()\n";
849 OOMPH_CURRENT_FUNCTION,
850 OOMPH_EXCEPTION_LOCATION);
854 dof.resize(this->Ndof);
856 for(
unsigned i=0;
i<this->
Ndof;++
i)
858 dof[
i] = Dof_pt[
i][
t];
869 std::stringstream error_stream;
870 error_stream <<
"Internal dof array not set up in element.\n" 871 <<
"In order to set it up you must call\n" 872 <<
" Problem::enable_store_local_dof_in_elements()\n" 873 <<
"before the call to Problem::assign_eqn_numbers()\n";
875 OOMPH_CURRENT_FUNCTION,
876 OOMPH_EXCEPTION_LOCATION);
880 dof_pt.resize(this->Ndof);
882 for(
unsigned i=0;
i<this->
Ndof;++
i)
884 dof_pt[
i] = Dof_pt[
i];
894 const bool &preserve_existing_data)
896 preserve_existing_data);}
952 const Vector<long> & vector_of_eqn_numbers,
unsigned &index);
1056 double*
const ¶meter_pt,
1069 parameter_pt,dres_dparam,djac_dparam,dmass_matrix_dparam);
1090 const &history_index,
1103 const unsigned n_inner_product = inner_product_vector.size();
1104 for(
unsigned i=0;
i<n_inner_product;++
i)
1105 {inner_product_vector[
i].initialise(0.0);}
1107 inner_product_vector);
1121 std::string error_message =
"compute_norm undefined for this element \n";
1123 OOMPH_CURRENT_FUNCTION,
1124 OOMPH_EXCEPTION_LOCATION);
1128 #ifdef OOMPH_HAS_MPI 1141 bool is_halo()
const {
return (Non_halo_proc_ID!=-1);}
1171 std::ostringstream error_message;
1172 error_message <<
"ndof_types() const has not been implemented for this \n" 1173 <<
"element\n" << std::endl;
1176 OOMPH_CURRENT_FUNCTION,
1177 OOMPH_EXCEPTION_LOCATION);
1188 std::list<std::pair<unsigned long,unsigned> >& dof_lookup_list)
const 1191 std::ostringstream error_message;
1192 error_message <<
"get_dof_numbers_for_unknowns() const has not been \n" 1193 <<
" implemented for this element\n" << std::endl;
1196 OOMPH_CURRENT_FUNCTION,
1197 OOMPH_EXCEPTION_LOCATION);
1221 namespace Locate_zeta_helpers
1255 unsigned &interior_direction);
1314 virtual void assemble_local_to_eulerian_jacobian(
1320 virtual void assemble_local_to_eulerian_jacobian2(
1326 virtual void assemble_eulerian_base_vectors(
1345 {Elemental_dimension = dim; Nodal_dimension = dim;}
1352 {Nodal_dimension = nodal_dim;}
1356 {Nnodal_position_type = nposition_type;}
1379 Node_pt =
new Node*[n];
1381 for(
unsigned i=0;
i<n;
i++) {Node_pt[
i] = 0;}
1388 #ifdef RANGE_CHECKING 1391 std::ostringstream error_message;
1392 error_message <<
"Range Error: Node number " << n
1393 <<
" is not in the range (0," 1396 OOMPH_CURRENT_FUNCTION,
1397 OOMPH_EXCEPTION_LOCATION);
1401 unsigned n_value = node_pt(n)->nvalue();
1404 std::ostringstream error_message;
1405 error_message <<
"Range Error: value " << i <<
" at node " << n
1406 <<
" is not in the range (0," 1407 << n_value -1 <<
")";
1409 OOMPH_CURRENT_FUNCTION,
1410 OOMPH_EXCEPTION_LOCATION);
1416 if(Nodal_local_eqn==0)
1419 "Nodal local equation numbers have not been allocated",
1420 OOMPH_CURRENT_FUNCTION,
1421 OOMPH_EXCEPTION_LOCATION);
1424 return Nodal_local_eqn[n][
i];
1433 double dJ_eulerian_at_knot(
const unsigned &ipt,
1440 static const unsigned N2deriv[];
1446 template<
unsigned DIM>
1469 assemble_local_to_eulerian_jacobian(dpsids,jacobian);
1471 return invert_jacobian_mapping(jacobian,inverse_jacobian);
1483 const unsigned el_dim = dim();
1487 return local_to_eulerian_mapping(dpsids,jacobian,inverse_jacobian);
1496 virtual double local_to_eulerian_mapping_diagonal(
1508 virtual void dJ_eulerian_dnodal_coordinates(
1517 template<
unsigned DIM>
1518 void dJ_eulerian_dnodal_coordinates_templated_helper(
1541 virtual void d_dshape_eulerian_dnodal_coordinates(
1542 const double &det_jacobian,
1560 template<
unsigned DIM>
1561 void d_dshape_eulerian_dnodal_coordinates_templated_helper(
1562 const double &det_jacobian,
1577 &inverse_jacobian,
DShape &dbasis)
const;
1587 &inverse_jacobian,
DShape &dbasis)
const;
1618 template<
unsigned DIM>
1636 template<
unsigned DIM>
1653 virtual void fill_in_jacobian_from_nodal_by_fd(
Vector<double> &residuals,
1662 unsigned n_dof =
ndof();
1667 fill_in_jacobian_from_nodal_by_fd(residuals,jacobian);
1688 {update_in_nodal_fd(i);}
1703 unsigned n_dof =
ndof();
1714 fill_in_jacobian_from_nodal_by_fd(full_residuals,jacobian);
1729 typedef void (*UnsteadyExactSolutionFctPt)(
const double&,
1730 const Vector<double>&,
1747 Node_pt(0), Nodal_local_eqn(0), Nnode(0),
1748 Elemental_dimension(0), Nodal_dimension(0), Nnodal_position_type(1),
1777 "local_coord_is_valid is not implemented for this element\n",
1778 OOMPH_CURRENT_FUNCTION,
1779 OOMPH_EXCEPTION_LOCATION);
1788 "move_local_coords_back_into_element() is not implemented for this element\n",
1789 OOMPH_CURRENT_FUNCTION,
1790 OOMPH_EXCEPTION_LOCATION);
1798 void get_centre_of_gravity_and_max_radius_in_terms_of_zeta(
1799 Vector<double>& cog,
double& max_radius)
const;
1806 "local_coordinate_of_node(...) is not implemented for this element\n",
1807 OOMPH_CURRENT_FUNCTION,
1808 OOMPH_EXCEPTION_LOCATION);
1813 virtual void local_fraction_of_node(
const unsigned &j,
1814 Vector<double> &s_fraction);
1822 "local one_d_fraction_of_node is not implemented for this element\n";
1824 "It only makes sense for elements that use tensor-product expansions\n";
1827 OOMPH_CURRENT_FUNCTION,
1828 OOMPH_EXCEPTION_LOCATION);
1834 {Macro_elem_pt=macro_elem_pt;}
1841 void get_x(
const Vector<double> &s, Vector<double> &x)
const 1844 if(Macro_elem_pt==0) {interpolated_x(s,x);}
1846 else {get_x_from_macro_element(s,x);}
1854 void get_x(
const unsigned &
t,
const Vector<double> &s,
1858 TimeStepper* time_stepper_pt=node_pt(0)->time_stepper_pt();
1869 if((Macro_elem_pt==0)||(t>nprev)) {interpolated_x(t,s,x);}
1871 else {get_x_from_macro_element(t,s,x);}
1880 Vector<double>& x)
const 1883 "get_x_from_macro_element(...) is not implemented for this element\n",
1884 OOMPH_CURRENT_FUNCTION,
1885 OOMPH_EXCEPTION_LOCATION);
1894 const Vector<double>& s,
1898 "get_x_from_macro_element(...) is not implemented for this element\n",
1899 OOMPH_CURRENT_FUNCTION,
1900 OOMPH_EXCEPTION_LOCATION);
1905 virtual void set_integration_scheme(
Integral*
const &integral_pt);
1913 virtual void shape(
const Vector<double> &s,
Shape &psi)
const=0;
1916 virtual void shape_at_knot(
const unsigned &ipt,
Shape &psi)
const;
1926 "dshape_local() is not implemented for this element\n",
1927 OOMPH_CURRENT_FUNCTION,
1928 OOMPH_EXCEPTION_LOCATION);
1933 virtual void dshape_local_at_knot(
const unsigned &ipt,
Shape &psi,
1961 "d2shape_local() is not implemented for this element\n",
1962 OOMPH_CURRENT_FUNCTION,
1963 OOMPH_EXCEPTION_LOCATION);
1983 virtual void d2shape_local_at_knot(
const unsigned &ipt,
Shape &psi,
1988 virtual double J_eulerian(
const Vector<double> &s)
const;
1992 virtual double J_eulerian_at_knot(
const unsigned &ipt)
const;
1996 void check_J_eulerian_at_knots(
bool& passed)
const;
2001 void check_jacobian(
const double &jacobian)
const;
2006 double dshape_eulerian(
const Vector<double> &s,
Shape &psi,
2011 virtual double dshape_eulerian_at_knot(
const unsigned &ipt,
Shape &psi,
2019 virtual double dshape_eulerian_at_knot(
2040 double d2shape_eulerian(
const Vector<double> &s,
Shape &psi,
2061 virtual double d2shape_eulerian_at_knot(
const unsigned &ipt,
Shape &psi,
2069 virtual void assign_nodal_local_eqn_numbers(
2070 const bool &store_local_dof_pt);
2091 virtual void describe_nodal_local_dofs(
2100 const bool &store_local_dof_pt)
2105 assign_nodal_local_eqn_numbers(store_local_dof_pt);
2111 #ifdef RANGE_CHECKING 2114 std::ostringstream error_message;
2115 error_message <<
"Range Error: " << n
2116 <<
" is not in the range (0," 2119 OOMPH_CURRENT_FUNCTION,
2120 OOMPH_EXCEPTION_LOCATION);
2129 #ifdef RANGE_CHECKING 2132 std::ostringstream error_message;
2133 error_message <<
"Range Error: " << n
2134 <<
" is not in the range (0," 2137 OOMPH_CURRENT_FUNCTION,
2138 OOMPH_EXCEPTION_LOCATION);
2162 double raw_nodal_position(
const unsigned &n,
const unsigned &
i)
const;
2177 const unsigned &i)
const 2178 {
return node_pt(n)->x(t,i);}
2183 {
return node_pt(n)->dx_dt(i);}
2188 const unsigned &i)
const 2189 {
return node_pt(n)->dx_dt(j,i);}
2194 const unsigned &i)
const 2195 {
return node_pt(n)->x_gen(k,i);}
2201 const unsigned &k,
const unsigned &i)
const 2202 {
return node_pt(n)->x_gen(t,k,i);}
2210 const unsigned &i)
const 2211 {
return node_pt(n)->dx_gen_dt(k,i);}
2220 const unsigned &i)
const 2221 {
return node_pt(n)->dx_gen_dt(j,k,i);}
2228 {
return node_pt(n)->position(i);}
2234 const unsigned &i)
const 2235 {
return node_pt(n)->position(t,i);}
2239 {
return node_pt(n)->dposition_dt(i);}
2244 const unsigned &i)
const 2245 {
return node_pt(n)->dposition_dt(j,i);}
2250 const unsigned &i)
const 2251 {
return node_pt(n)->position_gen(k,i);}
2256 const unsigned &k,
const unsigned &i)
const 2257 {
return node_pt(n)->position_gen(t,k,i);}
2264 const unsigned &i)
const 2265 {
return node_pt(n)->dposition_gen_dt(k,i);}
2273 const unsigned &i)
const 2274 {
return node_pt(n)->dposition_gen_dt(j,k,i);}
2282 dresidual_dnodal_coordinates);
2299 std::ostringstream warn_message;
2301 <<
"Warning: You have just called the default (empty) function \n\n" 2302 <<
" FiniteElement::disable_ALE() \n\n" 2303 <<
"This suggests that you've either tried to call it for an element\n" 2305 <<
"(1) does not involve time-derivatives (e.g. a Poisson element) \n" 2306 <<
"(2) an element for which the time-derivatives aren't implemented \n" 2307 <<
" in ALE form \n" 2308 <<
"(3) an element for which the ALE form of the equations can't be \n" 2309 <<
" be disabled (yet).\n";
2311 "Problem::disable_ALE()",
2312 OOMPH_EXCEPTION_LOCATION);
2322 std::ostringstream warn_message;
2324 <<
"Warning: You have just called the default (empty) function \n\n" 2325 <<
" FiniteElement::enable_ALE() \n\n" 2326 <<
"This suggests that you've either tried to call it for an element\n" 2328 <<
"(1) does not involve time-derivatives (e.g. a Poisson element) \n" 2329 <<
"(2) an element for which the time-derivatives aren't implemented \n" 2330 <<
" in ALE form \n" 2331 <<
"(3) an element for which the ALE form of the equations can't be \n" 2332 <<
" be disabled (yet)\n" 2333 <<
"(4) an element for which this function has not been (properly) \n " 2334 <<
" implemented. This is likely to be a bug!\n ";
2336 "Problem::enable_ALE()",
2337 OOMPH_EXCEPTION_LOCATION);
2347 {
return Default_Initial_Nvalue;}
2358 unsigned nnod=nnode();
2359 for(
unsigned j=0;j<nnod;j++)
2361 if(node_pt(j)->is_hanging())
2376 std::string error_msg =
"Not implemented for FiniteElement.";
2378 OOMPH_EXCEPTION_LOCATION);
2385 std::string error_msg =
"Not implemented for FiniteElement.";
2387 OOMPH_EXCEPTION_LOCATION);
2396 node_pt(n) =
new Node(Nodal_dimension, Nnodal_position_type,
2397 required_nvalue(n));
2410 node_pt(n) =
new Node(time_stepper_pt, Nodal_dimension,
2411 Nnodal_position_type,
2412 required_nvalue(n));
2425 Nnodal_position_type,
2426 required_nvalue(n));
2441 Nnodal_position_type,
2442 required_nvalue(n));
2449 int get_node_number(
Node*
const &node_pt)
const;
2454 virtual Node* get_node_at_local_coordinate(
const Vector<double> &s)
const;
2466 const {
return node_pt(n)->
raw_value(t,i);}
2471 {
return node_pt(n)->
value(i);}
2476 double nodal_value(
const unsigned &
t,
const unsigned &n,
const unsigned &i)
2477 const {
return node_pt(n)->
value(t,i);}
2482 unsigned dim()
const {
return Elemental_dimension;}
2489 OOMPH_EXCEPTION_LOCATION);
2493 virtual double interpolated_x(
const Vector<double> &s,
2494 const unsigned &i)
const;
2498 virtual double interpolated_x(
const unsigned&
t,
const Vector<double> &s,
2499 const unsigned &i)
const;
2502 virtual void interpolated_x(
const Vector<double> &s,Vector<double>& x)
const;
2506 virtual void interpolated_x(
const unsigned& t,
const Vector<double> &s,
2507 Vector<double>& x)
const;
2512 virtual double interpolated_dxdt(
const Vector<double> &s,
2519 virtual void interpolated_dxdt(
const Vector<double> &s,
2521 Vector<double>& dxdt);
2535 void position(
const Vector<double>& zeta, Vector<double>& r)
2536 const {this->interpolated_x(zeta,r);}
2546 void position(
const unsigned& t,
const Vector<double>& zeta,
2547 Vector<double>& r)
const 2548 {this->interpolated_x(t,zeta,r);}
2556 Vector<double> &drdt)
2557 {this->interpolated_dxdt(zeta,t,drdt);}
2574 const unsigned &i)
const 2577 return nodal_position_gen(n,k,i);
2592 void interpolated_zeta(
const Vector<double> &s,
2593 Vector<double> &zeta)
const;
2604 void locate_zeta(
const Vector<double> &zeta,
2605 GeomObject*& geom_object_pt, Vector<double> &s,
2606 const bool& use_coordinate_as_initial_guess=
false);
2612 virtual void node_update();
2629 virtual void identify_field_data_for_interactions(
2630 std::set<std::pair<Data*,unsigned> > &paired_field_data);
2646 "s_min() isn't implemented for this element\n",
2647 OOMPH_CURRENT_FUNCTION,
2648 OOMPH_EXCEPTION_LOCATION);
2657 "s_max() isn't implemented for this element\n",
2658 OOMPH_CURRENT_FUNCTION,
2659 OOMPH_EXCEPTION_LOCATION);
2670 double size()
const;
2680 "compute_physical_size() isn't implemented for this element\n",
2681 OOMPH_CURRENT_FUNCTION,
2682 OOMPH_EXCEPTION_LOCATION);
2698 Vector<double> data;
2699 this->point_output_data(s,data);
2702 unsigned n=data.size();
2703 for (
unsigned i=0;i<n;i++)
2705 outfile << data[
i] <<
" ";
2715 "This function hasn't been implemented for this element",
2716 OOMPH_CURRENT_FUNCTION,
2717 OOMPH_EXCEPTION_LOCATION);
2729 "This function hasn't been implemented for this element",
2730 OOMPH_CURRENT_FUNCTION,
2731 OOMPH_EXCEPTION_LOCATION);
2742 unsigned nnod=nnode();
2743 if (nnod==0)
return;
2744 unsigned n=node_pt(0)->
ndim();
2747 Vector<double>
s(n,0.0);
2750 Vector<double> x(n,0.0);
2753 unsigned plot=nplot_points_paraview(nplot);
2756 for(
unsigned j=0;j<plot;j++)
2759 this->get_s_plot(j,nplot,s);
2762 this->interpolated_x(s,x);
2766 for(
unsigned i=0;i<n-1;i++)
2768 file_out << x[
i] <<
" ";
2777 file_out <<
" 0" <<
" 0"<< std::endl;
2781 file_out <<
" 0"<< std::endl;
2785 file_out << std::endl;
2791 "Printing PlotPoint to .vtu failed; it has >3 dimensions.",
2792 OOMPH_CURRENT_FUNCTION,
2793 OOMPH_EXCEPTION_LOCATION);
2802 const unsigned& nplot,
2803 unsigned& counter)
const 2806 "This function hasn't been implemented for this element",
2807 OOMPH_CURRENT_FUNCTION,
2808 OOMPH_EXCEPTION_LOCATION);
2815 const unsigned& nplot)
const 2818 "This function hasn't been implemented for this element",
2819 OOMPH_CURRENT_FUNCTION,
2820 OOMPH_EXCEPTION_LOCATION);
2827 const unsigned& nplot,
2828 unsigned& offset_sum)
const 2831 "This function hasn't been implemented for this element",
2832 OOMPH_CURRENT_FUNCTION,
2833 OOMPH_EXCEPTION_LOCATION);
2841 "This function hasn't been implemented for this element",
2842 OOMPH_CURRENT_FUNCTION,
2843 OOMPH_EXCEPTION_LOCATION);
2853 const unsigned& nplot)
const 2856 "This function hasn't been implemented for this element",
2857 OOMPH_CURRENT_FUNCTION,
2858 OOMPH_EXCEPTION_LOCATION);
2865 const unsigned& nplot,
2869 "This function hasn't been implemented for this element",
2870 OOMPH_CURRENT_FUNCTION,
2871 OOMPH_EXCEPTION_LOCATION);
2887 "Output function function hasn't been implemented for this element",
2888 OOMPH_CURRENT_FUNCTION,
2889 OOMPH_EXCEPTION_LOCATION);
2894 virtual void output(std::ostream &outfile,
const unsigned &n_plot)
2897 "Output function function hasn't been implemented for this element",
2898 OOMPH_CURRENT_FUNCTION,
2899 OOMPH_EXCEPTION_LOCATION);
2906 std::ostream &outfile,
2907 const unsigned &n_plot)
const 2910 "Output function function hasn't been implemented for this element",
2911 OOMPH_CURRENT_FUNCTION,
2912 OOMPH_EXCEPTION_LOCATION);
2921 "C-style otput function function hasn't been implemented for this element",
2922 OOMPH_CURRENT_FUNCTION,
2923 OOMPH_EXCEPTION_LOCATION);
2929 virtual void output(FILE* file_pt,
const unsigned &n_plot)
2932 "C-style output function function hasn't been implemented for this element",
2933 OOMPH_CURRENT_FUNCTION,
2934 OOMPH_EXCEPTION_LOCATION);
2938 virtual void output_fct(std::ostream &outfile,
const unsigned &n_plot,
2942 "Output function function hasn't been implemented for exact solution",
2943 OOMPH_CURRENT_FUNCTION,
2944 OOMPH_EXCEPTION_LOCATION);
2949 virtual void output_fct(std::ostream &outfile,
const unsigned &n_plot,
2954 "Output function function hasn't been implemented for exact solution",
2955 OOMPH_CURRENT_FUNCTION,
2956 OOMPH_EXCEPTION_LOCATION);
2960 virtual void output_fct(std::ostream &outfile,
const unsigned &n_plot,
2965 "Output function function hasn't been implemented for exact solution",
2966 OOMPH_CURRENT_FUNCTION,
2967 OOMPH_EXCEPTION_LOCATION);
2978 virtual void get_s_plot(
const unsigned& i,
const unsigned& nplot,
2980 const bool& shifted_to_interior=
false)
const 2983 "get_s_plot(...) is not implemented for this element\n",
2984 OOMPH_CURRENT_FUNCTION,
2985 OOMPH_EXCEPTION_LOCATION);
2993 "tecplot_zone_string(...) is not implemented for this element\n",
2994 OOMPH_CURRENT_FUNCTION,
2995 OOMPH_EXCEPTION_LOCATION);
2996 return "dummy return";
3004 const unsigned& nplot)
3012 const unsigned& nplot)
3020 "nplot_points(...) is not implemented for this element",
3021 OOMPH_CURRENT_FUNCTION,
3022 OOMPH_EXCEPTION_LOCATION);
3035 double& error,
double& norm)
3037 std::string error_message =
"compute_error undefined for this element \n";
3038 outfile << error_message;
3041 OOMPH_CURRENT_FUNCTION,
3042 OOMPH_EXCEPTION_LOCATION);
3051 const double& time,
double& error,
double& norm)
3054 "time-dependent compute_error undefined for this element \n";
3055 outfile << error_message;
3058 OOMPH_CURRENT_FUNCTION,
3059 OOMPH_EXCEPTION_LOCATION);
3071 Vector<double>& error, Vector<double>& norm)
3073 std::string error_message =
"compute_error undefined for this element \n";
3074 outfile << error_message;
3077 "FiniteElement::compute_error()",
3078 OOMPH_EXCEPTION_LOCATION);
3091 Vector<double>& error,
3092 Vector<double>& norm)
3095 "time-dependent compute_error undefined for this element \n";
3096 outfile << error_message;
3099 "FiniteElement::compute_error()",
3100 OOMPH_EXCEPTION_LOCATION);
3113 "compute_abs_error undefined for this element \n";
3114 outfile << error_message;
3117 OOMPH_CURRENT_FUNCTION,
3118 OOMPH_EXCEPTION_LOCATION);
3124 Vector<double>& integral);
3131 Vector<double>& integral);
3138 virtual void build_face_element(
const int &face_index,
3149 const unsigned& i)
const 3151 std::string err =
"Not implemented for this element.";
3153 OOMPH_CURRENT_FUNCTION);
3159 std::string err =
"Not implemented for this element.";
3161 OOMPH_CURRENT_FUNCTION);
3166 std::string err =
"Not implemented for this element.";
3168 OOMPH_CURRENT_FUNCTION);
3174 #ifdef RANGE_CHECKING 3175 if(i > nnode_on_face())
3177 std::string err =
"Face node index i out of range on face.";
3179 OOMPH_CURRENT_FUNCTION);
3186 (
const int& face_index)
const 3188 std::string err =
"Not implemented for this element.";
3190 OOMPH_CURRENT_FUNCTION);
3196 (
const int& face_index)
const 3198 std::string err =
"Not implemented for this element.";
3200 OOMPH_CURRENT_FUNCTION);
3226 this->set_n_node(1);
3229 this->set_integration_scheme(&Default_integration_scheme);
3245 void shape(
const Vector<double> &s,
Shape &psi)
const;
3292 Geom_object_pt(geom_object_pt), IC_time_deriv(0)
3312 return Geom_object_pt;
3318 return IC_time_deriv;
3369 {Lagrangian_dimension = lagrangian_dimension;}
3380 typedef double (*MultiplierFctPt)(
const Vector<double>& xi);
3384 Undeformed_macro_elem_pt(0), Solid_ic_pt(0),
3385 Multiplier_fct_pt(0), Position_local_eqn(0),
3386 Lagrangian_dimension(0), Nnodal_lagrangian_type(1),
3387 Solve_for_consistent_newmark_accel_flag(false)
3413 {
return static_cast<SolidNode*
>(node_pt(j))->variable_position_pt();}
3422 const unsigned n_node=this->nnode();
3423 for(
unsigned n=0;n<n_node;n++)
3425 geometric_data_pt.insert(dynamic_cast<SolidNode*>(this->node_pt(n))
3426 ->variable_position_pt());
3438 const unsigned &i)
const 3439 {
return lagrangian_position_gen(n,k,i);}
3452 Vector<double>& x_fe,
3454 Vector<double>& xi_fe,
3455 Vector<double>& xi)
const 3458 "get_x_and_xi(...) is not implemented for this element\n",
3459 OOMPH_CURRENT_FUNCTION,
3460 OOMPH_EXCEPTION_LOCATION);
3474 Macro_elem_pt=macro_elem_pt;
3475 Undeformed_macro_elem_pt=macro_elem_pt;
3484 Macro_elem_pt=macro_elem_pt;
3485 Undeformed_macro_elem_pt=undeformed_macro_elem_pt;
3492 undeformed_macro_elem_pt)
3493 {Undeformed_macro_elem_pt=undeformed_macro_elem_pt;}
3498 {
return Undeformed_macro_elem_pt;}
3503 double dshape_lagrangian(
const Vector<double> &s,
Shape &psi,
3508 virtual double dshape_lagrangian_at_knot(
const unsigned &ipt,
3529 double d2shape_lagrangian(
const Vector<double> &s,
Shape &psi,
3550 virtual double d2shape_lagrangian_at_knot(
const unsigned &ipt,
3576 node_pt(n) =
new SolidNode(lagrangian_dimension(),
3577 nnodal_lagrangian_type(),
3579 nnodal_position_type(),
3580 required_nvalue(n));
3594 node_pt(n) =
new SolidNode(time_stepper_pt,
3595 lagrangian_dimension(),
3596 nnodal_lagrangian_type(),
3598 nnodal_position_type(),
3599 required_nvalue(n));
3615 nnodal_lagrangian_type(),
3617 nnodal_position_type(),
3618 required_nvalue(n));
3635 lagrangian_dimension(),
3636 nnodal_lagrangian_type(),
3638 nnodal_position_type(),
3639 required_nvalue(n));
3650 const bool &store_local_dof_pt)
3656 assign_solid_local_eqn_numbers(store_local_dof_pt);
3673 {
return static_cast<SolidNode*
>(node_pt(n))->xi(i);}
3678 const unsigned &i)
const 3679 {
return static_cast<SolidNode*
>(node_pt(n))->xi_gen(k,i);}
3683 {
return static_cast<SolidNode*
>(node_pt(n))->lagrangian_position(i);}
3688 const unsigned &i)
const 3689 {
return static_cast<SolidNode*
>(node_pt(n))->lagrangian_position_gen(k,i);}
3693 virtual double interpolated_xi(
const Vector<double> &s,
3694 const unsigned &i)
const;
3698 virtual void interpolated_xi(
const Vector<double> &s,
3699 Vector<double>& xi)
const;
3703 virtual void interpolated_dxids(
const Vector<double> &s,
3712 OOMPH_CURRENT_FUNCTION,
3713 OOMPH_EXCEPTION_LOCATION);
3722 OOMPH_CURRENT_FUNCTION,
3723 OOMPH_EXCEPTION_LOCATION);
3739 {Solve_for_consistent_newmark_accel_flag=
true;}
3743 {Solve_for_consistent_newmark_accel_flag=
false;}
3749 return Multiplier_fct_pt;
3758 return Multiplier_fct_pt;
3779 fill_in_residuals_for_solid_ic(residuals);
3800 fill_in_generic_jacobian_for_solid_ic(
3822 fill_in_generic_jacobian_for_solid_ic(residuals,jacobian,1);
3853 void fill_in_generic_jacobian_for_solid_ic(Vector<double> &residuals,
3855 const unsigned& flag);
3860 {Nnodal_lagrangian_type = nlagrangian_type;}
3873 assemble_local_to_lagrangian_jacobian(dpsids,jacobian);
3875 return invert_jacobian_mapping(jacobian,inverse_jacobian);
3886 unsigned el_dim = dim();
3890 return local_to_lagrangian_mapping(dpsids,jacobian,inverse_jacobian);
3899 virtual double local_to_lagrangian_mapping_diagonal(
3908 virtual void assign_solid_local_eqn_numbers(
const bool &store_local_dof);
3911 void describe_solid_local_dofs(std::ostream& out,
3923 const unsigned &j)
const 3925 #ifdef RANGE_CHECKING 3926 std::ostringstream error_message;
3931 error_message <<
"Range Error: Nodal number " << n
3932 <<
" is not in the range (0," 3936 if(k >= nnodal_position_type())
3939 error_message <<
"Range Error: Position type " << k
3940 <<
" is not in the range (0," 3941 << nnodal_position_type() <<
")";
3944 if(j >= nodal_dimension())
3947 error_message <<
"Range Error: Nodal coordinate " << j
3948 <<
" is not in the range (0," 3949 << nodal_dimension() <<
")";
3956 OOMPH_CURRENT_FUNCTION,
3957 OOMPH_EXCEPTION_LOCATION);
3962 return Position_local_eqn[(n*nnodal_position_type() + k)*nodal_dimension()
3979 if(Solve_for_consistent_newmark_accel_flag)
3981 fill_in_jacobian_for_newmark_accel(jacobian);
3986 unsigned n_dof =
ndof();
3987 Vector<double> full_residuals(n_dof);
3991 fill_in_jacobian_from_solid_position_by_fd(full_residuals,jacobian);
3999 fill_in_jacobian_from_nodal_by_fd(full_residuals,jacobian);
4008 fill_in_jacobian_from_solid_position_by_fd(Vector<double> &residuals,
4017 unsigned n_dof =
ndof();
4018 Vector<double> residuals(n_dof,0.0);
4022 fill_in_jacobian_from_solid_position_by_fd(residuals,jacobian);
4044 {update_in_solid_position_fd(i);}
4051 virtual void assemble_local_to_lagrangian_jacobian(
4057 virtual void assemble_local_to_lagrangian_jacobian2(
4100 if(Multiplier_fct_pt==0)
4107 return (*Multiplier_fct_pt)(xi);
4135 Vector<double> &s_bulk);
4144 unsigned &interior_direction);
4226 const unsigned n_node=nnode();
4229 for (
unsigned n=0;n<n_node;n++)
4233 this->node_pt(n))->assign_additional_values_with_face_id(
4234 nadditional_values[n],
id);
4243 Bulk_coordinate_derivatives_fct_pt(0), Normal_sign(0), Face_index(0),
4244 Boundary_number_in_bulk_mesh(0), Bulk_element_pt(0), Tangent_direction_pt(0)
4248 Boundary_number_in_bulk_mesh_has_been_set =
false;
4252 Bulk_position_type.push_back(0);
4273 {
return Boundary_number_in_bulk_mesh;}
4279 Boundary_number_in_bulk_mesh=b;
4281 Boundary_number_in_bulk_mesh_has_been_set=
true;
4292 double zeta_nodal(
const unsigned &n,
const unsigned &k,
const unsigned &i)
4296 Vector<double> zeta(this->dim());
4300 Boundary_number_in_bulk_mesh,k,zeta);
4309 double J_eulerian(
const Vector<double> &s)
const;
4314 double J_eulerian_at_knot(
const unsigned &ipt)
const;
4318 void check_J_eulerian_at_knots(
bool& passed)
const;
4325 Vector<double> s_bulk(dim()+1);
4326 s_bulk=local_coordinate_in_bulk(s);
4329 return bulk_element_pt()->interpolated_x(s_bulk,i);
4336 const unsigned &i)
const 4339 Vector<double> s_bulk(dim()+1);
4340 s_bulk=local_coordinate_in_bulk(s);
4343 return bulk_element_pt()->interpolated_x(t,s_bulk,i);
4351 Vector<double> s_bulk(dim()+1);
4352 s_bulk=local_coordinate_in_bulk(s);
4355 bulk_element_pt()->interpolated_x(s_bulk,x);
4362 Vector<double>& x)
const 4365 Vector<double> s_bulk(dim()+1);
4366 s_bulk=local_coordinate_in_bulk(s);
4369 bulk_element_pt()->interpolated_x(t,s_bulk,x);
4380 Vector<double> s_bulk(dim()+1);
4381 s_bulk=local_coordinate_in_bulk(s);
4384 return bulk_element_pt()->interpolated_dxdt(s_bulk,i,t);
4392 Vector<double>& dxdt)
4395 Vector<double> s_bulk(dim()+1);
4396 s_bulk=local_coordinate_in_bulk(s);
4399 bulk_element_pt()->interpolated_dxdt(s_bulk,t,dxdt);
4421 return Tangent_direction_pt;
4429 if(tangent_direction_pt == 0)
4431 std::ostringstream error_message;
4433 <<
"The pointer tangent_direction_pt is null.\n";
4435 OOMPH_CURRENT_FUNCTION,
4436 OOMPH_EXCEPTION_LOCATION);
4441 unsigned tang_dir_size = tangent_direction_pt->size();
4442 unsigned spatial_dimension = this->nodal_dimension();
4443 if(tang_dir_size != spatial_dimension)
4445 std::ostringstream error_message;
4447 <<
"The tangent direction vector has size " << tang_dir_size <<
"\n" 4448 <<
"but this element has spatial dimension " << spatial_dimension
4451 OOMPH_CURRENT_FUNCTION,
4452 OOMPH_EXCEPTION_LOCATION);
4455 if(tang_dir_size == 2)
4457 std::ostringstream warning_message;
4459 <<
"The spatial dimension is " << spatial_dimension <<
".\n" 4460 <<
"I do not need a tangent direction vector to create \n" 4461 <<
"continuous tangent vectors in two spatial dimensions.";
4463 OOMPH_CURRENT_FUNCTION,
4464 OOMPH_EXCEPTION_LOCATION);
4470 Tangent_direction_pt = tangent_direction_pt;
4494 void continuous_tangent_and_outer_unit_normal
4495 (
const Vector<double> &s,
Vector<Vector<double> > &tang_vec,
4496 Vector<double> &unit_normal)
const;
4502 void continuous_tangent_and_outer_unit_normal
4503 (
const unsigned &ipt,
Vector<Vector<double> > &tang_vec,
4504 Vector<double> &unit_normal)
const;
4507 void outer_unit_normal(
const Vector<double> &s,
4508 Vector<double> &unit_normal)
const;
4511 void outer_unit_normal(
const unsigned &ipt,
4512 Vector<double> &unit_normal)
const;
4523 #pragma clang diagnostic push 4524 #pragma clang diagnostic ignored "-Woverloaded-virtual" 4530 {
return Face_to_bulk_coordinate_fct_pt;}
4535 {
return Face_to_bulk_coordinate_fct_pt;}
4541 {
return Bulk_coordinate_derivatives_fct_pt;}
4546 {
return Bulk_coordinate_derivatives_fct_pt;}
4549 #pragma clang diagnostic pop 4554 Vector<double> local_coordinate_in_bulk(
const Vector<double>& s)
const;
4558 void get_local_coordinate_in_bulk(
const Vector<double> &s,
4559 Vector<double> &s_bulk)
const;
4565 void get_ds_bulk_ds_face(
const Vector<double> &s,
4567 unsigned &interior_direction)
const;
4572 {
return Bulk_position_type[
i];}
4577 {
return Bulk_position_type[
i];}
4589 {
return Bulk_node_number[n];}
4593 {Bulk_position_type.resize(i);}
4603 {
return Nbulk_value[n];}
4629 unsigned n_node = nnode();
4631 for(
unsigned l=0;l<n_node;l++)
4634 unsigned Initial_Nvalue = node_pt(l)->
nvalue();
4636 unsigned Nadditional = nadditional_data_values[l];
4638 if((Initial_Nvalue == Nbulk_value[l]) && (Nadditional > 0))
4641 node_pt(l)->
resize(Nbulk_value[l]+Nadditional);
4647 void output_zeta(std::ostream &outfile,
const unsigned& nplot);
4670 const unsigned &i)
const 4684 const unsigned &i)
const 4687 Vector<double> s_bulk(dim()+1);
4688 s_bulk=local_coordinate_in_bulk(s);
4692 interpolated_xi(s_bulk,i);
4705 Vector<double>& xi)
const 4708 Vector<double> s_bulk(dim()+1);
4709 s_bulk=local_coordinate_in_bulk(s);
4713 interpolated_xi(s_bulk,xi);
4751 template<
class ELEMENT>
4768 template <
class ELEMENT>
4778 const int &face_index) :
4798 const unsigned &i)
const 4804 outfile <<
"ZONE" << std::endl;
4805 unsigned nnod=nnode();
4806 for (
unsigned j=0;j<nnod;j++)
4808 Node* nod_pt=node_pt(j);
4809 unsigned dim=nod_pt->
ndim();
4810 for (
unsigned i=0;i<dim;i++)
4812 outfile << nod_pt->
x(i) <<
" ";
4814 outfile << std::endl;
4819 void output(std::ostream &outfile,
const unsigned &n_plot)
4827 void output(FILE* file_pt,
const unsigned &n_plot)
4855 virtual void get_drag_and_torque(Vector<double>& drag_force,
4856 Vector<double>& drag_torque)=0;
4875 template <
class ELEMENT>
4883 FaceGeometry<ELEMENT>(), Boundary_number_in_bulk_mesh(0)
4888 Boundary_number_in_bulk_mesh_has_been_set =
false;
4895 {
return Boundary_number_in_bulk_mesh;}
4901 Boundary_number_in_bulk_mesh=b;
4903 Boundary_number_in_bulk_mesh_has_been_set=
true;
4914 double zeta_nodal(
const unsigned &n,
const unsigned &k,
const unsigned &i)
4918 Vector<double> zeta(this->dim());
4922 Boundary_number_in_bulk_mesh,k,zeta);
4970 "SolidElementWithDiagonalMassMatrix");
4978 "SolidElementWithDiagonalMassMatrix");
4985 virtual void get_mass_matrix_diagonal(Vector<double> &mass_diag)=0;
5023 "NavierStokesElementWithDiagonalMassMatrices");
5031 "NavierStokesElementWithDiagonalMassMatrices");
5038 virtual void get_pressure_and_velocity_mass_matrix_diagonal(
5039 Vector<double> &press_mass_diag, Vector<double> &veloc_mass_diag,
5040 const unsigned& which_one=0)=0;
unsigned Boundary_number_in_bulk_mesh
The boundary number in the bulk mesh to which this element is attached.
virtual double local_to_lagrangian_mapping(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Calculate the mapping from local to lagrangian coordinates, given the derivatives of the shape functi...
virtual std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction") ...
double raw_value(const unsigned &i) const
Return the i-th value stored at the Node. This interface does NOT take the hanging status of the Node...
virtual void enable_ALE()
(Re-)enable ALE, i.e. take possible mesh motion into account when evaluating the time-derivative. This function is empty and simply establishes a common interface for all derived elements that are formulated in ALE form.
A Generalised Element class.
PointElement(const PointElement &)
Broken copy constructor.
virtual void get_residuals(Vector< double > &residuals)
Calculate the vector of residuals of the equations in the element. By default initialise the vector t...
virtual void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
Plot the error when compared against a given exact solution . Also calculates the norm of the error a...
virtual double compute_physical_size() const
Broken virtual function to compute the actual size (taking into account factors such as 2pi or radii ...
virtual void reset_after_internal_fd()
Function that is call after the finite differencing of the internal data. This may be overloaded to r...
double raw_nodal_position_gen(const unsigned &t, const unsigned &n, const unsigned &k, const unsigned &i) const
Return the generalised nodal position (type k, i-th variable) at previous timesteps at local node n...
void assign_internal_eqn_numbers(unsigned long &global_number, Vector< double *> &Dof_pt)
Assign the global equation numbers to the internal Data. The arguments are the current highest global...
void operator=(const GeneralisedElement &)
Broken assignment operator.
DummyFaceElement()
Constructor.
virtual void output_fct(std::ostream &outfile, const unsigned &n_plot, const double &time, const SolutionFunctorBase &exact_soln) const
Output a time-dependent exact solution over the element.
virtual void point_output_data(const Vector< double > &s, Vector< double > &data)
Virtual function to write the double precision numbers that appear in a single line of output into th...
virtual void compute_abs_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error)
Plot the error when compared against a given exact solution . Also calculates the maximum absolute er...
void clear_global_eqn_numbers()
Clear the storage for the global equation numbers and pointers to dofs (if stored) ...
void get_x(const Vector< double > &s, Vector< double > &x) const
Global coordinates as function of local coordinates. Either via FE representation or via macro-elemen...
virtual unsigned nscalar_paraview() const
Number of scalars/fields output by this element. Broken virtual. Needs to be implemented for each new...
void read_internal_data_values_from_vector(const Vector< double > &vector_of_values, unsigned &index)
Read all internal data and time history values from the vector starting from index. On return the index will be set to the value at the end of the data that has been read in.
virtual void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Get local coordinates of node j in the element; vector sets its own size (broken virtual) ...
virtual void identify_geometric_data(std::set< Data *> &geometric_data_pt)
The purpose of this function is to identify all Data objects that affect the elements' geometry...
bool has_hanging_nodes() const
Return boolean to indicate if any of the element's nodes are geometrically hanging.
double raw_nodal_value(const unsigned &n, const unsigned &i) const
Return the i-th value stored at local node n but do NOT take hanging nodes into account.
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
virtual void reset_in_nodal_fd(const unsigned &i)
Function called within the finite difference loop for nodal data after the i-th nodal values is reset...
virtual void assign_additional_local_eqn_numbers()
Setup any additional look-up schemes for local equation numbers. Examples of use include using local ...
void set_must_be_kept_as_halo()
Insist that this element be kept as a halo element during a distribute?
double Radius_multiplier_for_fast_exit_from_locate_zeta
Multiplier for (zeta-based) outer radius of element used for deciding that point is outside element...
virtual void fill_in_contribution_to_residuals(Vector< double > &residuals)
Add the elemental contribution to the residuals vector. Note that this function will NOT initialise t...
void add_global_eqn_numbers(std::deque< unsigned long > const &global_eqn_numbers, std::deque< double *> const &global_dof_pt)
Add the contents of the queue global_eqn_numbers to the local storage for the local-to-global transla...
virtual void get_residuals_for_solid_ic(Vector< double > &residuals)
Compute the residuals for the setup of an initial condition. The global equations are: where is the...
void initialise(const T &val)
Initialize all values in the matrix to val.
void dposition_dt(const Vector< double > &zeta, const unsigned &t, Vector< double > &drdt)
Return the t-th time derivative of the parametrised position of the FiniteElement in its GeomObject i...
std::vector< bool > Data_fd
Storage for boolean flags of size Ninternal_data + Nexternal_data that correspond to the data used in...
virtual void assign_all_generic_local_eqn_numbers(const bool &store_local_dof_pt)
Overloaded version of the calculation of the local equation numbers. If the boolean argument is true ...
virtual void reset_in_internal_fd(const unsigned &i)
Function called within the finite difference loop for internal data after the values in the i-th exte...
Node * construct_boundary_node(const unsigned &n, TimeStepper *const &time_stepper_pt)
Construct the local node n and return a pointer to it, in the case when the node MAY be located on a ...
virtual unsigned required_nvalue(const unsigned &n) const
Number of values that must be stored at local node n by the element. The default is 0...
virtual void assign_all_generic_local_eqn_numbers(const bool &store_local_dof_pt)
Overload assign_all_generic_local_equation numbers to include the data associated with solid dofs...
virtual void disable_ALE()
This is an empty function that establishes a uniform interface for all (derived) elements that involv...
void include_internal_data_fd(const unsigned &i)
Set the boolean flag to include the internal datum in the finite difference loop when computing the j...
unsigned Nnodal_lagrangian_type
The number of coordinate types requried to intepolate the Lagrangian coordinates in the element...
Data * geom_data_pt(const unsigned &j)
Return pointer to the j-th Data item that the object's shape depends on. (Redirects to the nodes' pos...
Node *const & node_pt(const unsigned &n) const
Return a pointer to the local node n (const version)
void resize_nodes(Vector< unsigned > &nadditional_data_values)
Provide additional storage for a specified number of values at the nodes of the FaceElement. (This is needed, for instance, in free-surface elements, if the non-penetration condition is imposed by Lagrange multipliers whose values are only stored at the surface nodes but not in the interior of the bulk element). nadditional_data_values[n] specifies the number of additional values required at node n of the FaceElement. Note: Since this function is executed separately for each FaceElement, nodes that are common to multiple elements might be resized repeatedly. To avoid this, we only allow a single resize operation by comparing the number of values stored at each node to the number of values the node had when it was simply a member of the associated "bulk" element. There are cases where this will break! – e.g. if a node is common to two FaceElements which require additional storage for distinct quantities. Such cases need to be handled by "hand-crafted" face elements.
static bool Ignore_discontinuous_tangent_warning
Ignores the warning when the tangent vectors from continuous_tangent_and_outer_unit_normal may not be...
unsigned nnodal_lagrangian_type() const
Return the number of types of (generalised) nodal Lagrangian coordinates required to interpolate the ...
virtual ElementGeometry::ElementGeometry element_geometry() const
Return the geometry type of the element (either Q or T usually).
Vector< unsigned > Bulk_position_type
Vector holding integers to translate additional position types to those of the "bulk" element; e...
A class to specify the initial conditions for a solid body. Solid bodies are often discretised with H...
virtual void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Function to compute the geometric shape functions and also first and second derivatives w...
virtual void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
Get cector of local coordinates of plot point i (when plotting nplot points in each "coordinate direc...
FiniteElement * bulk_element_pt() const
Pointer to higher-dimensional "bulk" element (const version)
void interpolated_x(const Vector< double > &s, Vector< double > &x) const
Return FE interpolated position x[] at local coordinate s as Vector Overloaded to get information fro...
virtual void move_local_coord_back_into_element(Vector< double > &s) const
Adjust local coordinates so that they're located inside the element.
unsigned lagrangian_dimension() const
Return the number of Lagrangian coordinates that the element requires at all nodes. This is by default the elemental dimension. If we ever need any other case, it can be implemented.
virtual void get_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the elemental Jacobian matrix "d equation / d variable".
virtual void output(std::ostream &outfile)
Output the element data — typically the values at the nodes in a format suitable for post-processing...
void operator=(const SolidElementWithDiagonalMassMatrix &)
Broken assignment operator.
unsigned long * Eqn_number
Storage for the global equation numbers represented by the degrees of freedom in the element...
NavierStokesElementWithDiagonalMassMatrices(const NavierStokesElementWithDiagonalMassMatrices &)
Broken copy constructor.
unsigned & ic_time_deriv()
Which time derivative are we currently assigning?
Data * geom_data_pt(const unsigned &j)
A standard FiniteElement is fixed, so there are no geometric data when viewed in its GeomObject incar...
virtual void get_djacobian_dparameter(double *const ¶meter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
Calculate the derivatives of the elemental Jacobian matrix and residuals with respect to a parameter...
void fill_in_jacobian_from_internal_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
Calculate the contributions to the jacobian from the internal degrees of freedom using finite differe...
void position(const unsigned &t, const Vector< double > &zeta, Vector< double > &r) const
Return the parametrised position of the FiniteElement in its GeomObject incarnation: r(zeta)...
double nodal_position(const unsigned &n, const unsigned &i) const
Return the i-th coordinate at local node n. If the node is hanging, the appropriate interpolation is ...
SolidInitialCondition *& solid_ic_pt()
Pointer to object that describes the initial condition.
virtual unsigned ndof_types() const
The number of types of degrees of freedom in this element are sub-divided into.
unsigned Max_newton_iterations
Maximum number of newton iterations.
GeomObject *& geom_object_pt()
(Reference to) pointer to geom object that specifies the initial condition
virtual unsigned nplot_points_paraview(const unsigned &nplot) const
Return the number of actual plot points for paraview plot with parameter nplot. Broken virtual; can b...
void(* CoordinateMappingFctPt)(const Vector< double > &s, Vector< double > &s_bulk)
Typedef for the function that translates the face coordinate to the coordinate in the bulk element...
double nodal_value(const unsigned &t, const unsigned &n, const unsigned &i) const
Return the i-th value stored at local node n, at time level t (t=0: present; t>0 previous timesteps)...
double dnodal_position_gen_dt(const unsigned &j, const unsigned &n, const unsigned &k, const unsigned &i) const
i-th component of j-th time derivative of the generalised position, dx(k,i)/dt at local node n...
double local_to_eulerian_mapping(const DShape &dpsids, DenseMatrix< double > &inverse_jacobian) const
Calculate the mapping from local to Eulerian coordinates, given the derivatives of the shape function...
int & face_index()
Index of the face (a number that uniquely identifies the face in the element)
MultiplierFctPt multiplier_fct_pt() const
Access function: Pointer to multiplicator function for assignment of consistent assignement of initia...
void position(const Vector< double > &zeta, Vector< double > &r) const
Return the parametrised position of the FiniteElement in its incarnation as a GeomObject, r(zeta). The position is given by the Eulerian coordinate and the intrinsic coordinate (zeta) is the local coordinate of the element (s).
virtual void update_in_solid_position_fd(const unsigned &i)
Function called within the finite difference loop for the solid position dat after a change in any va...
virtual void get_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &mass_matrix)
Calculate the residuals and the elemental "mass" matrix, the matrix that multiplies the time derivati...
virtual void fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter(double *const ¶meter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
Add the elemental contribution to the derivative of the jacobian matrix, mass matrix and the residual...
virtual void fill_in_contribution_to_hessian_vector_products(Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
Fill in contribution to the product of the Hessian (derivative of Jacobian with respect to all variab...
virtual void fill_in_contribution_to_inner_products(Vector< std::pair< unsigned, unsigned > > const &history_index, Vector< double > &inner_product)
Fill in the contribution to the inner products between given pairs of history values.
double dnodal_position_gen_dt(const unsigned &n, const unsigned &k, const unsigned &i) const
i-th component of time derivative (velocity) of the generalised position, dx(k,i)/dt at local node n...
void interpolated_x(const unsigned &t, const Vector< double > &s, Vector< double > &x) const
Return FE interpolated position x[] at local coordinate s at previous timestep t as Vector (t=0: pres...
static bool Accept_negative_jacobian
Boolean that if set to true allows a negative jacobian in the transform between global and local coor...
void output(std::ostream &outfile)
Output nodal coordinates.
unsigned Boundary_number_in_bulk_mesh
The boundary number in the bulk mesh to which this element is attached.
void get_x(const unsigned &t, const Vector< double > &s, Vector< double > &x)
Global coordinates as function of local coordinates at previous time "level" t (t=0: present; t>0: pr...
unsigned Elemental_dimension
The spatial dimension of the element, i.e. the number of local coordinates used to parametrize it...
const unsigned & boundary_number_in_bulk_mesh() const
Access function for the boundary number in bulk mesh.
NavierStokesElementWithDiagonalMassMatrices()
Empty constructor.
virtual void update_in_external_fd(const unsigned &i)
Function called within the finite difference loop for external data after a change in any values in t...
virtual ~NavierStokesElementWithDiagonalMassMatrices()
Virtual destructor.
virtual void compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
Plot the error when compared against a given time-dependent exact solution . Also calculates the norm...
BulkCoordinateDerivativesFctPt & bulk_coordinate_derivatives_fct_pt()
Return the pointer to the function that returns the derivatives of the bulk coordinates wrt the face ...
virtual void fill_in_contribution_to_djacobian_dparameter(double *const ¶meter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
Add the elemental contribution to the derivatives of the elemental Jacobian matrix and residuals with...
double raw_dnodal_position_gen_dt(const unsigned &n, const unsigned &k, const unsigned &i) const
i-th component of time derivative (velocity) of the generalised position, dx(k,i)/dt at local node n...
A general Finite Element class.
virtual void scalar_value_paraview(std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
Write values of the i-th scalar field at the plot points. Broken virtual. Needs to be implemented for...
unsigned ngeom_data() const
A standard FiniteElement is fixed, so there are no geometric data when viewed in its GeomObject incar...
GeneralisedElement() GeneralisedElement(const GeneralisedElement &)
Constructor: Initialise all pointers and all values to zero.
void set_internal_data_time_stepper(const unsigned &i, TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
Set the timestepper associated with the i-th internal data object.
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Function pointer for function that computes Vector-valued time-dependent function as ...
SolidInitialCondition(GeomObject *geom_object_pt)
Constructor: Pass geometric object; initialise time deriv to 0.
void output(FILE *file_pt)
C-style output.
double zeta_nodal(const unsigned &n, const unsigned &k, const unsigned &i) const
In a FaceElement, the "global" intrinsic coordinate of the element along the boundary, when viewed as part of a compound geometric object is specified using the boundary coordinate defined by the mesh. Note: Boundary coordinates will have been set up when creating the underlying mesh, and their values will have been stored at the nodes.
double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s. Overloaded to get information from bulk...
static PointIntegral Default_integration_scheme
Return spatial dimension of element (=number of local coordinates needed to parametrise the element) ...
void exclude_internal_data_fd(const unsigned &i)
Set the boolean flag to exclude the internal datum from the finite difference loop when computing the...
virtual int face_outer_unit_normal_sign(const int &face_index) const
Get the sign of the outer unit normal on the face given by face_index.
bool is_halo() const
Is this element a halo?
double raw_nodal_value(const unsigned &t, const unsigned &n, const unsigned &i) const
Return the i-th value stored at local node n, at time level t (t=0: present; t>0 previous timesteps)...
virtual Node * construct_boundary_node(const unsigned &n)
Construct the local node n as a boundary node; that is a node that MAY be placed on a mesh boundary a...
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
void fill_in_jacobian_from_nodal_by_fd(DenseMatrix< double > &jacobian)
Calculate the contributions to the jacobian from the nodal degrees of freedom using finite difference...
void identify_geometric_data(std::set< Data *> &geometric_data_pt)
Specify Data that affects the geometry of the element by adding the position Data to the set that's p...
virtual void get_inner_products(Vector< std::pair< unsigned, unsigned > > const &history_index, Vector< double > &inner_product)
Return the vector of inner product of the given pairs of history values.
virtual void output(FILE *file_pt, const unsigned &n_plot)
Output the element data — pass (some measure of) the number of plot points per element (C style outp...
void output_paraview(std::ofstream &file_out, const unsigned &nplot) const
Paraview output – this outputs the coordinates at the plot points (for parameter nplot) to specified...
unsigned Lagrangian_dimension
The Lagrangian dimension of the nodes stored in the element, / i.e. the number of Lagrangian coordina...
Vector< double > * Tangent_direction_pt
A general direction pointer for the tangent vectors. This is used in the function continuous_tangent_...
virtual void get_inner_product_vectors(Vector< unsigned > const &history_index, Vector< Vector< double > > &inner_product_vector)
Compute the vectors that when taken as a dot product with other history values give the inner product...
void interpolated_dxdt(const Vector< double > &s, const unsigned &t, Vector< double > &dxdt)
Compte t-th time-derivative of the FE-interpolated Eulerian coordinate vector at local coordinate s...
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
CoordinateMappingFctPt Face_to_bulk_coordinate_fct_pt
Pointer to a function that translates the face coordinate to the coordinate in the bulk element...
unsigned & bulk_node_number(const unsigned &n)
Return the bulk node number that corresponds to the n-th local node number.
int * Position_local_eqn
Array to hold the local equation number information for the solid equations, whatever they may be...
void set_boundary_number_in_bulk_mesh(const unsigned &b)
Set function for the boundary number in bulk mesh.
virtual void J_lagrangian(const Vector< double > &s) const
Return the Jacobian of mapping from local to Lagrangian coordinates at local position s...
void fill_in_residuals_for_solid_ic(Vector< double > &residuals)
Fill in the residuals for the setup of an initial condition. The global equations are: where is the...
MacroElement * undeformed_macro_elem_pt()
Access function to pointer to "undeformed" macro element.
void(* BulkCoordinateDerivativesFctPt)(const Vector< double > &s, DenseMatrix< double > &ds_bulk_dsface, unsigned &interior_direction)
Typedef for the function that returns the partial derivative of the local coordinates in the bulk ele...
FaceElement(const FaceElement &)
Broken copy constructor.
virtual void get_hessian_vector_products(Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
Calculate the product of the Hessian (derivative of Jacobian with respect to all variables) an eigenv...
void enable_solve_for_consistent_newmark_accel()
Set to alter the problem being solved when assigning the initial conditions for time-dependent proble...
void fill_in_jacobian_from_external_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
Calculate the contributions to the jacobian from the external degrees of freedom using finite differe...
bool Boundary_number_in_bulk_mesh_has_been_set
Has the Boundary_number_in_bulk_mesh been set? Only included if compiled with PARANOID switched on...
unsigned add_external_data(Data *const &data_pt, const bool &fd=true)
virtual void update_before_solid_position_fd()
Function that is called before the finite differencing of any solid position data. This may be overloaded to update any slaved data before finite differencing takes place.
virtual void get_coordinates_on_boundary(const unsigned &b, const unsigned &k, Vector< double > &boundary_zeta)
Return the vector of the k-th generalised boundary coordinates on mesh boundary b. Broken virtual interface provides run-time error checking.
virtual unsigned nplot_points(const unsigned &nplot) const
Return total number of plot points (when plotting nplot points in each "coordinate direction") ...
unsigned Ndof
Number of degrees of freedom.
MultiplierFctPt & multiplier_fct_pt()
Access function: Pointer to multiplicator function for assignment of consistent assignement of initia...
double lagrangian_position(const unsigned &n, const unsigned &i) const
Return i-th Lagrangian coordinate at local node n.
void set_n_node(const unsigned &n)
Set the number of nodes in the element to n, by resizing the storage for pointers to the Node objects...
void add_additional_values(const Vector< unsigned > &nadditional_values, const unsigned &id)
Helper function adding additional values for the unknowns associated with the FaceElement. This function also sets the map containing the position of the first entry of this face element's additional values.The inputs are the number of additional values and the face element's ID. Note the same number of additonal values are allocated at ALL nodes.
void fill_in_jacobian_from_solid_position_by_fd(DenseMatrix< double > &jacobian)
Use finite differences to calculate the Jacobian entries corresponding to the solid positions...
Node * construct_node(const unsigned &n, TimeStepper *const &time_stepper_pt)
Construct the local node n and return a pointer to it. Additionally, create storage for `history' val...
void set_tangent_direction(Vector< double > *tangent_direction_pt)
Set the tangent direction vector.
virtual void compute_norm(double &norm)
Compute norm of solution – broken virtual can be overloaded by element writer to implement whatever ...
double raw_nodal_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Return the value of the k-th type of the i-th positional variable at the local node n...
void fill_in_jacobian_for_solid_ic(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Fill in the residuals and Jacobian for the setup of an initial condition. The global equations are: ...
void flush_external_data()
Flush all external data.
int & normal_sign()
Sign of outer unit normal (relative to cross-products of tangent vectors in the corresponding "bulk" ...
Node * construct_boundary_node(const unsigned &n)
Construct the local node n and return a pointer to it. in the case when it is a boundary node; that i...
virtual void output(FILE *file_pt)
Output the element data — typically the values at the nodes in a format suitable for post-processing...
MacroElement * Undeformed_macro_elem_pt
Pointer to the element's "undeformed" macro element (NULL by default)
unsigned nexternal_data() const
Return the number of external data objects.
virtual void fill_in_contribution_to_dresiduals_dparameter(double *const ¶meter_pt, Vector< double > &dres_dparam)
Add the elemental contribution to the derivatives of the residuals with respect to a parameter...
unsigned nnodal_position_type() const
Return the number of coordinate types that the element requires to interpolate the geometry between t...
virtual void get_x_from_macro_element(const Vector< double > &s, Vector< double > &x) const
Global coordinates as function of local coordinates using macro element representation. (Broken virtual — this must be overloaded in specific geometric element classes)
void set_dimension(const unsigned &dim)
Set the dimension of the element and initially set the dimension of the nodes to be the same as the d...
virtual double s_min() const
Min value of local coordinate.
unsigned ndim() const
Return (Eulerian) spatial dimension of the node.
virtual double local_to_eulerian_mapping(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Calculate the mapping from local to Eulerian coordinates, given the derivatives of the shape function...
GeomObject * Geom_object_pt
Pointer to the GeomObject that specifies the initial condition (shape, veloc and accel) ...
double interpolated_xi(const Vector< double > &s, const unsigned &i) const
Return i-th FE-interpolated Lagrangian coordinate xi[i] at local coordinate s. Overloaded from SolidF...
virtual void write_paraview_type(std::ofstream &file_out, const unsigned &nplot) const
Return the paraview element type. Broken virtual. Needs to be implemented for each new geometric elem...
virtual bool has_internal_solid_data()
Return whether there is internal solid data (e.g. discontinuous solid pressure). At present...
virtual void write_paraview_offsets(std::ofstream &file_out, const unsigned &nplot, unsigned &offset_sum) const
Return the offsets for the paraview sub-elements. Broken virtual. Needs to be implemented for each ne...
bool must_be_kept_as_halo() const
Test whether the element must be kept as a halo element.
virtual void set_macro_elem_pt(MacroElement *macro_elem_pt)
Set pointer to macro element – can be overloaded in derived elements to perform additional tasks...
unsigned ndof() const
Return the number of equations/dofs in the element.
unsigned nodal_dimension() const
Return the required Eulerian dimension of the nodes in this element.
double local_to_lagrangian_mapping(const DShape &dpsids, DenseMatrix< double > &inverse_jacobian) const
Calculate the mapping from local to lagrangian coordinates, given the derivatives of the shape functi...
virtual unsigned nnode_on_face() const
Vector< unsigned > Bulk_node_number
List of indices of the local node numbers in the "bulk" element that correspond to the local node num...
int Non_halo_proc_ID
Non-halo processor ID for Data; -1 if it's not a halo.
virtual unsigned self_test()
Self-test: Have all internal values been classified as pinned/unpinned? Return 0 if OK...
double & x(const unsigned &i)
Return the i-th nodal coordinate.
void bulk_position_type_resize(const unsigned &i)
Resize the storage for bulk_position_type to i entries.
virtual void get_djacobian_and_dmass_matrix_dparameter(double *const ¶meter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
Calculate the derivatives of the elemental Jacobian matrix mass matrix and residuals with respect to ...
A class that contains the information required by Nodes that are located on Mesh boundaries. A BoundaryNode of a particular type is obtained by combining a given Node with this class. By differentiating between Nodes and BoundaryNodes we avoid a lot of un-necessary storage in the bulk Nodes.
virtual void get_x_from_macro_element(const unsigned &t, const Vector< double > &s, Vector< double > &x)
Global coordinates as function of local coordinates at previous time "level" t (t=0: present; t>0: pr...
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Function pointer for function that computes vector-valued steady "exact solution" as ...
int non_halo_proc_ID()
ID of processor ID that holds non-halo counterpart of halo element; negative if not a halo...
virtual Node * construct_node(const unsigned &n, TimeStepper *const &time_stepper_pt)
Construct the local node n, including storage for history values required by timestepper, and return a pointer to the newly created node object.
void set_boundary_number_in_bulk_mesh(const unsigned &b)
Set function for the boundary number in bulk mesh.
double zeta_nodal(const unsigned &n, const unsigned &k, const unsigned &i) const
The "global" intrinsic coordinate of the element when viewed as part of a geometric object should be ...
double interpolated_x(const unsigned &t, const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s at previous timestep t (t=0: present; t>...
void point_output(std::ostream &outfile, const Vector< double > &s)
Output solution (as defined by point_output_data()) at local cordinates s.
FiniteElement()
Constructor.
SolidInitialCondition(const SolidInitialCondition &)
Broken copy constructor.
static bool Suppress_warning_about_repeated_external_data
Static boolean to suppress warnings about repeated external data. Defaults to true.
unsigned IC_time_deriv
Which time derivative (0,1,2) are we currently assigning.
FaceElement()
Constructor: Initialise all appropriate member data.
void fill_in_jacobian_from_internal_by_fd(DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
Calculate the contributions to the jacobian from the internal degrees of freedom using finite differe...
FreeStandingFaceElement()
Constructor.
double raw_lagrangian_position(const unsigned &n, const unsigned &i) const
Return i-th Lagrangian coordinate at local node n without using the hanging representation.
double lagrangian_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Return Generalised Lagrangian coordinate at local node n. `Direction' i, `Type' k.
int face_index() const
Index of the face (a number that uniquely identifies the face in the element) (const version) ...
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
virtual void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Add the elemental contribution to the jacobian matrix. and the residuals vector. Note that this funct...
virtual void update_before_nodal_fd()
Function that is called before the finite differencing of any nodal data. This may be overloaded to u...
virtual void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned > > &dof_lookup_list) const
Create a list of pairs for the unknowns that this element is "in charge of" – ignore any unknowns as...
virtual Node * construct_node(const unsigned &n)
Construct the local node n and return a pointer to the newly created node object. ...
BulkCoordinateDerivativesFctPt Bulk_coordinate_derivatives_fct_pt
Pointer to a function that returns the derivatives of the local "bulk" coordinates with respect to th...
virtual void reset_after_external_fd()
Function that is call after the finite differencing of the external data. This may be overloaded to r...
bool Must_be_kept_as_halo
Does this element need to be kept as a halo element during a distribute?
A template Class for BoundaryNodes; that is Nodes that MAY live on the boundary of a Mesh...
ElementWithDragFunction()
Empty constructor.
virtual void update_in_nodal_fd(const unsigned &i)
Function called within the finite difference loop for nodal data after a change in the i-th nodal val...
void set_halo(const unsigned &non_halo_proc_ID)
Label the element as halo and specify processor that holds non-halo counterpart.
virtual unsigned nsub_elements_paraview(const unsigned &nplot) const
Return the number of local sub-elements for paraview plot with parameter nplot. Broken virtual; can b...
void include_external_data_fd(const unsigned &i)
Set the boolean flag to include the external datum in the the finite difference loop when computing t...
virtual unsigned nvertex_node() const
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Overload the fill_in_contribution_to_jacobian() function to use finite differences to calculate the s...
double ** Dof_pt
Storage for array of pointers to degrees of freedom ordered by local equation number. This information is not needed, except in continuation, bifurcation tracking and periodic orbit calculations. It is not set up unless the control flag Problem::Store_local_dof_pts_in_elements = true.
int ** Nodal_local_eqn
Storage for the local equation numbers associated with the values stored at the nodes.
virtual void reset_in_external_fd(const unsigned &i)
Function called within the finite difference loop for external data after the values in the i-th exte...
static bool Suppress_output_while_checking_for_inverted_elements
Static boolean to suppress output while checking for inverted elements.
BulkCoordinateDerivativesFctPt bulk_coordinate_derivatives_fct_pt() const
Return the pointer to the function that returns the derivatives of the bulk coordinates wrt the face ...
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
void dof_pt_vector(Vector< double *> &dof_pt)
Return the vector of pointers to dof values.
void operator=(const NavierStokesElementWithDiagonalMassMatrices &)
Broken assignment operator.
virtual void write_tecplot_zone_footer(std::ostream &outfile, const unsigned &nplot) const
Add tecplot zone "footer" to output stream (when plotting nplot points in each "coordinate direction"...
unsigned long eqn_number(const unsigned &ieqn_local) const
Return the global equation number corresponding to the ieqn_local-th local equation number...
static double Tolerance_for_singular_jacobian
Tolerance below which the jacobian is considered singular.
void set_time_stepper(TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
Set a new timestepper by resizing the appropriate storage. If already assigned the equation numbering...
virtual void get_dresiduals_dparameter(double *const ¶meter_pt, Vector< double > &dres_dparam)
Calculate the derivatives of the residuals with respect to a parameter.
virtual void write_tecplot_zone_footer(FILE *file_pt, const unsigned &nplot) const
Add tecplot zone "footer" to C-style output. (when plotting nplot points in each "coordinate directio...
FiniteElement * Bulk_element_pt
Pointer to the associated higher-dimensional "bulk" 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...
void describe_dofs(std::ostream &out, const std::string ¤t_string) const
Function to describe the dofs of the element. The ostream specifies the output stream to which the de...
virtual void set_macro_elem_pt(MacroElement *macro_elem_pt)
Set pointer to MacroElement – overloads generic version and uses the MacroElement also as the defaul...
void set_nnodal_position_type(const unsigned &nposition_type)
Set the number of types required to interpolate the coordinate.
virtual void write_paraview_output_offset_information(std::ofstream &file_out, const unsigned &nplot, unsigned &counter) const
Fill in the offset information for paraview plot. Broken virtual. Needs to be implemented for each ne...
A class that represents a collection of data; each Data object may contain many different individual ...
virtual std::string scalar_name_paraview(const unsigned &i) const
Name of the i-th scalar field. Default implementation returns V1 for the first one, V2 for the second etc. Can (should!) be overloaded with more meaningful names in specific elements.
virtual void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Function to compute the geometric shape functions and derivatives w.r.t. local coordinates at local c...
Vector< unsigned > Nbulk_value
A vector that will hold the number of data values at the nodes that are associated with the "bulk" el...
virtual void update_in_internal_fd(const unsigned &i)
Function called within the finite difference loop for internal data after a change in any values in t...
double raw_dnodal_position_dt(const unsigned &n, const unsigned &j, const unsigned &i) const
Return the i-th component of j-th derivative of nodal position: d^jx/dt^j at node n...
unsigned ngeom_data() const
Broken assignment operator.
int normal_sign() const
Return sign of outer unit normal (relative to cross-products of tangent vectors in the corresponding ...
virtual bool local_coord_is_valid(const Vector< double > &s)
Broken assignment operator.
const unsigned & bulk_node_number(const unsigned &n) const
Return the bulk node number that corresponds to the n-th local node number (const version) ...
virtual void get_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Calculate the residuals and jacobian and elemental "mass" matrix, the matrix that multiplies the time...
virtual void output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output an exact solution over the element.
Data *const & internal_data_pt(const unsigned &i) const
Return a pointer to i-th internal data object (const version)
double zeta_nodal(const unsigned &n, const unsigned &k, const unsigned &i) const
The "global" intrinsic coordinate of the element when viewed as part of a geometric object should be ...
void face_node_number_error_check(const unsigned &i) const
Range check for face node numbers.
Data ** Data_pt
Storage for pointers to internal and external data. The data is of the same type and so can be addres...
virtual Node * construct_boundary_node(const unsigned &n, TimeStepper *const &time_stepper_pt)
Construct the local node n, including storage for history values required by timestepper, as a boundary node; that is a node that MAY be placed on a mesh boundary and return a pointer to the newly created node object.
virtual double s_max() const
Max. value of local coordinate.
static const unsigned Default_Initial_Nvalue
Default return value for required_nvalue(n) which gives the number of "data" values required by the e...
void add_internal_eqn_numbers_to_vector(Vector< long > &vector_of_eqn_numbers)
Add all equation numbers associated with internal data to the vector in the internal storage order...
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
virtual ~ElementWithDragFunction()
Empty virtual destructor.
void fill_in_jacobian_from_external_by_fd(DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
Calculate the contributions to the jacobian from the external degrees of freedom using finite differe...
int position_local_eqn(const unsigned &n, const unsigned &k, const unsigned &j) const
Access function that returns the local equation number that corresponds to the j-th coordinate of the...
double raw_dnodal_position_gen_dt(const unsigned &j, const unsigned &n, const unsigned &k, const unsigned &i) const
i-th component of j-th time derivative of the generalised position, dx(k,i)/dt at local node n...
static const double Node_location_tolerance
Default value for the tolerance to be used when locating nodes via local coordinates.
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 initialise(const _Tp &__value)
Iterate over all values and set to the desired value.
void operator=(const SolidInitialCondition &)
Broken assignment operator.
const unsigned & bulk_position_type(const unsigned &i) const
Return the position type in the "bulk" element that corresponds to the position type i on the FaceEle...
MacroElement * macro_elem_pt()
Access function to pointer to macro element.
double nodal_value(const unsigned &n, const unsigned &i) const
Return the i-th value stored at local node n. Produces suitably interpolated values for hanging nodes...
virtual void update_before_internal_fd()
Function that is called before the finite differencing of any internal data. This may be overloaded t...
unsigned & bulk_position_type(const unsigned &i)
Return the position type in the "bulk" element that corresponds to position type i on the FaceElement...
Data *const & external_data_pt(const unsigned &i) const
Return a pointer to i-th external data object (const version)
unsigned Nexternal_data
Number of external data.
void exclude_external_data_fd(const unsigned &i)
Set the boolean flag to exclude the external datum from the the finite difference loop when computing...
bool Boundary_number_in_bulk_mesh_has_been_set
Has the Boundary_number_in_bulk_mesh been set? Only included if compiled with PARANOID switched on...
void add_internal_data_values_to_vector(Vector< double > &vector_of_values)
Add all internal data and time history values to the vector in the internal storage order...
void set_nnodal_lagrangian_type(const unsigned &nlagrangian_type)
Set the number of types required to interpolate the Lagrangian coordinates.
void interpolated_xi(const Vector< double > &s, Vector< double > &xi) const
Compute FE interpolated Lagrangian coordinate vector xi[] at local coordinate s as Vector...
double zeta_nodal(const unsigned &n, const unsigned &k, const unsigned &i) const
In a SolidFiniteElement, the "global" intrinsic coordinate of the element when viewed as part of a co...
double nodal_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Return the value of the k-th type of the i-th positional variable at the local node n...
virtual void get_x_and_xi(const Vector< double > &s, Vector< double > &x_fe, Vector< double > &x, Vector< double > &xi_fe, Vector< double > &xi) const
Eulerian and Lagrangian coordinates as function of the local coordinates: The Eulerian position is re...
Data *& external_data_pt(const unsigned &i)
Return a pointer to i-th external data object.
int Face_index
Index of the face.
virtual void assign_local_eqn_numbers(const bool &store_local_dof_pt)
Setup the arrays of local equation numbers for the element. If the optional boolean argument is true...
bool Solve_for_consistent_newmark_accel_flag
Flag to indicate which system of equations to solve when assigning initial conditions for time-depend...
void set_nonhalo()
Label the element as not being a halo.
SolidElementWithDiagonalMassMatrix()
Empty constructor.
unsigned dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
virtual void compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
Plot the error when compared against a given time-dependent exact solution . Also calculates the norm...
unsigned ninternal_data() const
Return the number of internal data objects.
A Class for nodes that deform elastically (i.e. position is an unknown in the problem). The idea is that the Eulerian positions are stored in a Data object and the Lagrangian coordinates are stored in addition. The pointer that addresses the Eulerian positions is set to the pointer to Value in the Data object. Hence, SolidNode uses knowledge of the internal structure of Data and must be a friend of the Data class. In order to allow a mesh to deform via an elastic-style equation in deforming-domain problems, the positions are stored separately from the values, so that elastic problems may be combined with any other type of problem.
virtual unsigned nnode_1d() const
Return the number of nodes along one edge of the element Default is to return zero — must be overloa...
virtual void output_fct(std::ostream &outfile, const unsigned &n_plot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
Output a time-dependent exact solution over the element.
void broken_assign(const std::string &class_name)
Issue error message and terminate execution.
void disable_solve_for_consistent_newmark_accel()
Set to reset the problem being solved to be the standard problem.
virtual void output(std::ostream &outfile, const unsigned &n_plot)
Output the element data — pass (some measure of) the number of plot points per element.
virtual ~SolidElementWithDiagonalMassMatrix()
Virtual destructor.
double dnodal_position_dt(const unsigned &n, const unsigned &j, const unsigned &i) const
Return the i-th component of j-th derivative of nodal position: d^jx/dt^j at node n...
void resize(const unsigned &n_value)
Resize the number of equations.
void output(std::ostream &outfile, const unsigned &n_plot)
Output at n_plot points.
virtual void fill_in_contribution_to_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &mass_matrix)
Add the elemental contribution to the mass matrix matrix. and the residuals vector. Note that this function should NOT initialise the residuals vector or the mass matrix. It must be called after the residuals vector and jacobian matrix have been initialised to zero. The default is deliberately broken.
void dof_vector(const unsigned &t, Vector< double > &dof)
Return the vector of dof values at time level t.
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
FiniteElement *& bulk_element_pt()
Pointer to higher-dimensional "bulk" element.
Integral * Integral_pt
Pointer to the spatial integration scheme.
Node ** Node_pt
Storage for pointers to the nodes in the element.
virtual void reset_after_nodal_fd()
Function that is call after the finite differencing of the nodal data. This may be overloaded to rese...
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...
static std::deque< double * > Dof_pt_deque
Static storage for deque used to add_global_equation_numbers when pointers to the dofs in each elemen...
SolidInitialCondition * Solid_ic_pt
Pointer to object that specifies the initial condition.
void set_undeformed_macro_elem_pt(MacroElement *undeformed_macro_elem_pt)
Set pointer to "undeformed" macro element. Can be overloaded in derived classes to perform additional...
unsigned Nnodal_position_type
The number of coordinate types required to interpolate the element's geometry between the nodes...
void read_internal_eqn_numbers_from_vector(const Vector< long > &vector_of_eqn_numbers, unsigned &index)
Read all equation numbers associated with internal data from the vector starting from index...
void turn_on_warning_for_discontinuous_tangent()
Turn on warning for when there may be discontinuous tangent vectors from continuous_tangent_and_outer...
double raw_dnodal_position_dt(const unsigned &n, const unsigned &i) const
Return the i-th component of nodal velocity: dx/dt at local node n. Do not use the hanging node repre...
virtual void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Add the elemental contribution to the jacobian matrix, mass matrix and the residuals vector...
double multiplier(const Vector< double > &xi)
Access to the "multiplier" for the inertia terms in the consistent determination of the initial condi...
double dnodal_position_dt(const unsigned &n, const unsigned &i) const
Return the i-th component of nodal velocity: dx/dt at local node n.
virtual Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element. Broken virtual function in "pure" finite elements...
unsigned add_internal_data(Data *const &data_pt, const bool &fd=true)
Add a (pointer to an) internal data object to the element and return the index required to obtain it ...
virtual void build_face_element(const int &face_index, FaceElement *face_element_pt)
Function for building a lower dimensional FaceElement on the specified face of the FiniteElement...
CoordinateMappingFctPt & face_to_bulk_coordinate_fct_pt()
Return the pointer to the function that maps the face coordinate to the bulk coordinate.
SolidFiniteElement()
Constructor: Set defaults.
double nodal_position_gen(const unsigned &t, const unsigned &n, const unsigned &k, const unsigned &i) const
Return the generalised nodal position (type k, i-th variable) at previous timesteps at local node n...
double interpolated_dxdt(const Vector< double > &s, const unsigned &i, const unsigned &t)
Return t-th time-derivative of the i-th FE-interpolated Eulerian coordinate at local coordinate s...
virtual void scalar_value_fct_paraview(std::ofstream &file_out, const unsigned &i, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt) const
Write values of the i-th scalar field at the plot points. Broken virtual. Needs to be implemented for...
int Normal_sign
Sign of outer unit normal (relative to cross-products of tangent vectors in the corresponding "bulk" ...
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Get local coordinates of node j in the element; vector sets its own size.
virtual unsigned get_bulk_node_number(const int &face_index, const unsigned &i) const
const unsigned & boundary_number_in_bulk_mesh() const
Broken assignment operator.
FiniteElement(const FiniteElement &)
Broken copy constructor.
MultiplierFctPt Multiplier_fct_pt
Pointer to function that computes the "multiplier" for the inertia terms in the consistent determinat...
void bulk_node_number_resize(const unsigned &i)
Resize the storage for the bulk node numbers.
Node * construct_node(const unsigned &n)
Construct the local node n and return a pointer to it.
virtual double zeta_nodal(const unsigned &n, const unsigned &k, const unsigned &i) const
Specify the values of the "global" intrinsic coordinate, zeta, of a compound geometric object (a mesh...
double Newton_tolerance
Convergence tolerance for the newton solver.
unsigned & nbulk_value(const unsigned &n)
Return the number of values originally stored at local node n (before the FaceElement added additiona...
void add_internal_value_pt_to_map(std::map< unsigned, double *> &map_of_value_pt)
Add pointers to the internal data values to map indexed by the global equation number.
virtual void describe_local_dofs(std::ostream &out, const std::string ¤t_string) const
Function to describe the local dofs of the element. The ostream specifies the output stream to which ...
CoordinateMappingFctPt face_to_bulk_coordinate_fct_pt() const
Return the pointer to the function that maps the face coordinate to the bulk coordinate (const versio...
virtual void reset_in_solid_position_fd(const unsigned &i)
Function called within the finite difference loop for solid position data after the values in the i-t...
void turn_off_warning_for_discontinuous_tangent()
Turn off warning for when there may be discontinuous tangent vectors from continuous_tangent_and_oute...
virtual void reset_after_solid_position_fd()
Function that is call after the finite differencing of the solid position data. This may be overloade...
virtual double local_one_d_fraction_of_node(const unsigned &n1d, const unsigned &i)
Get the local fraction of any node in the n-th position in a one dimensional expansion along the i-th...
virtual void assign_all_generic_local_eqn_numbers(const bool &store_local_dof_pt)
Assign all the local equation numbering schemes that can be applied generically for the element...
virtual void fill_in_contribution_to_inner_product_vectors(Vector< unsigned > const &history_index, Vector< Vector< double > > &inner_product_vector)
Fill in the contributions to the vectors that when taken as dot product with other history values giv...
SolidElementWithDiagonalMassMatrix(const SolidElementWithDiagonalMassMatrix &)
Broken copy constructor.
DummyFaceElement(FiniteElement *const &element_pt, const int &face_index)
Constructor, which takes a "bulk" element and the face index.
virtual void output(const unsigned &t, std::ostream &outfile, const unsigned &n_plot) const
Output the element data at time step t. This is const because it is newly added and so can be done ea...
virtual unsigned nprev_values() const =0
Number of previous values available: 0 for static, 1 for BDF<1>,...
PointElement()
Constructor.
virtual void update_before_external_fd()
Function that is called before the finite differencing of any external data. This may be overloaded t...
int local_eqn_number(const unsigned long &ieqn_global) const
Return the local equation number corresponding to the ieqn_global-th global equation number...
unsigned Nodal_dimension
The spatial dimension of the nodes in the element. We assume that nodes have the same spatial dimensi...
unsigned nnode() const
Return the number of nodes.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
virtual void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Plot the error when compared against a given exact solution . Also calculates the norm of the error a...
virtual void set_macro_elem_pt(MacroElement *macro_elem_pt, MacroElement *undeformed_macro_elem_pt)
Set pointers to "current" and "undeformed" MacroElements. Can be overloaded in derived classes to per...
void output(FILE *file_pt, const unsigned &n_plot)
C_style output at n_plot points.
virtual double J_lagrangian_at_knot(const unsigned &ipt) const
Return the Jacobian of the mapping from local to Lagrangian coordinates at the ipt-th integration poi...
virtual void assign_internal_and_external_local_eqn_numbers(const bool &store_local_dof_pt)
Assign the local equation numbers for the internal and external Data This must be called after the gl...
int ** Data_local_eqn
Pointer to array storage for local equation numbers associated with internal and external data...
virtual ~FaceElement()
Empty virtual destructor.
unsigned Nnode
Number of nodes in the element.
static double Default_fd_jacobian_step
Double used for the default finite difference step in elemental jacobian calculations.
SolidFiniteElement class.
double raw_nodal_position(const unsigned &t, const unsigned &n, const unsigned &i) const
Return the i-th coordinate at local node n, at time level t (t=0: present; t>0: previous time level)...
static bool Suppress_warning_about_repeated_internal_data
Static boolean to suppress warnings about repeated internal data. Defaults to false.
SolidFiniteElement(const SolidFiniteElement &)
Broken copy constructor.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Add the elemental contribution to the jacobian matrix. and the residuals vector. Note that this funct...
void set_lagrangian_dimension(const unsigned &lagrangian_dimension)
Set the lagrangian dimension of the element — the number of lagrangian coordinates stored at the nod...
unsigned nbulk_value(const unsigned &n) const
Return the number of values originally stored at local node n (before the FaceElement added additiona...
bool internal_data_fd(const unsigned &i) const
Return the status of the boolean flag indicating whether the internal data is included in the finite ...
const Vector< double > * tangent_direction_pt() const
Public access function for the tangent direction pointer.
double value(const unsigned &i) const
Return i-th value (dofs or pinned) at this node either directly or via hanging node representation...
int external_local_eqn(const unsigned &i, const unsigned &j)
Return the local equation number corresponding to the j-th value stored at the i-th external data...
static DenseMatrix< double > Dummy_matrix
Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case w...
MacroElement * Macro_elem_pt
Pointer to the element's macro element (NULL by default)
double zeta_nodal(const unsigned &n, const unsigned &k, const unsigned &i) const
In a FaceElement, the "global" intrinsic coordinate of the element along the boundary, when viewed as part of a compound geometric object is specified using the boundary coordinate defined by the mesh. Note: Boundary coordinates will have been set up when creating the underlying mesh, and their values will have been stored at the nodes.
unsigned Ninternal_data
Number of internal data.
std::string to_string(T object, unsigned float_precision=8)
Conversion function that should work for anything with operator<< defined (at least all basic types)...
void unset_must_be_kept_as_halo()
Do not insist that this element be kept as a halo element during distribution.
bool external_data_fd(const unsigned &i) const
Return the status of the boolean flag indicating whether the external data is included in the finite ...
double raw_lagrangian_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Return Generalised Lagrangian coordinate at local node n. `Direction' i, `Type' k. Does not use the hanging node representation.
double nodal_position(const unsigned &t, const unsigned &n, const unsigned &i) const
Return the i-th coordinate at local node n, at time level t (t=0: present; t>0: previous time level) ...
virtual void complete_setup_of_dependencies()
Complete the setup of any additional dependencies that the element may have. Empty virtual function t...
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Return the local equation number corresponding to the i-th value at the n-th local node...
int internal_local_eqn(const unsigned &i, const unsigned &j) const
Return the local equation number corresponding to the j-th value stored at the i-th internal data...