kim-api  2.3.1-git+v2.3.0-git-2-g378406f9.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 // 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.git repository.
28 //
29 
30 
31 #ifndef KIM_FUNCTION_TYPES_HPP_
32 #define KIM_FUNCTION_TYPES_HPP_
33 
34 #include <string>
35 
36 namespace KIM
37 {
38 // Forward declarations
39 class LengthUnit;
40 class EnergyUnit;
41 class ChargeUnit;
42 class TemperatureUnit;
43 class TimeUnit;
44 class ModelCreate;
45 class ModelDriverCreate;
46 class ModelCompute;
47 class ModelExtension;
48 class ModelComputeArgumentsCreate;
49 class ModelComputeArguments;
50 class ModelRefresh;
51 class ModelWriteParameterizedModel;
52 class ModelComputeArgumentsDestroy;
53 class ModelDestroy;
54 
60 typedef void(Function)(void); // Generic function pointer
61 
67 typedef int ModelCreateFunction(ModelCreate * const modelCreate,
68  LengthUnit const requestedLengthUnit,
69  EnergyUnit const requestedEnergyUnit,
70  ChargeUnit const requestedChargeUnit,
71  TemperatureUnit const requestedTemperatureUnit,
72  TimeUnit const requestedTimeUnit);
73 
79 typedef int
80 ModelDriverCreateFunction(ModelDriverCreate * const modelDriverCreate,
81  LengthUnit const requestedLengthUnit,
82  EnergyUnit const requestedEnergyUnit,
83  ChargeUnit const requestedChargeUnit,
84  TemperatureUnit const requestedTemperatureUnit,
85  TimeUnit const requestedTimeUnit);
86 
95  ModelCompute const * const modelCompute,
96  ModelComputeArgumentsCreate * const modelComputeArgumentsCreate);
97 
104  ModelCompute const * const modelCompute,
105  ModelComputeArguments const * const modelComputeArgumentsCreate);
106 
113 typedef int GetNeighborListFunction(void * const dataObject,
114  int const numberOfNeighborLists,
115  double const * const cutoffs,
116  int const neighborListIndex,
117  int const particleNumber,
118  int * const numberOfNeighbors,
119  int const ** const neighborsOfParticle);
120 
128 typedef int ProcessDEDrTermFunction(void * const dataObject,
129  double const de,
130  double const r,
131  double const * const dx,
132  int const i,
133  int const j);
134 
143 typedef int ProcessD2EDr2TermFunction(void * const dataObject,
144  double const de,
145  double const * const r,
146  double const * const dx,
147  int const * const i,
148  int const * const j);
149 
155 typedef int ModelExtensionFunction(ModelExtension * const modelExtension,
156  void * const extensionStructure);
157 
164 typedef int ModelRefreshFunction(ModelRefresh * const modelRefresh);
165 
173  ModelWriteParameterizedModel const * const modelWriteParameterizedModel);
174 
183  ModelCompute const * const modelCompute,
184  ModelComputeArgumentsDestroy * const modelComputeArgumentsDestroy);
185 
191 typedef int ModelDestroyFunction(ModelDestroy * const modelDestroy);
192 
199 typedef int LogPrintFunction(std::string const & entryString);
200 } // namespace KIM
201 
202 #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.