From: Ralf Hartmann Date: Wed, 15 Aug 2007 07:32:06 +0000 (+0000) Subject: Some more bf vectors. X-Git-Tag: v8.0.0~10087 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f7bf89c82928448e92d449b4007f8da3a01d86e;p=dealii.git Some more bf vectors. git-svn-id: https://svn.dealii.org/trunk@14958 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-27/doc/intro.dox b/deal.II/examples/step-27/doc/intro.dox index 189b9f6f89..2ecf726f52 100644 --- a/deal.II/examples/step-27/doc/intro.dox +++ b/deal.II/examples/step-27/doc/intro.dox @@ -509,8 +509,8 @@ and While we are not particularly interested in the actual value of $\beta$, the formula above gives us a mean to calculate the value of -the exponent $\mu$ that we can then use to determine that $\hat u(\hat -x)$ is in $H^s(\hat K)$ with $s=\mu-\frac d2$. +the exponent $\mu$ that we can then use to determine that +$\hat u(\hat{\bf x})$ is in $H^s(\hat K)$ with $s=\mu-\frac d2$.

Compensating for anisotropy

diff --git a/deal.II/examples/step-27/step-27.cc b/deal.II/examples/step-27/step-27.cc index 6d3870ea74..8ca74046dc 100644 --- a/deal.II/examples/step-27/step-27.cc +++ b/deal.II/examples/step-27/step-27.cc @@ -759,26 +759,30 @@ void LaplaceProblem:: estimate_smoothness (Vector &smoothness_indicators) const { - // The first thing we need to do is to - // define the Fourier vectors $\vec k$ for - // which we want to compute Fourier - // coefficients of the solution on each - // cell. In 2d, we pick those vectors $\vec - // k=(\pi i, \pi j)^T$ for which - // $\sqrt{i^2+j^2}\le N$, with $i,j$ - // integers and $N$ being the maximal - // polynomial degree we use for the finite - // elements in this program. The 3d case is - // handled analogously. 1d and dimensions - // higher than 3 are not implemented, and - // we guard our implementation by making - // sure that we receive an exception in - // case someone tries to compile the - // program for any of these dimensions. + // The first thing we need to do is + // to define the Fourier vectors + // ${\bf k}$ for which we want to + // compute Fourier coefficients of + // the solution on each cell. In + // 2d, we pick those vectors ${\bf + // k}=(\pi i, \pi j)^T$ for which + // $\sqrt{i^2+j^2}\le N$, with + // $i,j$ integers and $N$ being the + // maximal polynomial degree we use + // for the finite elements in this + // program. The 3d case is handled + // analogously. 1d and dimensions + // higher than 3 are not + // implemented, and we guard our + // implementation by making sure + // that we receive an exception in + // case someone tries to compile + // the program for any of these + // dimensions. // - // We exclude $\vec k=0$ to avoid problems - // computing $|\vec k|^{-mu}$ and $\ln - // |\vec k|$. The other vectors are stored + // We exclude ${\bf k}=0$ to avoid problems + // computing $|{\bf k}|^{-mu}$ and $\ln + // |{\bf k}|$. The other vectors are stored // in the field k_vectors. In // addition, we store the square of the // magnitude of each of these vectors (up @@ -848,7 +852,7 @@ estimate_smoothness (Vector &smoothness_indicators) const // Next, we need to assemble the matrices // that do the Fourier transforms for each // of the finite elements we deal with, - // i.e. the matrices ${\cal F}_{\vec k,j}$ + // i.e. the matrices ${\cal F}_{{\bf k},j}$ // defined in the introduction. We have to // do that for each of the finite elements // in use. Note that these matrices are @@ -858,14 +862,16 @@ estimate_smoothness (Vector &smoothness_indicators) const std::vector > > fourier_transform_matrices (fe_collection.size()); - // In order to compute them, we of course - // can't perform the Fourier transform - // analytically, but have to approximate it - // using quadrature. To this end, we use a - // quadrature formula that is obtained by - // iterating a 2-point Gauss formula as - // many times as the maximal exponent we - // use for the term $e^{i\vec k\cdot \vec + // In order to compute them, we of + // course can't perform the Fourier + // transform analytically, but have + // to approximate it using + // quadrature. To this end, we use + // a quadrature formula that is + // obtained by iterating a 2-point + // Gauss formula as many times as + // the maximal exponent we use for + // the term $e^{i{\bf k}\cdot{\bf // x}$: QGauss<1> base_quadrature (2); QIterated quadrature (base_quadrature, N); @@ -875,8 +881,9 @@ estimate_smoothness (Vector &smoothness_indicators) const // respective matrix ${\cal F}$ to the // right size, and integrate each entry of // the matrix numerically as ${\cal - // F}_{\vec k,j}=\sum_q e^{i\vec k\cdot\vec - // x}\varphi_j(\vec x_q) w_q$, where $x_q$ + // F}_{{\bf k},j}=\sum_q e^{i{\bf k}\cdot + // {\bf x}\varphi_j({\bf x}_q) + // w_q$, where $x_q$ // are the quadrature points and $w_q$ are // the quadrature weights. Note that the // imaginary unit $i=\sqrt{-1}$ is obtained @@ -958,13 +965,13 @@ estimate_smoothness (Vector &smoothness_indicators) const // only fit our exponential decay of // Fourier coefficients to the largest // coefficients for each possible value - // of $|\vec k|$. To this end, we + // of $|{\bf k}|$. To this end, we // create a map that for each magnitude - // $|\vec k|$ stores the largest $|\hat - // U_{\vec k}|$ found so far, i.e. we + // $|{\bf k}|$ stores the largest $|\hat + // U_{{\bf k}}|$ found so far, i.e. we // overwrite the existing value (or add // it to the map) if no value for the - // current $|\vec k|$ exists yet, or if + // current $|{\bf k}|$ exists yet, or if // the current value is larger than the // previously stored one: std::map k_to_max_U_map; @@ -981,14 +988,14 @@ estimate_smoothness (Vector &smoothness_indicators) const // of vectors as integers, since this // way we do not have to deal with // round-off-sized differences between - // different values of $|\vec k|$. + // different values of $|{\bf k}|$. // As the final task, we have to // calculate the various contributions // to the formula for $\mu$. We'll only // take those Fourier coefficients with // the largest magnitude for a given - // value of $|\vec k|$ as explained + // value of $|{\bf k}|$ as explained // above: double sum_1 = 0, sum_ln_k = 0,