CoarseningManager1d.h 1.73 KB
Newer Older
1 2 3 4 5 6 7
/******************************************************************************
 *
 * AMDiS - Adaptive multidimensional simulations
 *
 * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved.
 * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis
 *
8
 * Authors:
9 10 11 12 13 14 15 16 17
 * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al.
 *
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 *
 *
 * This file is part of AMDiS
 *
 * See also license.opensource.txt in the distribution.
18
 *
19
 ******************************************************************************/
20 21


22 23 24 25 26 27 28 29 30 31

/** \file CoarseningManager1d.h */

#ifndef AMDIS_COARSENINGMANAGER_1D_H
#define AMDIS_COARSENINGMANAGER_1D_H

#include "CoarseningManager.h"

namespace AMDiS {

32
  /** \ingroup Adaption
33 34 35 36 37 38
   * \brief
   * Implements a CoarseningManager for 1-dimensional meshes.
   */
  class CoarseningManager1d : public CoarseningManager
  {
  public:
39 40 41
    /// Calls base class constructor and checks dimension of mesh.
    CoarseningManager1d()
      : CoarseningManager()
42
    {}
43

44 45
    /// destructor
    virtual ~CoarseningManager1d() {}
46 47 48 49 50 51 52 53

    /** \brief
     * Overloads CoarseningManager::coarsenMesh. In 1d a simple recursive
     * coarsening algorithm is implemented which doesn't need coarsenFunction.
     */
    Flag coarsenMesh(Mesh *aMesh);

  protected:
54
    /// Not needed in this sub class
55
    void coarsenFunction(ElInfo *)
Thomas Witkowski's avatar
Thomas Witkowski committed
56
    {
57 58
      FUNCNAME("CoarseningManager1d::coarsenFunction");
      ERROR_EXIT("not used for dim = 1");
59
    }
60

61
    /// Needed instead of coarsenFunction in 1d.
62
    int coarsenRecursive(Line *parent);
63

64 65 66 67 68
  };

}

#endif // AMDIS_COARSENINGMANAGER_1D_H