39#include "meshes/fish_mesh.h"
77template<
class ELEMENT>
79 public virtual SolidMesh
124 el_pt->set_undeformed_macro_elem_pt(
179template<
class ELEMENT>
220 PVDEquationsBase<2>::pin_redundant_nodal_solid_pressures(
244template<
class ELEMENT>
273 unsigned nnod=mesh_pt()->finite_element_pt(0)->nnode();
276 Doc_node_pt=mesh_pt()->finite_element_pt(0)->node_pt(
nnod-1);
279 cout << std::endl <<
"Control node is located at: "
280 << Doc_node_pt->x(0) <<
" " << Doc_node_pt->x(1) << std::endl << std::endl;
288 if (CommandLineArgs::Argc>1)
290 mesh_pt()->max_permitted_error()=0.05;
291 mesh_pt()->min_permitted_error()=0.005;
293 mesh_pt()->doc_adaptivity_targets(
cout);
302 unsigned num_bound = mesh_pt()->nboundary();
308 mesh_pt()->boundary_node_pt(
ibound,
inod)->pin(0);
320 mesh_pt()->boundary_node_pt(
ibound,
inod)->set_value(0,0.0);
325 unsigned n_element = mesh_pt()->nelement();
345 for (
unsigned i=0;
i<2;
i++)
347 mesh_pt()->boundary_node_pt(
ibound,
inod)->pin_position(
i);
359 el_pt->constitutive_law_pt() =
365 PVDEquationsBase<2>::pin_redundant_nodal_solid_pressures(
382 mesh_pt()->set_lagrangian_nodal_coordinates();
390template<
class ELEMENT>
410 <<
static_cast<Circle*
>(mesh_pt()->fish_back_pt())->y_c()
411 <<
" " << Doc_node_pt->value(0) << std::endl;
419template<
class ELEMENT>
427 doc_info.set_directory(
"RESLT");
437 Trace_file <<
"VARIABLES=\"y<sub>circle</sub>\",\"u<sub>control</sub>\""
449 doc_solution(doc_info);
453 Fish_back_pt->y_c()+=0.03;
void demo_fish_poisson(const string &directory_name)
Demonstrate how to solve 2D Poisson problem in deformable fish-shaped domain with mesh adaptation.
Refineable fish mesh upgraded to become a solid mesh.
ElasticFishMesh(GeomObject *back_pt, GeomObject *undeformed_back_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Build underlying adaptive fish mesh and then set current Eulerian coordinates to be the ...
virtual ~ElasticFishMesh()
Destructor: Kill "undeformed" Domain.
Domain * Undeformed_domain_pt
Pointer to "undeformed" Domain – used to determine the Lagrangian coordinates of any newly created So...
GeneralCircle "upgraded" to a GeneralisedElement: Circular ring whose position is given by.
Namespace for const source term in Poisson equation.
void get_source(const Vector< double > &x, double &source)
Const source function.
double Strength
Strength of source function: default value 1.0.
double Nu
Poisson's ratio.
ConstitutiveLaw * Constitutive_law_pt
Pointer to constitutive law.