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.0 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 GetNeighborListCutoffsPointer(int * const numberOfCutoffs,
77  double const ** const cutoffs) const;
78 
79  void GetUnits(LengthUnit * const lengthUnit,
80  EnergyUnit * const energyUnit,
81  ChargeUnit * const chargeUnit,
82  TemperatureUnit * const temperatureUnit,
83  TimeUnit * const timeUnit) const;
84 
85  int ComputeArgumentsCreate(ComputeArguments ** const computeArguments) const;
86  int ComputeArgumentsDestroy(ComputeArguments ** const computeArguments) const;
87  int Compute(ComputeArguments const * const computeArguments) const;
88 
90 
91  int GetSpeciesSupportAndCode(SpeciesName const speciesName,
92  int * const speciesIsSupported,
93  int * const code) const;
94 
95  void GetNumberOfParameters(int * const numberOfParameters) const;
97  int const index, DataType * const dataType, int * extent,
98  std::string const ** const description) const;
99  int GetParameter(int const parameterIndex, int const arrayIndex,
100  int * const parameterValue) const;
101  int GetParameter(int const parameterIndex, int const arrayIndex,
102  double * const parameterValue) const;
103  int SetParameter(int const parameterIndex, int const arrayIndex,
104  int const parameterValue);
105  int SetParameter(int const parameterIndex, int const arrayIndex,
106  double const parameterValue);
107 
108  void SetSimulatorBufferPointer(void * const ptr);
109  void GetSimulatorBufferPointer(void ** const ptr) const;
110 
111  std::string const & String() const;
112 
113  void SetLogID(std::string const & logID);
114  void PushLogVerbosity(LogVerbosity const logVerbosity);
115  void PopLogVerbosity();
116 
117  private:
118  // do not allow copy constructor or operator=
119  Model(Model const &);
120  void operator=(Model const &);
121 
122  Model();
123  ~Model();
124 
125  ModelImplementation * pimpl;
126 }; // class Model
127 } // namespace KIM
128 #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 GetNeighborListCutoffsPointer(int *const numberOfCutoffs, double const **const cutoffs) const
int ClearInfluenceDistanceAndCutoffsThenRefreshModel()
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
void PushLogVerbosity(LogVerbosity const logVerbosity)