31 template<
unsigned DIM>
35 template<
unsigned DIM>
39 template<
unsigned DIM>
43 template<
unsigned DIM>
47 template<
unsigned DIM>
53 template<
unsigned DIM>
60 std::ostringstream error_message;
61 error_message <<
"Strain matrix is " <<
strain.ncol() <<
" x "
62 <<
strain.nrow() <<
", but dimension of the equations is "
88 for (
unsigned i = 0;
i <
DIM;
i++)
107 for (
unsigned i = 0;
i <
DIM;
i++)
113 for (
unsigned j = 0;
j <
DIM;
j++)
121 for (
unsigned i = 0;
i <
DIM;
i++)
126 for (
int j = (
DIM - 1);
j >=
static_cast<int>(
i);
j--)
129 if (
static_cast<int>(
i) !=
j)
132 0.5 * (interpolated_dudx(
i,
j) + interpolated_dudx(
j,
i));
141 for (
int j = (
i - 1);
j >= 0;
j--)
153 template<
unsigned DIM>
160 std::ostringstream error_message;
161 error_message <<
"Stress matrix is " <<
stress.ncol() <<
" x "
162 <<
stress.nrow() <<
", but dimension of the equations is "
176 for (
unsigned i = 0;
i <
DIM;
i++)
178 for (
unsigned j = 0;
j <
DIM;
j++)
181 for (
unsigned k = 0;
k <
DIM;
k++)
183 for (
unsigned l = 0;
k <
DIM;
k++)
195 template<
unsigned DIM>
218 const unsigned n_q_basis = this->nq_basis();
224 for (
unsigned i = 0;
i <
DIM;
i++)
232 for (
unsigned i = 0;
i <
DIM;
i++)
235 for (
unsigned j = 0;
j <
DIM;
j++)
259 template<
unsigned DIM>
261 const unsigned&
nplot)
278 for (
unsigned i = 0;
i <
DIM;
i++)
284 for (
unsigned i = 0;
i <
DIM;
i++)
290 for (
unsigned i = 0;
i <
DIM;
i++)
296 outfile << interpolated_div_q(
s) <<
" ";
299 outfile << interpolated_p(
s) <<
" ";
308 for (
unsigned i = 0;
i <
DIM;
i++)
312 interpolated_du_dt[
i] += du_dt(
l,
i) *
psi(
l);
314 outfile << interpolated_du_dt[
i] <<
" ";
319 for (
unsigned i = 0;
i <
DIM;
i++)
328 const unsigned n_q_basis = this->nq_basis();
337 for (
unsigned i = 0;
i <
DIM;
i++)
360 template<
unsigned DIM>
363 const unsigned&
nplot,
393 for (
unsigned i = 0;
i <
DIM;
i++)
397 for (
unsigned i = 0;
i < 2 *
DIM + 2;
i++)
410 template<
unsigned DIM>
413 const unsigned&
nplot,
444 for (
unsigned i = 0;
i <
DIM;
i++)
448 for (
unsigned i = 0;
i < 2 *
DIM + 2;
i++)
461 template<
unsigned DIM>
468 for (
unsigned i = 0;
i < 3;
i++)
483 outfile <<
"ZONE" << std::endl;
492 for (
unsigned i = 0;
i <
DIM;
i++)
513 for (
unsigned i = 0;
i <
DIM;
i++)
522 for (
unsigned i = 0;
i <
DIM;
i++)
541 for (
unsigned i = 0;
i <
DIM;
i++)
547 for (
unsigned i = 0;
i <
DIM;
i++)
553 for (
unsigned i = 0;
i <
DIM;
i++)
567 template<
unsigned DIM>
575 for (
unsigned i = 0;
i < 3;
i++)
590 outfile <<
"ZONE" << std::endl;
599 for (
unsigned i = 0;
i <
DIM;
i++)
620 for (
unsigned i = 0;
i <
DIM;
i++)
629 for (
unsigned i = 0;
i <
DIM;
i++)
648 for (
unsigned i = 0;
i <
DIM;
i++)
654 for (
unsigned i = 0;
i <
DIM;
i++)
660 for (
unsigned i = 0;
i <
DIM;
i++)
673 template<
unsigned DIM>
708 double lambda_sq = this->lambda_sq();
711 double k_inv = this->k_inv();
714 double alpha = this->alpha();
717 double porosity = this->porosity();
720 double density_ratio = this->density_ratio();
724 density_ratio / (1 + porosity * (density_ratio - 1));
736 for (
unsigned i = 0;
i <
DIM;
i++)
746 double J = shape_basis_test_local_at_knot(
ipt,
769 double interpolated_p = 0.0;
775 for (
unsigned i = 0;
i <
DIM;
i++)
786 for (
unsigned j = 0;
j <
DIM;
j++)
798 for (
unsigned i = 0;
i <
DIM;
i++)
818 interpolated_p += p_value(
l) *
p_basis(
l);
849 for (
unsigned a = 0; a <
DIM; a++)
862 for (
unsigned b = 0; b <
DIM; b++)
870 for (
unsigned c = 0; c <
DIM; c++)
872 for (
unsigned d = 0; d <
DIM; d++)
887 for (
unsigned c = 0; c <
DIM; c++)
900 for (
unsigned b = 0; b <
DIM; b++)
902 for (
unsigned d = 0; d <
DIM; d++)
971 for (
unsigned i = 0;
i <
DIM;
i++)
990 for (
unsigned c = 0; c <
DIM; c++)
1023 for (
unsigned c = 0; c <
DIM; c++)
1071 for (
unsigned c = 0; c <
DIM; c++)
1109 template class PoroelasticityEquations<2>;
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
virtual double J_eulerian(const Vector< double > &s) const
Return the Jacobian of mapping from local to global coordinates at local position s.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
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...
virtual void transform_derivatives(const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
Convert derivative w.r.t.local coordinates to derivatives w.r.t the coordinates used to assemble the ...
virtual std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction")
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...
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
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.
unsigned nnode() const
Return the number of nodes.
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Function pointer for function that computes vector-valued steady "exact solution" as .
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...
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...
virtual unsigned nplot_points(const unsigned &nplot) const
Return total number of plot points (when plotting nplot points in each "coordinate direction")
double nodal_position(const unsigned &n, const unsigned &i) const
Return the i-th coordinate at local node n. If the node is hanging, the appropriate interpolation is ...
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...
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
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...
double raw_nodal_value(const unsigned &n, const unsigned &i) const
Return the i-th value stored at local node n but do NOT take hanging nodes into account.
virtual void write_tecplot_zone_footer(std::ostream &outfile, const unsigned &nplot) const
Add tecplot zone "footer" to output stream (when plotting nplot points in each "coordinate direction"...
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Function pointer for function that computes Vector-valued time-dependent function as .
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
An OomphLibError object which should be thrown when an run-time error is encountered....
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^DIM plot points.
static double Default_porosity_value
Static default value for the porosity.
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 ...
static double Default_density_ratio_value
Static default value for the density ratio.
void get_stress(const Vector< double > &s, DenseMatrix< double > &sigma) const
Return the Cauchy stress tensor, as calculated from the elasticity tensor at specified local coordina...
virtual void fill_in_generic_residual_contribution(Vector< double > &residuals, DenseMatrix< double > &jacobian, bool flag)
Fill in residuals and, if flag==true, jacobian.
static double Default_lambda_sq_value
Static default value for timescale ratio (1.0 – for natural scaling)
static double Default_alpha_value
Static default value for alpha.
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 ...
static double Default_k_inv_value
Static default value for 1/k.
void output(std::ostream &outfile)
Output with default number of plot points.
void get_strain(const Vector< double > &s, DenseMatrix< double > &strain) const
Return the strain tensor.
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
TAdvectionDiffusionReactionElement()
Constructor: Call constructors for TElement and AdvectionDiffusionReaction equations.
virtual double weight(const unsigned &i, const unsigned &j) const
Access function for j-th weight for the i-th derivative.
Time *const & time_pt() const
Access function for the pointer to time (const version)
double & time()
Return the current value of the continuous time.
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).