ATC version 2.0, date: Aug7
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10561 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
89
lib/atc/PaqAtcUtility.cpp
Normal file
89
lib/atc/PaqAtcUtility.cpp
Normal file
@ -0,0 +1,89 @@
|
||||
// ATC transfer headers
|
||||
#include "PaqAtcUtility.h"
|
||||
#include "ATC_Method.h"
|
||||
#include "FE_Engine.h"
|
||||
|
||||
namespace ATC {
|
||||
|
||||
//--------------------------------------------------------
|
||||
//--------------------------------------------------------
|
||||
// Class PaqAtcUtility
|
||||
//--------------------------------------------------------
|
||||
//--------------------------------------------------------
|
||||
|
||||
//--------------------------------------------------------
|
||||
// Constructor
|
||||
//--------------------------------------------------------
|
||||
PaqAtcUtility::PaqAtcUtility(ATC_Method * atc,
|
||||
AtomType atomType) :
|
||||
atc_(atc),
|
||||
atomType_(atomType),
|
||||
myNlocal(NULL)
|
||||
{
|
||||
switch (atomType_) {
|
||||
case ALL:
|
||||
myNlocal = &ATC_Method::nlocal_total;
|
||||
break;
|
||||
case INTERNAL:
|
||||
myNlocal = &ATC_Method::nlocal;
|
||||
break;
|
||||
case GHOST:
|
||||
myNlocal = &ATC_Method::nlocal_ghost;
|
||||
break;
|
||||
case PROC_GHOST:
|
||||
myNlocal = &ATC_Method::nproc_ghost;
|
||||
break;
|
||||
default: // default cases to avoid compiler warnings
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------
|
||||
// nlocal
|
||||
//--------------------------------------------------------
|
||||
int PaqAtcUtility::nlocal() const
|
||||
{
|
||||
return (atc_->*myNlocal)();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------
|
||||
// nlocal_total
|
||||
//--------------------------------------------------------
|
||||
int PaqAtcUtility::nlocal_total() const
|
||||
{
|
||||
return atc_->nlocal_total();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------
|
||||
// nsd
|
||||
//--------------------------------------------------------
|
||||
int PaqAtcUtility::nsd() const
|
||||
{
|
||||
return atc_->nsd();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------
|
||||
// dt
|
||||
//--------------------------------------------------------
|
||||
double PaqAtcUtility::dt() const
|
||||
{
|
||||
return atc_->dt();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------
|
||||
// atc_to_lammps_map
|
||||
//--------------------------------------------------------
|
||||
const Array<int> & PaqAtcUtility::atc_to_lammps_map() const
|
||||
{
|
||||
return (atomType_==INTERNAL) ? (atc_->internal_to_atom_map()) : (atc_->ghost_to_atom_map());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------
|
||||
// fe_engine
|
||||
//--------------------------------------------------------
|
||||
const FE_Engine * PaqAtcUtility::fe_engine() const
|
||||
{
|
||||
return atc_->fe_engine();
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user