File field_data.hxx#
Class inherited by any field wanting to use Communicator or Solver objects.
Copyright 2010 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/.
Defines
-
FIELD_DATA_H#
-
class FieldData#
- #include <field_data.hxx>
Base class for both scalar and vector fields, holds common information about the grid, coordinates, and boundaries
Subclassed by Field, Vector2D, Vector3D
Public Functions
-
FieldData() = default#
-
virtual ~FieldData()#
-
virtual FieldData &setLocation(CELL_LOC new_location)#
Set variable location for staggered grids to
- Parameters:
new_location – Throws BoutException if new_location is not
CELL_CENTRE
and staggered grids are turned off and checks are on. If checks are off, silently sets location toCELL_CENTRE
instead.
-
virtual bool is3D() const = 0#
True if variable is 3D.
-
inline virtual int elementSize() const#
Number of BoutReals in one element.
-
inline virtual void doneComms()#
-
inline virtual void applyBoundary(bool init = false)#
-
inline virtual void applyTDerivBoundary()#
-
inline virtual void applyParallelBoundary()#
-
void addBndryGenerator(FieldGeneratorPtr gen, BndryLoc location)#
-
FieldGeneratorPtr getBndryGenerator(BndryLoc location)#
-
Coordinates *getCoordinates() const#
Returns a pointer to the
Coordinates
object at this field’s location from the mesh this field is on.
-
Coordinates *getCoordinates(CELL_LOC loc) const#
Returns a pointer to the
Coordinates
object at the requested location from the mesh this field is on. Ifloc
isCELL_DEFAULT
then return coordinates at field location
-
inline bool isBoundarySet() const#
Has
setBoundary
been called?
-
inline std::vector<BoundaryOp*> getBoundaryOps() const#
Get boundary conditions.
-
inline std::vector<BoundaryOpPar*> getBoundaryOpPars() const#
Get parallel boundary conditions.
Protected Attributes
Private Members
-
std::vector<BoundaryOp*> bndry_op#
Boundary conditions.
-
bool boundaryIsCopy = {false}#
True if bndry_op is a copy.
-
std::vector<BoundaryOpPar*> bndry_op_par#
Boundary conditions.
-
std::map<BndryLoc, FieldGeneratorPtr> bndry_generator#
-
mutable std::weak_ptr<Coordinates> fieldCoordinates = {}#
Coordinates
used by this field, owned byfieldmesh
-
CELL_LOC location = {CELL_CENTRE}#
Location of the variable in the cell.
-
FieldData() = default#