kim-api  2.1.4-git+v2.1.3-git-3-g4c859c7f.GNU
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
KIM_ModelDriverCreate.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--2019, 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.git repository.
31 //
32 
33 
34 #ifndef KIM_MODEL_DRIVER_CREATE_HPP_
35 #define KIM_MODEL_DRIVER_CREATE_HPP_
36 
37 #include <sstream>
38 #include <string>
39 
40 #ifndef KIM_FUNCTION_TYPES_HPP_
41 #include "KIM_FunctionTypes.hpp" // IWYU pragma: export
42 #endif
43 
44 namespace KIM
45 {
46 // Forward declarations
47 class LogVerbosity;
48 class LanguageName;
49 class Numbering;
50 class ModelRoutineName;
51 class SpeciesName;
52 class LengthUnit;
53 class EnergyUnit;
54 class ChargeUnit;
55 class TemperatureUnit;
56 class TimeUnit;
57 class ModelDriverCreateImplementation;
58 
59 
68 {
69  public:
79  void GetNumberOfParameterFiles(int * const numberOfParameterFiles) const;
80 
96  int GetParameterFileName(int const index,
97  std::string const ** const parameterFileName) const;
98 
112  int SetModelNumbering(Numbering const numbering);
113 
132  void SetInfluenceDistancePointer(double const * const influenceDistance);
133 
159  int const numberOfNeighborLists,
160  double const * const cutoffs,
161  int const * const modelWillNotRequestNeighborsOfNoncontributingParticles);
162 
167 
184  int SetRoutinePointer(ModelRoutineName const modelRoutineName,
185  LanguageName const languageName,
186  int const required,
187  Function * const fptr);
188 
207  int SetSpeciesCode(SpeciesName const speciesName, int const code);
208 
238  int SetParameterPointer(int const extent,
239  int * const ptr,
240  std::string const & name,
241  std::string const & description);
242 
244  int SetParameterPointer(int const extent,
245  double * const ptr,
246  std::string const & name,
247  std::string const & description);
248 
263  void SetModelBufferPointer(void * const ptr);
264 
288  int SetUnits(LengthUnit const lengthUnit,
289  EnergyUnit const energyUnit,
290  ChargeUnit const chargeUnit,
291  TemperatureUnit const temperatureUnit,
292  TimeUnit const timeUnit);
293 
324  static int ConvertUnit(LengthUnit const fromLengthUnit,
325  EnergyUnit const fromEnergyUnit,
326  ChargeUnit const fromChargeUnit,
327  TemperatureUnit const fromTemperatureUnit,
328  TimeUnit const fromTimeUnit,
329  LengthUnit const toLengthUnit,
330  EnergyUnit const toEnergyUnit,
331  ChargeUnit const toChargeUnit,
332  TemperatureUnit const toTemperatureUnit,
333  TimeUnit const toTimeUnit,
334  double const lengthExponent,
335  double const energyExponent,
336  double const chargeExponent,
337  double const temperatureExponent,
338  double const timeExponent,
339  double * const conversionFactor);
340 
356  void LogEntry(LogVerbosity const logVerbosity,
357  std::string const & message,
358  int const lineNumber,
359  std::string const & fileName) const;
360 
362  void LogEntry(LogVerbosity const logVerbosity,
363  std::stringstream const & message,
364  int const lineNumber,
365  std::string const & fileName) const;
366 
377  std::string const & ToString() const;
378 
379  private:
380  // do not allow copy constructor or operator=
382  void operator=(ModelDriverCreate const &);
383 
386 
387  ModelDriverCreateImplementation * pimpl;
388 }; // class ModelDriverCreate
389 } // namespace KIM
390 
391 #endif // KIM_MODEL_DRIVER_CREATE_HPP_
std::string const & ToString() const
Get a string representing the internal state of the Model object.
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.
An Extensible Enumeration for the ModelRoutineName&#39;s supported by the KIM API.
void GetNumberOfParameterFiles(int *const numberOfParameterFiles) const
Get the number of parameter files provided by the parameterized model.
void SetModelBufferPointer(void *const ptr)
Set the Model&#39;s buffer pointer within the Model object.
SupportStatus const required
The standard required status.
An Extensible Enumeration for the LengthUnit&#39;s supported by the KIM API.
void LogEntry(LogVerbosity const logVerbosity, std::string const &message, int const lineNumber, std::string const &fileName) const
Write a log entry into the log file.
void() Function(void)
Generic function type.
int SetModelNumbering(Numbering const numbering)
Set the Model&#39;s particle Numbering.
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::C...
An Extensible Enumeration for the LogVerbosity&#39;s supported by the KIM API.
An Extensible Enumeration for the LanguageName&#39;s supported by the KIM API.
An Extensible Enumeration for the Numbering&#39;s supported by the KIM API.
int GetParameterFileName(int const index, std::string const **const parameterFileName) const
Get a particular parameter file name.
int SetUnits(LengthUnit const lengthUnit, EnergyUnit const energyUnit, ChargeUnit const chargeUnit, TemperatureUnit const temperatureUnit, TimeUnit const timeUnit)
Set the Model&#39;s base unit values.
An Extensible Enumeration for the EnergyUnit&#39;s supported by the KIM API.
void SetNeighborListPointers(int const numberOfNeighborLists, double const *const cutoffs, int const *const modelWillNotRequestNeighborsOfNoncontributingParticles)
Set the Model&#39;s neighbor list data pointers.
int SetRoutinePointer(ModelRoutineName const modelRoutineName, LanguageName const languageName, int const required, Function *const fptr)
Set the function pointer for the ModelRoutineName of interest.
int SetParameterPointer(int const extent, int *const ptr, std::string const &name, std::string const &description)
Set the next parameter data pointer to be provided by the model.
An Extensible Enumeration for the ChargeUnit&#39;s supported by the KIM API.
int SetSpeciesCode(SpeciesName const speciesName, int const code)
Set integer code for supported SpeciesName.
An Extensible Enumeration for the SpeciesName&#39;s supported by the KIM API.
void SetInfluenceDistancePointer(double const *const influenceDistance)
Set the Model&#39;s influence distance data pointer.
static int ConvertUnit(LengthUnit const fromLengthUnit, EnergyUnit const fromEnergyUnit, ChargeUnit const fromChargeUnit, TemperatureUnit const fromTemperatureUnit, TimeUnit const fromTimeUnit, LengthUnit const toLengthUnit, EnergyUnit const toEnergyUnit, ChargeUnit const toChargeUnit, TemperatureUnit const toTemperatureUnit, TimeUnit const toTimeUnit, double const lengthExponent, double const energyExponent, double const chargeExponent, double const temperatureExponent, double const timeExponent, double *const conversionFactor)
Get the multiplicative factor to convert between a derived unit represented in two different sets of ...