30 #ifndef OOMPH_REFINEABLE_BRICK_ELEMENT_HEADER 31 #define OOMPH_REFINEABLE_BRICK_ELEMENT_HEADER 35 #include <oomph-lib-config.h> 85 LeakCheckNames::RefineableQElement<3>
_build+=1;
109 LeakCheckNames::RefineableQElement<3>
_build-=1;
139 bool& was_already_built,
140 std::ofstream &new_nodes_file);
144 void check_integrity(
double& max_error);
163 virtual void further_setup_hanging_nodes()=0;
177 void setup_father_bounds();
186 void get_face_bcs(
const int& edge,
Vector<int>& bound_cons)
const;
195 void get_boundaries(
const int& edge, std::set<unsigned>& boundaries)
const;
212 void get_bcs(
int bound,
Vector<int>& bound_cons)
const;
216 void interpolated_zeta_on_face(
const unsigned &boundary,
223 void setup_hang_for_value(
const int &value_id);
227 virtual void oc_hang_helper(
const int &value_id,
228 const int &my_edge, std::ofstream &output_hangfile);
276 undeformed_macro_elem_pt);
288 void get_face_solid_bcs(
const int& edge,
Vector<int>& solid_bound_cons)
const;
294 void get_solid_bcs(
int bound,
Vector<int>& solid_bound_cons)
const;
300 bool& was_already_built,
301 std::ofstream &new_nodes_file)
303 using namespace OcTreeNames;
310 if (was_already_built)
return;
315 int son_type = octree_pt()->son_type();
321 (Tree_pt->father_pt()->object_pt());
328 if (static_cast<SolidNode*>(father_el_pt->
node_pt(0))
329 ->nlagrangian_type()!=1)
332 "We can't handle generalised nodal positions (yet).\n",
333 OOMPH_CURRENT_FUNCTION,
334 OOMPH_EXCEPTION_LOCATION);
349 unsigned n_p = nnode_1d();
356 s_lo=octree_pt()->Direction_to_vector[son_type];
362 s_lo[
i]=(s_lo[
i]+1)/2-1;
376 for(
unsigned i=0;
i<3;
i++)
396 for(
unsigned i0=0;i0<n_p;i0++)
399 s_fraction[0] = local_one_d_fraction_of_node(i0,0);
401 s[0] = s_lo[0] + (s_hi[0]-s_lo[0])*s_fraction[0];
403 for(
unsigned i1=0;i1<n_p;i1++)
406 s_fraction[1] = local_one_d_fraction_of_node(i1,1);
408 s[1] = s_lo[1] + (s_hi[1]-s_lo[1])*s_fraction[1];
410 for(
unsigned i2=0;i2<n_p;i2++)
413 s_fraction[2] = local_one_d_fraction_of_node(i2,2);
415 s[2] = s_lo[2] + (s_hi[2]-s_lo[2])*s_fraction[2];
418 jnod= i0 + n_p*i1 +n_p*n_p*i2;
431 for (
unsigned i=0;
i<3;
i++)
443 elastic_node_pt->
x(
i) = x_fe[
i];
446 if (Use_undeformed_macro_element_for_new_lagrangian_coords)
448 elastic_node_pt->
xi(
i) = xi[
i];
452 elastic_node_pt->
xi(
i) = xi_fe[
i];
461 unsigned ntstorage=time_stepper_pt->
ntstorage();
466 for (
unsigned t=1;
t<ntstorage;
t++)
473 for(
unsigned i=0;
i<3;
i++)
void get_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Use the generic finite difference routine defined in RefineableSolidElement to calculate the Jacobian...
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
void set_macro_elem_pt(MacroElement *macro_elem_pt, MacroElement *undeformed_macro_elem_pt)
Final over-ride: Use version in QSolidElementBase.
virtual void get_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the elemental Jacobian matrix "d equation / d variable".
Base class for all brick elements.
OcTree * octree_pt() const
Pointer to octree representation of this element.
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...
Base class for Solid Qelements.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
RefineableSolidQElement(const RefineableSolidQElement< 3 > &dummy)
Broken copy constructor.
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.
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...
Refineable version of Solid brick elements.
RefineableSolidQElement()
Constructor, just call the constructor of the RefineableQElement<2>
double & x(const unsigned &i)
Return the i-th nodal coordinate.
double & xi(const unsigned &i)
Reference to i-th Lagrangian position.
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
static std::map< unsigned, DenseMatrix< int > > Father_bound
Coincidence between son nodal points and father boundaries: Father_bound[nnode_1d](nnode_son,son_type)={RU/RF/RD/RB/.../ OMEGA} so that node nnode_son in element of type son_type lies on boundary/vertex Father_bound[nnode_1d](nnode_son,son_type) in its father element. If the node doesn't lie on a boundary the value is OMEGA.
OcTree * octree_pt()
Pointer to octree representation of this element.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
unsigned ntstorage() const
Return the number of doubles required to represent history (one for steady)
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...
Vector< std::string > colour
Tecplot colours.
long RefineableQElement< 2 > _build
unsigned required_nsons() const
A refineable brick element has eight sons.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
void set_macro_elem_pt(MacroElement *macro_elem_pt)
Final over-ride: Use version in QSolidElementBase.
virtual ~RefineableSolidQElement()
Broken assignment operator.
virtual Node * node_created_by_son_of_neighbour(const Vector< double > &s_fraction)
If a neighbouring element has already created a node at a position corresponding to the local fractio...