kim-api  2.1.4-git+v2.1.3-git-1-g7847914a.GNU
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
KIM_ModelComputeArguments.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_COMPUTE_ARGUMENTS_HPP_
35 #define KIM_MODEL_COMPUTE_ARGUMENTS_HPP_
36 
37 #include <sstream>
38 #include <string>
39 
40 namespace KIM
41 {
42 // Forward declarations
43 class LogVerbosity;
44 class ComputeArgumentName;
45 class ComputeCallbackName;
46 class ModelComputeArgumentsImplementation;
47 
48 
57 {
58  public:
74 
83  int GetNeighborList(int const neighborListIndex,
84  int const particleNumber,
85  int * const numberOfNeighbors,
86  int const ** const neighborsOfParticle) const;
87 
115  int ProcessDEDrTerm(double const de,
116  double const r,
117  double const * const dx,
118  int const i,
119  int const j) const;
120 
145  int ProcessD2EDr2Term(double const de,
146  double const * const r,
147  double const * const dx,
148  int const * const i,
149  int const * const j) const;
150 
165  int GetArgumentPointer(ComputeArgumentName const computeArgumentName,
166  int const ** const ptr) const;
167 
169  int GetArgumentPointer(ComputeArgumentName const computeArgumentName,
170  int ** const ptr) const;
171 
173  int GetArgumentPointer(ComputeArgumentName const computeArgumentName,
174  double const ** const ptr) const;
175 
177  int GetArgumentPointer(ComputeArgumentName const computeArgumentName,
178  double ** const ptr) const;
179 
197  int IsCallbackPresent(ComputeCallbackName const computeCallbackName,
198  int * const present) const;
199 
212  void SetModelBufferPointer(void * const ptr);
213 
229  void GetModelBufferPointer(void ** const ptr) const;
230 
246  void LogEntry(LogVerbosity const logVerbosity,
247  std::string const & message,
248  int const lineNumber,
249  std::string const & fileName) const;
250 
252  void LogEntry(LogVerbosity const logVerbosity,
253  std::stringstream const & message,
254  int const lineNumber,
255  std::string const & fileName) const;
256 
268  std::string const & ToString() const;
269 
270  private:
271  // do not allow copy constructor or operator=
273  void operator=(ModelComputeArguments const &);
274 
277 
278  ModelComputeArgumentsImplementation * pimpl;
279 }; // class ModelComputeArguments
280 } // namespace KIM
281 
282 #endif // KIM_MODEL_COMPUTE_ARGUMENTS_HPP_
int ProcessDEDrTerm(double const de, double const r, double const *const dx, int const i, int const j) const
Call the Simulator&#39;s COMPUTE_CALLBACK_NAME::ProcessDEDrTerm routine.
int ProcessD2EDr2Term(double const de, double const *const r, double const *const dx, int const *const i, int const *const j) const
Call the Simulator&#39;s COMPUTE_CALLBACK_NAME::ProcessD2EDr2Term routine.
An Extensible Enumeration for the ComputeCallbackName&#39;s supported by the KIM API. ...
int GetArgumentPointer(ComputeArgumentName const computeArgumentName, int const **const ptr) const
Get the data pointer for a ComputeArgumentName.
std::string const & ToString() const
Get a string representing the internal state of the ComputeArguments object.
void SetModelBufferPointer(void *const ptr)
Set the Model&#39;s buffer pointer within the ComputeArguments object.
An Extensible Enumeration for the LogVerbosity&#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.
Provides the interface to a KIM API ComputeArguments object for use by models within their MODEL_ROUT...
An Extensible Enumeration for the ComputeArgumentName&#39;s supported by the KIM API. ...
int GetNeighborList(int const neighborListIndex, int const particleNumber, int *const numberOfNeighbors, int const **const neighborsOfParticle) const
Get the neighbor list for a particle of interest corresponding to a particular neighbor list cutoff d...
void GetModelBufferPointer(void **const ptr) const
Get the Model&#39;s buffer pointer within the ComputeArguments object.
int IsCallbackPresent(ComputeCallbackName const computeCallbackName, int *const present) const
Determine if the Simulator has provided a non-NULL function pointer for a ComputeCallbackName of inte...