HArD::Core2D
Hybrid Arbitrary Degree::Core 2D - Library to implement 2D schemes with edge and cell polynomials as unknowns
Loading...
Searching...
No Matches
bgg-rmplate.hpp
Go to the documentation of this file.
1// Implementation of the discrete de Rham sequence for the Reissner-Mindlin plate problem.
2//
3// Author: Arax Leroy (arax.leroy@umontpellier.fr)
4//
5
6#ifndef BGG_RMPLATE_HPP
7#define BGG_RMPLATE_HPP
8
9#include <iostream>
10
11#include <boost/math/constants/constants.hpp>
12
13#include <Eigen/Sparse>
14#include <unsupported/Eigen/SparseExtra>
15
16#include <mesh.hpp>
17#include <BoundaryConditions/BoundaryConditions.hpp> // To re-order the boundary edges and vertices
19
20#include <vsxcurl.hpp>
21#include <vsxgrad.hpp>
22#include <xhess_full.hpp>
23
29namespace HArDCore2D
30{
31
39 {
41 RMParameters( const double thickness,
42 const double young_modulus,
43 const double poisson_ratio
44 ):
45 t(thickness),
46 E(young_modulus),
47 nu(poisson_ratio)
48 {
49 // Compute derived quantities
50 beta0 = E/(12*(1.+nu));
51 beta1 = E*nu/(12*(1.-std::pow(nu,2)));
52 kappa = 5*E/(12*(1.+nu));
53 }
54
55 double t; // plate thickness
56 double E; // Young modulus
57 double nu; // Poisson ratio
58 double beta0;
59 double beta1;
60 double kappa;
61 };
62
64 struct RMNorms
65 {
67 RMNorms(double norm_rotation, double norm_displacement, double norm_kirchoff):
68 rotation(norm_rotation),
69 displacement(norm_displacement),
70 kirchoff(norm_kirchoff),
71 energy(std::sqrt( std::pow(norm_rotation, 2)+std::pow(norm_displacement, 2)+std::pow(norm_kirchoff, 2) ) )
72 {
73 // do nothing
74 };
75
76 double rotation;
77 double displacement;
78 double kirchoff;
79 double energy;
80
81 };
82
85 {
86 typedef Eigen::SparseMatrix<double> SystemMatrixType;
87
88 typedef std::function<double(const RMParameters &, const Eigen::Vector2d &)> ForcingTermType;
89 typedef std::function<Eigen::Vector2d(const RMParameters &, const Eigen::Vector2d &)> SolutionRotationType;
90 typedef std::function<Eigen::Matrix2d(const RMParameters &, const Eigen::Vector2d &)> GradientRotationType;
91 typedef std::function<double(const RMParameters &, const Eigen::Vector2d &)> SolutionDisplacementType;
92 typedef std::function<Eigen::Vector2d(const RMParameters&, const Eigen::Vector2d&)> GradientDisplacementType;
93
94
97 const DDRCore & ddrcore,
98 const DDRCore & ddrcore_plus,
99 const SerendipityProblem & sp,
100 const SerendipityProblem & sp_plus,
101 const RMParameters & para,
102 const BoundaryConditions & BC_theta,
103 const BoundaryConditions & BC_u,
104 bool use_threads,
105 std::ostream & output = std::cout
106 );
107
110 const ForcingTermType & f,
111 const SolutionRotationType & theta,
112 const GradientRotationType & grad_theta,
113 const SolutionDisplacementType & u,
114 const GradientDisplacementType & grad_u
115 );
116
117
119 inline size_t dimensionSpace() const
120 {
121 return m_vsxgrad.dimension() + m_xhess.dimension();
122 }
123
125 inline size_t nb_bdryDOFs() const
126 {
127 return m_BC_theta.n_dir_edges() * m_vsxgrad.numLocalDofsEdge(0)
128 + m_BC_theta.n_dir_vertices() * m_vsxgrad.numLocalDofsVertex(0)
129 + m_BC_u.n_dir_edges() * (m_xhess.numLocalDofsEdge() - m_ddrcore.edgeBases(0).Polyk->dimension())
130 + m_BC_u.n_dir_vertices() * (m_xhess.numLocalDofsVertex()-2);
131 }
132
134 inline size_t sizeSystem() const
135 {
136 return dimensionSpace() - nb_bdryDOFs();
137 }
138
140inline const std::vector<std::pair<size_t,size_t>> & locUKN() const {
141 return m_locUKN;
142}
143
145inline const Eigen::VectorXi & DOFtoUKN() const {
146 return m_DOFtoUKN;
147}
148
150inline const BoundaryConditions & BC_u() const {
151 return m_BC_u;
152}
153
155std::vector<size_t> globalDOFIndices(const Cell &T) const
156{
157 std::vector<size_t> I_vsxgrad_T = m_vsxgrad.globalDOFIndices(T);
158 std::vector<size_t> I_xhess_T = m_xhess.globalDOFIndices(T);
159 size_t dim_T = m_vsxgrad.dimensionCell(T.global_index()) + m_xhess.dimensionCell(T.global_index());
160 std::vector<size_t> I_T(dim_T);
161 size_t dim_vsxgrad = m_vsxgrad.dimension();
162 auto it_I_T = std::copy(I_vsxgrad_T.begin(), I_vsxgrad_T.end(), I_T.begin());
163 std::transform(I_xhess_T.begin(), I_xhess_T.end(), it_I_T, [&dim_vsxgrad](const size_t & index) { return index + dim_vsxgrad; });
164 return I_T;
165 }
166
168 inline const RMParameters & para() const
169 {
170 return m_para;
171 }
172
174 inline const VSXGrad & vsxGrad() const
175 {
176 return m_vsxgrad;
177 }
178
180 inline const VSXCurl & vsxCurl() const
181 {
182 return m_vsxcurl;
183 }
184
185
187 inline const XHessFull & xHess() const
188 {
189 return m_xhess;
190 }
191
193 inline const SystemMatrixType & systemMatrix() const {
194 return m_A;
195 }
196
199 return m_A;
200 }
201
203 inline const Eigen::VectorXd & systemVector() const {
204 return m_b;
205 }
206
208 inline Eigen::VectorXd & systemVector() {
209 return m_b;
210 }
211
213 inline const SystemMatrixType & bdryMatrix() const {
214 return m_bdryMatrix;
215 }
216
218 inline const Eigen::VectorXd & bdryValues() const {
219 return m_bdryValues;
220 }
221
223 inline const double & stabilizationParameter() const {
224 return m_stab_par;
225 }
226
228 inline double & stabilizationParameter() {
229 return m_stab_par;
230 }
231
234 const Eigen::VectorXd & v
235 ) const;
236
238 template<typename outValue, typename Fct>
239 std::function<outValue(const Eigen::Vector2d &)> contractPara(const Fct &F) const
240 {
241 std::function<outValue(const Eigen::Vector2d &)> f = [this, &F](const Eigen::Vector2d &x)->outValue { return F(m_para,x);};
242 return f;
243 }
244
245
246 private:
248 std::pair<Eigen::MatrixXd, Eigen::VectorXd>
249 _compute_local_contribution(
250 size_t iT,
251 const GradientRotationType & grad_theta,
252 const ForcingTermType & f
253 );
254
255
257
259 void _assemble_local_contribution(
260 size_t iT,
261 const std::pair<Eigen::MatrixXd, Eigen::VectorXd> & lsT,
262 std::list<Eigen::Triplet<double> > & A1,
263 Eigen::VectorXd & b1,
264 std::list<Eigen::Triplet<double> > & A2
265 );
266 const DDRCore & m_ddrcore;
267 const RMParameters m_para;
268 bool m_use_threads;
269 std::ostream & m_output;
270 VSXGrad m_vsxgrad;
271 VSXCurl m_vsxcurl;
272 XHessFull m_xhess;
273 BoundaryConditions m_BC_theta;
274 BoundaryConditions m_BC_u;
275 SystemMatrixType m_bdryMatrix; // Matrix with columns corresponding to Dirichlet DOFs; multiplied by the boundary values, yields the modification to the system RHS for non-homogeneous BC
276 Eigen::VectorXd m_bdryValues; // Boundary values
277 SystemMatrixType m_A; // Matrix and RHS for system (after removing Dirichlet DOFs)
278 Eigen::VectorXd m_b;
279 double m_stab_par;
280 std::vector<std::pair<size_t,size_t>> m_locUKN; // Indicates the location, among the DOFs, of the unknowns after the Dirichlet DOFs are removed (the unknowns are between m_locUCK[i].first and m_locUCK[i].first+m_locUKN[i].second for all i)
281 Eigen::VectorXi m_DOFtoUKN; // Maps a dof i to its unknown in the system without BC, or to -1 if the DOF is a Dirichlet DOF
282 };
283
284 //------------------------------------------------------------------------------
285 // Exact solutions
286 //------------------------------------------------------------------------------
287
288 static const double PI = boost::math::constants::pi<double>();
289 using std::sin;
290 using std::cos;
291 using std::exp;
292 using std::pow;
293
294 //------------------------------------------------------------------------------
295 // Constant
296//------------------------------------------------------------------------------
297// Test complex: u = x^2 / 2, grad_u = (x,0)
298//------------------------------------------------------------------------------
300constant_theta = [](const RMParameters &, const VectorRd &) -> VectorRd {
301 return VectorRd(1, 0.);
302};
303
305constant_grad_theta = [](const RMParameters &, const VectorRd &) -> Eigen::Matrix2d {
306 return Eigen::Matrix2d::Zero();
307};
308
310constant_u = [](const RMParameters &, const VectorRd & x) -> double {
311 return x(0);
312};
313
316 VectorRd g;
317 g.setZero();
318 g(0) = 1.0;
319 return g;
320};
321
323constant_f = [](const RMParameters &, const VectorRd &) -> double {
324 return 0.0;
325};
326 //------------------------------------------------------------------------------
327 // Polynomial
328
330polynomial_theta = [](const RMParameters & para, const VectorRd & x) -> VectorRd {
331 return VectorRd(
332 pow(x(1),3)*pow(x(1)-1,3)*pow(x(0),2)*pow(x(0)-1,2)*(2*x(0)-1),
333 pow(x(0),3)*pow(x(0)-1,3)*pow(x(1),2)*pow(x(1)-1,2)*(2*x(1)-1)
334 );
335 };
336
338polynomial_grad_theta = [](const RMParameters & para, const VectorRd & x) -> Eigen::Matrix2d {
339 const double x0 = x(0);
340 const double x1 = x(1);
341
342 // theta_0 = A(x0) B(x1)
343 const double A =
344 std::pow(x0, 2) * std::pow(x0 - 1.0, 2) * (2.0 * x0 - 1.0);
345
346 const double dA =
347 2.0 * x0 * std::pow(x0 - 1.0, 2) * (2.0 * x0 - 1.0)
348 + std::pow(x0, 2) * 2.0 * (x0 - 1.0) * (2.0 * x0 - 1.0)
349 + std::pow(x0, 2) * std::pow(x0 - 1.0, 2) * 2.0;
350
351 const double B =
352 std::pow(x1, 3) * std::pow(x1 - 1.0, 3);
353
354 const double dB =
355 3.0 * std::pow(x1, 2) * std::pow(x1 - 1.0, 3)
356 + 3.0 * std::pow(x1, 3) * std::pow(x1 - 1.0, 2);
357
358 // theta_1 = C(x0) D(x1)
359 const double C =
360 std::pow(x0, 3) * std::pow(x0 - 1.0, 3);
361
362 const double dC =
363 3.0 * std::pow(x0, 2) * std::pow(x0 - 1.0, 3)
364 + 3.0 * std::pow(x0, 3) * std::pow(x0 - 1.0, 2);
365
366 const double D =
367 std::pow(x1, 2) * std::pow(x1 - 1.0, 2) * (2.0 * x1 - 1.0);
368
369 const double dD =
370 2.0 * x1 * std::pow(x1 - 1.0, 2) * (2.0 * x1 - 1.0)
371 + std::pow(x1, 2) * 2.0 * (x1 - 1.0) * (2.0 * x1 - 1.0)
372 + std::pow(x1, 2) * std::pow(x1 - 1.0, 2) * 2.0;
373
374 Eigen::Matrix2d G = Eigen::Matrix2d::Zero();
375
376 G(0,0) = dA * B; // d theta_0 / dx
377 G(0,1) = A * dB; // d theta_0 / dy
378 G(1,0) = dC * D; // d theta_1 / dx
379 G(1,1) = C * dD; // d theta_1 / dy
380
381 return G;
382};
383
385 polynomial_u = [](const RMParameters & para, const VectorRd & x) -> double {
386 double val = 0;
387
388 val += (1./3.)*pow(x(0),3)*pow(x(0)-1,3)*pow(x(1),3)*pow(x(1)-1,3);
389
390 val -= ( 2*pow(para.t,2) / (5*(1.-para.nu)) ) *
391 ( pow(x(1),3)*pow(x(1)-1,3)*x(0)*(x(0)-1)*(5*x(0)*x(0)-5*x(0)+1)
392 + pow(x(0),3)*pow(x(0)-1,3)*x(1)*(x(1)-1)*(5*x(1)*x(1)-5*x(1)+1) );
393
394 return val;
395 };
396
398 polynomial_f = [](const RMParameters & para, const VectorRd & x) -> double {
399 double val = 0;
400
401 val += 12*x(1)*(x(1)-1)*(5*x(0)*x(0)-5*x(0)+1) *
402 ( 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) );
403 val += 12*x(0)*(x(0)-1)*(5*x(1)*x(1)-5*x(1)+1) *
404 ( 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) );
405
406 return val * para.E / (12* (1.-para.nu*para.nu) );
407 };
408
410polynomial_grad_u = [](const RMParameters & para, const VectorRd & x) -> VectorRd
411{
412 const double t2 = para.t * para.t;
413 const double c = 2.0 * t2 / (5.0 * (1.0 - para.nu));
414
415 const double x0 = x(0);
416 const double x1 = x(1);
417
418 const double P0 = pow(x0,3) * pow(x0 - 1.0,3);
419 const double P1 = pow(x1,3) * pow(x1 - 1.0,3);
420
421 const double dP0 =
422 3.0 * pow(x0,2) * pow(x0 - 1.0,3)
423 + 3.0 * pow(x0,3) * pow(x0 - 1.0,2);
424
425 const double dP1 =
426 3.0 * pow(x1,2) * pow(x1 - 1.0,3)
427 + 3.0 * pow(x1,3) * pow(x1 - 1.0,2);
428
429 const double Q0 = x0 * (x0 - 1.0) * (5.0*x0*x0 - 5.0*x0 + 1.0);
430 const double Q1 = x1 * (x1 - 1.0) * (5.0*x1*x1 - 5.0*x1 + 1.0);
431
432 const double dQ0 =
433 (x0 - 1.0) * (5.0*x0*x0 - 5.0*x0 + 1.0)
434 + x0 * (5.0*x0*x0 - 5.0*x0 + 1.0)
435 + x0 * (x0 - 1.0) * (10.0*x0 - 5.0);
436
437 const double dQ1 =
438 (x1 - 1.0) * (5.0*x1*x1 - 5.0*x1 + 1.0)
439 + x1 * (5.0*x1*x1 - 5.0*x1 + 1.0)
440 + x1 * (x1 - 1.0) * (10.0*x1 - 5.0);
441
442 VectorRd g;
443 g.setZero();
444
445 // d/dx0
446 g(0) =
447 (1.0 / 3.0) * dP0 * P1
448 - c * ( P1 * dQ0 + dP0 * Q1 );
449
450 // d/dx1
451 g(1) =
452 (1.0 / 3.0) * P0 * dP1
453 - c * ( dP1 * Q0 + P0 * dQ1 );
454
455 return g;
456};
457 //------------------------------------------------------------------------------
458 // Analytical solution (see paper)
459 // (BC are not zero here)
460
461 static std::function<double(const VectorRd &)>
462 an_g = [](const VectorRd &x)->double { return sin(PI*x(0))*sin(PI*x(1)); };
463
464 static std::function<VectorRd(const VectorRd &)>
465 an_GRAD_g = [](const VectorRd & x) -> VectorRd {
466 return VectorRd( PI*cos(PI*x(0))*sin(PI*x(1)), PI*sin(PI*x(0))*cos(PI*x(1)) );
467 };
468
469 static std::function<MatrixRd(const VectorRd &)>
470 an_HESS_g = [](const VectorRd & x) -> MatrixRd {
471 MatrixRd H = MatrixRd::Zero();
472 H.row(0) << -PI*PI*sin(PI*x(0))*sin(PI*x(1)), PI*PI*cos(PI*x(0))*cos(PI*x(1));
473 H.row(1) << PI*PI*cos(PI*x(0))*cos(PI*x(1)), -PI*PI*sin(PI*x(0))*sin(PI*x(1));
474 return H;
475 };
476
477 static std::function<double(const VectorRd &)>
478 an_LAPL_g = [](const VectorRd &x)->double { return -2*pow(PI,2)*sin(PI*x(0))*sin(PI*x(1)); };
479
480 static std::function<double(const VectorRd &)>
481 an_V = [](const VectorRd &x)->double { return x(0) * exp(-x(0))*cos(x(1)); };
482
483 static std::function<VectorRd(const VectorRd &)>
484 an_GRAD_V = [](const VectorRd & x) -> VectorRd {
485 return VectorRd((1.-x(0))*exp(-x(0))*cos(x(1)), -x(0)*exp(-x(0))*sin(x(1)));
486 };
487
488 static std::function<MatrixRd(const VectorRd &)>
489 an_HESS_V = [](const VectorRd & x) -> MatrixRd {
490 MatrixRd H = MatrixRd::Zero();
491 H.row(0) << (x(0)-2.)*exp(-x(0))*cos(x(1)), -(1.-x(0))*exp(-x(0))*sin(x(1));
492 H.row(1) << -(1.-x(0))*exp(-x(0))*sin(x(1)), -x(0)*exp(-x(0))*cos(x(1));
493 return H;
494 };
495
496 static std::function<double(const VectorRd &)>
497 an_LAPL_V = [](const VectorRd &x)->double { return -2.* exp(-x(0))*cos(x(1)); };
498
499
501 an_v = [](const RMParameters & para, const VectorRd & x) -> double {
502 return pow(para.t,3) * an_V(x/para.t) + an_g(x);
503 };
504
506 an_GRAD_v = [](const RMParameters & para, const VectorRd & x) -> VectorRd {
507 return pow(para.t, 2) * an_GRAD_V(x/para.t) + an_GRAD_g(x);
508 };
509
511 an_HESS_v = [](const RMParameters & para, const VectorRd & x) -> MatrixRd {
512 return para.t * an_HESS_V(x/para.t) + an_HESS_g(x);
513 };
514
516 an_LAPL_v = [](const RMParameters & para, const VectorRd & x) -> double {
517 return para.t * (an_LAPL_V)(x/para.t) + an_LAPL_g(x);
518 };
519
521
523
525 analytical_u = [](const RMParameters & para, const VectorRd & x) -> double {
526 return an_v(para, x) - pow(para.t,2) * ( (para.beta0+para.beta1)/para.kappa ) * an_LAPL_v(para, x);
527 };
528
530 analytical_f = [](const RMParameters & para, const VectorRd & x) -> double {
531 return (para.beta0+para.beta1) * 4 * pow(PI,4)*sin(PI*x(0))*sin(PI*x(1));
532 };
533
534 // ajout
535 static std::function<VectorRd(const VectorRd &)>
537 return VectorRd(
538 -2.0 * pow(PI,3) * cos(PI*x(0)) * sin(PI*x(1)),
539 -2.0 * pow(PI,3) * sin(PI*x(0)) * cos(PI*x(1))
540 );
541};
542
543static std::function<VectorRd(const VectorRd &)>
545 return VectorRd(
546 2.0 * exp(-x(0)) * cos(x(1)),
547 2.0 * exp(-x(0)) * sin(x(1))
548 );
549};
550
552an_GRAD_LAPL_v = [](const RMParameters & para, const VectorRd & x) -> VectorRd {
553 return an_GRAD_LAPL_V(x/para.t) + an_GRAD_LAPL_g(x);
554};
555
556
558analytical_grad_u = [](const RMParameters & para, const VectorRd & x) -> VectorRd {
559 return an_GRAD_v(para, x)
560 - pow(para.t, 2) * ((para.beta0 + para.beta1) / para.kappa)
561 * an_GRAD_LAPL_v(para, x);
562};
563
564
565
566 //------------------------------------------------------------------------------
567 // Unkown exact solution, just useful to fix BC and load and plot the approximation solution
568
570 ukn_theta = [](const RMParameters & para, const VectorRd & x) -> VectorRd {
571 return VectorRd(0., 0.);
572 };
573
575 ukn_grad_theta = [](const RMParameters & para, const VectorRd & x) -> Eigen::Matrix2d {
576 return Eigen::Matrix2d::Zero();
577 };
578
580 ukn_u = [](const RMParameters & para, const VectorRd & x) -> double {
581 return x(0);
582 };
583
585 ukn_grad_u = [](const RMParameters & /*para*/, const VectorRd & /*x*/) -> VectorRd {
586 VectorRd grad = VectorRd::Zero();
587 grad(0) = 1.0;
588 return grad;
589 };
590
592 ukn_f = [](const RMParameters & para, const VectorRd & x) -> double {
593 double val = 1.;
594 if (x(0)<.5){
595 val = -1.;
596 }
597 return val;
598 };
599
600 //------------------------------------------------------------------------------
601 // Kirchoff limit: solution of E/(12(1-nu^2)) Delta^2 u = g
602 // Useful to evaluate convergence as t->0
603
605 kir_theta = [](const RMParameters & para, const VectorRd & x) -> VectorRd {
606 double coef = 12.*(1-pow(para.nu,2))/ (para.E * 4.*pow(PI, 4));
607 return coef * PI * VectorRd(cos(PI*x(0))*sin(PI*x(1)), sin(PI*x(0))*cos(PI*x(1)));
608 };
609
611 kir_grad_theta = [](const RMParameters & para, const VectorRd & x) -> Eigen::Matrix2d {
612 double coef = 12.*(1-pow(para.nu,2))/ (para.E * 4.*pow(PI, 4));
613 Eigen::Matrix2d H = Eigen::Matrix2d::Zero();
614 H.row(0) << -PI*PI*sin(PI*x(0))*sin(PI*x(1)), PI*PI*cos(PI*x(0))*cos(PI*x(1));
615 H.row(1) << PI*PI*cos(PI*x(0))*cos(PI*x(1)), -PI*PI*sin(PI*x(0))*sin(PI*x(1));
616 return coef * H;
617 };
618
620 kir_u = [](const RMParameters & para, const VectorRd & x) -> double {
621 double coef = 12.*(1-pow(para.nu,2))/ (para.E * 4.*pow(PI, 4));
622 return coef * sin(PI*x(0))*sin(PI*x(1));
623 };
625kir_grad_u = [](const RMParameters & para, const VectorRd & x) -> VectorRd {
626 double coef = 12. * (1 - pow(para.nu, 2)) / (para.E * 4. * pow(PI, 4));
627 VectorRd grad = VectorRd::Zero();
628 grad(0) = coef * PI * cos(PI * x(0)) * sin(PI * x(1));
629 grad(1) = coef * PI * sin(PI * x(0)) * cos(PI * x(1));
630 return grad;
631 };
632
634 kir_f = [](const RMParameters & para, const VectorRd & x) -> double {
635 return sin(PI*x(0))*sin(PI*x(1));
636 };
637
638
639} // end of namespace HArDCore2D
640
641#endif
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
Construct all polynomial spaces for the DDR sequence.
Definition serendipity_problem.hpp:20
Definition vsxcurl.hpp:11
Vector version of sXgrad, the arbitrary order space with nodal primal unknowns.
Definition vsxgrad.hpp:33
Discrete H2 space: local operators, L2 product and global interpolator.
Definition xhess_full.hpp:21
Create grid points x
Definition generate_cartesian_mesh.m:22
const double & stabilizationParameter() const
Returns the stabilization parameter.
Definition bgg-rmplate.hpp:223
std::function< Eigen::Vector2d(const RMParameters &, const Eigen::Vector2d &)> SolutionRotationType
Definition bgg-rmplate.hpp:89
double E
Definition bgg-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 VSXgrad and Xhess...
Definition bgg-rmplate.hpp:155
static std::function< double(const VectorRd &)> an_V
Definition bgg-rmplate.hpp:481
std::function< Eigen::Matrix2d(const RMParameters &, const Eigen::Vector2d &)> GradientRotationType
Definition bgg-rmplate.hpp:90
static ReissnerMindlin::SolutionRotationType ukn_theta
Definition bgg-rmplate.hpp:570
static ReissnerMindlin::SolutionDisplacementType an_LAPL_v
Definition bgg-rmplate.hpp:516
static ReissnerMindlin::GradientRotationType ukn_grad_theta
Definition bgg-rmplate.hpp:575
static ReissnerMindlin::SolutionRotationType an_GRAD_LAPL_v
Definition bgg-rmplate.hpp:552
static std::function< double(const VectorRd &)> an_LAPL_g
Definition bgg-rmplate.hpp:478
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 bgg-rmplate.hpp:239
static std::function< VectorRd(const VectorRd &)> an_GRAD_g
Definition bgg-rmplate.hpp:465
static ReissnerMindlin::GradientRotationType an_HESS_v
Definition bgg-rmplate.hpp:511
std::function< double(const RMParameters &, const Eigen::Vector2d &)> ForcingTermType
Definition bgg-rmplate.hpp:88
static ReissnerMindlin::SolutionRotationType polynomial_theta
Definition bgg-rmplate.hpp:330
std::function< Eigen::Vector2d(const RMParameters &, const Eigen::Vector2d &)> GradientDisplacementType
Definition bgg-rmplate.hpp:92
static ReissnerMindlin::SolutionRotationType constant_theta
Definition bgg-rmplate.hpp:300
static KirchhoffLove::SolutionDisplacementType constant_u
Definition bgg-klplate.hpp:223
static ReissnerMindlin::ForcingTermType kir_f
Definition bgg-rmplate.hpp:634
double nu
Definition bgg-rmplate.hpp:57
RMNorms computeNorms(const Eigen::VectorXd &v) const
Compute the discrete norms: rotation, displacement, Kirchoff term, and complete energy.
Definition bgg-rmplate.cpp:610
const RMParameters & para() const
Returns the parameters.
Definition bgg-rmplate.hpp:168
Eigen::VectorXd & systemVector()
Returns the linear system right-hand side vector.
Definition bgg-rmplate.hpp:208
static ReissnerMindlin::SolutionDisplacementType kir_u
Definition bgg-rmplate.hpp:620
static KirchhoffLove::GradientDisplacementType polynomial_grad_u
Definition bgg-klplate.hpp:246
double displacement
Norm of displacement.
Definition bgg-rmplate.hpp:77
const SystemMatrixType & bdryMatrix() const
Returns the Matrix for BC.
Definition bgg-rmplate.hpp:213
std::function< double(const RMParameters &, const Eigen::Vector2d &)> SolutionDisplacementType
Definition bgg-rmplate.hpp:91
const BoundaryConditions & BC_u() const
Returns the boundary conditions for u.
Definition bgg-rmplate.hpp:150
static std::function< double(const VectorRd &)> an_LAPL_V
Definition bgg-rmplate.hpp:497
static ReissnerMindlin::GradientDisplacementType ukn_grad_u
Definition bgg-rmplate.hpp:585
const Eigen::VectorXi & DOFtoUKN() const
Returns the map from global DOFs to system unknowns.
Definition bgg-rmplate.hpp:145
const std::vector< std::pair< size_t, size_t > > & locUKN() const
Returns the location of the unknowns among the DOFs.
Definition bgg-rmplate.hpp:140
const Eigen::VectorXd & bdryValues() const
Returns the boundary values.
Definition bgg-rmplate.hpp:218
static std::function< MatrixRd(const VectorRd &)> an_HESS_g
Definition bgg-rmplate.hpp:470
static const double PI
Definition bgg-klplate.hpp:214
static ReissnerMindlin::SolutionDisplacementType analytical_u
Definition bgg-rmplate.hpp:525
static ReissnerMindlin::GradientRotationType kir_grad_theta
Definition bgg-rmplate.hpp:611
size_t nb_bdryDOFs() const
Returns the nb of DOFs for BC.
Definition bgg-rmplate.hpp:125
double beta1
Definition bgg-rmplate.hpp:59
static ReissnerMindlin::GradientRotationType constant_grad_theta
Definition bgg-rmplate.hpp:305
const Eigen::VectorXd & systemVector() const
Returns the linear system right-hand side vector.
Definition bgg-rmplate.hpp:203
const VSXCurl & vsxCurl() const
Returns the space VSXCurl.
Definition bgg-rmplate.hpp:180
static std::function< MatrixRd(const VectorRd &)> an_HESS_V
Definition bgg-rmplate.hpp:489
static ReissnerMindlin::ForcingTermType analytical_f
Definition bgg-rmplate.hpp:530
const XHessFull & xHess() const
Returns the space XHess.
Definition bgg-rmplate.hpp:187
Eigen::SparseMatrix< double > SystemMatrixType
Definition bgg-rmplate.hpp:86
static KirchhoffLove::ForcingTermType constant_f
Definition bgg-klplate.hpp:233
const SystemMatrixType & systemMatrix() const
Returns the linear system matrix.
Definition bgg-rmplate.hpp:193
static ReissnerMindlin::GradientRotationType analytical_grad_theta
Definition bgg-rmplate.hpp:522
static ReissnerMindlin::SolutionDisplacementType ukn_u
Definition bgg-rmplate.hpp:580
void assembleLinearSystem(const ForcingTermType &f, const SolutionRotationType &theta, const GradientRotationType &grad_theta, const SolutionDisplacementType &u, const GradientDisplacementType &grad_u)
Assemble the global system
Definition bgg-rmplate.cpp:421
static KirchhoffLove::ForcingTermType polynomial_f
Definition bgg-klplate.hpp:254
static ReissnerMindlin::SolutionRotationType kir_theta
Definition bgg-rmplate.hpp:605
double kappa
Definition bgg-rmplate.hpp:60
double t
Definition bgg-rmplate.hpp:55
static std::function< VectorRd(const VectorRd &)> an_GRAD_LAPL_g
Definition bgg-rmplate.hpp:536
static ReissnerMindlin::GradientDisplacementType analytical_grad_u
Definition bgg-rmplate.hpp:558
static ReissnerMindlin::ForcingTermType ukn_f
Definition bgg-rmplate.hpp:592
static std::function< double(const VectorRd &)> an_g
Definition bgg-rmplate.hpp:462
RMNorms(double norm_rotation, double norm_displacement, double norm_kirchoff)
Constructor.
Definition bgg-rmplate.hpp:67
static KirchhoffLove::GradientDisplacementType constant_grad_u
Definition bgg-klplate.hpp:228
SystemMatrixType & systemMatrix()
Returns the linear system matrix.
Definition bgg-rmplate.hpp:198
size_t sizeSystem() const
Returns the size of the system without BC.
Definition bgg-rmplate.hpp:134
size_t dimensionSpace() const
Returns the dimension of the rotation + displacement space (with BC)
Definition bgg-rmplate.hpp:119
static ReissnerMindlin::SolutionRotationType analytical_theta
Definition bgg-rmplate.hpp:520
static std::function< VectorRd(const VectorRd &)> an_GRAD_LAPL_V
Definition bgg-rmplate.hpp:544
static ReissnerMindlin::SolutionRotationType an_GRAD_v
Definition bgg-rmplate.hpp:506
static ReissnerMindlin::GradientDisplacementType kir_grad_u
Definition bgg-rmplate.hpp:625
double beta0
Definition bgg-rmplate.hpp:58
double kirchoff
Norm of kirchoff term.
Definition bgg-rmplate.hpp:78
static KirchhoffLove::SolutionDisplacementType polynomial_u
Definition bgg-klplate.hpp:241
static ReissnerMindlin::GradientRotationType polynomial_grad_theta
Definition bgg-rmplate.hpp:338
static std::function< VectorRd(const VectorRd &)> an_GRAD_V
Definition bgg-rmplate.hpp:484
double rotation
Norm of rotation.
Definition bgg-rmplate.hpp:76
const VSXGrad & vsxGrad() const
Returns the space VSXGrad.
Definition bgg-rmplate.hpp:174
RMParameters(const double thickness, const double young_modulus, const double poisson_ratio)
Constructor.
Definition bgg-rmplate.hpp:41
double & stabilizationParameter()
Returns the stabilization parameter.
Definition bgg-rmplate.hpp:228
double energy
Total energy.
Definition bgg-rmplate.hpp:79
static ReissnerMindlin::SolutionDisplacementType an_v
Definition bgg-rmplate.hpp:501
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 dimension() const
Returns the dimension of the global space (all DOFs for all geometric entities)
Definition variabledofspace.hpp:129
size_t numLocalDofsEdge(const size_t iE) const
Returns the number of local DOFs on edge of index iE.
Definition variabledofspace.hpp:77
std::vector< size_t > globalDOFIndices(const Cell &T) const
Returns a vector listing the global DOFs attached to the element T: vertex DOFs, edge DOFs,...
Definition variabledofspace.cpp:149
size_t dimensionCell(const Cell &T) const
Returns the dimension of the local space on the cell T (including faces, edges and vertices)
Definition variabledofspace.hpp:165
size_t numLocalDofsVertex() const
Returns the number of local vertex DOFs.
Definition localdofspace.hpp:39
size_t numLocalDofsVertex(const size_t iV) const
Returns the number of local DOFs on vertex of index iV.
Definition variabledofspace.hpp:64
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
const EdgeBases & edgeBases(size_t iE) const
Return edge bases for edge iE.
Definition ddrcore.hpp:136
std::unique_ptr< PolyBasisEdgeType > Polyk
Definition ddrcore.hpp:108
bool use_threads
Definition HHO_DiffAdvecReac.hpp:45
A
Definition mmread.m:102
if(strcmp(field, 'real')) % real valued entries T
Definition mmread.m:93
Definition mhd-solutions.hpp:9
static auto v
Definition ddrcore-test.hpp:32
Structure to store component norms (for rotation, displacement, Kirchoff term and total energy)
Definition bgg-rmplate.hpp:65
Structure to store model data.
Definition bgg-rmplate.hpp:39
Assemble a RM problem.
Definition bgg-rmplate.hpp:85