12#include <boost/math/constants/constants.hpp> 
   14#include <Eigen/Sparse> 
   15#include <unsupported/Eigen/SparseExtra> 
   42                  const double young_modulus,
 
   43                  const double poisson_ratio
 
 
 
   67    RMNorms(
double norm_rotation, 
double norm_displacement, 
double norm_kirchoff):
 
   71      energy(std::sqrt( std::pow(norm_rotation, 2)+std::pow(norm_displacement, 2)+std::pow(norm_kirchoff, 2) ) )
 
 
 
  100                   std::ostream & output = std::cout      
 
  133    inline const std::vector<std::pair<size_t,size_t>> & 
locUKN()
 const {
 
 
  143      std::vector<size_t> I_T(dim_T);
 
  144      size_t dim_excurl = m_excurl.
dimension();
 
  145      auto it_I_T = std::copy(I_excurl_T.begin(), I_excurl_T.end(), I_T.begin());
 
  146      std::transform(I_xgrad_T.begin(), I_xgrad_T.end(), it_I_T, [&dim_excurl](
const size_t & index) { return index + dim_excurl; });
 
 
  210                     const Eigen::VectorXd & 
v  
  214    template<
typename outValue, 
typename Fct>
 
  215    std::function<outValue(
const Eigen::Vector2d &)> 
contractPara(
const Fct &F)
 const  
  217      std::function<outValue(
const Eigen::Vector2d &)> f = [
this, &F](
const Eigen::Vector2d &
x)->outValue { 
return F(m_para,
x);};
 
 
  224    std::pair<Eigen::MatrixXd, Eigen::VectorXd>
 
  225    _compute_local_contribution(
 
  233    _compute_local_jump_stab(
size_t iE);
 
  238    void _assemble_local_contribution(
 
  240                                      const std::pair<Eigen::MatrixXd, Eigen::VectorXd> & lsT, 
 
  241                                      std::list<Eigen::Triplet<double> > & A1,                 
 
  242                                      Eigen::VectorXd & b1,                                    
 
  243                                      std::list<Eigen::Triplet<double> > & A2                  
 
  247    void _assemble_local_jump_stab(
 
  249                          const Eigen::MatrixXd & locJ,               
 
  250                          std::list<Eigen::Triplet<double> > & A1,    
 
  251                          std::list<Eigen::Triplet<double> > & A2     
 
  257    std::ostream & m_output;
 
  263    Eigen::VectorXd m_bdryValues;   
 
  267    std::vector<std::pair<size_t,size_t>> m_locUKN;    
 
  268    Eigen::VectorXi m_DOFtoUKN;       
 
 
  275  static const double PI = boost::math::constants::pi<double>();
 
  291                 return Eigen::Matrix2d::Zero();
 
 
  310                          pow(
x(1),3)*pow(
x(1)-1,3)*pow(
x(0),2)*pow(
x(0)-1,2)*(2*
x(0)-1),
 
  311                          pow(
x(0),3)*pow(
x(0)-1,3)*pow(
x(1),2)*pow(
x(1)-1,2)*(2*
x(1)-1)
 
 
  317                 Eigen::Matrix2d G = Eigen::Matrix2d::Zero();
 
  318                 G(0,0) = 2.*pow(
x(0),2)*pow(
x(1),3)*pow(
x(0)-1.0,2)*pow(
x(1)-1.0,3)+2.*
x(0)*pow(
x(1),3)*(2.*
x(0)-1.)*pow(
x(0)-1.,2)*pow(
x(1)-1.0,3)+pow(
x(0),2)*pow(
x(1),3)*(2.*
x(0)-1.)*(2.*
x(0)-2.)*pow(
x(1)-1.,3);
 
  319                 G(0,1) = 3.*pow(
x(0)*
x(1),2)*(2.*
x(0)-1.)*pow(
x(0)-1.,2)*pow(
x(1)-1.,3)+3.*pow(
x(0),2)*pow(
x(1),3)*(2.*
x(0)-1.)*pow(
x(0)-1.,2)*pow(
x(1)-1.,2);
 
  320                 G(1,0) = 2.*pow(
x(1),2)*pow(
x(0),3)*pow(
x(1)-1.0,2)*pow(
x(0)-1.0,3)+2.*
x(1)*pow(
x(0),3)*(2.*
x(1)-1.)*pow(
x(1)-1.,2)*pow(
x(0)-1.0,3)+pow(
x(1),2)*pow(
x(0),3)*(2.*
x(1)-1.)*(2.*
x(1)-2.)*pow(
x(0)-1.,3);
 
  321                 G(1,1) = 3.*pow(
x(1)*
x(0),2)*(2.*
x(1)-1.)*pow(
x(1)-1.,2)*pow(
x(0)-1.,3)+3.*pow(
x(1),2)*pow(
x(0),3)*(2.*
x(1)-1.)*pow(
x(1)-1.,2)*pow(
x(0)-1.,2);
 
 
  330                 val += (1./3.)*pow(
x(0),3)*pow(
x(0)-1,3)*pow(
x(1),3)*pow(
x(1)-1,3);
 
  332                 val -= ( 2*pow(para.
t,2) / (5*(1.-para.
nu)) ) *
 
  333                          ( pow(
x(1),3)*pow(
x(1)-1,3)*
x(0)*(
x(0)-1)*(5*
x(0)*
x(0)-5*
x(0)+1)
 
  334                            + pow(
x(0),3)*pow(
x(0)-1,3)*
x(1)*(
x(1)-1)*(5*
x(1)*
x(1)-5*
x(1)+1) );
 
 
  343                val += 12*
x(1)*(
x(1)-1)*(5*
x(0)*
x(0)-5*
x(0)+1) * 
 
  344                        ( 2*
x(1)*
x(1)*(
x(1)-1)*(
x(1)-1) + 
x(0)*(
x(0)-1)*(5*
x(1)*
x(1)-5*
x(1)+1) );
 
  345                val += 12*
x(0)*(
x(0)-1)*(5*
x(1)*
x(1)-5*
x(1)+1) * 
 
  346                        ( 2*
x(0)*
x(0)*(
x(0)-1)*(
x(0)-1) + 
x(1)*(
x(1)-1)*(5*
x(0)*
x(0)-5*
x(0)+1) );
 
  348                return val * para.
E / (12* (1.-para.
nu*para.
nu) );
 
 
  355  static std::function<double(
const VectorRd &)> 
 
  371  static std::function<double(
const VectorRd &)> 
 
  374  static std::function<double(
const VectorRd &)> 
 
  379                 return VectorRd((1.-
x(0))*exp(-
x(0))*cos(
x(1)), -
x(0)*exp(-
x(0))*sin(
x(1))); 
 
 
  385                H.row(0) << (
x(0)-2.)*exp(-
x(0))*cos(
x(1)), -(1.-
x(0))*exp(-
x(0))*sin(
x(1));
 
  386                H.row(1) << -(1.-
x(0))*exp(-
x(0))*sin(
x(1)), -
x(0)*exp(-
x(0))*cos(
x(1));
 
 
  390  static std::function<double(
const VectorRd &)> 
 
  438                 return Eigen::Matrix2d::Zero();
 
 
  461                double coef = 12.*(1-pow(para.
nu,2))/ (para.
E * 4.*pow(
PI, 4));
 
 
  467                 double coef = 12.*(1-pow(para.
nu,2))/ (para.
E * 4.*pow(
PI, 4));
 
  468                 Eigen::Matrix2d H = Eigen::Matrix2d::Zero();
 
 
  476                  double coef = 12.*(1-pow(para.
nu,2))/ (para.
E * 4.*pow(
PI, 4));
 
  477                  return coef  * sin(
PI*
x(0))*sin(
PI*
x(1));
 
 
  482                return sin(
PI*
x(0))*sin(
PI*
x(1));
 
 
The BoundaryConditions class provides definition of boundary conditions.
Definition BoundaryConditions.hpp:45
 
const size_t n_dir_vertices() const
Returns the number of Dirichlet vertices.
Definition BoundaryConditions.hpp:75
 
const size_t n_dir_edges() const
Returns the number of Dirichlet edges.
Definition BoundaryConditions.hpp:70
 
Construct all polynomial spaces for the DDR sequence.
Definition ddrcore.hpp:63
 
Extended XCurl space, with vector-valued polynomials on the edges.
Definition excurl.hpp:19
 
Discrete H1 space: local operators, L2 product and global interpolator.
Definition xgrad.hpp:17
 
Create grid points x
Definition generate_cartesian_mesh.m:22
 
Eigen::Vector2d VectorRd
Definition basis.hpp:55
 
Eigen::Matrix2d MatrixRd
Definition basis.hpp:54
 
std::vector< size_t > globalDOFIndices(const Cell &T) const
Definition globaldofspace.cpp:98
 
size_t numLocalDofsVertex() const
Returns the number of local vertex DOFs.
Definition localdofspace.hpp:39
 
size_t dimensionCell(const Cell &T) const
Returns the dimension of the local space on the cell T (including faces, edges and vertices)
Definition localdofspace.hpp:112
 
size_t dimension() const
Returns the dimension of the global space (all DOFs for all geometric entities)
Definition localdofspace.hpp:61
 
size_t numLocalDofsEdge() const
Returns the number of local edge DOFs.
Definition localdofspace.hpp:45
 
static const double PI
Definition ddr-klplate.hpp:187
 
const double & stabilizationParameter() const
Returns the stabilization parameter.
Definition ddr-rmplate.hpp:199
 
std::function< Eigen::Vector2d(const RMParameters &, const Eigen::Vector2d &)> SolutionRotationType
Definition ddr-rmplate.hpp:89
 
double E
Definition ddr-rmplate.hpp:56
 
std::vector< size_t > globalDOFIndices(const Cell &T) const
Create the vector of DOF indices for cell T, which combines the DOFs for the spaces EXcurl and Xgrad.
Definition ddr-rmplate.hpp:138
 
static ReissnerMindlin::SolutionDisplacementType polynomial_u
Definition ddr-rmplate.hpp:327
 
static std::function< double(const VectorRd &)> an_V
Definition ddr-rmplate.hpp:375
 
std::function< Eigen::Matrix2d(const RMParameters &, const Eigen::Vector2d &)> GradientRotationType
Definition ddr-rmplate.hpp:90
 
static ReissnerMindlin::SolutionRotationType ukn_theta
Definition ddr-rmplate.hpp:432
 
static ReissnerMindlin::SolutionDisplacementType an_LAPL_v
Definition ddr-rmplate.hpp:410
 
static ReissnerMindlin::GradientRotationType ukn_grad_theta
Definition ddr-rmplate.hpp:437
 
static std::function< double(const VectorRd &)> an_LAPL_g
Definition ddr-rmplate.hpp:372
 
std::function< outValue(const Eigen::Vector2d &)> contractPara(const Fct &F) const
Takes a function dependent on RMParameter and a position x, and returns a function depending only on ...
Definition ddr-rmplate.hpp:215
 
static std::function< VectorRd(const VectorRd &)> an_GRAD_g
Definition ddr-rmplate.hpp:359
 
static ReissnerMindlin::GradientRotationType an_HESS_v
Definition ddr-rmplate.hpp:405
 
std::function< double(const RMParameters &, const Eigen::Vector2d &)> ForcingTermType
Definition ddr-rmplate.hpp:88
 
static ReissnerMindlin::SolutionRotationType polynomial_theta
Definition ddr-rmplate.hpp:308
 
static ReissnerMindlin::SolutionRotationType constant_theta
Definition ddr-rmplate.hpp:285
 
static ReissnerMindlin::ForcingTermType polynomial_f
Definition ddr-rmplate.hpp:340
 
static ReissnerMindlin::ForcingTermType kir_f
Definition ddr-rmplate.hpp:481
 
double nu
Definition ddr-rmplate.hpp:57
 
const EXCurl & exCurl() const
Returns the space EXCurl.
Definition ddr-rmplate.hpp:157
 
RMNorms computeNorms(const Eigen::VectorXd &v) const
Compute the discrete norms: rotation, displacement, Kirchoff term, and complete energy.
Definition ddr-rmplate.cpp:725
 
static ReissnerMindlin::ForcingTermType constant_f
Definition ddr-rmplate.hpp:300
 
const RMParameters & para() const
Returns the parameters.
Definition ddr-rmplate.hpp:151
 
Eigen::VectorXd & systemVector()
Returns the linear system right-hand side vector.
Definition ddr-rmplate.hpp:184
 
static ReissnerMindlin::SolutionDisplacementType kir_u
Definition ddr-rmplate.hpp:475
 
double displacement
Norm of displacement.
Definition ddr-rmplate.hpp:77
 
const SystemMatrixType & bdryMatrix() const
Returns the Matrix for BC.
Definition ddr-rmplate.hpp:189
 
std::function< double(const RMParameters &, const Eigen::Vector2d &)> SolutionDisplacementType
Definition ddr-rmplate.hpp:91
 
static std::function< double(const VectorRd &)> an_LAPL_V
Definition ddr-rmplate.hpp:391
 
const std::vector< std::pair< size_t, size_t > > & locUKN() const
Returns the location of the unknowns among the DOFs.
Definition ddr-rmplate.hpp:133
 
const Eigen::VectorXd & bdryValues() const
Returns the boundary values.
Definition ddr-rmplate.hpp:194
 
static std::function< MatrixRd(const VectorRd &)> an_HESS_g
Definition ddr-rmplate.hpp:364
 
static ReissnerMindlin::SolutionDisplacementType analytical_u
Definition ddr-rmplate.hpp:419
 
static ReissnerMindlin::GradientRotationType kir_grad_theta
Definition ddr-rmplate.hpp:466
 
size_t nb_bdryDOFs() const
Returns the nb of DOFs for BC.
Definition ddr-rmplate.hpp:119
 
double beta1
Definition ddr-rmplate.hpp:59
 
static ReissnerMindlin::GradientRotationType constant_grad_theta
Definition ddr-rmplate.hpp:290
 
const Eigen::VectorXd & systemVector() const
Returns the linear system right-hand side vector.
Definition ddr-rmplate.hpp:179
 
static std::function< MatrixRd(const VectorRd &)> an_HESS_V
Definition ddr-rmplate.hpp:383
 
static ReissnerMindlin::ForcingTermType analytical_f
Definition ddr-rmplate.hpp:424
 
Eigen::SparseMatrix< double > SystemMatrixType
Definition ddr-rmplate.hpp:86
 
const SystemMatrixType & systemMatrix() const
Returns the linear system matrix.
Definition ddr-rmplate.hpp:169
 
static ReissnerMindlin::GradientRotationType analytical_grad_theta
Definition ddr-rmplate.hpp:416
 
static ReissnerMindlin::SolutionDisplacementType ukn_u
Definition ddr-rmplate.hpp:442
 
static ReissnerMindlin::SolutionRotationType kir_theta
Definition ddr-rmplate.hpp:460
 
double kappa
Definition ddr-rmplate.hpp:60
 
void assembleLinearSystem(const ForcingTermType &f, const SolutionRotationType &theta, const GradientRotationType &grad_theta, const SolutionDisplacementType &u)
Assemble the global system
Definition ddr-rmplate.cpp:373
 
double t
Definition ddr-rmplate.hpp:55
 
static ReissnerMindlin::ForcingTermType ukn_f
Definition ddr-rmplate.hpp:447
 
static std::function< double(const VectorRd &)> an_g
Definition ddr-rmplate.hpp:356
 
RMNorms(double norm_rotation, double norm_displacement, double norm_kirchoff)
Constructor.
Definition ddr-rmplate.hpp:67
 
SystemMatrixType & systemMatrix()
Returns the linear system matrix.
Definition ddr-rmplate.hpp:174
 
static ReissnerMindlin::SolutionDisplacementType constant_u
Definition ddr-rmplate.hpp:295
 
const XGrad & xGrad() const
Returns the space XGrad.
Definition ddr-rmplate.hpp:163
 
size_t sizeSystem() const
Returns the size of the system without BC.
Definition ddr-rmplate.hpp:127
 
size_t dimensionSpace() const
Returns the dimension of the rotation + displacement space (with BC)
Definition ddr-rmplate.hpp:113
 
static ReissnerMindlin::SolutionRotationType analytical_theta
Definition ddr-rmplate.hpp:414
 
static ReissnerMindlin::SolutionRotationType an_GRAD_v
Definition ddr-rmplate.hpp:400
 
double beta0
Definition ddr-rmplate.hpp:58
 
double kirchoff
Norm of kirchoff term.
Definition ddr-rmplate.hpp:78
 
static ReissnerMindlin::GradientRotationType polynomial_grad_theta
Definition ddr-rmplate.hpp:316
 
static std::function< VectorRd(const VectorRd &)> an_GRAD_V
Definition ddr-rmplate.hpp:378
 
double rotation
Norm of rotation.
Definition ddr-rmplate.hpp:76
 
RMParameters(const double thickness, const double young_modulus, const double poisson_ratio)
Constructor.
Definition ddr-rmplate.hpp:41
 
double & stabilizationParameter()
Returns the stabilization parameter.
Definition ddr-rmplate.hpp:204
 
double energy
Total energy.
Definition ddr-rmplate.hpp:79
 
static ReissnerMindlin::SolutionDisplacementType an_v
Definition ddr-rmplate.hpp:395
 
bool use_threads
Definition HHO_DiffAdvecReac.hpp:47
 
if(strcmp(field, 'real')) % real valued entries T
Definition mmread.m:93
 
Definition ddr-klplate.hpp:27
 
static auto v
Definition ddrcore-test.hpp:32
 
Structure to store component norms (for rotation, displacement, Kirchoff term and total energy)
Definition ddr-rmplate.hpp:65
 
Structure to store model data.
Definition ddr-rmplate.hpp:39
 
Assemble a RM problem.
Definition ddr-rmplate.hpp:85