27 std::shared_ptr<ShapeBase<T>> m_simulation_shape{std::make_shared<ShapeBase<T>>()};
28 std::string m_shape_file_path;
30 void oneDSingleFacetGenerator();
37 std::shared_ptr<ShapeBase<T>>
getShapePtr() {
return m_simulation_shape; }
56 m_shape_file_path = sim->m_simulation_config.getStringParameters(
"shape_model_path");
59 sim->m_simulation_config.forceValueOverwrite(
60 "number_of_facets", std::to_string(m_simulation_shape->getNumberOfFacets()));
76 oneDSingleFacetGenerator();
98 std::vector<std::vector<T>>
vertices(
99 {{-0.5, -0.5, 0.0}, {0.5, -0.5, 0.0}, {0.5, 0.5, 0.0}, {-0.5, 0.5, 0.0}});
100 std::vector<std::vector<int>>
faces({{0, 1, 2, 3}});
101 std::vector<std::vector<T>>
normals({{0.0, 0.0, 1.0}});
102 std::vector<T>
areas({1.0});
104 m_simulation_shape->setVertices(
vertices);
105 m_simulation_shape->setFaces(
faces);
106 m_simulation_shape->setNormals(
normals);
107 m_simulation_shape->setAreas(
areas);
109 m_simulation_shape->validityCheck();
128 m_simulation_shape->validityCheck();
132 throw std::runtime_error(
133 "Selected shape model is not supported. Check the options and if you are certain it "
134 "should be available, check that third party libraries are linked correctly.");
Dimension
Definition CoreEnums.h:8
constexpr Dimension setDimension(const std::string &dimension)
Definition CoreEnums.h:14
Error class to throw when a module chain has circular or missing dependencies. Inherits from std::exc...
Definition ChainManager.h:28
Class that manages the creation of the ShapeBase object, which is used by GridFactory....
Definition ShapeFactory.h:23
ShapeFactory(SimulationClassBase< T > *sim, bool shape_file, const std::string &dimension)
Creator of a ShapeFactory. Invokes creation routine.
Definition ShapeFactory.h:49
std::shared_ptr< ShapeBase< T > > getShapePtr()
Definition ShapeFactory.h:37