30 #ifndef OOMPH_REFINEABLE_QUAD_ELEMENT_HEADER 31 #define OOMPH_REFINEABLE_QUAD_ELEMENT_HEADER 35 #include <oomph-lib-config.h> 88 LeakCheckNames::RefineableQElement<2>
_build+=1;
113 LeakCheckNames::RefineableQElement<2>
_build-=1;
149 bool& was_already_built,
150 std::ofstream &new_nodes_file);
154 void check_integrity(
double& max_error);
161 {
return dynamic_cast<QuadTree*
>(Tree_pt);}
174 virtual void further_setup_hanging_nodes()=0;
184 void setup_father_bounds();
187 void get_edge_bcs(
const int& edge,
Vector<int>& bound_cons)
const;
192 void get_boundaries(
const int& edge, std::set<unsigned>& boundaries)
const;
197 void get_bcs(
int bound,
Vector<int>& bound_cons)
const;
201 void interpolated_zeta_on_edge(
const unsigned &boundary,
210 void setup_hang_for_value(
const int &value_id);
214 virtual void quad_hang_helper(
const int &value_id,
const int &my_edge,
215 std::ofstream &output_hangfile);
264 undeformed_macro_elem_pt);
276 void get_edge_solid_bcs(
const int& edge,
Vector<int>& solid_bound_cons)
const;
282 void get_solid_bcs(
int bound,
Vector<int>& solid_bound_cons)
const;
289 bool& was_already_built,
290 std::ofstream &new_nodes_file)
292 using namespace QuadTreeNames;
299 if (was_already_built)
return;
304 int son_type=Tree_pt->son_type();
310 (Tree_pt->father_pt()->object_pt());
317 if (static_cast<SolidNode*>(father_el_pt->
node_pt(0))
318 ->nlagrangian_type()!=1)
321 "We can't handle generalised nodal positions (yet).\n",
322 OOMPH_CURRENT_FUNCTION,
323 OOMPH_EXCEPTION_LOCATION);
373 for(
unsigned i=0;
i<2;
i++)
388 unsigned n_p = nnode_1d();
391 for (
unsigned i0=0;i0<n_p;i0++)
394 s[0]=s_lo[0] + (s_hi[0]-s_lo[0])*
double(i0)/double(n_p-1);
396 for (
unsigned i1=0;i1<n_p;i1++)
399 s[1]=s_lo[1] + (s_hi[1]-s_lo[1])*
double(i1)/double(n_p-1);
415 for (
unsigned i=0;
i<2;
i++)
428 elastic_node_pt->
x(
i) = x_fe[
i];
432 if (Use_undeformed_macro_element_for_new_lagrangian_coords)
434 elastic_node_pt->
xi(
i) = xi[
i];
438 elastic_node_pt->
xi(
i) = xi_fe[
i];
448 unsigned ntstorage=time_stepper_pt->
ntstorage();
453 for (
unsigned t=1;
t<ntstorage;
t++)
460 for(
unsigned i=0;
i<2;
i++)
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
RefineableQElement()
Constructor: Pass refinement level (default 0 = root)
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 void get_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the elemental Jacobian matrix "d equation / d variable".
virtual ~RefineableSolidQElement()
Broken assignment operator.
QuadTree * quadtree_pt() const
Pointer to quadtree representation of this element.
RefineableQElement(const RefineableQElement< 2 > &dummy)
Broken copy constructor.
Base class for Solid Qelements.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
static std::map< unsigned, DenseMatrix< int > > Father_bound
Coincidence between son nodal points and father boundaries: Father_bound[node_1d](jnod_son,son_type)={SW/SE/NW/NE/S/E/N/W/OMEGA}.
MacroElement * Undeformed_macro_elem_pt
Pointer to the element's "undeformed" macro element (NULL by default)
TimeStepper *& time_stepper_pt()
Access function for pointer to time stepper: Null if object is not time-dependent.
virtual void set_macro_elem_pt(MacroElement *macro_elem_pt)
Broken assignment operator.
Base class for all quad elements.
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 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...
double & x(const unsigned &i)
Return the i-th nodal coordinate.
double & xi(const unsigned &i)
Reference to i-th Lagrangian position.
QuadTree * quadtree_pt()
Pointer to quadtree representation of this element.
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
void get_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Use the generic finite difference routine defined in RefineableSolidElement to calculate the Jacobian...
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
RefineableSolidQElement()
Constructor, just call the constructor of the RefineableQElement<2>
void set_macro_elem_pt(MacroElement *macro_elem_pt)
Final over-ride: Use version in QSolidElementBase.
unsigned ntstorage() const
Return the number of doubles required to represent history (one for steady)
RefineableSolidQElement(const RefineableSolidQElement< 2 > &dummy)
Broken copy constructor.
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...
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.
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
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...
Refineable version of Solid quad elements.
unsigned required_nsons() const
A refineable quad element has four sons.
Vector< std::string > colour
Tecplot colours.
long RefineableQElement< 2 > _build
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
virtual ~RefineableQElement()
Broken assignment operator.
void set_macro_elem_pt(MacroElement *macro_elem_pt, MacroElement *undeformed_macro_elem_pt)
Final over-ride: Use version in QSolidElementBase.