MoCSI API Reference
Loading...
Searching...
No Matches
CellRegistry.h
Go to the documentation of this file.
1#ifndef CELL_REGISTRY_H
2#define CELL_REGISTRY_H
3
4#include <memory>
5#include <string>
6
7#include "GenericElement.h"
9
26template <typename T>
27std::unique_ptr<GenericElement<T>> createCell(
28 std::string_view key, bool is_boundary_point,
29 std::map<std::string_view, std::vector<int>> all_boundary_points, std::vector<int> nodal_values,
30 SimulationClassBase<T>* sim, int num_cell, ElementProperties<T> props)
31{
32 if (key == "OneDimLinearElement")
33 {
34 return std::make_unique<OneDimLinearElement<T>>(is_boundary_point, all_boundary_points,
35 nodal_values, sim, num_cell, props);
36 }
37
38 return nullptr;
39}
40
41#endif
std::unique_ptr< GenericElement< T > > createCell(std::string_view key, bool is_boundary_point, std::map< std::string_view, std::vector< int > > all_boundary_points, std::vector< int > nodal_values, SimulationClassBase< T > *sim, int num_cell, ElementProperties< T > props)
Registry function for the cell types.
Definition CellRegistry.h:27
Definition SimulationClassBase.h:15
Struct carrying the element properties that are needed to create the different element types....
Definition GenericElement.h:21