now s2 is correct and everything looks good

This commit is contained in:
vijay gopal chilkuri 2018-01-28 12:20:24 +01:00
parent 55e106f53d
commit 9ebcefaa84
6 changed files with 16 additions and 25 deletions

View File

@ -104,7 +104,7 @@ int main(int argc,char **argv)
MPI_Comm_rank(MPI_COMM_WORLD,&mpiid);
ierr = MatGetOwnershipRange(A,&Istart,&Iend);CHKERRQ(ierr);
ierr = PetscTime(&tt1);CHKERRQ(ierr);
ierr = PetscPrintf(PETSC_COMM_WORLD," start: %d end: %d\n",Istart, Iend);CHKERRQ(ierr);
ierr = PetscPrintf(PETSC_COMM_WORLD," start: %d end: %d | %d\n",Istart, Iend,getdata.natom);CHKERRQ(ierr);
// Iend = range[mpiid];
// if(mpiid==0){

View File

@ -22,13 +22,16 @@
* xymat = the S^2 value
*/
void get_s2(Vec xr, PetscInt *Istart, PetscInt *Iend, PetscScalar *valxr, int *natom, PetscReal *norm, PetscReal *norm2, PetscReal *norm3, PetscReal *norm4, PetscReal *xymat, PetscReal *xymat2, PetscReal *xymat3, PetscReal *xymat4, PetscReal *weight3,
int *s21a1, int *s21a2, int *s21b1, int *s21b2, int *s22a1, int *s22a2, int *s22b1, int *s22b2, int *s23a1, int *s23a2, int *s23b1, int *s23b2, int *postrou){
void get_s2(Vec xr, PetscInt *Istart, PetscInt *Iend, PetscScalar *valxr, int *natom,
PetscReal *norm, PetscReal *norm2, PetscReal *norm3, PetscReal *norm4,
PetscReal *xymat, PetscReal *xymat2, PetscReal *xymat3, PetscReal *xymat4, PetscReal *weight3,
int *s21a1, int *s21a2, int *s21b1, int *s21b2, int *s22a1, int *s22a2,
int *s22b1, int *s22b2, int *s23a1, int *s23a2, int *s23b1, int *s23b2, int *postrou){
const int natomax=700;
long int iaa2, iaa;
long int iii;
long int ideter[natomax];
long int ideter2[natomax];
int ideter[natomax];
int ideter2[natomax];
int kko,kok,kkio;
long int ii;
double xmat=0.0;
@ -678,6 +681,6 @@ void get_s2(Vec xr, PetscInt *Istart, PetscInt *Iend, PetscScalar *valxr, int *n
ierr = PetscTime(&tt2);
//printf(" norm = %18f weight = %18f weight/N = %18f tmpwe = %18f\n", *norm2, *weight3, *weight3/(*norm2),tmpwe);
//printf(" norm = %18f %18f xymat = %18f %18f\n", *norm2, *norm3, *xymat2, *xymat3);
//printf(" norm = %18f %18f xymat = %18f %18f | %d %d %d %d %d\n", *norm, *norm3, *xymat, *xymat3, *s22a1, *s22a2, *s22b1, *s22b2, *postrou);
//ierr = PetscPrintf(PETSC_COMM_WORLD," Time used for the s2 loop: %f\n",tt2-tt1);CHKERRQ(ierr);
}

View File

@ -4,20 +4,8 @@
#include <ctype.h>
#include <string.h>
void get_s2(Vec, PetscInt *, PetscInt *, PetscScalar *, int *, PetscReal *, PetscReal *,PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *,
int *,
int *,
int *,
int *,
int *,
int *,
int *,
int *,
int *,
int *,
int *,
int *,
int *);
void get_s2(Vec xr, PetscInt *Istart, PetscInt *Iend, PetscScalar *valxr, int *natom, PetscReal *norm, PetscReal *norm2, PetscReal *norm3, PetscReal *norm4, PetscReal *xymat, PetscReal *xymat2, PetscReal *xymat3, PetscReal *xymat4, PetscReal *weight3,
int *s21a1, int *s21a2, int *s21b1, int *s21b2, int *s22a1, int *s22a2, int *s22b1, int *s22b2, int *s23a1, int *s23a2, int *s23b1, int *s23b2, int *postrou);
void get_s2_mov(Vec, PetscInt *, PetscInt *, PetscScalar *, int *, PetscReal *, PetscReal *,PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *,
int *,

View File

@ -27,8 +27,8 @@ void get_s2_cyclic(Vec xr, PetscInt *Istart, PetscInt *Iend, PetscScalar *valxr,
const int natomax=700;
long int iaa2, iaa;
long int iii;
long int ideter[natomax];
long int ideter2[natomax];
int ideter[natomax];
int ideter2[natomax];
int kko,kok,kkio,kk;
int kko2,kok2;
long int ii;

View File

@ -27,8 +27,8 @@ void get_s2_mov(Vec xr, PetscInt *Istart, PetscInt *Iend, PetscScalar *valxr, in
const int natomax=700;
long int iaa2, iaa;
long int iii;
long int ideter[natomax];
long int ideter2[natomax];
int ideter[natomax];
int ideter2[natomax];
int kko,kok,kkio;
long int ii;
double xmat=0.0;

View File

@ -33,7 +33,7 @@ typedef struct {
int s23a2;
int s23b1;
int s23b2;
long int postrou;
int postrou;
long int fix_trou1;
long int fix_trou2;