/home/julian/svn/gpucpumd/mdgpu2/data.h File Reference

#include "define.h"
#include <iostream>
#include <sstream>
#include <fstream>
#include <cstring>
#include <limits>
#include <assert.h>

Go to the source code of this file.

Functions

bool loadInitData (std::string filename, FLOAT_ARRAY_TYPE *pos, FLOAT_ARRAY_TYPE *vel, int *cnn, int &N, int &numNN)
 Load initial simulation data from file.
bool loadPosVelFromFile (std::string filename, int &N, FLOAT_ARRAY_TYPE *pos, FLOAT_ARRAY_TYPE *vel)
 Load postion and velocity data from file.
bool writeData (std::string &basename, FLOAT_ARRAY_TYPE *pos, FLOAT_ARRAY_TYPE *vel, int *cnn, int &N, int &numNN, int timestamp)
 Save simulation data in file.

Detailed Description

Author:
Julian P. Engel
Date:
08.06.2010

mdgpu - a molecular dynamic simulation program using GPUs
Copyright (C) 2010 Julian P. Engel

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 3 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. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Definition in file data.h.


Function Documentation

bool loadInitData ( std::string  filename,
FLOAT_ARRAY_TYPE *  pos,
FLOAT_ARRAY_TYPE *  vel,
int *  cnn,
int &  N,
int &  numNN 
)

Load initial simulation data from file.

Parameters:
[in] filename Name of the input file
[out] pos Array of position data
[out] vel Array of velcoity data
[out] cnn Array of coupled nearest neighbors
[in] N Number of particles
[in] numNN Maximum number of coupled nearest neighbors
Returns:
Returns true, if data has been successfully loaded, else returns false.

Definition at line 45 of file data.cpp.

Referenced by main().

bool loadPosVelFromFile ( std::string  filename,
int &  N,
FLOAT_ARRAY_TYPE *  pos,
FLOAT_ARRAY_TYPE *  vel 
)

Load postion and velocity data from file.

Parameters:
[in] filename Name of the input file
[in] N Number of particles
[out] pos Array of position data
[out] vel Array of velcoity data
Returns:
Returns true, if data has been successfully loaded, else returns false.

Definition at line 23 of file data.cpp.

bool writeData ( std::string &  basename,
FLOAT_ARRAY_TYPE *  pos,
FLOAT_ARRAY_TYPE *  vel,
int *  cnn,
int &  N,
int &  numNN,
int  timestamp 
)

Save simulation data in file.

Parameters:
[in] basename Base name of the output file
[in] pos Array of position data
[in] vel Array of velcoity data
[in] cnn Array of coupled nearest neighbors
[in] N Number of particles
[in] numNN Maximum number of coupled nearest neighbors
[in] timestamp Timestamp for the output file.
Returns:
Returns true, if data has been successfully written, else returns false.

Definition at line 75 of file data.cpp.

Referenced by main().

 All Files Functions Defines

Generated on Thu Jun 17 14:22:54 2010 for mdgpu - a molecular dynamic simulation program using GPUs by  doxygen 1.6.1