Hi Jakob,
Good questions.
The KIM API gives the Model (driver) the authority to decide the base units it
will use. Best practice for Models (drivers) is to respect the request of the
Simulator and to use the "requested units". However, there is no requirement
that this be the case. Thus, it is not considered an error if the Model
(driver) sets base units to values different from the requested ones. The
"requestedUnitsAccepted" output argument is then just a convenience that allows
the Simulator a short-cut (as opposed to having to make a call to
Model::GetUnits() and comparing the results to the requested units) to know if
its request for units was accepted.
The Model::Create() routine will return 'error = true' in the following
situations:
* Invalid 'numbering' or 'unit' enumeration values are provided
* The Model shared library cannot be found
* The Model shared library cannot be opened
* The Model shared library is not the correct type (is not a stand-alone, or
paramaterized model)
* The Model's Create() routine does not set any of:
- The model's Numbering
- The model's units
- The Model's numberOfNeighborLists
- The Model's neighbor lists cutoffs
- The Model's influence distance
- The Model's 'modelWillNotRequestNeighbors...' values
- The Model's KIM API Required routines (ComputeArgumentsCreate, Compute,
ComputeArgumentsDestroy, Destroy)
- The Model set at least one parameter pointer, but did not set the
Refresh routine pointer
- The Model set zero parameter pointers, but did set the Refresh routine
pointer
- The Model does not set any supported species.
otherwise, the routine returns 'error = false'
If 'error = true' the values of 'requestedUnitsAccepted' and
'modelImplementation' are unchanged from their values before the call to
Model::Create().
Ryan