48 using namespace QuadTreeNames;
67 Father_bound[
n_p](0, SW) = SW;
69 for (
unsigned n = 1;
n <
n_p;
n++)
71 Father_bound[
n_p](
n, SW) = S;
74 for (
unsigned n = 1;
n <
n_p;
n++)
76 Father_bound[
n_p](
n_p *
n, SW) = W;
83 Father_bound[
n_p](
n_p * (
n_p - 1), NW) = NW;
85 for (
unsigned n = 1;
n <
n_p;
n++)
87 Father_bound[
n_p](
n_p * (
n_p - 1) +
n, NW) = N;
90 for (
unsigned n = 0;
n < (
n_p - 1);
n++)
92 Father_bound[
n_p](
n_p *
n, NW) = W;
99 Father_bound[
n_p](
n_p *
n_p - 1, NE) = NE;
101 for (
unsigned n = 0;
n < (
n_p - 1);
n++)
103 Father_bound[
n_p](
n_p * (
n_p - 1) +
n, NE) = N;
106 for (
unsigned n = 0;
n < (
n_p - 1);
n++)
115 Father_bound[
n_p](
n_p - 1, SE) = SE;
117 for (
unsigned n = 0;
n < (
n_p - 1);
n++)
119 Father_bound[
n_p](
n, SE) = S;
122 for (
unsigned n = 1;
n <
n_p;
n++)
147 using namespace QuadTreeNames;
150 unsigned nvalue = ncont_interpolated_values();
170 for (
unsigned k = 0;
k < nvalue;
k++)
181 for (
unsigned k = 0;
k < nvalue;
k++)
192 for (
unsigned k = 0;
k < nvalue;
k++)
203 for (
unsigned k = 0;
k < nvalue;
k++)
227 using namespace QuadTreeNames;
267 unsigned maxnvalue = ncont_interpolated_values();
289 std::set<unsigned>& boundary)
const
291 using namespace QuadTreeNames;
363 inserter(boundary, boundary.begin()));
379 inserter(boundary, boundary.begin()));
391 const unsigned& boundary,
396 using namespace QuadTreeNames;
408 unsigned start = 0, multiplier = 1;
419 <<
" is not on South edge\n";
435 <<
" is not on North edge\n";
452 <<
" is not on West edge\n";
469 <<
" is not on East edge\n";
494 for (
unsigned n = 0;
n <
n_p;
n++)
519 using namespace QuadTreeNames;
574 if (
neigh_pt->object_pt()->nodes_built())
583 for (
unsigned i = 0;
i < 2;
i++)
602 quadtree_pt()->root_pt()->is_neighbour_periodic(
edges[
j]);
647 using namespace QuadTreeNames;
653 if (Father_bound[
n_p].nrow() == 0)
655 setup_father_bounds();
670 std::string error_message =
671 "Something fishy here: I have no father and yet \n";
672 error_message +=
"I have no nodes. Who has created me then?!\n";
699 throw OomphLibError(
"Can't handle generalised nodal positions (yet).",
748 for (
unsigned i = 0;
i < 2;
i++)
752 0.5 * (
s_lo[
i] + 1.0) *
756 0.5 * (
s_hi[
i] + 1.0) *
766 "Trouble: father_el_pt->node_pt(0)==0\n Can't build son element!\n",
830 for (
unsigned t = 0;
t < ntstorage;
t++)
846 for (
unsigned k = 0;
k <
n_var;
k++)
904 "boundaries.size()!=1 seems a bit strange..\n",
913 error_stream <<
"Periodic node is not on a boundary...\n"
931 for (
unsigned t = 0;
t < ntstorage;
t++)
941 for (
unsigned i = 0;
i < 2;
i++)
949 for (std::set<unsigned>::iterator
it =
boundaries.begin();
1030 "boundaries.size()!=1 seems a bit strange..\n",
1039 error_stream <<
"Periodic node is not on a boundary...\n"
1057 for (
unsigned t = 0;
t < ntstorage;
t++)
1067 for (
unsigned i = 0;
i < 2;
i++)
1075 for (std::set<unsigned>::iterator
it =
boundaries.begin();
1144 "boundaries.size()!=1 seems a bit strange..\n",
1192 std::string error_message =
1193 "We have a SolidNode outside a refineable SolidElement\n";
1195 "during mesh refinement -- this doesn't make sense";
1206 for (
unsigned k = 0;
k <
n_dim;
k++)
1218 for (std::set<unsigned>::iterator
it =
boundaries.begin();
1262 for (
unsigned t = 0;
t < ntstorage;
t++)
1273 for (
unsigned i = 0;
i < 2;
i++)
1280 for (
unsigned t = 0;
t < ntstorage;
t++)
1354 std::string error_message =
1355 "Failed to cast to MacroElementNodeUpdateElementBase*\n";
1357 "Strange -- if the father is a MacroElementNodeUpdateElement\n";
1358 error_message +=
"the son should be too....\n";
1372 m_el_pt->set_node_update_info(geom_object_pt);
1395 std::string error_message =
1396 "Failed to cast to ElementWithMovingNodes*\n";
1398 "Strange -- if the son is a ElementWithMovingNodes\n";
1399 error_message +=
"the father should be too....\n";
1409 ->are_dresidual_dnodal_coordinates_always_evaluated_by_fd())
1412 ->enable_always_evaluate_dresidual_dnodal_coordinates_by_fd();
1421 ->is_fill_in_jacobian_from_geometric_data_bypassed())
1423 aux_el_pt->enable_bypass_fill_in_jacobian_from_geometric_data();
1444 const std::string& colour)
const
1449 outfile <<
"ZONE I=2,J=2, C=" << colour << std::endl;
1473 <<
", HU = GRID, H = 0.01, AN = MIDCENTER, T =\"" <<
Number <<
"\""
1493 using namespace QuadTreeNames;
1508 using namespace QuadTreeNames;
1526 using namespace QuadTreeNames;
1602 for (
unsigned i = 0;
i < 2;
i++)
1610 for (
unsigned i = 0;
i < 2;
i++)
1622 for (
unsigned i = 0;
i < 2;
i++)
1626 for (
unsigned i = 0;
i < 2;
i++)
1648 local_one_d_fraction_of_interpolating_node(
i0, 0,
value_id);
1656 local_one_d_fraction_of_interpolating_node(
i0, 0,
value_id);
1664 local_one_d_fraction_of_interpolating_node(
i0, 1,
value_id);
1672 local_one_d_fraction_of_interpolating_node(
i0, 1,
value_id);
1684 for (
unsigned i = 0;
i < 2;
i++)
1692 neigh_pt->object_pt()->get_interpolating_node_at_local_coordinate(
1799 <<
" is not hanging and has " << std::endl
1804 <<
"even though the two should be "
1805 <<
"identical" << std::endl;
1807 "RefineableQElement<2>::quad_hang_helper()",
1839 using namespace QuadTreeNames;
1934 for (
unsigned i = 0;
i < 2;
i++)
1953 for (
int i = 0;
i < 2;
i++)
1982 neigh_pt->object_pt()->get_interpolated_values(
1987 get_interpolated_values(
t,
s, values);
1992 neigh_pt->object_pt()->ncont_interpolated_values();
2003 <<
"erru (S)" <<
err <<
" " <<
ival <<
" "
2023 if (max_error > 1
e-9)
2025 oomph_info <<
"\n#------------------------------------ \n#Max error ";
2028 oomph_info <<
"#------------------------------------ \n " << std::endl;
2067 using namespace QuadTreeNames;
2091 for (
unsigned k = 0;
k <
n_dim;
k++)
2102 for (
unsigned k = 0;
k <
n_dim;
k++)
2113 for (
unsigned k = 0;
k <
n_dim;
k++)
2124 for (
unsigned k = 0;
k <
n_dim;
k++)
2149 using namespace QuadTreeNames;
2183 <<
" passed to get_solid_edge_bcs(..)" << std::endl;
2197 "Left node cannot be cast to SolidNode --> something is wrong",
2204 "Right node cannot be cast to SolidNode --> something is wrong",
2217 for (
unsigned k = 0;
k <
n_dim;
k++)
Base class for algebraic elements.
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
bool is_pinned(const unsigned &i) const
Test whether the i-th variable is pinned (1: true; 0: false).
A policy class that serves to establish the common interfaces for elements that contain moving nodes....
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.
virtual Node * get_node_at_local_coordinate(const Vector< double > &s) const
If there is a node at this local coordinate, return the pointer to the node.
virtual double s_min() const
Min value of local coordinate.
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
virtual Node * construct_node(const unsigned &n)
Construct the local node n and return a pointer to the newly created node object.
virtual void shape(const Vector< double > &s, Shape &psi) const =0
Calculate the geometric shape functions at local coordinate s. This function must be overloaded for e...
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
MacroElement * Macro_elem_pt
Pointer to the element's macro element (NULL by default)
virtual double s_max() const
Max. value of local coordinate.
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 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...
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
virtual unsigned nnode_1d() const
Return the number of nodes along one edge of the element Default is to return zero — must be overload...
unsigned nodal_dimension() const
Return the required Eulerian dimension of the nodes in this element.
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...
int get_node_number(Node *const &node_pt) const
Return the number of the node *node_pt if this node is in the element, else return -1;.
int non_halo_proc_ID()
ID of processor ID that holds non-halo counterpart of halo element; negative if not a halo.
int Non_halo_proc_ID
Non-halo processor ID for Data; -1 if it's not a halo.
unsigned ndim() const
Access function to # of Eulerian coordinates.
TimeStepper *& time_stepper_pt()
Access function for pointer to time stepper: Null if object is not time-dependent.
Class that contains data for hanging nodes.
Base class for elements that allow MacroElement-based node update.
void add_boundary_node(const unsigned &b, Node *const &node_pt)
Add a (pointer to) a node to the b-th boundary.
void add_node_pt(Node *const &node_pt)
Add a (pointer to a) node to the mesh.
bool boundary_coordinate_exists(const unsigned &i) const
Indicate whether the i-th boundary has an intrinsic coordinate.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
virtual void get_boundaries_pt(std::set< unsigned > *&boundaries_pt)
Return a pointer to set of mesh boundaries that this node occupies; this will be overloaded by Bounda...
double & x(const unsigned &i)
Return the i-th nodal coordinate.
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....
unsigned nposition_type() const
Number of coordinate types needed in the mapping between local and global coordinates.
An OomphLibError object which should be thrown when an run-time error is encountered....
An OomphLibWarning object which should be created as a temporary object to issue a warning....
QuadTree class: Recursively defined, generalised quadtree.
RefineableElements are FiniteElements that may be subdivided into children to provide a better local ...
A class that is used to template the refineable Q elements by dimension. It's really nothing more tha...
A class that is used to template the solid refineable Q elements by dimension. It's really nothing mo...
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
A Class for nodes that deform elastically (i.e. position is an unknown in the problem)....
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
TAdvectionDiffusionReactionElement()
Constructor: Call constructors for TElement and AdvectionDiffusionReaction equations.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
unsigned ntstorage() const
Return the number of doubles required to represent history (one for steady)
int son_type() const
Return son type.
RefineableElement * object_pt() const
Return the pointer to the object (RefineableElement) represented by the tree.
static const int OMEGA
Default value for an unassigned neighbour.
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...