OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
RegularDomain.h
Go to the documentation of this file.
1 //
2 // Class RegularDomain
3 // Base class for simple domains that do not change the x-y shape in
4 // longitudinal direction.
5 //
6 // Copyright (c) 2020, Paul Scherrer Institut, Villigen PSI, Switzerland
7 // All rights reserved
8 //
9 // This file is part of OPAL.
10 //
11 // OPAL is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation, either version 3 of the License, or
14 // (at your option) any later version.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with OPAL. If not, see <https://www.gnu.org/licenses/>.
18 //
19 #ifndef REGULAR_DOMAIN_H
20 #define REGULAR_DOMAIN_H
21 
23 
25 
26 public:
27 
29  const Vector_t& hr,
30  const std::string& interpl);
31 
32  int getNumXY() const override {
33  return nxy_m;
34  }
35 
36  void setNumXY(int nxy) { nxy_m = nxy; }
37 
38  void resizeMesh(Vector_t& origin, Vector_t& hr, const Vector_t& rmin,
39  const Vector_t& rmax, double dh) override;
40 
41 protected:
43  void robinBoundaryStencil(int z, double &F, double &B, double &C) const;
44 
45 private:
46  void constantInterpolation(int x, int y, int z, StencilValue_t& value,
47  double &scaleFactor) const override;
48 
50  int nxy_m;
51 };
52 
53 #endif
const int nr
Definition: ClassicRandom.h:24
Stencil< double > StencilValue_t
int getNumXY() const override
Definition: RegularDomain.h:32
int nxy_m
number of nodes in the xy plane (for this case: independent of the z coordinate)
Definition: RegularDomain.h:50
RegularDomain(const IntVector_t &nr, const Vector_t &hr, const std::string &interpl)
void resizeMesh(Vector_t &origin, Vector_t &hr, const Vector_t &rmin, const Vector_t &rmax, double dh) override
void constantInterpolation(int x, int y, int z, StencilValue_t &value, double &scaleFactor) const override
different interpolation methods for boundary points
void setNumXY(int nxy)
Definition: RegularDomain.h:36
void robinBoundaryStencil(int z, double &F, double &B, double &C) const
function to handle the open boundary condition in longitudinal direction