Skip to content
3 changes: 3 additions & 0 deletions include/bout/coordinates.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

#include <array>
#include <memory>
#include <string>

class Mesh;
class YBoundary;
Expand Down Expand Up @@ -260,6 +261,8 @@ private:
void checkContravariant();

mutable std::array<std::shared_ptr<YBoundary>, 3> ybndrys;
/// Read quantities with given suffix from `Mesh`
void readFromMesh(Options* options, const std::string& suffix);
};

#endif // BOUT_COORDINATES_H
21 changes: 12 additions & 9 deletions include/bout/griddata.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,15 @@ class GridDataSource;
#ifndef BOUT_GRIDDATA_H
#define BOUT_GRIDDATA_H

#include "mesh.hxx"
#include "bout/bout_types.hxx"
#include "bout/options.hxx"

#include <bout/bout_types.hxx>
#include <bout/field2d.hxx>
#include <bout/field3d.hxx>
#include <bout/mesh.hxx>
#include <bout/options.hxx>
#include <bout/unused.hxx>

#include <string>
#include <vector>

/// Interface class to serve grid data
/*!
Expand All @@ -46,8 +49,8 @@ public:
GridDataSource(const bool source_is_file = false) : is_file(source_is_file) {}
virtual ~GridDataSource() = default;

virtual bool
hasVar(const std::string& name) = 0; ///< Test if source can supply a variable
/// Test if source can supply a variable
virtual bool hasVar(const std::string& name) const = 0;

/// Get a string
virtual bool get(Mesh* m, std::string& sval, const std::string& name,
Expand Down Expand Up @@ -95,9 +98,9 @@ class GridFile : public GridDataSource {
public:
GridFile() = delete;
GridFile(std::string gridfilename);
~GridFile() = default;
~GridFile() override = default;

bool hasVar(const std::string& name) override;
bool hasVar(const std::string& name) const override;

/// Get a string
bool get(Mesh* m, std::string& sval, const std::string& name,
Expand Down Expand Up @@ -178,7 +181,7 @@ public:
/*!
* Checks if the options has a given variable
*/
bool hasVar(const std::string& name) override;
bool hasVar(const std::string& name) const override;

/*!
* Reads strings from options. Uses Options::get to handle
Expand Down
2 changes: 1 addition & 1 deletion include/bout/mesh.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ public:
// Boundary regions

/// Return a vector containing all the boundary regions on this processor
virtual std::vector<BoundaryRegionBase*> getBoundaries() = 0;
virtual std::vector<BoundaryRegionBase*> getBoundaries() const = 0;

/// Get the set of all possible boundaries in this configuration
virtual std::set<std::string> getPossibleBoundaries() const {
Expand Down
Loading
Loading