26 #ifndef OOMPH_MY_ALGEBRAIC_COLLAPSIBLE_CHANNEL_MESH
27 #define OOMPH_MY_ALGEBRAIC_COLLAPSIBLE_CHANNEL_MESH
47 template<
class ELEMENT>
61 const unsigned& ncollapsible,
62 const unsigned& ndown,
65 const double& lcollapsible,
72 lup, lcollapsible, ldown,
ly,
90 const unsigned& ncollapsible,
91 const unsigned& ndown,
94 const double& lcollapsible,
102 lup, lcollapsible, ldown,
ly,
128 std::ostringstream error_message;
130 <<
"It does not make sense to set the bl_squash_fct_pt \n"
131 <<
"outside the constructor as it's only used to set up the \n"
132 <<
"algebraic remesh data when the algebraic mesh is first built. \n";
134 "MyAlgebraicCollapsibleChannelMesh::bl_squash_fct_pt()\n";
179 template<
class ELEMENT>
195 const unsigned& ncollapsible,
196 const unsigned& ndown,
199 const double& lcollapsible,
206 lup, lcollapsible, ldown,
ly,
210 lup, lcollapsible, ldown,
ly,
229 const unsigned& ncollapsible,
230 const unsigned& ndown,
233 const double& lcollapsible,
241 lup, lcollapsible, ldown,
ly,
245 lup, lcollapsible, ldown,
ly,
247 bl_squash_function_pt,
267 template<
class ELEMENT>
272 double l_up=this->domain_pt()->l_up();
273 double l_collapsible=this->domain_pt()->l_collapsible();
276 unsigned nnod=this->nnode();
277 for (
unsigned j=0;
j<nnod;
j++)
283 double x=nod_pt->
x(0);
284 double y=nod_pt->
x(1);
287 if ( (
x>=l_up) && (
x<=(l_up+l_collapsible)) )
296 this->Wall_pt->position(
zeta,r_wall);
303 std::ostringstream error_stream;
305 <<
"Wall must be in its undeformed position when\n"
306 <<
"algebraic node update information is set up!\n "
307 <<
"x-discrepancy: " <<
std::abs(r_wall[0]-
x) << std::endl
308 <<
"y-discrepancy: " <<
std::abs(r_wall[1]-
y) << std::endl;
321 geom_object_pt[0]=this->Wall_pt;
327 ref_value[0]=r_wall[0];
332 ref_value[1]=
y/r_wall[1];
335 ref_value[2]=
zeta[0];
354 template<
class ELEMENT>
366 double x_bottom=ref_value[0];
371 double fract=ref_value[1];
375 zeta[0]=ref_value[2];
385 node_pt->
x(
t,0)=x_bottom+fract*(r_wall[0]-x_bottom);
386 node_pt->
x(
t,1)= fract* r_wall[1];
AnnoyingScalar abs(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:135
Definition: algebraic_elements.h:599
AlgebraicNode * node_pt(const unsigned long &n)
Return a pointer to the n-th global AlgebraicNode.
Definition: algebraic_elements.h:620
Definition: algebraic_elements.h:55
Vector< GeomObject * > & vector_geom_object_pt(const int &id)
Definition: algebraic_elements.h:200
void add_node_update_info(const int &id, AlgebraicMesh *mesh_pt, const Vector< GeomObject * > &geom_object_pt, const Vector< double > &ref_value, const bool &called_from_constructor=false)
Definition: algebraic_elements.h:280
Vector< double > & vector_ref_value()
Definition: algebraic_elements.h:251
double(* BLSquashFctPt)(const double &s)
Definition: collapsible_channel_domain.h:152
BLSquashFctPt & bl_squash_fct_pt()
Definition: collapsible_channel_domain.h:165
Definition: collapsible_channel_mesh.template.h:65
GeomObject *& wall_pt()
Access function to GeomObject representing wall.
Definition: collapsible_channel_mesh.template.h:91
CollapsibleChannelDomain * Domain_pt
Pointer to domain.
Definition: collapsible_channel_mesh.template.h:147
Definition: geom_objects.h:101
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
static Steady< 0 > Default_TimeStepper
The Steady Timestepper.
Definition: mesh.h:75
virtual void node_update(const bool &update_all_solid_nodes=false)
Definition: mesh.cc:287
Collapsible channel mesh with algebraic node update.
Definition: my_alg_channel_mesh.h:51
MyAlgebraicCollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: my_alg_channel_mesh.h:60
void algebraic_node_update(const unsigned &t, AlgebraicNode *&node_pt)
Definition: my_alg_channel_mesh.h:355
MyAlgebraicCollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, CollapsibleChannelDomain::BLSquashFctPt bl_squash_function_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: my_alg_channel_mesh.h:88
virtual ~MyAlgebraicCollapsibleChannelMesh()
Destructor: empty.
Definition: my_alg_channel_mesh.h:118
CollapsibleChannelDomain::BLSquashFctPt & bl_squash_fct_pt()
Definition: my_alg_channel_mesh.h:126
void setup_algebraic_node_update()
Function to setup the algebraic node update.
Definition: my_alg_channel_mesh.h:268
CollapsibleChannelDomain::BLSquashFctPt Dummy_fct_pt
Dummy function pointer.
Definition: my_alg_channel_mesh.h:161
void update_node_update(AlgebraicNode *&node_pt)
Definition: my_alg_channel_mesh.h:152
Definition: my_alg_channel_mesh.h:183
MyRefineableAlgebraicCollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, CollapsibleChannelDomain::BLSquashFctPt bl_squash_function_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: my_alg_channel_mesh.h:227
MyRefineableAlgebraicCollapsibleChannelMesh(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: my_alg_channel_mesh.h:194
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
Definition: oomph_definitions.h:222
Definition: refineable_quad_mesh.h:53
void setup_quadtree_forest()
Definition: refineable_quad_mesh.h:88
const unsigned & ny() const
Access function for number of elements in y directions.
Definition: simple_rectangular_quadmesh.template.h:77
Definition: timesteppers.h:231
Scalar * y
Definition: level1_cplx_impl.h:128
EIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition: SpecialFunctionsArrayAPI.h:152
const double ly
Definition: ConstraintElementsUnitTest.cpp:34
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
list x
Definition: plotDoE.py:28
t
Definition: plotPSD.py:36
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2