26 #ifndef OOMPH_REFINEABLE_BRICK_ELEMENT_HEADER
27 #define OOMPH_REFINEABLE_BRICK_ELEMENT_HEADER
31 #include <oomph-lib-config.h>
78 LeakCheckNames::RefineableQElement<3>
_build += 1;
97 LeakCheckNames::RefineableQElement<3>
_build -= 1;
131 virtual void build(
Mesh*& mesh_pt,
133 bool& was_already_built,
134 std::ofstream& new_nodes_file);
138 void check_integrity(
double& max_error);
146 return dynamic_cast<OcTree*
>(Tree_pt);
152 return dynamic_cast<OcTree*
>(Tree_pt);
176 void setup_father_bounds();
185 void get_face_bcs(
const int& edge,
Vector<int>& bound_cons)
const;
194 void get_boundaries(
const int& edge, std::set<unsigned>& boundaries)
const;
211 void get_bcs(
int bound,
Vector<int>& bound_cons)
const;
215 void interpolated_zeta_on_face(
const unsigned& boundary,
222 void setup_hang_for_value(
const int& value_id);
226 virtual void oc_hang_helper(
const int& value_id,
228 std::ofstream& output_hangfile);
269 undeformed_macro_elem_pt);
282 void get_face_solid_bcs(
const int& edge,
289 void get_solid_bcs(
int bound,
Vector<int>& solid_bound_cons)
const;
296 bool& was_already_built,
297 std::ofstream& new_nodes_file)
299 using namespace OcTreeNames;
303 mesh_pt, new_node_pt, was_already_built, new_nodes_file);
306 if (was_already_built)
return;
311 int son_type = octree_pt()->son_type();
317 Tree_pt->father_pt()->object_pt());
328 "We can't handle generalised nodal positions (yet).\n",
329 OOMPH_CURRENT_FUNCTION,
330 OOMPH_EXCEPTION_LOCATION);
345 unsigned n_p = nnode_1d();
352 s_lo = octree_pt()->Direction_to_vector[son_type];
356 for (
int i = 0;
i < 3;
i++)
358 s_lo[
i] = (s_lo[
i] + 1) / 2 - 1;
362 for (
int i = 0;
i < 3;
i++)
364 s_hi[
i] = s_lo[
i] + 1;
372 for (
unsigned i = 0;
i < 3;
i++)
376 0.5 * (s_lo[
i] + 1.0) *
380 0.5 * (s_hi[
i] + 1.0) *
394 for (
unsigned i0 = 0; i0 < n_p; i0++)
397 s_fraction[0] = local_one_d_fraction_of_node(i0, 0);
399 s[0] = s_lo[0] + (s_hi[0] - s_lo[0]) * s_fraction[0];
401 for (
unsigned i1 = 0; i1 < n_p; i1++)
404 s_fraction[1] = local_one_d_fraction_of_node(i1, 1);
406 s[1] = s_lo[1] + (s_hi[1] - s_lo[1]) * s_fraction[1];
408 for (
unsigned i2 = 0; i2 < n_p; i2++)
411 s_fraction[2] = local_one_d_fraction_of_node(i2, 2);
413 s[2] = s_lo[2] + (s_hi[2] - s_lo[2]) * s_fraction[2];
416 jnod = i0 + n_p * i1 + n_p * n_p * i2;
428 for (
unsigned i = 0;
i < 3;
i++)
440 elastic_node_pt->
x(
i) = x_fe[
i];
443 if (Use_undeformed_macro_element_for_new_lagrangian_coords)
445 elastic_node_pt->
xi(
i) = xi[
i];
449 elastic_node_pt->
xi(
i) = xi_fe[
i];
458 unsigned ntstorage = time_stepper_pt->
ntstorage();
463 for (
unsigned t = 1;
t < ntstorage;
t++)
470 for (
unsigned i = 0;
i < 3;
i++)
472 elastic_node_pt->
x(
t,
i) =
Base class for all brick elements.
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.
OcTree class: Recursively defined, generalised octree.
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...
RefineableElements are FiniteElements that may be subdivided into children to provide a better local ...
Refineable version of QElement<3,NNODE_1D>.
static std::map< unsigned, DenseMatrix< int > > Father_bound
Coincidence between son nodal points and father boundaries: Father_bound[nnode_1d](nnode_son,...
unsigned required_nsons() const
A refineable brick element has eight sons.
OcTree * octree_pt() const
Pointer to octree representation of this element.
virtual void further_setup_hanging_nodes()=0
Perform additional hanging node procedures for variables that are not interpolated by all nodes (e....
virtual Node * node_created_by_son_of_neighbour(const Vector< double > &s_fraction, bool &is_periodic)
If a neighbouring element has already created a node at a position corresponding to the local fractio...
OcTree * octree_pt()
Pointer to octree representation of this element.
A class that is used to template the refineable Q elements by dimension. It's really nothing more tha...
/////////////////////////////////////////////////////////////////// /////////////////////////////////...
Refineable version of Solid brick 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...
void set_macro_elem_pt(MacroElement *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...
RefineableSolidQElement(const RefineableSolidQElement< 3 > &dummy)=delete
Broken copy constructor.
void set_macro_elem_pt(MacroElement *macro_elem_pt, MacroElement *undeformed_macro_elem_pt)
Final over-ride: Use version in QSolidElementBase.
virtual ~RefineableSolidQElement()
Broken assignment operator.
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.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...