ContinuousBoundaryPair.h 1.16 KB
Newer Older
1 2 3 4 5 6 7 8 9
#ifndef OERSTED_CONTINUOUSBOUNDARYPAIR_H
#define OERSTED_CONTINUOUSBOUNDARYPAIR_H

#include "Curve.h"

class ContinuousBoundaryPair {
public:
    ContinuousBoundaryPair(std::shared_ptr<Curve const> c0, std::shared_ptr<Curve const> c1, bool dir) : Curve0{c0}, Curve1{c1}, Orientation{dir} {};

10 11 12 13 14 15 16
    std::shared_ptr<Curve const> curve0() const { return Curve0; };

    std::shared_ptr<Curve const> curve1() const { return Curve1; };

    bool orientation() const { return Orientation; };

protected:
17 18 19 20 21 22
    std::shared_ptr<Curve const> Curve0;
    std::shared_ptr<Curve const> Curve1;

    bool Orientation;
};

23 24 25 26 27 28 29 30 31 32 33 34 35 36
class PeriodicBoundaryPair : public ContinuousBoundaryPair { // TODO: Need to check invariant on construction
public:
    PeriodicBoundaryPair(std::shared_ptr<Curve const> c0, std::shared_ptr<Curve const> c1, bool dir, std::shared_ptr<Vertex const> origin, double_t angle) : ContinuousBoundaryPair{c0, c1, dir}, Origin{origin}, Angle{angle} {};

    std::shared_ptr<Vertex const> origin() const { return Origin; };

    double_t angle() const { return Angle; };

protected:
    std::shared_ptr<Vertex const> Origin;

    double_t Angle;
};

37
#endif //OERSTED_CONTINUOUSBOUNDARYPAIR_H