kim-api 2.3.0+AppleClang.AppleClang.GNU
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
KIM::ComputeArguments Class Reference

Provides the primary interface to a KIM API ComputeArguments object and is meant to be used by simulators. More...

#include <KIM_ComputeArguments.hpp>

Public Member Functions

int GetArgumentSupportStatus (ComputeArgumentName const computeArgumentName, SupportStatus *const supportStatus) const
 Get the SupportStatus of a ComputeArgumentName. More...
 
int GetCallbackSupportStatus (ComputeCallbackName const computeCallbackName, SupportStatus *const supportStatus) const
 Get the SupportStatus of a ComputeCallbackName. More...
 
int SetArgumentPointer (ComputeArgumentName const computeArgumentName, int const *const ptr)
 Set the data pointer for a ComputeArgumentName. More...
 
int SetArgumentPointer (ComputeArgumentName const computeArgumentName, int *const ptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
int SetArgumentPointer (ComputeArgumentName const computeArgumentName, double const *const ptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
int SetArgumentPointer (ComputeArgumentName const computeArgumentName, double *const ptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
int SetCallbackPointer (ComputeCallbackName const computeCallbackName, LanguageName const languageName, Function *const fptr, void *const dataObject)
 Set the function pointer for a ComputeCallbackName. More...
 
void AreAllRequiredArgumentsAndCallbacksPresent (int *const result) const
 Determine if non-NULL pointers have been set for all ComputeArgumentName's and ComputeCallbackName's with SupportStatus values of SUPPORT_STATUS::requiredByAPI or SUPPORT_STATUS::required. More...
 
void SetSimulatorBufferPointer (void *const ptr)
 Set the Simulator's buffer pointer within the ComputeArguments object. More...
 
void GetSimulatorBufferPointer (void **const ptr) const
 Get the Simulator's buffer pointer from the ComputeArguments object. More...
 
std::string const & ToString () const
 Get a string representing the internal state of the ComputeArguments object. More...
 
void SetLogID (std::string const &logID)
 Set the identity of the Log object associated with the ComputeArguments object. More...
 
void PushLogVerbosity (LogVerbosity const logVerbosity)
 Push a new LogVerbosity onto the ComputeArguments object's Log object verbosity stack. More...
 
void PopLogVerbosity ()
 Pop a LogVerbosity from the ComputeArguments object's Log object verbosity stack. More...
 

Friends

class ModelImplementation
 Allows Model objects to directly access private member data of a ComputeArguments object. More...
 

Detailed Description

Provides the primary interface to a KIM API ComputeArguments object and is meant to be used by simulators.

See also
KIM_ComputeArguments, kim_compute_arguments_module::kim_compute_arguments_handle_type
Since
2.0

Definition at line 58 of file KIM_ComputeArguments.hpp.

Member Function Documentation

◆ AreAllRequiredArgumentsAndCallbacksPresent()

void KIM::ComputeArguments::AreAllRequiredArgumentsAndCallbacksPresent ( int *const  result) const

Determine if non-NULL pointers have been set for all ComputeArgumentName's and ComputeCallbackName's with SupportStatus values of SUPPORT_STATUS::requiredByAPI or SUPPORT_STATUS::required.

Parameters
[out]resultIs true if all such arguments and callbacks have non-NULL pointers, and is false otherwise.
See also
KIM_ComputeArguments_AreAllRequiredArgumentsAndCallbacksPresent, kim_compute_arguments_module::kim_are_all_required_present
Since
2.0

◆ GetArgumentSupportStatus()

int KIM::ComputeArguments::GetArgumentSupportStatus ( ComputeArgumentName const  computeArgumentName,
SupportStatus *const  supportStatus 
) const

Get the SupportStatus of a ComputeArgumentName.

Parameters
[in]computeArgumentNameThe ComputeArgumentName of interest.
[out]supportStatusThe Model's corresponding SupportStatus.
Returns
true if computeArgumentName is unknown.
false otherwise.
See also
KIM_ComputeArguments_GetArgumentSupportStatus, kim_compute_arguments_module::kim_get_argument_support_status
Since
2.0

◆ GetCallbackSupportStatus()

int KIM::ComputeArguments::GetCallbackSupportStatus ( ComputeCallbackName const  computeCallbackName,
SupportStatus *const  supportStatus 
) const

Get the SupportStatus of a ComputeCallbackName.

Parameters
[in]computeCallbackNameThe ComputeCallbackName of interest.
[out]supportStatusThe Model's corresponding SupportStatus.
Returns
true if computeCallbackName is unknown.
false otherwise.
See also
KIM_ComputeArguments_GetCallbackSupportStatus, kim_compute_arguments_module::kim_get_callback_support_status
Since
2.0

◆ GetSimulatorBufferPointer()

void KIM::ComputeArguments::GetSimulatorBufferPointer ( void **const  ptr) const

Get the Simulator's buffer pointer from the ComputeArguments object.

Parameters
[out]ptrThe simulator buffer data pointer.
Note
ptr == NULL if the simulator has not previously called ComputeArguments::SetSimulatorBufferPointer.
See also
KIM_ComputeArguments_GetSimulatorBufferPointer, kim_compute_arguments_module::kim_get_simulator_buffer_pointer
Since
2.0

◆ PopLogVerbosity()

void KIM::ComputeArguments::PopLogVerbosity ( )

◆ PushLogVerbosity()

void KIM::ComputeArguments::PushLogVerbosity ( LogVerbosity const  logVerbosity)

Push a new LogVerbosity onto the ComputeArguments object's Log object verbosity stack.

Parameters
[in]logVerbosityA LogVerbosity value.
See also
KIM_ComputeArguments_PushLogVerbosity, kim_compute_arguments_module::kim_push_log_verbosity
Since
2.0

◆ SetArgumentPointer() [1/4]

int KIM::ComputeArguments::SetArgumentPointer ( ComputeArgumentName const  computeArgumentName,
double *const  ptr 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ SetArgumentPointer() [2/4]

int KIM::ComputeArguments::SetArgumentPointer ( ComputeArgumentName const  computeArgumentName,
double const *const  ptr 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ SetArgumentPointer() [3/4]

int KIM::ComputeArguments::SetArgumentPointer ( ComputeArgumentName const  computeArgumentName,
int *const  ptr 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ SetArgumentPointer() [4/4]

int KIM::ComputeArguments::SetArgumentPointer ( ComputeArgumentName const  computeArgumentName,
int const *const  ptr 
)

Set the data pointer for a ComputeArgumentName.

Todo:
Add more detailed description what it means to provide a NULL or non-NULL value for various SupportStatus'es.
Parameters
[in]computeArgumentNameThe ComputeArgumentName of interest.
[in]ptrThe data pointer.
Returns
true if computeArgumentName is unknown.
true if ptr != NULL and computeArgumentName == SUPPORT_STATUS::notSupported.
false otherwise.
See also
KIM_ComputeArguments_SetArgumentPointerInteger, KIM_ComputeArguments_SetArgumentPointerDouble, kim_compute_arguments_module::kim_set_argument_pointer
Since
2.0

◆ SetCallbackPointer()

int KIM::ComputeArguments::SetCallbackPointer ( ComputeCallbackName const  computeCallbackName,
LanguageName const  languageName,
Function *const  fptr,
void *const  dataObject 
)

Set the function pointer for a ComputeCallbackName.

Todo:
Add more detailed description what it means to provide a NULL or non-NULL value for various SupportStatus'es. Also, describe dataObject.
Parameters
[in]computeCallbackNameThe ComputeCallbackName of interest.
[in]languageNameThe LanguageName of the callback.
[in]fptrThe function pointer.
[in]dataObjectThe data pointer associated with the callback.
Returns
true if computeCallbackName is unknown.
true if fptr != NULL and computeCallbackName == SUPPORT_STATUS::notSupported.
false otherwise.
See also
KIM_ComputeArguments_SetCallbackPointer, kim_compute_arguments_module::kim_set_callback_pointer
Since
2.0

◆ SetLogID()

void KIM::ComputeArguments::SetLogID ( std::string const &  logID)

Set the identity of the Log object associated with the ComputeArguments object.

Parameters
[in]logIDString identifying the ComputeArguments object's Log object.
See also
KIM_ComputeArguments_SetLogID, kim_compute_arguments_module::kim_set_log_id
Since
2.0

◆ SetSimulatorBufferPointer()

void KIM::ComputeArguments::SetSimulatorBufferPointer ( void *const  ptr)

Set the Simulator's buffer pointer within the ComputeArguments object.

The simulator buffer pointer may be used by the simulator to associate a memory buffer with the ComputeArguments object.

Parameters
[in]ptrThe simulator buffer data pointer.
See also
KIM_ComputeArguments_SetSimulatorBufferPointer, kim_compute_arguments_module::kim_set_simulator_buffer_pointer
Since
2.0

◆ ToString()

std::string const & KIM::ComputeArguments::ToString ( ) const

Get a string representing the internal state of the ComputeArguments 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.

See also
KIM_ComputeArguments_ToString, kim_compute_arguments_module::kim_to_string
Since
2.0

Friends And Related Function Documentation

◆ ModelImplementation

friend class ModelImplementation
friend

Allows Model objects to directly access private member data of a ComputeArguments object.

Note
This has no practical effect on users of the KIM API.
Since
2.0

Definition at line 241 of file KIM_ComputeArguments.hpp.


The documentation for this class was generated from the following file: