HArD::Core3D
Hybrid Arbitrary Degree::Core 3D - Library to implement 3D schemes with vertex, edge, face and cell polynomials as unknowns
Loading...
Searching...
No Matches
ecddr-einstein.hpp
Go to the documentation of this file.
1// Implementation of the discrete exterior calculus de Rham sequence for Einstein's equations in differential form formulation.
2//
3// Author: Jia Jia Qian(jiajia.qian1@monash.edu)
4//
5/*
6 *
7 * If using this scheme in scientific publications, please cite the following article:
8 *
9 * A polytopal discrete de Rham scheme for the exterior calculus Einstein's equations
10 * Todd A. Oliynyk and Jia Jia Qian
11 * arxiv: https://arxiv.org/abs/2505.00286
12 */
13
14
15#ifndef ECDDR_EINSTEIN_HPP
16#define ECDDR_EINSTEIN_HPP
17
18#include <iostream>
19
20#include <boost/math/constants/constants.hpp>
21
22#include <Eigen/Sparse>
23#include <unsupported/Eigen/SparseExtra>
24
25#include <mesh.hpp>
26#include <mesh_builder.hpp>
28#include <linearsolver.hpp>
29#include <parallel_for.hpp>
30
31#include "ddr_spaces.hpp"
32#include "ddr_pec.hpp"
33#include "ddr_spaces.hpp"
34
35namespace HArDCore3D
36{
38 struct EinsteinNorms
39 {
41 EinsteinNorms(Eigen::VectorXd norm_D, Eigen::VectorXd norm_theta):
42 D(norm_D),
44 {
45 // do nothing
46 };
47
48 // Constructor without arguments
50
51 Eigen::VectorXd D;
52 Eigen::VectorXd theta;
53 };
54
56 struct Einstein
57 {
58 typedef Eigen::SparseMatrix<double> SystemMatrixType;
59
60 typedef std::function<double(const Eigen::Vector3d &)> ZeroFormType;
61 typedef std::function<Eigen::Vector3d(const Eigen::Vector3d &)> OneFormType;
62 typedef std::function<Eigen::Vector3d(const Eigen::Vector3d &)> TwoFormType;
63 typedef std::function<double(const Eigen::Vector3d &)> ThreeFormType;
65
66 typedef std::vector<ZeroFormType> Collection0Forms;
67 typedef std::vector<OneFormType> Collection1Forms;
68 typedef std::vector<TwoFormType> Collection2Forms;
69 typedef std::vector<ThreeFormType> Collection3Forms;
70
71 typedef std::function<double(const double t, const Eigen::Vector3d &)> TZeroFormType;
72 typedef std::function<Eigen::Vector3d(const double t, const Eigen::Vector3d &)> TOneFormType;
73 typedef std::function<Eigen::Vector3d(const double t, const Eigen::Vector3d &)> TTwoFormType;
74 typedef std::function<double(const double t, const Eigen::Vector3d &)> TThreeFormType;
76
77 typedef std::vector<ZeroFormType> TCollection0Forms;
78 typedef std::vector<TOneFormType> TCollection1Forms;
79 typedef std::vector<TTwoFormType> TCollection2Forms;
80 typedef std::vector<TThreeFormType> TCollection3Forms;
81
82 typedef std::function<Eigen::Vector3d(const Eigen::MatrixXd & E, const Eigen::MatrixXd & B)> CompositeHType;
83 typedef std::vector<CompositeHType> CollectionHforms;
84 typedef std::function<Eigen::Vector3d(const Eigen::MatrixXd & D)> CompositeEType;
85 typedef std::vector<CompositeEType> CollectionEforms;
86 typedef std::function<Eigen::Vector3d(const Eigen::VectorXd & E0, const Eigen::VectorXd & D0, const Eigen::MatrixXd & H, const Eigen::MatrixXd & E, const Eigen::MatrixXd & D, const Eigen::MatrixXd & B)> CompositeUType;
87 typedef std::vector<CompositeUType> CollectionUforms;
88
91 const DDR_Spaces & ddrspaces,
92 bool use_threads,
93 double stab_par,
94 std::ostream & output = std::cout
95 );
96
97 //--------------------------------------------------
98 // Methods to assemble and solve
99 //--------------------------------------------------
100
101 Eigen::VectorXd updateLapse(double dt, Eigen::VectorXd & lapse_n, Eigen::VectorXd & starDtB);
102
104 double dt,
105 const ZeroFormType & lapse,
106 const OneFormType & E0,
107 const Eigen::VectorXd & starDt
108 );
109
111 double dt,
112 const ZeroFormType & lapse_n,
113 const std::vector<TwoFormType> & D,
114 const std::vector<OneFormType> & theta,
115 const std::vector<TwoFormType> & B,
116 const std::vector<TwoFormType> & dtD,
117 const std::vector<OneFormType> & E,
118 const std::vector<OneFormType> & H,
119 const std::vector<TwoFormType> & dH
120 );
121
122
124 const Eigen::VectorXd & starD
125 );
126
128 std::vector<EinsteinNorms> computeEinsteinNorms(
129 const std::vector<Eigen::VectorXd> & list_dofs
130 ) const;
131
132 std::pair<EinsteinNorms, EinsteinNorms> computeContinuousErrorsNorms(
133 const Eigen::VectorXd & starDt,
134 const std::vector<OneFormType> & starD,
135 const std::vector<TwoFormType> & theta
136 ) const;
137
139 Eigen::MatrixXd basisChange(
140 size_t k,
141 const Eigen::MatrixXd & forms,
142 const Eigen::MatrixXd & basis
143 ) const;
144
146 Eigen::MatrixXd contractIndex(
147 size_t index,
148 const Eigen::MatrixXd & twoForm1,
149 const Eigen::MatrixXd & twoForm2
150 ) const;
151
153 Eigen::Vector3d wedge11(
154 const Eigen::Vector3d & form1,
155 const Eigen::Vector3d & form2
156 ) const;
157
159 Eigen::Matrix3d expand2Form(
160 const Eigen::Vector3d & form
161 ) const;
162
163 //--------------------------------------------------------
164 // Nonlinear calculations
165 //--------------------------------------------------------
166
168 composite_orth_H0 = [](const Eigen::VectorXd & orth_E0, const Eigen::Matrix3d & orth_B) -> Eigen::Vector3d {
169 return Eigen::Vector3d(
170 0,
171 0,
172 0
173 );
174 };
175
177 composite_orth_H1 = [](const Eigen::VectorXd & orth_E0, const Eigen::Matrix3d & orth_B) -> Eigen::Vector3d {
178 return Eigen::Vector3d(
179 -0.5*(-orth_B(1,1)+orth_B(0,2))+0.5*orth_B(2,0),
180 orth_E0(2)+orth_B(2,1),
181 -orth_E0(1)+orth_B(2,2)
182 );
183 };
184
186 composite_orth_H2 = [](const Eigen::VectorXd & orth_E0, const Eigen::Matrix3d & orth_B) -> Eigen::Vector3d {
187 return Eigen::Vector3d(
188 -orth_E0(2)-orth_B(1,0),
189 -0.5*(orth_B(0,2)+orth_B(2,0))-0.5*orth_B(1,1),
190 orth_E0(0)-orth_B(1,2)
191 );
192 };
193
195 composite_orth_H3 = [](const Eigen::VectorXd & orth_E0, const Eigen::Matrix3d & orth_B) -> Eigen::Vector3d {
196 return Eigen::Vector3d(
197 orth_E0(1)+orth_B(0,0),
198 -orth_E0(0)+orth_B(0,1),
199 -0.5*(orth_B(2,0)-orth_B(1,1))+0.5*orth_B(0,2)
200 );
201 };
202
204
206 composite_orth_E0 = [](const Eigen::Matrix3d & orth_D) -> Eigen::Vector3d {
207 return Eigen::Vector3d(
208 0,
209 0,
210 0
211 );
212 };
213
215 composite_orth_E1 = [](const Eigen::Matrix3d & orth_D) -> Eigen::Vector3d {
216 Eigen::Matrix3d starD = Eigen::Matrix<double,3,3>{{0.,0.,1.},{0.,-1.,0.},{1.,0.,0.}} * orth_D;
217 return Eigen::Vector3d(
218 -0.5*starD(0,0)+0.5*(starD(1,1)+starD(2,2)),
219 -starD(0,1),
220 -starD(0,2)
221 );
222 };
223
225 composite_orth_E2 = [](const Eigen::Matrix3d & orth_D) -> Eigen::Vector3d {
226 Eigen::Matrix3d starD = Eigen::Matrix<double,3,3>{{0.,0.,1.},{0.,-1.,0.},{1.,0.,0.}} * orth_D;
227 return Eigen::Vector3d(
228 -starD(1,0),
229 -0.5*starD(1,1)+0.5*starD(0,0)+0.5*starD(2,2),
230 -starD(1,2)
231 );
232 };
233
235 composite_orth_E3 = [](const Eigen::Matrix3d & orth_D) -> Eigen::Vector3d {
236 Eigen::Matrix3d starD = Eigen::Matrix<double,3,3>{{0.,0.,1.},{0.,-1.,0.},{1.,0.,0.}} * orth_D;
237 return Eigen::Vector3d(
238 -starD(2,0),
239 -starD(2,1),
240 -0.5*starD(2,2)+0.5*starD(0,0)+0.5*starD(1,1)
241 );
242 };
243
245
247 composite_orth_U0 = [](const Eigen::Vector3d & E0, const Eigen::Vector3d & D0, const Eigen::Matrix3d & H, const Eigen::Matrix3d & E, const Eigen::Matrix3d & D, const Eigen::Matrix3d & B) -> Eigen::Vector3d {
248 return Eigen::Vector3d(
249 0,
250 0,
251 0
252 );
253 };
254
256 composite_orth_U1 = [](const Eigen::Vector3d & E0, const Eigen::Vector3d & D0, const Eigen::Matrix3d & H, const Eigen::Matrix3d & E, const Eigen::Matrix3d & D, const Eigen::Matrix3d & B) -> Eigen::Vector3d {
257 Eigen::Matrix<double,3,3> hstar{{0.,0.,1.},{0.,-1.,0.},{1.,0.,0.}};
258 Eigen::Vector3d starD0 = hstar * D0;
259 Eigen::Matrix3d starD = hstar * D;
260 Eigen::Matrix3d starB = hstar * B;
261 Eigen::MatrixXd starU = Eigen::MatrixXd::Identity(3,3)
262 * 0.5 * (E0.transpose()*starD0 + (E.transpose()*starD).trace()
263 - (H.transpose()*starB).trace())
264 - starD0*E0.transpose() - starD * E.transpose() + starB * H.transpose();
265 return (hstar*starU).col(0);
266 };
267
269 composite_orth_U2 = [](const Eigen::Vector3d & E0, const Eigen::Vector3d & D0, const Eigen::Matrix3d & H, const Eigen::Matrix3d & E, const Eigen::Matrix3d & D, const Eigen::Matrix3d & B) -> Eigen::Vector3d {
270 Eigen::Matrix<double,3,3> hstar{{0.,0.,1.},{0.,-1.,0.},{1.,0.,0.}};
271 Eigen::Vector3d starD0 = hstar * D0;
272 Eigen::Matrix3d starD = hstar * D;
273 Eigen::Matrix3d starB = hstar * B;
274 Eigen::MatrixXd starU = Eigen::MatrixXd::Identity(3,3)
275 * 0.5 * (E0.transpose()*starD0 + (E.transpose()*starD).trace()
276 - (H.transpose()*starB).trace())
277 - starD0*E0.transpose() - starD * E.transpose() + starB * H.transpose();
278 return (hstar*starU).col(1);
279 };
280
282 composite_orth_U3 = [](const Eigen::Vector3d & E0, const Eigen::Vector3d & D0, const Eigen::Matrix3d & H, const Eigen::Matrix3d & E, const Eigen::Matrix3d & D, const Eigen::Matrix3d & B) -> Eigen::Vector3d {
283 Eigen::Matrix<double,3,3> hstar{{0.,0.,1.},{0.,-1.,0.},{1.,0.,0.}};
284 Eigen::Vector3d starD0 = hstar * D0;
285 Eigen::Matrix3d starD = hstar * D;
286 Eigen::Matrix3d starB = hstar * B;
287 Eigen::MatrixXd starU = Eigen::MatrixXd::Identity(3,3)
288 * 0.5 * (E0.transpose()*starD0 + (E.transpose()*starD).trace()
289 - (H.transpose()*starB).trace())
290 - starD0*E0.transpose() - starD * E.transpose() + starB * H.transpose();
291 return (hstar*starU).col(2);
292 };
293
295
296 //------------------------------------------------------------------
297 // Getters: dimension of space and numbers of unknowns of various types
298 //------------------------------------------------------------------
299
301 inline size_t dimensionSpace() const
302 {
303 return 3*(m_ddrspaces.dofspace(1).dimension() + m_ddrspaces.dofspace(1).dimension());
304 }
305
306 //--------------------------------------------------------
307 // Getters: underlying ECDDR sequence
308 //--------------------------------------------------------
309
311 inline const DDR_Spaces & ddrSpaces() const
312 {
313 return m_ddrspaces;
314 }
315
316 //-------------------------------------------------
317 // Matrices and RHS
318 //-------------------------------------------------
319
321 inline const SystemMatrixType & systemMatrix() const {
322 return m_A;
323 }
324
327 return m_A;
328 }
329
331 inline const Eigen::VectorXd & systemVector() const {
332 return m_b;
333 }
334
336 inline Eigen::VectorXd & systemVector() {
337 return m_b;
338 }
339
340 //-------------------------------------------
341 // Getters: various parameters
342 //-------------------------------------------
343
345 inline const double & stabilizationParameter() const {
346 return m_stab_par;
347 }
348
350 inline double & stabilizationParameter() {
351 return m_stab_par;
352 }
353
354 inline double & min_detTheta() {
355 return m_min_detTheta;
356 }
357
358 //-------------------------------------------
359 // Manipulate functions
360 //-------------------------------------------
361
363 template<typename outValue, typename TFct>
364 std::function<outValue(const Eigen::Vector3d &)> contractPara(const TFct &F, double t) const
365 {
366 std::function<outValue(const Eigen::Vector3d &)> f = [&F, t](const Eigen::Vector3d &x) -> outValue {return F(t, x);};
367 return f;
368 }
370 template<typename outValue, typename Fct, typename TFct>
371 std::vector<Fct> contractParaVec(const std::vector<TFct> &TF, double t) const
372 {
373 std::vector<Fct> f;
374 for (size_t i = 0; i < TF.size(); i++){
375 f.emplace_back(contractPara<outValue>(TF[i], t));
376 }
377 return f;
378 }
379
380 private:
381
383 void _assemble_local_contribution(
384 size_t iT,
386 std::vector<std::list<Eigen::Triplet<double>>> & triplets_sys,
387 std::vector<Eigen::VectorXd> & vec
388 );
389
391 _compute_local_contribution(
392 const double dt,
393 const size_t iT,
394 const ZeroFormType & lapse,
395 const OneFormType & E0,
396 const Eigen::VectorXd & starDtB
397 );
398
399 std::tuple<Eigen::VectorXd, Eigen::VectorXd, Eigen::MatrixXd, Eigen::MatrixXd, double>
400 _compute_nonlinear_relations(
401 const size_t iT,
402 const ZeroFormType & lapse,
403 const OneFormType & E0,
404 const Eigen::VectorXd & starDtB
405 );
406
407 // Constructor parameter
408 const DDR_Spaces & m_ddrspaces;
409 bool m_use_threads;
410 std::ostream & m_output;
411
412 // Product matrix and RHS
414 Eigen::VectorXd m_b;
415 SystemMatrixType m_L2_X1;
416 double m_stab_par;
417 double m_min_detTheta;
418 };
419
420 static const double PI = boost::math::constants::pi<double>();
421 using std::sin;
422 using std::cos;
423 using std::pow;
424 using std::cyl_bessel_j;
425
426 //------------------------------------------------------------------------------
427 // Hodge star of functions
428 //------------------------------------------------------------------------------
429
430 // Hodge star of a continuous function with space and time variables
431 std::function<Eigen::Vector3d(double t, const Eigen::Vector3d &)> star(const std::function<Eigen::Vector3d(double t, const Eigen::Vector3d &)> &F)
432 {
433 std::function<Eigen::Vector3d(double t, const Eigen::Vector3d &)> f = [&F](double t, const Eigen::Vector3d &x) -> Eigen::Vector3d {return Eigen::Matrix<double,3,3>{{0.,0.,1.},{0.,-1.,0.},{1.,0.,0.}}*F(t, x);};
434 return f;
435 }
436 // Hodge star of a continuous function with space variable
437 std::function<Eigen::Vector3d(const Eigen::Vector3d &)> star(const std::function<Eigen::Vector3d(const Eigen::Vector3d &)> &F)
438 {
439 std::function<Eigen::Vector3d(const Eigen::Vector3d &)> f = [&F](const Eigen::Vector3d &x) -> Eigen::Vector3d {return Eigen::Matrix<double,3,3>{{0.,0.,1.},{0.,-1.,0.},{1.,0.,0.}}*F(x);};
440 return f;
441 }
442 // Hodge star of a collection of functions in a vector
443 template<typename Fct>
444 std::vector<Fct> starCol(const std::vector<Fct> &F)
445 {
446 std::vector<Fct> f;
447 for (size_t i = 0; i < F.size(); i++){
448 f.emplace_back(star(F[i]));
449 }
450 return f;
451 }
452 // Random noise function
453 std::function<Eigen::Vector3d(const Eigen::Vector3d &)> noise(const std::function<Eigen::Vector3d(const Eigen::Vector3d &)> &f)
454 {
455 std::function<Eigen::Vector3d(const Eigen::Vector3d &)> fnoise = [f](const Eigen::Vector3d &x) -> Eigen::Vector3d {return f(x)+Eigen::Vector3d::Random()*1e-10;};
456
457 return fnoise;
458 }
459
460
461 //------------------------------------------------------------------------------
462 // Minkowski solution (D, theta, B)
463 //------------------------------------------------------------------------------
464
466 minkowski_lapse = [](const double t, const Eigen::Vector3d & x) -> double {
467 return 1.0;
468 };
469
471 minkowski_theta0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
472 return Eigen::Vector3d(
473 0,
474 0,
475 0
476 );
477 };
478
480 minkowski_theta1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
481 return Eigen::Vector3d(
482 1.,
483 0,
484 0
485 );
486 };
487
489 minkowski_theta2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
490 return Eigen::Vector3d(
491 0,
492 1.,
493 0
494 );
495 };
496
498 minkowski_theta3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
499 return Eigen::Vector3d(
500 0,
501 0,
502 1.
503 );
504 };
505
507
509 minkowski_E0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
510 return Eigen::Vector3d(
511 0,
512 0,
513 0
514 );
515 };
516
518 minkowski_E1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
519 return Eigen::Vector3d(
520 0,
521 0,
522 0
523 );
524 };
525
527 minkowski_E2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
528 return Eigen::Vector3d(
529 0,
530 0,
531 0
532 );
533 };
534
536 minkowski_E3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
537 return Eigen::Vector3d(
538 0,
539 0,
540 0
541 );
542 };
543
545
547 minkowski_dE0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
548 return Eigen::Vector3d(
549 0,
550 0,
551 0
552 );
553 };
554
556 minkowski_dE1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
557 return Eigen::Vector3d(
558 0,
559 0,
560 0
561 );
562 };
563
565 minkowski_dE2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
566 return Eigen::Vector3d(
567 0,
568 0,
569 0
570 );
571 };
572
574 minkowski_dE3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
575 return Eigen::Vector3d(
576 0,
577 0,
578 0
579 );
580 };
581
583
585 minkowski_B0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
586 return Eigen::Vector3d(
587 0,
588 0,
589 0
590 );
591 };
592
594 minkowski_B1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
595 return Eigen::Vector3d(
596 0,
597 0,
598 0
599 );
600 };
601
603 minkowski_B2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
604 return Eigen::Vector3d(
605 0,
606 0,
607 0
608 );
609 };
610
612 minkowski_B3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
613 return Eigen::Vector3d(
614 0,
615 0,
616 0
617 );
618 };
619
621
623 minkowski_dtB0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
624 return Eigen::Vector3d(
625 0,
626 0,
627 0
628 );
629 };
630
632 minkowski_dtB1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
633 return Eigen::Vector3d(
634 0,
635 0,
636 0
637 );
638 };
639
641 minkowski_dtB2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
642 return Eigen::Vector3d(
643 0,
644 0,
645 0
646 );
647 };
648
650 minkowski_dtB3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
651 return Eigen::Vector3d(
652 0,
653 0,
654 0
655 );
656 };
657
659
661 minkowski_D0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
662 return Eigen::Vector3d(
663 0,
664 0,
665 0
666 );
667 };
668
670 minkowski_D1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
671 return Eigen::Vector3d(
672 0,
673 0,
674 0
675 );
676 };
677
679 minkowski_D2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
680 return Eigen::Vector3d(
681 0,
682 0,
683 0
684 );
685 };
686
688 minkowski_D3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
689 return Eigen::Vector3d(
690 0,
691 0,
692 0
693 );
694 };
695
697
699 minkowski_dtD0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
700 return Eigen::Vector3d(
701 0,
702 0,
703 0
704 );
705 };
706
708 minkowski_dtD1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
709 return Eigen::Vector3d(
710 0,
711 0,
712 0
713 );
714 };
715
717 minkowski_dtD2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
718 return Eigen::Vector3d(
719 0,
720 0,
721 0
722 );
723 };
724
726 minkowski_dtD3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
727 return Eigen::Vector3d(
728 0,
729 0,
730 0
731 );
732 };
733
735
737 minkowski_H0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
738 return Eigen::Vector3d(
739 0,
740 0,
741 0
742 );
743 };
744
746 minkowski_H1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
747 return Eigen::Vector3d(
748 0,
749 0,
750 0
751 );
752 };
753
755 minkowski_H2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
756 return Eigen::Vector3d(
757 0,
758 0,
759 0
760 );
761 };
762
764 minkowski_H3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
765 return Eigen::Vector3d(
766 0,
767 0,
768 0
769 );
770 };
771
773
775 minkowski_dH0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
776 return Eigen::Vector3d(
777 0,
778 0,
779 0
780 );
781 };
782
784 minkowski_dH1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
785 return Eigen::Vector3d(
786 0,
787 0,
788 0
789 );
790 };
791
793 minkowski_dH2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
794 return Eigen::Vector3d(
795 0,
796 0,
797 0
798 );
799 };
800
802 minkowski_dH3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
803 return Eigen::Vector3d(
804 0,
805 0,
806 0
807 );
808 };
809
811
812 //------------------------------------------------------------------------------
813 // Kasner solution (D, theta, B) (1/2, 1/4(1-sqrt(5)), 1/4(1+sqrt(5)))
814 //------------------------------------------------------------------------------
815
817 kasner_lapse = [](const double t, const Eigen::Vector3d & x) -> double {
818 return pow(t, 1.0);
819 };
820
822 kasner_theta0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
823 return Eigen::Vector3d(0, 0, 0);
824 };
825
827 kasner_theta1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
828 return Eigen::Vector3d(sqrt(t), 0, 0);
829 };
830
832 kasner_theta2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
833 return Eigen::Vector3d(0, pow(t, -0.30901699437494745), 0);
834 };
835
837 kasner_theta3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
838 return Eigen::Vector3d(0, 0, pow(t, 0.80901699437494745));
839 };
840
842
843 // This is E0 = 1/N dN
845 kasner_E0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
846 return Eigen::Vector3d(0, 0, 0);
847 };
848
850 kasner_E1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
851 return Eigen::Vector3d(0.5*pow(t, -0.5), 0, 0);
852 };
853
855 kasner_E2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
856 return Eigen::Vector3d(0, -0.30901699437494745*pow(t, -1.3090169943749475), 0);
857 };
858
860 kasner_E3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
861 return Eigen::Vector3d(0, 0, 0.80901699437494745*pow(t, -0.19098300562505255));
862 };
863
865
866//------------------------------------------------------------------------------
867
869 kasner_D0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
870 return Eigen::Vector3d(0, 0, 0);
871 };
872
874 kasner_D1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
875 return Eigen::Vector3d(0, 0, 0.5*pow(t, -0.5));
876 };
877
879 kasner_D2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
880 return Eigen::Vector3d(0, -1.3090169943749475*pow(t, 0.30901699437494745), 0);
881 };
882
884 kasner_D3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
885 return Eigen::Vector3d(0.19098300562505255*pow(t, -0.80901699437494745), 0, 0);
886 };
887
889
890//------------------------------------------------------------------------------
891
893 kasner_dtD0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
894 return Eigen::Vector3d(0, 0, 0);
895 };
896
898 kasner_dtD1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
899 return Eigen::Vector3d(0, 0, -0.25*pow(t, -1.5));
900 };
901
903 kasner_dtD2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
904 return Eigen::Vector3d(0, -0.40450849718747378*pow(t, -0.69098300562505255), 0);
905 };
906
908 kasner_dtD3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
909 return Eigen::Vector3d(-0.1545084971874737*pow(t, -1.8090169943749475), 0, 0);
910 };
911
913
914//------------------------------------------------------------------------------
915
917 kasner_B0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
918 return Eigen::Vector3d(0, 0, 0);
919 };
920
922 kasner_B1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
923 return Eigen::Vector3d(0, 0, 0);
924 };
925
927 kasner_B2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
928 return Eigen::Vector3d(0, 0, 0);
929 };
930
932 kasner_B3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
933 return Eigen::Vector3d(0, 0, 0);
934 };
935
937
938//------------------------------------------------------------------------------
939
941 kasner_H0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
942 return Eigen::Vector3d(0, 0, 0);
943 };
944
946 kasner_H1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
947 return Eigen::Vector3d(0, 0, 0);
948 };
949
951 kasner_H2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
952 return Eigen::Vector3d(0, 0, 0);
953 };
954
956 kasner_H3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
957 return Eigen::Vector3d(0, 0, 0);
958 };
959
961
962//------------------------------------------------------------------------------
963
965 kasner_dH0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
966 return Eigen::Vector3d(0, 0, 0);
967 };
968
970 kasner_dH1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
971 return Eigen::Vector3d(0, 0, 0);
972 };
973
975 kasner_dH2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
976 return Eigen::Vector3d(0, 0, 0);
977 };
978
980 kasner_dH3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
981 return Eigen::Vector3d(0, 0, 0);
982 };
983
985
986 //------------------------------------------------------------------------------
987 // Gowdy solution (D, theta, B)
988 //------------------------------------------------------------------------------
989
991 gowdy_lapse = [](const double t, const Eigen::Vector3d & x) -> double {
992 return pow(t, -0.25)*exp(0.5*pow(M_PI, 2)*pow(t, 2)*(pow(cyl_bessel_j(0, 2*M_PI*t), 2) + pow(cyl_bessel_j(1, 2*M_PI*t), 2)) - 0.5*M_PI*t*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t) - 0.5*pow(M_PI, 2)*(pow(cyl_bessel_j(1, 2*M_PI), 2) + pow(cyl_bessel_j(0, 2*M_PI), 2)) + 0.25*M_PI*cyl_bessel_j(0, 2*M_PI)*cyl_bessel_j(1, 2*M_PI));
993 };
994
996 gowdy_theta0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
997 return Eigen::Vector3d(
998 0,
999 0,
1000 0
1001 );
1002 };
1003
1005 gowdy_theta1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1006 return Eigen::Vector3d(
1007 sqrt(t)*exp(0.5*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t)),
1008 0,
1009 0
1010 );
1011 };
1012
1014 gowdy_theta2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1015 return Eigen::Vector3d(
1016 0,
1017 sqrt(t)*exp(-0.5*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t)),
1018 0
1019 );
1020 };
1021
1023 gowdy_theta3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1024 return Eigen::Vector3d(
1025 0,
1026 0,
1027 pow(t, -0.25)*exp(M_PI*( 0.5*M_PI*pow(t, 2)*(pow(cyl_bessel_j(0, 2*M_PI*t), 2) + pow(cyl_bessel_j(1, 2*M_PI*t), 2))
1028 -0.5*t*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t)
1029 -0.5*M_PI*(pow(cyl_bessel_j(1, 2*M_PI), 2) + pow(cyl_bessel_j(0, 2*M_PI), 2))
1030 + 0.25*cyl_bessel_j(0, 2*M_PI)*cyl_bessel_j(1, 2*M_PI)))
1031 );
1032 };
1033
1035
1037 gowdy_E0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1038 return Eigen::Vector3d(
1039 0,
1040 0,
1041 -1.0*pow(M_PI, 2)*pow(t, 1.0)*sin(4*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t)
1042 );
1043 };
1044
1046 gowdy_E1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1047 return Eigen::Vector3d(
1048 pow(t, -0.25)*(-1.0*M_PI*pow(t, 1.0)*cos(2*M_PI*x(2))*cyl_bessel_j(1, 2*M_PI*t) + 0.5)*exp(M_PI*(-0.5*M_PI*pow(t, 2)*(pow(cyl_bessel_j(0, 2*M_PI*t), 2) + pow(cyl_bessel_j(1, 2*M_PI*t), 2)) + 0.5*t*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t) - 0.25*cyl_bessel_j(0, 2*M_PI)*cyl_bessel_j(1, 2*M_PI) + 0.5*M_PI*(pow(cyl_bessel_j(1, 2*M_PI), 2) + pow(cyl_bessel_j(0, 2*M_PI), 2))) + 0.5*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t)),
1049 0,
1050 0
1051 );
1052 };
1053
1055 gowdy_E2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1056 return Eigen::Vector3d(
1057 0,
1058 pow(t, -0.25)*(1.0*M_PI*pow(t, 1.0)*cos(2*M_PI*x(2))*cyl_bessel_j(1, 2*M_PI*t) + 0.5)*exp(-0.5*pow(M_PI, 2)*pow(t, 2)*(pow(cyl_bessel_j(0, 2*M_PI*t), 2) + pow(cyl_bessel_j(1, 2*M_PI*t), 2)) + 0.5*M_PI*t*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t) - 0.5*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t) - 0.25*M_PI*cyl_bessel_j(0, 2*M_PI)*cyl_bessel_j(1, 2*M_PI) + 0.5*pow(M_PI, 2)*(pow(cyl_bessel_j(1, 2*M_PI), 2) + pow(cyl_bessel_j(0, 2*M_PI), 2))),
1059 0
1060 );
1061 };
1062
1064 gowdy_E3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1065 return Eigen::Vector3d(
1066 0,
1067 0,
1068 1.0/t*(-1.0*pow(M_PI, 2)*pow(t, 2.0)*pow(cos(2*M_PI*x(2)), 2)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) + 1.0*pow(M_PI, 2)*pow(t, 2.0)*pow(cos(2*M_PI*x(2)), 2)*pow(cyl_bessel_j(1, 2*M_PI*t), 2) + 1.0*pow(M_PI, 2)*pow(t, 2.0)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) - 0.25)
1069 );
1070 };
1071
1073
1075 gowdy_dE0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1076 return Eigen::Vector3d(
1077 0,
1078 0,
1079 0
1080 );
1081 };
1082
1084 gowdy_dE1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1085 return Eigen::Vector3d(
1086 0,
1087 0,
1088 1.0/t*(-1.0*pow(M_PI, 2)*pow(t, 2.0)*pow(cos(2*M_PI*x(2)), 2)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) + 1.0*pow(M_PI, 2)*pow(t, 2.0)*pow(cos(2*M_PI*x(2)), 2)*pow(cyl_bessel_j(1, 2*M_PI*t), 2) + 1.0*pow(M_PI, 2)*pow(t, 2.0)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) - 0.25)
1089 );
1090 };
1091
1093 gowdy_dE2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1094 return Eigen::Vector3d(
1095 0,
1096 0,
1097 1.0*M_PI*pow(t, -0.25)*(2.0*M_PI*pow(t, 1.0)*cyl_bessel_j(1, 2*M_PI*t) + 2.0*pow(M_PI, 2)*pow(t, 2.0)*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t)*pow(cyl_bessel_j(1, 2*M_PI*t), 2) - 0.5*cyl_bessel_j(0, 2*M_PI*t))*exp(-0.5*pow(M_PI, 2)*pow(t, 2)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) - 0.5*pow(M_PI, 2)*pow(t, 2)*pow(cyl_bessel_j(1, 2*M_PI*t), 2) + 0.5*M_PI*t*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t) - 0.5*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t) - 0.25*M_PI*cyl_bessel_j(0, 2*M_PI)*cyl_bessel_j(1, 2*M_PI) + 0.5*pow(M_PI, 2)*pow(cyl_bessel_j(1, 2*M_PI), 2) + 0.5*pow(M_PI, 2)*pow(cyl_bessel_j(0, 2*M_PI), 2))*sin(2*M_PI*x(2))
1098 );
1099 };
1100
1102 gowdy_dE3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1103 return Eigen::Vector3d(
1104 0,
1105 0,
1106 0
1107 );
1108 };
1109
1111
1113 gowdy_H0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1114 return Eigen::Vector3d(
1115 0,
1116 0,
1117 0
1118 );
1119 };
1120
1122 gowdy_H1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1123 return Eigen::Vector3d(
1124 0,
1125 M_PI*sqrt(t)*(-1.0*pow(t, 0.25) - 2.0*M_PI*pow(t, 1.25)*cos(2*M_PI*x(2))*cyl_bessel_j(1, 2*M_PI*t))*exp(-0.5*pow(M_PI, 2)*pow(t, 2)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) - 0.5*pow(M_PI, 2)*pow(t, 2)*pow(cyl_bessel_j(1, 2*M_PI*t), 2) + 0.5*M_PI*t*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t) - 0.5*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t) - 0.25*M_PI*cyl_bessel_j(0, 2*M_PI)*cyl_bessel_j(1, 2*M_PI) + 0.5*pow(M_PI, 2)*pow(cyl_bessel_j(1, 2*M_PI), 2) + 0.5*pow(M_PI, 2)*pow(cyl_bessel_j(0, 2*M_PI), 2))*sin(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t),
1126 0
1127 );
1128 };
1129
1131 gowdy_H2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1132 return Eigen::Vector3d(
1133 M_PI*sqrt(t)*(-1.0*pow(t, 0.25) + 2.0*M_PI*pow(t, 1.25)*cos(2*M_PI*x(2))*cyl_bessel_j(1, 2*M_PI*t))*exp(-0.5*pow(M_PI, 2)*pow(t, 2)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) - 0.5*pow(M_PI, 2)*pow(t, 2)*pow(cyl_bessel_j(1, 2*M_PI*t), 2) + 0.5*M_PI*t*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t) + 0.5*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t) - 0.25*M_PI*cyl_bessel_j(0, 2*M_PI)*cyl_bessel_j(1, 2*M_PI) + 0.5*pow(M_PI, 2)*pow(cyl_bessel_j(1, 2*M_PI), 2) + 0.5*pow(M_PI, 2)*pow(cyl_bessel_j(0, 2*M_PI), 2))*sin(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t),
1134 0,
1135 0
1136 );
1137 };
1138
1140 gowdy_H3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1141 return Eigen::Vector3d(
1142 0,
1143 0,
1144 0
1145 );
1146 };
1147
1149
1151 gowdy_dH0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1152 return Eigen::Vector3d(
1153 0,
1154 0,
1155 0
1156 );
1157 };
1158
1160 gowdy_dH1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1161 return Eigen::Vector3d(
1162 0,
1163 0,
1164 1.0*pow(M_PI, 2)*(1.0*pow(t, 0.75)*pow(sin(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t) + 2.0*pow(t, 0.75)*cos(2*M_PI*x(2)) - 4.0*M_PI*pow(t, 1.75)*pow(sin(2*M_PI*x(2)), 2)*cyl_bessel_j(1, 2*M_PI*t) + 4.0*M_PI*pow(t, 1.75)*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(1, 2*M_PI*t) - 4.0*pow(M_PI, 2)*pow(t, 2.75)*pow(sin(2*M_PI*x(2)), 2)*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t)*pow(cyl_bessel_j(1, 2*M_PI*t), 2))*exp(-0.5*pow(M_PI, 2)*pow(t, 2)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) - 0.5*pow(M_PI, 2)*pow(t, 2)*pow(cyl_bessel_j(1, 2*M_PI*t), 2) + 0.5*M_PI*t*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t) - 0.5*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t) - 0.25*M_PI*cyl_bessel_j(0, 2*M_PI)*cyl_bessel_j(1, 2*M_PI) + 0.5*pow(M_PI, 2)*pow(cyl_bessel_j(1, 2*M_PI), 2) + 0.5*pow(M_PI, 2)*pow(cyl_bessel_j(0, 2*M_PI), 2))*cyl_bessel_j(0, 2*M_PI*t)
1165 );
1166 };
1167
1169 gowdy_dH2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1170 return Eigen::Vector3d(
1171 0,
1172 1.0*pow(M_PI, 2)*(-1.0*pow(t, 0.75)*pow(sin(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t) + 2.0*pow(t, 0.75)*cos(2*M_PI*x(2)) + 4.0*M_PI*pow(t, 1.75)*pow(sin(2*M_PI*x(2)), 2)*cyl_bessel_j(1, 2*M_PI*t) - 4.0*M_PI*pow(t, 1.75)*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(1, 2*M_PI*t) + 4.0*pow(M_PI, 2)*pow(t, 2.75)*pow(sin(2*M_PI*x(2)), 2)*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t)*pow(cyl_bessel_j(1, 2*M_PI*t), 2))*exp(-0.5*pow(M_PI, 2)*pow(t, 2)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) - 0.5*pow(M_PI, 2)*pow(t, 2)*pow(cyl_bessel_j(1, 2*M_PI*t), 2) + 0.5*M_PI*t*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t) + 0.5*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t) - 0.25*M_PI*cyl_bessel_j(0, 2*M_PI)*cyl_bessel_j(1, 2*M_PI) + 0.5*pow(M_PI, 2)*pow(cyl_bessel_j(1, 2*M_PI), 2) + 0.5*pow(M_PI, 2)*pow(cyl_bessel_j(0, 2*M_PI), 2))*cyl_bessel_j(0, 2*M_PI*t),
1173 0
1174 );
1175 };
1176
1178 gowdy_dH3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1179 return Eigen::Vector3d(
1180 0,
1181 0,
1182 0
1183 );
1184 };
1185
1187
1189 gowdy_D0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1190 return Eigen::Vector3d(
1191 0,
1192 0,
1193 0
1194 );
1195 };
1196
1198 gowdy_D1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1199 return Eigen::Vector3d(
1200 0,
1201 0,
1202 pow(t, -0.5)*(1.0*M_PI*pow(t, 1.0)*cos(2*M_PI*x(2))*cyl_bessel_j(1, 2*M_PI*t) - 1.0*pow(M_PI, 2)*pow(t, 2.0)*pow(cos(2*M_PI*x(2)), 2)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) + 1.0*pow(M_PI, 2)*pow(t, 2.0)*pow(cos(2*M_PI*x(2)), 2)*pow(cyl_bessel_j(1, 2*M_PI*t), 2) + 1.0*pow(M_PI, 2)*pow(t, 2.0)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) + 0.25)*exp(-0.5*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t))
1203 );
1204 };
1205
1207 gowdy_D2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1208 return Eigen::Vector3d(
1209 0,
1210 pow(t, -0.5)*(1.0*M_PI*pow(t, 1.0)*cos(2*M_PI*x(2))*cyl_bessel_j(1, 2*M_PI*t) + 1.0*pow(M_PI, 2)*pow(t, 2.0)*pow(cos(2*M_PI*x(2)), 2)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) - 1.0*pow(M_PI, 2)*pow(t, 2.0)*pow(cos(2*M_PI*x(2)), 2)*pow(cyl_bessel_j(1, 2*M_PI*t), 2) - 1.0*pow(M_PI, 2)*pow(t, 2.0)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) - 0.25)*exp(0.5*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t)),
1211 0
1212 );
1213 };
1214
1216 gowdy_D3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1217 return Eigen::Vector3d(
1218 1.0*pow(t, 0.25)*exp(M_PI*(-0.5*M_PI*pow(t, 2)*(pow(cyl_bessel_j(0, 2*M_PI*t), 2) + pow(cyl_bessel_j(1, 2*M_PI*t), 2)) + 0.5*t*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t) - 0.25*cyl_bessel_j(0, 2*M_PI)*cyl_bessel_j(1, 2*M_PI) + 0.5*M_PI*(pow(cyl_bessel_j(1, 2*M_PI), 2) + pow(cyl_bessel_j(0, 2*M_PI), 2)))),
1219 0,
1220 0
1221 );
1222 };
1223
1225
1227 gowdy_dtD0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1228 return Eigen::Vector3d(
1229 0,
1230 0,
1231 0
1232 );
1233 };
1234
1236 gowdy_dtD1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1237 return Eigen::Vector3d(
1238 0,
1239 0,
1240 pow(t, -2.0)*(-0.125*sqrt(t) - 0.25*M_PI*pow(t, 1.5)*cos(2*M_PI*x(2))*cyl_bessel_j(1, 2*M_PI*t) - 1.5*pow(M_PI, 2)*pow(t, 2.5)*pow(cos(2*M_PI*x(2)), 2)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) + 0.5*pow(M_PI, 2)*pow(t, 2.5)*pow(cos(2*M_PI*x(2)), 2)*pow(cyl_bessel_j(1, 2*M_PI*t), 2) + 2.0*pow(M_PI, 2)*pow(t, 2.5)*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t) + 1.5*pow(M_PI, 2)*pow(t, 2.5)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) - 1.0*pow(M_PI, 3)*pow(t, 3.5)*pow(cos(2*M_PI*x(2)), 3)*pow(cyl_bessel_j(0, 2*M_PI*t), 2)*cyl_bessel_j(1, 2*M_PI*t) + 1.0*pow(M_PI, 3)*pow(t, 3.5)*pow(cos(2*M_PI*x(2)), 3)*pow(cyl_bessel_j(1, 2*M_PI*t), 3) + 8.0*pow(M_PI, 3)*pow(t, 3.5)*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t) + 1.0*pow(M_PI, 3)*pow(t, 3.5)*cos(2*M_PI*x(2))*pow(cyl_bessel_j(0, 2*M_PI*t), 2)*cyl_bessel_j(1, 2*M_PI*t) - 4.0*pow(M_PI, 3)*pow(t, 3.5)*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t))*exp(-0.5*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t))
1241 );
1242 };
1243
1245 gowdy_dtD2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1246 return Eigen::Vector3d(
1247 0,
1248 pow(t, -2.0)*(0.125*sqrt(t) - 0.25*M_PI*pow(t, 1.5)*cos(2*M_PI*x(2))*cyl_bessel_j(1, 2*M_PI*t) + 1.5*pow(M_PI, 2)*pow(t, 2.5)*pow(cos(2*M_PI*x(2)), 2)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) - 0.5*pow(M_PI, 2)*pow(t, 2.5)*pow(cos(2*M_PI*x(2)), 2)*pow(cyl_bessel_j(1, 2*M_PI*t), 2) + 2.0*pow(M_PI, 2)*pow(t, 2.5)*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t) - 1.5*pow(M_PI, 2)*pow(t, 2.5)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) - 1.0*pow(M_PI, 3)*pow(t, 3.5)*pow(cos(2*M_PI*x(2)), 3)*pow(cyl_bessel_j(0, 2*M_PI*t), 2)*cyl_bessel_j(1, 2*M_PI*t) + 1.0*pow(M_PI, 3)*pow(t, 3.5)*pow(cos(2*M_PI*x(2)), 3)*pow(cyl_bessel_j(1, 2*M_PI*t), 3) - 8.0*pow(M_PI, 3)*pow(t, 3.5)*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t) + 1.0*pow(M_PI, 3)*pow(t, 3.5)*cos(2*M_PI*x(2))*pow(cyl_bessel_j(0, 2*M_PI*t), 2)*cyl_bessel_j(1, 2*M_PI*t) + 4.0*pow(M_PI, 3)*pow(t, 3.5)*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t))*exp(0.5*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t)),
1249 0
1250 );
1251 };
1252
1254 gowdy_dtD3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1255 return Eigen::Vector3d(
1256 pow(t, -0.75)*(1.0*pow(M_PI, 2)*pow(t, 2.0)*pow(cos(2*M_PI*x(2)), 2)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) - 1.0*pow(M_PI, 2)*pow(t, 2.0)*pow(cos(2*M_PI*x(2)), 2)*pow(cyl_bessel_j(1, 2*M_PI*t), 2) - 1.0*pow(M_PI, 2)*pow(t, 2.0)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) + 0.25)*exp(M_PI*(-0.5*M_PI*pow(t, 2)*pow(cyl_bessel_j(0, 2*M_PI*t), 2) - 0.5*M_PI*pow(t, 2)*pow(cyl_bessel_j(1, 2*M_PI*t), 2) + 0.5*t*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t) - 0.25*cyl_bessel_j(0, 2*M_PI)*cyl_bessel_j(1, 2*M_PI) + 0.5*M_PI*pow(cyl_bessel_j(1, 2*M_PI), 2) + 0.5*M_PI*pow(cyl_bessel_j(0, 2*M_PI), 2))), 0,
1257 0
1258 );
1259 };
1260
1262
1264 gowdy_B0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1265 return Eigen::Vector3d(
1266 0,
1267 0,
1268 0
1269 );
1270 };
1271
1273 gowdy_B1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1274 return Eigen::Vector3d(
1275 0,
1276 1.0*M_PI*sqrt(t)*exp(0.5*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t))*sin(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t),
1277 0
1278 );
1279 };
1280
1282 gowdy_B2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1283 return Eigen::Vector3d(
1284 0,
1285 0,
1286 -1.0*M_PI*sqrt(t)*exp(-0.5*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t))*sin(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t)
1287 );
1288 };
1289
1291 gowdy_B3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1292 return Eigen::Vector3d(
1293 0,
1294 0,
1295 0
1296 );
1297 };
1298
1300
1302 gowdy_dtB0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1303 return Eigen::Vector3d(
1304 0,
1305 0,
1306 0
1307 );
1308 };
1309
1311 gowdy_dtB1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1312 return Eigen::Vector3d(
1313 0,
1314 M_PI*pow(t, -0.5)*(-M_PI*pow(t, 1.0)*(1.0*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t) + 2.0)*cyl_bessel_j(1, 2*M_PI*t) + 0.5*cyl_bessel_j(0, 2*M_PI*t))*exp(0.5*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t))*sin(2*M_PI*x(2)),
1315 0
1316 );
1317 };
1318
1320 gowdy_dtB2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1321 return Eigen::Vector3d(
1322 0,
1323 0,
1324 M_PI*pow(t, -0.5)*(M_PI*pow(t, 1.0)*(-1.0*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t) + 2.0)*cyl_bessel_j(1, 2*M_PI*t) - 0.5*cyl_bessel_j(0, 2*M_PI*t))*exp(-0.5*cos(2*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t))*sin(2*M_PI*x(2))
1325 );
1326 };
1327
1329 gowdy_dtB3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1330 return Eigen::Vector3d(
1331 0,
1332 0,
1333 0
1334 );
1335 };
1336
1338
1339 //------------------------------------------------------------------------------
1340 // Linear solution (D, theta, B)
1341 //------------------------------------------------------------------------------
1342
1344 linear_lapse = [](const double t, const Eigen::Vector3d & x) -> double {
1345 return pow(t, 3)*pow(x(0), 2)*x(1) + pow(t, 3)*pow(x(0), 2)*x(2) + pow(t, 3)*x(0)*pow(x(1), 2) + 2*pow(t, 3)*x(0)*x(1)*x(2) + pow(t, 3)*x(0)*pow(x(2), 2) + pow(t, 3)*pow(x(1), 2)*x(2) + pow(t, 3)*x(1)*pow(x(2), 2) + pow(t, 2)*pow(x(0), 2) + 3*pow(t, 2)*x(0)*x(1) + 3*pow(t, 2)*x(0)*x(2) + pow(t, 2)*pow(x(1), 2) + 3*pow(t, 2)*x(1)*x(2) + pow(t, 2)*pow(x(2), 2) + 2*t*x(0) + 2*t*x(1) + 2*t*x(2) + 1;
1346 };
1347
1349 linear_theta0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1350 return Eigen::Vector3d(0, 0, 0);
1351 };
1352
1354 linear_theta1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1355 return Eigen::Vector3d(t*(x(0) + x(1)) + 1, 0, 0);
1356 };
1357
1359 linear_theta2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1360 return Eigen::Vector3d(0, t*(x(1) + x(2)) + 1, 0);
1361 };
1362
1364 linear_theta3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1365 return Eigen::Vector3d(0, 0, t*(x(0) + x(2)) + 1);
1366 };
1367
1369
1372 linear_E0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1373 return Eigen::Vector3d(0, 0, 0);
1374 };
1375
1377 linear_E1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1378 return Eigen::Vector3d(1.0*x(0) + 1.0*x(1), 0, 0);
1379 };
1380
1382 linear_E2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1383 return Eigen::Vector3d(0, 1.0*x(1) + 1.0*x(2), 0);
1384 };
1385
1387 linear_E3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1388 return Eigen::Vector3d(0, 0, 1.0*x(0) + 1.0*x(2));
1389 };
1390
1392
1393 //------------------------------------------------------------------------------
1396 deth_linear_E0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1397 return Eigen::Vector3d(t*(-2*t*x(0) - t*x(1) - t*x(2) - 2)/(pow(t, 2)*pow(x(0), 2) + pow(t, 2)*x(0)*x(1) + pow(t, 2)*x(0)*x(2) + pow(t, 2)*x(1)*x(2) + 2*t*x(0) + t*x(1) + t*x(2) + 1), t*(-t*x(0) - 2*t*x(1) - t*x(2) - 2)/(pow(t, 2)*x(0)*x(1) + pow(t, 2)*x(0)*x(2) + pow(t, 2)*pow(x(1), 2) + pow(t, 2)*x(1)*x(2) + t*x(0) + 2*t*x(1) + t*x(2) + 1), t*(-t*x(0) - t*x(1) - 2*t*x(2) - 2)/(pow(t, 2)*x(0)*x(1) + pow(t, 2)*x(0)*x(2) + pow(t, 2)*x(1)*x(2) + pow(t, 2)*pow(x(2), 2) + t*x(0) + t*x(1) + 2*t*x(2) + 1));
1398 };
1399
1401 deth_linear_E1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1402 return Eigen::Vector3d((x(0) + x(1))/(pow(t, 3)*pow(x(0), 2)*x(1) + pow(t, 3)*pow(x(0), 2)*x(2) + pow(t, 3)*x(0)*pow(x(1), 2) + 2*pow(t, 3)*x(0)*x(1)*x(2) + pow(t, 3)*x(0)*pow(x(2), 2) + pow(t, 3)*pow(x(1), 2)*x(2) + pow(t, 3)*x(1)*pow(x(2), 2) + pow(t, 2)*pow(x(0), 2) + 3*pow(t, 2)*x(0)*x(1) + 3*pow(t, 2)*x(0)*x(2) + pow(t, 2)*pow(x(1), 2) + 3*pow(t, 2)*x(1)*x(2) + pow(t, 2)*pow(x(2), 2) + 2*t*x(0) + 2*t*x(1) + 2*t*x(2) + 1), 0, 0);
1403 };
1404
1406 deth_linear_E2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1407 return Eigen::Vector3d(0, (x(1) + x(2))/(pow(t, 3)*pow(x(0), 2)*x(1) + pow(t, 3)*pow(x(0), 2)*x(2) + pow(t, 3)*x(0)*pow(x(1), 2) + 2*pow(t, 3)*x(0)*x(1)*x(2) + pow(t, 3)*x(0)*pow(x(2), 2) + pow(t, 3)*pow(x(1), 2)*x(2) + pow(t, 3)*x(1)*pow(x(2), 2) + pow(t, 2)*pow(x(0), 2) + 3*pow(t, 2)*x(0)*x(1) + 3*pow(t, 2)*x(0)*x(2) + pow(t, 2)*pow(x(1), 2) + 3*pow(t, 2)*x(1)*x(2) + pow(t, 2)*pow(x(2), 2) + 2*t*x(0) + 2*t*x(1) + 2*t*x(2) + 1), 0);
1408 };
1409
1411 deth_linear_E3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1412 return Eigen::Vector3d(0, 0, (x(0) + x(2))/(pow(t, 3)*pow(x(0), 2)*x(1) + pow(t, 3)*pow(x(0), 2)*x(2) + pow(t, 3)*x(0)*pow(x(1), 2) + 2*pow(t, 3)*x(0)*x(1)*x(2) + pow(t, 3)*x(0)*pow(x(2), 2) + pow(t, 3)*pow(x(1), 2)*x(2) + pow(t, 3)*x(1)*pow(x(2), 2) + pow(t, 2)*pow(x(0), 2) + 3*pow(t, 2)*x(0)*x(1) + 3*pow(t, 2)*x(0)*x(2) + pow(t, 2)*pow(x(1), 2) + 3*pow(t, 2)*x(1)*x(2) + pow(t, 2)*pow(x(2), 2) + 2*t*x(0) + 2*t*x(1) + 2*t*x(2) + 1));
1413 };
1414
1416
1417 //------------------------------------------------------------------------------
1418
1420 linear_dE0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1421 return Eigen::Vector3d(0, 0, 0);
1422 };
1423
1425 linear_dE1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1426 return Eigen::Vector3d(-1.0, 0, 0);
1427 };
1428
1430 linear_dE2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1431 return Eigen::Vector3d(0, 0, -1.0);
1432 };
1433
1435 linear_dE3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1436 return Eigen::Vector3d(0, 1.0, 0);
1437 };
1438
1440
1441 //------------------------------------------------------------------------------
1442
1444 linear_D0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1445 return Eigen::Vector3d(t*(t*x(0) + t*x(1) + 1)/(t*x(0) + t*x(2) + 1), t*(-t*x(0) - t*x(2) - 1)/(t*x(1) + t*x(2) + 1), t*(t*x(1) + t*x(2) + 1)/(t*x(0) + t*x(1) + 1));
1446 };
1447
1449 linear_D1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1450 return Eigen::Vector3d(0, 0, 2.0*t*x(0)*x(1) + 2.0*t*x(0)*x(2) + 2.0*t*x(1)*x(2) + 2.0*t*pow(x(2), 2) + 1.0*x(0) + 1.0*x(1) + 2.0*x(2));
1451 };
1452
1454 linear_D2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1455 return Eigen::Vector3d(0, -2.0*t*pow(x(0), 2) - 2.0*t*x(0)*x(1) - 2.0*t*x(0)*x(2) - 2.0*t*x(1)*x(2) - 2.0*x(0) - 1.0*x(1) - 1.0*x(2), 0);
1456 };
1457
1459 linear_D3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1460 return Eigen::Vector3d(2.0*t*x(0)*x(1) + 2.0*t*x(0)*x(2) + 2.0*t*pow(x(1), 2) + 2.0*t*x(1)*x(2) + 1.0*x(0) + 2.0*x(1) + 1.0*x(2), 0, 0);
1461 };
1462
1464
1465 //------------------------------------------------------------------------------
1466
1469 linear_dtD0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1470 return Eigen::Vector3d(0, 0, 0);
1471 };
1472
1474 linear_dtD1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1475 return Eigen::Vector3d(0, 0, 2.0*x(0)*x(1) + 2.0*x(0)*x(2) + 2.0*x(1)*x(2) + 2.0*pow(x(2), 2));
1476 };
1477
1479 linear_dtD2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1480 return Eigen::Vector3d(0, -2.0*pow(x(0), 2) - 2.0*x(0)*x(1) - 2.0*x(0)*x(2) - 2.0*x(1)*x(2), 0);
1481 };
1482
1484 linear_dtD3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1485 return Eigen::Vector3d(2.0*x(0)*x(1) + 2.0*x(0)*x(2) + 2.0*pow(x(1), 2) + 2.0*x(1)*x(2), 0, 0);
1486 };
1487
1489
1490//------------------------------------------------------------------------------
1491
1493 linear_B0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1494 return Eigen::Vector3d(0, 0, 0);
1495 };
1496
1498 linear_B1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1499 return Eigen::Vector3d(-t, 0, 0);
1500 };
1501
1503 linear_B2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1504 return Eigen::Vector3d(0, 0, -t);
1505 };
1506
1508 linear_B3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1509 return Eigen::Vector3d(0, t, 0);
1510 };
1511
1513
1515 linear_dtB0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1516 return Eigen::Vector3d(0, 0, 0);
1517 };
1518
1520 linear_dtB1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1521 return Eigen::Vector3d(-1, 0, 0);
1522 };
1523
1525 linear_dtB2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1526 return Eigen::Vector3d(0, 0, -1);
1527 };
1528
1530 linear_dtB3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1531 return Eigen::Vector3d(0, 1, 0);
1532 };
1533
1535
1537 linear_H0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1538 return Eigen::Vector3d(0, 0, 0);
1539 };
1540
1542 linear_H1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1543 return Eigen::Vector3d(0, -t/(t*x(0) + t*x(2) + 1), 0);
1544 };
1545
1547 linear_H2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1548 return Eigen::Vector3d(0, 0, -t/(t*x(0) + t*x(1) + 1));
1549 };
1550
1552 linear_H3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1553 return Eigen::Vector3d(-t/(t*x(1) + t*x(2) + 1), 0, 0);
1554 };
1555
1557
1559 linear_dH0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1560 return Eigen::Vector3d(0, 0, 0);
1561 };
1562
1564 linear_dH1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1565 return Eigen::Vector3d(pow(t, 2)/pow(t*x(0) + t*x(2) + 1, 2), 0, -pow(t, 2)/(pow(t, 2)*pow(x(0), 2) + 2*pow(t, 2)*x(0)*x(2) + pow(t, 2)*pow(x(2), 2) + 2*t*x(0) + 2*t*x(2) + 1));
1566 };
1567
1569 linear_dH2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1570 return Eigen::Vector3d(0, pow(t, 2)/(pow(t, 2)*pow(x(0), 2) + 2*pow(t, 2)*x(0)*x(1) + pow(t, 2)*pow(x(1), 2) + 2*t*x(0) + 2*t*x(1) + 1), pow(t, 2)/pow(t*x(0) + t*x(1) + 1, 2));
1571 };
1572
1574 linear_dH3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1575 return Eigen::Vector3d(-pow(t, 2)/(pow(t, 2)*pow(x(1), 2) + 2*pow(t, 2)*x(1)*x(2) + pow(t, 2)*pow(x(2), 2) + 2*t*x(1) + 2*t*x(2) + 1), pow(t, 2)*(-t*(x(0) + x(1)) - 1)/((t*x(0) + t*x(1) + 1)*pow(t*x(1) + t*x(2) + 1, 2)), 0);
1576 };
1577
1579
1580 //------------------------------------------------------------------------------
1581 // Constant solution (D, theta, B)
1582 //------------------------------------------------------------------------------
1583
1585 constant_lapse = [](const double t, const Eigen::Vector3d & x) -> double {
1586 return 6*pow(t, 3) + 26*pow(t, 2) + 26*t + 6;
1587 };
1588
1590 constant_theta0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1591 return Eigen::Vector3d(0, 0, 0);
1592 };
1593
1595 constant_theta1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1596 return Eigen::Vector3d(0, 0, 3*t+1);
1597 };
1598
1600 constant_theta2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1601 return Eigen::Vector3d(2*t+2, 0, 0);
1602 };
1603
1605 constant_theta3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1606 return Eigen::Vector3d(0, t+3, 0);
1607 };
1608
1610
1611 // This is E0 = 1/N dN
1613 constant_E0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1614 return Eigen::Vector3d(0, 0, 0);
1615 };
1616
1618 constant_E1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1619 return Eigen::Vector3d(0, 0, 3.0);
1620 };
1621
1623 constant_E2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1624 return Eigen::Vector3d(2.0, 0, 0);
1625 };
1626
1628 constant_E3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1629 return Eigen::Vector3d(0, 1.0, 0);
1630 };
1631
1633
1635 constant_dE0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1636 return Eigen::Vector3d(0, 0, 0);
1637 };
1638
1640 constant_dE1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1641 return Eigen::Vector3d(0, 0, 0);
1642 };
1643
1645 constant_dE2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1646 return Eigen::Vector3d(0, 0, 0);
1647 };
1648
1650 constant_dE3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1651 return Eigen::Vector3d(0, 0, 0);
1652 };
1653
1655
1657 constant_D0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1658 return Eigen::Vector3d(0, 0, 0);
1659 };
1660
1662 constant_D1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1663 return Eigen::Vector3d(4.0*t + 8.0, 0, 0);
1664 };
1665
1667 constant_D2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1668 return Eigen::Vector3d(0, 0, 6.0*t + 10.0);
1669 };
1670
1672 constant_D3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1673 return Eigen::Vector3d(0, -12.0*t - 8.0, 0);
1674 };
1675
1677
1679 constant_dtD0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1680 return Eigen::Vector3d(0, 0, 0);
1681 };
1682
1684 constant_dtD1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1685 return Eigen::Vector3d(4.0, 0, 0);
1686 };
1687
1689 constant_dtD2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1690 return Eigen::Vector3d(0, 0, 6.0);
1691 };
1692
1694 constant_dtD3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1695 return Eigen::Vector3d(0, -12.0, 0);
1696 };
1697
1699
1701 constant_B0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1702 return Eigen::Vector3d(0, 0, 0);
1703 };
1704
1706 constant_B1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1707 return Eigen::Vector3d(0, 0, 0);
1708 };
1709
1711 constant_B2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1712 return Eigen::Vector3d(0, 0, 0);
1713 };
1714
1716 constant_B3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1717 return Eigen::Vector3d(0, 0, 0);
1718 };
1719
1721
1722//------------------------------------------------------------------------------
1723
1725 constant_dtB0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1726 return Eigen::Vector3d(0, 0, 0);
1727 };
1728
1730 constant_dtB1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1731 return Eigen::Vector3d(0, 0, 0);
1732 };
1733
1735 constant_dtB2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1736 return Eigen::Vector3d(0, 0, 0);
1737 };
1738
1740 constant_dtB3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1741 return Eigen::Vector3d(0, 0, 0);
1742 };
1743
1745
1746//------------------------------------------------------------------------------
1747
1749 constant_H0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1750 return Eigen::Vector3d(0, 0, 0);
1751 };
1752
1754 constant_H1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1755 return Eigen::Vector3d(0, 0, 0);
1756 };
1757
1759 constant_H2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1760 return Eigen::Vector3d(0, 0, 0);
1761 };
1762
1764 constant_H3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1765 return Eigen::Vector3d(0, 0, 0);
1766 };
1767
1769
1771 constant_dH0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1772 return Eigen::Vector3d(0, 0, 0);
1773 };
1774
1776 constant_dH1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1777 return Eigen::Vector3d(0, 0, 0);
1778 };
1779
1781 constant_dH2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1782 return Eigen::Vector3d(0, 0, 0);
1783 };
1784
1786 constant_dH3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1787 return Eigen::Vector3d(0, 0, 0);
1788 };
1789
1791
1792 //------------------------------------------------------------------------------
1793 // Test solution (D, theta, B)
1794 //------------------------------------------------------------------------------
1795
1797 test_lapse = [](const double t, const Eigen::Vector3d & x) -> double {
1798 return pow(t, -0.25)*exp(0.5*pow(M_PI, 2)*pow(t, 2)*(pow(cyl_bessel_j(0, 2*M_PI*t), 2) + pow(cyl_bessel_j(1, 2*M_PI*t), 2)) - 0.5*M_PI*t*pow(cos(2*M_PI*x(2)), 2)*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t) - 0.5*pow(M_PI, 2)*(pow(cyl_bessel_j(1, 2*M_PI), 2) + pow(cyl_bessel_j(0, 2*M_PI), 2)) + 0.25*M_PI*cyl_bessel_j(0, 2*M_PI)*cyl_bessel_j(1, 2*M_PI));
1799 };
1800
1802 test_theta0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1803 return Eigen::Vector3d(0, 0, 0);
1804 };
1805
1807 test_theta1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1808 return Eigen::Vector3d(1, 0, 0);
1809 };
1810
1812 test_theta2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1813 return Eigen::Vector3d(0, 1, 0);
1814 };
1815
1817 test_theta3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1818 return Eigen::Vector3d(0, 0, 1);
1819 };
1820
1822
1823 // This is E0 = 1/N dN
1825 test_E0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1826 return Eigen::Vector3d(0, 0, -1.0*pow(M_PI, 2)*pow(t, 1.0)*sin(4*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t));
1827 };
1828
1830 test_E1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1831 return Eigen::Vector3d(0, 0, 0);
1832 };
1833
1835 test_E2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1836 return Eigen::Vector3d(0, 0, 0);
1837 };
1838
1840 test_E3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1841 return Eigen::Vector3d(0, 0, 0);
1842 };
1843
1845
1847 test_dE0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1848 return Eigen::Vector3d(0, 0, 0);
1849 };
1850
1852 test_dE1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1853 return Eigen::Vector3d(0, 0, 0);
1854 };
1855
1857 test_dE2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1858 return Eigen::Vector3d(0, 0, 0);
1859 };
1860
1862 test_dE3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1863 return Eigen::Vector3d(0, 0, 0);
1864 };
1865
1867
1869 test_D0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1870 return Eigen::Vector3d(0, 0, 0);
1871 };
1872
1874 test_D1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1875 return Eigen::Vector3d(0, 0, 0);
1876 };
1877
1879 test_D2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1880 return Eigen::Vector3d(0, 0, 0);
1881 };
1882
1884 test_D3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1885 return Eigen::Vector3d(0, 0, 0);
1886 };
1887
1889
1891 test_dtD0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1892 return Eigen::Vector3d(0, 0, 0);
1893 };
1894
1896 test_dtD1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1897 return Eigen::Vector3d(0, 0, 0);
1898 };
1899
1901 test_dtD2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1902 return Eigen::Vector3d(0, 0, 0);
1903 };
1904
1906 test_dtD3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1907 return Eigen::Vector3d(0, 0, 0);
1908 };
1909
1911
1913 test_B0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1914 return Eigen::Vector3d(0, 0, 0);
1915 };
1916
1918 test_B1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1919 return Eigen::Vector3d(0, 0, 0);
1920 };
1921
1923 test_B2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1924 return Eigen::Vector3d(0, 0, 0);
1925 };
1926
1928 test_B3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1929 return Eigen::Vector3d(0, 0, 0);
1930 };
1931
1933
1935 test_dtB0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1936 return Eigen::Vector3d(0, 0, 0);
1937 };
1938
1940 test_dtB1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1941 return Eigen::Vector3d(0, 0, 0);
1942 };
1943
1945 test_dtB2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1946 return Eigen::Vector3d(0, 0, 0);
1947 };
1948
1950 test_dtB3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1951 return Eigen::Vector3d(0, 0, 0);
1952 };
1953
1955
1956//------------------------------------------------------------------------------
1957
1959 test_H0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1960 return Eigen::Vector3d(0, 0, 0);
1961 };
1962
1964 test_H1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1965 return Eigen::Vector3d(0, -1.0*pow(M_PI, 2)*pow(t, 1.0)*sin(4*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t), 0);
1966 };
1967
1969 test_H2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1970 return Eigen::Vector3d(1.0*pow(M_PI, 2)*pow(t, 1.0)*sin(4*M_PI*x(2))*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t), 0, 0);
1971 };
1972
1974 test_H3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1975 return Eigen::Vector3d(0, 0, 0);
1976 };
1977
1979
1981 test_dH0 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1982 return Eigen::Vector3d(0, 0, 0);
1983 };
1984
1986 test_dH1 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1987 return Eigen::Vector3d(0, 0, 4.0*pow(M_PI, 3)*pow(t, 1.0)*(-pow(sin(2*M_PI*x(2)), 2) + pow(cos(2*M_PI*x(2)), 2))*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t));
1988 };
1989
1991 test_dH2 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1992 return Eigen::Vector3d(0, 4.0*pow(M_PI, 3)*pow(t, 1.0)*(pow(sin(2*M_PI*x(2)), 2) - pow(cos(2*M_PI*x(2)), 2))*cyl_bessel_j(0, 2*M_PI*t)*cyl_bessel_j(1, 2*M_PI*t), 0);
1993 };
1994
1996 test_dH3 = [](const double t, const Eigen::Vector3d & x) -> Eigen::Vector3d {
1997 return Eigen::Vector3d(0, 0, 0);
1998 };
1999
2001
2002//------------------------------------------------------------------------------
2003
2004} // end of namespace HArDCore3D
2005
2006#endif
Definition ddr_spaces.hpp:19
@ Matrix
Definition basis.hpp:67
size_t dimension() const
Returns the dimension of the global space (all DOFs for all geometric entities)
Definition localdofspace.hpp:80
static const double PI
Definition ddr-magnetostatics.hpp:187
bool use_threads
Definition HHO_DiffAdvecReac.hpp:47
GlobalDOFSpace const & dofspace(size_t k) const
Returns the dofspace associated to discrete k-forms.
Definition ddr_spaces.hpp:52
Definition PastixInterface.hpp:16
Definition ddr-magnetostatics.hpp:41
static Einstein::TTwoFormType constant_D0
Definition ecddr-einstein-dtb.hpp:1850
static Einstein::TCollection1Forms linear_dE
Definition ecddr-einstein-dtb.hpp:1632
static Einstein::TTwoFormType kasner_D0
Definition ecddr-einstein-dtb.hpp:962
static Einstein::TOneFormType linear_E0
This is E0 = 1/N dN.
Definition ecddr-einstein-dtb.hpp:1565
static Einstein::TOneFormType kasner_H0
Definition ecddr-einstein-dtb.hpp:1084
static Einstein::TCollection1Forms test_H
Definition ecddr-einstein-dtb.hpp:2171
static Einstein::TOneFormType linear_H1
Definition ecddr-einstein-dtb.hpp:1735
static Einstein::TTwoFormType gowdy_dtD3
Definition ecddr-einstein-dtb.hpp:1447
static Einstein::TCollection2Forms constant_B
Definition ecddr-einstein-dtb.hpp:1913
static Einstein::TTwoFormType minkowski_dE3
Definition ecddr-einstein-dtb.hpp:643
static Einstein::TTwoFormType minkowski_B0
Definition ecddr-einstein-dtb.hpp:654
static Einstein::TCollection2Forms kasner_dH
Definition ecddr-einstein-dtb.hpp:1152
static Einstein::TOneFormType gowdy_theta1
Definition ecddr-einstein-dtb.hpp:1198
static Einstein::TTwoFormType minkowski_dE1
Definition ecddr-einstein-dtb.hpp:625
static Einstein::TOneFormType deth_linear_E3
Definition ecddr-einstein-dtb.hpp:1604
static Einstein::TOneFormType linear_dE0
Definition ecddr-einstein-dtb.hpp:1613
static Einstein::TTwoFormType linear_D2
Definition ecddr-einstein-dtb.hpp:1647
static Einstein::TOneFormType kasner_theta1
Definition ecddr-einstein-dtb.hpp:896
static Einstein::TTwoFormType gowdy_dH2
Definition ecddr-einstein-dtb.hpp:1362
static Einstein::TTwoFormType test_dtD0
Definition ecddr-einstein-dtb.hpp:2084
static Einstein::TCollection1Forms kasner_theta
Definition ecddr-einstein-dtb.hpp:910
static Einstein::TTwoFormType kasner_D2
Definition ecddr-einstein-dtb.hpp:972
static Einstein::TTwoFormType linear_dtD1
Definition ecddr-einstein-dtb.hpp:1667
static Einstein::TOneFormType gowdy_E1
Definition ecddr-einstein-dtb.hpp:1239
static Einstein::TCollection2Forms linear_D
Definition ecddr-einstein-dtb.hpp:1656
static Einstein::TCollection2Forms test_B
Definition ecddr-einstein-dtb.hpp:2125
static Einstein::TTwoFormType gowdy_dtD1
Definition ecddr-einstein-dtb.hpp:1429
static Einstein::TCollection1Forms linear_H
Definition ecddr-einstein-dtb.hpp:1749
static Einstein::TTwoFormType test_dH1
Definition ecddr-einstein-dtb.hpp:2179
static Einstein::TTwoFormType minkowski_dH3
Definition ecddr-einstein-dtb.hpp:871
static Einstein::TOneFormType constant_H3
Definition ecddr-einstein-dtb.hpp:1957
static Einstein::TTwoFormType kasner_dH1
Definition ecddr-einstein-dtb.hpp:1138
static Einstein::TTwoFormType test_D2
Definition ecddr-einstein-dtb.hpp:2072
static Einstein::TOneFormType test_dE1
Definition ecddr-einstein-dtb.hpp:2045
static Einstein::TZeroFormType kasner_lapse
Definition ecddr-einstein-dtb.hpp:886
static Einstein::TZeroFormType gowdy_lapse
Definition ecddr-einstein-dtb.hpp:1184
static Einstein::TOneFormType constant_theta3
Definition ecddr-einstein-dtb.hpp:1798
static Einstein::TCollection1Forms test_E
Definition ecddr-einstein-dtb.hpp:2037
static Einstein::TTwoFormType linear_dH1
Definition ecddr-einstein-dtb.hpp:1757
static Einstein::TTwoFormType kasner_dtD1
Definition ecddr-einstein-dtb.hpp:1016
static Einstein::TOneFormType gowdy_E3
Definition ecddr-einstein-dtb.hpp:1257
static Einstein::TTwoFormType test_dH2
Definition ecddr-einstein-dtb.hpp:2184
static Einstein::TOneFormType kasner_theta2
Definition ecddr-einstein-dtb.hpp:901
static Einstein::TOneFormType linear_theta3
Definition ecddr-einstein-dtb.hpp:1557
static Einstein::TOneFormType kasner_E3
Definition ecddr-einstein-dtb.hpp:929
static Einstein::TTwoFormType minkowski_dtB1
Definition ecddr-einstein-dtb.hpp:701
static Einstein::TCollection1Forms minkowski_theta
Definition ecddr-einstein-dtb.hpp:575
static Einstein::TTwoFormType test_D1
Definition ecddr-einstein-dtb.hpp:2067
static Einstein::TOneFormType test_E1
Definition ecddr-einstein-dtb.hpp:2023
static Einstein::TCollection2Forms kasner_D
Definition ecddr-einstein-dtb.hpp:981
static Einstein::TTwoFormType gowdy_dE2
Definition ecddr-einstein-dtb.hpp:1286
static Einstein::TCollection1Forms constant_E
Definition ecddr-einstein-dtb.hpp:1825
static Einstein::TZeroFormType constant_lapse
Definition ecddr-einstein-dtb.hpp:1778
static Einstein::TCollection1Forms minkowski_dH
Definition ecddr-einstein-dtb.hpp:879
static Einstein::TCollection2Forms kasner_B
Definition ecddr-einstein-dtb.hpp:1079
static Einstein::TTwoFormType minkowski_dH0
Definition ecddr-einstein-dtb.hpp:844
static Einstein::TCollection2Forms test_dtB
Definition ecddr-einstein-dtb.hpp:2147
static Einstein::TOneFormType linear_E2
Definition ecddr-einstein-dtb.hpp:1575
static Einstein::TCollection1Forms gowdy_theta
Definition ecddr-einstein-dtb.hpp:1227
static Einstein::TTwoFormType gowdy_B3
Definition ecddr-einstein-dtb.hpp:1484
static Einstein::TTwoFormType kasner_B1
Definition ecddr-einstein-dtb.hpp:1065
static Einstein::TOneFormType constant_E2
Definition ecddr-einstein-dtb.hpp:1816
static Einstein::TTwoFormType constant_dtD1
Definition ecddr-einstein-dtb.hpp:1877
static Einstein::TTwoFormType minkowski_dH2
Definition ecddr-einstein-dtb.hpp:862
static Einstein::TTwoFormType test_dtB3
Definition ecddr-einstein-dtb.hpp:2143
static Einstein::TTwoFormType gowdy_dtB2
Definition ecddr-einstein-dtb.hpp:1513
static Einstein::TCollection1Forms deth_linear_E
Definition ecddr-einstein-dtb.hpp:1608
static Einstein::TTwoFormType linear_dtD2
Definition ecddr-einstein-dtb.hpp:1672
static Einstein::TTwoFormType constant_dtD0
Definition ecddr-einstein-dtb.hpp:1872
static Einstein::TTwoFormType gowdy_dH1
Definition ecddr-einstein-dtb.hpp:1353
static Einstein::TOneFormType constant_theta2
Definition ecddr-einstein-dtb.hpp:1793
static Einstein::TTwoFormType constant_dtB2
Definition ecddr-einstein-dtb.hpp:1928
static Einstein::TTwoFormType linear_B3
Definition ecddr-einstein-dtb.hpp:1701
static Einstein::TCollection2Forms constant_dtB
Definition ecddr-einstein-dtb.hpp:1937
static Einstein::TOneFormType kasner_E0
Definition ecddr-einstein-dtb.hpp:914
static Einstein::TCollection2Forms minkowski_D
Definition ecddr-einstein-dtb.hpp:765
static Einstein::TTwoFormType minkowski_dE2
Definition ecddr-einstein-dtb.hpp:634
static Einstein::TOneFormType constant_theta1
Definition ecddr-einstein-dtb.hpp:1788
static Einstein::TTwoFormType minkowski_dE0
Definition ecddr-einstein-dtb.hpp:616
static Einstein::TTwoFormType gowdy_D2
Definition ecddr-einstein-dtb.hpp:1400
static Einstein::TZeroFormType linear_lapse
Definition ecddr-einstein-dtb.hpp:1537
static Einstein::TCollection1Forms kasner_H
Definition ecddr-einstein-dtb.hpp:1103
static Einstein::TOneFormType gowdy_H0
Definition ecddr-einstein-dtb.hpp:1306
static Einstein::TTwoFormType kasner_D1
Definition ecddr-einstein-dtb.hpp:967
static Einstein::TTwoFormType linear_dH0
Definition ecddr-einstein-dtb.hpp:1752
static Einstein::TTwoFormType minkowski_B1
Definition ecddr-einstein-dtb.hpp:663
static Einstein::TOneFormType gowdy_H1
Definition ecddr-einstein-dtb.hpp:1315
static Einstein::TTwoFormType minkowski_D1
Definition ecddr-einstein-dtb.hpp:739
static Einstein::TOneFormType constant_dE3
Definition ecddr-einstein-dtb.hpp:1843
static Einstein::TCollection2Forms linear_dtB
Definition ecddr-einstein-dtb.hpp:1727
static Einstein::TTwoFormType test_B2
Definition ecddr-einstein-dtb.hpp:2116
static Einstein::TCollection1Forms constant_H
Definition ecddr-einstein-dtb.hpp:1961
static Einstein::TOneFormType linear_dE3
Definition ecddr-einstein-dtb.hpp:1628
static Einstein::TCollection2Forms constant_D
Definition ecddr-einstein-dtb.hpp:1869
static Einstein::TOneFormType minkowski_H2
Definition ecddr-einstein-dtb.hpp:824
static Einstein::TTwoFormType kasner_dH2
Definition ecddr-einstein-dtb.hpp:1143
static Einstein::TTwoFormType gowdy_dE0
Definition ecddr-einstein-dtb.hpp:1268
static Einstein::TTwoFormType minkowski_B2
Definition ecddr-einstein-dtb.hpp:672
static Einstein::TOneFormType linear_dE2
Definition ecddr-einstein-dtb.hpp:1623
static Einstein::TCollection1Forms test_dE
Definition ecddr-einstein-dtb.hpp:2059
static Einstein::TOneFormType test_H2
Definition ecddr-einstein-dtb.hpp:2162
static Einstein::TOneFormType linear_H0
Definition ecddr-einstein-dtb.hpp:1730
static Einstein::TTwoFormType kasner_B0
Definition ecddr-einstein-dtb.hpp:1060
static Einstein::TOneFormType linear_theta0
Definition ecddr-einstein-dtb.hpp:1542
static Einstein::TTwoFormType linear_dtB3
Definition ecddr-einstein-dtb.hpp:1723
static Einstein::TOneFormType test_dE0
Definition ecddr-einstein-dtb.hpp:2040
static Einstein::TCollection1Forms gowdy_H
Definition ecddr-einstein-dtb.hpp:1341
static Einstein::TOneFormType kasner_H2
Definition ecddr-einstein-dtb.hpp:1094
static Einstein::TCollection2Forms gowdy_B
Definition ecddr-einstein-dtb.hpp:1492
static Einstein::TOneFormType linear_H3
Definition ecddr-einstein-dtb.hpp:1745
static Einstein::TOneFormType minkowski_theta1
Definition ecddr-einstein-dtb.hpp:549
static Einstein::TCollection1Forms gowdy_dE
Definition ecddr-einstein-dtb.hpp:1303
static Einstein::TCollection1Forms kasner_E
Definition ecddr-einstein-dtb.hpp:933
static Einstein::TTwoFormType minkowski_dtD2
Definition ecddr-einstein-dtb.hpp:786
static Einstein::TTwoFormType constant_D1
Definition ecddr-einstein-dtb.hpp:1855
static Einstein::TZeroFormType test_lapse
Definition ecddr-einstein-dtb.hpp:1990
static Einstein::TCollection1Forms linear_theta
Definition ecddr-einstein-dtb.hpp:1561
static Einstein::TTwoFormType minkowski_dtD1
Definition ecddr-einstein-dtb.hpp:777
static Einstein::TCollection2Forms minkowski_dtB
Definition ecddr-einstein-dtb.hpp:727
static Einstein::TTwoFormType gowdy_D0
Definition ecddr-einstein-dtb.hpp:1382
static Einstein::TTwoFormType test_dtD1
Definition ecddr-einstein-dtb.hpp:2089
static Einstein::TTwoFormType test_B1
Definition ecddr-einstein-dtb.hpp:2111
static Einstein::TTwoFormType test_B3
Definition ecddr-einstein-dtb.hpp:2121
static Einstein::TTwoFormType minkowski_dtB3
Definition ecddr-einstein-dtb.hpp:719
static Einstein::TCollection2Forms constant_dH
Definition ecddr-einstein-dtb.hpp:1983
static Einstein::TOneFormType kasner_theta3
Definition ecddr-einstein-dtb.hpp:906
static Einstein::TTwoFormType linear_dH2
Definition ecddr-einstein-dtb.hpp:1762
static Einstein::TTwoFormType test_D0
Definition ecddr-einstein-dtb.hpp:2062
static Einstein::TOneFormType constant_E1
Definition ecddr-einstein-dtb.hpp:1811
static Einstein::TOneFormType test_theta2
Definition ecddr-einstein-dtb.hpp:2005
static Einstein::TTwoFormType linear_dtB2
Definition ecddr-einstein-dtb.hpp:1718
static Einstein::TTwoFormType minkowski_B3
Definition ecddr-einstein-dtb.hpp:681
static Einstein::TOneFormType gowdy_theta0
Definition ecddr-einstein-dtb.hpp:1189
static Einstein::TTwoFormType linear_D3
Definition ecddr-einstein-dtb.hpp:1652
static Einstein::TTwoFormType minkowski_dH1
Definition ecddr-einstein-dtb.hpp:853
static Einstein::TTwoFormType kasner_D3
Definition ecddr-einstein-dtb.hpp:977
static Einstein::TZeroFormType minkowski_lapse
Definition ecddr-einstein-dtb.hpp:535
static Einstein::TOneFormType minkowski_E3
Definition ecddr-einstein-dtb.hpp:605
static Einstein::TCollection1Forms minkowski_H
Definition ecddr-einstein-dtb.hpp:841
static Einstein::TOneFormType deth_linear_E2
Definition ecddr-einstein-dtb.hpp:1599
static Einstein::TTwoFormType gowdy_dtD2
Definition ecddr-einstein-dtb.hpp:1438
static Einstein::TCollection2Forms test_dH
Definition ecddr-einstein-dtb.hpp:2193
static Einstein::TTwoFormType gowdy_dE1
Definition ecddr-einstein-dtb.hpp:1277
static Einstein::TTwoFormType constant_D2
Definition ecddr-einstein-dtb.hpp:1860
static Einstein::TTwoFormType gowdy_B0
Definition ecddr-einstein-dtb.hpp:1457
static Einstein::TOneFormType minkowski_theta3
Definition ecddr-einstein-dtb.hpp:567
static Einstein::TOneFormType linear_dE1
Definition ecddr-einstein-dtb.hpp:1618
static Einstein::TTwoFormType kasner_dtD3
Definition ecddr-einstein-dtb.hpp:1026
static Einstein::TTwoFormType test_dH0
Definition ecddr-einstein-dtb.hpp:2174
static Einstein::TCollection1Forms constant_theta
Definition ecddr-einstein-dtb.hpp:1802
std::function< Eigen::Vector3d(const Eigen::Vector3d &)> noise(const std::function< Eigen::Vector3d(const Eigen::Vector3d &)> &f)
Definition ecddr-einstein-dtb.hpp:522
static Einstein::TOneFormType deth_linear_E0
This is E0 = 1/N dN.
Definition ecddr-einstein-dtb.hpp:1589
static Einstein::TTwoFormType test_B0
Definition ecddr-einstein-dtb.hpp:2106
static Einstein::TTwoFormType minkowski_D3
Definition ecddr-einstein-dtb.hpp:757
static Einstein::TCollection1Forms linear_E
Definition ecddr-einstein-dtb.hpp:1584
static Einstein::TCollection2Forms gowdy_dtB
Definition ecddr-einstein-dtb.hpp:1530
static Einstein::TTwoFormType kasner_dtD0
Definition ecddr-einstein-dtb.hpp:1011
static Einstein::TCollection2Forms minkowski_dtD
Definition ecddr-einstein-dtb.hpp:803
static Einstein::TOneFormType test_H0
Definition ecddr-einstein-dtb.hpp:2152
static Einstein::TOneFormType test_E0
Definition ecddr-einstein-dtb.hpp:2018
static Einstein::TTwoFormType gowdy_dtD0
Definition ecddr-einstein-dtb.hpp:1420
static Einstein::TTwoFormType minkowski_dtB0
Definition ecddr-einstein-dtb.hpp:692
static Einstein::TTwoFormType gowdy_dH3
Definition ecddr-einstein-dtb.hpp:1371
static Einstein::TOneFormType minkowski_theta0
Definition ecddr-einstein-dtb.hpp:540
static Einstein::TOneFormType test_theta3
Definition ecddr-einstein-dtb.hpp:2010
static Einstein::TOneFormType kasner_E2
Definition ecddr-einstein-dtb.hpp:924
static Einstein::TTwoFormType gowdy_dH0
Definition ecddr-einstein-dtb.hpp:1344
static Einstein::TTwoFormType gowdy_D3
Definition ecddr-einstein-dtb.hpp:1409
static Einstein::TTwoFormType constant_dtB1
Definition ecddr-einstein-dtb.hpp:1923
static Einstein::TCollection2Forms linear_dH
Definition ecddr-einstein-dtb.hpp:1771
static Einstein::TCollection2Forms linear_dtD
Definition ecddr-einstein-dtb.hpp:1681
static Einstein::TTwoFormType test_dtB2
Definition ecddr-einstein-dtb.hpp:2138
static Einstein::TOneFormType minkowski_H3
Definition ecddr-einstein-dtb.hpp:833
static Einstein::TCollection2Forms constant_dtD
Definition ecddr-einstein-dtb.hpp:1891
std::vector< Fct > starCol(const std::vector< Fct > &F)
Definition ecddr-einstein-dtb.hpp:513
static Einstein::TTwoFormType test_dtB0
Definition ecddr-einstein-dtb.hpp:2128
static Einstein::TTwoFormType linear_D0
Definition ecddr-einstein-dtb.hpp:1637
static Einstein::TOneFormType minkowski_H0
Definition ecddr-einstein-dtb.hpp:806
static Einstein::TOneFormType linear_E1
Definition ecddr-einstein-dtb.hpp:1570
static Einstein::TTwoFormType minkowski_dtD0
Definition ecddr-einstein-dtb.hpp:768
static Einstein::TTwoFormType constant_dtB0
Definition ecddr-einstein-dtb.hpp:1918
static Einstein::TTwoFormType linear_dtB1
Definition ecddr-einstein-dtb.hpp:1713
static Einstein::TCollection2Forms test_D
Definition ecddr-einstein-dtb.hpp:2081
static Einstein::TOneFormType minkowski_E1
Definition ecddr-einstein-dtb.hpp:587
static Einstein::TOneFormType deth_linear_E1
Definition ecddr-einstein-dtb.hpp:1594
static Einstein::TTwoFormType gowdy_dtB3
Definition ecddr-einstein-dtb.hpp:1522
static Einstein::TTwoFormType linear_B1
Definition ecddr-einstein-dtb.hpp:1691
static Einstein::TOneFormType constant_theta0
Definition ecddr-einstein-dtb.hpp:1783
static Einstein::TOneFormType linear_theta2
Definition ecddr-einstein-dtb.hpp:1552
static Einstein::TTwoFormType linear_B0
Definition ecddr-einstein-dtb.hpp:1686
static Einstein::TOneFormType constant_H2
Definition ecddr-einstein-dtb.hpp:1952
static Einstein::TCollection2Forms test_dtD
Definition ecddr-einstein-dtb.hpp:2103
static Einstein::TTwoFormType constant_dtD3
Definition ecddr-einstein-dtb.hpp:1887
static Einstein::TTwoFormType minkowski_D0
Definition ecddr-einstein-dtb.hpp:730
static Einstein::TTwoFormType test_D3
Definition ecddr-einstein-dtb.hpp:2077
static Einstein::TOneFormType constant_E0
Definition ecddr-einstein-dtb.hpp:1806
static Einstein::TOneFormType kasner_H3
Definition ecddr-einstein-dtb.hpp:1099
static Einstein::TOneFormType constant_dE0
Definition ecddr-einstein-dtb.hpp:1828
static Einstein::TCollection2Forms gowdy_D
Definition ecddr-einstein-dtb.hpp:1417
static Einstein::TOneFormType test_dE3
Definition ecddr-einstein-dtb.hpp:2055
static Einstein::TCollection1Forms minkowski_dE
Definition ecddr-einstein-dtb.hpp:651
static Einstein::TOneFormType constant_E3
Definition ecddr-einstein-dtb.hpp:1821
static Einstein::TCollection2Forms linear_B
Definition ecddr-einstein-dtb.hpp:1705
static Einstein::TOneFormType gowdy_theta2
Definition ecddr-einstein-dtb.hpp:1207
static Einstein::TTwoFormType test_dtB1
Definition ecddr-einstein-dtb.hpp:2133
static Einstein::TTwoFormType test_dtD2
Definition ecddr-einstein-dtb.hpp:2094
static Einstein::TOneFormType minkowski_E2
Definition ecddr-einstein-dtb.hpp:596
static Einstein::TTwoFormType gowdy_dtB1
Definition ecddr-einstein-dtb.hpp:1504
static Einstein::TOneFormType linear_H2
Definition ecddr-einstein-dtb.hpp:1740
static Einstein::TOneFormType linear_theta1
Definition ecddr-einstein-dtb.hpp:1547
static Einstein::TTwoFormType linear_dtD0
Not calculated since not needed.
Definition ecddr-einstein-dtb.hpp:1662
static Einstein::TTwoFormType constant_B3
Definition ecddr-einstein-dtb.hpp:1909
static Einstein::TTwoFormType kasner_dtD2
Definition ecddr-einstein-dtb.hpp:1021
static Einstein::TTwoFormType minkowski_D2
Definition ecddr-einstein-dtb.hpp:748
static Einstein::TCollection2Forms gowdy_dtD
Definition ecddr-einstein-dtb.hpp:1454
static Einstein::TCollection1Forms gowdy_dH
Definition ecddr-einstein-dtb.hpp:1379
static Einstein::TOneFormType gowdy_H2
Definition ecddr-einstein-dtb.hpp:1324
static Einstein::TTwoFormType linear_dH3
Definition ecddr-einstein-dtb.hpp:1767
static Einstein::TTwoFormType test_dH3
Definition ecddr-einstein-dtb.hpp:2189
static Einstein::TOneFormType minkowski_E0
Definition ecddr-einstein-dtb.hpp:578
static Einstein::TTwoFormType linear_B2
Definition ecddr-einstein-dtb.hpp:1696
static Einstein::TCollection1Forms minkowski_E
Definition ecddr-einstein-dtb.hpp:613
static Einstein::TTwoFormType constant_B1
Definition ecddr-einstein-dtb.hpp:1899
static Einstein::TTwoFormType linear_D1
Definition ecddr-einstein-dtb.hpp:1642
static Einstein::TTwoFormType minkowski_dtD3
Definition ecddr-einstein-dtb.hpp:795
static Einstein::TOneFormType kasner_theta0
Definition ecddr-einstein-dtb.hpp:891
static Einstein::TOneFormType kasner_E1
Definition ecddr-einstein-dtb.hpp:919
static Einstein::TTwoFormType kasner_dH0
Definition ecddr-einstein-dtb.hpp:1133
static Einstein::TTwoFormType test_dtD3
Definition ecddr-einstein-dtb.hpp:2099
static Einstein::TTwoFormType kasner_dH3
Definition ecddr-einstein-dtb.hpp:1148
static Einstein::TOneFormType gowdy_E0
Definition ecddr-einstein-dtb.hpp:1230
static Einstein::TOneFormType gowdy_H3
Definition ecddr-einstein-dtb.hpp:1333
static Einstein::TCollection1Forms test_theta
Definition ecddr-einstein-dtb.hpp:2014
static Einstein::TTwoFormType constant_B2
Definition ecddr-einstein-dtb.hpp:1904
static Einstein::TTwoFormType constant_dH2
Definition ecddr-einstein-dtb.hpp:1974
std::function< Eigen::Vector3d(double t, const Eigen::Vector3d &)> star(const std::function< Eigen::Vector3d(double t, const Eigen::Vector3d &)> &F)
Definition ecddr-einstein-dtb.hpp:500
static Einstein::TTwoFormType constant_dH1
Definition ecddr-einstein-dtb.hpp:1969
static Einstein::TOneFormType gowdy_theta3
Definition ecddr-einstein-dtb.hpp:1216
static Einstein::TOneFormType kasner_H1
Definition ecddr-einstein-dtb.hpp:1089
static Einstein::TTwoFormType gowdy_dtB0
Definition ecddr-einstein-dtb.hpp:1495
static Einstein::TTwoFormType linear_dtD3
Definition ecddr-einstein-dtb.hpp:1677
static Einstein::TTwoFormType constant_dH3
Definition ecddr-einstein-dtb.hpp:1979
static Einstein::TOneFormType constant_dE2
Definition ecddr-einstein-dtb.hpp:1838
static Einstein::TTwoFormType linear_dtB0
Definition ecddr-einstein-dtb.hpp:1708
static Einstein::TOneFormType constant_H0
Definition ecddr-einstein-dtb.hpp:1942
static Einstein::TCollection1Forms constant_dE
Definition ecddr-einstein-dtb.hpp:1847
static Einstein::TOneFormType test_dE2
Definition ecddr-einstein-dtb.hpp:2050
static Einstein::TTwoFormType kasner_B3
Definition ecddr-einstein-dtb.hpp:1075
static Einstein::TOneFormType test_H1
Definition ecddr-einstein-dtb.hpp:2157
static Einstein::TCollection2Forms kasner_dtD
Definition ecddr-einstein-dtb.hpp:1030
static Einstein::TTwoFormType constant_B0
Definition ecddr-einstein-dtb.hpp:1894
static Einstein::TOneFormType test_E2
Definition ecddr-einstein-dtb.hpp:2028
static Einstein::TOneFormType constant_H1
Definition ecddr-einstein-dtb.hpp:1947
static Einstein::TTwoFormType minkowski_dtB2
Definition ecddr-einstein-dtb.hpp:710
static Einstein::TCollection2Forms minkowski_B
Definition ecddr-einstein-dtb.hpp:689
static Einstein::TOneFormType test_H3
Definition ecddr-einstein-dtb.hpp:2167
static Einstein::TTwoFormType constant_dH0
Definition ecddr-einstein-dtb.hpp:1964
static Einstein::TOneFormType test_theta0
Definition ecddr-einstein-dtb.hpp:1995
static Einstein::TTwoFormType constant_D3
Definition ecddr-einstein-dtb.hpp:1865
static Einstein::TTwoFormType constant_dtD2
Definition ecddr-einstein-dtb.hpp:1882
static Einstein::TOneFormType gowdy_E2
Definition ecddr-einstein-dtb.hpp:1248
static Einstein::TOneFormType linear_E3
Definition ecddr-einstein-dtb.hpp:1580
static Einstein::TTwoFormType gowdy_B2
Definition ecddr-einstein-dtb.hpp:1475
static Einstein::TCollection1Forms gowdy_E
Definition ecddr-einstein-dtb.hpp:1265
static Einstein::TOneFormType test_E3
Definition ecddr-einstein-dtb.hpp:2033
static Einstein::TTwoFormType gowdy_dE3
Definition ecddr-einstein-dtb.hpp:1295
static Einstein::TOneFormType minkowski_H1
Definition ecddr-einstein-dtb.hpp:815
static Einstein::TOneFormType minkowski_theta2
Definition ecddr-einstein-dtb.hpp:558
static Einstein::TTwoFormType constant_dtB3
Definition ecddr-einstein-dtb.hpp:1933
static Einstein::TOneFormType constant_dE1
Definition ecddr-einstein-dtb.hpp:1833
static Einstein::TTwoFormType gowdy_B1
Definition ecddr-einstein-dtb.hpp:1466
static Einstein::TOneFormType test_theta1
Definition ecddr-einstein-dtb.hpp:2000
static Einstein::TTwoFormType gowdy_D1
Definition ecddr-einstein-dtb.hpp:1391
static Einstein::TTwoFormType kasner_B2
Definition ecddr-einstein-dtb.hpp:1070
Structure to store norm components (for B_\alpha, D_\alpha, theta^\alpha)
Definition ecddr-einstein-dtb.hpp:39
Eigen::VectorXd D
Norms of D_alpha.
Definition ecddr-einstein-dtb.hpp:52
EinsteinNorms(Eigen::VectorXd norm_D, Eigen::VectorXd norm_theta)
Constructor.
Definition ecddr-einstein.hpp:41
EinsteinNorms()
Definition ecddr-einstein.hpp:49
Eigen::VectorXd theta
Norms of theta^\alpha.
Definition ecddr-einstein-dtb.hpp:53
std::function< Eigen::Vector3d(const double t, const Eigen::Vector3d &)> TTwoFormType
Definition ecddr-einstein.hpp:73
void updateThetaRHS(const Eigen::VectorXd &starD)
std::function< Eigen::Vector3d(const Eigen::Vector3d &)> OneFormType
Definition ecddr-einstein.hpp:61
std::vector< Fct > contractParaVec(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 ecddr-einstein.hpp:371
Einstein::CompositeUType composite_orth_U2
Definition ecddr-einstein-dtb.hpp:295
Eigen::Vector3d wedge11(const Eigen::Vector3d &form1, const Eigen::Vector3d &form2) const
wedge a 1-form and a 1-form to return 2-form as [A12, A13, A23]
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 ecddr-einstein.hpp:364
std::vector< ThreeFormType > Collection3Forms
Definition ecddr-einstein.hpp:69
std::function< Eigen::Vector3d(const Eigen::MatrixXd &E, const Eigen::MatrixXd &B)> CompositeHType
Definition ecddr-einstein.hpp:82
Eigen::MatrixXd basisChange(size_t k, const Eigen::MatrixXd &forms, const Eigen::MatrixXd &basis) const
Change of basis for 2 forms.
Einstein::CompositeHType composite_orth_H3
Definition ecddr-einstein-dtb.hpp:221
TTwoFormType TForcingTermType
Definition ecddr-einstein.hpp:75
std::function< Eigen::Vector3d(const Eigen::Vector3d &)> TwoFormType
Definition ecddr-einstein.hpp:62
std::vector< OneFormType > Collection1Forms
Definition ecddr-einstein.hpp:67
Einstein::CompositeEType composite_orth_E0
Definition ecddr-einstein-dtb.hpp:232
Eigen::VectorXd & systemVector()
Returns the linear system right-hand side vector.
Definition ecddr-einstein.hpp:336
std::vector< ZeroFormType > TCollection0Forms
Definition ecddr-einstein.hpp:77
std::function< double(const Eigen::Vector3d &)> ThreeFormType
Definition ecddr-einstein.hpp:63
std::vector< ZeroFormType > Collection0Forms
Definition ecddr-einstein.hpp:66
std::function< double(const Eigen::Vector3d &)> ZeroFormType
Definition ecddr-einstein.hpp:60
Einstein::CompositeEType composite_orth_E3
Definition ecddr-einstein-dtb.hpp:261
TwoFormType ForcingTermType
Definition ecddr-einstein.hpp:64
std::pair< EinsteinNorms, EinsteinNorms > computeContinuousErrorsNorms(const Eigen::VectorXd &starDt, const std::vector< OneFormType > &starD, const std::vector< TwoFormType > &starTheta, const std::vector< TwoFormType > &starB) const
Definition ecddr-einstein-dtb.cpp:1421
size_t dimensionSpace() const
Returns the global problem dimension.
Definition ecddr-einstein.hpp:301
Eigen::SparseMatrix< double > SystemMatrixType
Definition ecddr-einstein.hpp:58
Einstein(const DDR_Spaces &ddrspaces, bool use_threads, double stab_par, std::ostream &output=std::cout)
Constructor.
const double & stabilizationParameter() const
Returns the stabilization parameter.
Definition ecddr-einstein.hpp:345
std::function< Eigen::Vector3d(const Eigen::MatrixXd &D)> CompositeEType
Definition ecddr-einstein.hpp:84
std::function< Eigen::Vector3d(const double t, const Eigen::Vector3d &)> TOneFormType
Definition ecddr-einstein.hpp:72
void assembleLinearSystem(double dt, const ZeroFormType &lapse, const OneFormType &E0, const Eigen::VectorXd &starDt)
std::vector< TwoFormType > Collection2Forms
Definition ecddr-einstein.hpp:68
std::function< double(const double t, const Eigen::Vector3d &)> TThreeFormType
Definition ecddr-einstein.hpp:74
Einstein::CompositeHType composite_orth_H2
Definition ecddr-einstein-dtb.hpp:212
double & stabilizationParameter()
Returns the stabilization parameter.
Definition ecddr-einstein.hpp:350
Eigen::VectorXd updateLapse(double dt, Eigen::VectorXd &lapse_n, Eigen::VectorXd &starDtB)
std::function< double(const double t, const Eigen::Vector3d &)> TZeroFormType
Definition ecddr-einstein.hpp:71
const DDR_Spaces & ddrSpaces() const
Returns the ECDDR sequence.
Definition ecddr-einstein.hpp:311
Einstein::CollectionUforms composite_orth_U
Definition ecddr-einstein-dtb.hpp:320
Einstein::CompositeEType composite_orth_E2
Definition ecddr-einstein-dtb.hpp:251
Einstein::CompositeUType composite_orth_U3
Definition ecddr-einstein-dtb.hpp:308
Einstein::CompositeUType composite_orth_U0
Definition ecddr-einstein-dtb.hpp:273
void computeBCRHS(double dt, const ZeroFormType &lapse_n, const std::vector< TwoFormType > &D, const std::vector< OneFormType > &theta, const std::vector< TwoFormType > &B, const std::vector< TwoFormType > &dtD, const std::vector< OneFormType > &E, const std::vector< OneFormType > &H, const std::vector< TwoFormType > &dH)
Eigen::MatrixXd contractIndex(size_t index, const Eigen::MatrixXd &twoForm1, const Eigen::MatrixXd &twoForm2) const
Contract collection index with first form index (A_i)^{ji}.
std::vector< CompositeEType > CollectionEforms
Definition ecddr-einstein.hpp:85
std::vector< TTwoFormType > TCollection2Forms
Definition ecddr-einstein.hpp:79
Einstein::CompositeHType composite_orth_H0
Definition ecddr-einstein-dtb.hpp:194
double & min_detTheta()
Definition ecddr-einstein.hpp:354
std::vector< CompositeHType > CollectionHforms
Definition ecddr-einstein.hpp:83
Einstein::CollectionHforms composite_orth_H
Definition ecddr-einstein-dtb.hpp:229
std::function< Eigen::Vector3d(const Eigen::VectorXd &E0, const Eigen::VectorXd &D0, const Eigen::MatrixXd &H, const Eigen::MatrixXd &E, const Eigen::MatrixXd &D, const Eigen::MatrixXd &B)> CompositeUType
Definition ecddr-einstein.hpp:86
Einstein::CompositeEType composite_orth_E1
Definition ecddr-einstein-dtb.hpp:241
std::vector< CompositeUType > CollectionUforms
Definition ecddr-einstein.hpp:87
Einstein::CompositeUType composite_orth_U1
Definition ecddr-einstein-dtb.hpp:282
SystemMatrixType & systemMatrix()
Returns the linear system matrix.
Definition ecddr-einstein.hpp:326
std::vector< TOneFormType > TCollection1Forms
Definition ecddr-einstein.hpp:78
Einstein::CompositeHType composite_orth_H1
Definition ecddr-einstein-dtb.hpp:203
const Eigen::VectorXd & systemVector() const
Returns the linear system right-hand side vector.
Definition ecddr-einstein.hpp:331
std::vector< TThreeFormType > TCollection3Forms
Definition ecddr-einstein.hpp:80
Einstein::CollectionEforms composite_orth_E
Definition ecddr-einstein-dtb.hpp:270
std::vector< EinsteinNorms > computeEinsteinNorms(const std::vector< Eigen::VectorXd > &list_dofs) const
Compute the discrete L2 norms, for a family of Eigen::VectorXd.
const SystemMatrixType & systemMatrix() const
Returns the linear system matrix.
Definition ecddr-einstein.hpp:321
Eigen::Matrix3d expand2Form(const Eigen::Vector3d &form) const
expand a 2 form vector into a 3x3 matrix
Struct to store the systems and vector.
Definition parallel_for.hpp:18