41 |
|
|
42 |
|
#ifndef APPLICATION_HYDRODYNAMICS_COMPOSITESHAPE_HPP |
43 |
|
#define APPLICATION_HYDRODYNAMICS_COMPOSITESHAPE_HPP |
44 |
< |
#include "applications/hydrodynamics/Shape.hpp" |
44 |
> |
#include "hydrodynamics/Shape.hpp" |
45 |
|
#include <vector> |
46 |
|
namespace oopse { |
47 |
< |
/** |
48 |
< |
* @class CompositexShape |
49 |
< |
* Combine composite pattern and visitor pattern |
50 |
< |
*/ |
51 |
< |
class CompositeShape : public Shape { |
52 |
< |
|
53 |
< |
public: |
54 |
< |
CompositeShape() {} |
55 |
< |
virtual ~CompositeShape(); |
56 |
< |
virtual bool isInterior(Vector3d pos); |
57 |
< |
virtual std::pair<Vector3d, Vector3d> getBox(); |
58 |
< |
virtual bool hasAnalyticalSolution() { return false;} |
59 |
< |
virtual bool calcHydroProps(HydrodynamicsModel* model, double viscosity, double temperature); |
60 |
< |
void addShape(Shape* s) {shapes_.push_back(s);} |
61 |
< |
|
62 |
< |
private: |
63 |
< |
|
64 |
< |
std::vector<Shape*> shapes_; |
65 |
< |
|
47 |
> |
/** |
48 |
> |
* @class CompositeShape |
49 |
> |
* Combine composite pattern and visitor pattern |
50 |
> |
*/ |
51 |
> |
class CompositeShape : public Shape { |
52 |
> |
|
53 |
> |
public: |
54 |
> |
CompositeShape() {} |
55 |
> |
virtual ~CompositeShape(); |
56 |
> |
virtual bool isInterior(Vector3d pos); |
57 |
> |
virtual std::pair<Vector3d, Vector3d> getBoundingBox(); |
58 |
> |
virtual bool hasAnalyticalSolution() { return false;} |
59 |
> |
virtual HydroProps getHydroProps(RealType viscosity, RealType temperature); |
60 |
> |
void addShape(Shape* s) {shapes_.push_back(s);} |
61 |
> |
|
62 |
> |
private: |
63 |
> |
|
64 |
> |
std::vector<Shape*> shapes_; |
65 |
|
}; |
66 |
|
|
67 |
|
} |