mirror of
https://github.com/LCPQ/DEHam
synced 2024-09-05 18:44:50 +02:00
now s2 is correct and everything looks good
This commit is contained in:
parent
55e106f53d
commit
9ebcefaa84
@ -104,7 +104,7 @@ int main(int argc,char **argv)
|
|||||||
MPI_Comm_rank(MPI_COMM_WORLD,&mpiid);
|
MPI_Comm_rank(MPI_COMM_WORLD,&mpiid);
|
||||||
ierr = MatGetOwnershipRange(A,&Istart,&Iend);CHKERRQ(ierr);
|
ierr = MatGetOwnershipRange(A,&Istart,&Iend);CHKERRQ(ierr);
|
||||||
ierr = PetscTime(&tt1);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];
|
// Iend = range[mpiid];
|
||||||
// if(mpiid==0){
|
// if(mpiid==0){
|
||||||
|
13
src/get_s2.c
13
src/get_s2.c
@ -22,13 +22,16 @@
|
|||||||
* xymat = the S^2 value
|
* 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,
|
void get_s2(Vec xr, PetscInt *Istart, PetscInt *Iend, PetscScalar *valxr, int *natom,
|
||||||
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){
|
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;
|
const int natomax=700;
|
||||||
long int iaa2, iaa;
|
long int iaa2, iaa;
|
||||||
long int iii;
|
long int iii;
|
||||||
long int ideter[natomax];
|
int ideter[natomax];
|
||||||
long int ideter2[natomax];
|
int ideter2[natomax];
|
||||||
int kko,kok,kkio;
|
int kko,kok,kkio;
|
||||||
long int ii;
|
long int ii;
|
||||||
double xmat=0.0;
|
double xmat=0.0;
|
||||||
@ -678,6 +681,6 @@ void get_s2(Vec xr, PetscInt *Istart, PetscInt *Iend, PetscScalar *valxr, int *n
|
|||||||
|
|
||||||
ierr = PetscTime(&tt2);
|
ierr = PetscTime(&tt2);
|
||||||
//printf(" norm = %18f weight = %18f weight/N = %18f tmpwe = %18f\n", *norm2, *weight3, *weight3/(*norm2),tmpwe);
|
//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);
|
//ierr = PetscPrintf(PETSC_COMM_WORLD," Time used for the s2 loop: %f\n",tt2-tt1);CHKERRQ(ierr);
|
||||||
}
|
}
|
||||||
|
16
src/get_s2.h
16
src/get_s2.h
@ -4,20 +4,8 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
void get_s2(Vec, PetscInt *, PetscInt *, PetscScalar *, int *, PetscReal *, PetscReal *,PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *,
|
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 *,
|
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);
|
||||||
int *,
|
|
||||||
int *,
|
|
||||||
int *,
|
|
||||||
int *,
|
|
||||||
int *,
|
|
||||||
int *,
|
|
||||||
int *,
|
|
||||||
int *,
|
|
||||||
int *,
|
|
||||||
int *,
|
|
||||||
int *,
|
|
||||||
int *);
|
|
||||||
|
|
||||||
void get_s2_mov(Vec, PetscInt *, PetscInt *, PetscScalar *, int *, PetscReal *, PetscReal *,PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *,
|
void get_s2_mov(Vec, PetscInt *, PetscInt *, PetscScalar *, int *, PetscReal *, PetscReal *,PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *, PetscReal *,
|
||||||
int *,
|
int *,
|
||||||
|
@ -27,8 +27,8 @@ void get_s2_cyclic(Vec xr, PetscInt *Istart, PetscInt *Iend, PetscScalar *valxr,
|
|||||||
const int natomax=700;
|
const int natomax=700;
|
||||||
long int iaa2, iaa;
|
long int iaa2, iaa;
|
||||||
long int iii;
|
long int iii;
|
||||||
long int ideter[natomax];
|
int ideter[natomax];
|
||||||
long int ideter2[natomax];
|
int ideter2[natomax];
|
||||||
int kko,kok,kkio,kk;
|
int kko,kok,kkio,kk;
|
||||||
int kko2,kok2;
|
int kko2,kok2;
|
||||||
long int ii;
|
long int ii;
|
||||||
|
@ -27,8 +27,8 @@ void get_s2_mov(Vec xr, PetscInt *Istart, PetscInt *Iend, PetscScalar *valxr, in
|
|||||||
const int natomax=700;
|
const int natomax=700;
|
||||||
long int iaa2, iaa;
|
long int iaa2, iaa;
|
||||||
long int iii;
|
long int iii;
|
||||||
long int ideter[natomax];
|
int ideter[natomax];
|
||||||
long int ideter2[natomax];
|
int ideter2[natomax];
|
||||||
int kko,kok,kkio;
|
int kko,kok,kkio;
|
||||||
long int ii;
|
long int ii;
|
||||||
double xmat=0.0;
|
double xmat=0.0;
|
||||||
|
@ -33,7 +33,7 @@ typedef struct {
|
|||||||
int s23a2;
|
int s23a2;
|
||||||
int s23b1;
|
int s23b1;
|
||||||
int s23b2;
|
int s23b2;
|
||||||
long int postrou;
|
int postrou;
|
||||||
long int fix_trou1;
|
long int fix_trou1;
|
||||||
long int fix_trou2;
|
long int fix_trou2;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user