kim-api 2.4.2+30a0ceab.GNU.GNU.
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
 
Loading...
Searching...
No Matches
KIM_ModelComputeArguments.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-2.4.2 package.
28//
29
30
31#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_HPP_
32#define KIM_MODEL_COMPUTE_ARGUMENTS_HPP_
33
34#include <sstream>
35#include <string>
36
37namespace KIM
38{
39// Forward declarations
40class LogVerbosity;
43class ModelComputeArgumentsImplementation;
44
45
53class ModelComputeArguments
54{
55 public:
76
85 int GetNeighborList(int const neighborListIndex,
86 int const particleNumber,
87 int * const numberOfNeighbors,
88 int const ** const neighborsOfParticle) const;
89
117 int ProcessDEDrTerm(double const de,
118 double const r,
119 double const * const dx,
120 int const i,
121 int const j) const;
122
147 int ProcessD2EDr2Term(double const de,
148 double const * const r,
149 double const * const dx,
150 int const * const i,
151 int const * const j) const;
152
167 int GetArgumentPointer(ComputeArgumentName const computeArgumentName,
168 int const ** const ptr) const;
169
171 int GetArgumentPointer(ComputeArgumentName const computeArgumentName,
172 int ** const ptr) const;
173
175 int GetArgumentPointer(ComputeArgumentName const computeArgumentName,
176 double const ** const ptr) const;
177
179 int GetArgumentPointer(ComputeArgumentName const computeArgumentName,
180 double ** const ptr) const;
181
199 int IsCallbackPresent(ComputeCallbackName const computeCallbackName,
200 int * const present) const;
201
214 void SetModelBufferPointer(void * const ptr);
215
231 void GetModelBufferPointer(void ** const ptr) const;
232
248 void LogEntry(LogVerbosity const logVerbosity,
249 std::string const & message,
250 int const lineNumber,
251 std::string const & fileName) const;
252
254 void LogEntry(LogVerbosity const logVerbosity,
255 std::stringstream const & message,
256 int const lineNumber,
257 std::string const & fileName) const;
258
270 std::string const & ToString() const;
271
272 private:
273 // do not allow copy constructor or operator=
274 ModelComputeArguments(ModelComputeArguments const &);
275 void operator=(ModelComputeArguments const &);
276
277 ModelComputeArguments();
278 ~ModelComputeArguments();
279
280 ModelComputeArgumentsImplementation * pimpl;
281}; // class ModelComputeArguments
282} // namespace KIM
283
284#endif // KIM_MODEL_COMPUTE_ARGUMENTS_HPP_
An Extensible Enumeration for the ComputeArgumentName's supported by the KIM API.
An Extensible Enumeration for the ComputeCallbackName's supported by the KIM API.
An Extensible Enumeration for the LogVerbosity's supported by the KIM API.
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's COMPUTE_CALLBACK_NAME::ProcessD2EDr2Term routine.
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 SetModelBufferPointer(void *const ptr)
Set the Model's buffer pointer within the ComputeArguments object.
void GetModelBufferPointer(void **const ptr) const
Get the Model's buffer pointer within the ComputeArguments object.
int ProcessDEDrTerm(double const de, double const r, double const *const dx, int const i, int const j) const
Call the Simulator's COMPUTE_CALLBACK_NAME::ProcessDEDrTerm routine.
std::string const & ToString() const
Get a string representing the internal state of the ComputeArguments object.
int GetArgumentPointer(ComputeArgumentName const computeArgumentName, int const **const ptr) const
Get the data pointer for a ComputeArgumentName.
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.
int GetArgumentPointer(ComputeArgumentName const computeArgumentName, double **const ptr) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
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...
int GetArgumentPointer(ComputeArgumentName const computeArgumentName, int **const ptr) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void LogEntry(LogVerbosity const logVerbosity, std::stringstream const &message, int const lineNumber, std::string const &fileName) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int GetArgumentPointer(ComputeArgumentName const computeArgumentName, double const **const ptr) const
This is an overloaded member function, provided for convenience. It differs from the above function o...