7#ifndef XDIVDIV_TEST_HPP
8#define XDIVDIV_TEST_HPP
12#include <boost/math/constants/constants.hpp>
14#include <Eigen/Sparse>
15#include <unsupported/Eigen/SparseExtra>
41 std::ostream & output = std::cout
88 std::ostream & m_output;
102 static const double PI = boost::math::constants::pi<double>();
113 return sin(
PI*
x(0))*sin(
PI*
x(1));
118 return 4.*pow(
PI, 4)*sin(
PI*
x(0))*sin(
PI*
x(1));
124 M.row(0) << -sin(
PI*
x(0))*sin(
PI*
x(1)), cos(
PI*
x(0))*cos(
PI*
x(1));
125 M.row(1) << cos(
PI*
x(0))*cos(
PI*
x(1)), -sin(
PI*
x(0))*sin(
PI*
x(1));
127 return -pow(
PI, 2) *
M;
148 Eigen::Vector2d
tE = E.tangent();
149 Eigen::Vector2d
nE = E.normal();
209 Eigen::Vector2d
tE = E.tangent();
210 Eigen::Vector2d
nE = E.normal();
229 return pow(
x(0),2)*pow(1.-
x(0),2) + pow(
x(1),2)*pow(1.-
x(1),2);
242 2.*(pow(
x(0),2)+4.*
x(0)*(
x(0)-1.)+pow(1.-
x(0),2)), 0.,
243 0., 2.*(pow(
x(1),2)+4.*
x(1)*(
x(1)-1.)+pow(1.-
x(1),2));
255 Eigen::Vector2d
tE = E.tangent();
256 Eigen::Vector2d
nE = E.normal();
276 return pow(
x(0),2)*pow(1.-
x(0),2)*pow(
x(1),2)*pow(1.-
x(1),2);
281 return 24*pow(
x(0), 2)*pow(
x(0) - 1, 2) + 32*
x(0)*
x(1)*(
x(0) - 1)*(
x(1) - 1) + 8*
x(0)*
x(1)*(
x(0) - 1)*(4*
x(1) - 2) + 8*
x(0)*
x(1)*(4*
x(0) - 2)*(
x(1) - 1) + 8*
x(0)*
x(1)*(
x(0)*
x(1) +
x(0)*(
x(1) - 1) +
x(1)*(
x(0) - 1) + (
x(0) - 1)*(
x(1) - 1)) + 8*
x(0)*(
x(0) - 1)*(
x(1) - 1)*(4*
x(1) - 2) + 8*
x(0)*(
x(1) - 1)*(
x(0)*
x(1) +
x(0)*(
x(1) - 1) +
x(1)*(
x(0) - 1) + (
x(0) - 1)*(
x(1) - 1)) + 24*pow(
x(1), 2)*pow(
x(1) - 1, 2) + 8*
x(1)*(
x(0) - 1)*(4*
x(0) - 2)*(
x(1) - 1) + 8*
x(1)*(
x(0) - 1)*(
x(0)*
x(1) +
x(0)*(
x(1) - 1) +
x(1)*(
x(0) - 1) + (
x(0) - 1)*(
x(1) - 1)) + 2*(4*
x(0) - 4)*(
x(1) - 1)*(
x(0)*
x(1) +
x(0)*(
x(1) - 1) +
x(1)*(
x(0) - 1) + (
x(0) - 1)*(
x(1) - 1));
287 M.row(0) << 2*pow(
x(1), 2)*pow(
x(1) - 1, 2)*(pow(
x(0), 2) + 4*
x(0)*(
x(0) - 1) + pow(
x(0) - 1, 2)), 4*
x(0)*
x(1)*(
x(0) - 1)*(
x(1) - 1)*(
x(0)*
x(1) +
x(0)*(
x(1) - 1) +
x(1)*(
x(0) - 1) + (
x(0) - 1)*(
x(1) - 1));
288 M.row(1) << 4*
x(0)*
x(1)*(
x(0) - 1)*(
x(1) - 1)*(
x(0)*
x(1) +
x(0)*(
x(1) - 1) +
x(1)*(
x(0) - 1) + (
x(0) - 1)*(
x(1) - 1)), 2*pow(
x(0), 2)*pow(
x(0) - 1, 2)*(pow(
x(1), 2) + 4*
x(1)*(
x(1) - 1) + pow(
x(1) - 1, 2));
296 2*pow(
x(1), 2)*(12*
x(0) - 6)*pow(
x(1) - 1, 2),
297 2*pow(
x(1), 2)*(2*
x(1) - 2)*(pow(
x(0), 2) + 4*
x(0)*(
x(0) - 1) + pow(
x(0) - 1, 2)) + 4*
x(1)*pow(
x(1) - 1, 2)*(pow(
x(0), 2) + 4*
x(0)*(
x(0) - 1) + pow(
x(0) - 1, 2))
301 4*
x(0)*
x(1)*(
x(0) - 1)*(
x(1) - 1)*(4*
x(1) - 2) + 4*
x(0)*
x(1)*(
x(1) - 1)*(
x(0)*
x(1) +
x(0)*(
x(1) - 1) +
x(1)*(
x(0) - 1) + (
x(0) - 1)*(
x(1) - 1)) + 4*
x(1)*(
x(0) - 1)*(
x(1) - 1)*(
x(0)*
x(1) +
x(0)*(
x(1) - 1) +
x(1)*(
x(0) - 1) + (
x(0) - 1)*(
x(1) - 1)),
302 4*
x(0)*
x(1)*(
x(0) - 1)*(4*
x(0) - 2)*(
x(1) - 1) + 4*
x(0)*
x(1)*(
x(0) - 1)*(
x(0)*
x(1) +
x(0)*(
x(1) - 1) +
x(1)*(
x(0) - 1) + (
x(0) - 1)*(
x(1) - 1)) + 4*
x(0)*(
x(0) - 1)*(
x(1) - 1)*(
x(0)*
x(1) +
x(0)*(
x(1) - 1) +
x(1)*(
x(0) - 1) + (
x(0) - 1)*(
x(1) - 1))
306 2*pow(
x(0), 2)*(2*
x(0) - 2)*(pow(
x(1), 2) + 4*
x(1)*(
x(1) - 1) + pow(
x(1) - 1, 2)) + 4*
x(0)*pow(
x(0) - 1, 2)*(pow(
x(1), 2) + 4*
x(1)*(
x(1) - 1) + pow(
x(1) - 1, 2)),
307 2*pow(
x(0), 2)*pow(
x(0) - 1, 2)*(12*
x(1) - 6)
315 Eigen::Vector2d
tE = E.tangent();
316 Eigen::Vector2d
nE = E.normal();
Construct all polynomial spaces for the plates sequence.
Definition platescore.hpp:25
Discrete Hdivdiv space.
Definition xdivdiv.hpp:20
Create grid points x
Definition generate_cartesian_mesh.m:22
Eigen::SparseMatrix< double > SystemMatrixType
Definition bgg-klplate.hpp:54
static const double PI
Definition bgg-klplate.hpp:214
std::function< double(const Eigen::Vector2d &)> ForcingTermType
Definition bgg-klplate.hpp:55
Eigen::Vector2d VectorRd
Definition basis.hpp:55
size_t dimension() const
Returns the dimension of the global space (all DOFs for all geometric entities)
Definition localdofspace.hpp:61
static KirchhoffLove::DeflectionType trigonometric_u
Definition ddr-klplate.hpp:197
static KirchhoffLove::DeflectionType biquartic_u
Definition ddr-klplate.hpp:346
std::function< Eigen::Matrix2d(const Eigen::Vector2d &)> MomentTensorType
Definition ddr-klplate.hpp:42
static KirchhoffLove::DeflectionType quartic_u
Definition ddr-klplate.hpp:270
std::function< double(const Eigen::Vector2d &, const Edge &)> MomentTensorEdgeDerivativeType
Definition ddr-klplate.hpp:43
std::function< double(const Eigen::Vector2d &)> DeflectionType
Definition ddr-klplate.hpp:40
bool use_threads
Definition HHO_DiffAdvecReac.hpp:45
std::size_t n_cells() const
number of cells in the mesh.
Definition Mesh2D.hpp:63
const Mesh & mesh() const
Return a const reference to the mesh.
Definition platescore.hpp:66
const size_t & degree() const
Return the polynomial degree.
Definition platescore.hpp:72
depending on the Matrix Market format indicated by or array(dense array storage). The data will be duplicated % as appropriate if symmetry is indicated in the header. % % Optionally
Definition mhd-solutions.hpp:9
static KirchhoffLove::MomentTensorType trigonometric_sigma
Definition xdivdiv-test.hpp:122
static KirchhoffLove::MomentTensorEdgeDerivativeType biquartic_sigma_DE
Definition xdivdiv-test.hpp:293
static KirchhoffLove::MomentTensorEdgeDerivativeType quartic_sigma_DE
Definition xdivdiv-test.hpp:249
static KirchhoffLove::DeflectionType simple_u
Definition xdivdiv-test.hpp:167
static QuadRot::ForcingTermType trigonometric_f
Definition ddr-quadrot.hpp:367
static KirchhoffLove::ForcingTermType simple_f
Definition xdivdiv-test.hpp:177
static QuadRot::ForcingTermType quartic_f
Definition ddr-quadrot.hpp:327
static KirchhoffLove::MomentTensorType simple_sigma
Definition xdivdiv-test.hpp:182
static KirchhoffLove::MomentTensorEdgeDerivativeType trigonometric_sigma_DE
Definition xdivdiv-test.hpp:131
static KirchhoffLove::MomentTensorEdgeDerivativeType simple_sigma_DE
Definition xdivdiv-test.hpp:192
static KirchhoffLove::MomentTensorType quartic_sigma
Definition xdivdiv-test.hpp:238
static KirchhoffLove::ForcingTermType biquartic_f
Definition xdivdiv-test.hpp:280
static KirchhoffLove::MomentTensorType biquartic_sigma
Definition xdivdiv-test.hpp:285
Assemble a RM problem.
Definition bgg-klplate.hpp:53
Eigen::VectorXd & systemVector()
Returns the linear system right-hand side vector.
Definition xdivdiv-test.hpp:71
double & stabilizationParameter()
Returns the stabilization parameter.
Definition xdivdiv-test.hpp:81
Eigen::SparseMatrix< double > SystemMatrixType
Definition xdivdiv-test.hpp:29
std::function< double(const Eigen::Vector2d &)> ForcingTermType
Definition xdivdiv-test.hpp:31
const SystemMatrixType & systemMatrix() const
Returns the linear system matrix.
Definition xdivdiv-test.hpp:56
const Eigen::VectorXd & systemVector() const
Returns the linear system right-hand side vector.
Definition xdivdiv-test.hpp:66
SystemMatrixType & systemMatrix()
Returns the linear system matrix.
Definition xdivdiv-test.hpp:61
std::function< Eigen::Matrix2d(const Eigen::Vector2d &)> MomentTensorType
Definition xdivdiv-test.hpp:33
const XDivDiv & xDivDiv() const
Returns the space XDivDiv.
Definition xdivdiv-test.hpp:51
std::function< double(const Eigen::Vector2d &, const Edge &)> MomentTensorEdgeDerivativeType
Definition xdivdiv-test.hpp:34
const double & stabilizationParameter() const
Returns the stabilization parameter.
Definition xdivdiv-test.hpp:76
std::function< double(const Eigen::Vector2d &)> DeflectionType
Definition xdivdiv-test.hpp:32
size_t dimensionSpace() const
Returns the dimension of the rotation + displacement space (with BC)
Definition xdivdiv-test.hpp:45
Basis dimensions for various polynomial spaces on edges/faces/elements (when relevant): Pk,...
Definition polynomialspacedimension.hpp:55