File boundary_region.hxx#

Enums

enum BndryLoc#

Location of boundary.

Values:

enumerator xin#
enumerator xout#
enumerator ydown#
enumerator yup#
enumerator all#
enumerator par_fwd_xin#
enumerator par_bkwd_xin#
enumerator par_fwd_xout#
enumerator par_bkwd_xout#

Variables

constexpr BndryLoc BNDRY_XIN = BndryLoc::xin#
constexpr BndryLoc BNDRY_XOUT = BndryLoc::xout#
constexpr BndryLoc BNDRY_YDOWN = BndryLoc::ydown#
constexpr BndryLoc BNDRY_YUP = BndryLoc::yup#
constexpr BndryLoc BNDRY_ALL = BndryLoc::all#
constexpr BndryLoc BNDRY_PAR_FWD_XIN = BndryLoc::par_fwd_xin#
constexpr BndryLoc BNDRY_PAR_BKWD_XIN = BndryLoc::par_bkwd_xin#
constexpr BndryLoc BNDRY_PAR_FWD_XOUT = BndryLoc::par_fwd_xout#
constexpr BndryLoc BNDRY_PAR_BKWD_XOUT = BndryLoc::par_bkwd_xout#
class BoundaryRegionBase#

Subclassed by BoundaryRegion, BoundaryRegionPar

Public Functions

BoundaryRegionBase() = delete#
inline BoundaryRegionBase(std::string name, Mesh *passmesh = nullptr)#
inline BoundaryRegionBase(std::string name, BndryLoc loc, Mesh *passmesh = nullptr)#
virtual ~BoundaryRegionBase() = default#
virtual void first() = 0#

Move the region iterator to the start.

virtual void next() = 0#

Get the next element in the loop over every element from inside out (in X or Y first)

virtual bool isDone() = 0#

Returns true if outside domain. Can use this with nested nextX, nextY.

Public Members

Mesh *localmesh#

Mesh does this boundary region belongs to.

std::string label#

Label for this boundary region.

BndryLoc location#

Which side of the domain is it on?

bool isParallel = false#

Is this a parallel boundary?

class BoundaryRegion : public BoundaryRegionBase#
#include <boundary_region.hxx>

Describes a region of the boundary, and a means of iterating over it.

Subclassed by BoundaryRegionXIn, BoundaryRegionXOut, BoundaryRegionYDown, BoundaryRegionYUp

Public Functions

BoundaryRegion() = delete#
inline BoundaryRegion(std::string name, BndryLoc loc, Mesh *passmesh = nullptr)#
inline BoundaryRegion(std::string name, int xd, int yd, Mesh *passmesh = nullptr)#
~BoundaryRegion() override = default#
virtual void next1d() = 0#

Loop over the innermost elements.

virtual void nextX() = 0#

Just loop over X.

virtual void nextY() = 0#

Just loop over Y.

Public Members

int x#
int y#

Indices of the point in the boundary.

int bx#
int by#

Direction of the boundary [x+bx][y+by] is going outwards.

int width#

Width of the boundary.

class BoundaryRegionXIn : public BoundaryRegion#

Public Functions

BoundaryRegionXIn(std::string name, int ymin, int ymax, Mesh *passmesh = nullptr)#
virtual void first() override#

Move the region iterator to the start.

virtual void next() override#

Get the next element in the loop over every element from inside out (in X or Y first)

virtual void next1d() override#

Loop over the innermost elements.

virtual void nextX() override#

Just loop over X.

virtual void nextY() override#

Just loop over Y.

virtual bool isDone() override#

Returns true if outside domain. Can use this with nested nextX, nextY.

Private Members

int ys#
int ye#
class BoundaryRegionXOut : public BoundaryRegion#

Public Functions

BoundaryRegionXOut(std::string name, int ymin, int ymax, Mesh *passmesh = nullptr)#
virtual void first() override#

Move the region iterator to the start.

virtual void next() override#

Get the next element in the loop over every element from inside out (in X or Y first)

virtual void next1d() override#

Loop over the innermost elements.

virtual void nextX() override#

Just loop over X.

virtual void nextY() override#

Just loop over Y.

virtual bool isDone() override#

Returns true if outside domain. Can use this with nested nextX, nextY.

Private Members

int ys#
int ye#
class BoundaryRegionYDown : public BoundaryRegion#

Public Functions

BoundaryRegionYDown(std::string name, int xmin, int xmax, Mesh *passmesh = nullptr)#
virtual void first() override#

Move the region iterator to the start.

virtual void next() override#

Get the next element in the loop over every element from inside out (in X or Y first)

virtual void next1d() override#

Loop over the innermost elements.

virtual void nextX() override#

Just loop over X.

virtual void nextY() override#

Just loop over Y.

virtual bool isDone() override#

Returns true if outside domain. Can use this with nested nextX, nextY.

Private Members

int xs#
int xe#
class BoundaryRegionYUp : public BoundaryRegion#

Public Functions

BoundaryRegionYUp(std::string name, int xmin, int xmax, Mesh *passmesh = nullptr)#
virtual void first() override#

Move the region iterator to the start.

virtual void next() override#

Get the next element in the loop over every element from inside out (in X or Y first)

virtual void next1d() override#

Loop over the innermost elements.

virtual void nextX() override#

Just loop over X.

virtual void nextY() override#

Just loop over Y.

virtual bool isDone() override#

Returns true if outside domain. Can use this with nested nextX, nextY.

Private Members

int xs#
int xe#
namespace bout#

Provides access to the Hypre library, handling initialisation and finalisation.

Usage

#include <bout/hyprelib.hxx>

class MyClass { public:

private: HypreLib lib; };

This will then automatically initialise Hypre the first time an object is created, and finalise it when the last object is destroyed.

Copyright 2012 B.D.Dudson, S.Farley, M.V.Umansky, X.Q.Xu

Contact: Ben Dudson, bd512@york.ac.uk

This file is part of BOUT++.

BOUT++ is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

BOUT++ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with BOUT++. If not, see http://www.gnu.org/licenses/.

Information about the version of BOUT++

The build system will update this file on every commit, which may result in files that include it getting rebuilt. Therefore it should be included in as few places as possible

Information about the version of BOUT++

The build system will update this file at configure-time

SNB model

namespace globals#

Variables

Mesh *mesh#

Global mesh.

The mesh object.