-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-cuda-rosenbrock-tests
- Loading branch information
Showing
10 changed files
with
56 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#pragma once | ||
|
||
#include <unordered_map> | ||
#include <string> | ||
#include <vector> | ||
|
||
/// @brief Struct of mapping keys in certain type to its initial condition values | ||
struct InitialConditions | ||
{ | ||
std::unordered_map<std::string, double> environments; | ||
std::unordered_map<std::string, std::vector<double>> concentrations; | ||
std::unordered_map<std::string, std::vector<double>> custom_rate_params; | ||
|
||
bool empty() | ||
{ | ||
return environments.empty(); | ||
} | ||
|
||
bool is_incomplete() | ||
{ | ||
return !status_; | ||
} | ||
|
||
void incomplete_parsing() | ||
{ | ||
status_ = false; | ||
} | ||
|
||
private: | ||
bool status_ = true; | ||
}; | ||
|
||
/// @brief Reads CSV file and creates InitialConditions object | ||
/// holding initial values for input data | ||
/// @param filename | ||
/// @return InitialCondtions object | ||
InitialConditions readCSVToMap(const std::string& filename); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters