35 void setupBoundaryCell(
const std::vector<int>&
node_numbers,
39 void incrementVector(std::vector<int>&
vec);
78 int numerical_layers{this->sim->m_simulation_config.getIntParameters(
"numerical_layers")};
79 double max_depth{this->sim->m_simulation_config.getDoubleParameters(
"max_depth")};
88 cl_length = this->sim->m_simulation_config.getDoubleParameters(
"cell_length");
105 throw std::runtime_error(
106 "Could not find the entries 'cell_length' or 'max_depth' within the ini file. Please "
107 "supply one of these entries!");
118 throw std::runtime_error(
119 "Both entries 'cell_length' and 'max_depth' are present within the ini file and result "
120 "in different lengths. Please only supply one of these entries or have them produce "
133 for (
int i{1};
i <
depth.size();
i++)
138 if (this->sim->m_simulation_config.getIntParameters(
"numerical_layers") !=
depth.size())
141 <<
"[Warning] Missmatch between number of numerical layers within provided file "
142 "and given value in the ini! The value in the provided file will be used!\n";
143 this->sim->m_simulation_config.forceValueOverwrite(
"numerical_layers",
144 std::to_string(
depth.size()));
175 std::map<std::string_view, std::unique_ptr<GenericBoundaryCondition<T>>>
boundary_condition;
179 this->all_cells[this->all_cells.size() - 1]->setBoundaryConditions(
boundary_condition);
193 const std::string
cell_type{this->sim->m_simulation_config.getStringParameters(
"cell_type")};
195 this->sim->m_simulation_config.getStringParameters(
"top_boundary_condition_type")};
197 this->sim->m_simulation_config.getStringParameters(
"bottom_boundary_condition_type")};
198 int number_of_elements{this->sim->m_simulation_config.getIntParameters(
"numerical_layers") - 1};
199 int nr_of_facets{
static_cast<int>(this->m_poly_mesh->getNumberOfFacets())};
208 this->sim->m_field_map.insert({
"CellLength",
cell_length});
211 nr_of_facets * this->sim->m_simulation_config.getIntParameters(
"numerical_layers");
215 std::vector<T>
areas{this->m_poly_mesh->getAreas()};
229 throw std::runtime_error(
230 static_cast<std::string
>(
"Node number out of bounds in OneDimGrid. The node number "
231 "exceeds the requested number"));
This class parses csv files. Parses the files as a vector of vectors of type double where each row in...
Definition CsvParser.h:17
Error class to throw when a module chain has circular or missing dependencies. Inherits from std::exc...
Definition ChainManager.h:28
Concrete implementation of a 1D grid on each facet of a 3D shape model (hereafter: pseudo 3D).
Definition GridOneDim.h:25
T calculateCellLength()
Definition GridOneDim.h:70
void createGrid() override
Creation function for a pseudo 3D grid, assuming a shape model is given. True 1D geometries can be co...
Definition GridOneDim.h:190
GridOneDim(SimulationClassBase< T > *sim_ptr, std::shared_ptr< ShapeBase< T > > mesh_ptr)
Constructor for a OneDimGrid object.
Definition GridOneDim.h:49