Detailed documentation to be written. Here's the already fairly well documented driver code...
#include <iostream>
#include <fstream>
#include <cmath>
#include "generic.h"
#include "solid.h"
#include "meshes/quarter_circle_sector_mesh.h"
using namespace std;
using namespace oomph;
{
{
{
}
}
}
template <class ELEMENT>
public virtual RefineableQuarterCircleSectorMesh<ELEMENT>,
public virtual SolidMesh
{
public:
{
#ifdef PARANOID
{
"Element needs to be derived from SolidFiniteElement\n",
}
#endif
}
{
traction_mesh_pt=new SolidMesh;
{
}
}
{
traction_mesh_pt->flush_element_and_node_storage();
{
}
}
};
template<class ELEMENT, class TIMESTEPPER>
{
public:
{
}
{
}
private:
};
template<class ELEMENT, class TIMESTEPPER>
{
unsigned nnod0=solid_mesh_pt()->nboundary_node(0);
unsigned nnod1=solid_mesh_pt()->nboundary_node(1);
{
Trace_node_pt[
j]=solid_mesh_pt()->boundary_node_pt(0,
j);
}
{
Trace_node_pt[
j+
nnod0]=solid_mesh_pt()->boundary_node_pt(1,
j);
}
solid_mesh_pt()->max_permitted_error()=0.006;
solid_mesh_pt()->min_permitted_error()=0.0006;
solid_mesh_pt()->doc_adaptivity_targets(
cout);
unsigned n_bottom = solid_mesh_pt()->nboundary_node(0);
{
solid_mesh_pt()->boundary_node_pt(0,
i)->pin_position(1);
}
unsigned n_side = solid_mesh_pt()->nboundary_node(2);
{
solid_mesh_pt()->boundary_node_pt(2,
i)->pin_position(0);
}
unsigned n_element =solid_mesh_pt()->nelement();
{
el_pt->constitutive_law_pt() =
}
{
(traction_mesh_pt()->element_pt(
i));
}
solid_mesh_pt()->set_lagrangian_nodal_coordinates();
}
template<class ELEMENT, class TIMESTEPPER>
{
unsigned n_element=traction_mesh_pt()->nelement();
{
(traction_mesh_pt()->element_pt(
i));
}
}
template<class ELEMENT, class TIMESTEPPER>
{
Doc_info.number());
unsigned nel=traction_mesh_pt()->nelement();
Doc_info.number());
{
{
traction_mesh_pt()->finite_element_pt(
e));
<< std::endl;
}
}
doc_displ_and_veloc();
{
unsigned nelem=solid_mesh_pt()->nboundary_element(0);
Doc_info.number());
{
{
(solid_mesh_pt()->boundary_element_pt(0,
e));
}
}
}
Trace_file <<
time_pt()->time() <<
" ";
{
Trace_file <<
sqrt(
pow(Trace_node_pt[
j]->
x(0),2)+
pow(Trace_node_pt[
j]->
x(1),2)) <<
" ";
}
Trace_file << std::endl;
cout <<
"Doced solution for step "
<< Doc_info.number()
<< std::endl << std::endl << std::endl;
}
template<class ELEMENT, class TIMESTEPPER>
{
{
Doc_info.directory().c_str(),Doc_info.number());
}
{
Doc_info.directory().c_str(),Doc_info.number());
}
else
{
Doc_info.directory().c_str(),Doc_info.number());
}
unsigned nel=solid_mesh_pt()->nelement();
{
{
{
<< std::endl;
}
}
}
}
template<class ELEMENT, class TIMESTEPPER>
{
}
template<class ELEMENT, class TIMESTEPPER>
{
}
template<class ELEMENT, class TIMESTEPPER>
{
{
}
Doc_info.number()=0;
unsigned nnod0=solid_mesh_pt()->nboundary_node(0);
unsigned nnod1=solid_mesh_pt()->nboundary_node(1);
Trace_file << "VARIABLES=\"time\"";
{
Trace_file <<
", \"radial node " <<
j <<
"\" ";
}
{
Trace_file <<
", \"azimuthal node " <<
j <<
"\" ";
}
Trace_file << std::endl;
doc_solution();
Doc_info.number()++;
doc_solution();
Doc_info.number()++;
{
doc_solution();
Doc_info.number()++;
}
}
{
{
<< ": Pure displacement formulation" << std::endl;
}
{
<< ": Pressure/displacement with Crouzeix-Raviart pressure" << std::endl;
}
{
<< ": Pressure/displacement with Taylor-Hood pressure" << std::endl;
}
}
"Shock" wave propagates through an impulsively loaded circular disk.
SolidMesh * Traction_mesh_pt
Pointer to mesh of traction elements.
void dump_it(ofstream &dump_file)
Dump problem-specific parameters values, then dump generic problem data.
void actions_after_newton_solve()
Update function (empty)
void actions_before_newton_solve()
Update function (empty)
ElasticRefineableQuarterCircleSectorMesh< ELEMENT > * Solid_mesh_pt
Pointer to solid mesh.
ElasticRefineableQuarterCircleSectorMesh< ELEMENT > *& solid_mesh_pt()
Access function for the solid mesh.
void doc_displ_and_veloc(const int &stage=0)
Doc displacement and velocity: label file with before and after.
void doc_solution()
Doc the solution.
Vector< Node * > Trace_node_pt
Vector of pointers to nodes whose position we're tracing.
ofstream Trace_file
Trace file.
SolidMesh *& traction_mesh_pt()
Access function for the mesh of surface traction elements.
void actions_after_adapt()
Actions after adaption: Kill and then re-build the traction elements on boundary 1 and re-assign the ...
DiskShockWaveProblem()
Constructor:
void restart(ifstream &restart_file)
Read problem-specific parameter values, then recover generic problem data.
void run(const unsigned &case_number)
Run the problem; specify case_number to label output directory.
Elastic quarter circle sector mesh with functionality to attach traction elements to the curved surfa...
ElasticRefineableQuarterCircleSectorMesh(GeomObject *wall_pt, const double &xi_lo, const double &fract_mid, const double &xi_hi, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Build mesh and copy Eulerian coords to Lagrangian ones so that the initial configuration...
void remake_traction_element_mesh(SolidMesh *&traction_mesh_pt)
Function to wipe and re-create mesh made of traction elements.
void make_traction_element_mesh(SolidMesh *&traction_mesh_pt)
Function to create mesh made of traction elements.
void constant_pressure(const Vector< double > &xi, const Vector< double > &x, const Vector< double > &n, Vector< double > &traction)
Constant pressure load.
double P
Uniform pressure.
ConstitutiveLaw * Constitutive_law_pt
Pointer to constitutive law.
double Nu
Poisson's ratio.
int main(int argc, char *argv[])
Driver for simple elastic problem.