[cig-commits] [commit] rajesh-petsc-schur: cleaned up build_diagonal_of_Ahat; results dont match master (f84904f)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Nov 5 19:04:14 PST 2014
Repository : https://github.com/geodynamics/citcoms
On branch : rajesh-petsc-schur
Link : https://github.com/geodynamics/citcoms/compare/464e1b32299b15819f93efd98d969cddb84dfe51...f97ae655a50bdbd6dac1923a3471ee4dae178fbd
>---------------------------------------------------------------
commit f84904faa801d1414f7a5d7a926f38efcc8491aa
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date: Wed Sep 10 10:37:36 2014 -0700
cleaned up build_diagonal_of_Ahat; results dont match master
>---------------------------------------------------------------
f84904faa801d1414f7a5d7a926f38efcc8491aa
lib/Element_calculations.c | 43 ++++++++++++++++++++-----------------------
1 file changed, 20 insertions(+), 23 deletions(-)
diff --git a/lib/Element_calculations.c b/lib/Element_calculations.c
index fc28212..314a952 100644
--- a/lib/Element_calculations.c
+++ b/lib/Element_calculations.c
@@ -613,37 +613,34 @@ void build_diagonal_of_K(E,el,elt_k,level,m)
return;
}
-void build_diagonal_of_Ahat(E)
- struct All_variables *E;
+void build_diagonal_of_Ahat(struct All_variables *E)
{
- double assemble_dAhatp_entry();
+ double assemble_dAhatp_entry();
- double BU;
- int m,e,npno,neq,level;
+ double BU;
+ int m,e,npno,neq,level;
- for (level=E->mesh.gridmin;level<=E->mesh.gridmax;level++)
+ for (level=E->mesh.gridmin;level<=E->mesh.gridmax;level++)
- for (m=1;m<=E->sphere.caps_per_proc;m++) {
+ for (m=1;m<=E->sphere.caps_per_proc;m++) {
- npno = E->lmesh.NPNO[level];
- neq=E->lmesh.NEQ[level];
+ npno = E->lmesh.NPNO[level];
+ neq=E->lmesh.NEQ[level];
- for(e=1;e<=npno;e++)
- E->BPI[level][m][e]=1.0;
-
- if(!E->control.precondition)
- return;
+ for(e=0;e<npno;e++)
+ E->BPI[level][m][e+1]=1.0;
- for(e=1;e<=npno;e++) {
- BU=assemble_dAhatp_entry(E,e,level,m);
- if(BU != 0.0)
- E->BPI[level][m][e] = 1.0/BU;
- else
- E->BPI[level][m][e] = 1.0;
- }
- }
+ if(!E->control.precondition)
+ return;
- return;
+ for(e=0;e<npno;e++) {
+ BU=assemble_dAhatp_entry(E,e,level,m);
+ if(BU != 0.0)
+ E->BPI[level][m][e+1] = 1.0/BU;
+ else
+ E->BPI[level][m][e+1] = 1.0;
+ }
+ }
}
More information about the CIG-COMMITS
mailing list