Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::Create routine.
More...
#include <KIM_ModelCreate.hpp>
|
int | SetModelNumbering (Numbering const numbering) |
| Set the Model's particle Numbering. More...
|
|
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...
|
|
int | SetRoutinePointer (ModelRoutineName const modelRoutineName, LanguageName const languageName, int const required, Function *const fptr) |
| Set the function pointer for the ModelRoutineName of interest. More...
|
|
int | SetSpeciesCode (SpeciesName const speciesName, int const code) |
| Set integer code for supported SpeciesName. More...
|
|
int | SetParameterPointer (int const extent, int *const ptr, std::string const &name, std::string const &description) |
| Set the next parameter data pointer to be provided by the model. More...
|
|
int | SetParameterPointer (int const extent, double *const ptr, std::string const &name, std::string const &description) |
|
void | SetModelBufferPointer (void *const ptr) |
| Set the Model's buffer pointer within the Model object. More...
|
|
int | SetUnits (LengthUnit const lengthUnit, EnergyUnit const energyUnit, ChargeUnit const chargeUnit, TemperatureUnit const temperatureUnit, TimeUnit const timeUnit) |
| Set the Model's base unit values. 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...
|
|
|
static int | ConvertUnit (LengthUnit const fromLengthUnit, EnergyUnit const fromEnergyUnit, ChargeUnit const fromChargeUnit, TemperatureUnit const fromTemperatureUnit, TimeUnit const fromTimeUnit, LengthUnit const toLengthUnit, EnergyUnit const toEnergyUnit, ChargeUnit const toChargeUnit, TemperatureUnit const toTemperatureUnit, TimeUnit const toTimeUnit, double const lengthExponent, double const energyExponent, double const chargeExponent, double const temperatureExponent, double const timeExponent, double *const conversionFactor) |
| Get the multiplicative factor to convert between a derived unit represented in two different sets of base units. More...
|
|
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::Create routine.
- See also
- ModelDriverCreate, KIM_ModelCreate, KIM_ModelDriverCreate, kim_model_driver_create_module::kim_model_driver_create_handle_type
- Since
- 2.0
Definition at line 64 of file KIM_ModelCreate.hpp.
◆ ConvertUnit()
static int KIM::ModelCreate::ConvertUnit |
( |
LengthUnit const |
fromLengthUnit, |
|
|
EnergyUnit const |
fromEnergyUnit, |
|
|
ChargeUnit const |
fromChargeUnit, |
|
|
TemperatureUnit const |
fromTemperatureUnit, |
|
|
TimeUnit const |
fromTimeUnit, |
|
|
LengthUnit const |
toLengthUnit, |
|
|
EnergyUnit const |
toEnergyUnit, |
|
|
ChargeUnit const |
toChargeUnit, |
|
|
TemperatureUnit const |
toTemperatureUnit, |
|
|
TimeUnit const |
toTimeUnit, |
|
|
double const |
lengthExponent, |
|
|
double const |
energyExponent, |
|
|
double const |
chargeExponent, |
|
|
double const |
temperatureExponent, |
|
|
double const |
timeExponent, |
|
|
double *const |
conversionFactor |
|
) |
| |
|
static |
Get the multiplicative factor to convert between a derived unit represented in two different sets of base units.
- Parameters
-
[in] | fromLengthUnit | The "from" base length unit. |
[in] | fromEnergyUnit | The "from" base energy unit. |
[in] | fromChargeUnit | The "from" base charge unit. |
[in] | fromTemperatureUnit | The "from" base temperature unit. |
[in] | fromTimeUnit | The "from" base time unit. |
[in] | toLengthUnit | The "to" base length unit. |
[in] | toEnergyUnit | The "to" base energy unit. |
[in] | toChargeUnit | The "to" base charge unit. |
[in] | toTemperatureUnit | The "to" base temperature unit. |
[in] | toTimeUnit | The "to" base time unit. |
[in] | lengthExponent | The derived unit's length exponent. |
[in] | energyExponent | The derived unit's energy exponent. |
[in] | chargeExponent | The derived unit's charge exponent. |
[in] | temperatureExponent | The derived unit's temperature exponent. |
[in] | timeExponent | The derived unit's time exponent. |
[out] | conversionFactor | The desired conversion factor. |
- Returns
true
if any of the base units are unknown.
-
true
if any of the base units are unused
and the corresponding exponent is nonzero.
-
false
otherwise.
- See also
- ModelDriverCreate::ConvertUnit, KIM_ModelCreate_ConvertUnit, KIM_ModelDriverCreate_ConvertUnit, kim_model_driver_create_module::kim_convert_unit
- Since
- 2.0
◆ LogEntry() [1/2]
void KIM::ModelCreate::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.
- Parameters
-
[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. |
- See also
- KIM_ModelCreate_LogEntry, kim_model_driver_create_module::kim_log_entry
- Since
- 2.0
◆ LogEntry() [2/2]
void KIM::ModelCreate::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.
◆ SetInfluenceDistancePointer()
void KIM::ModelCreate::SetInfluenceDistancePointer |
( |
double const *const |
influenceDistance | ) |
|
◆ SetModelBufferPointer()
void KIM::ModelCreate::SetModelBufferPointer |
( |
void *const |
ptr | ) |
|
◆ SetModelNumbering()
int KIM::ModelCreate::SetModelNumbering |
( |
Numbering const |
numbering | ) |
|
◆ SetNeighborListPointers()
void KIM::ModelCreate::SetNeighborListPointers |
( |
int const |
numberOfNeighborLists, |
|
|
double const *const |
cutoffs, |
|
|
int const *const |
modelWillNotRequestNeighborsOfNoncontributingParticles |
|
) |
| |
Set the Model's neighbor list data pointers.
- Todo:
- Add more detailed description
- Parameters
-
[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. |
- Note
- The model is responsible for allocating the memory associated with the neighbor list cutoffs and
modelWillNotRequestNeighborsOfNoncontributingParticles
data. The model must use the Model's buffer pointer to retain access to this memory location and avoid a memory leak.
- See also
- ModelDriverCreate::SetNeighborListPointers, KIM_ModelCreate_SetNeighborListPointers, KIM_ModelDriverCreate_SetNeighborListPointers, kim_model_driver_create_module::kim_set_neighbor_list_pointers
- Since
- 2.0
◆ SetParameterPointer() [1/2]
int KIM::ModelCreate::SetParameterPointer |
( |
int const |
extent, |
|
|
int *const |
ptr, |
|
|
std::string const & |
name, |
|
|
std::string const & |
description |
|
) |
| |
◆ SetParameterPointer() [2/2]
int KIM::ModelCreate::SetParameterPointer |
( |
int const |
extent, |
|
|
double *const |
ptr, |
|
|
std::string const & |
name, |
|
|
std::string const & |
description |
|
) |
| |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
◆ SetRoutinePointer()
◆ SetSpeciesCode()
int KIM::ModelCreate::SetSpeciesCode |
( |
SpeciesName const |
speciesName, |
|
|
int const |
code |
|
) |
| |
◆ SetUnits()
Set the Model's base unit values.
- Parameters
-
- Note
- A unit of
unused
indicates the the Model does not deal with any quantities whose derived unit involves the corresponding base unit. For example, many models only deal with quantities that are derived from just the energy and length base units (such as force, virial, etc.), and thus should set chargeUnit
, temperatureUnit
, and timeUnit
to unused
.
- Returns
true
if any of the base units are unknown.
-
true
if lengthUnit
or energyUnit
are unused.
-
false
otherwise.
- See also
- ModelDriverCreate::SetUnits, KIM_ModelCreate_SetUnits, KIM_ModelDriverCreate_SetUnits, kim_model_driver_create_module::kim_set_units
- Since
- 2.0
◆ ToString()
std::string const& KIM::ModelCreate::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
.
- See also
- KIM_ModelCreate_ToString, kim_model_driver_create_module::kim_to_string
- Since
- 2.0
The documentation for this class was generated from the following file: