|
@@ -72,8 +72,8 @@ namespace Kernel{
|
|
|
new_solution->P=all_vertical_richards.P;
|
|
|
|
|
|
size_t k=0;
|
|
|
- double previous_error=error;
|
|
|
-
|
|
|
+ double previous_error=numeric_limits<double>::infinity();
|
|
|
+ if(Debug::level>1) cout<<" [Piccard::run] error (horizontal) = \033[31m"<<error<<"\033[0m"<<endl;
|
|
|
while(error>=tolerence_Piccard and k<max_iterations_Piccard and (abs(previous_error-error)>tolerence_Piccard/100 or error<oscilation_Piccard)){
|
|
|
previous_error=error;
|
|
|
error=0;
|
|
@@ -81,7 +81,7 @@ namespace Kernel{
|
|
|
if(Debug::level>1) cout<<" [Piccard::run] k = "<<k<<endl;
|
|
|
|
|
|
compute_l(l,all_vertical_richards.hsat,error);
|
|
|
-
|
|
|
+ if(Debug::level>1) cout<<" [Piccard::run] error (l) = \033[31m"<<error<<"\033[0m"<<endl;
|
|
|
compute_Pl(all_vertical_richards.P);
|
|
|
|
|
|
horizontal_problem.previous_hydr=horizontal_problem.hydr;
|
|
@@ -92,6 +92,7 @@ namespace Kernel{
|
|
|
new_solution->hydr=horizontal_problem.hydr;
|
|
|
|
|
|
error+=horizontal_problem.error;
|
|
|
+ if(Debug::level>1) cout<<" [Piccard::run] error (l+hydr) = \033[31m"<<error<<"\033[0m"<<endl;
|
|
|
|
|
|
//Compute Overland
|
|
|
overland.in_hov=previous_solution->hov;
|
|
@@ -139,7 +140,7 @@ namespace Kernel{
|
|
|
|
|
|
void
|
|
|
Piccard::compute_l(double* h,double* hsat,double& error) {
|
|
|
- bool e=0;
|
|
|
+ double e=0;
|
|
|
for(size_t ix=0;ix<geometry->nX;++ix){
|
|
|
double a=h[ix];
|
|
|
double b=max(hsat[ix],a);
|