kim-api
2.3.0+v2.3.0.GNU.GNU.
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
|
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::Refresh routine. More...
#include <KIM_ModelRefresh.hpp>
Public Member Functions | |
void | SetInfluenceDistancePointer (double const *const influenceDistance) |
Set the Model's influence distance data pointer. More... | |
void | SetNeighborListPointers (int const numberOfNeighborLists, double const *const cutoffs, int const *const modelWillNotRequestNeighborsOfNoncontributingParticles) |
Set the Model's neighbor list data pointers. More... | |
void | GetModelBufferPointer (void **const ptr) const |
Get the Model's buffer pointer within the Model object. More... | |
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. More... | |
void | LogEntry (LogVerbosity const logVerbosity, std::stringstream const &message, int const lineNumber, std::string const &fileName) const |
std::string const & | ToString () const |
Get a string representing the internal state of the Model object. More... | |
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::Refresh routine.
Definition at line 51 of file KIM_ModelRefresh.hpp.
void KIM::ModelRefresh::GetModelBufferPointer | ( | void **const | ptr | ) | const |
Get the Model's buffer pointer within the Model object.
The model buffer pointer may be used by the Model to associate a memory buffer with the Model object.
[out] | ptr | The model buffer data pointer. |
ptr == NULL
if the model has not previously called ModelCreate::SetModelBufferPointer or ModelDriverCreate::SetModelBufferPointer.void KIM::ModelRefresh::LogEntry | ( | LogVerbosity const | logVerbosity, |
std::string const & | message, | ||
int const | lineNumber, | ||
std::string const & | fileName | ||
) | const |
Write a log entry into the log file.
This results in a no-op if logVerbosity
is LOG_VERBOSITY::silent or if logVerbosity
is greater-than the Log object's top LogVerbosity on its stack.
[in] | logVerbosity | The LogVerbosity level for the entry. |
[in] | message | The body text of the log entry. |
[in] | lineNumber | The source code file line number. |
[in] | fileName | The source code file name. |
void KIM::ModelRefresh::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 only in what argument(s) it accepts.
void KIM::ModelRefresh::SetInfluenceDistancePointer | ( | double const *const | influenceDistance | ) |
Set the Model's influence distance data pointer.
influenceDistance
(or link to docs elsewhere?)[in] | influenceDistance | Pointer to Model's influence distance. |
void KIM::ModelRefresh::SetNeighborListPointers | ( | int const | numberOfNeighborLists, |
double const *const | cutoffs, | ||
int const *const | modelWillNotRequestNeighborsOfNoncontributingParticles | ||
) |
Set the Model's neighbor list data pointers.
[in] | numberOfNeighborLists | The number of neighbor lists required by the Model. |
[in] | cutoffs | Array of cutoff values for each of the required neighbor lists. |
[in] | modelWillNotRequestNeighborsOfNoncontributingParticles | Array of integers; true or false for each neighbor list required by the Model. |
modelWillNotRequestNeighborsOfNoncontributingParticles
data. The model must use the Model's buffer pointer to retain access to this memory location and avoid a memory leak.std::string const& KIM::ModelRefresh::ToString | ( | ) | const |
Get a string representing the internal state of the Model object.
This string is primarily meant for use as a debugging tool. The string may be quite long. It begins and ends with lines consisting only of ='s
.