From 684a84665d5c9d8f5be1b3738d4e03f32d303514 Mon Sep 17 00:00:00 2001 From: kanschat Date: Mon, 17 May 2010 15:46:47 +0000 Subject: [PATCH] adapt to loss of FaceInfo... and a little doc xhange in step 3 git-svn-id: https://svn.dealii.org/trunk@21136 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-12/step-12.cc | 11 ++++--- deal.II/examples/step-3/doc/intro.dox | 6 ++-- deal.II/examples/step-3/step-3.cc | 11 +++---- deal.II/examples/step-39/step-39.cc | 41 +++++++++++++-------------- 4 files changed, 33 insertions(+), 36 deletions(-) diff --git a/deal.II/examples/step-12/step-12.cc b/deal.II/examples/step-12/step-12.cc index a14cd67338..42c8692ba1 100644 --- a/deal.II/examples/step-12/step-12.cc +++ b/deal.II/examples/step-12/step-12.cc @@ -200,8 +200,7 @@ class Step12 // below. typedef MeshWorker::DoFInfo DoFInfo; typedef typename MeshWorker::IntegrationWorker::CellInfo CellInfo; - typedef typename MeshWorker::IntegrationWorker::FaceInfo FaceInfo; - + // The following three functions // are then the ones that get called // inside the generic loop over all @@ -231,9 +230,9 @@ class Step12 // in fact other arguments // already bound. static void integrate_cell_term (DoFInfo& dinfo, CellInfo& info); - static void integrate_boundary_term (DoFInfo& dinfo, FaceInfo& info); + static void integrate_boundary_term (DoFInfo& dinfo, CellInfo& info); static void integrate_face_term (DoFInfo& dinfo1, DoFInfo& dinfo2, - FaceInfo& info1, FaceInfo& info2); + CellInfo& info1, CellInfo& info2); }; @@ -461,7 +460,7 @@ void Step12::integrate_cell_term (DoFInfo& dinfo, CellInfo& info) // FESubfaceValues, in order to get access to // normal vectors. template -void Step12::integrate_boundary_term (DoFInfo& dinfo, FaceInfo& info) +void Step12::integrate_boundary_term (DoFInfo& dinfo, CellInfo& info) { const FEValuesBase& fe_v = info.fe_values(); FullMatrix& local_matrix = dinfo.matrix(0).matrix; @@ -508,7 +507,7 @@ void Step12::integrate_boundary_term (DoFInfo& dinfo, FaceInfo& info) // back and forth. template void Step12::integrate_face_term (DoFInfo& dinfo1, DoFInfo& dinfo2, - FaceInfo& info1, FaceInfo& info2) + CellInfo& info1, CellInfo& info2) { // For quadrature points, weights, // etc., we use the diff --git a/deal.II/examples/step-3/doc/intro.dox b/deal.II/examples/step-3/doc/intro.dox index 222a263a56..2610c50350 100644 --- a/deal.II/examples/step-3/doc/intro.dox +++ b/deal.II/examples/step-3/doc/intro.dox @@ -4,9 +4,9 @@ This is the first example where we actually use finite elements to compute something. We -will solve a simple version of Laplace's equation with zero boundary -values, but a nonzero right hand side. This example is still quite -simple, but it already shows the basic structure of most finite +will solve a simple version of Poisson's equation with zero boundary +values, but a nonzero right hand side (here equal to the constant one). +This example shows the basic structure of most finite element programs, which are along the following lines:
  • Grid generation; diff --git a/deal.II/examples/step-3/step-3.cc b/deal.II/examples/step-3/step-3.cc index f87d65b39b..3a3f92a8be 100644 --- a/deal.II/examples/step-3/step-3.cc +++ b/deal.II/examples/step-3/step-3.cc @@ -3,7 +3,7 @@ /* $Id$ */ /* */ -/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008 by the deal.II authors */ +/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2010 by the deal.II authors */ /* */ /* This file is subject to QPL and may not be distributed */ /* without copyright and license information. Please refer */ @@ -218,8 +218,7 @@ void LaplaceProblem::make_grid_and_dofs () std::cout << "Number of active cells: " << triangulation.n_active_cells() << std::endl; - // Here, by active we mean the cells on the - // finest level, i.e. cells that aren't + // Here, by active we mean the cells that aren't // refined any further. We stress the // adjective `active', since there are more // cells, namely the parent cells of the @@ -597,8 +596,10 @@ void LaplaceProblem::assemble_system () // quadrature points of the // value of the shape function // at that point times the - // right hand side function - // (i.e. 1) times the Jacobian + // right hand side function, + // here the constant function + // equal to one, + // times the Jacobian // determinant times the weight // of that quadrature point: for (unsigned int i=0; i exact_solution; // interior faces, respectively. All // the information needed for the // local integration is provided by - // MeshWorker::IntegrationWorker::CellInfo - // and - // MeshWorker::IntegrationWorker::FaceInfo. Note + // MeshWorker::IntegrationWorker::CellInfo. Note // that this public interface cannot // be changed, because it is expected // by MeshWorker::integration_loop(). @@ -100,11 +98,11 @@ class MatrixIntegrator : public Subscriptor static void cell(MeshWorker::DoFInfo& dinfo, typename MeshWorker::IntegrationWorker::CellInfo& info); static void bdry(MeshWorker::DoFInfo& dinfo, - typename MeshWorker::IntegrationWorker::FaceInfo& info); + typename MeshWorker::IntegrationWorker::CellInfo& info); static void face(MeshWorker::DoFInfo& dinfo1, MeshWorker::DoFInfo& dinfo2, - typename MeshWorker::IntegrationWorker::FaceInfo& info1, - typename MeshWorker::IntegrationWorker::FaceInfo& info2); + typename MeshWorker::IntegrationWorker::CellInfo& info1, + typename MeshWorker::IntegrationWorker::CellInfo& info2); }; @@ -135,7 +133,7 @@ void MatrixIntegrator::cell( template void MatrixIntegrator::bdry( MeshWorker::DoFInfo& dinfo, - typename MeshWorker::IntegrationWorker::FaceInfo& info) + typename MeshWorker::IntegrationWorker::CellInfo& info) { const FEValuesBase& fe = info.fe_values(); FullMatrix& local_matrix = dinfo.matrix(0,false).matrix; @@ -157,8 +155,8 @@ template void MatrixIntegrator::face( MeshWorker::DoFInfo& dinfo1, MeshWorker::DoFInfo& dinfo2, - typename MeshWorker::IntegrationWorker::FaceInfo& info1, - typename MeshWorker::IntegrationWorker::FaceInfo& info2) + typename MeshWorker::IntegrationWorker::CellInfo& info1, + typename MeshWorker::IntegrationWorker::CellInfo& info2) { const FEValuesBase& fe1 = info1.fe_values(); const FEValuesBase& fe2 = info2.fe_values(); @@ -208,11 +206,11 @@ class RHSIntegrator : public Subscriptor { public: static void cell(MeshWorker::DoFInfo& dinfo, typename MeshWorker::IntegrationWorker::CellInfo& info); - static void bdry(MeshWorker::DoFInfo& dinfo, typename MeshWorker::IntegrationWorker::FaceInfo& info); + static void bdry(MeshWorker::DoFInfo& dinfo, typename MeshWorker::IntegrationWorker::CellInfo& info); static void face(MeshWorker::DoFInfo& dinfo1, MeshWorker::DoFInfo& dinfo2, - typename MeshWorker::IntegrationWorker::FaceInfo& info1, - typename MeshWorker::IntegrationWorker::FaceInfo& info2); + typename MeshWorker::IntegrationWorker::CellInfo& info1, + typename MeshWorker::IntegrationWorker::CellInfo& info2); }; @@ -222,7 +220,7 @@ void RHSIntegrator::cell(MeshWorker::DoFInfo&, typename MeshWorker::In template -void RHSIntegrator::bdry(MeshWorker::DoFInfo& dinfo, typename MeshWorker::IntegrationWorker::FaceInfo& info) +void RHSIntegrator::bdry(MeshWorker::DoFInfo& dinfo, typename MeshWorker::IntegrationWorker::CellInfo& info) { const FEValuesBase& fe = info.fe_values(); Vector& local_vector = dinfo.vector(0).block(0); @@ -244,8 +242,8 @@ void RHSIntegrator::bdry(MeshWorker::DoFInfo& dinfo, typename MeshWork template void RHSIntegrator::face(MeshWorker::DoFInfo&, MeshWorker::DoFInfo&, - typename MeshWorker::IntegrationWorker::FaceInfo&, - typename MeshWorker::IntegrationWorker::FaceInfo&) + typename MeshWorker::IntegrationWorker::CellInfo&, + typename MeshWorker::IntegrationWorker::CellInfo&) {} @@ -254,11 +252,11 @@ class Estimator : public Subscriptor { public: static void cell(MeshWorker::DoFInfo& dinfo, typename MeshWorker::IntegrationWorker::CellInfo& info); - static void bdry(MeshWorker::DoFInfo& dinfo, typename MeshWorker::IntegrationWorker::FaceInfo& info); + static void bdry(MeshWorker::DoFInfo& dinfo, typename MeshWorker::IntegrationWorker::CellInfo& info); static void face(MeshWorker::DoFInfo& dinfo1, MeshWorker::DoFInfo& dinfo2, - typename MeshWorker::IntegrationWorker::FaceInfo& info1, - typename MeshWorker::IntegrationWorker::FaceInfo& info2); + typename MeshWorker::IntegrationWorker::CellInfo& info1, + typename MeshWorker::IntegrationWorker::CellInfo& info2); }; @@ -278,7 +276,7 @@ void Estimator::cell(MeshWorker::DoFInfo& dinfo, typename MeshWorker:: template -void Estimator::bdry(MeshWorker::DoFInfo& dinfo, typename MeshWorker::IntegrationWorker::FaceInfo& info) +void Estimator::bdry(MeshWorker::DoFInfo& dinfo, typename MeshWorker::IntegrationWorker::CellInfo& info) { const FEValuesBase& fe = info.fe_values(); @@ -300,8 +298,8 @@ void Estimator::bdry(MeshWorker::DoFInfo& dinfo, typename MeshWorker:: template void Estimator::face(MeshWorker::DoFInfo& dinfo1, MeshWorker::DoFInfo& dinfo2, - typename MeshWorker::IntegrationWorker::FaceInfo& info1, - typename MeshWorker::IntegrationWorker::FaceInfo& info2) + typename MeshWorker::IntegrationWorker::CellInfo& info1, + typename MeshWorker::IntegrationWorker::CellInfo& info2) { const FEValuesBase& fe = info1.fe_values(); const std::vector& uh1 = info1.values[0][0]; @@ -333,7 +331,6 @@ class Step39 { public: typedef typename MeshWorker::IntegrationWorker::CellInfo CellInfo; - typedef typename MeshWorker::IntegrationWorker::FaceInfo FaceInfo; Step39(const FiniteElement& fe); -- 2.39.5