From fe09c5a05a86db809d834630739600513eafa8e6 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 18 Sep 2001 10:57:41 +0000 Subject: [PATCH] The documentation was inconsistent about what the FourierCosineFunction and related classes implement. Choose one way. git-svn-id: https://svn.dealii.org/trunk@5022 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/function_lib.h | 8 +- deal.II/base/source/function_lib.cc | 128 +++-------------------- 2 files changed, 17 insertions(+), 119 deletions(-) diff --git a/deal.II/base/include/base/function_lib.h b/deal.II/base/include/base/function_lib.h index 858ffdd850..11214eaa2f 100644 --- a/deal.II/base/include/base/function_lib.h +++ b/deal.II/base/include/base/function_lib.h @@ -540,7 +540,7 @@ namespace Functions * Given a wavenumber vector generate a cosine function. The * wavenumber coefficient is given as a @p{d}-dimensional point @p{k} * in Fourier space, and the function is then recovered as @p{f(x) = - * \prod_i cos(k_i x_i) = Re(\exp(i k.x))}. + * cos(\sum_i k_i x_i) = Re(\exp(i k.x))}. * * The class has its name from the fact that it resembles one * component of a Fourier cosine decomposition. @@ -599,7 +599,7 @@ namespace Functions * Given a wavenumber vector generate a sine function. The * wavenumber coefficient is given as a @p{d}-dimensional point @p{k} * in Fourier space, and the function is then recovered as @p{f(x) = - * \prod_i sin(k_i x_i) = Im(\exp(i k.x))}. + * sin(\sum_i k_i x_i) = Im(\exp(i k.x))}. * * The class has its name from the fact that it resembles one * component of a Fourier sine decomposition. @@ -658,7 +658,7 @@ namespace Functions * of sine functions. Each wavenumber coefficient is given as a * @p{d}-dimensional point @p{k} in Fourier space, and the entire * function is then recovered as - * @p{f(x) = \sum_j w_j \prod_i sin(k_i x_i) = Im(\sum_j w_j \exp(i k.x))}. + * @p{f(x) = \sum_j w_j sin(\sum_i k_i x_i) = Im(\sum_j w_j \exp(i k.x))}. * * @author Wolfgang Bangerth, 2001 */ @@ -724,7 +724,7 @@ namespace Functions * of cosine functions. Each wavenumber coefficient is given as a * @p{d}-dimensional point @p{k} in Fourier space, and the entire * function is then recovered as - * @p{f(x) = \sum_j w_j \prod_i cos(k_i x_i) = Re(\sum_j w_j \exp(i k.x))}. + * @p{f(x) = \sum_j w_j cos(\sum_i k_i x_i) = Re(\sum_j w_j \exp(i k.x))}. * * @author Wolfgang Bangerth, 2001 */ diff --git a/deal.II/base/source/function_lib.cc b/deal.II/base/source/function_lib.cc index 1917c57624..3ce089862b 100644 --- a/deal.II/base/source/function_lib.cc +++ b/deal.II/base/source/function_lib.cc @@ -1119,7 +1119,7 @@ namespace Functions -/* ---------------------- FourierSineFunction ----------------------- */ +/* ---------------------- FourierCosineFunction ----------------------- */ template @@ -1138,10 +1138,7 @@ namespace Functions const unsigned int component) const { Assert (component==0, ExcIndexRange(component,0,1)); - double val=1; - for (unsigned int i=0; i grad; - for (unsigned int i=0; i grad; - for (unsigned int i=0; i sum; for (unsigned int s=0; s grad; - for (unsigned int i=0; i sum; for (unsigned int s=0; s grad; - for (unsigned int i=0; i