26 #ifndef OOMPH_POROELASTICITY_ELEMENTS_HEADER
27 #define OOMPH_POROELASTICITY_ELEMENTS_HEADER
31 #include <oomph-lib-config.h>
34 #include "../generic/elements.h"
35 #include "../generic/shape.h"
44 template<
unsigned DIM>
179 for (
unsigned i = 0;
i <
n;
i++)
186 (*Force_solid_fct_pt)(time,
x,
b);
201 for (
unsigned i = 0;
i <
n;
i++)
208 (*Force_fluid_fct_pt)(time,
x,
b);
225 (*Mass_source_fct_pt)(time,
x,
b);
236 const double E(
const unsigned&
i,
239 const unsigned& l)
const
255 virtual unsigned u_index(
const unsigned&
n)
const = 0;
275 virtual double q_edge(
const unsigned&
n)
const = 0;
279 virtual double q_edge(
const unsigned&
t,
const unsigned&
n)
const = 0;
286 virtual double q_internal(
const unsigned&
t,
const unsigned&
n)
const = 0;
296 Shape& q_basis)
const = 0;
301 Shape& div_q_basis_ds)
const = 0;
306 const unsigned n_node = this->
nnode();
308 const unsigned n_q_basis = this->
nq_basis();
309 Shape q_basis_local(n_q_basis,
DIM);
319 const unsigned&
n)
const = 0;
350 const Shape& q_basis_local,
353 Shape& q_basis)
const;
358 const Shape& q_basis_local,
360 Shape& q_basis)
const
362 const unsigned n_node = this->
nnode();
385 unsigned n_node =
nnode();
393 for (
unsigned i = 0;
i <
DIM;
i++)
396 unsigned u_nodal_index =
u_index(
i);
402 for (
unsigned l = 0; l < n_node; l++)
413 unsigned n_node =
nnode();
422 unsigned u_nodal_index =
u_index(
i);
428 for (
unsigned l = 0; l < n_node; l++)
445 for (
unsigned i = 0;
i <
DIM;
i++)
448 for (
unsigned l = 0; l < n_q_basis_edge; l++)
452 for (
unsigned l = n_q_basis_edge; l < n_q_basis; l++)
469 for (
unsigned l = 0; l < n_q_basis_edge; l++)
471 q_i +=
q_edge(l) * q_basis(l,
i);
473 for (
unsigned l = n_q_basis_edge; l < n_q_basis; l++)
475 q_i +=
q_internal(l - n_q_basis_edge) * q_basis(l,
i);
488 unsigned n_node =
nnode();
489 const unsigned n_q_basis =
nq_basis();
493 Shape div_q_basis_ds(n_q_basis);
513 for (
unsigned l = 0; l < n_q_basis_edge; l++)
515 div_q += 1.0 / det * div_q_basis_ds(l) *
q_edge(l);
520 for (
unsigned l = n_q_basis_edge; l < n_q_basis; l++)
522 div_q += 1.0 / det * div_q_basis_ds(l) *
q_internal(l - n_q_basis_edge);
546 Shape p_basis(n_p_basis);
555 for (
unsigned l = 0; l < n_p_basis; l++)
575 double du_dt(
const unsigned&
n,
const unsigned&
i)
const
587 const unsigned u_nodal_index =
u_index(
i);
593 for (
unsigned t = 0;
t < n_time;
t++)
605 double d2u_dt2(
const unsigned&
n,
const unsigned&
i)
const
617 const unsigned u_nodal_index =
u_index(
i);
623 for (
unsigned t = 0;
t < n_time;
t++)
652 for (
unsigned t = 0;
t < n_time;
t++)
682 for (
unsigned t = 0;
t < n_time;
t++)
714 void output(std::ostream& outfile,
const unsigned& nplot);
719 const unsigned& nplot,
725 const unsigned& nplot,
758 Shape& div_q_basis_ds,
759 Shape& div_q_test_ds)
const = 0;
775 Shape& div_q_basis_ds,
776 Shape& div_q_test_ds)
const = 0;
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
float * p
Definition: Tutorial_Map_using.cpp:9
Scalar * b
Definition: benchVecAdd.cpp:17
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
Definition: nodes.h:238
void set_time_stepper(TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
Definition: nodes.cc:406
Definition: linear_elasticity/elasticity_tensor.h:55
Definition: elements.h:1313
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
double nodal_value(const unsigned &n, const unsigned &i) const
Definition: elements.h:2593
virtual void shape(const Vector< double > &s, Shape &psi) const =0
unsigned dim() const
Definition: elements.h:2611
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Definition: elements.h:1759
virtual double local_to_eulerian_mapping(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Definition: elements.h:1508
virtual void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Definition: elements.h:1981
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Definition: elements.h:1765
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
Definition: elements.h:622
static DenseMatrix< double > Dummy_matrix
Definition: elements.h:227
TimeStepper *& time_stepper_pt()
Definition: geom_objects.h:192
Definition: poroelasticity_elements.h:46
MassSourceFctPt & mass_source_fct_pt()
Access function: Pointer to mass source function.
Definition: poroelasticity_elements.h:157
SourceFctPt & force_fluid_fct_pt()
Access function: Pointer to fluid force function.
Definition: poroelasticity_elements.h:145
double dq_internal_dt(const unsigned &n) const
dq_internal/dt for the n-th internal degree of freedom
Definition: poroelasticity_elements.h:663
const double & porosity() const
Access function for the porosity.
Definition: poroelasticity_elements.h:121
virtual int q_edge_local_eqn(const unsigned &n) const =0
Return the equation number of the n-th edge (flux) degree of freedom.
SourceFctPt Force_fluid_fct_pt
Pointer to fluid source function.
Definition: poroelasticity_elements.h:790
void output_fct(std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Definition: poroelasticity_elements.cc:361
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
MassSourceFctPt Mass_source_fct_pt
Pointer to the mass source function.
Definition: poroelasticity_elements.h:793
double *& alpha_pt()
Access function for pointer to alpha.
Definition: poroelasticity_elements.h:115
ElasticityTensor *& elasticity_tensor_pt()
Return the pointer to the elasticity_tensor.
Definition: poroelasticity_elements.h:230
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
void(* SourceFctPt)(const double &time, const Vector< double > &x, Vector< double > &f)
Source function pointer typedef.
Definition: poroelasticity_elements.h:49
double * Porosity_pt
Porosity.
Definition: poroelasticity_elements.h:808
SourceFctPt force_fluid_fct_pt() const
Access function: Pointer to fluid force function (const version)
Definition: poroelasticity_elements.h:151
double interpolated_u(const Vector< double > &s, const unsigned &i) const
Calculate the FE representation of the i-th component of u.
Definition: poroelasticity_elements.h:410
const double & k_inv() const
Access function for the nondim inverse permeability.
Definition: poroelasticity_elements.h:97
virtual void pin_q_internal_value(const unsigned &n)=0
Pin the nth internal q value.
static double Default_porosity_value
Static default value for the porosity.
Definition: poroelasticity_elements.h:823
void force_solid(const double &time, const Vector< double > &x, Vector< double > &b) const
Definition: poroelasticity_elements.h:170
void mass_source(const double &time, const Vector< double > &x, double &b) const
Definition: poroelasticity_elements.h:214
SourceFctPt Force_solid_fct_pt
Pointer to solid source function.
Definition: poroelasticity_elements.h:787
virtual unsigned q_edge_node_number(const unsigned &n) const =0
Return the number of the node where the nth edge unknown is stored.
const double & alpha() const
Access function for alpha.
Definition: poroelasticity_elements.h:109
virtual unsigned u_index(const unsigned &n) const =0
Return the nodal index of the n-th solid displacement unknown.
virtual int q_internal_local_eqn(const unsigned &n) const =0
double transform_basis(const Vector< double > &s, const Shape &q_basis_local, Shape &psi, DShape &dpsi, Shape &q_basis) const
Definition: poroelasticity_elements.cc:196
virtual unsigned np_basis() const =0
Return the total number of pressure basis functions.
static double Default_density_ratio_value
Static default value for the density ratio.
Definition: poroelasticity_elements.h:814
void get_stress(const Vector< double > &s, DenseMatrix< double > &sigma) const
Definition: poroelasticity_elements.cc:154
virtual void fill_in_generic_residual_contribution(Vector< double > &residuals, DenseMatrix< double > &jacobian, bool flag)
Fill in residuals and, if flag==true, jacobian.
Definition: poroelasticity_elements.cc:674
virtual unsigned q_internal_index() const =0
double * Alpha_pt
Alpha.
Definition: poroelasticity_elements.h:805
double dq_edge_dt(const unsigned &n) const
dq_edge/dt for the n-th edge degree of freedom
Definition: poroelasticity_elements.h:635
void interpolated_p(const Vector< double > &s, double &p) const
Calculate the FE representation of p.
Definition: poroelasticity_elements.h:540
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in contribution to residuals for the Darcy equations.
Definition: poroelasticity_elements.h:368
double d2u_dt2(const unsigned &n, const unsigned &i) const
d^2u/dt^2 at local node n
Definition: poroelasticity_elements.h:605
virtual void pin_p_value(const unsigned &n, const double &p)=0
Pin the nth pressure value.
double interpolated_div_q(const Vector< double > &s)
Calculate the FE representation of div q and return it.
Definition: poroelasticity_elements.h:527
virtual double q_edge(const unsigned &n) const =0
Return the values of the edge (flux) degrees of freedom.
void interpolated_q(const Vector< double > &s, Vector< double > &u) const
Calculate the FE representation of q.
Definition: poroelasticity_elements.h:437
const double & density_ratio() const
Access function for the density ratio.
Definition: poroelasticity_elements.h:85
double *& lambda_sq_pt()
Access function for pointer to timescale ratio (nondim density)
Definition: poroelasticity_elements.h:79
double *& density_ratio_pt()
Access function for pointer to the density ratio.
Definition: poroelasticity_elements.h:91
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Fill in the Jacobian matrix for the Newton method.
Definition: poroelasticity_elements.h:375
virtual unsigned nq_basis_edge() const =0
Return the number of edge basis functions for q.
void(* MassSourceFctPt)(const double &time, const Vector< double > &x, double &f)
Mass source function pointer typedef.
Definition: poroelasticity_elements.h:54
virtual void scale_basis(Shape &basis) const =0
Scale the edge basis to allow arbitrary edge mappings.
static double Default_lambda_sq_value
Static default value for timescale ratio (1.0 – for natural scaling)
Definition: poroelasticity_elements.h:811
virtual double q_internal(const unsigned &n) const =0
Return the values of the internal (moment) degrees of freedom.
static double Default_alpha_value
Static default value for alpha.
Definition: poroelasticity_elements.h:820
virtual void edge_gauss_point_global(const unsigned &edge, const unsigned &n, Vector< double > &x) const =0
Returns the global coordinates of the nth gauss point along an edge.
virtual double q_internal(const unsigned &t, const unsigned &n) const =0
virtual int p_local_eqn(const unsigned &n) const =0
Return the equation number of the n-th pressure degree of freedom.
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
Definition: poroelasticity_elements.cc:462
ElasticityTensor * Elasticity_tensor_pt
Pointer to the elasticity tensor.
Definition: poroelasticity_elements.h:783
void set_q_internal_timestepper(TimeStepper *const time_stepper_pt)
Set the timestepper of the q internal data object.
Definition: poroelasticity_elements.h:693
virtual unsigned nedge_gauss_point() const =0
Returns the number of gauss points along each edge of the element.
void force_fluid(const double &time, const Vector< double > &x, Vector< double > &b) const
Definition: poroelasticity_elements.h:192
PoroelasticityEquations()
Constructor.
Definition: poroelasticity_elements.h:59
void get_q_basis(const Vector< double > &s, Shape &q_basis) const
Returns the transformed basis at local coordinate s.
Definition: poroelasticity_elements.h:304
virtual void get_q_basis_local(const Vector< double > &s, Shape &q_basis) const =0
Returns the local form of the q basis at local coordinate s.
virtual unsigned required_nvalue(const unsigned &n) const =0
Number of values required at node n.
double *& k_inv_pt()
Access function for pointer to the nondim inverse permeability.
Definition: poroelasticity_elements.h:103
MassSourceFctPt mass_source_fct_pt() const
Access function: Pointer to mass source function (const version)
Definition: poroelasticity_elements.h:163
virtual double p_value(unsigned &n) const =0
Return the nth pressure value.
virtual unsigned q_edge_index(const unsigned &n) const =0
Return the nodal index at which the nth edge unknown is stored.
const double & lambda_sq() const
Access function for timescale ratio (nondim density)
Definition: poroelasticity_elements.h:73
double interpolated_p(const Vector< double > &s) const
Calculate the FE representation of p and return it.
Definition: poroelasticity_elements.h:562
double * Density_ratio_pt
Density ratio.
Definition: poroelasticity_elements.h:799
static double Default_k_inv_value
Static default value for 1/k.
Definition: poroelasticity_elements.h:817
double interpolated_q(const Vector< double > &s, const unsigned i) const
Calculate the FE representation of the i-th component of q.
Definition: poroelasticity_elements.h:460
void interpolated_div_q(const Vector< double > &s, double &div_q) const
Calculate the FE representation of div u.
Definition: poroelasticity_elements.h:482
void output(std::ostream &outfile)
Output with default number of plot points.
Definition: poroelasticity_elements.h:706
unsigned self_test()
Definition: poroelasticity_elements.h:700
double du_dt(const unsigned &n, const unsigned &i) const
du/dt at local node n
Definition: poroelasticity_elements.h:575
virtual void get_div_q_basis_local(const Vector< double > &s, Shape &div_q_basis_ds) const =0
const double E(const unsigned &i, const unsigned &j, const unsigned &k, const unsigned &l) const
Access function to the entries in the elasticity tensor.
Definition: poroelasticity_elements.h:236
SourceFctPt & force_solid_fct_pt()
Access function: Pointer to solid force function.
Definition: poroelasticity_elements.h:133
void interpolated_u(const Vector< double > &s, Vector< double > &disp) const
Calculate the FE representation of u.
Definition: poroelasticity_elements.h:382
double * K_inv_pt
1/k
Definition: poroelasticity_elements.h:802
SourceFctPt force_solid_fct_pt() const
Access function: Pointer to solid force function (const version)
Definition: poroelasticity_elements.h:139
void get_strain(const Vector< double > &s, DenseMatrix< double > &strain) const
Return the strain tensor.
Definition: poroelasticity_elements.cc:54
virtual unsigned nq_basis() const =0
Return the total number of computational basis functions for q.
virtual double q_edge(const unsigned &t, const unsigned &n) const =0
double transform_basis(const Vector< double > &s, const Shape &q_basis_local, Shape &psi, Shape &q_basis) const
Definition: poroelasticity_elements.h:357
double * Lambda_sq_pt
Timescale ratio (non-dim. density)
Definition: poroelasticity_elements.h:796
virtual double edge_gauss_point(const unsigned &edge, const unsigned &n) const =0
Returns the nth gauss point along an edge.
virtual void get_p_basis(const Vector< double > &s, Shape &p_basis) const =0
Return the pressure basis.
double *& porosity_pt()
Access function for pointer to the porosity.
Definition: poroelasticity_elements.h:127
Definition: timesteppers.h:231
unsigned ntstorage() const
Definition: timesteppers.h:601
virtual double weight(const unsigned &i, const unsigned &j) const
Access function for j-th weight for the i-th derivative.
Definition: timesteppers.h:594
bool is_steady() const
Definition: timesteppers.h:389
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
Definition: cxx11_tensor_map.cpp:237
RealScalar s
Definition: level1_cplx_impl.h:130
char char char int int * k
Definition: level2_impl.h:374
#define DIM
Definition: linearised_navier_stokes_elements.h:44
int error
Definition: calibrate.py:297
int sigma
Definition: calibrate.py:179
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
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2