kim-api  2.3.0+v2.3.0.GNU.GNU.
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
KIM_FunctionTypes.h
Go to the documentation of this file.
1 /* */
2 /* KIM-API: An API for interatomic models */
3 /* Copyright (c) 2013--2022, Regents of the University of Minnesota. */
4 /* All rights reserved. */
5 /* */
6 /* Contributors: */
7 /* Ryan S. Elliott */
8 /* */
9 /* SPDX-License-Identifier: LGPL-2.1-or-later */
10 /* */
11 /* This library is free software; you can redistribute it and/or */
12 /* modify it under the terms of the GNU Lesser General Public */
13 /* License as published by the Free Software Foundation; either */
14 /* version 2.1 of the License, or (at your option) any later version. */
15 /* */
16 /* This library is distributed in the hope that it will be useful, */
17 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
18 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */
19 /* Lesser General Public License for more details. */
20 /* */
21 /* You should have received a copy of the GNU Lesser General Public License */
22 /* along with this library; if not, write to the Free Software Foundation, */
23 /* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
24 /* */
25 
26 /* */
27 /* Release: This file is part of the kim-api-2.3.0 package. */
28 /* */
29 
30 
31 #ifndef KIM_FUNCTION_TYPES_H_
32 #define KIM_FUNCTION_TYPES_H_
33 
34 /* Forward declarations */
35 #ifndef KIM_LENGTH_UNIT_DEFINED_
36 #define KIM_LENGTH_UNIT_DEFINED_
37 
43 #endif
44 
45 #ifndef KIM_ENERGY_UNIT_DEFINED_
46 #define KIM_ENERGY_UNIT_DEFINED_
47 
53 #endif
54 
55 #ifndef KIM_CHARGE_UNIT_DEFINED_
56 #define KIM_CHARGE_UNIT_DEFINED_
57 
63 #endif
64 
65 #ifndef KIM_TEMPERATURE_UNIT_DEFINED_
66 #define KIM_TEMPERATURE_UNIT_DEFINED_
67 
73 #endif
74 
75 #ifndef KIM_TIME_UNIT_DEFINED_
76 #define KIM_TIME_UNIT_DEFINED_
77 
82 typedef struct KIM_TimeUnit KIM_TimeUnit;
83 #endif
84 
85 #ifndef KIM_MODEL_CREATE_DEFINED_
86 #define KIM_MODEL_CREATE_DEFINED_
87 
93 #endif
94 
95 #ifndef KIM_MODEL_DRIVER_CREATE_DEFINED_
96 #define KIM_MODEL_DRIVER_CREATE_DEFINED_
97 
103 #endif
104 
105 #ifndef KIM_MODEL_COMPUTE_DEFINED_
106 #define KIM_MODEL_COMPUTE_DEFINED_
107 
113 #endif
114 
115 #ifndef KIM_MODEL_EXTENSION_DEFINED_
116 #define KIM_MODEL_EXTENSION_DEFINED_
117 
123 #endif
124 
125 #ifndef KIM_MODEL_COMPUTE_ARGUMENTS_CREATE_DEFINED_
126 #define KIM_MODEL_COMPUTE_ARGUMENTS_CREATE_DEFINED_
127 
133 #endif
134 
135 #ifndef KIM_MODEL_COMPUTE_ARGUMENTS_DEFINED_
136 #define KIM_MODEL_COMPUTE_ARGUMENTS_DEFINED_
137 
143 #endif
144 
145 #ifndef KIM_MODEL_REFRESH_DEFINED_
146 #define KIM_MODEL_REFRESH_DEFINED_
147 
153 #endif
154 
155 #ifndef KIM_MODEL_WRITE_PARAMETERIZED_MODEL_DEFINED_
156 #define KIM_MODEL_WRITE_PARAMETERIZED_MODEL_DEFINED_
157 
164 #endif
165 
166 #ifndef KIM_MODEL_COMPUTE_ARGUMENTS_DESTROY_DEFINED_
167 #define KIM_MODEL_COMPUTE_ARGUMENTS_DESTROY_DEFINED_
168 
175 #endif
176 
177 #ifndef KIM_MODEL_DESTROY_DEFINED_
178 #define KIM_MODEL_DESTROY_DEFINED_
179 
185 #endif
186 
187 
195 typedef void(KIM_Function)(void); /* Generic function pointer */
196 
204 typedef int
206  KIM_LengthUnit const requestedLengthUnit,
207  KIM_EnergyUnit const requestedEnergyUnit,
208  KIM_ChargeUnit const requestedChargeUnit,
209  KIM_TemperatureUnit const requestedTemperatureUnit,
210  KIM_TimeUnit const requestedTimeUnit);
211 
220  KIM_ModelDriverCreate * const modelDriverCreate,
221  KIM_LengthUnit const requestedLengthUnit,
222  KIM_EnergyUnit const requestedEnergyUnit,
223  KIM_ChargeUnit const requestedChargeUnit,
224  KIM_TemperatureUnit const requestedTemperatureUnit,
225  KIM_TimeUnit const requestedTimeUnit);
226 
236  KIM_ModelCompute const * const modelCompute,
237  KIM_ModelComputeArgumentsCreate * const modelComputeArgumentsCreate);
238 
247  KIM_ModelCompute const * const modelCompute,
248  KIM_ModelComputeArguments const * const modelComputeArguments);
249 
258 typedef int KIM_GetNeighborListFunction(void * const dataObject,
259  int const numberOfNeighborLists,
260  double const * const cutoffs,
261  int const neighborListIndex,
262  int const particleNumber,
263  int * const numberOfNeighbors,
264  int const ** const neighborsOfParticle);
265 
274 typedef int KIM_ProcessDEDrTermFunction(void * const dataObject,
275  double const de,
276  double const r,
277  double const * const dx,
278  int const i,
279  int const j);
280 
290 typedef int KIM_ProcessD2EDr2TermFunction(void * const dataObject,
291  double const de,
292  double const * const r,
293  double const * const dx,
294  int const * const i,
295  int const * const j);
296 
304 typedef int
306  void * const extensionStructure);
307 
316 typedef int KIM_ModelRefreshFunction(KIM_ModelRefresh * const modelRefresh);
317 
328  modelWriteParameterizedModel);
329 
339  KIM_ModelCompute const * const modelCompute,
340  KIM_ModelComputeArgumentsDestroy * const modelComputeArgumentsDestroy);
341 
349 typedef int KIM_ModelDestroyFunction(KIM_ModelDestroy * const modelDestroy);
350 
359 typedef int KIM_LogPrintFunction(char const * const entryString);
360 
361 #endif /* KIM_FUNCTION_TYPES_H_ */
int KIM_ModelComputeArgumentsCreateFunction(KIM_ModelCompute const *const modelCompute, KIM_ModelComputeArgumentsCreate *const modelComputeArgumentsCreate)
Prototype for MODEL_ROUTINE_NAME::ComputeArgumentsCreate routine.
int KIM_ProcessD2EDr2TermFunction(void *const dataObject, double const de, double const *const r, double const *const dx, int const *const i, int const *const j)
Prototype for COMPUTE_CALLBACK_NAME::ProcessD2EDr2Term routine.
void() KIM_Function(void)
Generic function type.
int KIM_ModelDriverCreateFunction(KIM_ModelDriverCreate *const modelDriverCreate, KIM_LengthUnit const requestedLengthUnit, KIM_EnergyUnit const requestedEnergyUnit, KIM_ChargeUnit const requestedChargeUnit, KIM_TemperatureUnit const requestedTemperatureUnit, KIM_TimeUnit const requestedTimeUnit)
Prototype for MODEL_ROUTINE_NAME::Create routine.
An Extensible Enumeration for the EnergyUnit's supported by the KIM API.
struct KIM_ModelExtension KIM_ModelExtension
Forward declaration.
int KIM_ModelExtensionFunction(KIM_ModelExtension *const modelExtension, void *const extensionStructure)
Prototype for MODEL_ROUTINE_NAME::Extension routine.
int KIM_ModelCreateFunction(KIM_ModelCreate *const modelCreate, KIM_LengthUnit const requestedLengthUnit, KIM_EnergyUnit const requestedEnergyUnit, KIM_ChargeUnit const requestedChargeUnit, KIM_TemperatureUnit const requestedTemperatureUnit, KIM_TimeUnit const requestedTimeUnit)
Prototype for MODEL_ROUTINE_NAME::Create routine.
An Extensible Enumeration for the LengthUnit's supported by the KIM API.
struct KIM_ModelCompute KIM_ModelCompute
Forward declaration.
An Extensible Enumeration for the ChargeUnit's supported by the KIM API.
struct KIM_ModelComputeArgumentsCreate KIM_ModelComputeArgumentsCreate
Forward declaration.
struct KIM_ModelDestroy KIM_ModelDestroy
Forward declaration.
int KIM_GetNeighborListFunction(void *const dataObject, int const numberOfNeighborLists, double const *const cutoffs, int const neighborListIndex, int const particleNumber, int *const numberOfNeighbors, int const **const neighborsOfParticle)
Prototype for COMPUTE_CALLBACK_NAME::GetNeighborList routine.
int KIM_ModelComputeArgumentsDestroyFunction(KIM_ModelCompute const *const modelCompute, KIM_ModelComputeArgumentsDestroy *const modelComputeArgumentsDestroy)
Prototype for MODEL_ROUTINE_NAME::ComputeArgumentsDestroy routine.
struct KIM_ModelCreate KIM_ModelCreate
Forward declaration.
int KIM_ModelWriteParameterizedModelFunction(KIM_ModelWriteParameterizedModel const *const modelWriteParameterizedModel)
Prototype for MODEL_ROUTINE_NAME::WriteParameterizedModel routine.
An Extensible Enumeration for the TimeUnit's supported by the KIM API.
Definition: KIM_TimeUnit.h:41
int KIM_LogPrintFunction(char const *const entryString)
Prototype for Log PrintFunction routine.
struct KIM_ModelComputeArgumentsDestroy KIM_ModelComputeArgumentsDestroy
Forward declaration.
struct KIM_ModelRefresh KIM_ModelRefresh
Forward declaration.
int KIM_ProcessDEDrTermFunction(void *const dataObject, double const de, double const r, double const *const dx, int const i, int const j)
Prototype for COMPUTE_CALLBACK_NAME::ProcessDEDrTerm routine.
int KIM_ModelComputeFunction(KIM_ModelCompute const *const modelCompute, KIM_ModelComputeArguments const *const modelComputeArguments)
Prototype for MODEL_ROUTINE_NAME::Compute routine.
int KIM_ModelRefreshFunction(KIM_ModelRefresh *const modelRefresh)
Prototype for MODEL_ROUTINE_NAME::Refresh routine.
struct KIM_ModelWriteParameterizedModel KIM_ModelWriteParameterizedModel
Forward declaration.
int KIM_ModelDestroyFunction(KIM_ModelDestroy *const modelDestroy)
Prototype for MODEL_ROUTINE_NAME::Destroy routine.
An Extensible Enumeration for the TemperatureUnit's supported by the KIM API.
struct KIM_ModelDriverCreate KIM_ModelDriverCreate
Forward declaration.
struct KIM_ModelComputeArguments KIM_ModelComputeArguments
Forward declaration.