Commit a63a7f20 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Forgotten to renew polynomial degree definition in scalar demos in...

Forgotten to renew polynomial degree definition in scalar demos in documentation while removing ProblemScal.
parent 1f0eda53
......@@ -5,7 +5,7 @@ ballMesh->global refinements: 3
ball->mesh: ballMesh
ball->dim: 2
ball->polynomial degree: 1
ball->polynomial degree[0]: 1
ball->space->components: 1
......
......@@ -5,7 +5,7 @@ ballMesh->global refinements: 15
ball->mesh: ballMesh
ball->dim: 3
ball->polynomial degree: 1
ball->polynomial degree[0]: 1
ball->space->components: 1
......
......@@ -4,9 +4,9 @@ bunnyMesh->macro file name: ./macro/bunny_fixed.macro
bunnyMesh->check: 0
bunnyMesh->global refinements: 0
bunny->mesh: bunnyMesh
bunny->dim: 2
bunny->polynomial degree: 1
bunny->mesh: bunnyMesh
bunny->dim: 2
bunny->polynomial degree[0]: 1
bunny->solver: cg
bunny->solver->max iteration: 100
......
......@@ -5,7 +5,7 @@ elliptMesh->global refinements: 3
ellipt->mesh: elliptMesh
ellipt->dim: 1
ellipt->polynomial degree: 1
ellipt->polynomial degree[0]: 1
ellipt->components: 1
ellipt->solver: cg
......
......@@ -5,7 +5,7 @@ elliptMesh->global refinements: 0
ellipt->mesh: elliptMesh
ellipt->dim: 2
ellipt->polynomial degree: 1
ellipt->polynomial degree[0]: 1
ellipt->components: 1
ellipt->solver: cg
......
......@@ -5,7 +5,7 @@ elliptMesh->global refinements: 0
ellipt->mesh: elliptMesh
ellipt->dim: 3
ellipt->polynomial degree: 1
ellipt->polynomial degree[0]: 1
ellipt->components: 1
ellipt->solver: cg
......
......@@ -3,7 +3,7 @@ dimension of world: 1
heatMesh->macro file name: ./macro/macro.stand.1d
heatMesh->global refinements: 0
heat->space->polynomial degree: 1
heat->space->polynomial degree[0]: 1
heat->space->dim: 1
heat->space->mesh: heatMesh
......
......@@ -3,7 +3,7 @@ dimension of world: 3
heatMesh->macro file name: ./macro/macro.stand.3d
heatMesh->global refinements: 3
heat->space->polynomial degree: 1
heat->space->polynomial degree[0]: 1
heat->space->dim: 3
heat->space->mesh: heatMesh
......
......@@ -5,7 +5,7 @@ neumannMesh->global refinements: 0
neumann->mesh: neumannMesh
neumann->dim: 2
neumann->polynomial degree: 1
neumann->polynomial degree[0]: 1
neumann->components: 1
neumann->solver: cg
......
......@@ -3,10 +3,10 @@ dimension of world: 3
parametricMesh->macro file name: ./macro/parametric.macro.3d
parametricMesh->global refinements: 0
parametric->mesh: parametricMesh
parametric->dim: 2
parametric->polynomial degree: 2
parametric->components: 1
parametric->mesh: parametricMesh
parametric->dim: 2
parametric->polynomial degree[0]: 2
parametric->components: 1
parametric->solver: cg
parametric->solver->max iteration: 100
......
......@@ -6,7 +6,7 @@ periodicMesh->global refinements: 0
periodic->mesh: periodicMesh
periodic->dim: 1
periodic->polynomial degree: 1
periodic->polynomial degree[0]: 1
periodic->components: 1
periodic->solver: cg
......
......@@ -6,7 +6,7 @@ periodicMesh->global refinements: 0
periodic->mesh: periodicMesh
periodic->dim: 2
periodic->polynomial degree: 1
periodic->polynomial degree[0]: 1
periodic->components: 1
periodic->solver: cg
......
......@@ -6,7 +6,7 @@ periodicMesh->global refinements: 0
periodic->mesh: periodicMesh
periodic->dim: 3
periodic->polynomial degree: 1
periodic->polynomial degree[0]: 1
periodic->components: 1
periodic->solver: cg
......
......@@ -3,10 +3,10 @@ dimension of world: 3
sphereMesh->macro file name: ./macro/sphere_macro.3d
sphereMesh->global refinements: 10
sphere->mesh: sphereMesh
sphere->dim: 2
sphere->polynomial degree: 1
sphere->components: 1
sphere->mesh: sphereMesh
sphere->dim: 2
sphere->polynomial degree[0]: 1
sphere->components: 1
sphere->solver: cg
sphere->solver->max iteration: 100
......
......@@ -3,10 +3,10 @@ dimension of world: 3
torusMesh->macro file name: ./macro/torus_macro.3d
torusMesh->global refinements: 8
torus->mesh: torusMesh
torus->dim: 2
torus->polynomial degree: 1
torus->components: 1
torus->mesh: torusMesh
torus->dim: 2
torus->polynomial degree[0]: 1
torus->components: 1
torus->solver: cg
torus->solver->max iteration: 1000
......
......@@ -71,8 +71,8 @@ $F(\{v_i\}_i, \{\nabla w_j\}_j, \vec{x}) \cdot \nabla u$ & \texttt{General\_FOT}
%==========================================================
\multicolumn{2}{c}{\scriptsize Second-Order-Terms, sign in strong formulation: -}\\
\hline
$\Delta u$ & \texttt{Laplace\_SOT}() \\
$c \cdot \Delta u$ & \texttt{FactorLaplace\_SOT}($c\in\mathbb{R}$) \\
$\Delta u$ & \texttt{Simple\_SOT}() \\
$c \cdot \Delta u$ & \texttt{Simple\_SOT}($c\in\mathbb{R}$) \\
$\nabla\cdot (f(\vec{x}) \nabla u)$ & \texttt{CoordsAtQP\_SOT}($f:\mathbb{R}^n\rightarrow\mathbb{R}$) \\
$\nabla\cdot (f(v) \nabla u)$ & \texttt{VecAtQP\_SOT}($v\in${\scriptsize DOFVector}$\langle\mathbb{R}\rangle$, $f:\mathbb{R}\rightarrow\mathbb{R}$) \\
$\nabla\cdot (f(v, \vec{x}) \nabla u)$ & \texttt{VecAndCoordsAtQP\_SOT}($v\in${\scriptsize DOFVector}$\langle\mathbb{R}\rangle$, $f:\mathbb{R}\times\mathbb{R}^n\rightarrow\mathbb{R}$) \\
......@@ -94,4 +94,4 @@ $\nabla \cdot (A(\nabla v, \vec{x}) \nabla u)$ & \texttt{MatrixGradientAndCoords
$\nabla \cdot (A(\{v_i\}_i, \{\nabla w_j\}_j, \vec{x}) \nabla u)$ & \texttt{General\_SOT}(\small{vector}$\langle${\scriptsize DOFVector}$\langle\mathbb{R}\rangle\rangle$,\small{vector}$\langle${\scriptsize DOFVector}$\langle\mathbb{R}\rangle\rangle$, $ A:\mathbb{R}^n\times$\small{vector}$\langle\mathbb{R}\rangle\times$\small{vector}$\langle\mathbb{R}^n\rangle\rightarrow\mathbb{R}^{n\times n}$, $div:\mathbb{R}^{n\times n}\rightarrow\mathbb{R}^{n}$) \\
\end{longtable}
\end{document}
\ No newline at end of file
\end{document}
......@@ -270,7 +270,7 @@ a finer mesh.
\begin{lstlisting}{}
ellipt->mesh: elliptMesh
ellipt->dim: 2
ellipt->polynomial degree: 1
ellipt->polynomial degree[0]: 1
ellipt->components: 1
\end{lstlisting}
......
\section{Parametric elements}
\label{s:parametric}
With parametric elements, problems can be solved on meshes which dimensions are not necessarily equal to the world dimension. Therefore, problems on arbitrary manifolds can be solved. Furthermore, the vertex coordinates of the mesh can be flexible. Hence, moving meshes can be implemented.
With parametric elements, problems can be solved on meshes which
dimensions are not necessarily equal to the world dimension.
Therefore, problems on arbitrary manifolds can be solved. Furthermore,
the vertex coordinates of the mesh can be flexible. Hence, moving
meshes can be implemented.
In this section, we solve equation (\ref{eq:ellipt}) with $f=2x_0$ ($x_0$ is the first component of $x$) on a torus. Then we rotate the torus about the $y$-axis and solve the problem again.
......@@ -43,7 +47,8 @@ We create a torus with center $(0; 0; 0)$ and the rotation axis in $z$-direction
\subsection{Source code}
First, we define the rotation about the $y$-axis, which is used later to rotate the whole torus and the right hand side function.
First, we define the rotation about the $y$-axis, which is used later
to rotate the whole torus and the right hand side function.
\begin{lstlisting}{}
class YRotation
......@@ -87,7 +92,8 @@ private:
};
\end{lstlisting}
Every time, the mesh is rotated, the right hand side function will be informed over the method \verb+rotate+.
Every time, the mesh is rotated, the right hand side function will be
informed over the method \verb+rotate+.
Now, we implement the projection on the torus.
......@@ -132,7 +138,10 @@ protected:
};
\end{lstlisting}
In the main program, we create a torus projection as \verb+VOLUME_PROJECTION+ with ID 1. The values of $r_1$ and $r_2$ are chosen, such that the resulting torus is completely surrounded by the macro mesh that is defined later.
In the main program, we create a torus projection as
\verb+VOLUME_PROJECTION+ with ID 1. The values of $r_1$ and $r_2$ are
chosen, such that the resulting torus is completely surrounded by the
macro mesh that is defined later.
\begin{lstlisting}{}
int main(int argc, char* argv[])
......@@ -158,9 +167,12 @@ int main(int argc, char* argv[])
torus.writeFiles(adaptInfo, true);
\end{lstlisting}
The problem definition and the creation of the adaptation loop are done in the usual way (here, replaced by \verb+...+) . After the adaptation loop has returned, we write the result.
The problem definition and the creation of the adaptation loop are
done in the usual way (here, replaced by \verb+...+) . After the
adaptation loop has returned, we write the result.
Before we let the torus rotate, some variables are defined. We set the rotation angle to $\frac{\Pi}{3}$.
Before we let the torus rotate, some variables are defined. We set the
rotation angle to $\frac{\Pi}{3}$.
\begin{lstlisting}{}
double rotation = M_PI/3.0;
......@@ -181,7 +193,11 @@ Before we let the torus rotate, some variables are defined. We set the rotation
parametricCoords[i] = new DOFVector<double>(feSpace, "parametric coords");
\end{lstlisting}
In the next step, we store the rotated vertex coordinates of the mesh in \verb+parametricCoords+,a vector of DOF vectors, where the first vector stores the first component of each vertex coordinate, and so on. In the STL map \verb+visited+, we store which vertices have already been visited, to avoid multiple rotations of the same point.
In the next step, we store the rotated vertex coordinates of the mesh
in \verb+parametricCoords+,a vector of DOF vectors, where the first
vector stores the first component of each vertex coordinate, and so
on. In the STL map \verb+visited+, we store which vertices have
already been visited, to avoid multiple rotations of the same point.
\begin{lstlisting}{}
std::map<DegreeOfFreedom, bool> visited;
......@@ -206,14 +222,20 @@ In the next step, we store the rotated vertex coordinates of the mesh in \verb+p
}
\end{lstlisting}
We create an instance of class \verb+ParametricFirstOrder+ which then is handed to the mesh. Now, in all future mesh traverses the vertex coordinates stored in \verb+parametricCoords+ are returned, instead of the original coordinates.
We create an instance of class \verb+ParametricFirstOrder+ which then
is handed to the mesh. Now, in all future mesh traverses the vertex
coordinates stored in \verb+parametricCoords+ are returned, instead of
the original coordinates.
\begin{lstlisting}{}
ParametricFirstOrder parametric(&parametricCoords);
torus.getMesh()->setParametric(&parametric);
\end{lstlisting}
We rotate the right hand side function, reset \verb+adaptInfo+ and start the adaptation loop again. Now, we compute the solution on the rotated torus, which then is written to the files \verb+rotation1.mesh+ and \verb+rotation1.dat+.
We rotate the right hand side function, reset \verb+adaptInfo+ and
start the adaptation loop again. Now, we compute the solution on the
rotated torus, which then is written to the files
\verb+rotation1.mesh+ and \verb+rotation1.dat+.
\begin{lstlisting}{}
f.rotate(rotation);
......@@ -226,7 +248,9 @@ We rotate the right hand side function, reset \verb+adaptInfo+ and start the ada
delete dc;
\end{lstlisting}
We perform another rotation. All we have to do is to modify the coordinates in \verb+parametricCoords+ and to inform $f$ about the rotation.
We perform another rotation. All we have to do is to modify the
coordinates in \verb+parametricCoords+ and to inform $f$ about the
rotation.
\begin{lstlisting}{}
visited.clear();
......@@ -271,7 +295,9 @@ Finally, we free some memory and finish the main program.
\subsection{Parameter file}
In the parameter file, we set the macro file to \verb+./macro/torus_macro.3d+. This two dimensional mesh is 8 times globally refined and successively projected on the torus.
In the parameter file, we set the macro file to
\verb+./macro/torus_macro.3d+. This two dimensional mesh is 8 times
globally refined and successively projected on the torus.
\begin{lstlisting}{}
dimension of world: 3
......@@ -279,9 +305,9 @@ dimension of world: 3
torusMesh->macro file name: ./macro/torus_macro.3d
torusMesh->global refinements: 8
torus->mesh: torusMesh
torus->dim: 2
torus->polynomial degree: 1
torus->mesh: torusMesh
torus->dim: 2
torus->polynomial degree[0]: 1
torus->solver: cg
torus->solver->max iteration: 1000
......
......@@ -174,9 +174,9 @@ dimension of world: 3
sphereMesh->macro file name: ./macro/sphere_macro.3d
sphereMesh->global refinements: 10
sphere->mesh: sphereMesh
sphere->dim: 2
sphere->polynomial degree: 1
sphere->mesh: sphereMesh
sphere->dim: 2
sphere->polynomial degree[0]: 1
sphere->solver: cg
sphere->solver->max iteration: 100
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment