KIM API V2
KIM_Model.h
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 */
5 /* Development 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 */
13 /* LICENSE.CDDL. */
14 /* If applicable, add the following below this CDDL HEADER, with the fields */
15 /* enclosed by brackets "[]" replaced with your own identifying information: */
16 /* */
17 /* Portions Copyright (c) [yyyy] [name of copyright owner]. */
18 /* All rights reserved. */
19 /* */
20 /* CDDL HEADER END */
21 /* */
22 
23 /* */
24 /* Copyright (c) 2016--2018, Regents of the University of Minnesota. */
25 /* All rights reserved. */
26 /* */
27 /* Contributors: */
28 /* Ryan S. Elliott */
29 /* */
30 
31 /* */
32 /* Release: This file is part of the kim-api-v2.0.0-alpha.0 package. */
33 /* */
34 
35 
36 #ifndef KIM_MODEL_H_
37 #define KIM_MODEL_H_
38 
39 #ifndef KIM_FUNC_H_
40 #include "KIM_func.h"
41 #endif
42 
43 /* Forward declarations */
44 #ifndef KIM_LOG_VERBOSITY_DEFINED_
45 #define KIM_LOG_VERBOSITY_DEFINED_
47 #endif
48 
49 #ifndef KIM_SPECIES_NAME_DEFINED_
50 #define KIM_SPECIES_NAME_DEFINED_
52 #endif
53 
54 #ifndef KIM_LANGUAGE_NAME_DEFINED_
55 #define KIM_LANGUAGE_NAME_DEFINED_
57 #endif
58 
59 #ifndef KIM_NUMBERING_DEFINED_
60 #define KIM_NUMBERING_DEFINED_
62 #endif
63 
64 #ifndef KIM_LENGTH_UNIT_DEFINED_
65 #define KIM_LENGTH_UNIT_DEFINED_
67 #endif
68 
69 #ifndef KIM_DATA_TYPE_DEFINED_
70 #define KIM_DATA_TYPE_DEFINED_
71 typedef struct KIM_DataType KIM_DataType;
72 #endif
73 
74 #ifndef KIM_ENERGY_UNIT_DEFINED_
75 #define KIM_ENERGY_UNIT_DEFINED_
77 #endif
78 
79 #ifndef KIM_CHARGE_UNIT_DEFINED_
80 #define KIM_CHARGE_UNIT_DEFINED_
82 #endif
83 
84 #ifndef KIM_TEMPERATURE_UNIT_DEFINED_
85 #define KIM_TEMPERATURE_UNIT_DEFINED_
87 #endif
88 
89 #ifndef KIM_TIME_UNIT_DEFINED_
90 #define KIM_TIME_UNIT_DEFINED_
91 typedef struct KIM_TimeUnit KIM_TimeUnit;
92 #endif
93 
94 #ifndef KIM_ARGUMENT_NAME_DEFINED_
95 #define KIM_ARGUMENT_NAME_DEFINED_
97 #endif
98 
99 #ifndef KIM_CALLBACK_NAME_DEFINED_
100 #define KIM_CALLBACK_NAME_DEFINED_
102 #endif
103 
104 #ifndef KIM_SUPPORT_STATUS_DEFINED_
105 #define KIM_SUPPORT_STATUS_DEFINED_
107 #endif
108 
109 
110 struct KIM_Model;
111 
112 #ifndef KIM_MODEL_DEFINED_
113 #define KIM_MODEL_DEFINED_
114 typedef struct KIM_Model KIM_Model;
115 #endif
116 
117 int KIM_Model_Create(KIM_Numbering const numbering,
118  KIM_LengthUnit const requestedLengthUnit,
119  KIM_EnergyUnit const requestedEnergyUnit,
120  KIM_ChargeUnit const requestedChargeUnit,
121  KIM_TemperatureUnit const requestedTemperatureUnit,
122  KIM_TimeUnit const requestedTimeUnit,
123  char const * const modelName,
124  int * const requestedUnitsAccepted,
125  KIM_Model ** const model);
126 void KIM_Model_Destroy(KIM_Model ** const model);
127 
128 void KIM_Model_GetInfluenceDistance(KIM_Model const * const model,
129  double * const influenceDistance);
130 
131 void KIM_Model_GetNeighborListCutoffsPointer(KIM_Model const * const model,
132  int * const numberOfCutoffs,
133  double const ** const cutoffs);
134 
135 int KIM_Model_GetArgumentSupportStatus(KIM_Model const * const model,
136  KIM_ArgumentName const argumentName,
137  KIM_SupportStatus * const supportStatus);
138 int KIM_Model_GetCallbackSupportStatus(KIM_Model const * const model,
139  KIM_CallbackName const callbackName,
140  KIM_SupportStatus * const supportStatus);
141 
142 void KIM_Model_GetUnits(KIM_Model const * const model,
143  KIM_LengthUnit * const lengthUnit,
144  KIM_EnergyUnit * const energyUnit,
145  KIM_ChargeUnit * const chargeUnit,
146  KIM_TemperatureUnit * const temperatureUnit,
147  KIM_TimeUnit * const timeUnit);
148 
149 
151  KIM_ArgumentName const argumentName,
152  int const * const ptr);
153 
155  KIM_ArgumentName const argumentName,
156  double const * const ptr);
157 int KIM_Model_SetCallbackPointer(KIM_Model * const model,
158  KIM_CallbackName const callbackName,
159  KIM_LanguageName const languageName,
160  func * const fptr,
161  void const * const dataObject);
162 
163 int KIM_Model_Compute(KIM_Model const * const model);
165  KIM_Model * const model);
166 
167 int KIM_Model_GetSpeciesSupportAndCode(KIM_Model const * const model,
168  KIM_SpeciesName const speciesName,
169  int * const speciesIsSupported,
170  int * const code);
171 
172 void KIM_Model_GetNumberOfParameters(KIM_Model const * const model,
173  int * const numberOfParameters);
175  KIM_Model const * const model, int const parameterIndex,
176  KIM_DataType * const dataType, int * const extent,
177  char const ** const description);
178 int KIM_Model_GetParameterInteger(KIM_Model const * const model,
179  int const parameterIndex,
180  int const arrayIndex,
181  int * const parameterValue);
182 int KIM_Model_GetParameterDouble(KIM_Model const * const model,
183  int const parameterIndex,
184  int const arrayIndex,
185  double * const parameterValue);
186 int KIM_Model_SetParameterInteger(KIM_Model * const model,
187  int const parameterIndex,
188  int const arrayIndex,
189  int const parameterValue);
190 int KIM_Model_SetParameterDouble(KIM_Model * const model,
191  int const parameterIndex,
192  int const arrayIndex,
193  double const parameterValue);
194 
196  void * const ptr);
197 void KIM_Model_GetSimulatorBufferPointer(KIM_Model const * const model,
198  void ** const ptr);
199 
200 char const * const KIM_Model_String(KIM_Model const * const model);
201 
202 void KIM_Model_SetLogID(KIM_Model * const model, char const * const logID);
203 void KIM_Model_PushLogVerbosity(KIM_Model * const model,
204  KIM_LogVerbosity const logVerbosity);
205 void KIM_Model_PopLogVerbosity(KIM_Model * const model);
206 
207 #endif /* KIM_MODEL_H_ */
void KIM_Model_GetInfluenceDistance(KIM_Model const *const model, double *const influenceDistance)
int KIM_Model_SetArgumentPointerDouble(KIM_Model *const model, KIM_ArgumentName const argumentName, double const *const ptr)
int KIM_Model_GetArgumentSupportStatus(KIM_Model const *const model, KIM_ArgumentName const argumentName, KIM_SupportStatus *const supportStatus)
int KIM_Model_SetCallbackPointer(KIM_Model *const model, KIM_CallbackName const callbackName, KIM_LanguageName const languageName, func *const fptr, void const *const dataObject)
void KIM_Model_GetUnits(KIM_Model const *const model, KIM_LengthUnit *const lengthUnit, KIM_EnergyUnit *const energyUnit, KIM_ChargeUnit *const chargeUnit, KIM_TemperatureUnit *const temperatureUnit, KIM_TimeUnit *const timeUnit)
void KIM_Model_GetNeighborListCutoffsPointer(KIM_Model const *const model, int *const numberOfCutoffs, double const **const cutoffs)
void KIM_Model_Destroy(KIM_Model **const model)
void KIM_Model_PushLogVerbosity(KIM_Model *const model, KIM_LogVerbosity const logVerbosity)
void KIM_Model_PopLogVerbosity(KIM_Model *const model)
int KIM_Model_GetSpeciesSupportAndCode(KIM_Model const *const model, KIM_SpeciesName const speciesName, int *const speciesIsSupported, int *const code)
int KIM_Model_GetParameterDataTypeExtentAndDescription(KIM_Model const *const model, int const parameterIndex, KIM_DataType *const dataType, int *const extent, char const **const description)
int KIM_Model_SetParameterDouble(KIM_Model *const model, int const parameterIndex, int const arrayIndex, double const parameterValue)
void KIM_Model_SetSimulatorBufferPointer(KIM_Model *const model, void *const ptr)
int KIM_Model_SetParameterInteger(KIM_Model *const model, int const parameterIndex, int const arrayIndex, int const parameterValue)
void() func()
Definition: KIM_func.h:39
int KIM_Model_GetParameterDouble(KIM_Model const *const model, int const parameterIndex, int const arrayIndex, double *const parameterValue)
char const *const KIM_Model_String(KIM_Model const *const model)
int KIM_Model_ClearInfluenceDistanceAndCutoffsThenRefreshModel(KIM_Model *const model)
int KIM_Model_Create(KIM_Numbering const numbering, KIM_LengthUnit const requestedLengthUnit, KIM_EnergyUnit const requestedEnergyUnit, KIM_ChargeUnit const requestedChargeUnit, KIM_TemperatureUnit const requestedTemperatureUnit, KIM_TimeUnit const requestedTimeUnit, char const *const modelName, int *const requestedUnitsAccepted, KIM_Model **const model)
void KIM_Model_GetNumberOfParameters(KIM_Model const *const model, int *const numberOfParameters)
int KIM_Model_Compute(KIM_Model const *const model)
int KIM_Model_GetParameterInteger(KIM_Model const *const model, int const parameterIndex, int const arrayIndex, int *const parameterValue)
void KIM_Model_GetSimulatorBufferPointer(KIM_Model const *const model, void **const ptr)
void KIM_Model_SetLogID(KIM_Model *const model, char const *const logID)
struct KIM_Model KIM_Model
Definition: KIM_Model.h:114
int KIM_Model_SetArgumentPointerInteger(KIM_Model *const model, KIM_ArgumentName const argumentName, int const *const ptr)
int KIM_Model_GetCallbackSupportStatus(KIM_Model const *const model, KIM_CallbackName const callbackName, KIM_SupportStatus *const supportStatus)