1#ifndef SDDR_YANGMILLS_HPP
2#define SDDR_YANGMILLS_HPP
6#include <boost/math/constants/constants.hpp>
9#include <unsupported/Eigen/SparseExtra>
61 typedef std::function<Eigen::Vector3d(
const double &,
const Eigen::Vector3d &)>
TForcingTermType;
62 typedef std::function<Eigen::Vector3d(
const double &,
const Eigen::Vector3d &)>
TElectricFieldType;
63 typedef std::function<Eigen::Vector3d(
const double &,
const Eigen::Vector3d &)>
TMagneticFieldType;
80 std::ostream &
output = std::cout
92 const Eigen::VectorXd &
E_i,
93 const Eigen::VectorXd &
A_i,
100 const Eigen::VectorXd &
E_i,
101 const Eigen::VectorXd &
A_i,
109 const Eigen::VectorXd &
v,
110 const Eigen::VectorXd & u
115 const Eigen::VectorXd &
E_i,
116 const Eigen::VectorXd &
A_i,
129 const Eigen::MatrixXd &
Ah,
137 std::vector<Eigen::MatrixXd>
epsBkt_v(
size_t iT,
139 const std::vector<Eigen::VectorXd> &
vec_list
143 std::vector<Eigen::MatrixXd>
L2v_Bkt(
size_t iT,
145 const std::vector<Eigen::VectorXd> &
vec_list,
154 const std::vector<Eigen::VectorXd> &
v_L2prod
166 return m_nloc_sc_E.sum();
172 return m_nloc_sc_lambda.sum();
291 const std::vector<Eigen::VectorXd> &
list_dofs
295 template<
typename outValue,
typename TFct>
298 std::function<
outValue(
const Eigen::Vector3d &)>
f = [&
F,
t](
const Eigen::Vector3d &x) ->
outValue {
return F(
t, x);};
302 template<
typename outValue,
typename Fct,
typename TFct>
306 for (
size_t i = 0;
i <
TF.size();
i++){
325 Eigen::VectorXd _compute_local_vec(
size_t iT,
329 const Eigen::VectorXd &
E_i,
330 const Eigen::VectorXd &
A_i,
336 void _assemble_local_vec(
size_t iT,
337 const Eigen::VectorXd &
v,
338 std::vector<std::list<Eigen::Triplet<double>>> &
triplets_sys,
339 std::vector<Eigen::VectorXd> &
vecs
344 _compute_local_newton(
347 const Eigen::VectorXd &
E_i,
348 const Eigen::VectorXd &
A_i,
358 void _assemble_local_newton(
361 std::vector<std::list<Eigen::Triplet<double> > > &
triplets_sys,
362 std::vector<Eigen::VectorXd> &
vecs
366 std::vector<Eigen::MatrixXd>
367 _compute_local_contribution(
373 void _assemble_local_contribution(
375 const std::vector<Eigen::MatrixXd> &
lsT,
376 std::vector<std::list<Eigen::Triplet<double>>> &
triplets,
377 std::vector<Eigen::VectorXd> &
vecs
381 boost::multi_array<double, 3> _compute_detnij_Pot_PkF(
size_t iF)
const;
384 boost::multi_array<double, 3> _compute_detnij_PkF(
size_t iF)
const;
389 boost::multi_array<double, 3> _compute_crossij_Pot_T(
size_t iT)
const;
392 boost::multi_array<double, 3> _compute_crossij_T(
size_t iT)
const;
395 boost::multi_array<double, 3> _integral_Pot_ijk(
size_t iT)
const;
400 std::ostream & m_output;
410 const Eigen::VectorXi m_nloc_sc_E;
411 const Eigen::VectorXi m_nloc_sc_lambda;
414 Eigen::VectorXd m_b_i;
415 Eigen::VectorXd m_b_k;
417 Eigen::VectorXd m_sc_b;
426 template<
typename outValue,
typename Fct>
427 std::vector<Fct>
sumLA(
const std::vector<Fct> &
LAF,
const std::vector<Fct> &
LAG,
double lambda)
430 for (
size_t i = 0;
i <
LAF.size();
i++){
431 values.emplace_back([&,
i, lambda](
double t,
const Eigen::Vector3d & x)->
outValue {
return LAF[
i](
t, x) + lambda *
LAG[
i](
t, x);});
440 static const double PI = boost::math::constants::pi<double>();
452 return Eigen::Vector3d(
453 -0.5*sin(
t)*sin(
PI*x(0))*cos(
PI*x(1))*cos(
PI*x(2)),
454 sin(
t)*sin(
PI*x(1))*cos(
PI*x(0))*cos(
PI*x(2)),
455 -0.5*sin(
t)*sin(
PI*x(2))*cos(
PI*x(0))*cos(
PI*x(1))
460 return Eigen::Vector3d(
461 0.5*sin(
PI*x(0))*cos(
t)*cos(
PI*x(1))*cos(
PI*x(2)),
462 -sin(
PI*x(1))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(2)),
463 0.5*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1))
469 return Eigen::Vector3d(
470 0.5*pow(sin(
PI*x(1)), 2)*cos(
t),
471 sin(
t)*pow(cos(
PI*x(2)), 2),
472 0.5*cos(
t)*pow(cos(
PI*x(0)), 2)
481 return Eigen::Vector3d(
482 -0.5*sin(
PI*x(0))*cos(
t)*cos(
PI*x(1))*cos(
PI*x(2)),
483 sin(
PI*x(1))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(2)),
484 -0.5*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1))
490 return Eigen::Vector3d(
491 -0.5*sin(
t)*sin(
PI*x(0))*cos(
PI*x(1))*cos(
PI*x(2)),
492 sin(
t)*sin(
PI*x(1))*cos(
PI*x(0))*cos(
PI*x(2)),
493 -0.5*sin(
t)*sin(
PI*x(2))*cos(
PI*x(0))*cos(
PI*x(1))
499 return Eigen::Vector3d(-0.5*sin(
t)*pow(sin(
PI*x(1)), 2),
500 cos(
t)*pow(cos(
PI*x(2)), 2),
501 -0.5*sin(
t)*pow(cos(
PI*x(0)), 2)
510 return Eigen::Vector3d(
511 1.5*
PI*sin(
PI*x(1))*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0)),
513 -1.5*
PI*sin(
PI*x(0))*sin(
PI*x(1))*cos(
t)*cos(
PI*x(2))
519 return Eigen::Vector3d(
520 1.5*
PI*sin(
t)*sin(
PI*x(1))*sin(
PI*x(2))*cos(
PI*x(0)),
522 -1.5*
PI*sin(
t)*sin(
PI*x(0))*sin(
PI*x(1))*cos(
PI*x(2))
528 return Eigen::Vector3d(
529 2*
PI*sin(
PI*x(2))*cos(
t)*cos(
PI*x(2)),
530 -1.0*
PI*sin(
t)*sin(
PI*x(0))*cos(
PI*x(0)),
531 1.0*
PI*sin(
t)*sin(
PI*x(1))*cos(
PI*x(1))
540 return Eigen::Vector3d(
541 -0.5*pow(sin(
t), 2)*sin(
PI*x(1))*pow(cos(
PI*x(0)), 3)*cos(
PI*x(2)) + 0.5*sin(
t)*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1))*pow(cos(
PI*x(2)), 2),
542 -0.25*pow(sin(
t), 2)*sin(
PI*x(0))*pow(cos(
PI*x(0)), 2)*cos(
PI*x(1))*cos(
PI*x(2)) + 0.25*pow(sin(
t), 2)*pow(sin(
PI*x(1)), 2)*sin(
PI*x(2))*cos(
PI*x(0))*cos(
PI*x(1)),
543 0.5*pow(sin(
t), 2)*pow(sin(
PI*x(1)), 3)*cos(
PI*x(0))*cos(
PI*x(2)) - 0.5*sin(
t)*sin(
PI*x(0))*cos(
t)*cos(
PI*x(1))*pow(cos(
PI*x(2)), 3)
549 return Eigen::Vector3d(
550 0.5*sin(
t)*sin(
PI*x(1))*cos(
t)*pow(cos(
PI*x(0)), 3)*cos(
PI*x(2)) - 0.5*sin(
PI*x(2))*pow(cos(
t), 2)*cos(
PI*x(0))*cos(
PI*x(1))*pow(cos(
PI*x(2)), 2),
551 0.25*sin(
t)*sin(
PI*x(0))*cos(
t)*pow(cos(
PI*x(0)), 2)*cos(
PI*x(1))*cos(
PI*x(2)) - 0.25*sin(
t)*pow(sin(
PI*x(1)), 2)*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1)),
552 -0.5*sin(
t)*pow(sin(
PI*x(1)), 3)*cos(
t)*cos(
PI*x(0))*cos(
PI*x(2)) + 0.5*sin(
PI*x(0))*pow(cos(
t), 2)*cos(
PI*x(1))*pow(cos(
PI*x(2)), 3)
558 return Eigen::Vector3d(
570 return Eigen::Vector3d(
571 -0.5*sin(
PI*x(0))*cos(
t)*cos(
PI*x(1))*cos(
PI*x(2)),
572 sin(
PI*x(1))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(2)),
573 -0.5*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1))
578 return Eigen::Vector3d(
579 -0.5*sin(
t)*sin(
PI*x(0))*cos(
PI*x(1))*cos(
PI*x(2)),
580 sin(
t)*sin(
PI*x(1))*cos(
PI*x(0))*cos(
PI*x(2)),
581 -0.5*sin(
t)*sin(
PI*x(2))*cos(
PI*x(0))*cos(
PI*x(1))
587 return Eigen::Vector3d(
588 -0.5*sin(
t)*pow(sin(
PI*x(1)), 2),
589 cos(
t)*pow(cos(
PI*x(2)), 2),
590 -0.5*sin(
t)*pow(cos(
PI*x(0)), 2)
599 return Eigen::Vector3d(
600 -0.5*sin(
PI*x(0))*cos(
t)*cos(
PI*x(1))*cos(
PI*x(2)) + 1.5*pow(
PI, 2)*sin(
PI*x(0))*cos(
t)*cos(
PI*x(1))*cos(
PI*x(2)),
601 -3.0*pow(
PI, 2)*sin(
PI*x(1))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(2)) + sin(
PI*x(1))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(2)),
602 -0.5*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1)) + 1.5*pow(
PI, 2)*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1))
608 return Eigen::Vector3d(
609 -0.5*sin(
t)*sin(
PI*x(0))*cos(
PI*x(1))*cos(
PI*x(2)) + 1.5*pow(
PI, 2)*sin(
t)*sin(
PI*x(0))*cos(
PI*x(1))*cos(
PI*x(2)),
610 -3.0*pow(
PI, 2)*sin(
t)*sin(
PI*x(1))*cos(
PI*x(0))*cos(
PI*x(2)) + sin(
t)*sin(
PI*x(1))*cos(
PI*x(0))*cos(
PI*x(2)),
611 -0.5*sin(
t)*sin(
PI*x(2))*cos(
PI*x(0))*cos(
PI*x(1)) + 1.5*pow(
PI, 2)*sin(
t)*sin(
PI*x(2))*cos(
PI*x(0))*cos(
PI*x(1))
617 return Eigen::Vector3d(
618 -0.5*sin(
t)*pow(sin(
PI*x(1)), 2) + 1.0*pow(
PI, 2)*sin(
t)*pow(sin(
PI*x(1)), 2) - 1.0*pow(
PI, 2)*sin(
t)*pow(cos(
PI*x(1)), 2),
619 2*pow(
PI, 2)*pow(sin(
PI*x(2)), 2)*cos(
t) - 2*pow(
PI, 2)*cos(
t)*pow(cos(
PI*x(2)), 2) + cos(
t)*pow(cos(
PI*x(2)), 2),
620 -1.0*pow(
PI, 2)*sin(
t)*pow(sin(
PI*x(0)), 2) - 0.5*sin(
t)*pow(cos(
PI*x(0)), 2) + 1.0*pow(
PI, 2)*sin(
t)*pow(cos(
PI*x(0)), 2)
629 return Eigen::Vector3d(
630 0.5*(0.25*sin(
t)*sin(
PI*x(0))*cos(
t)*pow(cos(
PI*x(0)), 2)*cos(
PI*x(1))*cos(
PI*x(2)) - 0.25*sin(
t)*pow(sin(
PI*x(1)), 2)*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1)))*sin(
t)*pow(cos(
PI*x(0)), 2) + (-1.5*
PI*sin(
t)*sin(
PI*x(0))*sin(
PI*x(1))*cos(
PI*x(2)) - 0.5*sin(
t)*pow(sin(
PI*x(1)), 3)*cos(
t)*cos(
PI*x(0))*cos(
PI*x(2)) + 0.5*sin(
PI*x(0))*pow(cos(
t), 2)*cos(
PI*x(1))*pow(cos(
PI*x(2)), 3))*cos(
t)*pow(cos(
PI*x(2)), 2) + 0.75*
PI*pow(sin(
t), 2)*sin(
PI*x(0))*sin(
PI*x(2))*pow(cos(
PI*x(0)), 2)*cos(
PI*x(1)) - 2.25*
PI*pow(sin(
t), 2)*pow(sin(
PI*x(1)), 2)*cos(
PI*x(0))*cos(
PI*x(1))*cos(
PI*x(2)) - 0.5*
PI*sin(
t)*sin(
PI*x(0))*sin(
PI*x(1))*cos(
t)*pow(cos(
PI*x(2)), 3),
631 0.5*(-1.5*
PI*sin(
t)*sin(
PI*x(0))*sin(
PI*x(1))*cos(
PI*x(2)) - 0.5*sin(
t)*pow(sin(
PI*x(1)), 3)*cos(
t)*cos(
PI*x(0))*cos(
PI*x(2)) + 0.5*sin(
PI*x(0))*pow(cos(
t), 2)*cos(
PI*x(1))*pow(cos(
PI*x(2)), 3))*sin(
t)*pow(sin(
PI*x(1)), 2) - 0.5*(1.5*
PI*sin(
t)*sin(
PI*x(1))*sin(
PI*x(2))*cos(
PI*x(0)) + 0.5*sin(
t)*sin(
PI*x(1))*cos(
t)*pow(cos(
PI*x(0)), 3)*cos(
PI*x(2)) - 0.5*sin(
PI*x(2))*pow(cos(
t), 2)*cos(
PI*x(0))*cos(
PI*x(1))*pow(cos(
PI*x(2)), 2))*sin(
t)*pow(cos(
PI*x(0)), 2) - 0.5*
PI*pow(sin(
t), 2)*sin(
PI*x(0))*pow(sin(
PI*x(1)), 3)*cos(
PI*x(2)) - 0.5*
PI*pow(sin(
t), 2)*sin(
PI*x(0))*sin(
PI*x(1))*pow(cos(
PI*x(1)), 2)*cos(
PI*x(2)) - 0.5*
PI*pow(sin(
t), 2)*sin(
PI*x(1))*sin(
PI*x(2))*pow(cos(
PI*x(0)), 3) + 2.0*
PI*sin(
t)*pow(sin(
PI*x(2)), 2)*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1))*cos(
PI*x(2)) - 1.0*
PI*sin(
t)*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1))*pow(cos(
PI*x(2)), 3),
632 -0.5*(0.25*sin(
t)*sin(
PI*x(0))*cos(
t)*pow(cos(
PI*x(0)), 2)*cos(
PI*x(1))*cos(
PI*x(2)) - 0.25*sin(
t)*pow(sin(
PI*x(1)), 2)*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1)))*sin(
t)*pow(sin(
PI*x(1)), 2) - (1.5*
PI*sin(
t)*sin(
PI*x(1))*sin(
PI*x(2))*cos(
PI*x(0)) + 0.5*sin(
t)*sin(
PI*x(1))*cos(
t)*pow(cos(
PI*x(0)), 3)*cos(
PI*x(2)) - 0.5*sin(
PI*x(2))*pow(cos(
t), 2)*cos(
PI*x(0))*cos(
PI*x(1))*pow(cos(
PI*x(2)), 2))*cos(
t)*pow(cos(
PI*x(2)), 2) - 1.0*
PI*pow(sin(
t), 2)*pow(sin(
PI*x(0)), 2)*cos(
PI*x(0))*cos(
PI*x(1))*cos(
PI*x(2)) + 0.25*
PI*pow(sin(
t), 2)*sin(
PI*x(0))*pow(sin(
PI*x(1)), 2)*sin(
PI*x(2))*cos(
PI*x(1)) - 0.25*
PI*pow(sin(
t), 2)*pow(cos(
PI*x(0)), 3)*cos(
PI*x(1))*cos(
PI*x(2)) + 1.5*
PI*sin(
t)*sin(
PI*x(1))*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0))*pow(cos(
PI*x(2)), 2)
638 return Eigen::Vector3d(
639 -0.5*(-0.25*pow(sin(
t), 2)*sin(
PI*x(0))*pow(cos(
PI*x(0)), 2)*cos(
PI*x(1))*cos(
PI*x(2)) + 0.25*pow(sin(
t), 2)*pow(sin(
PI*x(1)), 2)*sin(
PI*x(2))*cos(
PI*x(0))*cos(
PI*x(1)))*sin(
t)*pow(cos(
PI*x(0)), 2) - (0.5*pow(sin(
t), 2)*pow(sin(
PI*x(1)), 3)*cos(
PI*x(0))*cos(
PI*x(2)) - 0.5*sin(
t)*sin(
PI*x(0))*cos(
t)*cos(
PI*x(1))*pow(cos(
PI*x(2)), 3) - 1.5*
PI*sin(
PI*x(0))*sin(
PI*x(1))*cos(
t)*cos(
PI*x(2)))*cos(
t)*pow(cos(
PI*x(2)), 2) - 0.75*
PI*sin(
t)*sin(
PI*x(0))*sin(
PI*x(2))*cos(
t)*pow(cos(
PI*x(0)), 2)*cos(
PI*x(1)) + 2.25*
PI*sin(
t)*pow(sin(
PI*x(1)), 2)*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1))*cos(
PI*x(2)) + 0.5*
PI*sin(
PI*x(0))*sin(
PI*x(1))*pow(cos(
t), 2)*pow(cos(
PI*x(2)), 3),
640 0.5*(-0.5*pow(sin(
t), 2)*sin(
PI*x(1))*pow(cos(
PI*x(0)), 3)*cos(
PI*x(2)) + 0.5*sin(
t)*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1))*pow(cos(
PI*x(2)), 2) + 1.5*
PI*sin(
PI*x(1))*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0)))*sin(
t)*pow(cos(
PI*x(0)), 2) - 0.5*(0.5*pow(sin(
t), 2)*pow(sin(
PI*x(1)), 3)*cos(
PI*x(0))*cos(
PI*x(2)) - 0.5*sin(
t)*sin(
PI*x(0))*cos(
t)*cos(
PI*x(1))*pow(cos(
PI*x(2)), 3) - 1.5*
PI*sin(
PI*x(0))*sin(
PI*x(1))*cos(
t)*cos(
PI*x(2)))*sin(
t)*pow(sin(
PI*x(1)), 2) + 0.5*
PI*sin(
t)*sin(
PI*x(0))*pow(sin(
PI*x(1)), 3)*cos(
t)*cos(
PI*x(2)) + 0.5*
PI*sin(
t)*sin(
PI*x(0))*sin(
PI*x(1))*cos(
t)*pow(cos(
PI*x(1)), 2)*cos(
PI*x(2)) + 0.5*
PI*sin(
t)*sin(
PI*x(1))*sin(
PI*x(2))*cos(
t)*pow(cos(
PI*x(0)), 3) - 2.0*
PI*pow(sin(
PI*x(2)), 2)*pow(cos(
t), 2)*cos(
PI*x(0))*cos(
PI*x(1))*cos(
PI*x(2)) + 1.0*
PI*pow(cos(
t), 2)*cos(
PI*x(0))*cos(
PI*x(1))*pow(cos(
PI*x(2)), 3),
641 0.5*(-0.25*pow(sin(
t), 2)*sin(
PI*x(0))*pow(cos(
PI*x(0)), 2)*cos(
PI*x(1))*cos(
PI*x(2)) + 0.25*pow(sin(
t), 2)*pow(sin(
PI*x(1)), 2)*sin(
PI*x(2))*cos(
PI*x(0))*cos(
PI*x(1)))*sin(
t)*pow(sin(
PI*x(1)), 2) + (-0.5*pow(sin(
t), 2)*sin(
PI*x(1))*pow(cos(
PI*x(0)), 3)*cos(
PI*x(2)) + 0.5*sin(
t)*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1))*pow(cos(
PI*x(2)), 2) + 1.5*
PI*sin(
PI*x(1))*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0)))*cos(
t)*pow(cos(
PI*x(2)), 2) + 1.0*
PI*sin(
t)*pow(sin(
PI*x(0)), 2)*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1))*cos(
PI*x(2)) - 0.25*
PI*sin(
t)*sin(
PI*x(0))*pow(sin(
PI*x(1)), 2)*sin(
PI*x(2))*cos(
t)*cos(
PI*x(1)) + 0.25*
PI*sin(
t)*cos(
t)*pow(cos(
PI*x(0)), 3)*cos(
PI*x(1))*cos(
PI*x(2)) - 1.5*
PI*sin(
PI*x(1))*sin(
PI*x(2))*pow(cos(
t), 2)*cos(
PI*x(0))*pow(cos(
PI*x(2)), 2)
647 return Eigen::Vector3d(
648 0.5*(-0.25*pow(sin(
t), 2)*sin(
PI*x(0))*pow(cos(
PI*x(0)), 2)*cos(
PI*x(1))*cos(
PI*x(2)) + 0.25*pow(sin(
t), 2)*pow(sin(
PI*x(1)), 2)*sin(
PI*x(2))*cos(
PI*x(0))*cos(
PI*x(1)))*sin(
t)*sin(
PI*x(2))*cos(
PI*x(0))*cos(
PI*x(1)) - 0.5*(0.25*sin(
t)*sin(
PI*x(0))*cos(
t)*pow(cos(
PI*x(0)), 2)*cos(
PI*x(1))*cos(
PI*x(2)) - 0.25*sin(
t)*pow(sin(
PI*x(1)), 2)*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1)))*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1)) + (0.5*pow(sin(
t), 2)*pow(sin(
PI*x(1)), 3)*cos(
PI*x(0))*cos(
PI*x(2)) - 0.5*sin(
t)*sin(
PI*x(0))*cos(
t)*cos(
PI*x(1))*pow(cos(
PI*x(2)), 3) - 1.5*
PI*sin(
PI*x(0))*sin(
PI*x(1))*cos(
t)*cos(
PI*x(2)))*sin(
t)*sin(
PI*x(1))*cos(
PI*x(0))*cos(
PI*x(2)) - (-1.5*
PI*sin(
t)*sin(
PI*x(0))*sin(
PI*x(1))*cos(
PI*x(2)) - 0.5*sin(
t)*pow(sin(
PI*x(1)), 3)*cos(
t)*cos(
PI*x(0))*cos(
PI*x(2)) + 0.5*sin(
PI*x(0))*pow(cos(
t), 2)*cos(
PI*x(1))*pow(cos(
PI*x(2)), 3))*sin(
PI*x(1))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(2)),
649 -0.5*(-0.5*pow(sin(
t), 2)*sin(
PI*x(1))*pow(cos(
PI*x(0)), 3)*cos(
PI*x(2)) + 0.5*sin(
t)*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1))*pow(cos(
PI*x(2)), 2) + 1.5*
PI*sin(
PI*x(1))*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0)))*sin(
t)*sin(
PI*x(2))*cos(
PI*x(0))*cos(
PI*x(1)) + 0.5*(0.5*pow(sin(
t), 2)*pow(sin(
PI*x(1)), 3)*cos(
PI*x(0))*cos(
PI*x(2)) - 0.5*sin(
t)*sin(
PI*x(0))*cos(
t)*cos(
PI*x(1))*pow(cos(
PI*x(2)), 3) - 1.5*
PI*sin(
PI*x(0))*sin(
PI*x(1))*cos(
t)*cos(
PI*x(2)))*sin(
t)*sin(
PI*x(0))*cos(
PI*x(1))*cos(
PI*x(2)) - 0.5*(-1.5*
PI*sin(
t)*sin(
PI*x(0))*sin(
PI*x(1))*cos(
PI*x(2)) - 0.5*sin(
t)*pow(sin(
PI*x(1)), 3)*cos(
t)*cos(
PI*x(0))*cos(
PI*x(2)) + 0.5*sin(
PI*x(0))*pow(cos(
t), 2)*cos(
PI*x(1))*pow(cos(
PI*x(2)), 3))*sin(
PI*x(0))*cos(
t)*cos(
PI*x(1))*cos(
PI*x(2)) + 0.5*(1.5*
PI*sin(
t)*sin(
PI*x(1))*sin(
PI*x(2))*cos(
PI*x(0)) + 0.5*sin(
t)*sin(
PI*x(1))*cos(
t)*pow(cos(
PI*x(0)), 3)*cos(
PI*x(2)) - 0.5*sin(
PI*x(2))*pow(cos(
t), 2)*cos(
PI*x(0))*cos(
PI*x(1))*pow(cos(
PI*x(2)), 2))*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1)),
650 -0.5*(-0.25*pow(sin(
t), 2)*sin(
PI*x(0))*pow(cos(
PI*x(0)), 2)*cos(
PI*x(1))*cos(
PI*x(2)) + 0.25*pow(sin(
t), 2)*pow(sin(
PI*x(1)), 2)*sin(
PI*x(2))*cos(
PI*x(0))*cos(
PI*x(1)))*sin(
t)*sin(
PI*x(0))*cos(
PI*x(1))*cos(
PI*x(2)) + 0.5*(0.25*sin(
t)*sin(
PI*x(0))*cos(
t)*pow(cos(
PI*x(0)), 2)*cos(
PI*x(1))*cos(
PI*x(2)) - 0.25*sin(
t)*pow(sin(
PI*x(1)), 2)*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1)))*sin(
PI*x(0))*cos(
t)*cos(
PI*x(1))*cos(
PI*x(2)) - (-0.5*pow(sin(
t), 2)*sin(
PI*x(1))*pow(cos(
PI*x(0)), 3)*cos(
PI*x(2)) + 0.5*sin(
t)*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(1))*pow(cos(
PI*x(2)), 2) + 1.5*
PI*sin(
PI*x(1))*sin(
PI*x(2))*cos(
t)*cos(
PI*x(0)))*sin(
t)*sin(
PI*x(1))*cos(
PI*x(0))*cos(
PI*x(2)) + (1.5*
PI*sin(
t)*sin(
PI*x(1))*sin(
PI*x(2))*cos(
PI*x(0)) + 0.5*sin(
t)*sin(
PI*x(1))*cos(
t)*pow(cos(
PI*x(0)), 3)*cos(
PI*x(2)) - 0.5*sin(
PI*x(2))*pow(cos(
t), 2)*cos(
PI*x(0))*cos(
PI*x(1))*pow(cos(
PI*x(2)), 2))*sin(
PI*x(1))*cos(
t)*cos(
PI*x(0))*cos(
PI*x(2)));
661 linear_E1 = [](
const double t,
const Eigen::Vector3d & x) -> Eigen::Vector3d {
662 return Eigen::Vector3d(-x(2), -x(1), -x(0));
666 linear_E2 = [](
const double t,
const Eigen::Vector3d & x) -> Eigen::Vector3d {
667 return Eigen::Vector3d(-x(2), -x(0), -x(1));
671 linear_E3 = [](
const double t,
const Eigen::Vector3d & x) -> Eigen::Vector3d {
672 return Eigen::Vector3d(-x(1) - x(2), -x(0) - x(2), -x(0) - x(1));
679 linear_A1 = [](
const double t,
const Eigen::Vector3d & x) -> Eigen::Vector3d {
680 return Eigen::Vector3d(
t*x(2),
t*x(1),
t*x(0));
684 linear_A2 = [](
const double t,
const Eigen::Vector3d & x) -> Eigen::Vector3d {
685 return Eigen::Vector3d(
t*x(2),
t*x(0),
t*x(1));
689 linear_A3 = [](
const double t,
const Eigen::Vector3d & x) -> Eigen::Vector3d {
690 return Eigen::Vector3d(
t*x(1) +
t*x(2),
t*x(0) +
t*x(2),
t*x(0) +
t*x(1));
698 return Eigen::Vector3d(
707 return Eigen::Vector3d(
716 return Eigen::Vector3d(
728 return Eigen::Vector3d(
729 1.0*
t*x(0)*(
t*x(0) +
t*x(1)) - 1.0*
t*x(1)*(
t*x(0) +
t*x(2)),
730 1.0*
t*x(1)*(
t*x(1) +
t*x(2)) - 1.0*
t*x(2)*(
t*x(0) +
t*x(1)),
731 -1.0*
t*x(0)*(
t*x(1) +
t*x(2)) + 1.0*
t*x(2)*(
t*x(0) +
t*x(2))
737 return Eigen::Vector3d(
738 1.0*
t*x(0)*(
t*x(0) +
t*x(2)) - 1.0*
t*x(1)*(
t*x(0) +
t*x(1)),
739 -1.0*
t*x(0)*(
t*x(1) +
t*x(2)) + 1.0*
t*x(2)*(
t*x(0) +
t*x(1)),
740 1.0*
t*x(1)*(
t*x(1) +
t*x(2)) - 1.0*
t*x(2)*(
t*x(0) +
t*x(2))
746 return Eigen::Vector3d(
747 -1.0*pow(
t, 2)*pow(x(0), 2) + 1.0*pow(
t, 2)*pow(x(1), 2),
748 1.0*pow(
t, 2)*x(0)*x(2) - 1.0*pow(
t, 2)*x(1)*x(2),
749 1.0*pow(
t, 2)*x(0)*x(2) - 1.0*pow(
t, 2)*x(1)*x(2)
757 linear_dtE1 = [](
const double t,
const Eigen::Vector3d & x) -> Eigen::Vector3d {
758 return Eigen::Vector3d(0, 0, 0);
761 linear_dtE2 = [](
const double t,
const Eigen::Vector3d & x) -> Eigen::Vector3d {
762 return Eigen::Vector3d(0, 0, 0);
766 linear_dtE3 = [](
const double t,
const Eigen::Vector3d & x) -> Eigen::Vector3d {
767 return Eigen::Vector3d(0, 0, 0);
775 return Eigen::Vector3d(0, 0, 0);
780 return Eigen::Vector3d(0, 0, 0);
785 return Eigen::Vector3d(0, 0, 0);
793 return Eigen::Vector3d(1.0*pow(
t, 2)*x(0) + 1.0*pow(
t, 2)*x(1) -
t*x(0)*(1.0*pow(
t, 2)*x(0)*x(2) - 1.0*pow(
t, 2)*x(1)*x(2)) +
t*x(1)*(1.0*pow(
t, 2)*x(0)*x(2) - 1.0*pow(
t, 2)*x(1)*x(2)) - 1.0*
t*(
t*x(0) +
t*x(1)) - (
t*x(0) +
t*x(1))*(-1.0*
t*x(0)*(
t*x(1) +
t*x(2)) + 1.0*
t*x(2)*(
t*x(0) +
t*x(1)) +
t) + (
t*x(0) +
t*x(2))*(1.0*
t*x(1)*(
t*x(1) +
t*x(2)) - 1.0*
t*x(2)*(
t*x(0) +
t*x(2)) +
t), 1.0*pow(
t, 2)*x(1) + 1.0*pow(
t, 2)*x(2) -
t*x(1)*(-1.0*pow(
t, 2)*pow(x(0), 2) + 1.0*pow(
t, 2)*pow(x(1), 2)) +
t*x(2)*(1.0*pow(
t, 2)*x(0)*x(2) - 1.0*pow(
t, 2)*x(1)*x(2)) - 1.0*
t*(
t*x(1) +
t*x(2)) + (
t*x(0) +
t*x(1))*(1.0*
t*x(0)*(
t*x(0) +
t*x(2)) - 1.0*
t*x(1)*(
t*x(0) +
t*x(1)) +
t) - (
t*x(1) +
t*x(2))*(1.0*
t*x(1)*(
t*x(1) +
t*x(2)) - 1.0*
t*x(2)*(
t*x(0) +
t*x(2)) +
t), 1.0*pow(
t, 2)*x(0) + 1.0*pow(
t, 2)*x(2) +
t*x(0)*(-1.0*pow(
t, 2)*pow(x(0), 2) + 1.0*pow(
t, 2)*pow(x(1), 2)) -
t*x(2)*(1.0*pow(
t, 2)*x(0)*x(2) - 1.0*pow(
t, 2)*x(1)*x(2)) - 1.0*
t*(
t*x(0) +
t*x(2)) - (
t*x(0) +
t*x(2))*(1.0*
t*x(0)*(
t*x(0) +
t*x(2)) - 1.0*
t*x(1)*(
t*x(0) +
t*x(1)) +
t) + (
t*x(1) +
t*x(2))*(-1.0*
t*x(0)*(
t*x(1) +
t*x(2)) + 1.0*
t*x(2)*(
t*x(0) +
t*x(1)) +
t)
799 return Eigen::Vector3d(-1.0*pow(
t, 2)*x(0) - 1.0*pow(
t, 2)*x(1) -
t*x(0)*(1.0*pow(
t, 2)*x(0)*x(2) - 1.0*pow(
t, 2)*x(1)*x(2)) +
t*x(1)*(1.0*pow(
t, 2)*x(0)*x(2) - 1.0*pow(
t, 2)*x(1)*x(2)) + 1.0*
t*(
t*x(0) +
t*x(1)) - 1.0*
t*(
t*x(1) +
t*x(2)) + (
t*x(0) +
t*x(1))*(1.0*
t*x(1)*(
t*x(1) +
t*x(2)) - 1.0*
t*x(2)*(
t*x(0) +
t*x(1))) - (
t*x(0) +
t*x(2))*(-1.0*
t*x(0)*(
t*x(1) +
t*x(2)) + 1.0*
t*x(2)*(
t*x(0) +
t*x(2))), -1.0*pow(
t, 2)*x(0) - 1.0*pow(
t, 2)*x(2) +
t*x(0)*(-1.0*pow(
t, 2)*pow(x(0), 2) + 1.0*pow(
t, 2)*pow(x(1), 2)) -
t*x(2)*(1.0*pow(
t, 2)*x(0)*x(2) - 1.0*pow(
t, 2)*x(1)*x(2)) - (
t*x(0) +
t*x(1))*(1.0*
t*x(0)*(
t*x(0) +
t*x(1)) - 1.0*
t*x(1)*(
t*x(0) +
t*x(2))) + (
t*x(1) +
t*x(2))*(-1.0*
t*x(0)*(
t*x(1) +
t*x(2)) + 1.0*
t*x(2)*(
t*x(0) +
t*x(2))), -1.0*pow(
t, 2)*x(1) - 1.0*pow(
t, 2)*x(2) -
t*x(1)*(-1.0*pow(
t, 2)*pow(x(0), 2) + 1.0*pow(
t, 2)*pow(x(1), 2)) +
t*x(2)*(1.0*pow(
t, 2)*x(0)*x(2) - 1.0*pow(
t, 2)*x(1)*x(2)) - 1.0*
t*(
t*x(0) +
t*x(1)) + 1.0*
t*(
t*x(1) +
t*x(2)) + (
t*x(0) +
t*x(2))*(1.0*
t*x(0)*(
t*x(0) +
t*x(1)) - 1.0*
t*x(1)*(
t*x(0) +
t*x(2))) - (
t*x(1) +
t*x(2))*(1.0*
t*x(1)*(
t*x(1) +
t*x(2)) - 1.0*
t*x(2)*(
t*x(0) +
t*x(1)))
805 return Eigen::Vector3d(1.0*pow(
t, 2)*x(0) - 1.0*pow(
t, 2)*x(1) + 1.0*pow(
t, 2)*x(2) +
t*x(0)*(-1.0*
t*x(0)*(
t*x(1) +
t*x(2)) + 1.0*
t*x(2)*(
t*x(0) +
t*x(2))) +
t*x(0)*(-1.0*
t*x(0)*(
t*x(1) +
t*x(2)) + 1.0*
t*x(2)*(
t*x(0) +
t*x(1)) +
t) -
t*x(1)*(1.0*
t*x(1)*(
t*x(1) +
t*x(2)) - 1.0*
t*x(2)*(
t*x(0) +
t*x(1))) -
t*x(1)*(1.0*
t*x(1)*(
t*x(1) +
t*x(2)) - 1.0*
t*x(2)*(
t*x(0) +
t*x(2)) +
t), 1.0*pow(
t, 2)*x(2) -
t*x(0)*(1.0*
t*x(0)*(
t*x(0) +
t*x(2)) - 1.0*
t*x(1)*(
t*x(0) +
t*x(1)) +
t) +
t*x(1)*(1.0*
t*x(0)*(
t*x(0) +
t*x(1)) - 1.0*
t*x(1)*(
t*x(0) +
t*x(2))) -
t*x(2)*(-1.0*
t*x(0)*(
t*x(1) +
t*x(2)) + 1.0*
t*x(2)*(
t*x(0) +
t*x(2))) +
t*x(2)*(1.0*
t*x(1)*(
t*x(1) +
t*x(2)) - 1.0*
t*x(2)*(
t*x(0) +
t*x(2)) +
t), 2.0*pow(
t, 2)*x(1) - 1.0*pow(
t, 2)*x(2) -
t*x(0)*(1.0*
t*x(0)*(
t*x(0) +
t*x(1)) - 1.0*
t*x(1)*(
t*x(0) +
t*x(2))) +
t*x(1)*(1.0*
t*x(0)*(
t*x(0) +
t*x(2)) - 1.0*
t*x(1)*(
t*x(0) +
t*x(1)) +
t) +
t*x(2)*(1.0*
t*x(1)*(
t*x(1) +
t*x(2)) - 1.0*
t*x(2)*(
t*x(0) +
t*x(1))) -
t*x(2)*(-1.0*
t*x(0)*(
t*x(1) +
t*x(2)) + 1.0*
t*x(2)*(
t*x(0) +
t*x(1)) +
t)
817 const_E1 = [](
const double t,
const Eigen::Vector3d & x) -> Eigen::Vector3d {
818 return Eigen::Vector3d::Zero();
822 const_E2 = [](
const double t,
const Eigen::Vector3d & x) -> Eigen::Vector3d {
823 return Eigen::Vector3d::Zero();
827 const_E3 = [](
const double t,
const Eigen::Vector3d & x) -> Eigen::Vector3d {
828 return Eigen::Vector3d::Zero();
835 const_A1 = [](
const double t,
const Eigen::Vector3d & x) -> Eigen::Vector3d {
836 return Eigen::Vector3d(0.2, 0.4, 0.6);
840 const_A2 = [](
const double t,
const Eigen::Vector3d & x) -> Eigen::Vector3d {
841 return Eigen::Vector3d(0.8, 1.0, 1.2);
845 const_A3 = [](
const double t,
const Eigen::Vector3d & x) -> Eigen::Vector3d {
846 return Eigen::Vector3d(1.4, 1.6, 1.8);
854 return Eigen::Vector3d(0, 0, 0);
859 return Eigen::Vector3d(0, 0, 0);
864 return Eigen::Vector3d(0, 0, 0);
872 return Eigen::Vector3d(-0.12, 0.24, -0.12);
877 return Eigen::Vector3d(0.24, -0.48, 0.24);
882 return Eigen::Vector3d(-0.12, 0.24, -0.12);
889 const_dtE1 = [](
const double t,
const Eigen::Vector3d & x) -> Eigen::Vector3d {
890 return Eigen::Vector3d(0, 0, 0);
893 const_dtE2 = [](
const double t,
const Eigen::Vector3d & x) -> Eigen::Vector3d {
894 return Eigen::Vector3d(0, 0, 0);
898 const_dtE3 = [](
const double t,
const Eigen::Vector3d & x) -> Eigen::Vector3d {
899 return Eigen::Vector3d(0, 0, 0);
907 return Eigen::Vector3d(0, 0, 0);
912 return Eigen::Vector3d(0, 0, 0);
917 return Eigen::Vector3d(0, 0, 0);
925 return Eigen::Vector3d(1.656, 0.144, -1.368);
930 return Eigen::Vector3d(0.432, 0, -0.432);
935 return Eigen::Vector3d(-0.792, -0.144, 0.504);
Construct all polynomial spaces for the DDR sequence.
Definition ddrcore.hpp:62
Construct the spaces for the LADDR sequence.
Definition laddrcore.hpp:19
Discrete Lie algebra valued Serendipity Hcurl space: local operators, L2 product and global interpola...
Definition lasxcurl.hpp:18
Discrete Serendipity Hdiv space: local operators, L2 product and global interpolator.
Definition lasxdiv.hpp:20
Discrete Serendipity Hgrad space: local operators, L2 product and global interpolator.
Definition lasxgrad.hpp:18
Lie algebra class: mass matrix, structure constants and Lie bracket.
Definition liealgebra.hpp:17
Discrete Serendipity Hcurl space: local operators, L2 product and global interpolator.
Definition sxcurl.hpp:21
Discrete Serendipity Hdiv space: local operators, L2 product and global interpolator.
Definition sxdiv.hpp:18
Discrete Serendipity Hgrad space: local operators, L2 product and global interpolator.
Definition sxgrad.hpp:20
Construct all polynomial spaces for the DDR sequence.
Definition serendipity_problem.hpp:40
Discrete Hdiv space: local operators, L2 product and global interpolator.
Definition xdiv.hpp:20
@ Matrix
Definition basis.hpp:67
size_t dimension() const
Returns the dimension of the global space (all DOFs for all geometric entities)
Definition variabledofspace.hpp:158
static const double PI
Definition ddr-magnetostatics.hpp:187
double pressure_scaling
Definition sddr-navier-stokes.hpp:464
static YangMills::TMagneticFieldType linear_B2_nonlinear
Definition laddr-yangmills-lm.hpp:639
static YangMills::TElectricFieldType trigonometric_dtE3
Definition laddr-yangmills-lm.hpp:489
static YangMills::TLAForcingTermType const_f_linear
Definition laddr-yangmills-lm.hpp:824
double lambda
Norm of Lagrange multiplier.
Definition laddr-yangmills-lm.hpp:48
static YangMills::TMagneticFieldType trigonometric_B2_linear
Definition laddr-yangmills-lm.hpp:421
std::function< Eigen::Vector3d(const double &, const Eigen::Vector3d &)> TForcingTermType
Base functions with time component.
Definition laddr-yangmills-lm.hpp:60
static YangMills::TMagneticFieldType const_B1_nonlinear
Definition laddr-yangmills-lm.hpp:774
static YangMills::TMagneticFieldType trigonometric_B1_linear
Definition laddr-yangmills-lm.hpp:412
static YangMills::TForcingTermType linear_f1_nonlinear
Definition laddr-yangmills-lm.hpp:695
static YangMills::TMagneticFieldType trigonometric_B3_linear
Definition laddr-yangmills-lm.hpp:430
static YangMills::TElectricFieldType trigonometric_E1
Definition laddr-yangmills-lm.hpp:354
static YangMills::TForcingTermType linear_f3_linear
Definition laddr-yangmills-lm.hpp:687
static YangMills::TMagneticFieldType const_B2_linear
Definition laddr-yangmills-lm.hpp:761
static YangMills::TMagneticFieldType linear_B2_linear
Definition laddr-yangmills-lm.hpp:609
static YangMills::TLAElectricFieldType trigonometric_A
Definition laddr-yangmills-lm.hpp:409
static YangMills::TElectricFieldType const_A1
Definition laddr-yangmills-lm.hpp:738
static YangMills::TForcingTermType const_f2_nonlinear
Definition laddr-yangmills-lm.hpp:832
static YangMills::TForcingTermType trigonometric_f2_nonlinear
Definition laddr-yangmills-lm.hpp:540
double A
Norm of potential.
Definition laddr-yangmills-lm.hpp:47
static YangMills::TForcingTermType linear_f2_linear
Definition laddr-yangmills-lm.hpp:682
static YangMills::TElectricFieldType trigonometric_A1
Definition laddr-yangmills-lm.hpp:383
static YangMills::TForcingTermType trigonometric_f3_linear
Definition laddr-yangmills-lm.hpp:519
static YangMills::TElectricFieldType trigonometric_A2
Definition laddr-yangmills-lm.hpp:392
static YangMills::TForcingTermType linear_f1_linear
Definition laddr-yangmills-lm.hpp:677
Eigen::MatrixXd L2v_Bkt(size_t iT, boost::multi_array< double, 3 > &intPciPcjPgk, const Eigen::VectorXd &v, const size_t &entry) const
Wrapper to plug vector into L2 integral product: int (Pcurl 1,[Pcurl 2, Pgrad 3])
Definition laddr-yangmills-lm.cpp:1433
static YangMills::TMagneticFieldType linear_B1_nonlinear
Definition laddr-yangmills-lm.hpp:630
static YangMills::TElectricFieldType linear_dtE2
Definition laddr-yangmills-lm.hpp:664
std::vector< TForcingTermType > TLAForcingTermType
Lie algebra valued functions with time component.
Definition laddr-yangmills-lm.hpp:68
static YangMills::TMagneticFieldType const_B2_nonlinear
Definition laddr-yangmills-lm.hpp:779
static YangMills::TElectricFieldType const_dtE1
Definition laddr-yangmills-lm.hpp:792
double E
Norm of electric field.
Definition laddr-yangmills-lm.hpp:46
static YangMills::TElectricFieldType linear_dtE1
Definition laddr-yangmills-lm.hpp:660
static YangMills::TElectricFieldType trigonometric_dtE1
Definition laddr-yangmills-lm.hpp:472
static YangMills::TMagneticFieldType trigonometric_B3_nonlinear
Definition laddr-yangmills-lm.hpp:460
static YangMills::TMagneticFieldType trigonometric_B1_nonlinear
Definition laddr-yangmills-lm.hpp:442
static YangMills::TForcingTermType trigonometric_f3_nonlinear
Definition laddr-yangmills-lm.hpp:549
static YangMills::TLAElectricFieldType trigonometric_E
Definition laddr-yangmills-lm.hpp:380
static YangMills::TForcingTermType const_f1_nonlinear
Definition laddr-yangmills-lm.hpp:827
static YangMills::TElectricFieldType linear_A3
Definition laddr-yangmills-lm.hpp:592
static YangMills::TLAForcingTermType trigonometric_f_linear
Definition laddr-yangmills-lm.hpp:528
static YangMills::TForcingTermType const_f3_nonlinear
Definition laddr-yangmills-lm.hpp:837
static YangMills::TMagneticFieldType const_B3_nonlinear
Definition laddr-yangmills-lm.hpp:784
static YangMills::TLAElectricFieldType const_A
Definition laddr-yangmills-lm.hpp:753
static YangMills::TElectricFieldType linear_A2
Definition laddr-yangmills-lm.hpp:587
std::vector< TElectricFieldType > TLAElectricFieldType
Definition laddr-yangmills-lm.hpp:69
static YangMills::TElectricFieldType const_E1
Definition laddr-yangmills-lm.hpp:720
static YangMills::TElectricFieldType linear_A1
Definition laddr-yangmills-lm.hpp:582
static YangMills::TForcingTermType trigonometric_f1_nonlinear
Definition laddr-yangmills-lm.hpp:531
std::vector< MagneticFieldType > LAMagneticFieldType
Definition laddr-yangmills-lm.hpp:66
std::function< Eigen::Vector3d(const double &, const Eigen::Vector3d &)> TElectricFieldType
Definition laddr-yangmills-lm.hpp:61
static YangMills::TForcingTermType trigonometric_f1_linear
Definition laddr-yangmills-lm.hpp:501
static YangMills::TElectricFieldType trigonometric_dtE2
Definition laddr-yangmills-lm.hpp:480
static YangMills::TLAMagneticFieldType linear_B_nonlinear
Definition laddr-yangmills-lm.hpp:657
static YangMills::TMagneticFieldType linear_B1_linear
Definition laddr-yangmills-lm.hpp:600
static YangMills::TMagneticFieldType linear_B3_linear
Definition laddr-yangmills-lm.hpp:618
static YangMills::TForcingTermType linear_f2_nonlinear
Definition laddr-yangmills-lm.hpp:701
static YangMills::TMagneticFieldType const_B1_linear
Definition laddr-yangmills-lm.hpp:756
static YangMills::TLAForcingTermType linear_f_linear
Definition laddr-yangmills-lm.hpp:692
static YangMills::TElectricFieldType trigonometric_E2
Definition laddr-yangmills-lm.hpp:362
static YangMills::TLAMagneticFieldType trigonometric_B_linear
Definition laddr-yangmills-lm.hpp:439
static YangMills::TLAElectricFieldType trigonometric_dtE
Definition laddr-yangmills-lm.hpp:498
static YangMills::TMagneticFieldType const_B3_linear
Definition laddr-yangmills-lm.hpp:766
std::function< Eigen::Vector3d(const double &, const Eigen::Vector3d &)> TMagneticFieldType
Definition laddr-yangmills-lm.hpp:62
static YangMills::TElectricFieldType const_dtE2
Definition laddr-yangmills-lm.hpp:796
static YangMills::TLAMagneticFieldType trigonometric_B_nonlinear
Definition laddr-yangmills-lm.hpp:469
static YangMills::TElectricFieldType const_A2
Definition laddr-yangmills-lm.hpp:743
static YangMills::TElectricFieldType const_E3
Definition laddr-yangmills-lm.hpp:730
static YangMills::TLAMagneticFieldType linear_B_linear
Definition laddr-yangmills-lm.hpp:627
static YangMills::TLAElectricFieldType linear_dtE
Definition laddr-yangmills-lm.hpp:674
static YangMills::TMagneticFieldType trigonometric_B2_nonlinear
Definition laddr-yangmills-lm.hpp:451
Eigen::SparseMatrix< double > SystemMatrixType
Definition laddr-yangmills-lm.hpp:54
static YangMills::TLAElectricFieldType const_dtE
Definition laddr-yangmills-lm.hpp:806
static YangMills::TForcingTermType const_f1_linear
Definition laddr-yangmills-lm.hpp:809
static YangMills::TLAElectricFieldType linear_A
Definition laddr-yangmills-lm.hpp:597
static YangMills::TForcingTermType const_f2_linear
Definition laddr-yangmills-lm.hpp:814
static YangMills::TElectricFieldType const_dtE3
Definition laddr-yangmills-lm.hpp:801
static YangMills::TLAElectricFieldType const_E
Definition laddr-yangmills-lm.hpp:735
static YangMills::TElectricFieldType trigonometric_E3
Definition laddr-yangmills-lm.hpp:371
Eigen::MatrixXd epsBkt_v(size_t iT, boost::multi_array< double, 3 > &ebkt_T, const Eigen::VectorXd &v) const
Calculates the matrix of *[v,.]^div in element index iT.
Definition laddr-yangmills-lm.cpp:1323
static YangMills::TLAMagneticFieldType const_B_linear
Definition laddr-yangmills-lm.hpp:771
static YangMills::TForcingTermType linear_f3_nonlinear
Definition laddr-yangmills-lm.hpp:707
Eigen::MatrixXd L2v_epsBkt(size_t iT, boost::multi_array< double, 3 > &ebkt_T, const Eigen::VectorXd &v_T, const Eigen::MatrixXd &L2prod) const
Calculates the bracket inside the L2prod with v.
Definition laddr-yangmills-lm.cpp:1466
static YangMills::TElectricFieldType const_E2
Definition laddr-yangmills-lm.hpp:725
static YangMills::TForcingTermType const_f3_linear
Definition laddr-yangmills-lm.hpp:819
static YangMills::TElectricFieldType const_A3
Definition laddr-yangmills-lm.hpp:748
static YangMills::TForcingTermType trigonometric_f2_linear
Definition laddr-yangmills-lm.hpp:510
static YangMills::TLAMagneticFieldType const_B_nonlinear
Definition laddr-yangmills-lm.hpp:789
void assembleSystemNewton(const Eigen::VectorXd &E_i, const Eigen::VectorXd &A_i, const Eigen::VectorXd &Elambdac_k, const Eigen::VectorXd &sysVec, double dt, double theta, double nonlinear_coeff)
Assembles the system for Newton iterations.
Definition laddr-yangmills-lm.cpp:879
std::vector< TMagneticFieldType > TLAMagneticFieldType
Definition laddr-yangmills-lm.hpp:70
static YangMills::TMagneticFieldType linear_B3_nonlinear
Definition laddr-yangmills-lm.hpp:648
static YangMills::TLAForcingTermType linear_f_nonlinear
Definition laddr-yangmills-lm.hpp:713
static YangMills::TLAForcingTermType trigonometric_f_nonlinear
Definition laddr-yangmills-lm.hpp:557
static YangMills::TLAForcingTermType const_f_nonlinear
Definition laddr-yangmills-lm.hpp:842
static YangMills::TElectricFieldType trigonometric_A3
Definition laddr-yangmills-lm.hpp:401
std::vector< Fct > sumLA(const std::vector< Fct > &LAF, const std::vector< Fct > &LAG, double lambda)
Template to evaluate a vector of functions.
Definition laddr-yangmills-lm.hpp:330
static YangMills::TElectricFieldType linear_dtE3
Definition laddr-yangmills-lm.hpp:669
bool use_threads
Definition HHO_DiffAdvecReac.hpp:47
std::function< Eigen::Vector3d(const Eigen::Vector3d &)> ForcingTermType
Base functions.
Definition lasddr-yangmills.hpp:57
double computeConstraintNorm(const Eigen::VectorXd &Ch, const size_t itersolver) const
Solves a system to calculate the norm of the constraint (in the dual space of LaXgrad)
std::function< Eigen::Vector3d(const double &, const Eigen::Vector3d &)> TForcingTermType
Base functions with time component.
Definition lasddr-yangmills.hpp:61
size_t nbSCDOFs() const
Returns the number of statically condensed DOFs (both velocity and pressure)
Definition lasddr-yangmills.hpp:176
std::function< Eigen::Vector3d(const Eigen::Vector3d &)> ElectricFieldType
Definition lasddr-yangmills.hpp:58
const SXGrad & xSGrad() const
Returns the space XDiv.
Definition lasddr-yangmills.hpp:212
Eigen::VectorXd computeInitialConditions(const Eigen::MatrixXd &Eh, const Eigen::MatrixXd &Ah, const double nonlinear_coeff, const size_t solver)
Computes the projected initial conditions that satisfy the constraint.
const SXDiv & xSDiv() const
Returns the space XDiv.
Definition lasddr-yangmills.hpp:224
const LASXCurl & laSXCurl() const
Returns the space LAXCurl.
Definition lasddr-yangmills.hpp:200
YangMillsNorms(double norm_E, double norm_A, double norm_lambda)
Constructor.
Definition lasddr-yangmills.hpp:39
const SystemMatrixType & scMatrix() const
Returns the static condensation recovery operator.
Definition lasddr-yangmills.hpp:270
const Eigen::VectorXd & systemVectorNewton() const
Returns the linear system right-hand side vector.
Definition lasddr-yangmills.hpp:240
std::vector< TForcingTermType > TLAForcingTermType
Lie algebra valued functions with time component.
Definition lasddr-yangmills.hpp:69
SystemMatrixType & systemMatrix()
Returns the linear system matrix.
Definition lasddr-yangmills.hpp:235
std::function< outValue(const Eigen::Vector3d &)> contractPara(const TFct &F, double t) const
Takes a two parameter function and a value and returns a function with the first parameter fixed to v...
Definition lasddr-yangmills.hpp:296
const LASXGrad & laSXGrad() const
Returns the space LAXGrad.
Definition lasddr-yangmills.hpp:194
size_t dimensionSpace() const
Returns the global problem dimension.
Definition lasddr-yangmills.hpp:158
Eigen::VectorXd computeConstraint(const Eigen::VectorXd &E, const Eigen::VectorXd &A, const double nonlinear_coeff)
Computes the constraint [E, grad P'] + int <E, [A, P']> for the DOFs.
const double & stabilizationParameter() const
Returns the stabilization parameter.
Definition lasddr-yangmills.hpp:280
size_t sizeSystem() const
Returns the size of the system.
Definition lasddr-yangmills.hpp:182
double computeResidual(const Eigen::VectorXd &x) const
Calculates residual with current matrix and rhs from given x (m_A*x = m_b)
size_t nbSCDOFs_E() const
Returns the number of statically condensed DOFs (Electric field)
Definition lasddr-yangmills.hpp:164
std::vector< TElectricFieldType > TLAElectricFieldType
Definition lasddr-yangmills.hpp:70
const Eigen::VectorXd & systemVector() const
Returns the right-hand side to the nonlinear problem.
Definition lasddr-yangmills.hpp:250
double stoppingCrit(const Eigen::VectorXd &v, const Eigen::VectorXd &u)
Stops once changes become small.
void setNonlinearRes(const Eigen::VectorXd &Elambda_k, const Eigen::VectorXd &E_i, const Eigen::VectorXd &A_i, double dt, double theta, double nonlinear_coeff)
Sets the nonlinear residual vector b-F(x_k) in m_b_k.
Definition lasddr-yangmills.cpp:632
std::vector< MagneticFieldType > LAMagneticFieldType
Definition lasddr-yangmills.hpp:67
std::function< Eigen::Vector3d(const double &, const Eigen::Vector3d &)> TElectricFieldType
Definition lasddr-yangmills.hpp:62
double & stabilizationParameter()
Returns the stabilization parameter.
Definition lasddr-yangmills.hpp:285
const SystemMatrixType & systemMatrix() const
Returns the linear system matrix.
Definition lasddr-yangmills.hpp:230
std::pair< double, double > computeConditionNum() const
const LieAlgebra & lieAlg() const
Returns the Lie algebra.
Definition lasddr-yangmills.hpp:188
std::function< Eigen::Vector3d(const Eigen::Vector3d &)> MagneticFieldType
Definition lasddr-yangmills.hpp:59
void setSystemVector(const Eigen::VectorXd &interp_f, const Eigen::VectorXd &interp_dE, const Eigen::VectorXd &interp_A, const Eigen::VectorXd &E_i, const Eigen::VectorXd &A_i, double dt, double theta, double nonlinear_coeff)
Sets system vector for the nonlinear problem.
void addBoundaryConditions(const LAMagneticFieldType &curl_A, double dt)
Adds boundary condition for chosen solution to the system vector.
std::function< Eigen::Vector3d(const double &, const Eigen::Vector3d &)> TMagneticFieldType
Definition lasddr-yangmills.hpp:63
Eigen::VectorXd & scVector()
Returns the static condensation rhs.
Definition lasddr-yangmills.hpp:275
std::vector< ElectricFieldType > LAElectricFieldType
Definition lasddr-yangmills.hpp:66
const Eigen::VectorXd & nonlinearRes() const
Returns the right-hand side to the nonlinear problem.
Definition lasddr-yangmills.hpp:260
Eigen::SparseMatrix< double > SystemMatrixType
Definition lasddr-yangmills.hpp:55
size_t nbSCDOFs_lambda() const
Returns the number of statically condensed DOFs (lambda)
Definition lasddr-yangmills.hpp:170
Eigen::VectorXd & nonlinearRes()
Returns the right-hand side to the nonlinear problem.
Definition lasddr-yangmills.hpp:265
Eigen::VectorXd & systemVectorNewton()
Returns the linear system right-hand side vector.
Definition lasddr-yangmills.hpp:245
Eigen::VectorXd & systemVector()
Returns the right-hand side to the nonlinear problem.
Definition lasddr-yangmills.hpp:255
const SXCurl & xSCurl() const
Returns the space XDiv.
Definition lasddr-yangmills.hpp:218
std::vector< YangMillsNorms > computeYangMillsNorms(const std::vector< Eigen::VectorXd > &list_dofs) const
Compute the discrete L2 norms, for a family of Eigen::VectorXd representing the electric field and po...
const LASXDiv & laSXDiv() const
Returns the space LAXCurl.
Definition lasddr-yangmills.hpp:206
void assembleLinearSystem(double dt)
Assemble the global system
std::vector< ForcingTermType > LAForcingTermType
Lie algebra valued functions (vector of dim Lie algebra)
Definition lasddr-yangmills.hpp:65
std::vector< TMagneticFieldType > TLAMagneticFieldType
Definition lasddr-yangmills.hpp:71
std::vector< Fct > contractParaLA(const std::vector< TFct > &TF, double t) const
Takes a vector of two parameter functions and a value and returns a function with the first parameter...
Definition lasddr-yangmills.hpp:303
Definition ddr-magnetostatics.hpp:41
static Einstein::TOneFormType linear_E2
Definition ecddr-einstein-dtb.hpp:1575
static Einstein::TCollection1Forms linear_E
Definition ecddr-einstein-dtb.hpp:1584
static Einstein::TOneFormType linear_E1
Definition ecddr-einstein-dtb.hpp:1570
static Einstein::TOneFormType linear_E3
Definition ecddr-einstein-dtb.hpp:1580
Structure to store information for, and perform, local static condensation.
Definition local_static_condensation.hpp:25
Struct to store the systems and vector.
Definition parallel_for.hpp:18
Assemble a YangMills problem.
Definition laddr-yangmills-lm.hpp:53