Unverified Commit f86d2c99 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

read/write settings in restart files for bonded hybrid styles

this allows to properly restart table styles, which require
additional settings unlike all other bonded styles.
parent 5ca93e36
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -324,6 +324,7 @@ void AngleHybrid::write_restart(FILE *fp)
    n = strlen(keywords[m]) + 1;
    fwrite(&n,sizeof(int),1,fp);
    fwrite(keywords[m],sizeof(char),n,fp);
    styles[m]->write_restart_settings(fp);
  }
}

@@ -349,6 +350,7 @@ void AngleHybrid::read_restart(FILE *fp)
    if (me == 0) fread(keywords[m],sizeof(char),n,fp);
    MPI_Bcast(keywords[m],n,MPI_CHAR,0,world);
    styles[m] = force->new_angle(keywords[m],0,dummy);
    styles[m]->read_restart_settings(fp);
  }
}

+2 −0
Original line number Diff line number Diff line
@@ -325,6 +325,7 @@ void BondHybrid::write_restart(FILE *fp)
    n = strlen(keywords[m]) + 1;
    fwrite(&n,sizeof(int),1,fp);
    fwrite(keywords[m],sizeof(char),n,fp);
    styles[m]->write_restart_settings(fp);
  }
}

@@ -350,6 +351,7 @@ void BondHybrid::read_restart(FILE *fp)
    if (me == 0) fread(keywords[m],sizeof(char),n,fp);
    MPI_Bcast(keywords[m],n,MPI_CHAR,0,world);
    styles[m] = force->new_bond(keywords[m],0,dummy);
    styles[m]->read_restart_settings(fp);
  }
}

+2 −0
Original line number Diff line number Diff line
@@ -309,6 +309,7 @@ void DihedralHybrid::write_restart(FILE *fp)
    n = strlen(keywords[m]) + 1;
    fwrite(&n,sizeof(int),1,fp);
    fwrite(keywords[m],sizeof(char),n,fp);
    styles[m]->write_restart_settings(fp);
  }
}

@@ -334,6 +335,7 @@ void DihedralHybrid::read_restart(FILE *fp)
    if (me == 0) fread(keywords[m],sizeof(char),n,fp);
    MPI_Bcast(keywords[m],n,MPI_CHAR,0,world);
    styles[m] = force->new_dihedral(keywords[m],0,dummy);
    styles[m]->read_restart_settings(fp);
  }
}

+2 −0
Original line number Diff line number Diff line
@@ -306,6 +306,7 @@ void ImproperHybrid::write_restart(FILE *fp)
    n = strlen(keywords[m]) + 1;
    fwrite(&n,sizeof(int),1,fp);
    fwrite(keywords[m],sizeof(char),n,fp);
    styles[m]->write_restart_settings(fp);
  }
}

@@ -331,6 +332,7 @@ void ImproperHybrid::read_restart(FILE *fp)
    if (me == 0) fread(keywords[m],sizeof(char),n,fp);
    MPI_Bcast(keywords[m],n,MPI_CHAR,0,world);
    styles[m] = force->new_improper(keywords[m],0,dummy);
    styles[m]->read_restart_settings(fp);
  }
}

+1 −1

File changed.

Contains only whitespace changes.