30 #ifndef OOMPH_AXISYM_POROELASTICITY_ELEMENTS_HEADER 31 #define OOMPH_AXISYM_POROELASTICITY_ELEMENTS_HEADER 35 #include <oomph-lib-config.h> 38 #include "../generic/elements.h" 39 #include "../generic/shape.h" 40 #include "../generic/error_estimator.h" 41 #include "../generic/projection.h" 95 const double&
nu()
const 100 std::ostringstream error_message;
101 error_message <<
"No pointer to Poisson's ratio set. Please set one!\n";
104 OOMPH_CURRENT_FUNCTION,
105 OOMPH_EXCEPTION_LOCATION);
182 for(
unsigned i=0;
i<n;
i++)
189 (*Solid_body_force_fct_pt)(time,x,b);
204 for(
unsigned i=0;
i<n;
i++)
211 (*Fluid_body_force_fct_pt)(time,x,b);
228 (*Mass_source_fct_pt)(time,x,b);
252 virtual unsigned q_edge_index(
const unsigned &j)
const = 0;
262 virtual double q_edge(
const unsigned &j)
const = 0;
266 virtual double q_edge(
const unsigned &
t,
const unsigned &j)
const = 0;
277 const unsigned &edge,
282 virtual double q_internal(
const unsigned &j)
const = 0;
286 virtual double q_internal(
const unsigned &t,
const unsigned &j)
const = 0;
289 virtual void set_q_edge(
const unsigned &j,
const double& value)=0;
292 virtual void set_q_internal(
const unsigned &j,
const double& value)=0;
296 virtual void set_q_edge(
const unsigned &t,
const unsigned &j,
297 const double& value)=0;
302 const double& value)=0;
318 Shape &q_basis)
const = 0;
322 Shape &div_q_basis_ds)
const = 0;
326 Shape &q_basis)
const 328 const unsigned n_node = this->
nnode();
330 const unsigned n_q_basis = this->
nq_basis();
331 Shape q_basis_local(n_q_basis,2);
355 const double& value) = 0;
361 virtual int p_local_eqn(
const unsigned &j)
const = 0;
364 virtual double p_value(
const unsigned &j)
const = 0;
367 virtual unsigned np_basis()
const = 0;
371 Shape &p_basis)
const = 0;
374 virtual void pin_p_value(
const unsigned &j,
const double &p) = 0;
377 virtual void set_p_value(
const unsigned &j,
const double& value)=0;
388 const Shape &q_basis_local,
391 Shape &q_basis)
const;
396 const Shape &q_basis_local,
398 Shape &q_basis)
const 400 const unsigned n_node = this->
nnode();
427 unsigned n_node =
nnode();
440 for(
unsigned i=0;
i<2;
i++)
443 div_dudt_components[
i] = 0.0;
447 for(
unsigned l=0;l<n_node;l++)
449 div_dudt_components[
i] +=
du_dt(l,
i)*dpsidx(l,
i);
455 for(
unsigned l=0;l<n_node;l++)
457 dur_dt+=
du_dt(l,0)*psi(l);
461 div_dudt_components[0]+=dur_dt/r;
464 return div_dudt_components[0]+div_dudt_components[1];
475 unsigned n_node =
nnode();
488 for(
unsigned i=0;
i<2;
i++)
494 div_u_components[
i] = 0.0;
498 for(
unsigned l=0;l<n_node;l++)
500 div_u_components[
i] +=
nodal_value(l,u_nodal_index)*dpsidx(l,
i);
506 for(
unsigned l=0;l<n_node;l++)
512 div_u_components[0]+=ur/r;
515 return div_u_components[0]+div_u_components[1];
525 unsigned n_node =
nnode();
533 for(
unsigned i=0;
i<2;
i++)
542 for(
unsigned l=0;l<n_node;l++)
551 const unsigned &
i)
const 554 unsigned n_node =
nnode();
569 for(
unsigned l=0;l<n_node;l++)
571 interpolated_u +=
nodal_value(l,u_nodal_index)*psi[l];
574 return(interpolated_u);
582 const unsigned &
i)
const 585 unsigned n_node =
nnode();
600 for(
unsigned l=0;l<n_node;l++)
602 interpolated_u +=
nodal_value(t,l,u_nodal_index)*psi[l];
605 return(interpolated_u);
614 unsigned n_node =
nnode();
622 for(
unsigned i=0;
i<2;
i++)
628 for(
unsigned l=0;l<n_node;l++)
630 du_dt[
i] += this->
du_dt(l,
i)*psi[l];
641 Shape q_basis(n_q_basis,2);
643 for(
unsigned i=0;
i<2;
i++)
646 for(
unsigned l=0;l<n_q_basis_edge;l++)
650 for(
unsigned l=n_q_basis_edge;l<n_q_basis;l++)
665 Shape q_basis(n_q_basis,2);
667 for(
unsigned i=0;
i<2;
i++)
670 for(
unsigned l=0;l<n_q_basis_edge;l++)
674 for(
unsigned l=n_q_basis_edge;l<n_q_basis;l++)
683 const unsigned i)
const 688 Shape q_basis(n_q_basis,2);
692 for(
unsigned l=0;l<n_q_basis_edge;l++)
694 q_i +=
q_edge(l)*q_basis(l,i);
696 for(
unsigned l=n_q_basis_edge;l<n_q_basis;l++)
698 q_i +=
q_internal(l-n_q_basis_edge)*q_basis(l,i);
708 const unsigned i)
const 713 Shape q_basis(n_q_basis,2);
717 for(
unsigned l=0;l<n_q_basis_edge;l++)
719 q_i +=
q_edge(t,l)*q_basis(l,i);
721 for(
unsigned l=n_q_basis_edge;l<n_q_basis;l++)
723 q_i +=
q_internal(t,l-n_q_basis_edge)*q_basis(l,i);
737 unsigned n_node=
nnode();
738 const unsigned n_q_basis =
nq_basis();
742 Shape div_q_basis_ds(n_q_basis);
762 for(
unsigned l=0;l<n_q_basis_edge;l++)
764 div_q+=1.0/det*div_q_basis_ds(l)*
q_edge(l);
768 for(
unsigned l=n_q_basis_edge;l<n_q_basis;l++)
770 div_q+=1.0/det*div_q_basis_ds(l)*
q_internal(l-n_q_basis_edge);
804 Shape p_basis(n_p_basis);
813 for(
unsigned l=0;l<n_p_basis;l++)
834 const unsigned &
i)
const 849 const unsigned n_time=time_stepper_pt->
ntstorage();
852 for(
unsigned t=0;t<n_time;t++)
864 const unsigned &
i)
const 879 const unsigned n_time=time_stepper_pt->
ntstorage();
882 for(
unsigned t=0;t<n_time;t++)
907 const unsigned n_time=time_stepper_pt->
ntstorage();
910 for(
unsigned t=0;t<n_time;t++)
938 const unsigned n_time=time_stepper_pt->
ntstorage();
941 for(
unsigned t=0;t<n_time;t++)
974 for (
unsigned j=0;j<np;j++)
982 for (
unsigned j=0;j<nq;j++)
989 for (
unsigned j=0;j<nq;j++)
1013 const unsigned& nplot)
const 1020 for (
unsigned iplot=0;iplot<num_plot_points;iplot++)
1051 file_out << du_dt[0] << std::endl;
1055 file_out << du_dt[1] << std::endl;
1060 std::stringstream error_stream;
1062 <<
"Axisymmetric poroelasticity elements only store 6 fields " 1066 OOMPH_CURRENT_FUNCTION,
1067 OOMPH_EXCEPTION_LOCATION);
1080 return "radial displacement";
1084 return "axial displacement";
1088 return "radial flux";
1092 return "axial flux";
1096 return "divergence of flux";
1100 return "pore pressure";
1104 return "radial skeleton velocity";
1108 return "axial skeleton velocity";
1113 std::stringstream error_stream;
1115 <<
"AxisymmetricPoroelasticityEquations only store 8 fields " 1119 OOMPH_CURRENT_FUNCTION,
1120 OOMPH_EXCEPTION_LOCATION);
1132 for(
unsigned i=0;
i<2;
i++)
1138 for(
unsigned i=0;
i<2;
i++)
1144 for(
unsigned i=0;
i<2;
i++)
1158 data.push_back(du_dt[0]);
1159 data.push_back(du_dt[1]);
1164 data.push_back(div_dudt_components[0]);
1165 data.push_back(div_dudt_components[1]);
1170 data.push_back(div_u_components[0]);
1171 data.push_back(div_u_components[1]);
1185 void output(std::ostream &outfile,
const unsigned &nplot);
1195 const unsigned &nplot,
1201 const unsigned &nplot,
1251 Shape &div_q_basis_ds,
1252 Shape &div_q_test_ds)
const = 0;
1267 Shape &div_q_basis_ds,
1268 Shape &div_q_test_ds)
const = 0;
1355 template<
class AXISYMMETRIC_POROELASTICITY_ELEMENT>
1376 std::stringstream error_stream;
1378 <<
"AxisymmetricPoroelasticity elements only store 4 fields so fld = " 1379 << fld <<
" is illegal \n";
1382 OOMPH_CURRENT_FUNCTION,
1383 OOMPH_EXCEPTION_LOCATION);
1396 unsigned nvalue=dat_pt->
nvalue();
1397 for (
unsigned i=0;
i<nvalue;
i++)
1399 data_values.push_back(std::make_pair(dat_pt,
i));
1407 unsigned n=edge_dat_pt.size();
1408 for (
unsigned j=0;j<n;j++)
1411 for (
unsigned i=0;
i<nvalue;
i++)
1413 data_values.push_back(std::make_pair(edge_dat_pt[j],
1420 unsigned nvalue=int_dat_pt->
nvalue();
1421 for (
unsigned i=0;
i<nvalue;
i++)
1423 data_values.push_back(std::make_pair(int_dat_pt,
i));
1431 unsigned nnod=this->
nnode();
1432 for (
unsigned j=0;j<nnod;j++)
1436 data_values.push_back(std::make_pair(
1460 std::stringstream error_stream;
1462 <<
"AxisymmetricPoroelasticity elements only store 4 fields so fld = " 1463 << fld <<
" is illegal\n";
1466 OOMPH_CURRENT_FUNCTION,
1467 OOMPH_EXCEPTION_LOCATION);
1475 if (fld==2) return_value=1;
1482 return return_value;
1501 std::stringstream error_stream;
1503 <<
"AxisymmetricPoroelasticity elements only store 4 fields so fld = " 1504 << fld <<
" is illegal.\n";
1507 OOMPH_CURRENT_FUNCTION,
1508 OOMPH_EXCEPTION_LOCATION);
1515 const unsigned n_dim=this->
dim();
1516 const unsigned n_node = this->
nnode();
1517 const unsigned n_q_basis = this->
nq_basis();
1518 const unsigned n_p_basis = this->
np_basis();
1521 Shape psi_geom(n_node), q_basis(n_q_basis,n_dim), q_test(n_q_basis,n_dim),
1522 p_basis(n_p_basis), p_test(n_p_basis),
1523 div_q_basis_ds(n_q_basis), div_q_test_ds(n_q_basis);
1524 DShape dpsidx_geom(n_node,n_dim);
1525 Shape u_basis(n_node);
1526 Shape u_test(n_node);
1527 DShape du_basis_dx(n_node,n_dim);
1528 DShape du_test_dx(n_node,n_dim);
1545 unsigned n=p_basis.nindex1();
1546 for (
unsigned i=0;
i<n;
i++)
1555 unsigned m=q_basis.nindex2();
1556 for (
unsigned i=0;
i<n;
i++)
1558 for (
unsigned j=0;j<m;j++)
1560 psi(
i,j)=q_basis(
i,j);
1567 for (
unsigned j=0;j<n_node;j++)
1581 const unsigned &fld,
1587 std::stringstream error_stream;
1589 <<
"AxisymmetricPoroelasticity elements only store 4 fields so fld = " 1590 << fld <<
" is illegal\n";
1593 OOMPH_CURRENT_FUNCTION,
1594 OOMPH_EXCEPTION_LOCATION);
1598 double return_value=0.0;
1608 "Pressure in AxisymmetricPoroelasticity has no time-dep.!",
1609 OOMPH_CURRENT_FUNCTION,
1610 OOMPH_EXCEPTION_LOCATION);
1619 "Don't call this function for AxisymmetricPoroelasticity!",
1620 OOMPH_CURRENT_FUNCTION,
1621 OOMPH_EXCEPTION_LOCATION);
1628 return return_value;
1638 std::stringstream error_stream;
1640 <<
"AxisymmetricPoroelasticity elements only store 4 fields so fld = " 1641 << fld <<
" is illegal\n";
1644 OOMPH_CURRENT_FUNCTION,
1645 OOMPH_EXCEPTION_LOCATION);
1649 unsigned return_value=0;
1663 return_value=this->
nnode();
1666 return return_value;
1677 std::stringstream error_stream;
1679 <<
"AxisymmetricPoroelasticity elements only store 4 fields so fld = " 1680 << fld <<
" is illegal\n";
1683 OOMPH_CURRENT_FUNCTION,
1684 OOMPH_EXCEPTION_LOCATION);
1715 return return_value;
1720 void output(std::ostream &outfile,
const unsigned &nplot)
1731 const unsigned& flag)
1737 unsigned n_dim=this->
dim();
1743 unsigned fld=this->Projected_field;
1746 const unsigned n_node = this->
nnode();
1752 const unsigned n_value=nvalue_of_field(fld);
1758 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
1768 other_el_pt=this->external_element_pt(0,ipt);
1770 other_s=this->external_element_local_coord(0,ipt);
1776 int local_eqn=0, local_unknown=0;
1779 switch(Projection_type)
1787 "Trying to project Lagrangian coordinates in non-SolidElement\n",
1788 OOMPH_CURRENT_FUNCTION,
1789 OOMPH_EXCEPTION_LOCATION);
1793 Shape psi(n_node,n_position_type);
1808 double interpolated_xi_bar=
1810 ->interpolated_xi(other_s,Projected_lagrangian);
1813 for(
unsigned l=0;l<n_node;++l)
1816 for(
unsigned k=0;k<n_position_type;++k)
1825 residuals[local_eqn] +=
1826 (interpolated_xi_proj - interpolated_xi_bar)*psi(l,k)*
W;
1831 for(
unsigned l2=0;l2<n_node;l2++)
1834 for(
unsigned k2=0;k2<n_position_type;k2++)
1838 if(local_unknown >= 0)
1840 jacobian(local_eqn,local_unknown)
1841 += psi(l2,k2)*psi(l,k)*
W;
1857 Shape psi(n_node,n_position_type);
1868 double interpolated_x_proj = 0.0;
1872 interpolated_x_proj = this->
interpolated_x(s,Projected_coordinate);
1877 interpolated_x_proj = this->get_field(0,fld,s);
1881 double interpolated_x_bar=
1883 other_s,Projected_coordinate);
1886 for(
unsigned l=0;l<n_node;++l)
1889 for(
unsigned k=0;k<n_position_type;++k)
1905 if(n_position_type!=1)
1908 "Trying to project generalised positions not in SolidElement\n",
1909 OOMPH_CURRENT_FUNCTION,
1910 OOMPH_EXCEPTION_LOCATION);
1912 local_eqn = local_equation(fld,l);
1919 residuals[local_eqn] +=
1920 (interpolated_x_proj - interpolated_x_bar)*psi(l,k)*
W;
1925 for(
unsigned l2=0;l2<n_node;l2++)
1928 for(
unsigned k2=0;k2<n_position_type;k2++)
1933 local_unknown = solid_el_pt
1938 local_unknown = local_equation(fld,l2);
1941 if(local_unknown >= 0)
1943 jacobian(local_eqn,local_unknown)
1944 += psi(l2,k2)*psi(l,k)*
W;
1966 double J=jacobian_and_shape_of_field(fld,s,psi);
1974 double interpolated_value_proj = this->get_field(now,fld,s);
1977 double interpolated_value_bar =
1978 cast_el_pt->
get_field(Time_level_for_projection,fld,other_s);
1981 for(
unsigned l=0;l<n_value;l++)
1983 local_eqn = local_equation(fld,l);
1987 residuals[local_eqn] +=
1988 (interpolated_value_proj - interpolated_value_bar)*psi[l]*W;
1993 for(
unsigned l2=0;l2<n_value;l2++)
1995 local_unknown = local_equation(fld,l2);
1996 if(local_unknown >= 0)
1998 jacobian(local_eqn,local_unknown)
1999 += psi[l2]*psi[l]*
W;
2011 Shape psi(n_value,n_dim);
2014 double J=jacobian_and_shape_of_field(fld,s,psi);
2027 cast_el_pt->interpolated_q(Time_level_for_projection,other_s,q_bar);
2030 for(
unsigned l=0;l<n_value;l++)
2032 local_eqn = local_equation(fld,l);
2036 for (
unsigned i=0;
i<n_dim;
i++)
2039 residuals[local_eqn] +=
2040 (q_proj[
i] - q_bar[
i])*psi(l,
i)*
W;
2045 for(
unsigned l2=0;l2<n_value;l2++)
2047 local_unknown = local_equation(fld,l2);
2048 if(local_unknown >= 0)
2050 jacobian(local_eqn,local_unknown)
2051 += psi(l2,
i)*psi(l,
i)*
W;
2062 "Wrong field specified. This should never happen\n",
2063 OOMPH_CURRENT_FUNCTION,
2064 OOMPH_EXCEPTION_LOCATION);
2072 "Wrong type specificied in Projection_type. This should never happen\n",
2073 OOMPH_CURRENT_FUNCTION,
2074 OOMPH_EXCEPTION_LOCATION);
2089 template<
class ELEMENT>
virtual void pin_q_internal_value(const unsigned &j, const double &value)=0
Pin the jth internal q value and set it to specified value.
virtual unsigned q_internal_index() const =0
Return the index of the internal data where the q internal degrees of freedom are stored...
virtual void pin_q_edge_value(const unsigned &j, const double &value)=0
Pin the j-th edge (flux) degree of freedom and set it to specified value.
void switch_off_darcy()
Switch off Darcy flow.
virtual unsigned q_edge_index(const unsigned &j) const =0
Return the nodal index at which the jth edge unknown is stored.
double interpolated_div_u(const Vector< double > &s, Vector< double > &div_u_components) const
unsigned num_Z2_flux_terms()
Number off flux terms for Z2 error estimator (use Darcy flux)
static double Default_porosity_value
Static default value for the porosity.
double * Permeability_pt
permeability
Base class for finite elements that can compute the quantities that are required for the Z2 error est...
virtual Vector< double > edge_flux_interpolation_point(const unsigned &edge, const unsigned &j) const =0
Returns the local coordinate of the jth flux_interpolation point along the specified edge...
double interpolated_div_du_dt(const Vector< double > &s, Vector< double > &div_dudt_components) const
virtual unsigned nq_basis_edge() const =0
Return the number of edge basis functions for q.
double interpolated_q(const unsigned &t, const Vector< double > &s, const unsigned i) const
unsigned self_test()
Self test.
virtual void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
Get cector of local coordinates of plot point i (when plotting nplot points in each "coordinate direc...
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
Compute the error between the FE solution and the exact solution using the H(div) norm for q and L^2 ...
void get_q_basis(const Vector< double > &s, Shape &q_basis) const
Compute the transformed basis at local coordinate s.
const double & youngs_modulus() const
Access function to non-dim Young's modulus (ratio of actual Young's modulus to reference stress used ...
virtual unsigned nplot_points_paraview(const unsigned &nplot) const
Return the number of actual plot points for paraview plot with parameter nplot. Broken virtual; can b...
void output_fct(std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output FE representation of exact soln: x,y,u1,u2,div_q,p at Nplot^2 plot points. ...
double * Nu_pt
Pointer to Poisson's ratio.
SourceFctPt & solid_body_force_fct_pt()
Access function: Pointer to solid body force function.
SourceFctPt fluid_body_force_fct_pt() const
Access function: Pointer to fluid force function (const version)
virtual unsigned nq_basis_internal() const =0
Return the number of internal basis functions for q.
virtual unsigned np_basis() const =0
Return the total number of pressure basis functions.
Template-free Base class for projectable elements.
unsigned nscalar_paraview() const
Number of scalars/fields output by this element. Reimplements broken virtual function in base class...
unsigned nfields_for_projection()
Number of fields to be projected: 4 (two displacement components, pressure, Darcy flux) ...
A general Finite Element class.
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Function pointer for function that computes Vector-valued time-dependent function as ...
virtual double p_value(const unsigned &j) const =0
Return the jth pressure value.
bool darcy_is_switched_off()
Is Darcy flow switched off?
TimeStepper *& position_time_stepper_pt()
Return a pointer to the position timestepper.
double *& alpha_pt()
Access function for pointer to alpha, the Biot parameter.
double interpolated_u(const unsigned &t, const Vector< double > &s, const unsigned &i) const
Calculate the FE representation of the i-th component of u at time level t (t=0: current) ...
void interpolated_du_dt(const Vector< double > &s, Vector< double > &du_dt) const
Calculate the FE representation of du_dt.
SourceFctPt solid_body_force_fct_pt() const
Access function: Pointer to solid body force function (const version)
Axisymmetric poro elasticity upgraded to become projectable.
double interpolated_p(const Vector< double > &s) const
Calculate the FE representation of p and return it.
const double & alpha() const
Access function for alpha, the Biot parameter.
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
double *& density_ratio_pt()
Access function for pointer to the density ratio (fluid to solid)
virtual int p_local_eqn(const unsigned &j) const =0
Return the equation number of the j-th pressure degree of freedom.
virtual void edge_flux_interpolation_point_global(const unsigned &edge, const unsigned &j, Vector< double > &x) const =0
Compute the global coordinates of the jth flux_interpolation point along an edge. ...
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
const double & permeability_ratio() const
Access function for the ratio of the material's actual permeability to the permeability used in the n...
virtual Vector< Data * > q_edge_data_pt() const =0
Return vector of pointers to the Data objects that store the edge flux values.
virtual unsigned q_edge_node_number(const unsigned &j) const =0
Return the number of the node where the jth edge unknown is stored.
virtual void set_q_internal(const unsigned &j, const double &value)=0
Set the values of the j-th internal degree of freedom.
SourceFctPt Fluid_body_force_fct_pt
Pointer to fluid source function.
void set_q_internal_timestepper(TimeStepper *const time_stepper_pt)
Set the timestepper of the q internal data object.
unsigned nnodal_position_type() const
Return the number of coordinate types that the element requires to interpolate the geometry between t...
virtual void pin_p_value(const unsigned &j, const double &p)=0
Pin the jth pressure value and set it to p.
double interpolated_q(const Vector< double > &s, const unsigned i) const
Calculate the FE representation of the i-th component of q.
double dq_edge_dt(const unsigned &n) const
dq_edge/dt for the n-th edge degree of freedom
virtual double local_to_eulerian_mapping(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Calculate the mapping from local to Eulerian coordinates, given the derivatives of the shape function...
MassSourceFctPt mass_source_fct_pt() const
Access function: Pointer to mass source function (const version)
TimeStepper *& time_stepper_pt()
Access function for pointer to time stepper: Null if object is not time-dependent.
static double Default_lambda_sq_value
Static default value for timescale ratio.
ProjectableAxisymmetricPoroelasticityElement()
Constructor [this was only required explicitly from gcc 4.5.2 onwards...].
const double & nu() const
Access function for Poisson's ratio.
virtual unsigned face_index_of_q_edge_basis_fct(const unsigned &j) const =0
Return the face index associated with j-th edge flux degree of freedom.
double d2u_dt2(const unsigned &n, const unsigned &i) const
d^2u/dt^2 at local node n
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Function pointer for function that computes vector-valued steady "exact solution" as ...
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
virtual void scale_basis(Shape &basis) const =0
Scale the edge basis to allow arbitrary edge mappings.
double * Lambda_sq_pt
Timescale ratio (non-dim. density)
virtual unsigned face_index_of_edge(const unsigned &j) const =0
Return the face index associated with specified edge.
virtual double q_edge(const unsigned &j) const =0
Return the values of the j-th edge (flux) degree of freedom.
double dshape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
Compute the geometric shape functions and also first derivatives w.r.t. global coordinates at local c...
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
virtual void fill_in_generic_residual_contribution(Vector< double > &residuals, DenseMatrix< double > &jacobian, bool flag)
Fill in residuals and, if flag==true, jacobian.
void fluid_body_force(const double &time, const Vector< double > &x, Vector< double > &b) const
Indirect access to the fluid body force function - returns 0 if no forcing function has been set...
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
virtual void get_p_basis(const Vector< double > &s, Shape &p_basis) const =0
Compute the pressure basis.
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
void set_time_stepper(TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
Set a new timestepper by resizing the appropriate storage. If already assigned the equation numbering...
double du_dt(const unsigned &n, const unsigned &i) const
du/dt at local node n
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Z2 flux (use Darcy flux)
unsigned nhistory_values_for_projection(const unsigned &fld)
Number of history values to be stored for fld-th field. (Note: count includes current value!) ...
virtual Data * q_internal_data_pt() const =0
Return pointer to the Data object that stores the internal flux values.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in contribution to residuals for the Darcy equations.
A class that represents a collection of data; each Data object may contain many different individual ...
virtual void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Function to compute the geometric shape functions and derivatives w.r.t. local coordinates at local c...
void interpolated_q(const Vector< double > &s, Vector< double > &q) const
Calculate the FE representation of q.
double dq_internal_dt(const unsigned &n) const
dq_internal/dt for the n-th internal degree of freedom
int local_equation(const unsigned &fld, const unsigned &j)
Return local equation number of value j in field fld.
SourceFctPt Solid_body_force_fct_pt
Pointer to solid body force function.
double jacobian_and_shape_of_field(const unsigned &fld, const Vector< double > &s, Shape &psi)
Return Jacobian of mapping and shape functions of field fld at local coordinate s.
double *& youngs_modulus_pt()
Pointer to non-dim Young's modulus (ratio of actual Young's modulus to reference stress used to non-d...
static double Default_youngs_modulus_value
virtual void set_p_value(const unsigned &j, const double &value)=0
Set the jth pressure value.
static double Default_density_ratio_value
Static default value for the density ratio.
double transform_basis(const Vector< double > &s, const Shape &q_basis_local, Shape &psi, DShape &dpsi, Shape &q_basis) const
Performs a div-conserving transformation of the vector basis functions from the reference element to ...
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
double interpolated_div_q(const Vector< double > &s) const
Calculate the FE representation of div q and return it.
int position_local_eqn(const unsigned &n, const unsigned &k, const unsigned &j) const
Access function that returns the local equation number that corresponds to the j-th coordinate of the...
void output(std::ostream &outfile)
Output with default number of plot points.
double nodal_value(const unsigned &n, const unsigned &i) const
Return the i-th value stored at local node n. Produces suitably interpolated values for hanging nodes...
void output(std::ostream &outfile, const unsigned &nplot)
Output FE representation of soln as in underlying element.
unsigned ntstorage() const
Return the number of doubles required to represent history (one for steady)
void residual_for_projection(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Residual for the projection step. Flag indicates if we want the Jacobian (1) or not (0)...
virtual int q_internal_local_eqn(const unsigned &j) const =0
Return the equation number of the j-th internal degree of freedom.
unsigned ntstorage() const
Return total number of doubles stored per value to record time history of each value (one for steady ...
const double & lambda_sq() const
Access function for timescale ratio (nondim density)
void interpolated_q(const unsigned &t, const Vector< double > &s, Vector< double > &q) const
Calculate the FE representation of q at time level t (t=0: current)
AxisymmetricPoroelasticityEquations()
Constructor.
std::string scalar_name_paraview(const unsigned &i) const
Name of the i-th scalar field. Default implementation returns V1 for the first one, V2 for the second etc. Can (should!) be overloaded with more meaningful names in specific elements.
virtual unsigned u_index_axisym_poroelasticity(const unsigned &j) const =0
Return the nodal index of the j-th solid displacement unknown.
double * Porosity_pt
Porosity.
void scalar_value_paraview(std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
Write values of the i-th scalar field at the plot points. Needs to be implemented for each new specif...
unsigned dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
virtual void get_div_q_basis_local(const Vector< double > &s, Shape &div_q_basis_ds) const =0
Compute the local form of the q basis and dbasis/ds at local coordinate s.
static double Default_alpha_value
Static default value for alpha, the biot parameter.
unsigned nvalue_of_field(const unsigned &fld)
Return number of values in field fld.
double interpolated_u(const Vector< double > &s, const unsigned &i) const
Calculate the FE representation of the i-th component of u.
Vector< std::pair< Data *, unsigned > > data_values_of_field(const unsigned &fld)
Specify the values associated with field fld. The information is returned in a vector of pairs which ...
MassSourceFctPt Mass_source_fct_pt
Pointer to the mass source function.
void(* SourceFctPt)(const double &time, const Vector< double > &x, Vector< double > &f)
Source function pointer typedef.
SourceFctPt & fluid_body_force_fct_pt()
Access function: Pointer to fluid force function.
virtual double shape_basis_test_local_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsi, Shape &u_basis, Shape &u_test, DShape &du_basis_dx, DShape &du_test_dx, Shape &q_basis, Shape &q_test, Shape &p_basis, Shape &p_test, Shape &div_q_basis_ds, Shape &div_q_test_ds) const =0
Compute the geometric basis, and the q, p and divergence basis functions and test functions at integr...
double * Youngs_modulus_pt
Pointer to the nondim Young's modulus.
virtual void face_local_coordinate_of_flux_interpolation_point(const unsigned &edge, const unsigned &n, Vector< double > &s) const =0
Compute the face element coordinates of the nth flux interpolation point along an edge...
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
double *& nu_pt()
Access function for pointer to Poisson's ratio.
void(* MassSourceFctPt)(const double &time, const Vector< double > &x, double &f)
Mass source function pointer typedef.
double get_field(const unsigned &t, const unsigned &fld, const Vector< double > &s)
Return interpolated field fld at local coordinate s, at time level t (t=0: present; t>0: history valu...
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
virtual unsigned nedge_flux_interpolation_point() const =0
Returns the number of flux_interpolation points along each edge of the element.
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
virtual Data * p_data_pt() const =0
Return pointer to the Data object that stores the pressure values.
unsigned nhistory_values_for_coordinate_projection()
Number of positional history values (Note: count includes current value!)
virtual double get_field(const unsigned &time, const unsigned &fld, const Vector< double > &s)=0
Return the fld-th field at local coordinates s at time-level time (time=0: current value; time>0: his...
const double & permeability() const
Access function for the nondim permeability.
double *& permeability_pt()
Access function for pointer to the nondim permeability.
static double Default_permeability_ratio_value
Static default value for the ratio of the material's actual permeability to the permeability used to ...
virtual void get_q_basis_local(const Vector< double > &s, Shape &q_basis) const =0
Comute the local form of the q basis at local coordinate s.
void interpolated_div_q(const Vector< double > &s, double &div_q) const
Calculate the FE representation of div u.
Class implementing the generic maths of the axisym poroelasticity equations: axisym linear elasticity...
unsigned nindex1() const
Return the range of index 1 of the shape function object.
void point_output_data(const Vector< double > &s, Vector< double > &data)
Output solution in data vector at local cordinates s: r,z,u_r,u_z,q_r,q_z,div_q,p,durdt,duzdt.
double *& lambda_sq_pt()
Access function for pointer to timescale ratio (nondim density)
void interpolated_u(const Vector< double > &s, Vector< double > &disp) const
Calculate the FE representation of u.
static double Default_permeability_value
Static default value for the permeability (1.0 for natural scaling; i.e. timescale is given by L^2/(k...
virtual unsigned required_nvalue(const unsigned &n) const =0
Number of values required at node n.
double *& porosity_pt()
Access function for pointer to the porosity.
bool is_steady() const
Flag to indicate if a timestepper has been made steady (possibly temporarily to switch off time-depen...
virtual int q_edge_local_eqn(const unsigned &j) const =0
Return the equation number of the j-th edge (flux) degree of freedom.
const double & density_ratio() const
Access function for the density ratio (fluid to solid)
bool Darcy_is_switched_off
Boolean to record that darcy has been switched off.
void output_with_projected_flux(std::ostream &outfile, const unsigned &nplot, const Vector< double > unit_normal)
Output incl. projection of fluxes into direction of the specified unit vector.
void mass_source(const double &time, const Vector< double > &x, double &b) const
Indirect access to the mass source function - returns 0 if no mass source function has been set...
virtual void set_q_edge(const unsigned &j, const double &value)=0
Set the values of the j-th edge (flux) degree of freedom.
unsigned nnode() const
Return the number of nodes.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
double * Density_ratio_pt
Density ratio.
virtual double weight(const unsigned &i, const unsigned &j) const
Access function for j-th weight for the i-th derivative.
void output(std::ostream &outfile)
Output with default number of plot points.
double *& permeability_ratio_pt()
virtual unsigned nq_basis() const
Return the total number of computational basis functions for q.
const double & porosity() const
Access function for the porosity.
MassSourceFctPt & mass_source_fct_pt()
Access function: Pointer to mass source function.
SolidFiniteElement class.
virtual double q_internal(const unsigned &j) const =0
Return the values of the j-th internal degree of freedom.
virtual double J_eulerian(const Vector< double > &s) const
Return the Jacobian of mapping from local to global coordinates at local position s...
double * Permeability_ratio_pt
Ratio of the material's actual permeability to the permeability used in the non-dimensionalisation of...
void solid_body_force(const double &time, const Vector< double > &x, Vector< double > &b) const
Indirect access to the solid body force function - returns 0 if no forcing function has been set...
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Fill in the Jacobian matrix for the Newton method.
double * Alpha_pt
Alpha – the biot parameter.
virtual void shape(const Vector< double > &s, Shape &psi) const =0
Calculate the geometric shape functions at local coordinate s. This function must be overloaded for e...
static DenseMatrix< double > Dummy_matrix
Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case w...
void interpolated_p(const Vector< double > &s, double &p) const
Calculate the FE representation of p.
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Return the local equation number corresponding to the i-th value at the n-th local node...
double transform_basis(const Vector< double > &s, const Shape &q_basis_local, Shape &psi, Shape &q_basis) const
Performs a div-conserving transformation of the vector basis functions from the reference element to ...
virtual double shape_basis_test_local(const Vector< double > &s, Shape &psi, DShape &dpsi, Shape &u_basis, Shape &u_test, DShape &du_basis_dx, DShape &du_test_dx, Shape &q_basis, Shape &q_test, Shape &p_basis, Shape &p_test, Shape &div_q_basis_ds, Shape &div_q_test_ds) const =0
Compute the geometric basis, and the q, p and divergence basis functions and test functions at local ...