35 void setupBoundaryCell(
const std::vector<int>&
node_numbers,
39 void incrementVector(std::vector<int>&
vec);
40 int getNumberOfFacets()
const;
87 int numerical_layers{this->sim->m_simulation_config.getIntParameters(
"numerical_layers")};
88 double max_depth{this->sim->m_simulation_config.getDoubleParameters(
"max_depth")};
97 cl_length = this->sim->m_simulation_config.getDoubleParameters(
"cell_length");
114 throw std::runtime_error(
115 "Could not find the entries 'cell_length' or 'max_depth' within the ini file. Please "
116 "supply one of these entries!");
127 throw std::runtime_error(
128 "Both entries 'cell_length' and 'max_depth' are present within the ini file and result "
129 "in different lengths. Please only supply one of these entries or have them produce "
154 if (this->sim->m_simulation_config.getIntParameters(
"numerical_layers") !=
depth.
size())
157 <<
"[Warning] Missmatch between number of numerical layers within provided file "
158 "and given value in the ini! The value in the provided file will be used!\n";
159 this->sim->m_simulation_config.forceValueOverwrite(
"numerical_layers",
191 std::map<std::string_view, std::unique_ptr<GenericBoundaryCondition<T>>>
boundary_condition;
195 this->all_cells[this->all_cells.size() - 1]->setBoundaryConditions(
boundary_condition);
208 return this->sim->m_simulation_config.getIntParameters(
"number_of_facets");
210 return static_cast<int>(this->m_poly_mesh->getNumberOfFacets());
225 const std::string
cell_type{this->sim->m_simulation_config.getStringParameters(
"cell_type")};
227 this->sim->m_simulation_config.getStringParameters(
"top_boundary_condition_type")};
229 this->sim->m_simulation_config.getStringParameters(
"bottom_boundary_condition_type")};
230 int number_of_elements{this->sim->m_simulation_config.getIntParameters(
"numerical_layers") - 1};
240 this->sim->m_field_map.insert({
"CellLength",
cell_length});
243 nr_of_facets * this->sim->m_simulation_config.getIntParameters(
"numerical_layers");
247 std::vector<T>
areas{this->m_poly_mesh->getAreas()};
261 throw std::runtime_error(
262 static_cast<std::string
>(
"Node number out of bounds in OneDimGrid. The node number "
263 "exceeds the requested number"));
Concrete implementation of a matrix class representing a Compressed Sparse Rows (CSR) matrix....
Definition CsrMatrix.h:35
CsrSparseMatrix()
Constructor for an empty CsrSparseMatrix object. Leaves all storage arrays empty but sets the flag to...
Definition CsrMatrix.h:92
This class parses csv files. Parses the files as a vector of vectors of type double where each row in...
Definition CsvParser.h:17
std::pair< int, int > size() const
Function that returns the size of the matrix as a pair in (rows, columns) format.
Definition GenericMatrix.h:118
Concrete implementation of a 1D grid on each facet of a 3D shape model (hereafter: pseudo 3D).
Definition GridOneDim.h:25
T calculateCellLength()
Calculates the uniform cell length from the specified simulation config parameters.
Definition GridOneDim.h:79
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:222
GridOneDim(SimulationClassBase< T > *sim_ptr, std::shared_ptr< ShapeBase< T > > mesh_ptr)
Constructor for a OneDimGrid object.
Definition GridOneDim.h:50