From: bangerth Date: Sat, 1 Jan 2011 03:27:36 +0000 (+0000) Subject: A bit more. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f85688d9f07f38e94ffcaebb0f1490e237fea0c3;p=dealii-svn.git A bit more. git-svn-id: https://svn.dealii.org/trunk@23095 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-38/doc/intro.dox b/deal.II/examples/step-38/doc/intro.dox index 0d4cb87c1e..332ee93fd5 100644 --- a/deal.II/examples/step-38/doc/intro.dox +++ b/deal.II/examples/step-38/doc/intro.dox @@ -115,18 +115,31 @@ and [Bonito, Nochetto, and Pauletti, SIAM J. Numer. Anal. 48(5), 2010]. -

The numerical approximation

+ +

Testcase

+ +In general when you want to test numerically the accuracy and/or order of +convergence of an algorithm you need to provide an exact solution. The usual +trick is to pick a function that we want to be the solution, then apply the +differential operator to it that defines a forcing term for the right hand +side. This is what we do in this example. In the current case, the form of the +domain is obviously also essential. + +We produce one test case for a 2d problem and another one for 3d: + +- In 2d, let's choose as domain a half circle. On this domain, we choose the + function $u(\mathbf x)=-2x_1x_2$ as the solution. + +- In 3d, the domain is again half of the surface of the unit sphere but this + time without the disk that closes it. We choose $u(\mathbf x)=-2\sin(\pi + x_1)\cos(\pi x_2)e^z$ as the solution. + +

Implementation

-

Testcase

-In general when you want to test numerically the accuracy and/or -order of convergence of an algorithm you need to provide an exact -solution. -The usual trick is to pick a function that we want to be the solution, -then apply the differential operator to it that defines a forcing term -for the right hand side. -This is what we do in this example. -We produce one test case for a 2d problem and another one for the 3d one. Mapping objects + + + diff --git a/deal.II/examples/step-38/step-38.cc b/deal.II/examples/step-38/step-38.cc index 67a10713ec..f7442bde8a 100644 --- a/deal.II/examples/step-38/step-38.cc +++ b/deal.II/examples/step-38/step-38.cc @@ -45,19 +45,17 @@ using namespace dealii; - /** - @sect3{The LaplaceBeltramiProblem class template} - - This class is extremely similar to the - LaplaceProblem class as in - example 4. - One difference is that now some members - will be defined with two template parameters - one for the dimension of the mesh @p dim, - and the other for the dimension of - the embedding space @p spacedim. - Now MappingQ appears. - */ + // @sect3{The LaplaceBeltramiProblem class template} + + // This class is extremely similar to the + // LaplaceProblem class as in + // example 4. + // One difference is that now some members + // will be defined with two template parameters + // one for the dimension of the mesh @p dim, + // and the other for the dimension of + // the embedding space @p spacedim. + // Now MappingQ appears. template class LaplaceBeltramiProblem { @@ -225,7 +223,6 @@ LaplaceBeltramiProblem::LaplaceBeltramiProblem (const unsigned degree) template void LaplaceBeltramiProblem::make_grid_and_dofs () { - Triangulation volume_mesh; GridGenerator::half_hyper_ball(volume_mesh);