From abdbbe7a828b34c60acf1cdb7454a1ecdbf2bd85 Mon Sep 17 00:00:00 2001 From: hartmann Date: Thu, 22 Nov 2001 16:57:10 +0000 Subject: [PATCH] Couple of changes and corrections. git-svn-id: https://svn.dealii.org/trunk@5252 0785d39b-7218-0410-832d-ea1e28bc413d --- .../step-12.data/intro.html | 238 ++++++++++-------- .../step-12.data/intro.tex | 113 +++++---- 2 files changed, 200 insertions(+), 151 deletions(-) diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-12.data/intro.html b/deal.II/doc/tutorial/chapter-2.step-by-step/step-12.data/intro.html index eb0bf8b4f9..f2440178f4 100644 --- a/deal.II/doc/tutorial/chapter-2.step-by-step/step-12.data/intro.html +++ b/deal.II/doc/tutorial/chapter-2.step-by-step/step-12.data/intro.html @@ -7,15 +7,16 @@ Overview This example is devoted to the discontinuous Galerkin method, or -in short: DG method. It includes following topics. +in short: DG method. It includes the following topics. @@ -89,21 +90,52 @@ is a vector field, f a source function, u the

-the inflow boundary of the domain, whereas n denotes the unit outer -normal to boundary +the inflow part of the boundary of the domain, whereas n denotes the +unit outer normal to the boundary $\partial\Omega$ -of the domain. This equation, -(1), is the conservative version of the -transport equation already considered in step 9 of this tutorial. + ALT="$\partial\Omega$">. +This +equation, (1), is the conservative version of +the transport equation already considered in step 9 of this tutorial. + +

+In particular will consider problem (1) on + + +$\Omega=[0,1]^2$ +with + +$\beta=\frac{1}{\vert x\vert}(-x_2, x_1)$ +representing a +circular counterclockwise flow field, f=0 and g=1 on + + +$x\in\partial\Omega_-^1:=[0,0.5]\times\{0\}$ +and g=0 on + +$x\in
+\partial\Omega_-\setminus \partial\Omega_-^1$.

Discretization

-To follow the general theory of deriving DG discretizations for purely +To follow the general paradigm of deriving DG discretizations for purely hyperbolic equations we first consider the general hyperbolic problem

@@ -114,22 +146,21 @@ hyperbolic equations we first consider the general hyperbolic problem \begin{displaymath}\nabla\cdot F(u)=f \qquad\mbox{in }\Omega,
 \end{displaymath}

subject to appropriate boundary conditions. Here F denotes the flux -function of the equation under consideration that for in our case, see equation, -(1), is represented by +function of the equation under consideration that in our case, see +equation (1), is represented by $F(u)=\beta u$. -For -deriving the DG discretization we start with a variational, +For deriving the DG discretization we start with a variational, mesh-dependent formulation of the problem,

@@ -140,7 +171,7 @@ mesh-dependent formulation of the problem, \begin{displaymath}\sum_K\left\{-(F(u),\nabla v)_K+(F(u)\cdot n, v)_{\partial K}\right\}=(f,v)_\Omega,
 \end{displaymath}
@@ -152,18 +183,19 @@ triangulation. Here $(\cdot, \cdot)_K$ and $(\cdot, \cdot)_{\partial
 K}$ simply denote the integrals over the cell and the boundary of -the cell, respectively. To discretize the problem, the functions uand v are replaced by discrete functions uh and vh that in the +the cell, respectively. To discretize the problem, the functions u +and v are replaced by discrete functions uh and vh that in the case of discontinuous Galerkin methods belong to the space Vh of discontinuous piecewise polynomial functions of some degree p. Due to the discontinuity of the discrete function uh on interelement @@ -171,31 +203,31 @@ faces, the flux $F(u)\cdot n$ must be replaced by a numerical flux function $H(u_h, \hat u_h, n)$, where $u_h\vert _{\partial K}$denotes the inner trace (w.r.t. the cell K) of uh and $\hat
 u_h\vert _{\partial K}$ the outer trace, i.e. the value of uh on the neighboring cell. Furthermore the numerical flux function H, among -other things, is consistent, i.e. +other things, must be consistent, i.e.

$u_h\in V_h$ such that

@@ -246,7 +278,7 @@ such that @@ -257,13 +289,13 @@ such that

Boundary conditions are realized by replacing $\hat u_h$ on the inflow boundary $\partial\Omega_-$ by the boundary function g. In the special case of the transport equation @@ -275,7 +307,7 @@ is given by @@ -283,11 +315,11 @@ H(u_h,\hat u_h,n)(x)=\left\{\begin{array}{ll}
 \begin{displaymath}
 \sum_K\left\{-(F(u_h),\nabla v_h)_K+(H(u_h,\hat u_h,n), v_h)_{\partial K}\right\}=(f,v)_\Omega, \quad\forall v_h\in V_h.
 \end{displaymath}
 \begin{displaymath}
 H(u_h,\hat u_h,n)(x)=\left\{\begin{array}{ll}
 (\beta\cdot ...
-...)(x),&\mbox{for } \beta(x)\cdot n(x)\geq 0.
+...)(x),&\mbox{for } \beta(x)\cdot n(x)\geq 0,
 \end{array}\right.
 \end{displaymath} @@ -295,20 +327,28 @@ H(u_h,\hat u_h,n)(x)=\left\{\begin{array}{ll}

-Hence, the discontinuous Galerkin scheme for the transport equation -(1) is given by: find +where on the inflow part of the cell the value is taken from the +neighboring cell, $\hat u_h$, +and on the outflow part the value is +taken from the current cell, uh. Hence, the discontinuous Galerkin +scheme for the transport equation (1) is given +by: find $u_h\in V_h$ such that for all $v_h\in V_h$ -following equation holds: +following +equation holds:

@@ -319,7 +359,7 @@ following equation holds:
 \begin{displaymath}
 \sum_K\left\{-(u_h,\beta\cdot\nabla v_h)_K+(\beta\cdot n\, ...
 ...ght\}=(f,v)_\Omega-(\beta\cdot n\, g, v_h)_{\partial\Omega_-},
@@ -333,7 +373,7 @@ where
 <!-- MATH: $\partial K_-:=\{x\in\partial K, \beta(x)\cdot n(x)<0\}$ -->
 <IMG
  WIDTH= denotes the inflow boundary and @@ -341,19 +381,17 @@ the inflow boundary and K_-$ --> $\partial K_+=\partial K\setminus \partial
 K_-$ -the outflow part of cell K. This equation will be -refered to as first version of the DG method in the following. We -note that after integrating by parts again, we end up with: find - +the outflow part of cell K. Below, this equation will be +referred to as first version of the DG method. We note that +after integrating by parts again, we end up with: find $u_h\in V_h$ -such that + SRC="step-12.data/img21.gif" + ALT="$u_h\in V_h$">such that

$[u_h]=u_h-\hat u_h$ denotes the jump of the discrete function between two neighboring cells, that on the boundary of the domain is defined to be @@ -392,17 +430,17 @@ where each face K\cap\partial \hat K$ --> $\Gamma=\partial
 K\cap\partial \hat K$ between two neighboring cells K and $\hat K$occurs twice: Find $u_h\in V_h$ such that

@@ -415,7 +453,7 @@ such that
 \begin{displaymath}
 -\sum_K(F(u_h),\nabla v_h)_K+\sum_\Gamma\left\{(H(u_h,\hat ...
 ...s\partial\Omega}\right\}=(f,v)_\Omega \quad\forall v_h\in V_h,
@@ -430,48 +468,44 @@ this equation simplifies to: find
 <!-- MATH: $u_h\in V_h$ -->
 <IMG
  WIDTH= such that

 \begin{displaymath}
 -\sum_K(F(u_h),\nabla v_h)_K+\sum_\Gamma(H(u_h,\hat u_h,n),...
-...Gamma\cap\partial\Omega}=(f,v)_\Omega \quad\forall v_h\in V_h.
+...), v_h)_{\partial\Omega}=(f,v)_\Omega \quad\forall v_h\in V_h.
 \end{displaymath} (7)

-Whereas the outer unit normal - +Whereas the outer unit normal $n\vert _{\partial K}$ -is uniquely defined this is not so for $n_\Gamma$. -$n_\Gamma$ -might be the normal from -either side of the face. Hence, we need to fix the normal n on the face to -be one of the two normals and denote the other normal by --n. This way we get -n in the second face term in +as the latter might be the normal from +either side of the face. Hence, we need to fix the normal n on the +face to be one of the two normals and denote the other normal by -n. +This way we get -n in the second face term in (6) that finally produces the minus sign in the jump [vh] in equation (7). @@ -488,7 +522,7 @@ equation (7) simplifies to
 \begin{displaymath}
 -\sum_K(u_h,\beta\cdot\nabla v_h)_K+\sum_\Gamma\left\{(\bet...
 ...ght\}=(f,v)_\Omega-(\beta\cdot n\, g, v_h)_{\partial\Omega_-},
@@ -498,20 +532,20 @@ equation (<A HREF=7) simplifies to

-what will be refered to as second version of the DG method. +which will be refered to as second version of the DG method.

Implementation

As already mentioned at the beginning of this example we will -implement the assembling of the system matrix in two different ways. +implement assembling the system matrix in two different ways. The first one will be based on the first version (5) of the DG method that includes a sum of integrals over all cell boundaries $\partial K$. This is realized by a loop over all cells and a nested loop over all faces of each cell. Thereby each inner face @@ -519,44 +553,44 @@ a nested loop over all faces of each cell. Thereby each inner face $\Gamma=\partial
 K\cap\partial \hat K$ is treated twice, the first time when the outer loop treats cell K and the second time when it treats cell $\hat K$. This way some values like the shape function values at quadrature points on faces need to be computed twice.

-To overcome this overhead and for comparison, we implement the -assembling of a matrix also in a second and different way. This will +To overcome this overhead and for comparison, we implement +assembling of matrix also in a second and different way. This will be based on the second version (8) that includes a sum of integrals over all faces $\Gamma$. Here, several -difficulties occur. +difficulties occurs.

    -
  • As degrees of freedom are associated to cells (and not to faces) - and as a normal is only defined w.r.t a cell adjacent to the face we +
  • As degrees of freedom are associated with cells (and not to faces) + and as a normal is only defined w.r.t. a cell adjacent to the face we cannot simply run over all faces of the triangulation but need to perform the nested loop over all cells and all faces of each cell like in the first implementation. This, because in deal.II faces are accessible from cells but not visa versa.
  • Due to the nested loop we arrive twice at each face. In order to - assemble the face terms only once we either need to track which + assemble face terms only once we either need to track which faces we have treated before, or we introduce a simple rule that decides which of the two adjacent cells the face should be accessed and treated from. Here, we employ the second approach and define the following rule:
    a) -
    If the two cells adjacent to a face are of the same refinement level we access and treat the face from the cell with lower index. +
    If the two cells adjacent to a face are of the same refinement level we access and treat the face from the cell with lower index on this level.
    b)
    If the two cells are of different refinement levels we access and treat the face from the coarser cell. @@ -581,19 +615,19 @@ at a specific face there are the cases
    neighboring cell is of the same refinement level, and
    4.
    neighboring cell is coarser -
    where `neighboring cell' denotes one of the two cells adjacent to the -face which is not the current cell. In all these cases the assembling -of the face terms are either the same or similar to each other. Hence, -we can implement the assembling of the face terms either by `copy and -paste' (the lazy way, that revenges not later than the scheme or the -equation might want to be changed afterwards) or by calling a separate -function that covers all four cases. To be kind of educational within -this tutorial we perform the latter approach, of course. We go even -further and encapsulate this function and everything that is needed -for assembling the specific equation under consideration within a -class called DGTransportEquation. This class includes objects -of all equation-specific functions, as there are the RHS and -the BoundaryValues class, both derived from the Function +where the `neighboring cell' and the current cell have the mentioned +faces in common. In last three cases the assembling of the face terms +are almost the same. Hence, we can implement the assembling of the +face terms either by `copy and paste' (the lazy way, whose +disadvantages come up when the scheme or the equation might want to be +changed afterwards) or by calling a separate function that covers all +three cases. To be kind of educational within this tutorial we perform +the latter approach, of course. We go even further and encapsulate +this function and everything that is needed for assembling the +specific equation under consideration within a class called +DGTransportEquation. This class includes objects of all +equation-specific functions, the RHS and the +BoundaryValues class, both derived from the Function class, and the Beta class representing the vector field. Furthermore, the DGTransportEquation class comprises member functions assemble_face_terms1 and @@ -609,4 +643,6 @@ Indeed, the implementation of the assemble_system1 and assemble_system2 functions of the DGMethod class will be general enough to serve for different DG methods, different equations, even for systems of equations (!) and, under small -modifications, for nonlinear problems. +modifications, for nonlinear problems. Finally we note that the +program is dimension independent, i.e. after replacing +DGMethod<2> by DGMethod<3> the code runs in 3d. diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-12.data/intro.tex b/deal.II/doc/tutorial/chapter-2.step-by-step/step-12.data/intro.tex index 2b850cff93..c2d6a16a0d 100644 --- a/deal.II/doc/tutorial/chapter-2.step-by-step/step-12.data/intro.tex +++ b/deal.II/doc/tutorial/chapter-2.step-by-step/step-12.data/intro.tex @@ -6,13 +6,14 @@ \begin{document} \subsection{Overview} This example is devoted to the \emph{discontinuous Galerkin method}, or -in short: DG method. It includes following topics. +in short: DG method. It includes the following topics. \begin{itemize} \item Discretization of the linear transport equation with the DG method -\item Two different assembling routines of the system matrix based on face terms given +\item Two different assembling routines for the system matrix based on + face terms given as a sum of integrals that \begin{enumerate} -\item as a sum of integrals over all cell boundaries, and -\item as a sum of integrals over all faces. +\item loops over all cell and all their faces, or that +\item loops over all faces, whereas each face is treated only once. \end{enumerate} \item Time comparison of the two assembling routines. \end{itemize} @@ -37,20 +38,26 @@ Here, $\beta=\beta(x)$ is a vector field, $f$ a source function, $u$ the \[ \partial\Omega_-:=\{x\in\partial\Omega, \beta(x)\cdot n(x)<0\} \] -the inflow boundary of the domain, whereas $n$ denotes the unit outer -normal to boundary $\partial\Omega$ of the domain. This equation, -\eqref{transport-equation}, is the conservative version of the -transport equation already considered in step 9 of this tutorial. +the inflow part of the boundary of the domain, whereas $n$ denotes the +unit outer normal to the boundary $\partial\Omega$. This +equation, \eqref{transport-equation}, is the conservative version of +the transport equation already considered in step 9 of this tutorial. + +In particular will consider problem \eqref{transport-equation} on +$\Omega=[0,1]^2$ with $\beta=\frac{1}{|x|}(-x_2, x_1)$ representing a +circular counterclockwise flow field, $f=0$ and $g=1$ on +$x\in\partial\Omega_-^1:=[0,0.5]\times\{0\}$ and $g=0$ on $x\in +\partial\Omega_-\setminus \partial\Omega_-^1$. \subsection{Discretization} -To follow the general theory of deriving DG discretizations for purely +To follow the general paradigm of deriving DG discretizations for purely hyperbolic equations we first consider the general hyperbolic problem \[ \nabla\cdot F(u)=f \qquad\mbox{in }\Omega, \] subject to appropriate boundary conditions. Here $F$ denotes the flux -function of the equation under consideration that for in our case, see equation, -\eqref{transport-equation}, is represented by $F(u)=\beta u$. For -deriving the DG discretization we start with a variational, +function of the equation under consideration that in our case, see +equation \eqref{transport-equation}, is represented by $F(u)=\beta u$. +For deriving the DG discretization we start with a variational, mesh--dependent formulation of the problem, \[ \sum_K\left\{-(F(u),\nabla v)_K+(F(u)\cdot n, v)_{\partial K}\right\}=(f,v)_\Omega, @@ -59,7 +66,7 @@ that originates from \eqref{transport-equation} by multiplication with a test function and integration by parts on each cell $K$ of the triangulation. Here $(\cdot, \cdot)_K$ and $(\cdot, \cdot)_{\partial K}$ simply denote the integrals over the cell and the boundary of -the cell, respectively. To discretize the problem, the functions $u$ +the cell, respectively. To discretize the problem, the functions $u$ and $v$ are replaced by discrete functions $u_h$ and $v_h$ that in the case of discontinuous Galerkin methods belong to the space $V_h$ of discontinuous piecewise polynomial functions of some degree $p$. Due @@ -69,7 +76,7 @@ faces, the flux $F(u)\cdot n$ must be replaced by a \emph{numerical denotes the inner trace (w.r.t. the cell $K$) of $u_h$ and $\hat u_h|_{\partial K}$ the outer trace, i.e. the value of $u_h$ on the neighboring cell. Furthermore the numerical flux function $H$, among -other things, is consistent, i.e. +other things, must be consistent, i.e. \[ H(u,u,n)=F(u)\cdot n, \] @@ -89,21 +96,25 @@ is given by \begin{equation}\label{flux-transport-equation} H(u_h,\hat u_h,n)(x)=\left\{\begin{array}{ll} (\beta\cdot n\, u_h)(x),&\mbox{for } \beta(x)\cdot n(x)<0,\\ - (\beta\cdot n\, \hat u_h)(x),&\mbox{for } \beta(x)\cdot n(x)\geq 0. + (\beta\cdot n\, \hat u_h)(x),&\mbox{for } \beta(x)\cdot n(x)\geq 0, \end{array} \right. \end{equation} -Hence, the discontinuous Galerkin scheme for the transport equation -\eqref{transport-equation} is given by: find $u_h\in V_h$ such that for all $v_h\in V_h$ following equation holds: +where on the inflow part of the cell the value is taken from the +neighboring cell, $\hat u_h$, and on the outflow part the value is +taken from the current cell, $u_h$. Hence, the discontinuous Galerkin +scheme for the transport equation \eqref{transport-equation} is given +by: find $u_h\in V_h$ such that for all $v_h\in V_h$ following +equation holds: \begin{equation}\label{dg-transport} \sum_K\left\{-(u_h,\beta\cdot\nabla v_h)_K+(\beta\cdot n\, u_h, v_h)_{\partial K_+\setminus\partial\Omega}+(\beta\cdot n\, \hat u_h, v_h)_{\partial K_-\setminus\partial\Omega}\right\}=(f,v)_\Omega-(\beta\cdot n\, g, v_h)_{\partial\Omega_-}, \end{equation} where $\partial K_-:=\{x\in\partial K, \beta(x)\cdot n(x)<0\}$ denotes the inflow boundary and $\partial K_+=\partial K\setminus \partial -K_-$ the outflow part of cell $K$. This equation will be -refered to as \emph{first version} of the DG method in the following. We -note that after integrating by parts again, we end up with: find -$u_h\in V_h$ such that +K_-$ the outflow part of cell $K$. Below, this equation will be +referred to as \emph{first version} of the DG method. We note that +after integrating by parts again, we end up with: find $u_h\in V_h$ +such that \[ \sum_K\left\{(\nabla\cdot\{\beta u_h\},\nabla v_h)_K-(\beta\cdot n [u_h], v_h)_{\partial K_-}\right\}=(f,v)_\Omega, \quad\forall v_h\in V_h, \] @@ -124,13 +135,13 @@ occurs twice: Find $u_h\in V_h$ such that By employing conservativity \eqref{conservative} of the numerical flux this equation simplifies to: find $u_h\in V_h$ such that \begin{equation}\label{dg-scheme-faces} - -\sum_K(F(u_h),\nabla v_h)_K+\sum_\Gamma(H(u_h,\hat u_h,n), [v_h])_{\Gamma\setminus\partial\Omega}+\sum_\Gamma(H(u_h,\hat u_h,n), v_h)_{\Gamma\cap\partial\Omega}=(f,v)_\Omega \quad\forall v_h\in V_h. + -\sum_K(F(u_h),\nabla v_h)_K+\sum_\Gamma(H(u_h,\hat u_h,n), [v_h])_{\Gamma\setminus\partial\Omega}+(H(u_h,g,n), v_h)_{\partial\Omega}=(f,v)_\Omega \quad\forall v_h\in V_h. \end{equation} -Whereas the outer unit normal -$n|_{\partial K}$ is uniquely defined this is not so for $n_\Gamma$. $n_\Gamma$ might be the normal from -either side of the face. Hence, we need to fix the normal $n$ on the face to -be one of the two normals and denote the other normal by -$-n$. This way we get $-n$ in the second face term in +Whereas the outer unit normal $n|_{\partial K}$ is uniquely defined +this is not so for $n_\Gamma$ as the latter might be the normal from +either side of the face. Hence, we need to fix the normal $n$ on the +face to be one of the two normals and denote the other normal by $-n$. +This way we get $-n$ in the second face term in \eqref{dg-scheme-faces-long} that finally produces the minus sign in the jump $[v_h]$ in equation \eqref{dg-scheme-faces}. @@ -139,10 +150,10 @@ equation \eqref{dg-scheme-faces} simplifies to \begin{equation}\label{dg-transport-gamma} -\sum_K(u_h,\beta\cdot\nabla v_h)_K+\sum_\Gamma\left\{(\beta\cdot n\, u_h, [v_h])_{\Gamma_+\setminus\partial\Omega}+(\beta\cdot n\, \hat u_h, [v_h])_{\Gamma_-\setminus\partial\Omega}\right\}=(f,v)_\Omega-(\beta\cdot n\, g, v_h)_{\partial\Omega_-}, \end{equation} -what will be refered to as \emph{second version} of the DG method. +which will be refered to as \emph{second version} of the DG method. \subsection{Implementation} As already mentioned at the beginning of this example we will -implement the assembling of the system matrix in two different ways. +implement assembling the system matrix in two different ways. The first one will be based on the first version \eqref{dg-transport} of the DG method that includes a sum of integrals over all cell boundaries $\partial K$. This is realized by a loop over all cells and @@ -152,27 +163,27 @@ time when the outer loop treats cell $K$ and the second time when it treats cell $\hat K$. This way some values like the shape function values at quadrature points on faces need to be computed twice. -To overcome this overhead and for comparison, we implement the -assembling of a matrix also in a second and different way. This will +To overcome this overhead and for comparison, we implement +assembling of matrix also in a second and different way. This will be based on the second version \eqref{dg-transport-gamma} that includes a sum of integrals over all faces $\Gamma$. Here, several -difficulties occur. +difficulties occurs. \begin{itemize} -\item As degrees of freedom are associated to cells (and not to faces) - and as a normal is only defined w.r.t a cell adjacent to the face we +\item As degrees of freedom are associated with cells (and not to faces) + and as a normal is only defined w.r.t. a cell adjacent to the face we cannot simply run over all faces of the triangulation but need to perform the nested loop over all cells and all faces of each cell like in the first implementation. This, because in \emph{deal.II} faces are accessible from cells but not visa versa. \item Due to the nested loop we arrive twice at each face. In order to - assemble the face terms only once we either need to track which + assemble face terms only once we either need to track which faces we have treated before, or we introduce a simple rule that decides which of the two adjacent cells the face should be accessed and treated from. Here, we employ the second approach and define the following rule: \begin{enumerate} \renewcommand{\labelenumi}{\alph{enumi})} - \item If the two cells adjacent to a face are of the same refinement level we access and treat the face from the cell with lower index. + \item If the two cells adjacent to a face are of the same refinement level we access and treat the face from the cell with lower index on this level. \item If the two cells are of different refinement levels we access and treat the face from the coarser cell. \end{enumerate} @@ -195,19 +206,19 @@ at a specific face there are the cases \item neighboring cell is of the same refinement level, and \item neighboring cell is coarser \end{enumerate} -where `neighboring cell' denotes one of the two cells adjacent to the -face which is not the current cell. In all these cases the assembling -of the face terms are either the same or similar to each other. Hence, -we can implement the assembling of the face terms either by `copy and -paste' (the lazy way, that revenges not later than the scheme or the -equation might want to be changed afterwards) or by calling a separate -function that covers all four cases. To be kind of educational within -this tutorial we perform the latter approach, of course. We go even -further and encapsulate this function and everything that is needed -for assembling the specific equation under consideration within a -class called \emph{DGTransportEquation}. This class includes objects -of all equation--specific functions, as there are the \emph{RHS} and -the \emph{BoundaryValues} class, both derived from the \emph{Function} +where the `neighboring cell' and the current cell have the mentioned +faces in common. In last three cases the assembling of the face terms +are almost the same. Hence, we can implement the assembling of the +face terms either by `copy and paste' (the lazy way, whose +disadvantages come up when the scheme or the equation might want to be +changed afterwards) or by calling a separate function that covers all +three cases. To be kind of educational within this tutorial we perform +the latter approach, of course. We go even further and encapsulate +this function and everything that is needed for assembling the +specific equation under consideration within a class called +\emph{DGTransportEquation}. This class includes objects of all +equation--specific functions, the \emph{RHS} and the +\emph{BoundaryValues} class, both derived from the \emph{Function} class, and the \emph{Beta} class representing the vector field. Furthermore, the \emph{DGTransportEquation} class comprises member functions \emph{assemble\_face\_terms1} and @@ -223,7 +234,9 @@ Indeed, the implementation of the \emph{assemble\_system1} and \emph{assemble\_system2} functions of the \emph{DGMethod} class will be general enough to serve for different DG methods, different equations, even for systems of equations (!) and, under small -modifications, for nonlinear problems. +modifications, for nonlinear problems. Finally we note that the +program is dimension independent, i.e. after replacing +\emph{DGMethod<2>} by \emph{DGMethod<3>} the code runs in 3d. \end{document} -- 2.39.5