kim-api  2.2.1+v2.2.1.GNU.GNU.
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
KIM_FunctionTypes.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--2020, 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-2.2.1 package.
31 //
32 
33 
34 #ifndef KIM_FUNCTION_TYPES_HPP_
35 #define KIM_FUNCTION_TYPES_HPP_
36 
37 #include <string>
38 
39 namespace KIM
40 {
41 // Forward declarations
42 class LengthUnit;
43 class EnergyUnit;
44 class ChargeUnit;
45 class TemperatureUnit;
46 class TimeUnit;
47 class ModelCreate;
48 class ModelDriverCreate;
49 class ModelCompute;
50 class ModelExtension;
51 class ModelComputeArgumentsCreate;
52 class ModelComputeArguments;
53 class ModelRefresh;
54 class ModelWriteParameterizedModel;
55 class ModelComputeArgumentsDestroy;
56 class ModelDestroy;
57 
63 typedef void(Function)(void); // Generic function pointer
64 
70 typedef int ModelCreateFunction(ModelCreate * const modelCreate,
71  LengthUnit const requestedLengthUnit,
72  EnergyUnit const requestedEnergyUnit,
73  ChargeUnit const requestedChargeUnit,
74  TemperatureUnit const requestedTemperatureUnit,
75  TimeUnit const requestedTimeUnit);
76 
82 typedef int
83 ModelDriverCreateFunction(ModelDriverCreate * const modelDriverCreate,
84  LengthUnit const requestedLengthUnit,
85  EnergyUnit const requestedEnergyUnit,
86  ChargeUnit const requestedChargeUnit,
87  TemperatureUnit const requestedTemperatureUnit,
88  TimeUnit const requestedTimeUnit);
89 
98  ModelCompute const * const modelCompute,
99  ModelComputeArgumentsCreate * const modelComputeArgumentsCreate);
100 
107  ModelCompute const * const modelCompute,
108  ModelComputeArguments const * const modelComputeArgumentsCreate);
109 
116 typedef int GetNeighborListFunction(void * const dataObject,
117  int const numberOfNeighborLists,
118  double const * const cutoffs,
119  int const neighborListIndex,
120  int const particleNumber,
121  int * const numberOfNeighbors,
122  int const ** const neighborsOfParticle);
123 
131 typedef int ProcessDEDrTermFunction(void * const dataObject,
132  double const de,
133  double const r,
134  double const * const dx,
135  int const i,
136  int const j);
137 
146 typedef int ProcessD2EDr2TermFunction(void * const dataObject,
147  double const de,
148  double const * const r,
149  double const * const dx,
150  int const * const i,
151  int const * const j);
152 
158 typedef int ModelExtensionFunction(ModelExtension * const modelExtension,
159  void * const extensionStructure);
160 
167 typedef int ModelRefreshFunction(ModelRefresh * const modelRefresh);
168 
176  ModelWriteParameterizedModel const * const modelWriteParameterizedModel);
177 
186  ModelCompute const * const modelCompute,
187  ModelComputeArgumentsDestroy * const modelComputeArgumentsDestroy);
188 
194 typedef int ModelDestroyFunction(ModelDestroy * const modelDestroy);
195 
202 typedef int LogPrintFunction(std::string const & entryString);
203 } // namespace KIM
204 
205 #endif // KIM_FUNCTION_TYPES_HPP_
int ModelComputeArgumentsDestroyFunction(ModelCompute const *const modelCompute, ModelComputeArgumentsDestroy *const modelComputeArgumentsDestroy)
Prototype for MODEL_ROUTINE_NAME::ComputeArgumentsDestroy routine.
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::R...
An Extensible Enumeration for the TemperatureUnit&#39;s supported by the KIM API.
An Extensible Enumeration for the TimeUnit&#39;s supported by the KIM API.
int ModelDestroyFunction(ModelDestroy *const modelDestroy)
Prototype for MODEL_ROUTINE_NAME::Destroy routine.
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::W...
int ModelComputeFunction(ModelCompute const *const modelCompute, ModelComputeArguments const *const modelComputeArgumentsCreate)
Prototype for MODEL_ROUTINE_NAME::Compute routine.
int 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.
An Extensible Enumeration for the LengthUnit&#39;s supported by the KIM API.
void() Function(void)
Generic function type.
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::D...
int ModelComputeArgumentsCreateFunction(ModelCompute const *const modelCompute, ModelComputeArgumentsCreate *const modelComputeArgumentsCreate)
Prototype for MODEL_ROUTINE_NAME::ComputeArgumentsCreate routine.
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::C...
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::C...
Provides the interface to a KIM API ComputeArguments object for use by models within their MODEL_ROUT...
An Extensible Enumeration for the EnergyUnit&#39;s supported by the KIM API.
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::E...
int LogPrintFunction(std::string const &entryString)
Prototype for Log PrintFunction routine.
int ModelRefreshFunction(ModelRefresh *const modelRefresh)
Prototype for MODEL_ROUTINE_NAME::Refresh routine.
Provides the interface to a KIM API ComputeArguments object for use by models within their MODEL_ROUT...
int 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.
Provides the interface to a KIM API ComputeArguments object for use by models within their MODEL_ROUT...
int 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 ModelCreateFunction(ModelCreate *const modelCreate, LengthUnit const requestedLengthUnit, EnergyUnit const requestedEnergyUnit, ChargeUnit const requestedChargeUnit, TemperatureUnit const requestedTemperatureUnit, TimeUnit const requestedTimeUnit)
Prototype for MODEL_ROUTINE_NAME::Create routine.
An Extensible Enumeration for the ChargeUnit&#39;s supported by the KIM API.
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::C...
int ModelExtensionFunction(ModelExtension *const modelExtension, void *const extensionStructure)
Prototype for MODEL_ROUTINE_NAME::Extension routine.
int ModelWriteParameterizedModelFunction(ModelWriteParameterizedModel const *const modelWriteParameterizedModel)
Prototype for MODEL_ROUTINE_NAME::WriteParameterizedModel routine.
int ModelDriverCreateFunction(ModelDriverCreate *const modelDriverCreate, LengthUnit const requestedLengthUnit, EnergyUnit const requestedEnergyUnit, ChargeUnit const requestedChargeUnit, TemperatureUnit const requestedTemperatureUnit, TimeUnit const requestedTimeUnit)
Prototype for MODEL_ROUTINE_NAME::Create routine.