29 #ifndef OOMPH_GENERIC_MESH_HEADER
30 #define OOMPH_GENERIC_MESH_HEADER
34 #include <oomph-lib-config.h>
100 std::map<unsigned, Vector<GeneralisedElement*>> Root_halo_element_pt;
103 std::map<unsigned, Vector<GeneralisedElement*>> Root_haloed_element_pt;
106 std::map<unsigned, Vector<Node*>> Halo_node_pt;
109 std::map<unsigned, Vector<Node*>> Haloed_node_pt;
116 std::map<unsigned, Vector<Node*>> Shared_node_pt;
126 std::map<unsigned, Vector<GeneralisedElement*>> External_halo_element_pt;
129 std::map<unsigned, Vector<GeneralisedElement*>> External_haloed_element_pt;
135 std::map<unsigned, Vector<Node*>> External_halo_node_pt;
138 std::map<unsigned, Vector<Node*>> External_haloed_node_pt;
141 bool Keep_all_elements_as_halos;
144 bool Resize_halo_nodes_not_required;
147 void setup_shared_node_scheme();
216 void resize_halo_nodes();
246 Keep_all_elements_as_halos =
false;
248 Output_halo_elements =
false;
250 Resize_halo_nodes_not_required =
false;
289 std::ostringstream error_stream;
290 error_stream <<
"Empty default reset boundary element info function"
292 error_stream <<
"This should be overloaded in a specific "
293 <<
"TriangleMeshBase\n";
295 "Mesh::reset_boundary_element_info()",
302 template<
class BULK_ELEMENT>
308 oomph_info <<
"No boundary coordinates were set up for boundary " <<
b
320 for (
unsigned e = 0;
e < nel;
e++)
345 for (
unsigned iplot = 0; iplot < num_plot_points; iplot++)
351 for (
unsigned i = 0;
i < dim;
i++)
353 the_file <<
x[
i] <<
" ";
355 for (
unsigned i = 0;
i < (dim - 1);
i++)
357 the_file <<
zeta[
i] <<
" ";
360 the_file << std::endl;
375 unsigned nnod = this->
nnode();
377 for (
unsigned j = 0;
j < nnod;
j++)
380 for (
unsigned i = 0;
i < dim;
i++)
382 nod_pt->
x(
i) *= factor;
533 const unsigned n_node =
nnode();
534 for (
unsigned nd = 0; nd < n_node; nd++)
541 std::set<unsigned>* boundaries_pt;
545 unsigned max_boundary_n =
546 1 + *std::max_element(boundaries_pt->begin(), boundaries_pt->end());
553 std::set<unsigned>::const_iterator it;
554 for (it = boundaries_pt->begin(); it != boundaries_pt->end(); it++)
574 #ifdef RANGE_CHECKING
577 std::ostringstream error_message;
578 error_message <<
"Range Error: " <<
i <<
" is not in the range (0,"
638 virtual void node_update(
const bool& update_all_solid_nodes =
false);
642 virtual void reorder_nodes(
const bool& use_old_ordering =
true);
648 const bool& use_old_ordering =
true)
const;
652 template<
class BULK_ELEMENT,
template<
class>
class FACE_ELEMENT>
658 for (
unsigned n = 0;
n < nbound_node;
n++)
666 for (
unsigned e = 0;
e < nbound_element;
e++)
669 FACE_ELEMENT<BULK_ELEMENT>* face_element_pt =
697 for (
unsigned e = 0;
e < nel;
e++)
712 for (
unsigned e = 0;
e < nel;
e++)
733 std::ofstream& inverted_element_file);
744 std::ofstream inverted_element_file;
746 inverted_element_file);
754 oomph_info <<
"\n\nStarting check for repeated nodes...";
756 unsigned nnod =
nnode();
757 for (
unsigned j = 0;
j < nnod;
j++)
760 unsigned dim = nod1_pt->
ndim();
761 for (
unsigned k =
j + 1;
k < nnod;
k++)
765 for (
unsigned i = 0;
i < dim;
i++)
767 dist +=
pow((nod1_pt->
x(
i) - nod2_pt->
x(
i)), 2);
772 oomph_info <<
"\n\nRepeated node!" << std::endl;
773 oomph_info <<
"Distance between nodes " <<
j <<
" and " <<
k
775 oomph_info <<
"is " << dist <<
" which is less than the"
779 oomph_info <<
"The offending nodes are located at: " << std::endl;
780 for (
unsigned i = 0;
i < dim;
i++)
786 oomph_info <<
"\n\n[NOTE: message issued as diagonistic rather "
788 <<
" because at least one of the nodes is a copy; you "
790 <<
" want to check this out. BACKGROUND: Copied nodes "
791 "share the same Data but\n"
792 <<
" will, in general, have different spatial "
793 "positions (e.g. when used\n"
794 <<
" as periodic nodes); however there are cases when "
796 <<
" at the same spatial position (e.g. in "
797 "oomph-lib's annular mesh which\n"
798 <<
" is a rolled-around version of the rectangular "
799 "quadmesh). In such cases,\n"
800 <<
" the nodes could have been deleted and completely "
802 <<
" pointers to existing nodes, but may have been "
803 "left there for convenience\n"
804 <<
" or out of laziness...]\n";
814 if (failed)
return 1;
817 oomph_info <<
"...done: Test passed!" << std::endl << std::endl;
841 const unsigned&
e)
const
846 throw OomphLibError(
"Lookup scheme for elements next to boundary "
847 "hasn't been set up yet!\n",
861 for (
unsigned nd = 0, nnd =
nnode(); nd < nnd; nd++)
863 if (!(
node_pt(nd)->is_on_boundary()))
869 std::ostringstream error_msg;
870 error_msg <<
"No non-boundary nodes in the mesh.";
883 throw OomphLibError(
"Lookup scheme for elements next to boundary "
884 "hasn't been set up yet!\n",
901 throw OomphLibError(
"Lookup scheme for elements next to boundary "
902 "hasn't been set up yet!\n",
911 virtual void dump(std::ofstream& dump_file,
912 const bool& use_old_ordering =
true)
const;
916 const bool& use_old_ordering =
true)
const
918 std::ofstream dump_stream(dump_file_name.c_str());
920 if (!dump_stream.is_open())
922 std::string err =
"Couldn't open file " + dump_file_name;
927 dump(dump_stream, use_old_ordering);
931 virtual void read(std::ifstream& restart_file);
939 void output_paraview(std::ofstream& file_out,
const unsigned& nplot)
const;
947 std::ofstream& file_out,
948 const unsigned& nplot,
957 std::ofstream& file_out,
958 const unsigned& nplot,
963 void output(std::ostream& outfile);
966 void output(std::ostream& outfile,
const unsigned& n_plot);
969 void output(FILE* file_pt);
972 void output(FILE* file_pt,
const unsigned& nplot);
977 std::ofstream outfile;
978 outfile.open(output_filename.c_str());
986 std::ofstream outfile;
987 outfile.open(output_filename.c_str());
994 const unsigned& n_plot,
1000 const unsigned& n_plot,
1011 std::ofstream outfile;
1012 outfile.open(output_filename.c_str());
1033 TimeStepper*
const& time_stepper_pt,
const bool& preserve_existing_data)
1037 preserve_existing_data);
1045 TimeStepper*
const& time_stepper_pt,
const bool& preserve_existing_data);
1056 const bool& preserve_existing_data);
1061 TimeStepper*
const& time_stepper_pt,
const bool& preserve_existing_data);
1078 for (
unsigned long e = 0;
e < n_element;
e++)
1082 #ifdef OOMPH_HAS_MPI
1084 if (!(el_pt->is_halo()))
1102 unsigned n_entry = norm.size();
1114 for (
unsigned long e = 0;
e < n_element;
e++)
1119 #ifdef OOMPH_HAS_MPI
1121 if (!(el_pt->is_halo()))
1129 for (
unsigned i = 0;
i < n_entry;
i++)
1132 norm[
i] += el_norm[
i];
1141 std::ostream& outfile,
1151 double el_error, el_norm;
1154 unsigned long Element_pt_range =
Element_pt.size();
1155 for (
unsigned long e = 0;
e < Element_pt_range;
e++)
1162 "Can't execute compute_error(...) for non FiniteElements",
1170 #ifdef OOMPH_HAS_MPI
1172 if (!(el_pt->is_halo()))
1175 el_pt->
compute_error(outfile, exact_soln_pt, time, el_error, el_norm);
1187 std::ostream& outfile,
1196 double el_error, el_norm;
1199 unsigned long Element_pt_range =
Element_pt.size();
1200 for (
unsigned long e = 0;
e < Element_pt_range;
e++)
1207 "Can't execute compute_error(...) for non FiniteElements",
1215 #ifdef OOMPH_HAS_MPI
1216 if (!(el_pt->is_halo()))
1219 el_pt->
compute_error(outfile, exact_soln_pt, el_error, el_norm);
1241 double el_error, el_norm;
1244 unsigned long Element_pt_range =
Element_pt.size();
1245 for (
unsigned long e = 0;
e < Element_pt_range;
e++)
1252 "Can't execute compute_error(...) for non FiniteElements",
1262 #ifdef OOMPH_HAS_MPI
1263 if (!(el_pt->is_halo()))
1288 error.initialise(0.0);
1291 unsigned n_norm = norm.size();
1294 unsigned n_error =
error.size();
1303 unsigned long element_pt_range =
Element_pt.size();
1306 for (
unsigned long e = 0;
e < element_pt_range;
e++)
1313 "Can't execute compute_error(...) for non FiniteElements",
1325 #ifdef OOMPH_HAS_MPI
1326 if (!(el_pt->is_halo()))
1333 for (
unsigned i = 0;
i < n_norm;
i++)
1335 norm[
i] += el_norm[
i];
1339 for (
unsigned i = 0;
i < n_error;
i++)
1352 std::ostream& outfile,
1359 unsigned n_error =
error.size();
1360 unsigned n_norm = norm.size();
1361 for (
unsigned i = 0;
i < n_error;
i++)
1365 for (
unsigned i = 0;
i < n_norm;
i++)
1373 unsigned long Element_pt_range =
Element_pt.size();
1374 for (
unsigned long e = 0;
e < Element_pt_range;
e++)
1381 "Can't execute compute_error(...) for non FiniteElements",
1386 for (
unsigned i = 0;
i < n_error;
i++)
1390 for (
unsigned i = 0;
i < n_norm;
i++)
1395 #ifdef OOMPH_HAS_MPI
1396 if (!(el_pt->is_halo()))
1399 el_pt->
compute_error(outfile, exact_soln_pt, time, el_error, el_norm);
1402 for (
unsigned i = 0;
i < n_error;
i++)
1406 for (
unsigned i = 0;
i < n_norm;
i++)
1408 norm[
i] += el_norm[
i];
1418 std::ostream& outfile,
1424 unsigned n_error =
error.size();
1425 unsigned n_norm = norm.size();
1426 for (
unsigned i = 0;
i < n_error;
i++)
1430 for (
unsigned i = 0;
i < n_norm;
i++)
1438 unsigned long Element_pt_range =
Element_pt.size();
1439 for (
unsigned long e = 0;
e < Element_pt_range;
e++)
1446 "Can't execute compute_error(...) for non FiniteElements",
1451 for (
unsigned i = 0;
i < n_error;
i++)
1455 for (
unsigned i = 0;
i < n_norm;
i++)
1460 #ifdef OOMPH_HAS_MPI
1461 if (!(el_pt->is_halo()))
1464 el_pt->
compute_error(outfile, exact_soln_pt, el_error, el_norm);
1467 for (
unsigned i = 0;
i < n_error;
i++)
1471 for (
unsigned i = 0;
i < n_norm;
i++)
1473 norm[
i] += el_norm[
i];
1489 double el_error, el_norm;
1492 unsigned long Element_pt_range =
Element_pt.size();
1493 for (
unsigned long e = 0;
e < Element_pt_range;
e++)
1500 "Can't execute compute_error(...) for non FiniteElements",
1508 #ifdef OOMPH_HAS_MPI
1510 if (!(el_pt->is_halo()))
1513 el_pt->
compute_error(exact_soln_pt, time, el_error, el_norm);
1532 unsigned n_error =
error.size();
1533 unsigned n_norm = norm.size();
1534 for (
unsigned i = 0;
i < n_error;
i++)
1538 for (
unsigned i = 0;
i < n_norm;
i++)
1546 unsigned long Element_pt_range =
Element_pt.size();
1547 for (
unsigned long e = 0;
e < Element_pt_range;
e++)
1554 "Can't execute compute_error(...) for non FiniteElements",
1559 for (
unsigned i = 0;
i < n_error;
i++)
1563 for (
unsigned i = 0;
i < n_norm;
i++)
1568 #ifdef OOMPH_HAS_MPI
1569 if (!(el_pt->is_halo()))
1572 el_pt->
compute_error(exact_soln_pt, time, el_error, el_norm);
1575 for (
unsigned i = 0;
i < n_error;
i++)
1579 for (
unsigned i = 0;
i < n_norm;
i++)
1581 norm[
i] += el_norm[
i];
1590 #ifdef OOMPH_HAS_MPI
1602 #ifdef OOMPH_HAS_MPI
1610 #ifdef OOMPH_HAS_MPI
1621 void set_keep_all_elements_as_halos()
1623 Keep_all_elements_as_halos =
true;
1628 void unset_keep_all_elements_as_halos()
1630 Keep_all_elements_as_halos =
false;
1636 virtual void distribute(OomphCommunicator* comm_pt,
1637 const Vector<unsigned>& element_domain,
1638 Vector<GeneralisedElement*>& deleted_element_pt,
1640 const bool& report_stats,
1641 const bool& overrule_keep_as_halo_element_status);
1645 void distribute(OomphCommunicator* comm_pt,
1646 const Vector<unsigned>& element_domain,
1647 Vector<GeneralisedElement*>& deleted_element_pt,
1648 const bool& report_stats =
false)
1651 doc_info.disable_doc();
1652 bool overrule_keep_as_halo_element_status =
false;
1653 return distribute(comm_pt,
1658 overrule_keep_as_halo_element_status);
1667 void prune_halo_elements_and_nodes(
1668 Vector<GeneralisedElement*>& deleted_element_pt,
1669 const bool& report_stats =
false)
1672 doc_info.disable_doc();
1673 prune_halo_elements_and_nodes(deleted_element_pt, doc_info, report_stats);
1683 void prune_halo_elements_and_nodes(
1684 Vector<GeneralisedElement*>& deleted_element_pt,
1686 const bool& report_stats);
1692 void get_efficiency_of_mesh_distribution(
double& av_efficiency,
1693 double& max_efficiency,
1694 double& min_efficiency);
1697 void doc_mesh_distribution(DocInfo& doc_info);
1700 void check_halo_schemes(DocInfo& doc_info,
1701 double& max_permitted_error_for_halo_check);
1706 virtual void classify_halo_and_haloed_nodes(DocInfo& doc_info,
1707 const bool& report_stats);
1712 virtual void classify_halo_and_haloed_nodes(
1713 const bool& report_stats =
false)
1716 doc_info.disable_doc();
1717 classify_halo_and_haloed_nodes(doc_info, report_stats);
1731 void synchronise_shared_nodes(
const bool& report_stats);
1736 void get_all_halo_data(std::map<unsigned, double*>& map_of_halo_data);
1740 Vector<GeneralisedElement*> halo_element_pt(
const unsigned&
p)
1743 Vector<GeneralisedElement*> vec_el_pt;
1746 unsigned nelem = nroot_halo_element(
p);
1747 for (
unsigned e = 0;
e < nelem;
e++)
1749 GeneralisedElement* el_pt = root_halo_element_pt(
p,
e);
1752 RefineableElement* ref_el_pt =
dynamic_cast<RefineableElement*
>(el_pt);
1757 Vector<Tree*> leaf_pt;
1758 ref_el_pt->tree_pt()->stick_leaves_into_vector(leaf_pt);
1762 unsigned nleaf = leaf_pt.size();
1763 for (
unsigned l = 0; l < nleaf; l++)
1765 vec_el_pt.push_back(leaf_pt[l]->object_pt());
1770 vec_el_pt.push_back(el_pt);
1779 Vector<GeneralisedElement*> haloed_element_pt(
const unsigned&
p)
1782 Vector<GeneralisedElement*> vec_el_pt;
1785 unsigned nelem = nroot_haloed_element(
p);
1786 for (
unsigned e = 0;
e < nelem;
e++)
1788 GeneralisedElement* el_pt = root_haloed_element_pt(
p,
e);
1791 RefineableElement* ref_el_pt =
dynamic_cast<RefineableElement*
>(el_pt);
1796 Vector<Tree*> leaf_pt;
1797 ref_el_pt->tree_pt()->stick_leaves_into_vector(leaf_pt);
1801 unsigned nleaf = leaf_pt.size();
1802 for (
unsigned l = 0; l < nleaf; l++)
1804 vec_el_pt.push_back(leaf_pt[l]->object_pt());
1809 vec_el_pt.push_back(el_pt);
1817 unsigned nnon_halo_element()
1821 for (
unsigned e = 0;
e <
n;
e++)
1830 unsigned nroot_halo_element()
1833 for (std::map<
unsigned, Vector<GeneralisedElement*>>::iterator it =
1834 Root_halo_element_pt.begin();
1835 it != Root_halo_element_pt.end();
1838 n += it->second.size();
1846 unsigned nroot_halo_element(
const unsigned&
p)
1848 return Root_halo_element_pt[
p].size();
1854 Vector<GeneralisedElement*> root_halo_element_pt(
const unsigned&
p)
1856 return Root_halo_element_pt[
p];
1862 GeneralisedElement*& root_halo_element_pt(
const unsigned&
p,
1865 return Root_halo_element_pt[
p][
e];
1871 void add_root_halo_element_pt(
const unsigned&
p, GeneralisedElement*& el_pt)
1873 Root_halo_element_pt[
p].push_back(el_pt);
1878 unsigned nhalo_node()
1881 for (std::map<
unsigned, Vector<Node*>>::iterator it =
1882 Halo_node_pt.begin();
1883 it != Halo_node_pt.end();
1886 n += it->second.size();
1893 unsigned nhalo_node(
const unsigned&
p)
1896 std::map<unsigned, Vector<Node*>>::iterator it = Halo_node_pt.find(
p);
1897 if (it == Halo_node_pt.end())
1901 return (*it).second.size();
1906 void add_halo_node_pt(
const unsigned&
p, Node*& nod_pt)
1908 Halo_node_pt[
p].push_back(nod_pt);
1914 Node* halo_node_pt(
const unsigned&
p,
const unsigned&
j)
1916 return Halo_node_pt[
p][
j];
1921 unsigned nroot_haloed_element()
1924 for (std::map<
unsigned, Vector<GeneralisedElement*>>::iterator it =
1925 Root_haloed_element_pt.begin();
1926 it != Root_haloed_element_pt.end();
1929 n += it->second.size();
1936 unsigned nroot_haloed_element(
const unsigned&
p)
1939 std::map<unsigned, Vector<GeneralisedElement*>>::iterator it =
1940 Root_haloed_element_pt.find(
p);
1941 if (it == Root_haloed_element_pt.end())
1945 return (*it).second.size();
1951 Vector<GeneralisedElement*> root_haloed_element_pt(
const unsigned&
p)
1954 std::map<unsigned, Vector<GeneralisedElement*>>::iterator it =
1955 Root_haloed_element_pt.find(
p);
1956 if (it == Root_haloed_element_pt.end())
1958 Vector<GeneralisedElement*>
tmp;
1961 return (*it).second;
1966 GeneralisedElement*& root_haloed_element_pt(
const unsigned&
p,
1969 return Root_haloed_element_pt[
p][
e];
1977 void add_root_haloed_element_pt(
const unsigned&
p,
1978 GeneralisedElement*& el_pt)
1980 Root_haloed_element_pt[
p].push_back(el_pt);
1985 unsigned nhaloed_node()
1988 for (std::map<
unsigned, Vector<Node*>>::iterator it =
1989 Haloed_node_pt.begin();
1990 it != Haloed_node_pt.end();
1993 n += it->second.size();
2001 unsigned nhaloed_node(
const unsigned&
p)
2004 std::map<unsigned, Vector<Node*>>::iterator it = Haloed_node_pt.find(
p);
2005 if (it == Haloed_node_pt.end())
2009 return (*it).second.size();
2014 Node* haloed_node_pt(
const unsigned&
p,
const unsigned&
j)
2016 return Haloed_node_pt[
p][
j];
2021 void add_haloed_node_pt(
const unsigned&
p, Node*& nod_pt)
2023 Haloed_node_pt[
p].push_back(nod_pt);
2027 bool Output_halo_elements;
2032 void disable_resizing_of_halo_nodes()
2034 Resize_halo_nodes_not_required =
true;
2040 void enable_resizing_of_halo_nodes()
2042 Resize_halo_nodes_not_required =
false;
2046 void disable_output_of_halo_elements()
2048 Output_halo_elements =
false;
2052 void enable_output_of_halo_elements()
2054 Output_halo_elements =
true;
2058 unsigned nshared_node()
2061 for (std::map<
unsigned, Vector<Node*>>::iterator it =
2062 Shared_node_pt.begin();
2063 it != Shared_node_pt.end();
2066 n += it->second.size();
2072 void doc_shared_nodes()
2074 for (std::map<
unsigned, Vector<Node*>>::iterator it =
2075 Shared_node_pt.begin();
2076 it != Shared_node_pt.end();
2079 unsigned n = it->second.size();
2080 for (
unsigned j = 0;
j <
n;
j++)
2082 oomph_info <<
"Shared node with proc " << it->first <<
" ";
2083 Node* nod_pt = it->second[
j];
2084 unsigned ndim = nod_pt->ndim();
2085 for (
unsigned i = 0;
i < ndim;
i++)
2097 unsigned nshared_node(
const unsigned&
p)
2100 std::map<unsigned, Vector<Node*>>::iterator it = Shared_node_pt.find(
p);
2101 if (it == Shared_node_pt.end())
2105 return (*it).second.size();
2110 Node* shared_node_pt(
const unsigned&
p,
const unsigned&
j)
2112 return Shared_node_pt[
p][
j];
2119 void get_shared_node_pt(
const unsigned&
p, Vector<Node*>& shared_node_pt)
2121 unsigned np = nshared_node(
p);
2122 shared_node_pt.resize(np);
2123 for (
unsigned j = 0;
j < np;
j++)
2125 shared_node_pt[
j] = Shared_node_pt[
p][
j];
2133 void add_shared_node_pt(
const unsigned&
p, Node*& nod_pt)
2135 Shared_node_pt[
p].push_back(nod_pt);
2142 void get_halo_node_stats(
double& av_number,
2143 unsigned& max_number,
2144 unsigned& min_number);
2150 void get_haloed_node_stats(
double& av_number,
2151 unsigned& max_number,
2152 unsigned& min_number);
2158 void output_external_halo_elements(std::ostream& outfile,
2159 const unsigned& n_plot = 5)
2161 for (std::map<
unsigned, Vector<GeneralisedElement*>>::iterator it =
2162 External_halo_element_pt.begin();
2163 it != External_halo_element_pt.end();
2166 unsigned p = (*it).first;
2167 output_external_halo_elements(
p, outfile, n_plot);
2172 void output_external_halo_elements(
const unsigned&
p,
2173 std::ostream& outfile,
2174 const unsigned& n_plot = 5)
2176 unsigned nel = External_halo_element_pt[
p].size();
2177 for (
unsigned e = 0;
e < nel;
e++)
2179 FiniteElement* fe_pt =
2180 dynamic_cast<FiniteElement*
>(External_halo_element_pt[
p][
e]);
2183 fe_pt->output(outfile, n_plot);
2190 void output_external_haloed_elements(std::ostream& outfile,
2191 const unsigned& n_plot = 5)
2193 for (std::map<
unsigned, Vector<GeneralisedElement*>>::iterator it =
2194 External_haloed_element_pt.begin();
2195 it != External_haloed_element_pt.end();
2198 unsigned p = (*it).first;
2199 output_external_haloed_elements(
p, outfile, n_plot);
2204 void output_external_haloed_elements(
const unsigned&
p,
2205 std::ostream& outfile,
2206 const unsigned& n_plot = 5)
2208 unsigned nel = External_haloed_element_pt[
p].size();
2209 for (
unsigned e = 0;
e < nel;
e++)
2211 FiniteElement* fe_pt =
2212 dynamic_cast<FiniteElement*
>(External_haloed_element_pt[
p][
e]);
2215 fe_pt->output(outfile, n_plot);
2222 unsigned nexternal_halo_element()
2225 for (std::map<
unsigned, Vector<GeneralisedElement*>>::iterator it =
2226 External_halo_element_pt.begin();
2227 it != External_halo_element_pt.end();
2230 n += it->second.size();
2237 unsigned nexternal_halo_element(
const unsigned&
p)
2240 std::map<unsigned, Vector<GeneralisedElement*>>::iterator it =
2241 External_halo_element_pt.find(
p);
2242 if (it == External_halo_element_pt.end())
2246 return (*it).second.size();
2251 GeneralisedElement*& external_halo_element_pt(
const unsigned&
p,
2254 return External_halo_element_pt[
p][
e];
2259 void add_external_halo_element_pt(
const unsigned&
p,
2260 GeneralisedElement*& el_pt)
2262 External_halo_element_pt[
p].push_back(el_pt);
2267 unsigned nexternal_haloed_element()
2270 for (std::map<
unsigned, Vector<GeneralisedElement*>>::iterator it =
2271 External_haloed_element_pt.begin();
2272 it != External_haloed_element_pt.end();
2275 n += it->second.size();
2282 unsigned nexternal_haloed_element(
const unsigned&
p)
2285 std::map<unsigned, Vector<GeneralisedElement*>>::iterator it =
2286 External_haloed_element_pt.find(
p);
2287 if (it == External_haloed_element_pt.end())
2291 return (*it).second.size();
2296 GeneralisedElement*& external_haloed_element_pt(
const unsigned&
p,
2299 return External_haloed_element_pt[
p][
e];
2304 unsigned add_external_haloed_element_pt(
const unsigned&
p,
2305 GeneralisedElement*& el_pt);
2308 unsigned nexternal_halo_node()
2311 for (std::map<
unsigned, Vector<Node*>>::iterator it =
2312 External_halo_node_pt.begin();
2313 it != External_halo_node_pt.end();
2316 n += it->second.size();
2323 void get_external_halo_node_pt(Vector<Node*>& external_halo_node_pt)
2325 unsigned n_total = nexternal_halo_node();
2326 external_halo_node_pt.reserve(n_total);
2327 for (std::map<
unsigned, Vector<Node*>>::iterator it =
2328 External_halo_node_pt.begin();
2329 it != External_halo_node_pt.end();
2332 unsigned np = (it->second).
size();
2333 for (
unsigned j = 0;
j < np;
j++)
2335 external_halo_node_pt.push_back((it->second)[
j]);
2339 if (external_halo_node_pt.size() != n_total)
2341 std::ostringstream error_stream;
2342 error_stream <<
"Total number of external halo nodes, " << n_total
2343 <<
" doesn't match number of entries \n in vector, "
2344 << external_halo_node_pt.size() << std::endl;
2345 throw OomphLibError(
2354 unsigned nexternal_halo_node(
const unsigned&
p)
2357 std::map<unsigned, Vector<Node*>>::iterator it =
2358 External_halo_node_pt.find(
p);
2359 if (it == External_halo_node_pt.end())
2363 return (*it).second.size();
2368 void add_external_halo_node_pt(
const unsigned&
p, Node*& nod_pt)
2370 External_halo_node_pt[
p].push_back(nod_pt);
2371 nod_pt->set_halo(
p);
2377 Node*& external_halo_node_pt(
const unsigned&
p,
const unsigned&
j)
2379 return External_halo_node_pt[
p][
j];
2384 Vector<Node*> external_halo_node_pt(
const unsigned&
p)
2386 std::map<unsigned, Vector<Node*>>::iterator it =
2387 External_halo_node_pt.find(
p);
2388 if (it == External_halo_node_pt.end())
2393 return (*it).second;
2398 void set_external_halo_node_pt(
const unsigned&
p,
2399 const Vector<Node*>& external_halo_node_pt)
2401 External_halo_node_pt[
p] = external_halo_node_pt;
2405 void null_external_halo_node(
const unsigned&
p, Node* nod_pt);
2409 void remove_null_pointers_from_external_halo_node_storage();
2412 unsigned nexternal_haloed_node()
2415 for (std::map<
unsigned, Vector<Node*>>::iterator it =
2416 External_haloed_node_pt.begin();
2417 it != External_haloed_node_pt.end();
2420 n += it->second.size();
2427 unsigned nexternal_haloed_node(
const unsigned&
p)
2430 std::map<unsigned, Vector<Node*>>::iterator it =
2431 External_haloed_node_pt.find(
p);
2432 if (it == External_haloed_node_pt.end())
2436 return (*it).second.size();
2441 Node*& external_haloed_node_pt(
const unsigned&
p,
const unsigned&
j)
2443 return External_haloed_node_pt[
p][
j];
2448 unsigned add_external_haloed_node_pt(
const unsigned&
p, Node*& nod_pt);
2452 Vector<Node*> external_haloed_node_pt(
const unsigned&
p)
2454 std::map<unsigned, Vector<Node*>>::iterator it =
2455 External_haloed_node_pt.find(
p);
2456 if (it == External_haloed_node_pt.end())
2461 return (*it).second;
2466 void set_external_haloed_node_pt(
2467 const unsigned&
p,
const Vector<Node*>& external_haloed_node_pt)
2469 External_haloed_node_pt[
p] = external_haloed_node_pt;
2475 std::set<int> external_halo_proc()
2477 std::set<int> procs;
2478 for (std::map<
unsigned, Vector<Node*>>::iterator it =
2479 External_halo_node_pt.begin();
2480 it != External_halo_node_pt.end();
2483 procs.insert((*it).first);
2490 virtual void create_shared_boundaries(
2491 OomphCommunicator* comm_pt,
2492 const Vector<unsigned>& element_domain,
2493 const Vector<GeneralisedElement*>& backed_up_el_pt,
2494 const Vector<FiniteElement*>& backed_up_f_el_pt,
2495 std::map<Data*, std::set<unsigned>>& processors_associated_with_data,
2496 const bool& overrule_keep_as_halo_element_status)
2498 std::ostringstream error_stream;
2499 error_stream <<
"Empty default create_shared_boundaries() method"
2501 error_stream <<
"This should be overloaded in a specific "
2502 <<
"TriangleMeshBase\n";
2503 throw OomphLibError(error_stream.str(),
2504 "Mesh::create_shared_boundaries()",
2510 virtual unsigned try_to_add_root_haloed_element_pt(
2511 const unsigned&
p, GeneralisedElement*& el_pt)
2513 std::ostringstream error_stream;
2514 error_stream <<
"Empty default try_to_add_root_haloed_element_pt() method"
2516 error_stream <<
"This should be overloaded in a specific "
2517 <<
"TriangleMeshBase\n";
2518 throw OomphLibError(error_stream.str(),
2519 "Mesh::try_to_add_root_haloed_element_pt()",
2525 virtual unsigned try_to_add_haloed_node_pt(
const unsigned&
p, Node*& nod_pt)
2527 std::ostringstream error_stream;
2528 error_stream <<
"Empty default try_to_add_haloed_node_pt() method"
2530 error_stream <<
"This should be overloaded in a specific "
2531 <<
"TriangleMeshBase\n";
2532 throw OomphLibError(error_stream.str(),
2533 "Mesh::try_to_add_haloed_node_pt()",
2548 class SolidICProblem;
2578 #ifdef OOMPH_HAS_MPI
2583 unsigned n = sub_mesh_pt.size();
2585 for (
unsigned i = 0;
i <
n;
i++)
2587 sub_mesh_mesh_pt[
i] =
static_cast<Mesh*
>(sub_mesh_pt[
i]);
2599 std::ostringstream error_stream;
2600 error_stream <<
"Error: Node " <<
n <<
"is a "
2617 std::ostringstream error_stream;
2618 error_stream <<
"Error: Node " <<
n <<
"is a "
2620 <<
", not an SolidNode" << std::endl;
2645 std::ostringstream error_message;
2647 error_message <<
"Error: Node " <<
n <<
" of element " <<
e <<
"is a "
2648 <<
typeid(*np).name() <<
", not an SolidNode"
2700 std::ostringstream error_stream;
2701 error_stream <<
"Edge cannot have two identical vertex nodes\n";
2807 namespace MeshChecker
2820 template<
class GEOM_ELEMENT_BASE,
class ELEMENT>
2822 const unsigned& nnode_1d = 0)
2830 ELEMENT* el_pt =
new ELEMENT;
2833 if (
dynamic_cast<GEOM_ELEMENT_BASE*
>(el_pt) == 0)
2835 std::stringstream error_message;
2836 error_message <<
"You have specified an illegal element type! Element "
2838 <<
typeid(el_pt).
name()
2839 <<
"\n\nand cannot be cast to type \n\n "
2840 <<
typeid(GEOM_ELEMENT_BASE).
name() <<
"\n\n";
2847 if (dim != el_pt->dim())
2849 std::stringstream error_message;
2850 error_message <<
"You have specified an illegal element type! Element "
2852 <<
typeid(el_pt).
name()
2853 <<
"\n\nand has dimension = " << el_pt->dim()
2854 <<
" but we need dim = " << dim << std::endl;
2863 if (nnode_1d != el_pt->nnode_1d())
2865 std::stringstream error_message;
2866 error_message <<
"You have specified an illegal element type! "
2867 "Element is of type \n\n"
2868 <<
typeid(el_pt).
name()
2869 <<
"\n\nand has nnode_1d = " << el_pt->nnode_1d()
2870 <<
" but we need nnode_1d = " << nnode_1d << std::endl;
2892 namespace ParaviewHelper
2901 const double& time);
2912 namespace NodeOrdering
2920 unsigned ndim = nd1_pt->
ndim();
2923 for (
j = 0;
j < ndim;
j++)
2927 if (nd1_pt->
x(
j) < nd2_pt->
x(
j))
2939 std::string err =
"Nodes are at the same point to ~ 1e-10!";
2940 err +=
" difference is " +
AnnoyingScalar abs(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:135
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Array< double, 1, 3 > e(1./3., 0.5, 2.)
float * p
Definition: Tutorial_Map_using.cpp:9
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
Scalar * b
Definition: benchVecAdd.cpp:17
Definition: generalised_timesteppers.h:101
virtual bool is_a_copy() const
Definition: nodes.h:253
Definition: elements.h:5014
Edge class.
Definition: mesh.h:2692
Node * node2_pt() const
Access to the second vertex node.
Definition: mesh.h:2729
bool is_on_boundary() const
Definition: mesh.h:2775
Node * node1_pt() const
Access to the first vertex node.
Definition: mesh.h:2723
bool is_boundary_edge() const
Definition: mesh.h:2783
Node * Node1_pt
First vertex node.
Definition: mesh.h:2791
Edge(Node *node1_pt, Node *node2_pt)
Constructor: Pass in the two vertex nodes.
Definition: mesh.h:2695
bool operator<(const Edge &other) const
Less-than operator.
Definition: mesh.h:2750
Node * Node2_pt
Second vertex node.
Definition: mesh.h:2794
bool operator==(const Edge &other) const
Comparison operator.
Definition: mesh.h:2735
double interpolated_x(const Vector< double > &s, const unsigned &i) const
Definition: elements.h:4528
void set_boundary_number_in_bulk_mesh(const unsigned &b)
Set function for the boundary number in bulk mesh.
Definition: elements.h:4482
Definition: elements.h:1313
void interpolated_zeta(const Vector< double > &s, Vector< double > &zeta) const
Definition: elements.cc:4675
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
double size() const
Definition: elements.cc:4290
virtual std::string tecplot_zone_string(const unsigned &nplot) const
Definition: elements.h:3161
virtual void compute_error(FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Calculate the norm of the error and that of the exact solution.
Definition: elements.h:3198
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Definition: elements.h:1759
virtual void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
Definition: elements.h:3148
virtual unsigned nplot_points(const unsigned &nplot) const
Definition: elements.h:3186
virtual void write_tecplot_zone_footer(std::ostream &outfile, const unsigned &nplot) const
Definition: elements.h:3174
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Definition: elements.h:1765
Definition: elements.h:73
virtual void compute_norm(Vector< double > &norm)
Definition: elements.h:1128
void add_boundary_node(const unsigned &b, Node *const &node_pt)
Add a (pointer to) a node to the b-th boundary.
Definition: mesh.cc:243
unsigned long nboundary_node(const unsigned &ibound) const
Return number of nodes on a particular boundary.
Definition: mesh.h:833
void(FiniteElement::* SteadyExactSolutionFctPt)(const Vector< double > &x, Vector< double > &soln)
Definition: mesh.h:223
Vector< Node * > Node_pt
Vector of pointers to nodes.
Definition: mesh.h:183
Node * boundary_node_pt(const unsigned &b, const unsigned &n) const
Return pointer to node n on boundary b.
Definition: mesh.h:499
static Steady< 0 > Default_TimeStepper
The Steady Timestepper.
Definition: mesh.h:75
bool does_pointer_correspond_to_mesh_data(double *const ¶meter_pt)
Does the double pointer correspond to any mesh data.
Definition: mesh.cc:2471
virtual void compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
Definition: mesh.h:1351
unsigned ndof_types() const
Return number of dof types in mesh.
Definition: mesh.cc:8764
void remove_boundary_node(const unsigned &b, Node *const &node_pt)
Remove a node from the boundary b.
Definition: mesh.cc:221
bool is_mesh_distributed() const
Boolean to indicate if Mesh has been distributed.
Definition: mesh.h:1588
void max_and_min_element_size(double &max_size, double &min_size)
Definition: mesh.h:692
Vector< Vector< FiniteElement * > > Boundary_element_pt
Definition: mesh.h:91
unsigned nodal_dimension() const
Return number of nodal dimension in mesh.
Definition: mesh.cc:9055
virtual void compute_norm(double &norm)
Definition: mesh.h:1068
bool Lookup_for_elements_next_boundary_is_setup
Definition: mesh.h:87
void flush_element_and_node_storage()
Definition: mesh.h:407
OomphCommunicator * communicator_pt() const
Definition: mesh.h:1600
void flush_element_storage()
Definition: mesh.h:423
GeneralisedElement * element_pt(const unsigned long &e) const
Return pointer to element e (const version)
Definition: mesh.h:454
void output(const std::string &output_filename)
Output for all elements.
Definition: mesh.h:975
std::vector< bool > Boundary_coordinate_exists
Definition: mesh.h:190
virtual void setup_boundary_element_info(std::ostream &outfile)
Definition: mesh.h:281
Node * node_pt(const unsigned long &n) const
Return pointer to global node n (const version)
Definition: mesh.h:442
FiniteElement * finite_element_pt(const unsigned &e) const
Definition: mesh.h:473
void(FiniteElement::* UnsteadyExactSolutionFctPt)(const double &time, const Vector< double > &x, Vector< double > &soln)
Definition: mesh.h:228
virtual void set_mesh_level_time_stepper(TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
Definition: mesh.cc:2402
void describe_local_dofs(std::ostream &out, const std::string ¤t_string) const
Definition: mesh.cc:746
void check_inverted_elements(bool &mesh_has_inverted_elements)
Definition: mesh.h:742
int face_index_at_boundary(const unsigned &b, const unsigned &e) const
Definition: mesh.h:896
Vector< Vector< int > > Face_index_at_boundary
Definition: mesh.h:95
void set_nboundary(const unsigned &nbound)
Set the number of boundaries in the mesh.
Definition: mesh.h:505
Vector< GeneralisedElement * > & element_pt()
Return reference to the Vector of elements.
Definition: mesh.h:466
void copy_boundary_node_data_from_nodes()
Definition: mesh.h:526
void set_elemental_internal_time_stepper(TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
Definition: mesh.cc:2535
void doc_boundary_coordinates(const unsigned &b, std::ofstream &the_file)
Definition: mesh.h:303
unsigned nboundary_element(const unsigned &b) const
Return number of finite elements that are adjacent to boundary b.
Definition: mesh.h:878
void set_nodal_and_elemental_time_stepper(TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
Definition: mesh.h:1032
virtual void setup_boundary_element_info()
Definition: mesh.h:275
unsigned elemental_dimension() const
Return number of elemental dimension in mesh.
Definition: mesh.cc:8917
void check_inverted_elements(bool &mesh_has_inverted_elements, std::ofstream &inverted_element_file)
Definition: mesh.cc:870
virtual void compute_norm(Vector< double > &norm)
Definition: mesh.h:1099
void output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt)
Output a given Vector function at f(n_plot) points in each element.
Definition: mesh.cc:2199
virtual void compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
Definition: mesh.h:1140
virtual void scale_mesh(const double &factor)
Definition: mesh.h:373
void shift_time_values()
Definition: mesh.cc:2326
virtual void reorder_nodes(const bool &use_old_ordering=true)
Definition: mesh.cc:508
void calculate_predictions()
Definition: mesh.cc:2366
void output_boundaries(const std::string &output_filename)
Definition: mesh.h:1009
unsigned nboundary() const
Return number of boundaries.
Definition: mesh.h:827
void describe_dofs(std::ostream &out, const std::string ¤t_string) const
Definition: mesh.cc:711
FiniteElement * boundary_element_pt(const unsigned &b, const unsigned &e) const
Return pointer to e-th finite element on boundary b.
Definition: mesh.h:840
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
Definition: mesh.h:448
void output_fct_paraview(std::ofstream &file_out, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt) const
Definition: mesh.cc:1491
void remove_boundary_nodes()
Clear all pointers to boundary nodes.
Definition: mesh.cc:204
void build_face_mesh(const unsigned &b, Mesh *const &face_mesh_pt)
Definition: mesh.h:653
unsigned long nnode() const
Return number of nodes in the mesh.
Definition: mesh.h:596
virtual void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Definition: mesh.h:1186
virtual void node_update(const bool &update_all_solid_nodes=false)
Definition: mesh.cc:287
void delete_all_external_storage()
Wipe the storage for all externally-based elements.
Definition: mesh.cc:9190
virtual void compute_error(FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
Definition: mesh.h:1525
Mesh()
Default constructor.
Definition: mesh.h:236
unsigned check_for_repeated_nodes(const double &epsilon=1.0e-12)
Definition: mesh.h:752
void convert_to_boundary_node(Node *&node_pt, const Vector< FiniteElement * > &finite_element_pt)
Definition: mesh.cc:2590
void output(std::ostream &outfile)
Output for all elements.
Definition: mesh.cc:2027
virtual void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
Definition: mesh.h:1417
void add_element_pt(GeneralisedElement *const &element_pt)
Add a (pointer to) an element to the mesh.
Definition: mesh.h:617
void operator=(const Mesh &)=delete
Broken assignment operator.
void assign_initial_values_impulsive()
Assign initial values for an impulsive start.
Definition: mesh.cc:2288
const Vector< GeneralisedElement * > & element_pt() const
Return reference to the Vector of elements.
Definition: mesh.h:460
Node *& node_pt(const unsigned long &n)
Return pointer to global node n.
Definition: mesh.h:436
void flush_node_storage()
Definition: mesh.h:430
void assign_local_eqn_numbers(const bool &store_local_dof_pt)
Assign local equation numbers in all elements.
Definition: mesh.cc:765
Vector< Vector< Node * > > Boundary_node_pt
Definition: mesh.h:83
virtual ~Mesh()
Virtual Destructor to clean up all memory.
Definition: mesh.cc:650
void add_node_pt(Node *const &node_pt)
Add a (pointer to a) node to the mesh.
Definition: mesh.h:611
virtual void read(std::ifstream &restart_file)
Read solution from restart file.
Definition: mesh.cc:1130
void set_nodal_time_stepper(TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
Set the timestepper associated with the nodal data in the mesh.
Definition: mesh.cc:2516
virtual void reset_boundary_element_info(Vector< unsigned > &ntmp_boundary_elements, Vector< Vector< unsigned >> &ntmp_boundary_elements_in_region, Vector< FiniteElement * > &deleted_elements)
Virtual function to perform the reset boundary elements info rutines.
Definition: mesh.h:284
unsigned self_test()
Self-test: Check elements and nodes. Return 0 for OK.
Definition: mesh.cc:778
void set_consistent_pinned_values_for_continuation(ContinuationStorageScheme *const &continuation_stepper_pt)
Set consistent values for pinned data in continuation.
Definition: mesh.cc:2436
Vector< Node * > prune_dead_nodes()
Definition: mesh.cc:966
void output(const std::string &output_filename, const unsigned &n_plot)
Output at f(n_plot) points in each element.
Definition: mesh.h:984
Node *& boundary_node_pt(const unsigned &b, const unsigned &n)
Return pointer to node n on boundary b.
Definition: mesh.h:493
Vector< GeneralisedElement * > Element_pt
Vector of pointers to generalised elements.
Definition: mesh.h:186
virtual void compute_error(FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
Definition: mesh.h:1279
bool boundary_coordinate_exists(const unsigned &i) const
Indicate whether the i-th boundary has an intrinsic coordinate.
Definition: mesh.h:565
static bool Suppress_warning_about_empty_mesh_level_time_stepper_function
Static boolean flag to control warning about mesh level timesteppers.
Definition: mesh.h:233
Node * get_some_non_boundary_node() const
Definition: mesh.h:859
unsigned long assign_global_eqn_numbers(Vector< double * > &Dof_pt)
Assign (global) equation numbers to the nodes.
Definition: mesh.cc:677
virtual void compute_error(FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Definition: mesh.h:1231
Mesh(const Mesh &dummy)=delete
Broken copy constructor.
virtual void compute_error(FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
Returns the norm of the error and that of the exact solution.
Definition: mesh.h:1479
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
virtual void get_node_reordering(Vector< Node * > &reordering, const bool &use_old_ordering=true) const
Definition: mesh.cc:532
void merge_meshes(const Vector< Mesh * > &sub_mesh_pt)
Definition: mesh.cc:65
void output_paraview(std::ofstream &file_out, const unsigned &nplot) const
Definition: mesh.cc:1225
void output_boundaries(std::ostream &outfile)
Output the nodes on the boundaries (into separate tecplot zones)
Definition: mesh.cc:1064
virtual void dump(std::ofstream &dump_file, const bool &use_old_ordering=true) const
Dump the data in the mesh into a file for restart.
Definition: mesh.cc:1088
double total_size()
Definition: mesh.h:708
void dump(const std::string &dump_file_name, const bool &use_old_ordering=true) const
Dump the data in the mesh into a file for restart.
Definition: mesh.h:915
Mesh(const Vector< Mesh * > &sub_mesh_pt)
Definition: mesh.h:257
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
virtual bool is_on_boundary() const
Definition: nodes.h:1373
virtual void get_boundaries_pt(std::set< unsigned > *&boundaries_pt)
Definition: nodes.h:1365
unsigned ndim() const
Return (Eulerian) spatial dimension of the node.
Definition: nodes.h:1054
Definition: communicator.h:54
Definition: oomph_definitions.h:222
Definition: problem.h:151
Definition: elastic_problems.h:88
void operator=(const SolidMesh &)=delete
Broken assignment operator.
SolidMesh()
Default constructor.
Definition: mesh.h:2565
static SolidICProblem Solid_IC_problem
Definition: mesh.h:2679
void scale_mesh(const double &factor)
Definition: mesh.h:2669
SolidMesh(const Vector< SolidMesh * > &sub_mesh_pt)
Definition: mesh.h:2576
SolidNode * node_pt(const unsigned long &n)
Return a pointer to the n-th global SolidNode.
Definition: mesh.h:2594
SolidNode * element_node_pt(const unsigned long &e, const unsigned &n)
Definition: mesh.h:2631
void set_lagrangian_nodal_coordinates()
Definition: mesh.cc:9564
SolidNode * boundary_node_pt(const unsigned &b, const unsigned &n)
Return n-th SolidNodes on b-th boundary.
Definition: mesh.h:2612
SolidMesh(const SolidMesh &dummy)=delete
Broken copy constructor.
Definition: timesteppers.h:231
Definition: oomph-lib/src/generic/Vector.h:58
void initialise(const _Tp &__value)
Iterate over all values and set to the desired value.
Definition: oomph-lib/src/generic/Vector.h:167
#define min(a, b)
Definition: datatypes.h:22
#define max(a, b)
Definition: datatypes.h:23
RealScalar s
Definition: level1_cplx_impl.h:130
char char char int int * k
Definition: level2_impl.h:374
Eigen::Matrix< Scalar, Dynamic, Dynamic, ColMajor > tmp
Definition: level3_impl.h:365
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625
EIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition: SpecialFunctionsArrayAPI.h:152
int error
Definition: calibrate.py:297
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
void assert_geometric_element(const unsigned &dim, const unsigned &nnode_1d=0)
Definition: mesh.h:2821
bool node_global_position_comparison(Node *nd1_pt, Node *nd2_pt)
Definition: mesh.h:2918
void write_pvd_footer(std::ofstream &pvd_file)
Write the pvd file footer.
Definition: mesh.cc:9639
void write_pvd_header(std::ofstream &pvd_file)
Write the pvd file header.
Definition: mesh.cc:9615
void write_pvd_information(std::ofstream &pvd_file, const std::string &output_filename, const double &time)
Definition: mesh.cc:9624
double epsilon
Definition: osc_ring_sarah_asymptotics.h:43
std::string to_string(T object, unsigned float_precision=8)
Definition: oomph_utilities.h:189
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
OomphInfo oomph_info
Definition: oomph_definitions.cc:319
list x
Definition: plotDoE.py:28
string name
Definition: plotDoE.py:33
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
std::ofstream out("Result.txt")
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2