Skip to content
Snippets Groups Projects
Commit 4a460b0a authored by Kurt A. O'Hearn's avatar Kurt A. O'Hearn
Browse files

Merge.

parents 90e2af75 a5f19193
No related branches found
No related tags found
No related merge requests found
Showing
with 6185 additions and 5884 deletions
This diff is collapsed.
/*----------------------------------------------------------------------
SerialReax - Reax Force Field Simulator
Copyright (2010) Purdue University
Hasan Metin Aktulga, haktulga@cs.purdue.edu
Joseph Fogarty, jcfogart@mail.usf.edu
Sagar Pandit, pandit@usf.edu
Ananth Y Grama, ayg@cs.purdue.edu
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details:
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
......@@ -28,29 +28,29 @@
typedef enum
{
LOWER = 0,
UPPER = 1,
LOWER = 0,
UPPER = 1,
} TRIANGULARITY;
int GMRES( static_storage*, sparse_matrix*,
real*, real, real*, FILE* );
int GMRES( static_storage*, sparse_matrix*,
real*, real, real*, FILE* );
int GMRES_HouseHolder( static_storage*, sparse_matrix*,
real*, real, real*, FILE* );
int GMRES_HouseHolder( static_storage*, sparse_matrix*,
real*, real, real*, FILE* );
int PGMRES( static_storage*, sparse_matrix*, real*, real,
sparse_matrix*, sparse_matrix*, real*, FILE* );
int PGMRES( static_storage*, sparse_matrix*, real*, real,
sparse_matrix*, sparse_matrix*, real*, FILE* );
int PGMRES_Jacobi( static_storage*, sparse_matrix*, real*, real,
sparse_matrix*, sparse_matrix*, real*, FILE* );
int PGMRES_Jacobi( static_storage*, sparse_matrix*, real*, real,
sparse_matrix*, sparse_matrix*, real*, FILE* );
int PCG( static_storage*, sparse_matrix*, real*, real,
sparse_matrix*, sparse_matrix*, real*, FILE* );
int PCG( static_storage*, sparse_matrix*, real*, real,
sparse_matrix*, sparse_matrix*, real*, FILE* );
int CG( static_storage*, sparse_matrix*,
real*, real, real*, FILE* );
int CG( static_storage*, sparse_matrix*,
real*, real, real*, FILE* );
int uyduruk_GMRES( static_storage*, sparse_matrix*,
real*, real, real*, int, FILE* );
int uyduruk_GMRES( static_storage*, sparse_matrix*,
real*, real, real*, int, FILE* );
#endif
This diff is collapsed.
/*----------------------------------------------------------------------
SerialReax - Reax Force Field Simulator
Copyright (2010) Purdue University
Hasan Metin Aktulga, haktulga@cs.purdue.edu
Joseph Fogarty, jcfogart@mail.usf.edu
Sagar Pandit, pandit@usf.edu
Ananth Y Grama, ayg@cs.purdue.edu
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details:
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
......@@ -24,7 +24,7 @@
#include "mytypes.h"
void QEq( reax_system*, control_params*, simulation_data*, static_storage*,
list*, output_controls* );
void QEq( reax_system*, control_params*, simulation_data*, static_storage*,
list*, output_controls* );
#endif
/*----------------------------------------------------------------------
SerialReax - Reax Force Field Simulator
Copyright (2010) Purdue University
Hasan Metin Aktulga, haktulga@cs.purdue.edu
Joseph Fogarty, jcfogart@mail.usf.edu
Sagar Pandit, pandit@usf.edu
Ananth Y Grama, ayg@cs.purdue.edu
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details:
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
......@@ -24,267 +24,283 @@
void Reallocate_Neighbor_List( list *far_nbrs, int n, int num_intrs )
{
Delete_List( far_nbrs );
if(!Make_List( n, num_intrs, TYP_FAR_NEIGHBOR, far_nbrs )){
fprintf(stderr, "Problem in initializing far nbrs list. Terminating!\n");
exit( INIT_ERR );
}
Delete_List( far_nbrs );
if (!Make_List( n, num_intrs, TYP_FAR_NEIGHBOR, far_nbrs ))
{
fprintf(stderr, "Problem in initializing far nbrs list. Terminating!\n");
exit( INIT_ERR );
}
#if defined(DEBUG_FOCUS)
fprintf( stderr, "num_far = %d, far_nbrs = %d -> reallocating!\n",
num_intrs, far_nbrs->num_intrs );
fprintf( stderr, "memory allocated: far_nbrs = %ldMB\n",
num_intrs * sizeof(far_neighbor_data) / (1024*1024) );
fprintf( stderr, "num_far = %d, far_nbrs = %d -> reallocating!\n",
num_intrs, far_nbrs->num_intrs );
fprintf( stderr, "memory allocated: far_nbrs = %ldMB\n",
num_intrs * sizeof(far_neighbor_data) / (1024 * 1024) );
#endif
}
int Allocate_Matrix( sparse_matrix **pH, int n, int m )
{
sparse_matrix *H;
if( (*pH = (sparse_matrix*) malloc(sizeof(sparse_matrix))) == NULL )
{
return 0;
}
H = *pH;
H->n = n;
H->m = m;
if( (H->start = (int*) malloc(sizeof(int) * (n+1))) == NULL )
{
return 0;
}
if( (H->entries =
(sparse_matrix_entry*) malloc(sizeof(sparse_matrix_entry)*m)) == NULL )
{
return 0;
}
sparse_matrix *H;
if ( (*pH = (sparse_matrix*) malloc(sizeof(sparse_matrix))) == NULL )
{
return 0;
}
H = *pH;
H->n = n;
H->m = m;
if ( (H->start = (int*) malloc(sizeof(int) * (n + 1))) == NULL )
{
return 0;
}
if ( (H->entries =
(sparse_matrix_entry*) malloc(sizeof(sparse_matrix_entry) * m)) == NULL )
{
return 0;
}
// if( ((H->j = (int*) malloc(sizeof(int)*m)) == NULL) ||
// ((H->val = (real*) malloc(sizeof(real)*m)) == NULL) )
// {
// return 0;
// }
return 1;
return 1;
}
void Deallocate_Matrix( sparse_matrix *H )
{
free(H->start);
free(H->entries);
free(H);
free(H->start);
free(H->entries);
free(H);
}
int Reallocate_Matrix( sparse_matrix **H, int n, int m, char *name )
{
Deallocate_Matrix( *H );
if( !Allocate_Matrix( H, n, m ) ) {
fprintf(stderr, "not enough space for %s matrix. terminating!\n", name);
exit( 1 );
}
Deallocate_Matrix( *H );
if ( !Allocate_Matrix( H, n, m ) )
{
fprintf(stderr, "not enough space for %s matrix. terminating!\n", name);
exit( 1 );
}
#if defined(DEBUG_FOCUS)
fprintf( stderr, "reallocating %s matrix, n = %d, m = %d\n",
name, n, m );
fprintf( stderr, "memory allocated: %s = %ldMB\n",
name, m * sizeof(sparse_matrix_entry) / (1024*1024) );
fprintf( stderr, "reallocating %s matrix, n = %d, m = %d\n",
name, n, m );
fprintf( stderr, "memory allocated: %s = %ldMB\n",
name, m * sizeof(sparse_matrix_entry) / (1024 * 1024) );
#endif
return 1;
return 1;
}
int Allocate_HBond_List( int n, int num_h, int *h_index, int *hb_top,
list *hbonds )
int Allocate_HBond_List( int n, int num_h, int *h_index, int *hb_top,
list *hbonds )
{
int i, num_hbonds;
num_hbonds = 0;
/* find starting indexes for each H and the total number of hbonds */
for( i = 1; i < n; ++i )
hb_top[i] += hb_top[i-1];
num_hbonds = hb_top[n-1];
if( !Make_List(num_h, num_hbonds, TYP_HBOND, hbonds ) ) {
fprintf( stderr, "not enough space for hbonds list. terminating!\n" );
exit( INIT_ERR );
}
for( i = 0; i < n; ++i )
if( h_index[i] == 0 ){
Set_Start_Index( 0, 0, hbonds );
Set_End_Index( 0, 0, hbonds );
int i, num_hbonds;
num_hbonds = 0;
/* find starting indexes for each H and the total number of hbonds */
for ( i = 1; i < n; ++i )
hb_top[i] += hb_top[i - 1];
num_hbonds = hb_top[n - 1];
if ( !Make_List(num_h, num_hbonds, TYP_HBOND, hbonds ) )
{
fprintf( stderr, "not enough space for hbonds list. terminating!\n" );
exit( INIT_ERR );
}
else if( h_index[i] > 0 ){
Set_Start_Index( h_index[i], hb_top[i-1], hbonds );
Set_End_Index( h_index[i], hb_top[i-1], hbonds );
}
for ( i = 0; i < n; ++i )
if ( h_index[i] == 0 )
{
Set_Start_Index( 0, 0, hbonds );
Set_End_Index( 0, 0, hbonds );
}
else if ( h_index[i] > 0 )
{
Set_Start_Index( h_index[i], hb_top[i - 1], hbonds );
Set_End_Index( h_index[i], hb_top[i - 1], hbonds );
}
#if defined(DEBUG_FOCUS)
fprintf( stderr, "allocating hbonds - num_hbonds: %d\n", num_hbonds );
fprintf( stderr, "memory allocated: hbonds = %ldMB\n",
num_hbonds * sizeof(hbond_data) / (1024*1024) );
fprintf( stderr, "allocating hbonds - num_hbonds: %d\n", num_hbonds );
fprintf( stderr, "memory allocated: hbonds = %ldMB\n",
num_hbonds * sizeof(hbond_data) / (1024 * 1024) );
#endif
return 1;
return 1;
}
int Reallocate_HBonds_List( int n, int num_h, int *h_index, list *hbonds )
{
int i;
int *hb_top;
int i;
int *hb_top;
#if defined(DEBUG_FOCUS)
fprintf( stderr, "reallocating hbonds\n" );
fprintf( stderr, "reallocating hbonds\n" );
#endif
hb_top = calloc( n, sizeof(int) );
for( i = 0; i < n; ++i )
if( h_index[i] >= 0 )
hb_top[i] = MAX(Num_Entries(h_index[i],hbonds)*SAFE_HBONDS, MIN_HBONDS);
Delete_List( hbonds );
Allocate_HBond_List( n, num_h, h_index, hb_top, hbonds );
free( hb_top );
return 1;
hb_top = calloc( n, sizeof(int) );
for ( i = 0; i < n; ++i )
if ( h_index[i] >= 0 )
hb_top[i] = MAX(Num_Entries(h_index[i], hbonds) * SAFE_HBONDS, MIN_HBONDS);
Delete_List( hbonds );
Allocate_HBond_List( n, num_h, h_index, hb_top, hbonds );
free( hb_top );
return 1;
}
int Allocate_Bond_List( int n, int *bond_top, list *bonds )
{
int i, num_bonds;
num_bonds = 0;
/* find starting indexes for each atom and the total number of bonds */
for( i = 1; i < n; ++i )
bond_top[i] += bond_top[i-1];
num_bonds = bond_top[n-1];
if( !Make_List(n, num_bonds, TYP_BOND, bonds ) ) {
fprintf( stderr, "not enough space for bonds list. terminating!\n" );
exit( INIT_ERR );
}
Set_Start_Index( 0, 0, bonds );
Set_End_Index( 0, 0, bonds );
for( i = 1; i < n; ++i ) {
Set_Start_Index( i, bond_top[i-1], bonds );
Set_End_Index( i, bond_top[i-1], bonds );
}
int i, num_bonds;
num_bonds = 0;
/* find starting indexes for each atom and the total number of bonds */
for ( i = 1; i < n; ++i )
bond_top[i] += bond_top[i - 1];
num_bonds = bond_top[n - 1];
if ( !Make_List(n, num_bonds, TYP_BOND, bonds ) )
{
fprintf( stderr, "not enough space for bonds list. terminating!\n" );
exit( INIT_ERR );
}
Set_Start_Index( 0, 0, bonds );
Set_End_Index( 0, 0, bonds );
for ( i = 1; i < n; ++i )
{
Set_Start_Index( i, bond_top[i - 1], bonds );
Set_End_Index( i, bond_top[i - 1], bonds );
}
#if defined(DEBUG_FOCUS)
fprintf( stderr, "allocating bonds - num_bonds: %d\n", num_bonds );
fprintf( stderr, "memory allocated: bonds = %ldMB\n",
num_bonds * sizeof(bond_data) / (1024*1024) );
fprintf( stderr, "allocating bonds - num_bonds: %d\n", num_bonds );
fprintf( stderr, "memory allocated: bonds = %ldMB\n",
num_bonds * sizeof(bond_data) / (1024 * 1024) );
#endif
return 1;
return 1;
}
int Reallocate_Bonds_List( int n, list *bonds, int *num_bonds, int *est_3body )
{
int i;
int *bond_top;
int i;
int *bond_top;
#if defined(DEBUG_FOCUS)
fprintf( stderr, "reallocating bonds\n" );
fprintf( stderr, "reallocating bonds\n" );
#endif
bond_top = calloc( n, sizeof(int) );
*est_3body = 0;
for( i = 0; i < n; ++i ){
*est_3body += SQR( Num_Entries( i, bonds ) );
bond_top[i] = MAX( Num_Entries( i, bonds ) * 2, MIN_BONDS );
}
bond_top = calloc( n, sizeof(int) );
*est_3body = 0;
for ( i = 0; i < n; ++i )
{
*est_3body += SQR( Num_Entries( i, bonds ) );
bond_top[i] = MAX( Num_Entries( i, bonds ) * 2, MIN_BONDS );
}
Delete_List( bonds );
Delete_List( bonds );
Allocate_Bond_List( n, bond_top, bonds );
*num_bonds = bond_top[n - 1];
Allocate_Bond_List( n, bond_top, bonds );
*num_bonds = bond_top[n-1];
free( bond_top );
free( bond_top );
return 1;
return 1;
}
void Reallocate( reax_system *system, static_storage *workspace, list **lists,
int nbr_flag )
void Reallocate( reax_system *system, static_storage *workspace, list **lists,
int nbr_flag )
{
int i, j, k;
int num_bonds, est_3body;
reallocate_data *realloc;
grid *g;
realloc = &(workspace->realloc);
g = &(system->g);
if( realloc->num_far > 0 && nbr_flag ) {
Reallocate_Neighbor_List( (*lists)+FAR_NBRS,
system->N, realloc->num_far * SAFE_ZONE );
realloc->num_far = -1;
}
if( realloc->Htop > 0 ){
Reallocate_Matrix(&(workspace->H), system->N, realloc->Htop*SAFE_ZONE,"H");
realloc->Htop = -1;
Deallocate_Matrix( workspace->L );
Deallocate_Matrix( workspace->U );
workspace->L = NULL;
workspace->U = NULL;
}
if( realloc->hbonds > 0 ){
Reallocate_HBonds_List(system->N, workspace->num_H, workspace->hbond_index,
(*lists)+HBONDS );
realloc->hbonds = -1;
}
num_bonds = est_3body = -1;
if( realloc->bonds > 0 ){
Reallocate_Bonds_List( system->N, (*lists)+BONDS, &num_bonds, &est_3body );
realloc->bonds = -1;
realloc->num_3body = MAX( realloc->num_3body, est_3body );
}
if( realloc->num_3body > 0 ) {
Delete_List( (*lists)+THREE_BODIES );
if( num_bonds == -1 )
num_bonds = ((*lists)+BONDS)->num_intrs;
realloc->num_3body *= SAFE_ZONE;
if( !Make_List( num_bonds, realloc->num_3body,
TYP_THREE_BODY, (*lists)+THREE_BODIES ) ) {
fprintf( stderr, "Problem in initializing angles list. Terminating!\n" );
exit( INIT_ERR );
int i, j, k;
int num_bonds, est_3body;
reallocate_data *realloc;
grid *g;
realloc = &(workspace->realloc);
g = &(system->g);
if ( realloc->num_far > 0 && nbr_flag )
{
Reallocate_Neighbor_List( (*lists) + FAR_NBRS,
system->N, realloc->num_far * SAFE_ZONE );
realloc->num_far = -1;
}
if ( realloc->Htop > 0 )
{
Reallocate_Matrix(&(workspace->H), system->N, realloc->Htop * SAFE_ZONE, "H");
realloc->Htop = -1;
Deallocate_Matrix( workspace->L );
Deallocate_Matrix( workspace->U );
workspace->L = NULL;
workspace->U = NULL;
}
if ( realloc->hbonds > 0 )
{
Reallocate_HBonds_List(system->N, workspace->num_H, workspace->hbond_index,
(*lists) + HBONDS );
realloc->hbonds = -1;
}
num_bonds = est_3body = -1;
if ( realloc->bonds > 0 )
{
Reallocate_Bonds_List( system->N, (*lists) + BONDS, &num_bonds, &est_3body );
realloc->bonds = -1;
realloc->num_3body = MAX( realloc->num_3body, est_3body );
}
realloc->num_3body = -1;
if ( realloc->num_3body > 0 )
{
Delete_List( (*lists) + THREE_BODIES );
if ( num_bonds == -1 )
num_bonds = ((*lists) + BONDS)->num_intrs;
realloc->num_3body *= SAFE_ZONE;
if ( !Make_List( num_bonds, realloc->num_3body,
TYP_THREE_BODY, (*lists) + THREE_BODIES ) )
{
fprintf( stderr, "Problem in initializing angles list. Terminating!\n" );
exit( INIT_ERR );
}
realloc->num_3body = -1;
#if defined(DEBUG_FOCUS)
fprintf( stderr, "reallocating 3 bodies\n" );
fprintf( stderr, "reallocated - num_bonds: %d\n", num_bonds );
fprintf( stderr, "reallocated - num_3body: %d\n", realloc->num_3body );
fprintf( stderr, "reallocated 3body memory: %ldMB\n",
realloc->num_3body*sizeof(three_body_interaction_data)/
(1024*1024) );
fprintf( stderr, "reallocating 3 bodies\n" );
fprintf( stderr, "reallocated - num_bonds: %d\n", num_bonds );
fprintf( stderr, "reallocated - num_3body: %d\n", realloc->num_3body );
fprintf( stderr, "reallocated 3body memory: %ldMB\n",
realloc->num_3body * sizeof(three_body_interaction_data) /
(1024 * 1024) );
#endif
}
}
if( realloc->gcell_atoms > -1 ){
if ( realloc->gcell_atoms > -1 )
{
#if defined(DEBUG_FOCUS)
fprintf(stderr, "reallocating gcell: g->max_atoms: %d\n", g->max_atoms);
fprintf(stderr, "reallocating gcell: g->max_atoms: %d\n", g->max_atoms);
#endif
for( i = 0; i < g->ncell[0]; i++ )
for( j = 0; j < g->ncell[1]; j++ )
for( k = 0; k < g->ncell[2]; k++ ) {
// reallocate g->atoms
free( g->atoms[i][j][k] );
g->atoms[i][j][k] = (int*)
calloc(workspace->realloc.gcell_atoms, sizeof(int));
}
realloc->gcell_atoms = -1;
}
for ( i = 0; i < g->ncell[0]; i++ )
for ( j = 0; j < g->ncell[1]; j++ )
for ( k = 0; k < g->ncell[2]; k++ )
{
// reallocate g->atoms
free( g->atoms[i][j][k] );
g->atoms[i][j][k] = (int*)
calloc(workspace->realloc.gcell_atoms, sizeof(int));
}
realloc->gcell_atoms = -1;
}
}
/*----------------------------------------------------------------------
SerialReax - Reax Force Field Simulator
Copyright (2010) Purdue University
Hasan Metin Aktulga, haktulga@cs.purdue.edu
Joseph Fogarty, jcfogart@mail.usf.edu
Sagar Pandit, pandit@usf.edu
Ananth Y Grama, ayg@cs.purdue.edu
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details:
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
......
This diff is collapsed.
/*----------------------------------------------------------------------
SerialReax - Reax Force Field Simulator
Copyright (2010) Purdue University
Hasan Metin Aktulga, haktulga@cs.purdue.edu
Joseph Fogarty, jcfogart@mail.usf.edu
Sagar Pandit, pandit@usf.edu
Ananth Y Grama, ayg@cs.purdue.edu
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details:
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
......@@ -24,18 +24,18 @@
#include "mytypes.h"
void Analysis( reax_system*, control_params*, simulation_data*,
static_storage*, list**, output_controls* );
void Analysis( reax_system*, control_params*, simulation_data*,
static_storage*, list**, output_controls* );
//void Copy_Bond_List( reax_system*, control_params*, list** );
//void Analyze_Molecules( reax_system*, control_params*, simulation_data*,
//void Analyze_Molecules( reax_system*, control_params*, simulation_data*,
// static_storage*, list**, FILE* );
//void Analyze_Bonding( reax_system*, control_params*, simulation_data*,
//void Analyze_Bonding( reax_system*, control_params*, simulation_data*,
// static_storage*, list**, FILE* );
//void Analyze_Silica( reax_system*, control_params*, simulation_data*,
//void Analyze_Silica( reax_system*, control_params*, simulation_data*,
// static_storage*, list**, FILE* );
//void Calculate_Dipole_Moment( reax_system*, control_params*, simulation_data*,
......@@ -43,7 +43,7 @@ void Analysis( reax_system*, control_params*, simulation_data*,
//void Copy_Positions( reax_system*, static_storage* );
//void Calculate_Drift( reax_system*, control_params*,
//void Calculate_Drift( reax_system*, control_params*,
// simulation_data*, static_storage*, FILE* );
//void Calculate_Density_3DMesh( reax_system*, simulation_data*, FILE* );
......
This diff is collapsed.
/*----------------------------------------------------------------------
SerialReax - Reax Force Field Simulator
Copyright (2010) Purdue University
Hasan Metin Aktulga, haktulga@cs.purdue.edu
Joseph Fogarty, jcfogart@mail.usf.edu
Sagar Pandit, pandit@usf.edu
Ananth Y Grama, ayg@cs.purdue.edu
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details:
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
......@@ -24,12 +24,13 @@
#include "mytypes.h"
typedef struct{
real C1dbo, C2dbo, C3dbo;
real C1dbopi, C2dbopi, C3dbopi, C4dbopi;
real C1dbopi2, C2dbopi2, C3dbopi2, C4dbopi2;
real C1dDelta, C2dDelta, C3dDelta;
}dbond_coefficients;
typedef struct
{
real C1dbo, C2dbo, C3dbo;
real C1dbopi, C2dbopi, C3dbopi, C4dbopi;
real C1dbopi2, C2dbopi2, C3dbopi2, C4dbopi2;
real C1dDelta, C2dDelta, C3dDelta;
} dbond_coefficients;
#ifdef TEST_FORCES
void Get_dBO( reax_system*, list**, int, int, real, rvec* );
......@@ -45,10 +46,10 @@ void Add_dDelta( reax_system*, list**, int, real, rvec* );
void Add_dDelta_to_Forces( reax_system *, list**, int, real );
#endif
void Add_dBond_to_Forces( int, int, reax_system*, simulation_data*,
static_storage*, list** );
void Add_dBond_to_Forces_NPT( int, int, reax_system*, simulation_data*,
static_storage*, list** );
void Add_dBond_to_Forces( int, int, reax_system*, simulation_data*,
static_storage*, list** );
void Add_dBond_to_Forces_NPT( int, int, reax_system*, simulation_data*,
static_storage*, list** );
void Calculate_Bond_Orders( reax_system*, control_params*, simulation_data*,
static_storage*, list**, output_controls* );
static_storage*, list**, output_controls* );
#endif
This diff is collapsed.
/*----------------------------------------------------------------------
SerialReax - Reax Force Field Simulator
Copyright (2010) Purdue University
Hasan Metin Aktulga, haktulga@cs.purdue.edu
Joseph Fogarty, jcfogart@mail.usf.edu
Sagar Pandit, pandit@usf.edu
Ananth Y Grama, ayg@cs.purdue.edu
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details:
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
......@@ -25,33 +25,33 @@
#include "mytypes.h"
/* Initializes box from CRYST1 line of PDB */
void Init_Box_From_CRYST(real, real, real, real, real, real,
simulation_box*/*, int*/);
void Init_Box_From_CRYST(real, real, real, real, real, real,
simulation_box*/*, int*/);
/* Initializes box from box rtensor */
void Update_Box(rtensor, simulation_box* /*, int*/);
void Update_Box_Isotropic(simulation_box*, real /*, int*/);
void Update_Box_SemiIsotropic( simulation_box*, rvec /*, int*/ );
/* Computes all the transformations,
/* Computes all the transformations,
metric and other quantities from box rtensor */
void Make_Consistent(simulation_box*/*, int*/ );
/* Applies transformation to and from
/* Applies transformation to and from
Cartesian to Triclinic coordinates based on flag */
/* Use -1 flag for Cartesian -> Triclinic and +1 for otherway */
void Transform( rvec, simulation_box*, char, rvec );
void Transform_to_UnitBox( rvec, simulation_box*, char, rvec );
int Are_Far_Neighbors( rvec, rvec, simulation_box*, real, far_neighbor_data* );
void Get_NonPeriodic_Far_Neighbors( rvec, rvec, simulation_box*,
control_params*, far_neighbor_data*, int* );
void Get_Periodic_Far_Neighbors_Big_Box( rvec, rvec, simulation_box*,
control_params*, far_neighbor_data*,
int* );
void Get_Periodic_Far_Neighbors_Small_Box( rvec, rvec, simulation_box*,
control_params*, far_neighbor_data*,
int* );
void Get_NonPeriodic_Far_Neighbors( rvec, rvec, simulation_box*,
control_params*, far_neighbor_data*, int* );
void Get_Periodic_Far_Neighbors_Big_Box( rvec, rvec, simulation_box*,
control_params*, far_neighbor_data*,
int* );
void Get_Periodic_Far_Neighbors_Small_Box( rvec, rvec, simulation_box*,
control_params*, far_neighbor_data*,
int* );
void Distance_on_T3_Gen( rvec, rvec, simulation_box*, rvec );
void Inc_on_T3_Gen( rvec, rvec, simulation_box* );
......
This diff is collapsed.
/*----------------------------------------------------------------------
SerialReax - Reax Force Field Simulator
Copyright (2010) Purdue University
Hasan Metin Aktulga, haktulga@cs.purdue.edu
Joseph Fogarty, jcfogart@mail.usf.edu
Sagar Pandit, pandit@usf.edu
Ananth Y Grama, ayg@cs.purdue.edu
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details:
<http://www.gnu.org/licenses/>.
----------------------------------------------------------------------*/
......@@ -26,9 +26,9 @@
void Init_Bonded_Force_Functions( control_params* );
void Compute_Forces( reax_system*, control_params*, simulation_data*,
static_storage*, list**, output_controls* );
void Compute_Forces( reax_system*, control_params*, simulation_data*,
static_storage*, list**, output_controls* );
void Estimate_Storage_Sizes( reax_system*, control_params*, list**,
int*, int*, int*, int* );
void Estimate_Storage_Sizes( reax_system*, control_params*, list**,
int*, int*, int*, int* );
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment