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);
111 m_simulation_shape->validityCheck();
113 catch (
const std::runtime_error&
e)
115 std::cerr <<
"[ShapeFactory]: Failed creating the ShapeBase object!\n[ShapeFactory]: "
117 throw std::runtime_error(
118 static_cast<std::string
>(
119 "[ShapeFactory]: Failed creating the ShapeBase object!\n[ShapeFactory]: ")
120 +
static_cast<std::string
>(
e.what()));
140 m_simulation_shape->validityCheck();
145 <<
"[ShapeFactory]: Selected shape model is not supported. Check the options and if "
146 "you are certain it "
147 "should be available, check that third party libraries are linked correctly.\n";
148 throw std::runtime_error(
static_cast<std::string
>(
149 "[ShapeFactory]: Selected shape model is not supported. Check the options and if you "
151 "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
Concrete implementation of a matrix class representing a Compressed Sparse Rows (CSR) matrix....
Definition CsrMatrix.h:37
CsrSparseMatrix()
Constructor for an empty CsrSparseMatrix object. Leaves all storage arrays empty but sets the flag to...
Definition CsrMatrix.h:94
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