]> https://gitweb.dealii.org/ - code-gallery.git/commitdiff
Improved default params; Readme edit 120/head
authorJake Harmon <jake.harmon@ieee.org>
Sat, 11 Mar 2023 03:25:02 +0000 (20:25 -0700)
committerJake Harmon <jake.harmon@ieee.org>
Sat, 11 Mar 2023 03:25:02 +0000 (20:25 -0700)
Maxwell-Eigenvalue-hp-Refinement/Readme.md
Maxwell-Eigenvalue-hp-Refinement/maxwell-hp.cc

index fc16d4d58417e1db97ea314b3fdbca4d75ac6bb4..aba0ad7c3a5f067777aa2a43c6fd92eac248c6ec 100644 (file)
@@ -25,10 +25,10 @@ $$ e_{\lambda_{hp}} := \lambda-\lambda_{hp}. $$
 Some comments on the discretization of Maxwell's equations
 ----------------------------------------------------------
 In the proper solution of variational problem, $V_{hp}$ is not arbitrary, but should instead a subspace of $H(\mathrm{curl};\,\Omega)$ or, with the boundary conditions indicated above, $H_{0}(\mathrm{curl};\,\Omega)$, where
-$$ H(\mathrm{curl};\,\Omega) = \left\{\textbf{u}\in \left[ L_2(\Omega)\right]^d \, \mathrm{s.t.} \, \nabla\times\textbf{u}\in \left[ L_2(\Omega)\right]^{d} \right\}$$
+$$ H(\mathrm{curl};\,\Omega) = \left\{\textbf{u}\in \left[ L_2(\Omega)\right]^d \, \mathrm{s.t.} \, \nabla\times\textbf{u}\in \left[ L_2(\Omega)\right]^{2d-3} \right\}$$
 and 
 $$
-H_{0}(\mathrm{curl};\,\Omega) = \left\{ \textbf{u}\in H(\mathrm{curl};\,\Omega) \, \mathrm{s.t.} \, \hat{\textbf{n}}\times\textbf{u} = 0 \text{on $\partial\Omega$}\right\}.
+H_{0}(\mathrm{curl};\,\Omega) = \left\{ \textbf{u}\in H(\mathrm{curl};\,\Omega) \, \mathrm{s.t.} \, \hat{\textbf{n}}\times\textbf{u} = 0 \text{ on $\partial\Omega$}\right\}.
 $$
 
 The convergence of the discrete problem (e.g., as $h\rightarrow 0$) to the continuous one may be proved via a discrete compactness property [3]. It is also possible for other choices of finite element spaces to *converge*, just not necessarily to the *correct* solution, which was the case for discretizations (which typically treated the components of $\textbf{u}$ as belonging to $H^1$) of the Maxwell PDE prior to the work of Nédélec.
index 338f39bd8cf1a44f4738a112754fed4b5077a3ef..1bfe31cb1c73de2f23a125023466389639cf5a00 100644 (file)
@@ -2212,19 +2212,27 @@ main(int argc, char **argv)
       Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
 
 
-      AssertThrow(Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD) == 1,
-                  ExcMessage(
-                    "This program can only be run in serial, use ./maxwell-hp"));
+      AssertThrow(
+        Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD) == 1,
+        ExcMessage("This program can only be run in serial, use ./maxwell-hp"));
 
       Triangulation<2> triangulation_DWR, triangulation_Kelly;
       Structures::create_L_waveguide(triangulation_DWR, 2.0);
       Structures::create_L_waveguide(triangulation_Kelly, 2.0);
 
       Refiner<2, KellyErrorIndicator<2>, LegendreIndicator<2>> problem_Kelly(
-        "maxwell-hp.prm", triangulation_Kelly, 2, 12, 2);
+        "maxwell-hp.prm",
+        triangulation_Kelly,
+        /*Minimum Degree*/ 2,
+        /*Maximum Degree*/ 5,
+        /*Starting Degree*/ 2);
 
       Refiner<2, DualWeightedResidual<2, false>, LegendreIndicator<2>>
-        problem_DWR("maxwell-hp.prm", triangulation_DWR, 2, 12, 2);
+        problem_DWR("maxwell-hp.prm",
+                    triangulation_DWR,
+                    /*Minimum Degree*/ 2,
+                    /*Maximum Degree*/ 5,
+                    /*Starting Degree*/ 2);
 
       // The threshold for the hp-decision: too small -> not enough
       // $h$-refinement, too large -> not enough $p$-refinement

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.