mirror of
https://git.gfz-potsdam.de/naaice/tug.git
synced 2025-12-13 17:38:23 +01:00
avoid return of unitialized variable
This commit is contained in:
parent
e625455923
commit
1bde33cd79
@ -113,7 +113,7 @@ void BTCSDiffusion::simulate(std::vector<double> &c,
|
||||
}
|
||||
|
||||
double BTCSDiffusion::getBCFromTuple(int index, double nearest_value) {
|
||||
double val;
|
||||
double val = -1;
|
||||
int type = std::get<0>(bc[index]);
|
||||
|
||||
if (type == BTCSDiffusion::BC_NEUMANN) {
|
||||
@ -122,7 +122,7 @@ double BTCSDiffusion::getBCFromTuple(int index, double nearest_value) {
|
||||
} else if (type == BTCSDiffusion::BC_DIRICHLET) {
|
||||
val = std::get<1>(bc[index]);
|
||||
} else {
|
||||
// some error handling here. Type was set to wrong value.
|
||||
// TODO: implement error handling here. Type was set to wrong value.
|
||||
}
|
||||
|
||||
return val;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user