KIM API V2
KIM_Model.hpp
Go to the documentation of this file.
1 //
2 // CDDL HEADER START
3 //
4 // The contents of this file are subject to the terms of the Common Development
5 // and Distribution License Version 1.0 (the "License").
6 //
7 // You can obtain a copy of the license at
8 // http://www.opensource.org/licenses/CDDL-1.0. See the License for the
9 // specific language governing permissions and limitations under the License.
10 //
11 // When distributing Covered Code, include this CDDL HEADER in each file and
12 // include the License file in a prominent location with the name LICENSE.CDDL.
13 // If applicable, add the following below this CDDL HEADER, with the fields
14 // enclosed by brackets "[]" replaced with your own identifying information:
15 //
16 // Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
17 //
18 // CDDL HEADER END
19 //
20 
21 //
22 // Copyright (c) 2016--2018, Regents of the University of Minnesota.
23 // All rights reserved.
24 //
25 // Contributors:
26 // Ryan S. Elliott
27 //
28 
29 //
30 // Release: This file is part of the kim-api-v2.0.0-beta.1 package.
31 //
32 
33 
34 #ifndef KIM_MODEL_HPP_
35 #define KIM_MODEL_HPP_
36 
37 #include <string>
38 
39 #ifndef KIM_FUNC_HPP_
40 #include "KIM_func.hpp"
41 #endif
42 
43 namespace KIM
44 {
45 // Forward declarations
46 class LogVerbosity;
47 class DataType;
48 class LanguageName;
49 class SpeciesName;
50 class Numbering;
51 class LengthUnit;
52 class EnergyUnit;
53 class ChargeUnit;
54 class TemperatureUnit;
55 class TimeUnit;
56 class ComputeArguments;
57 class ModelImplementation;
58 
59 
60 class Model
61 {
62  public:
63  static int Create(Numbering const numbering,
64  LengthUnit const requestedLengthUnit,
65  EnergyUnit const requestedEnergyUnit,
66  ChargeUnit const requestedChargeUnit,
67  TemperatureUnit const requestedTemperatureUnit,
68  TimeUnit const requestedTimeUnit,
69  std::string const & modelName,
70  int * const requestedUnitsAccepted,
71  Model ** const model);
72  static void Destroy(Model ** const model);
73 
74  void GetInfluenceDistance(double * const influenceDistance) const;
75 
76  void GetNeighborListPointers(int * const numberOfNeighborLists,
77  double const ** const cutoffs,
78  int const ** const paddingNeighborHints,
79  int const ** const halfListHints) const;
80 
81  void GetUnits(LengthUnit * const lengthUnit,
82  EnergyUnit * const energyUnit,
83  ChargeUnit * const chargeUnit,
84  TemperatureUnit * const temperatureUnit,
85  TimeUnit * const timeUnit) const;
86 
87  int ComputeArgumentsCreate(ComputeArguments ** const computeArguments) const;
88  int ComputeArgumentsDestroy(ComputeArguments ** const computeArguments) const;
89  int Compute(ComputeArguments const * const computeArguments) const;
90 
91  int ClearThenRefresh();
92 
93  int GetSpeciesSupportAndCode(SpeciesName const speciesName,
94  int * const speciesIsSupported,
95  int * const code) const;
96 
97  void GetNumberOfParameters(int * const numberOfParameters) const;
99  int const index, DataType * const dataType, int * extent,
100  std::string const ** const description) const;
101  int GetParameter(int const parameterIndex, int const arrayIndex,
102  int * const parameterValue) const;
103  int GetParameter(int const parameterIndex, int const arrayIndex,
104  double * const parameterValue) const;
105  int SetParameter(int const parameterIndex, int const arrayIndex,
106  int const parameterValue);
107  int SetParameter(int const parameterIndex, int const arrayIndex,
108  double const parameterValue);
109 
110  void SetSimulatorBufferPointer(void * const ptr);
111  void GetSimulatorBufferPointer(void ** const ptr) const;
112 
113  std::string const & String() const;
114 
115  void SetLogID(std::string const & logID);
116  void PushLogVerbosity(LogVerbosity const logVerbosity);
117  void PopLogVerbosity();
118 
119  private:
120  // do not allow copy constructor or operator=
121  Model(Model const &);
122  void operator=(Model const &);
123 
124  Model();
125  ~Model();
126 
127  ModelImplementation * pimpl;
128 }; // class Model
129 } // namespace KIM
130 #endif // KIM_MODEL_HPP_
void SetLogID(std::string const &logID)
static int Create(Numbering const numbering, LengthUnit const requestedLengthUnit, EnergyUnit const requestedEnergyUnit, ChargeUnit const requestedChargeUnit, TemperatureUnit const requestedTemperatureUnit, TimeUnit const requestedTimeUnit, std::string const &modelName, int *const requestedUnitsAccepted, Model **const model)
void GetUnits(LengthUnit *const lengthUnit, EnergyUnit *const energyUnit, ChargeUnit *const chargeUnit, TemperatureUnit *const temperatureUnit, TimeUnit *const timeUnit) const
void GetNeighborListPointers(int *const numberOfNeighborLists, double const **const cutoffs, int const **const paddingNeighborHints, int const **const halfListHints) const
void SetSimulatorBufferPointer(void *const ptr)
int ComputeArgumentsCreate(ComputeArguments **const computeArguments) const
int Compute(ComputeArguments const *const computeArguments) const
int SetParameter(int const parameterIndex, int const arrayIndex, int const parameterValue)
void GetInfluenceDistance(double *const influenceDistance) const
static void Destroy(Model **const model)
void PopLogVerbosity()
void GetSimulatorBufferPointer(void **const ptr) const
void GetNumberOfParameters(int *const numberOfParameters) const
std::string const & String() const
int GetParameter(int const parameterIndex, int const arrayIndex, int *const parameterValue) const
int GetSpeciesSupportAndCode(SpeciesName const speciesName, int *const speciesIsSupported, int *const code) const
int ComputeArgumentsDestroy(ComputeArguments **const computeArguments) const
int GetParameterDataTypeExtentAndDescription(int const index, DataType *const dataType, int *extent, std::string const **const description) const
int ClearThenRefresh()
void PushLogVerbosity(LogVerbosity const logVerbosity)