From 585f74f7e85a02f10bca71b29781f2adf376f89d Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 2 May 2006 02:01:15 +0000 Subject: [PATCH] Split out common functions that are needed for all space dimensions git-svn-id: https://svn.dealii.org/trunk@12951 0785d39b-7218-0410-832d-ea1e28bc413d --- .../source/dofs/dof_levels.all_dimensions.cc | 57 +++++++++++++++++++ deal.II/deal.II/source/dofs/dof_levels.cc | 35 ------------ 2 files changed, 57 insertions(+), 35 deletions(-) create mode 100644 deal.II/deal.II/source/dofs/dof_levels.all_dimensions.cc diff --git a/deal.II/deal.II/source/dofs/dof_levels.all_dimensions.cc b/deal.II/deal.II/source/dofs/dof_levels.all_dimensions.cc new file mode 100644 index 0000000000..5f8db8fa7e --- /dev/null +++ b/deal.II/deal.II/source/dofs/dof_levels.all_dimensions.cc @@ -0,0 +1,57 @@ +//--------------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2000, 2001, 2002, 2003, 2005, 2006 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//--------------------------------------------------------------------------- + + +#include +#include + + +namespace internal +{ + namespace DoFHandler + { + + unsigned int + DoFLevel<0>::memory_consumption () const + { + return MemoryConsumption::memory_consumption (cell_dof_indices_cache); + } + + + unsigned int + DoFLevel<1>::memory_consumption () const + { + return (DoFLevel<0>::memory_consumption () + + MemoryConsumption::memory_consumption (line_dofs)); + } + + + + unsigned int + DoFLevel<2>::memory_consumption () const + { + return (DoFLevel<1>::memory_consumption () + + MemoryConsumption::memory_consumption (quad_dofs)); + } + + + + unsigned int + DoFLevel<3>::memory_consumption () const + { + return (DoFLevel<2>::memory_consumption () + + MemoryConsumption::memory_consumption (hex_dofs)); + } + } + +} diff --git a/deal.II/deal.II/source/dofs/dof_levels.cc b/deal.II/deal.II/source/dofs/dof_levels.cc index 3d2cef2538..1ed76d3259 100644 --- a/deal.II/deal.II/source/dofs/dof_levels.cc +++ b/deal.II/deal.II/source/dofs/dof_levels.cc @@ -23,41 +23,6 @@ namespace internal { namespace DoFHandler { - - unsigned int - DoFLevel<0>::memory_consumption () const - { - return MemoryConsumption::memory_consumption (cell_dof_indices_cache); - } - - - unsigned int - DoFLevel<1>::memory_consumption () const - { - return (DoFLevel<0>::memory_consumption () + - MemoryConsumption::memory_consumption (line_dofs)); - } - - - - unsigned int - DoFLevel<2>::memory_consumption () const - { - return (DoFLevel<1>::memory_consumption () + - MemoryConsumption::memory_consumption (quad_dofs)); - } - - - - unsigned int - DoFLevel<3>::memory_consumption () const - { - return (DoFLevel<2>::memory_consumption () + - MemoryConsumption::memory_consumption (hex_dofs)); - } - - - template unsigned int DoFLevel<1>:: -- 2.39.5