36 #include "constitutive.h" 39 #include "meshes/rectangular_quadmesh.h" 43 using namespace oomph;
63 BrokenCopy::broken_copy(
"WarpedLine");
69 BrokenCopy::broken_assign(
"WarpedLine");
77 void position(
const Vector<double>& zeta, Vector<double>& r)
const 80 r[0] = zeta[0]+5.0*Ampl*zeta[0]*(zeta[0]-1.0)*(zeta[0]-0.7);
81 r[1] = 1.0+Ampl*0.5*(1.0-cos(2.0*MathematicalConstants::Pi*zeta[0]));
87 void position(
const unsigned& t,
const Vector<double>& zeta,
88 Vector<double>& r)
const 94 double&
ampl() {
return Ampl;}
134 template<
class ELEMENT>
152 unsigned n_nod = solid_mesh_pt()->nboundary_node(b);
153 for(
unsigned i=0;i<n_nod;i++)
155 Node* nod_pt= solid_mesh_pt()->boundary_node_pt(b,i);
158 Vector<double> zeta(1);
159 nod_pt->get_coordinates_on_boundary(b,zeta);
174 {
return Solid_mesh_pt;}
179 PVDEquationsBase<2>::pin_redundant_nodal_solid_pressures(
180 solid_mesh_pt()->element_pt());
189 ElasticRefineableRectangularQuadMesh<ELEMENT>* Solid_mesh_pt;
200 template<
class ELEMENT>
219 solid_mesh_pt() =
new ElasticRefineableRectangularQuadMesh<ELEMENT>(
223 Problem::mesh_pt()=solid_mesh_pt();
226 solid_mesh_pt()->spatial_error_estimator_pt()=
new Z2ErrorEstimator;
230 unsigned n_element =solid_mesh_pt()->nelement();
231 for(
unsigned i=0;i<n_element;i++)
234 ELEMENT *el_pt =
dynamic_cast<ELEMENT*
>(solid_mesh_pt()->element_pt(i));
237 el_pt->constitutive_law_pt()=&Global_Physical_Variables::Constitutive_law;
241 solid_mesh_pt()->refine_uniformly();
246 for (
unsigned b=0;b<4;b++)
248 unsigned n_side = solid_mesh_pt()->nboundary_node(b);
251 for(
unsigned i=0;i<n_side;i++)
253 solid_mesh_pt()->boundary_node_pt(b,i)->pin_position(0);
254 solid_mesh_pt()->boundary_node_pt(b,i)->pin_position(1);
260 PVDEquationsBase<2>::pin_redundant_nodal_solid_pressures(
261 solid_mesh_pt()->element_pt());
264 cout <<
"Number of dofs: " << assign_eqn_numbers() << std::endl;
267 Doc_info.set_directory(
"RESLT");
276 template<
class ELEMENT>
288 sprintf(filename,
"%s/soln%i.dat",Doc_info.directory().c_str(),
290 some_file.open(filename);
291 solid_mesh_pt()->output(some_file,n_plot);
314 unsigned max_adapt=1;
318 for(
unsigned i=0;i<nstep;i++)
325 problem.newton_solve(max_adapt);
void operator=(const WarpedLine &)
Broken assignment operator.
WarpedLine Boundary_geom_object(0.0)
GeomObject specifying the shape of the boundary: Initially it's flat.
void actions_after_newton_solve()
Update function (empty)
void actions_before_newton_solve()
Update boundary position directly.
PrescribedBoundaryDisplacementProblem()
Constructor:
void actions_after_adapt()
Actions after adapt: Pin the redundant solid pressures (if any)
ElasticRefineableRectangularQuadMesh< ELEMENT > *& solid_mesh_pt()
Access function for the solid mesh.
void doc_solution()
Doc the solution.
double Nu
Poisson's ratio.
void position(const unsigned &t, const Vector< double > &zeta, Vector< double > &r) const
Parametrised position on object: r(zeta). Evaluated at previous timestep. t=0: current time; t>0: pre...
WarpedLine(const double &l)
Constructor: Specify amplitude of deflection from straight horizontal line.
double & ampl()
Access to amplitude.
~WarpedLine()
Empty Destructor.
WarpedLine(const WarpedLine &dummy)
Broken copy constructor.
void position(const Vector< double > &zeta, Vector< double > &r) const
Position vector at Lagrangian coordinate zeta.