mirror of
https://github.com/LCPQ/DEHam
synced 2024-07-30 09:04:19 +02:00
Fixed bugs for bool type and precision.
This commit is contained in:
parent
87bacf09db
commit
ce1dc54b3d
@ -3,7 +3,7 @@
|
||||
implicit none
|
||||
|
||||
integer :: i
|
||||
real*8 :: xmatd
|
||||
real*8,intent(inout) :: xmatd
|
||||
logical :: yw
|
||||
|
||||
! write(6,*)'in elem_diag'
|
||||
@ -32,6 +32,7 @@
|
||||
if(deter(i).ne.3) xmatd = xmatd + E(i)
|
||||
enddo
|
||||
xmatd = xmatd - E(natom+1)
|
||||
if(yw)write(6,*)'xmatd=',xmatd
|
||||
|
||||
!-----stockage de l element diag
|
||||
|
||||
|
@ -195,7 +195,7 @@ int main(int argc,char **argv)
|
||||
/*
|
||||
Save eigenvectors, if == ested
|
||||
*/
|
||||
EPSGetConverged(eps,&nconv);
|
||||
ierr = EPSGetConverged(eps,&nconv);CHKERRQ(ierr);
|
||||
if (getdata.print_wf) {
|
||||
PetscViewerASCIIOpen(PETSC_COMM_WORLD,filename,&viewer);
|
||||
PetscViewerSetFormat(viewer,PETSC_VIEWER_ASCII_MATLAB);
|
||||
|
@ -26,6 +26,7 @@
|
||||
count1=0
|
||||
count2=1
|
||||
tistart2=tistart
|
||||
xmat=0.0d0
|
||||
|
||||
do j=1,nrows
|
||||
|
||||
|
12
src/read2.c
12
src/read2.c
@ -32,7 +32,9 @@ void Data_new(FILE* file, Data* dat) {
|
||||
dat->isz=atol(line);
|
||||
break;
|
||||
case 6:
|
||||
dat->FAM1 = to_bool(line);
|
||||
//dat->FAM1 = to_bool(line);
|
||||
dat->FAM1 = 0;
|
||||
dat->FAM1 = line && strcmp(line,"true")==0;
|
||||
break;
|
||||
case 7:
|
||||
arrayIdx=0;
|
||||
@ -115,7 +117,7 @@ void Data_new(FILE* file, Data* dat) {
|
||||
/**
|
||||
* Convert the next token to a float value
|
||||
*/
|
||||
val = strtof(token, &unconverted);
|
||||
val = strtod(token, &unconverted);
|
||||
if (!isspace(*unconverted) && *unconverted != 0)
|
||||
{
|
||||
/**
|
||||
@ -139,7 +141,7 @@ void Data_new(FILE* file, Data* dat) {
|
||||
/**
|
||||
* Convert the next token to a float value
|
||||
*/
|
||||
val = strtof(token, &unconverted);
|
||||
val = strtod(token, &unconverted);
|
||||
if (!isspace(*unconverted) && *unconverted != 0)
|
||||
{
|
||||
/**
|
||||
@ -163,7 +165,7 @@ void Data_new(FILE* file, Data* dat) {
|
||||
/**
|
||||
* Convert the next token to a float value
|
||||
*/
|
||||
val = strtof(token, &unconverted);
|
||||
val = strtod(token, &unconverted);
|
||||
if (!isspace(*unconverted) && *unconverted != 0)
|
||||
{
|
||||
/**
|
||||
@ -187,7 +189,7 @@ void Data_new(FILE* file, Data* dat) {
|
||||
/**
|
||||
* Convert the next token to a float value
|
||||
*/
|
||||
val = strtof(token, &unconverted);
|
||||
val = strtod(token, &unconverted);
|
||||
if (!isspace(*unconverted) && *unconverted != 0)
|
||||
{
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user