26 #ifndef OOMPH_REFINEABLE_QUAD_ELEMENT_HEADER
27 #define OOMPH_REFINEABLE_QUAD_ELEMENT_HEADER
31 #include <oomph-lib-config.h>
81 LeakCheckNames::RefineableQElement<2>
_build += 1;
101 LeakCheckNames::RefineableQElement<2>
_build -= 1;
139 virtual void build(
Mesh*& mesh_pt,
141 bool& was_already_built,
142 std::ofstream& new_nodes_file);
146 void check_integrity(
double& max_error);
154 return dynamic_cast<QuadTree*
>(Tree_pt);
160 return dynamic_cast<QuadTree*
>(Tree_pt);
180 void setup_father_bounds();
183 void get_edge_bcs(
const int& edge,
Vector<int>& bound_cons)
const;
188 void get_boundaries(
const int& edge, std::set<unsigned>& boundaries)
const;
193 void get_bcs(
int bound,
Vector<int>& bound_cons)
const;
197 void interpolated_zeta_on_edge(
const unsigned& boundary,
205 void setup_hang_for_value(
const int& value_id);
209 virtual void quad_hang_helper(
const int& value_id,
211 std::ofstream& output_hangfile);
252 undeformed_macro_elem_pt);
265 void get_edge_solid_bcs(
const int& edge,
272 void get_solid_bcs(
int bound,
Vector<int>& solid_bound_cons)
const;
280 bool& was_already_built,
281 std::ofstream& new_nodes_file)
283 using namespace QuadTreeNames;
287 mesh_pt, new_node_pt, was_already_built, new_nodes_file);
290 if (was_already_built)
return;
295 int son_type = Tree_pt->son_type();
301 Tree_pt->father_pt()->object_pt());
312 "We can't handle generalised nodal positions (yet).\n",
313 OOMPH_CURRENT_FUNCTION,
314 OOMPH_EXCEPTION_LOCATION);
364 for (
unsigned i = 0;
i < 2;
i++)
368 0.5 * (s_lo[
i] + 1.0) *
372 0.5 * (s_hi[
i] + 1.0) *
381 unsigned n_p = nnode_1d();
384 for (
unsigned i0 = 0; i0 < n_p; i0++)
387 s[0] = s_lo[0] + (s_hi[0] - s_lo[0]) *
double(i0) / double(n_p - 1);
389 for (
unsigned i1 = 0; i1 < n_p; i1++)
392 s[1] = s_lo[1] + (s_hi[1] - s_lo[1]) *
double(i1) / double(n_p - 1);
407 for (
unsigned i = 0;
i < 2;
i++)
420 elastic_node_pt->
x(
i) = x_fe[
i];
424 if (Use_undeformed_macro_element_for_new_lagrangian_coords)
426 elastic_node_pt->
xi(
i) = xi[
i];
430 elastic_node_pt->
xi(
i) = xi_fe[
i];
440 unsigned ntstorage = time_stepper_pt->
ntstorage();
445 for (
unsigned t = 1;
t < ntstorage;
t++)
453 for (
unsigned i = 0;
i < 2;
i++)
455 elastic_node_pt->
x(
t,
i) =
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
virtual void get_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the elemental Jacobian matrix "d equation / d variable".
Base class for MacroElement s that are used during mesh refinement in domains with curvlinear and/or ...
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
double & x(const unsigned &i)
Return the i-th nodal coordinate.
An OomphLibError object which should be thrown when an run-time error is encountered....
double & s_macro_ll(const unsigned &i)
Access fct to the i-th coordinate of the element's "lower left" vertex in the associated MacroElement...
double & s_macro_ur(const unsigned &i)
Access fct to the i-th coordinate of the element's "upper right" vertex in the associated MacroElemen...
/////////////////////////////////////////////////////////////////////// /////////////////////////////...
virtual void set_macro_elem_pt(MacroElement *macro_elem_pt)
Broken assignment operator.
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...
Base class for all quad elements.
QuadTree class: Recursively defined, generalised quadtree.
RefineableElements are FiniteElements that may be subdivided into children to provide a better local ...
Refineable version of QElement<2,NNODE_1D>.
virtual void further_setup_hanging_nodes()=0
Perform additional hanging node procedures for variables that are not interpolated by all nodes (e....
QuadTree * quadtree_pt() const
Pointer to quadtree representation of this element.
QuadTree * quadtree_pt()
Pointer to quadtree representation of this element.
RefineableQElement()
Constructor: Pass refinement level (default 0 = root)
static std::map< unsigned, DenseMatrix< int > > Father_bound
Coincidence between son nodal points and father boundaries: Father_bound[node_1d](jnod_son,...
unsigned required_nsons() const
A refineable quad element has four sons.
virtual ~RefineableQElement()
Broken assignment operator.
RefineableQElement(const RefineableQElement< 2 > &dummy)=delete
Broken copy constructor.
virtual Node * node_created_by_son_of_neighbour(const Vector< double > &s_fraction, bool &is_periodic)
If a son of a neighbouring element has already created a node at a position corresponding to the loca...
A class that is used to template the refineable Q elements by dimension. It's really nothing more tha...
/////////////////////////////////////////////////////////////////// /////////////////////////////////...
Refineable version of Solid quad elements.
void build(Mesh *&mesh_pt, Vector< Node * > &new_node_pt, bool &was_already_built, std::ofstream &new_nodes_file)
Build the element, i.e. give it nodal positions, apply BCs, etc. Incl. documention into new_nodes_fil...
virtual ~RefineableSolidQElement()
Broken assignment operator.
void set_macro_elem_pt(MacroElement *macro_elem_pt, MacroElement *undeformed_macro_elem_pt)
Final over-ride: Use version in QSolidElementBase.
RefineableSolidQElement()
Constructor, just call the constructor of the RefineableQElement<2>
void get_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Use the generic finite difference routine defined in RefineableSolidElement to calculate the Jacobian...
void set_macro_elem_pt(MacroElement *macro_elem_pt)
Final over-ride: Use version in QSolidElementBase.
RefineableSolidQElement(const RefineableSolidQElement< 2 > &dummy)=delete
Broken copy constructor.
A class that is used to template the solid refineable Q elements by dimension. It's really nothing mo...
MacroElement * Undeformed_macro_elem_pt
Pointer to the element's "undeformed" macro element (NULL by default)
A Class for nodes that deform elastically (i.e. position is an unknown in the problem)....
unsigned nlagrangian_type() const
Number of types of Lagrangian coordinates used to interpolate the Lagrangian coordinates within the e...
double & xi(const unsigned &i)
Reference to i-th Lagrangian position.
////////////////////////////////////////////////////////////////////// //////////////////////////////...
unsigned ntstorage() const
Return the number of doubles required to represent history (one for steady)
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
long RefineableQElement< 2 > _build
Vector< std::string > colour
Tecplot colours.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...