Ignore:
Timestamp:
Apr 27, 2012, 11:34:57 PM (14 years ago)
Author:
Julian Iseringhausen <isering@…>
Children:
1a92cf
Parents:
b2154a3
Message:

vmg: Implement fourth-order discretization of the Poisson equation.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@1762 5161e1c8-67bf-11de-9fd5-51895aff932f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/base/discretization.hpp

    rb2154a3 r4571da  
    2828{
    2929public:
    30   Discretization() : stencil(1.0) {}
    31   Discretization(const Stencil& stencil_) : stencil(stencil_) {}
     30  Discretization() :
     31    stencil(1.0),
     32    order(2)
     33  {}
     34
     35  Discretization(const int& order) :
     36    stencil(1.0),
     37    order(order)
     38  {}
     39
     40  Discretization(const Stencil& stencil_, const int& order) :
     41    stencil(stencil_),
     42    order(order)
     43  {}
    3244
    3345  Discretization(std::string id) :
    3446    Object(id),
    35     stencil(1.0)
     47    stencil(1.0),
     48    order(2)
    3649  {}
    3750
    38   Discretization(std::string id, const Stencil& stencil_) :
     51  Discretization(std::string id, const int& order) :
    3952    Object(id),
    40     stencil(stencil_)
     53    stencil(1.0),
     54    order(order)
     55  {}
     56
     57  Discretization(std::string id, const Stencil& stencil_, const int& order) :
     58    Object(id),
     59    stencil(stencil_),
     60    order(order)
    4161  {}
    4262
     
    4565  virtual vmg_float OperatorPrefactor(const Grid& grid) const = 0; ///< Returns the prefactor of the operator.
    4666
    47   /**
     67  virtual void ModifyRightHandSide() {}
     68
     69  /**
    4870   * This function gets called whenever boundary points at inner boundaries are needed.
    4971   * Inner boundaries occur when using adaptive grid refinement.
    50    * 
     72   *
    5173   * @param sol_fine Solution vector / fine level
    5274   * @param rhs_fine Right handside vector / fine level
     
    6082
    6183private:
    62   virtual void SetInnerBoundaryCompute(Grid& sol_fine, Grid& rhs_fine, Grid& sol_coarse) const = 0;
     84  virtual void SetInnerBoundaryCompute(Grid& sol_fine, Grid& rhs_fine, Grid& sol_coarse) const {}
    6385
    6486protected:
    6587  VMG::Stencil stencil;
     88  int order;
    6689};
    6790
Note: See TracChangeset for help on using the changeset viewer.