67 q_basis(0, 0) = Sign_edge[0] * std::sqrt(2) *
s[0];
68 q_basis(0, 1) = Sign_edge[0] * std::sqrt(2) *
s[1];
70 q_basis(1, 0) = Sign_edge[1] * (
s[0] - 1);
71 q_basis(1, 1) = Sign_edge[1] *
s[1];
73 q_basis(2, 0) = Sign_edge[2] *
s[0];
74 q_basis(2, 1) = Sign_edge[2] * (
s[1] - 1);
82 div_q_basis_ds(0) = Sign_edge[0] * 2 * std::sqrt(2);
83 div_q_basis_ds(1) = Sign_edge[1] * 2;
84 div_q_basis_ds(2) = Sign_edge[2] * 2;
88 scale_basis(div_q_basis_ds);
108 Shape& p_basis)
const
164 Shape& q_basis)
const
170 g1 = edge_gauss_point(0, 0);
171 g2 = edge_gauss_point(0, 1);
173 Sign_edge[0] * std::sqrt(2) *
s[0] * (
s[1] - g2) / (g1 - g2);
175 Sign_edge[0] * std::sqrt(2) *
s[1] * (
s[1] - g2) / (g1 - g2);
178 Sign_edge[0] * std::sqrt(2) *
s[0] * (
s[1] - g1) / (g2 - g1);
180 Sign_edge[0] * std::sqrt(2) *
s[1] * (
s[1] - g1) / (g2 - g1);
182 g1 = edge_gauss_point(1, 0);
183 g2 = edge_gauss_point(1, 1);
184 q_basis(2, 0) = Sign_edge[1] * (
s[0] - 1) * (
s[1] - g1) / (g2 - g1);
185 q_basis(2, 1) = Sign_edge[1] *
s[1] * (
s[1] - g1) / (g2 - g1);
187 q_basis(3, 0) = Sign_edge[1] * (
s[0] - 1) * (
s[1] - g2) / (g1 - g2);
188 q_basis(3, 1) = Sign_edge[1] *
s[1] * (
s[1] - g2) / (g1 - g2);
190 g1 = edge_gauss_point(2, 0);
191 g2 = edge_gauss_point(2, 1);
192 q_basis(4, 0) = Sign_edge[2] *
s[0] * (
s[0] - g2) / (g1 - g2);
193 q_basis(4, 1) = Sign_edge[2] * (
s[1] - 1) * (
s[0] - g2) / (g1 - g2);
195 q_basis(5, 0) = Sign_edge[2] *
s[0] * (
s[0] - g1) / (g2 - g1);
196 q_basis(5, 1) = Sign_edge[2] * (
s[1] - 1) * (
s[0] - g1) / (g2 - g1);
198 q_basis(6, 0) =
s[1] *
s[0];
199 q_basis(6, 1) =
s[1] * (
s[1] - 1);
201 q_basis(7, 0) =
s[0] * (
s[0] - 1);
202 q_basis(7, 1) =
s[0] *
s[1];
212 g1 = edge_gauss_point(0, 0);
213 g2 = edge_gauss_point(0, 1);
215 Sign_edge[0] * std::sqrt(2) * (3 *
s[1] - 2 * g2) / (g1 - g2);
217 Sign_edge[0] * std::sqrt(2) * (2 * g1 - 3 *
s[1]) / (g1 - g2);
219 g1 = edge_gauss_point(1, 0);
220 g2 = edge_gauss_point(1, 1);
221 div_q_basis_ds(2) = Sign_edge[1] * (2 * g1 - 3 *
s[1]) / (g1 - g2);
222 div_q_basis_ds(3) = Sign_edge[1] * (3 *
s[1] - 2 * g2) / (g1 - g2);
224 g1 = edge_gauss_point(2, 0);
225 g2 = edge_gauss_point(2, 1);
226 div_q_basis_ds(4) = Sign_edge[2] * (3 *
s[0] - 2 * g2) / (g1 - g2);
227 div_q_basis_ds(5) = Sign_edge[2] * (2 * g1 - 3 *
s[0]) / (g1 - g2);
229 div_q_basis_ds(6) = 3 *
s[1] - 1;
230 div_q_basis_ds(7) = 3 *
s[0] - 1;
234 scale_basis(div_q_basis_ds);
254 Shape& p_basis)
const
274 0.5 - std::sqrt(3.0) / 6.0, 0.5 + std::sqrt(3.0) / 6.0};
A class that represents a collection of data; each Data object may contain many different individual ...
unsigned add_internal_data(Data *const &data_pt, const bool &fd=true)
Add a (pointer to an) internal data object to the element and return the index required to obtain it ...
Class implementing the generic maths of the poroelasticity equations: linear elasticity coupled with ...
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
Element which solves the Darcy equations using TElements.
TPoroelasticityElement()
Constructor.
unsigned Q_internal_data_index
The internal data index where the internal q degrees of freedom are stored.
void get_div_q_basis_local(const Vector< double > &s, Shape &div_q_basis_ds) const
Returns the local form of the q basis and dbasis/ds at local coordinate s.
unsigned nedge_gauss_point() const
Returns the number of gauss points along each edge of the element.
void get_p_basis(const Vector< double > &s, Shape &p_basis) const
Return the pressure basis.
unsigned np_basis() const
Return the total number of pressure basis functions.
unsigned nq_basis_edge() const
Return the number of edge basis functions for u.
unsigned P_internal_data_index
The internal data index where the p degrees of freedom are stored.
void get_q_basis_local(const Vector< double > &s, Shape &q_basis) const
Returns the local form of the q basis at local coordinate s.
~TPoroelasticityElement()
Destructor.
unsigned nq_basis() const
Return the total number of computational basis functions for u.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...