From: Guido Kanschat Date: Tue, 15 Feb 2011 17:58:58 +0000 (+0000) Subject: implement Assembler::Functional::initialize_info X-Git-Tag: v8.0.0~4334 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=351c25618b943494a178371a99c45406269a2520;p=dealii.git implement Assembler::Functional::initialize_info git-svn-id: https://svn.dealii.org/trunk@23368 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/numerics/mesh_worker_assembler.h b/deal.II/include/deal.II/numerics/mesh_worker_assembler.h index ec991252e6..b9396c0b7f 100644 --- a/deal.II/include/deal.II/numerics/mesh_worker_assembler.h +++ b/deal.II/include/deal.II/numerics/mesh_worker_assembler.h @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- // $Id$ // -// Copyright (C) 2010 by the deal.II authors +// Copyright (C) 2010, 2011 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -93,7 +93,10 @@ namespace MeshWorker public: /** * Initialize local data to - * store functionals. + * store functionals. The + * number n is the + * number of functionals to + * be computed. */ void initialize(unsigned int n); /** @@ -102,20 +105,9 @@ namespace MeshWorker * DoFInfo * object used later for * assembling. - * - * The second parameter is - * used to distinguish - * between the data used on - * cells and boundary faces - * on the one hand and - * interior faces on the - * other. Interior faces may - * require additional data - * being initialized. */ - template - void initialize_info(DoFInfo& info, - bool interior_face); + template + void initialize_info(DOFINFO& info, bool interior_face); /** * Assemble the local values @@ -1120,6 +1112,16 @@ namespace MeshWorker Functional::initialize(unsigned int n) { results.resize(n); + std::fill(results.begin(), results.end(), 0.); + } + + + template + template + inline void + Functional::initialize_info(DOFINFO& info, bool) + { + info.initialize_numbers(results.size()); }