mirror of
https://git.gfz-potsdam.de/naaice/tug.git
synced 2025-12-14 01:48: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 BTCSDiffusion::getBCFromTuple(int index, double nearest_value) {
|
||||||
double val;
|
double val = -1;
|
||||||
int type = std::get<0>(bc[index]);
|
int type = std::get<0>(bc[index]);
|
||||||
|
|
||||||
if (type == BTCSDiffusion::BC_NEUMANN) {
|
if (type == BTCSDiffusion::BC_NEUMANN) {
|
||||||
@ -122,7 +122,7 @@ double BTCSDiffusion::getBCFromTuple(int index, double nearest_value) {
|
|||||||
} else if (type == BTCSDiffusion::BC_DIRICHLET) {
|
} else if (type == BTCSDiffusion::BC_DIRICHLET) {
|
||||||
val = std::get<1>(bc[index]);
|
val = std::get<1>(bc[index]);
|
||||||
} else {
|
} else {
|
||||||
// some error handling here. Type was set to wrong value.
|
// TODO: implement error handling here. Type was set to wrong value.
|
||||||
}
|
}
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user