kim-api 2.3.0+AppleClang.AppleClang.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.3.0 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;
41class ComputeArgumentName;
42class ComputeCallbackName;
43class ModelComputeArgumentsImplementation;
44
45
54{
55 public:
71
80 int GetNeighborList(int const neighborListIndex,
81 int const particleNumber,
82 int * const numberOfNeighbors,
83 int const ** const neighborsOfParticle) const;
84
112 int ProcessDEDrTerm(double const de,
113 double const r,
114 double const * const dx,
115 int const i,
116 int const j) const;
117
142 int ProcessD2EDr2Term(double const de,
143 double const * const r,
144 double const * const dx,
145 int const * const i,
146 int const * const j) const;
147
162 int GetArgumentPointer(ComputeArgumentName const computeArgumentName,
163 int const ** const ptr) const;
164
166 int GetArgumentPointer(ComputeArgumentName const computeArgumentName,
167 int ** const ptr) const;
168
170 int GetArgumentPointer(ComputeArgumentName const computeArgumentName,
171 double const ** const ptr) const;
172
174 int GetArgumentPointer(ComputeArgumentName const computeArgumentName,
175 double ** const ptr) const;
176
194 int IsCallbackPresent(ComputeCallbackName const computeCallbackName,
195 int * const present) const;
196
209 void SetModelBufferPointer(void * const ptr);
210
226 void GetModelBufferPointer(void ** const ptr) const;
227
243 void LogEntry(LogVerbosity const logVerbosity,
244 std::string const & message,
245 int const lineNumber,
246 std::string const & fileName) const;
247
249 void LogEntry(LogVerbosity const logVerbosity,
250 std::stringstream const & message,
251 int const lineNumber,
252 std::string const & fileName) const;
253
265 std::string const & ToString() const;
266
267 private:
268 // do not allow copy constructor or operator=
270 void operator=(ModelComputeArguments const &);
271
274
275 ModelComputeArgumentsImplementation * pimpl;
276}; // class ModelComputeArguments
277} // namespace KIM
278
279#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.
Provides the interface to a KIM API ComputeArguments object for use by models within their MODEL_ROUT...
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...