[cig-commits] [commit] rajesh-petsc, rajesh-petsc-schur: cleaned up the signatures of solve_Ahat_p_fhat_CG_PETSc and solve_Ahat_p_fhat_BiCG_PETSc and added a petsc_uzawa_tol parameter (145990d)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Nov 5 19:02:36 PST 2014
Repository : https://github.com/geodynamics/citcoms
On branches: rajesh-petsc,rajesh-petsc-schur
Link : https://github.com/geodynamics/citcoms/compare/464e1b32299b15819f93efd98d969cddb84dfe51...f97ae655a50bdbd6dac1923a3471ee4dae178fbd
>---------------------------------------------------------------
commit 145990d16542cec344f4c8709dcf2097c9930522
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date: Wed Aug 20 12:33:42 2014 -0700
cleaned up the signatures of solve_Ahat_p_fhat_CG_PETSc and solve_Ahat_p_fhat_BiCG_PETSc and added a petsc_uzawa_tol parameter
>---------------------------------------------------------------
145990d16542cec344f4c8709dcf2097c9930522
lib/Instructions.c | 1 +
lib/Stokes_flow_Incomp.c | 12 ++++++++----
lib/global_defs.h | 1 +
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/lib/Instructions.c b/lib/Instructions.c
index 8809f48..a9b2f53 100644
--- a/lib/Instructions.c
+++ b/lib/Instructions.c
@@ -783,6 +783,7 @@ void read_initial_settings(struct All_variables *E)
input_boolean("petsc_linear",&E->control.petsc_linear,"on",m);
input_boolean("petsc_nonlinear",&E->control.petsc_nonlinear,"off",m);
input_boolean("petsc_schur",&E->control.petsc_schur,"off",m);
+ input_float("petsc_uzawa_tol", &E->control.petsc_uzawa_tol, "1e-6", m);
check_settings_consistency(E);
return;
diff --git a/lib/Stokes_flow_Incomp.c b/lib/Stokes_flow_Incomp.c
index 72c6f07..5038a1f 100644
--- a/lib/Stokes_flow_Incomp.c
+++ b/lib/Stokes_flow_Incomp.c
@@ -54,10 +54,10 @@ static void solve_Ahat_p_fhat_iterCG(struct All_variables *E,
double **V, double **P, double **F,
double imp, int *steps_max);
-static void solve_Ahat_p_fhat_CG_PETSc(struct All_variables *E,
+static PetscErrorCode solve_Ahat_p_fhat_CG_PETSc(struct All_variables *E,
double **V, double **P, double **F,
double imp, int *steps_max);
-static void solve_Ahat_p_fhat_BiCG_PETSc(struct All_variables *E,
+static PetscErrorCode solve_Ahat_p_fhat_BiCG_PETSc(struct All_variables *E,
double **V, double **P, double **F,
double imp, int *steps_max);
@@ -489,7 +489,7 @@ static void solve_Ahat_p_fhat_CG(struct All_variables *E,
* Implementation of the Conjugate Gradient Uzawa algorithm using PETSc
* Vec, Mat and KSPSolve
*/
-static void solve_Ahat_p_fhat_CG_PETSc( struct All_variables *E,
+static PetscErrorCode solve_Ahat_p_fhat_CG_PETSc( struct All_variables *E,
double **V, double **P, double **F,
double imp, int *steps_max )
{
@@ -723,12 +723,14 @@ static void solve_Ahat_p_fhat_CG_PETSc( struct All_variables *E,
ierr = VecDestroy( &Duk ); CHKERRQ( ierr );
*steps_max = count;
+
+ PetscFunctionReturn(0);
}
/*
* BiCGstab for compressible Stokes flow using PETSc Vec, Mat and KSPSolve
*/
-static void solve_Ahat_p_fhat_BiCG_PETSc( struct All_variables *E,
+static PetscErrorCode solve_Ahat_p_fhat_BiCG_PETSc( struct All_variables *E,
double **V, double **P, double **F,
double imp, int *steps_max )
{
@@ -976,6 +978,8 @@ static void solve_Ahat_p_fhat_BiCG_PETSc( struct All_variables *E,
ierr = VecDestroy( &P0 ); CHKERRQ( ierr );
*steps_max = count;
+
+ PetscFunctionReturn(0);
}
/* Solve compressible Stokes flow using
diff --git a/lib/global_defs.h b/lib/global_defs.h
index 55c8b4f..6087f60 100644
--- a/lib/global_defs.h
+++ b/lib/global_defs.h
@@ -564,6 +564,7 @@ struct CONTROL {
int petsc_linear;
int petsc_nonlinear;
int petsc_schur;
+ float petsc_uzawa_tol;
};
More information about the CIG-COMMITS
mailing list