Skip to content
Snippets Groups Projects
lin_alg.h 3.77 KiB
Newer Older
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
/*----------------------------------------------------------------------
  PuReMD - Purdue ReaxFF Molecular Dynamics Program
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed

Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
  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
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
  published by the Free Software Foundation; either version 2 of
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
  the License, or (at your option) any later version.
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed

Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
  See the GNU General Public License for more details:
  <http://www.gnu.org/licenses/>.
  ----------------------------------------------------------------------*/

#ifndef __LIN_ALG_H_
#define __LIN_ALG_H_
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed

#include "reax_types.h"

void Sort_Matrix_Rows( sparse_matrix * const );

void jacobi( sparse_matrix const * const, real * const );

void setup_sparse_approx_inverse( reax_system const * const,
        simulation_data * const,
        storage * const, mpi_datatypes * const, 
        sparse_matrix * const, sparse_matrix *, int, double );

real sparse_approx_inverse( reax_system const * const,
        simulation_data * const,
        storage * const, mpi_datatypes * const, 
        sparse_matrix * const, sparse_matrix * const, sparse_matrix * const, int );
int dual_SDM( reax_system const * const, control_params const * const,
        simulation_data * const,
        storage * const, sparse_matrix * const, rvec2 * const,
        real, rvec2 * const, mpi_datatypes * const, int );

int SDM( reax_system const * const, control_params const * const,
        simulation_data * const,
        storage * const, sparse_matrix * const, real * const,

int dual_CG( reax_system const * const, control_params const * const,
        simulation_data * const,
        storage * const, sparse_matrix * const,
        rvec2 * const, real, rvec2 * const, mpi_datatypes * const, int );

int CG( reax_system const * const, control_params const * const,
        simulation_data * const,
        storage * const, sparse_matrix * const, real * const,
int dual_BiCGStab( reax_system const * const, control_params const * const,
        simulation_data * const,
        storage * const, sparse_matrix * const, rvec2 * const,
        real, rvec2 * const, mpi_datatypes * const, int );

int BiCGStab( reax_system const * const, control_params const * const,
        simulation_data * const,
        storage * const, sparse_matrix * const, real * const,

int dual_PIPECG( reax_system const * const, control_params const * const,
        simulation_data * const,
        storage * const, sparse_matrix * const,
        rvec2 * const, real, rvec2 * const, mpi_datatypes * const, int );

int PIPECG( reax_system const * const, control_params const * const,
        simulation_data * const,
        storage * const, sparse_matrix * const, real * const,
int dual_PIPECR( reax_system const * const, control_params const * const,
        simulation_data * const,
        storage * const, sparse_matrix * const, rvec2 * const,
        real, rvec2 * const, mpi_datatypes * const, int );

int PIPECR( reax_system const * const, control_params const * const,
        simulation_data * const,
        storage * const, sparse_matrix * const, real * const,