ATC version 2.0, date: Aug7

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10560 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
rjones 2013-08-07 21:34:37 +00:00
parent 53c7162e9e
commit fafff431e9
2 changed files with 77 additions and 35 deletions

View File

@ -1,72 +1,109 @@
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifdef FIX_CLASS
FixStyle(atc,FixATC)
#else
#ifndef LMP_FIX_ATC_H
#define LMP_FIX_ATC_H
#ifndef FIX_ATC_H
#define FIX_ATC_H
#include "fix.h"
#include "pointers.h" // access to lammps pointers
namespace ATC {
class ATC_Transfer;
}
#include <string>
using std::string;
namespace ATC {
class ATC_Method;
}
namespace LAMMPS_NS {
// fwd decl
class NeighList;
/**
* @class FixATC
* @brief Class for an atom-to-continuum (ATC) Lammps fix.
*/
class FixATC : public Fix {
public:
public:
/** constructor & destructor */
FixATC(class LAMMPS *, int, char **);
~FixATC();
/** calls ATC_Transfer */
/** initialization functions */
void init();
void init_list(int, NeighList *);
void init_list(int id, NeighList *ptr) ;
void setup(int vflag);
void min_setup(int vflag);
/** setmask: tell LAMMPS which fix methods to call */
int setmask();
/** initial_integrate: calls ATC_Transfer */
/** initial_integrate */
void initial_integrate(int vflag);
/** final_integrate: calls ATC_Transfer */
/** final_integrate */
void final_integrate();
/** calls ATC_Transfer */
/** end of step for run or minimize */
void end_of_step();
/** pre_exchange is used to modify fix-specific data
and is called before domain->pbc() and comm->exchange(). */
void setup_pre_exchange();
void pre_exchange();
void min_setup_pre_exchange();
void min_pre_exchange();
double memory_usage();
double memory_usage();
void grow_arrays(int);
void copy_arrays(int, int, int);
/** pack_exchange called from atom_vec->pack_exchange()
and packs fix-specific data for a given real (local)
atom being sent to another processor. */
int pack_exchange(int, double *);
/** unpack_exchange called from atom_vec->unpack_exchange()
and unpacks fix-specific data for a given real (local)
atom received from another processor. */
int unpack_exchange(int, double *);
int pack_comm(int , int *, double *, int, int *);
/** pack_comm called from comm->forward_comm_fix and
packs fix-specific data for a given ghost atom
from exchange with another proc */
int pack_comm(int , int *, double *, int, int *);
/** unpack_comm called from comm->forward_comm_fix and
unpacks fix-specific data for a given ghost atom
from exchange with another proc */
void unpack_comm(int, int, double *);
/** pre_neighbor is used to modify fix-specific data
and is called before neighbor list is built in
neighbor->build(). */
void pre_neighbor();
void setup_pre_neighbor();
void min_setup_pre_neighbor();
/** pre/post_force is used to modify fix-specific data
and is before/after the various force computations. */
void pre_force(int vflag);
void post_force(int vflag);
/** post_run is called after a run completes */
void post_run();
/** min_pre_force is called before forces are calculated in minimize */
void min_pre_force(int vflag);
/** min_post_force is called after forces are calculated in minimize */
void min_post_force(int vflag);
/** modify atc parameters (parser) */
int modify_param(int narg, char** arg);
/** calls ATC_Transfer to handle restarting/checkpointing */
/** calls ATC_Method to handle restarting/checkpointing */
/** these four methods are for writing per-atom quantities */
int pack_restart(int, double *);
void unpack_restart(int, int);
@ -76,15 +113,19 @@ namespace LAMMPS_NS {
void write_restart(FILE *);
void restart(char *);
/** accessor function for ATC_Method class pointer */
const ATC::ATC_Method* atc() { return atc_; }
protected:
LAMMPS * lammps_;
/** functions for "thermo" output */
virtual double compute_scalar();
virtual double compute_vector(int n);
virtual double compute_scalar() ;
virtual double compute_vector(int n) ;
virtual double compute_array(int irow, int icol) ;
double dtv,dtf;
ATC::ATC_Transfer *atcTransfer_;
ATC::ATC_Method *atc_;
};
}
#endif

View File

@ -1,4 +1,5 @@
Sending USER-ATC/Install.sh
Sending USER-ATC/fix_atc.cpp
Adding USER-ATC/svn.stdout
Transmitting file data ..
Transmitting file data ...
Committed revision 10556.