kim-api  2.1.2+v2.1.2.GNU
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
KIM_ModelCreate.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-2.1.2 package.
31 //
32 
33 
34 #ifndef KIM_MODEL_CREATE_HPP_
35 #define KIM_MODEL_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 ModelCreateImplementation;
58 
59 
68 {
69  public:
83  int SetModelNumbering(Numbering const numbering);
84 
103  void SetInfluenceDistancePointer(double const * const influenceDistance);
104 
130  int const numberOfNeighborLists,
131  double const * const cutoffs,
132  int const * const modelWillNotRequestNeighborsOfNoncontributingParticles);
133 
138 
156  int SetRoutinePointer(ModelRoutineName const modelRoutineName,
157  LanguageName const languageName,
158  int const required,
159  Function * const fptr);
160 
179  int SetSpeciesCode(SpeciesName const speciesName, int const code);
180 
210  int SetParameterPointer(int const extent,
211  int * const ptr,
212  std::string const & name,
213  std::string const & description);
214 
216  int SetParameterPointer(int const extent,
217  double * const ptr,
218  std::string const & name,
219  std::string const & description);
220 
235  void SetModelBufferPointer(void * const ptr);
236 
261  int SetUnits(LengthUnit const lengthUnit,
262  EnergyUnit const energyUnit,
263  ChargeUnit const chargeUnit,
264  TemperatureUnit const temperatureUnit,
265  TimeUnit const timeUnit);
266 
297  static int ConvertUnit(LengthUnit const fromLengthUnit,
298  EnergyUnit const fromEnergyUnit,
299  ChargeUnit const fromChargeUnit,
300  TemperatureUnit const fromTemperatureUnit,
301  TimeUnit const fromTimeUnit,
302  LengthUnit const toLengthUnit,
303  EnergyUnit const toEnergyUnit,
304  ChargeUnit const toChargeUnit,
305  TemperatureUnit const toTemperatureUnit,
306  TimeUnit const toTimeUnit,
307  double const lengthExponent,
308  double const energyExponent,
309  double const chargeExponent,
310  double const temperatureExponent,
311  double const timeExponent,
312  double * const conversionFactor);
313 
329  void LogEntry(LogVerbosity const logVerbosity,
330  std::string const & message,
331  int const lineNumber,
332  std::string const & fileName) const;
333 
335  void LogEntry(LogVerbosity const logVerbosity,
336  std::stringstream const & message,
337  int const lineNumber,
338  std::string const & fileName) const;
339 
350  std::string const & ToString() const;
351 
352  private:
353  // do not allow copy constructor or operator=
354  ModelCreate(ModelCreate const &);
355  void operator=(ModelCreate const &);
356 
357  ModelCreate();
358  ~ModelCreate();
359 
360  ModelCreateImplementation * pimpl;
361 }; // class ModelCreate
362 } // namespace KIM
363 
364 #endif // KIM_MODEL_CREATE_HPP_
std::string const & ToString() const
Get a string representing the internal state of the Model object.
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.
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.
int SetSpeciesCode(SpeciesName const speciesName, int const code)
Set integer code for supported SpeciesName.
int SetModelNumbering(Numbering const numbering)
Set the Model&#39;s particle Numbering.
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.
void SetInfluenceDistancePointer(double const *const influenceDistance)
Set the Model&#39;s influence distance data pointer.
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() Function(void)
Generic function type.
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.
void SetNeighborListPointers(int const numberOfNeighborLists, double const *const cutoffs, int const *const modelWillNotRequestNeighborsOfNoncontributingParticles)
Set the Model&#39;s neighbor list data pointers.
An Extensible Enumeration for the EnergyUnit&#39;s supported by the KIM API.
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.
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::C...
int SetRoutinePointer(ModelRoutineName const modelRoutineName, LanguageName const languageName, int const required, Function *const fptr)
Set the function pointer for the ModelRoutineName of interest.
An Extensible Enumeration for the SpeciesName&#39;s supported by the KIM API.
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 ...