1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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();
}
};