pax_global_header 0000666 0000000 0000000 00000000064 13765565573 0014540 g ustar 00root root 0000000 0000000 52 comment=893db88f37e18d61732bb6940136e45562494416
kim-api-2.2.1-git/ 0000775 0000000 0000000 00000000000 13765565573 0013652 5 ustar 00root root 0000000 0000000 kim-api-2.2.1-git/.clang-format 0000664 0000000 0000000 00000010560 13765565573 0016227 0 ustar 00root root 0000000 0000000 ---
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2019, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
#AlwaysBreakAfterDefinitionReturnType: None # deprecated
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: true
AfterExternBlock: false
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
#BreakAfterJavaFieldAnnotations: false
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
BreakConstructorInitializersBeforeComma: false
BreakInheritanceList: AfterColon
BreakStringLiterals: true
ColumnLimit: 80
#CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
#ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
#ForEachMacros:
# - foreach
# - Q_FOREACH
# - BOOST_FOREACH
IncludeBlocks: Preserve
#IncludeCategories:
# - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
# Priority: 2
# - Regex: '^(<|"(gtest|gmock|isl|json)/)'
# Priority: 3
# - Regex: '.*'
# Priority: 1
#IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
#JavaScriptQuotes: Leave
#JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
#MacroBlockBegin: ''
#MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
#ObjCBinPackProtocolList: Auto
#ObjCBlockIndentWidth: 2
#ObjCSpaceAfterProperty: false
#ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Middle
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp03
TabWidth: 2
UseTab: Never
...
kim-api-2.2.1-git/.format-ignore 0000664 0000000 0000000 00000000221 13765565573 0016417 0 ustar 00root root 0000000 0000000 # Must match line exactly
#
cpp/src/edn-cpp/edn.hpp
cpp/src/edn-cpp/example.cpp
cpp/src/edn-cpp/repl.cpp
cpp/src/ghc-filesystem/filesystem.hpp
kim-api-2.2.1-git/.fprettify.rc 0000664 0000000 0000000 00000002112 13765565573 0016266 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2019, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
indent = 2
line-length = 80
whitespace = 3
strict-indent = true
enable-replacements = true
c-relations = true
strip-comments = false
kim-api-2.2.1-git/.github/ 0000775 0000000 0000000 00000000000 13765565573 0015212 5 ustar 00root root 0000000 0000000 kim-api-2.2.1-git/.github/workflows/ 0000775 0000000 0000000 00000000000 13765565573 0017247 5 ustar 00root root 0000000 0000000 kim-api-2.2.1-git/.github/workflows/codeql-analysis.yml 0000664 0000000 0000000 00000004474 13765565573 0023073 0 ustar 00root root 0000000 0000000 # For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ master, devel ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ devel ]
schedule:
- cron: '20 12 * * 5'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# âšī¸ Command-line programs to run using the OS shell.
# đ https://git.io/JvXDl
# âī¸ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
kim-api-2.2.1-git/CMakeLists.txt 0000664 0000000 0000000 00000021740 13765565573 0016416 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
# Alexander Stukowski
#
#
# Release: This file is part of the kim-api.git repository.
#
cmake_minimum_required(VERSION 3.10)
enable_testing()
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_CURRENT_BINARY_DIR})
include(SetCacheWithFallback)
include(DefaultCompilerStandards)
# Define options
#
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(_LOG_MAX "DEBUG")
else()
set(_LOG_MAX "INFORMATION")
endif()
set_cache_with_fallback(KIM_API_LOG_MAXIMUM_LEVEL "${_LOG_MAX}" STRING "Maximum log verbosity")
unset(_LOG_MAX)
set_property(CACHE KIM_API_LOG_MAXIMUM_LEVEL PROPERTY STRINGS "" SILENT FATAL ERROR WARNING INFORMATION DEBUG)
#
option(KIM_API_BUILD_EXAMPLES "Build example Drivers, Models, Simulator Models, and Simulators" ON)
#
set(KIM_API_PROJECT_NAME "kim-api" CACHE STRING "KIM API project name string")
mark_as_advanced(KIM_API_PROJECT_NAME)
#
option(KIM_API_ENABLE_SANITIZE "Enable AddressSanitizer" OFF)
mark_as_advanced(KIM_API_ENABLE_SANITIZE)
#
option(KIM_API_ENABLE_COVERAGE "Enable code coverage" OFF)
mark_as_advanced(KIM_API_ENABLE_COVERAGE)
#
string(TIMESTAMP _KIM_API_CONFIGURATION_TIMESTAMP "%Y-%m-%d-%H-%M-%S" UTC)
set(KIM_API_CONFIGURATION_TIMESTAMP "${_KIM_API_CONFIGURATION_TIMESTAMP}" CACHE STRING "UTC timestamp for configuration of kim-api")
unset(_KIM_API_CONFIGURATION_TIMESTAMP)
mark_as_advanced(KIM_API_CONFIGURATION_TIMESTAMP)
#
# Additional options (that depend on call to project()) defined below
#
# Define main project
#
project(${KIM_API_PROJECT_NAME} VERSION 2.2.1 LANGUAGES CXX C Fortran) # must remain a single line for create-pacakge script
set(PROJECT_DESCRIPTION "An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).")
#
include(GNUInstallDirs) # needs to come after languages are enabled
include(RelocatableGNUInstallDirs) # provides CMAKE_INSTALL_RELOC_*DIRS variables
include(DefineVersionVariables)
# Define options dependent on languages being enabled and/or PROJECT_NAME being defined
#
set(KIM_API_CMAKE_C_COMPILER "${CMAKE_C_COMPILER}" CACHE FILEPATH "C compiler filepath to be used after installation for item compilation.")
mark_as_advanced(KIM_API_CMAKE_C_COMPILER)
set(KIM_API_CMAKE_CXX_COMPILER "${CMAKE_CXX_COMPILER}" CACHE FILEPATH "C++ compiler filepath to be used after installation for item compilation.")
mark_as_advanced(KIM_API_CMAKE_CXX_COMPILER)
set(KIM_API_CMAKE_Fortran_COMPILER "${CMAKE_Fortran_COMPILER}" CACHE FILEPATH "Fortran compiler filepath to be used after installation for item compilation.")
mark_as_advanced(KIM_API_CMAKE_Fortran_COMPILER)
include(DefineInternalVariables)
#
# Define options dependent on internal variables
#
include(CompletionConfig) # set install dirs for completions; NOTE: depends on Module 'DefineInternalVariables'
set_cache_with_fallback(KIM_API_USER_CONFIGURATION_FILE ".${PROJECT_NAME}/${KIM_API_UID}/config" FILEPATH "Default configuration file name. If not absolute, then relative to user home directory")
mark_as_advanced(KIM_API_USER_CONFIGURATION_FILE)
# "~/" is expanded by cmake when set(... CACHE PATH ...) is used below; so do not use PATH as type
set_cache_with_fallback(KIM_API_USER_MODEL_DRIVERS_DIR_DEFAULT "~/.${PROJECT_NAME}/${KIM_API_UID}/${KIM_API_MODEL_DRIVER_PLURAL_DIR_IDENTIFIER}" STRING "Default user collection model drivers dir") # do not use PATH type
mark_as_advanced(KIM_API_USER_MODEL_DRIVERS_DIR_DEFAULT)
set_cache_with_fallback(KIM_API_USER_PORTABLE_MODELS_DIR_DEFAULT "~/.${PROJECT_NAME}/${KIM_API_UID}/${KIM_API_PORTABLE_MODEL_PLURAL_DIR_IDENTIFIER}" STRING "Default user collection portable models dir") # do not use PATH type
mark_as_advanced(KIM_API_USER_PORTABLE_MODELS_DIR_DEFAULT)
set_cache_with_fallback(KIM_API_USER_SIMULATOR_MODELS_DIR_DEFAULT "~/.${PROJECT_NAME}/${KIM_API_UID}/${KIM_API_SIMULATOR_MODEL_PLURAL_DIR_IDENTIFIER}" STRING "Default user collection simulator models dir") # do not use PATH type
mark_as_advanced(KIM_API_USER_SIMULATOR_MODELS_DIR_DEFAULT)
#
#
macro(_set_system_dir var identifier type_string)
set(_default_dir_1 "${PROJECT_NAME}/${identifier}") # _1 single escape -- to be used directly
set(_default_dir_2 "${PROJECT_NAME}/${identifier}") # _2 double escape -- to be passed into macro/function
set(_description "System collection (${KIM_API_PATH_SEPARATOR}-separated) ${type_string} directory list")
if(WIN32)
file(TO_CMAKE_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/${_default_dir_1}" _normalized_libdir_1)
file(TO_CMAKE_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/${_default_dir_2}" _normalized_libdir_2)
set(_default_dir_1 "${_normalized_libdir_1}")
set(_default_dir_2 "${_normalized_libdir_2}")
unset(_normalized_libdir_1)
unset(_normalized_libdir_2)
else()
set(_default_dir_1 "\${ORIGIN}/${_default_dir_1}") # Here is the important difference between the _1 and _2
set(_default_dir_2 "\\\${ORIGIN}/${_default_dir_2}") # Here is the important difference between the _1 and _2
set(_description "${_description} (entries may begin with $ORIGIN (w/ or w/o {}'s), if appropriate)")
endif()
set_cache_with_fallback(${var} "${_default_dir_2}" STRING ${_description})
if("${${var}}" MATCHES "^${KIM_API_PATH_SEPARATOR}")
set(${var} "${_default_dir_1}${${var}}")
endif()
unset(_default_dir_1)
unset(_default_dir_2)
unset(_description)
mark_as_advanced(${var})
endmacro(_set_system_dir)
#
_set_system_dir(KIM_API_SYSTEM_MODEL_DRIVERS_DIR "${KIM_API_MODEL_DRIVER_PLURAL_IDENTIFIER}" "model drivers")
#
_set_system_dir(KIM_API_SYSTEM_PORTABLE_MODELS_DIR "${KIM_API_PORTABLE_MODEL_PLURAL_IDENTIFIER}" "portable models")
#
_set_system_dir(KIM_API_SYSTEM_SIMULATOR_MODELS_DIR "${KIM_API_SIMULATOR_MODEL_PLURAL_IDENTIFIER}" "simulator models")
include(DefaultCompilerFlags)
# Define kim-api target
#
add_library(kim-api SHARED "")
set_target_properties(kim-api
PROPERTIES
OUTPUT_NAME "${PROJECT_NAME}"
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR}
Fortran_MODULE_DIRECTORY "${PROJECT_BINARY_DIR}/fortran/${KIM_API_Fortran_MODULE_DIR_IDENTIFIER}"
)
target_include_directories(kim-api PUBLIC
$>
$)
target_link_libraries(kim-api ${CMAKE_DL_LIBS})
# Add install rules for kim-api
#
install(TARGETS kim-api
EXPORT KIM_API_Targets
# use CMAKE_INSTALL_RELOC_* to get relocatable GNUInstallDir behavior
INCLUDES DESTINATION "${CMAKE_INSTALL_RELOC_INCLUDEDIR}/${PROJECT_NAME}"
LIBRARY DESTINATION "${CMAKE_INSTALL_RELOC_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_RELOC_LIBDIR}"
RUNTIME DESTINATION "${CMAKE_INSTALL_RELOC_BINDIR}")
# Add install rules for various metadata files
#
install(
FILES
"${PROJECT_SOURCE_DIR}/README.md"
"${PROJECT_SOURCE_DIR}/NEWS"
"${PROJECT_SOURCE_DIR}/LICENSE.CDDL"
DESTINATION
"${CMAKE_INSTALL_RELOC_DOCDIR}"
)
# Add include subdirectories
#
add_subdirectory(cpp/include)
add_subdirectory(c/include)
add_subdirectory(fortran/include)
# Add src subdirectories
#
add_subdirectory(cpp/src)
add_subdirectory(c/src)
add_subdirectory(fortran/src)
# Add cmake subdirectory
#
add_subdirectory(cmake)
#
string(MAKE_C_IDENTIFIER "${PROJECT_NAME}" KIM_API_C_ID_PROJECT_NAME) # used in ./completions and ./utils
#
# Add utils subdirectory
#
add_subdirectory(utils)
# Add other subdirectories
#
add_subdirectory(docs)
add_subdirectory(completions)
add_subdirectory(editors/emacs)
add_subdirectory(pkg-config)
# Add Models & Drivers
#
if(KIM_API_BUILD_EXAMPLES)
set(KIM_API_CMAKE_PREFIX_DIR "") # avoid uninitialized variable warning
set(KIM-API_DIR "${PROJECT_BINARY_DIR}/cmake/${KIM_API_BUILD_TREE_CONFIG_DIR_IDENTIFIER}")
set(KIM-API-ITEMS_DIR "${PROJECT_BINARY_DIR}/cmake/${KIM_API_BUILD_TREE_CONFIG_DIR_IDENTIFIER}-items")
add_subdirectory(examples/model-drivers)
add_subdirectory(examples/portable-models)
add_subdirectory(examples/simulator-models)
add_subdirectory(examples/simulators)
unset(KIM_API_CMAKE_PREFIX_DIR)
unset(KIM-API_DIR)
unset(KIM-API-ITEMS_DIR)
endif()
include(WriteKIMConfigSummary)
kim-api-2.2.1-git/INSTALL 0000664 0000000 0000000 00000066230 13765565573 0014712 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Ryan S. Elliott
# Ellad B. Tadmor
#
#
# Release: This file is part of the kim-api.git repository.
#
============================= The KIM API package =============================
This file contains instructions for installing the KIM API package.
TABLE OF CONTENTS
A. System requirements
B. Quick start
C. Package concepts and operation overview
C.1 KIM API library
C.2 Collections for Model Drivers (MDs), Portable Models (PMs), and
Simulator Models (SMs)
C.2.1 The system-collection
C.2.2 The user-collection
C.2.3 The environment-variable-collection
C.2.4 The CWD-collection
C.3 Helper utilities
D. KIM API Installation
D.1 Typical build scenario
D.2 CMake build options
D.2.1 Compiler selection
D.2.2 CMAKE_BUILD_TYPE
D.2.3 Installation prefix
D.2.4 KIM API specific build options
D.3 Installing multiple versions
D.4 Uninstall the KIM API
E. Adding MDs, PMs, and SMs to the collections
E.1 Adding MDs, PMs, and SMs to the system-collection
E.2 Adding MDs, PMs, and SMs to the user-collection
E.3 Adding MDs, PMs, and SMs to the environment-variable-collection
E.4 Adding MDs, PMs, and SMs to the CWD-collection
E.5 Adding MDs, PMs, and SMs from a local source directory
E.6 Manually adding MDs, PMs, and SMs
-------------------------------------------------------------------------------
A. SYSTEM REQUIREMENTS
To install and run the KIM API package you need the following:
1. A Unix/Linux/macOS system.
2. CMake (3.10 or later).
3. GNU compilers (gcc, g++, gfortran) version 4.8.x or higher or the
corresponding Intel compilers, version 11.1 or higher. Other compilers may
also work.
4. (optional) The 'xxd' utility (distributed as part of the vim package).
If available, provides faster builds than without.
5. wget or curl, sed, grep, tar, uname, etc. (used by the
kim-api-collections-management utility).
6. Doxygen and Graphviz (for generating the documentation).
7. The bash-completion package (for facilitating command-line usage of the
helper utilities).
8. pkg-config can be used by code needing to link against the kim-api library.
-------------------------------------------------------------------------------
B. QUICK START: For those who don't like to read and are a bit audacious.
Try the following:
$ mkdir build && cd build
$ cmake .. -DCMAKE_BUILD_TYPE=Release
$ make
$ sudo make install
$ sudo ldconfig
For more information, see section D.
-------------------------------------------------------------------------------
C. PACKAGE LAYOUT AND OPERATION OVERVIEW
The KIM API package is a system-level library that aims to give computer
programmers the ability to write atomistic or molecular simulation programs
(Simulators) that can seamlessly interface with implementations of interatomic
potentials (Portable Models, PMs), regardless of the programming language in
which the codes are written. The KIM API package provides a dedicated Portable
Model Interface (PMI) for use by simulators and PMs and referred to as the KIM
API/PMI. A PM can include code and parameters all in one. Or, a PM can
include just parameters and use a separate Model Driver (MD) library containing
the code. There are also Simulator Models (SMs) that only work with a specific
simulator. The KIM API package provides a dedicated Simulator Model Interface
(SMI) for use by simulators and SMs and referred to as the KIM API/SMI. In
addition to the main KIM API library, a small number of associated helper
utilities are provided.
C.1. KIM API Library
The KIM API library provides the necessary routines for a Simulator to interact
with a PM or SM. It also contains an interface for discovering what MDs, PMs,
and SMs are available in the KIM API Collections. MDs, PMs, and SMs are built
and linked against the KIM API library, then installed in one of the
collections (see below) so that they are available for use with a simulator.
Simulators are built and linked against the KIM API library so that they can
access and use any of the available PMs and/or SM in the various collections.
C.2 COLLECTIONS FOR MODEL DRIVERS (MDs), PORTABLE MODELS (PMs), AND
SIMULATOR MODELS (SMs)
The KIM API supports four Collections of Items. These are the
"system-collection", the "user-collection", the
"environment-variable-collection", and the "CWD-collection" as described below.
Each collection consists of separate sets of three Item Types: MDs, PMs, and
SMs. When the KIM API needs to use a particular MD, PD, or SM, it looks for
the item by type and name, first in the CWD-collection, then in the
environment-variable-collection, then in the user-collection, and finally in
the system-collection. It uses the first match that it finds. Note, it is
possible for a PM and its associated MD to be located in different collections.
The search for each is a separate and independent procedure.
See also the documentation for the Collections Interface (c++:
KIM::Collections; c: KIM_Collections; and Fortran: kim_collections_module).
C.2.1 THE SYSTEM-COLLECTION
The system-collection is a collection of MDs, PMs, and SMs that are available
to all simulators that use the KIM API library. By default, this collection is
located in the same subdirectory as the KIM API library. (See also the
"KIM_API_SYSTEM_*_DIR" build options in section D.2.4, below.)
MDs, PMs, and SMs may be built and installed to the system-collection at
anytime after the KIM API has been built and installed.
C.2.2 THE USER-COLLECTION
The user-collection is a collection of MDs, PMs, and SMs that are available
only to the user who owns the process for the simulator that uses the KIM API
library. This collection is located in subdirectories that are specified by a
configuration file. The user-collection may be populated with MDs, PMs, and
SMs after the KIM API has been built and installed.
The configuration file is named "${HOME}/.kim-api//config" by
default, where is a unique identifier for the particular
installation of the kim-api being used (this allows multiple, independent,
installations on a single machine). Here "${HOME}" is the user's home
directory. (See item D below for build options controlling this default file
name.) If the "KIM_API_CONFIGURATION_FILE" environment variable is set, its
value (interpreted as an absolute file name) will supersede the default
location and name of the configuration file. For example, the following
commands will instruct the KIM API library to use a file named "kim-config" in
the /my-kim-stuff folder
$ export KIM_API_CONFIGURATION_FILE=/my-kim-stuff/kim-config
If the configuration file does not exist, the KIM API library will create it
with a default configuration specifying that the user-collection files are
stored in "${HOME}/.kim-api//model-drivers/",
"${HOME}/.kim-api//portable-models/", and
"${HOME}/.kim-api//simulator-models/". More generally, the values
in the configuration file may contain colon ':' (on Windows: semi-colon ';')
separated lists of fully-qualified directory names (starting, strictly, with
'/', '~/' or a root drive letter like 'C:/'). (See item D below for build
options controlling these defaults.)
C.2.3 THE ENVIRONMENT-VARIABLE-COLLECTION
The environment-variable-collection is a collection of MDs, PMs, and SMs that
are specified by the run-time environment of the process for the simulator that
uses the KIM API library. The locations of this collection are specified by
the environment variables "KIM_API_MODEL_DRIVERS_DIR",
"KIM_API_PORTABLE_MODELS_DIR", and "KIM_API_SIMULATOR_MODELS_DIR". These
variables should contain colon ':' (on Windows: semi-colon ';') separated lists
of absolute directory names where the collection MDs, PMs, and SMs, respectively,
are located. (For example, in bash you could execute the command
$ export KIM_API_PORTABLE_MODELS_DIR=/my-kim-stuff/models-i-am-developing:/my-kim-stuff/misc-portable-models
to have the KIM API look for PMs in /my-kim-stuff/models-i-am-developing first
and then look in /my-kim-stuff/misc-portable-models. (Similarly for MDs and
SMs.) The environment-variable-collection may be populated with MDs, PMs, and
SMs after the KIM API has been built and installed.
C.2.4 THE CWD-COLLECTION
The CWD-collection is a collection of MDs, PMs, SMs that are available to a
simulator at run-time. The collection is located in the simulator process's
current working directory (CWD). The CWD-collection may be populated with MDs,
PMs, and SMs after the KIM API has been built and installed.
C.3 HELPER UTILITIES
The KIM API package also includes a utility for managing the MDs, PMs, and SMs
contained in the various collections and for managing the configuration file.
This utility is called "kim-api-collections-management". The KIM API package
installs bash completion scripts that are designed to work with the
"bash-completion" package (https://github.com/scop/bash-completion). When
"bash-completion" is installed and activated on the system, tab-completions for
the collections management utility should be automatically loaded and available
for use.
In addition, when the KIM API package is installed to a "Local (non-global)"
(see D below) directory, the package also installs the "kim-api-activate" and
"kim-api-deactivate" scripts. The activate script adds the utilities to the
executable PATH, adds the KIM API library to the PKG_CONFIG_PATH so that the
pkg-config utility can find it, and loads bash tab-completion support for the
collections management utility. The deactivate script removes what the
activate script added.
-------------------------------------------------------------------------------
D. KIM API INSTALLATION
D.1 Typical Build Scenario
Here, the typical KIM API build and install process is detailed and the
system-collection is populated with the example MDs, PMs, and SMs, as well as a
single PM and its associated MD, both from openkim.org. Additionally, one of
the example simulators is copied to the user's home directory and used to test
the KIM API. The KIM API package uses the CMake build system. See the CMake
documentation (https://cmake.org/cmake/help/v3.10/) for help with CMake
settings. For some common CMake settings and KIM API specific settings, see
D.2 below.
The commands given below are for the bash shell.
By default packages are installed to the Global prefix directory "/usr/local".
Here we assume that "/usr/local/bin" is included as part of the system's
standard PATH setting.
First, we will create a working space and obtain the source package
$ export WORKSPACE="${HOME}/kim-api-workspace"
$ mkdir "${WORKSPACE}"
$ cd "${WORKSPACE}
$ wget https://s3.openkim.org/kim-api/kim-api-X.Y.Z.txz # replace X, Y, and Z with the current version numbers
$ tar Jxvf kim-api-X.Y.Z.txz
$ cd kim-api-X.Y.Z
We will set an environment variable to point the the KIM API source.
$ export KIM_API_SOURCE="${WORKSPACE}/kim-api-X.Y.Z" # replace X, Y, and Z with the current version numbers
Next the configuration and build process begins. (Note: lines beginning with
"$", without leading whitespace, in this file are extracted and used in the KIM
API automated Continuous-Integration (CI) testing framework.)
$ cd "${WORKSPACE}"
$ mkdir build
$ cd build
$ cmake ${KIM_API_SOURCE} -DCMAKE_BUILD_TYPE=Release
$ make -j2
If you want, build the documentation.
$ make docs
If you want, before installing the package, you can run the tests.
$ make test
Now, install the package (and docs, if built).
$ sudo make install
$ sudo ldconfig # All linux systems should do this; on Redhat-like systems you may need to first add /usr/local/lib to /etc/ld.so.conf
$ cp -r "${KIM_API_SOURCE}/examples/simulators/utility_forces_numer_deriv" "${WORKSPACE}/"
$ cd "${WORKSPACE}"
If you want, you can now delete the source and build tree. However, you may
also want to preserve the "install_manifest.txt" file which would be needed for
uninstalling the KIM API package (see D.4 below).
$ cp "${WORKSPACE}/build/install_manifest.txt" "${WORKSPACE}/install_manifest.txt"
$ rm -r "${WORKSPACE}/build
Now, we can build the simulator using the KIM API library that we have just
installed.
$ cd utility_forces_numer_deriv
$ mkdir build
$ cd build
$ cmake ..
$ make
Try it with one of the example models:
$ printf "ex_model_Ar_P_LJ" | ./utility_forces_numer_deriv
Next, we can try it with a model installed from https://openkim.org:
$ kim-api-collections-management install system --sudo EDIP_JustoBazantKaxiras_1998_Si__MO_958932894036_002
$ printf "EDIP_JustoBazantKaxiras_1998_Si__MO_958932894036_002" | ./utility_forces_numer_deriv
Congratulations, you have now successfully installed the KIM API. If you would
like to learn more about the KIM API, read the documentation in the docs
directory (/usr/local/share/doc/kim-api).
If you would like to install the latest release of all models from
https://openkim.org, you can do:
$ kim-api-collections-management install system --sudo OpenKIM
D.2 CMAKE BUILD OPTIONS
The KIM API defines a number of specific build options which are detailed in
this section. But first, some notes about a few important standard CMake
options.
D.2.1 COMPILER SELECTION
By default CMake will search for appropriate compilers available on your
system. Generally, it selects reasonable choices. However, if you wish to
force CMake to use specific compilers, you can do so with environment variables
set on the command line. For example, suppose you have the latest GNU Compiler
Collection (GCC) version X installed with the compilers named 'gcc-X', 'g++-X',
and 'gfortran-X', for the C, C++, and Fortran compilers, respectively. Then,
to force CMake to use these compilers, replace the command (from above)
$ cmake .. -DCMAKE_BUILD_TYPE=Release
with
$ CC=gcc-X CXX=g++-X FC=gfortran-X cmake .. -DCMAKE_BUILD_TYPE=Release
D.2.2 CMAKE_BUILD_TYPE
CMake defines the option CMAKE_BUILD_TYPE which can be set to "Debug",
"Release", "RelWithDebInfo", "MinSizeRel", or it can be empty. (See the CMake
documentation for more details.) By default CMAKE_BUILD_TYPE is empty. In
short, while developing code or debugging, the value of "Debug" or
"RelWithDebInfo" should be used. When building for production runs one of the
other values should be used.
D.2.3 INSTALLATION PREFIX
Here and below, all paths or filepaths must be specified in a format
appropriate for the OS (windows or linux). Windows paths are of the form
C:\dir1\dir2 (forward slashes may be used instead to avoid escaping issues:
C:/dir1/dir2) and linux paths are of the form /dir1/dir2.
By default CMake installs the KIM API package under the Global prefix
"/usr/local". This is referred to as a "Global" (or system-wide) installation.
It is available to all users of the system. (Other "Global" prefix values are
"/" and "/usr".) However, such installations require root user permissions (as
implied by the use of the "sudo" command above). If you do not have root user
permission and/or do not want to install the KIM API to the global location,
you can change where CMake installs the KIM API by replacing the command (from
above)
$ cmake .. -DCMAKE_BUILD_TYPE=Release
with
$ cmake .. -DCMAKE_INSTALL_PREFIX="/install/prefix/path" -DCMAKE_BUILD_TYPE=Release
where "/install/prefix/path" should be replaced with your desired prefix. For
example, to install the KIM API in the "local" subdirectory of your home
directory, use "${HOME}/local". When installed in such a directory, the user
may employ the "kim-api-activate" utility to setup the PATH and bash
completions. For example:
$ source ${HOME}/local/bin/kim-api-activate
D.2.4 KIM API SPECIFIC BUILD OPTIONS
The KIM API defines two additional regular build options and additional
advanced options.
* KIM_API_LOG_MAXIMUM_LEVEL (="DEBUG" if CMAKE_BUILD_TYPE is "Debug", otherwise
="INFORMATION") This option takes one of the following six values "SILENT",
"FATAL", "ERROR", "WARNING", "INFORMATION", "DEBUG". This value controls, at
compile-time, which type of log messages can be printed to the "kim.log"
file.
* KIM_API_BUILD_EXAMPLES (=ON) When ON CMake will build the example MDs, PMs,
SMs and Simulators. NOTE: this option may be removed/changed in future
releases when the examples are incorporated into the documentation.
Additionally, the KIM API defines the following advanced build options.
* KIM_API_PROJECT_NAME (="kim-api") This value controls the naming of many
aspects of the package build. Generally this should not be changed. It can
be used to build and install, on the same machine, two different copies
(typically different versions) of the package.
* KIM_API_ENABLE_SANITIZE (=OFF) When ON this enables the AddressSanitizer
library for detecting memory corruption bugs.
* KIM_API_ENABLE_COVERAGE (=OFF) When ON this enables gcov code coverage.
* KIM_API_CONFIGURATION_TIMESTAMP (=) This is
used as part of the universal ID for the kim-api installation.
* KIM_API_CMAKE_C_COMPILER (="${CMAKE_C_COMPILER}") This value is recorded and
used after installation for compilation of items (MDs, PMs, SMs, etc.) to
ensure binary compatibility with the installed KIM API.
* KIM_API_CMAKE_CXX_COMPILER (="${CMAKE_CXX_COMPILER}") This value is recorded
and used after installation for compilation of items (MDs, PMs, SMs, etc.)
to ensure binary compatibility with the installed KIM API.
* KIM_API_CMAKE_Fortran_COMPILER (="${CMAKE_Fortran_COMPILER}") This value is
recorded and used after installation for compilation of items (MDs, PMs, SMs,
etc.) to ensure binary compatibility with the installed KIM API.
* KIM_API_USER_CONFIGURATION_FILE (=".${PROJECT_NAME}/config") This value
determines the default name of the KIM API user configuration file. If the
value corresponds to a relative path (does not start with "/"), then it is
interpreted as relative to the user's home directory "${HOME}".
* KIM_API_USER_MODEL_DRIVERS_DIR_DEFAULT
(="~/.${PROJECT_NAME}//model-drivers") This value specifies the
default colon ':' (semicolon ';' on windows) separated list of the MD
directory locations for the user collection.
* KIM_API_USER_PORTABLE_MODELS_DIR_DEFAULT
(="~/.${PROJECT_NAME}//portable-drivers") This value specifies
the default colon ':' (semicolon ';' on windows) separated list of the PM
directory locations for the user collection.
* KIM_API_USER_SIMULATOR_MODELS_DIR_DEFAULT
(="~/.${PROJECT_NAME}//simulator-models") This value specifies
the default colon ':' (semicolon ';' on windows) separated list of the SM
directory locations for the user collection.
* KIM_API_SYSTEM_MODEL_DRIVERS_DIR
(="${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME}/model-drivers") This value
specifies a colon ':' (semicolon ';' on windows) separated list of the MD
directory locations in the system collection. If the value starts with a
colon (semicolon on windows), cmake will update it by prepending the default
value.
* KIM_API_SYSTEM_PORTABLE_MODELS_DIR
(="${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME}/portable-models") This value
specifies a colon ':' (semicolon ';' on windows) separated list of the PM
directory locations in the system collection. If the value starts with a
colon (semicolon on windows), cmake will update it by prepending the default
value.
* KIM_API_SYSTEM_SIMULATOR_MODELS_DIR
(="${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME}/simulator-models") This value
specifies a colon ':' (semicolon ';' on windows) separated list of the SM
directory locations in the system collection. If the value starts with a
colon (semicolon on windows), cmake will update it by prepending the default
value.
D.3 Installing multiple versions
On linux and macOS systems if you intend to install multiple versions of the
KIM API using the same installation prefix
("-DCMAKE_INSTALL_PREFIX=/install/prefix/path" argument to cmake) you must take
care that the installations do not overwrite each other. If you intend to
install multiple versions using the same prefix you must use the
"-DKIM_API_PROJECT_NAME=project-name" argument (See D.2.4 above) to cmake and
use a unique value (any string without whitespace or control characters is
valid) for each installation.
Full support for the "-DKIM_API_PROJECT_NAME" argument, as described here, was
first available in v2.0.2. For example, suppose the current version of the KIM
API were v3.2.1, and you want to also install KIM API v3.0.0, and v2.1.1.
Then, you would configure each version as follows:
* v3.2.1
$ cmake .. [additional args] # use default ("kim-api") for current version.
* v3.0.0
$ cmake .. -DKIM_API_PROJECT_NAME=kim-api3.0 [additional args]
* v2.1.1
$ cmake .. -DKIM_API_PROJECT_NAME=kim-api2.1 [additional args]
D.4 Uninstall the KIM API
When the KIM API package is installed, CMake creates a file in the build tree
named "install_manifest.txt". For the above commands this file would be
located at "${HOME}/kim-api-X.Y.Z/build/install_manifest.txt". The manifest
file contains the absolute file name of every file installed as part of the KIM
API package. The contents of the install_manifest.txt file can be used to
remove these files and, thus, uninstall the KIM API package. Thus, the
install_manifest.txt file should be saved for later use, if necessary.
For example, the following commands could be used to uninstall the KIM API
package (assuming the "install_manifest.txt" file is located in your home
directory).
$ cd "${HOME}"
$ while read line || test -n "${line}"; do sudo rm -f "${line}"; done < install_manifest.txt
A more sophisticated set of commands could also remove any empty subdirectories
left behind by this process.
It may also be desirable to remove the user configuration file and user
collection directories.
$ rm -rf "${HOME}/.kim-api"
-------------------------------------------------------------------------------
E. ADDING MDs, PMs, and SMs TO THE COLLECTIONS
Here we describe how to add MDs, PMs, and SMs to the system-collection,
user-collection, environment-variable-collection, and the CWD-collection.
E.1 ADDING MDs, PMs, and SMs TO THE SYSTEM-COLLECTION
Once you have the KIM API installed, it is easy to add additional MDs, PMs, and
SMs to the system-collection.
$ cd "${WORKSPACE}"
$ kim-api-collections-management install system --sudo Morse_Shifted_Jelinek_1972_Ar__MO_831902330215_003
$ kim-api-collections-management install system --sudo Sim_LAMMPS_ADP_PunDarlingKecskes_2015_CuTa__SM_399364650444_000
The kim-api-collections-management utility automatically installs the necessary
MD too. You can see the items in the various collections by executing the
following command.
$ kim-api-collections-management list
Now we can test the newly installed PM.
$ cd "${WORKSPACE}/utility_forces_numer_deriv/build" # we'll assume this is already built
$ printf "Morse_Shifted_Jelinek_1972_Ar__MO_831902330215_003" | ./utility_forces_numer_deriv
E.2 ADDING MDs, PMs, and SMs TO THE USER-COLLECTION
Adding MDs, PSs, and SMs to the user-collection is similar.
$ cd "${WORKSPACE}"
$ kim-api-collections-management install user LJ_Shifted_Bernardes_1958HighCutoff_Ar__MO_242741380554_003
$ kim-api-collections-management install user Sim_LAMMPS_AGNI_BotuBatraChapman_2017_Al__SM_666183636896_000
$ kim-api-collections-management list
$ cd "${WORKSPACE}/utility_forces_numer_deriv/build" # we'll assume this is already built
$ printf "LJ_Shifted_Bernardes_1958HighCutoff_Ar__MO_242741380554_003" | ./utility_forces_numer_deriv
E.3 ADDING MDs, PMs, and SMs TO THE ENVIRONMENT-VARIABLE-COLLECTION
Adding MDs, PMs, and SMs to the environment-variable-collection is similar.
$ cd "${WORKSPACE}"
$ mkdir -p "${WORKSPACE}/my-env-collection/model-drivers"
$ export KIM_API_MODEL_DRIVERS_DIR="${WORKSPACE}/my-env-collection/model-drivers"
$ mkdir -p "${WORKSPACE}/my-env-collection/portable-models"
$ export KIM_API_PORTABLE_MODELS_DIR="${WORKSPACE}/my-env-collection/portable-models"
$ mkdir -p "${WORKSPACE}/my-env-collection/simulator-models"
$ export KIM_API_SIMULATOR_MODELS_DIR="${WORKSPACE}/my-env-collection/simulator-models"
$ kim-api-collections-management install environment Morse_Shifted_GirifalcoWeizer_1959HighCutoff_Cu__MO_151002396060_003
$ kim-api-collections-management install environment Sim_LAMMPS_BOP_WardZhouWong_2012_CdZnTe__SM_409035133405_000
$ kim-api-collections-management list
$ cd "${WORKSPACE}/utility_forces_numer_deriv/build" # we'll assume this is already built
$ printf "Morse_Shifted_GirifalcoWeizer_1959HighCutoff_Cu__MO_151002396060_003" | ./utility_forces_numer_deriv
E.4 ADDING MDs, PMs, and SMs TO THE CWD-COLLECTION
Adding MDs, PMs, and SMs to the CWD-collection is, again, similar.
$ cd "${WORKSPACE}"
$ kim-api-collections-management install CWD Exp6_KongChakrabarty_1973_ArNe__MO_946046425752_002
$ kim-api-collections-management install CWD Sim_LAMMPS_MEAM_EtesamiAsadi_2018_Ni__SM_333792531460_000
$ kim-api-collections-management list
$ printf "Exp6_KongChakrabarty_1973_ArNe__MO_946046425752_002" | "${WORKSPACE}/utility_forces_numer_deriv/build/utility_forces_numer_deriv" # we'll assume this is already built
E.5 Adding MDs, PMs, and SMs from a local source directory
The kim-api-collections-management utility allows for the installation of items
from a directory on the local file system. This is useful if you are
developing an item or do not have network access to openkim.org, but already
have the source code downloaded. We'll assume that the item's source code
(including the CMakeLists.txt file, parameter files, etc) you want to install
are in directory "${WORKSPACE}/item-source". Then you simply provide this
directory name instead of the item name.
$ kim-api-collections-management install user "${WORKSPACE}/item-source"
E.6 Manually adding MDs, PMs, and SMs
If necessary a MD, PM, or SM may be manually built and installed. We'll assume
the item's source code is in the current directory
$ mkdir build
$ cd build
$ cmake .. -DKIM_API_INSTALL_COLLECTION=SYSTEM
$ make
$ sudo make install
The KIM_API_INSTALL_COLLECTION variable can also take values USER and
ENVIRONMENT.
*******************************************************************************
SUPPORT
Support is always available by posting questions with all relevant information
to
Members of the OpenKIM development team actively monitor this forum and
will do their best to respond to questions in a timely fashion.
*******************************************************************************
kim-api-2.2.1-git/LICENSE.CDDL 0000664 0000000 0000000 00000037765 13765565573 0015406 0 ustar 00root root 0000000 0000000 COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
1. Definitions.
1.1. "Contributor" means each individual or entity that
creates or contributes to the creation of Modifications.
1.2. "Contributor Version" means the combination of the
Original Software, prior Modifications used by a
Contributor (if any), and the Modifications made by that
particular Contributor.
1.3. "Covered Software" means (a) the Original Software, or
(b) Modifications, or (c) the combination of files
containing Original Software with files containing
Modifications, in each case including portions thereof.
1.4. "Executable" means the Covered Software in any form
other than Source Code.
1.5. "Initial Developer" means the individual or entity
that first makes Original Software available under this
License.
1.6. "Larger Work" means a work which combines Covered
Software or portions thereof with code not governed by the
terms of this License.
1.7. "License" means this document.
1.8. "Licensable" means having the right to grant, to the
maximum extent possible, whether at the time of the initial
grant or subsequently acquired, any and all of the rights
conveyed herein.
1.9. "Modifications" means the Source Code and Executable
form of any of the following:
A. Any file that results from an addition to,
deletion from or modification of the contents of a
file containing Original Software or previous
Modifications;
B. Any new file that contains any part of the
Original Software or previous Modification; or
C. Any new file that is contributed or otherwise made
available under the terms of this License.
1.10. "Original Software" means the Source Code and
Executable form of computer software code that is
originally released under this License.
1.11. "Patent Claims" means any patent claim(s), now owned
or hereafter acquired, including without limitation,
method, process, and apparatus claims, in any patent
Licensable by grantor.
1.12. "Source Code" means (a) the common form of computer
software code in which modifications are made and (b)
associated documentation included in or with such code.
1.13. "You" (or "Your") means an individual or a legal
entity exercising rights under, and complying with all of
the terms of, this License. For legal entities, "You"
includes any entity which controls, is controlled by, or is
under common control with You. For purposes of this
definition, "control" means (a) the power, direct or
indirect, to cause the direction or management of such
entity, whether by contract or otherwise, or (b) ownership
of more than fifty percent (50%) of the outstanding shares
or beneficial ownership of such entity.
2. License Grants.
2.1. The Initial Developer Grant.
Conditioned upon Your compliance with Section 3.1 below and
subject to third party intellectual property claims, the
Initial Developer hereby grants You a world-wide,
royalty-free, non-exclusive license:
(a) under intellectual property rights (other than
patent or trademark) Licensable by Initial Developer,
to use, reproduce, modify, display, perform,
sublicense and distribute the Original Software (or
portions thereof), with or without Modifications,
and/or as part of a Larger Work; and
(b) under Patent Claims infringed by the making,
using or selling of Original Software, to make, have
made, use, practice, sell, and offer for sale, and/or
otherwise dispose of the Original Software (or
portions thereof).
(c) The licenses granted in Sections 2.1(a) and (b)
are effective on the date Initial Developer first
distributes or otherwise makes the Original Software
available to a third party under the terms of this
License.
(d) Notwithstanding Section 2.1(b) above, no patent
license is granted: (1) for code that You delete from
the Original Software, or (2) for infringements
caused by: (i) the modification of the Original
Software, or (ii) the combination of the Original
Software with other software or devices.
2.2. Contributor Grant.
Conditioned upon Your compliance with Section 3.1 below and
subject to third party intellectual property claims, each
Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than
patent or trademark) Licensable by Contributor to
use, reproduce, modify, display, perform, sublicense
and distribute the Modifications created by such
Contributor (or portions thereof), either on an
unmodified basis, with other Modifications, as
Covered Software and/or as part of a Larger Work; and
(b) under Patent Claims infringed by the making,
using, or selling of Modifications made by that
Contributor either alone and/or in combination with
its Contributor Version (or portions of such
combination), to make, use, sell, offer for sale,
have made, and/or otherwise dispose of: (1)
Modifications made by that Contributor (or portions
thereof); and (2) the combination of Modifications
made by that Contributor with its Contributor Version
(or portions of such combination).
(c) The licenses granted in Sections 2.2(a) and
2.2(b) are effective on the date Contributor first
distributes or otherwise makes the Modifications
available to a third party.
(d) Notwithstanding Section 2.2(b) above, no patent
license is granted: (1) for any code that Contributor
has deleted from the Contributor Version; (2) for
infringements caused by: (i) third party
modifications of Contributor Version, or (ii) the
combination of Modifications made by that Contributor
with other software (except as part of the
Contributor Version) or other devices; or (3) under
Patent Claims infringed by Covered Software in the
absence of Modifications made by that Contributor.
3. Distribution Obligations.
3.1. Availability of Source Code.
Any Covered Software that You distribute or otherwise make
available in Executable form must also be made available in
Source Code form and that Source Code form must be
distributed only under the terms of this License. You must
include a copy of this License with every copy of the
Source Code form of the Covered Software You distribute or
otherwise make available. You must inform recipients of any
such Covered Software in Executable form as to how they can
obtain such Covered Software in Source Code form in a
reasonable manner on or through a medium customarily used
for software exchange.
3.2. Modifications.
The Modifications that You create or to which You
contribute are governed by the terms of this License. You
represent that You believe Your Modifications are Your
original creation(s) and/or You have sufficient rights to
grant the rights conveyed by this License.
3.3. Required Notices.
You must include a notice in each of Your Modifications
that identifies You as the Contributor of the Modification.
You may not remove or alter any copyright, patent or
trademark notices contained within the Covered Software, or
any notices of licensing or any descriptive text giving
attribution to any Contributor or the Initial Developer.
3.4. Application of Additional Terms.
You may not offer or impose any terms on any Covered
Software in Source Code form that alters or restricts the
applicable version of this License or the recipients'
rights hereunder. You may choose to offer, and to charge a
fee for, warranty, support, indemnity or liability
obligations to one or more recipients of Covered Software.
However, you may do so only on Your own behalf, and not on
behalf of the Initial Developer or any Contributor. You
must make it absolutely clear that any such warranty,
support, indemnity or liability obligation is offered by
You alone, and You hereby agree to indemnify the Initial
Developer and every Contributor for any liability incurred
by the Initial Developer or such Contributor as a result of
warranty, support, indemnity or liability terms You offer.
3.5. Distribution of Executable Versions.
You may distribute the Executable form of the Covered
Software under the terms of this License or under the terms
of a license of Your choice, which may contain terms
different from this License, provided that You are in
compliance with the terms of this License and that the
license for the Executable form does not attempt to limit
or alter the recipient's rights in the Source Code form
from the rights set forth in this License. If You
distribute the Covered Software in Executable form under a
different license, You must make it absolutely clear that
any terms which differ from this License are offered by You
alone, not by the Initial Developer or Contributor. You
hereby agree to indemnify the Initial Developer and every
Contributor for any liability incurred by the Initial
Developer or such Contributor as a result of any such terms
You offer.
3.6. Larger Works.
You may create a Larger Work by combining Covered Software
with other code not governed by the terms of this License
and distribute the Larger Work as a single product. In such
a case, You must make sure the requirements of this License
are fulfilled for the Covered Software.
4. Versions of the License.
4.1. New Versions.
Sun Microsystems, Inc. is the initial license steward and
may publish revised and/or new versions of this License
from time to time. Each version will be given a
distinguishing version number. Except as provided in
Section 4.3, no one other than the license steward has the
right to modify this License.
4.2. Effect of New Versions.
You may always continue to use, distribute or otherwise
make the Covered Software available under the terms of the
version of the License under which You originally received
the Covered Software. If the Initial Developer includes a
notice in the Original Software prohibiting it from being
distributed or otherwise made available under any
subsequent version of the License, You must distribute and
make the Covered Software available under the terms of the
version of the License under which You originally received
the Covered Software. Otherwise, You may also choose to
use, distribute or otherwise make the Covered Software
available under the terms of any subsequent version of the
License published by the license steward.
4.3. Modified Versions.
When You are an Initial Developer and You want to create a
new license for Your Original Software, You may create and
use a modified version of this License if You: (a) rename
the license and remove any references to the name of the
license steward (except to note that the license differs
from this License); and (b) otherwise make it clear that
the license contains terms which differ from this License.
5. DISCLAIMER OF WARRANTY.
COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS"
BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY
COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF
ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
DISCLAIMER.
6. TERMINATION.
6.1. This License and the rights granted hereunder will
terminate automatically if You fail to comply with terms
herein and fail to cure such breach within 30 days of
becoming aware of the breach. Provisions which, by their
nature, must remain in effect beyond the termination of
this License shall survive.
6.2. If You assert a patent infringement claim (excluding
declaratory judgment actions) against Initial Developer or
a Contributor (the Initial Developer or Contributor against
whom You assert such claim is referred to as "Participant")
alleging that the Participant Software (meaning the
Contributor Version where the Participant is a Contributor
or the Original Software where the Participant is the
Initial Developer) directly or indirectly infringes any
patent, then any and all rights granted directly or
indirectly to You by such Participant, the Initial
Developer (if the Initial Developer is not the Participant)
and all Contributors under Sections 2.1 and/or 2.2 of this
License shall, upon 60 days notice from Participant
terminate prospectively and automatically at the expiration
of such 60 day notice period, unless if within such 60 day
period You withdraw Your claim with respect to the
Participant Software against such Participant either
unilaterally or pursuant to a written agreement with
Participant.
6.3. In the event of termination under Sections 6.1 or 6.2
above, all end user licenses that have been validly granted
by You or any distributor hereunder prior to termination
(excluding licenses granted to You by any distributor)
shall survive termination.
7. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE
LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK
STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT
APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO
NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT
APPLY TO YOU.
8. U.S. GOVERNMENT END USERS.
The Covered Software is a "commercial item," as that term is
defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial
computer software" (as that term is defined at 48 C.F.R.
252.227-7014(a)(1)) and "commercial computer software
documentation" as such terms are used in 48 C.F.R. 12.212 (Sept.
1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
through 227.7202-4 (June 1995), all U.S. Government End Users
acquire Covered Software with only those rights set forth herein.
This U.S. Government Rights clause is in lieu of, and supersedes,
any other FAR, DFAR, or other clause or provision that addresses
Government rights in computer software under this License.
9. MISCELLANEOUS.
This License represents the complete agreement concerning subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the
extent necessary to make it enforceable. This License shall be
governed by the law of the jurisdiction specified in a notice
contained within the Original Software (except to the extent
applicable law, if any, provides otherwise), excluding such
jurisdiction's conflict-of-law provisions. Any litigation
relating to this License shall be subject to the jurisdiction of
the courts located in the jurisdiction and venue specified in a
notice contained within the Original Software, with the losing
party responsible for costs, including, without limitation, court
costs and reasonable attorneys' fees and expenses. The
application of the United Nations Convention on Contracts for the
International Sale of Goods is expressly excluded. Any law or
regulation which provides that the language of a contract shall
be construed against the drafter shall not apply to this License.
You agree that You alone are responsible for compliance with the
United States export administration regulations (and the export
control laws and regulation of any other countries) when You use,
distribute or otherwise make available any Covered Software.
10. RESPONSIBILITY FOR CLAIMS.
As between Initial Developer and the Contributors, each party is
responsible for claims and damages arising, directly or
indirectly, out of its utilization of rights under this License
and You agree to work with Initial Developer and Contributors to
distribute such responsibility on an equitable basis. Nothing
herein is intended or shall be deemed to constitute any admission
of liability.
kim-api-2.2.1-git/NEWS 0000664 0000000 0000000 00000121166 13765565573 0014360 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Ryan S. Elliott
# Ellad B. Tadmor
#
#
# Release: This file is part of the kim-api.git repository.
#
=== kim-api-2.2.1 =============== 13Dec2020 ====================================
* replace usage of localtime() with more secure localtime_r()
* Enable Github code scanning
* Refactor CI to move codecov support to centos docker CI and speedup macOS CI
* Fix build support for coverage
* Improvements and fixes in collections management
* Use CMake CACHE variables so kim items can override package settings
* Added discussion of standalone portable model CMakeLists.txt files to docs
* Eliminate a compiler warning
* Updates to support new version of fprettyify
* Refactor libkim-api.pc file for more standard support for relocatable
behavior
* Update travis-ci badge to use .com url
* Implement more reliable method for bash scripts to find ORIGIN
* Fix bugs in handling of -DKIM_API_SYSTEM_*_DIR=":/dir/..." build options; Add
CI testing for usage of these cases.
* Correct release date for 2.2.0 in this file (Dec -> Nov)
=== kim-api-2.2.0 =============== 18Nov2020 ====================================
* The kim-api now supports Windows. Significant additions have been made to
the code and CMakeLists.txt files to support building kim-api and items on
Windows via Cygwin and MinGW; Build on Windows requires C++17.
(Thanks to Alex Stukowski)
* kim-api is now "relocatable" after install. When installed to a non-standard
PREFIX (with the CMAKE_INSTALL_PREFIX CMake option) the entire install tree
may be moved, after install, to a new location in the file system and
everything should still work. This uses the RPATH, ${ORIGIN}, and similar
mechanisms and is functioning on Linux, macOS, and Windows. (This is tested
in the CI.)
* Added 'portable-model' utility which prints out an edn dictionary containing
information about the features and properties of a portable model. This
includes the list of supported compute arguments and callbacks, the
parameters that the model makes available at runtime, etc. The utility can
be found in the LIBEXEC install directory.
* Added Push/PopDefaultPrintFunction to KIM::Log interface to support Simulator
specific logging behavior such as the need for MPI communication to the head
node for I/O operations
* Portable Model parameter files are now guaranteed to all be found in a single
subdirectory. This provides uniform handling of parameter files for both
Portable Models and Simulator Models. New GetParameterFileDirectoryName()
and GetParameterFileBasename() routines have been added and
GetParameterFileName() has been deprecated in the KIM::ModelDriverCreate
interface. A new GetParameterFileBaseName() routine has been added and
GetParameterFileName() has been deprecated in the KIM::SimulatorModel
interface.
* Update documentation to point to new https://matsci.org discourse OpenKIM
forum
* Switch to minimum version 3.10 for CMake
* Complete refactor of CMake build details to improve exported target support.
This required an update to how kim-api items define their CMakeLists.txt
files. This version remains backward compatible with item CMakeLists.txt
files from older versions, but support for these is deprecated and will be
removed in v3.
* Added human readable CMake configuration summary log (also a detailed
version) which is printed at the end of the cmake configuration step
* Added new documentation page describing CMakeLists.txt files for the various
kim-api item types
* Added native CMake implementation of xxd processing which allows the package
to be build on systems without the xxd executable
* The collections-management utility will now use curl if wget is not available
on the system
* Added a user-agent string to wget/curl commands so downloads and queries may
be identified as coming from the collections-management utility
* Improve debugging of collections-management behavior with new CM_VERBOSITY
environment variable and added better error messages
* Full refactoring of travis-ci, docker, and testing implementation
* Added support for openSUSE, ubuntu, centos, and debian to testing via docker
* Added ubuntu_cmake310 to explicitly test build with CMake version 3.10
* Added MinGW travis-ci testing (Thanks to Alex Stukowski)
* Added unique build identifier to default name for config and user collection
files
* Refactor and improve handling of deprecated identifiers in configuration file
* Check for and ignore empty kim standard metadata files
* Adopted the `fprettify` Fortran code formatter and reformat all Fortran code
to conform to the kim-api settings (now in .fprettify.rc). Added scripts to
support git-commit hook
* Refactor #includes to satisfy include-what-you-use linter
* Refactor initialization of pointers as best practice
* Fix a bug in C language binding for SimulatorModel Interface
* Fix a bug associated with the edn-cpp use of exceptions
* Fix issues identified by Coverity Scan
* Various fixes and improvements
* Various documentation updates
=== kim-api-2.1.3 =============== 16Aug2019 ====================================
* Adjust kim_collections_module to work around gfortran <= 4.8 bug.
* Fix minor bug in collections-management.
* Improve backward compatibility support for ~/.kim-api/config file format.
* Fix to Fortran/C mapping of KIM_LENGTH_UNIT_BOHR.
* Fixes to Fortran documentation and cross-references.
* Added information/links to the top level README.md
=== kim-api-2.1.2 =============== 29Jul2019 ====================================
* Fixup Fortran kim_collections_module interfaces to be consistent with c/c++.
* Fixup collections-management for portabability to dash.
* Improve item-wrapper.cpp.in for more standard compliant MD, MO, SM behavior.
* Improve zsh completion install behavior.
* Fixup Fortran c_long communication and overflow behavior.
* Add missing testing of interface in examples/simulators/collections-example.
* Improve example/simulators to remove warnings.
* Fix bug in KIM::SimulatorModel::Create().
=== kim-api-2.1.1 =============== 24Jul2019 ====================================
* Refactor 'kim-api-collections-management list' code for performance.
* Update collections-management to use 'make -j2' for improved performance.
* Improve kim-api-collections-management handling of passwords for use with
sudo. Specifically, support reading of passwords with whitespace and other
special characters.
* Add zsh support to activate/deactivate scripts & zsh completions.
* Fix c_long overflow (for i386 systems) bug in Fortran kim_collections_module.
* Rework 'kim-api-collections-management install xxx OpenKIM' behavior. Now
installs the latest official release archive found at
https://s3.openkim.org/archives/collection/. This also greatly reduces the
total build and install time.
* Redefine/refactor KIM::Collections behavior for finding item names.
Previously, a shared library file was found, opened, and checked for
validity. To significantly improve performance, now simply the existence of
the shared library file is used to identify available item names.
* Redefine/refactor collections-management and collections-info to remove
'--with-version' option.
* Fixup and improve Fortran example codes.
* Added reopology.org graphic of available binaries to README.md.
=== kim-api-2.1.0 =============== 16Jul2019 ====================================
* Added new KIM::SimulatorModel interface providing programatic support to
simulators for packaging of parameter files, input commands, and metadata
necessary to run a simulator's native potentials.
* Added new KIM::Collections interface (and the supporting extensible
enumerations KIM::Collection and KIM::CollectionItemTypes) providing
programatic access to the KIM API Collections and its configuration settings.
(This included a refactor and removal of old_KIM_API_DIRS.*.)
* Convert from old 'models' to 'portable-models' nomenclature for KIM API
collections, including environment variables, configuration file, etc. (For
backward compatibility, the old configuration file format is still accepted.)
* Added support for Metadata files to (internal) KIM::SharedLibrary and
programatic access to these files from the new KIM::Collections interface.
* Automatically add standard openkim.org metadata files (kimspec.edn,
kimprovenance.edn, and kimcite-*.bib) to an item's shared library if they
exist.
* Significant documentation updates to describe the new interfaces as well as
changing to the the Portable Model (PM) and Simulator Model (SM) terminology.
* Added explicit documentation of Fortran interfaces for routines called by the
KIM API (ModelCreate, ModelDestroy, GetNeighborList, etc.).
* Added mention of "Toy Models" to documentation.
* Added data-type error checking for Portable Model parameter get/set routines;
Thanks to Daniel Schopf.
* Bug fixes and improvements to kim-api-collections-management script
* Added support for Include-What-You-Use (IWYU).
* Added (internal) copy of edn-cpp parser for use with SMs.
* Updated existing examples as necessary and added SM example.
* Added new "unit-test" examples of simulators using the Collections and SM
interfaces.
* Improvement to pkgconfig support; Thanks to Christoph Junghans.
* Added new tests to CI, based on INSTALL file.
* Updates create-package script and added run-cmds-from-install script.
* Added .clang-format-hook-ignore file and mechanism (specifically for edn-cpp).
* Updates to better support binary installation on various systems.
* Added CDDL headers to files that did not have them.
=== kim-api-2.0.2 =============== 28Mar2019 ====================================
* Transition from 'kim-api-v2' naming to 'kim-api' for better alignment with
open source conventions
* Added a simulator model example
* Refactored support for simulator models: separated from models in collections.
Updated collections-management utility appropriately
* Updated calls to scanf() for better security
* Refactored old_KIM_API_DIRS.cpp to remove calls to 'exit()'
* Added build options to set system collection directories
* Added support for colon-separated list of directories for user and system
collections
* Added '--version' flag to utilities
* Update bash completion to work with old and new bash
* Improve robustness of creat-package script
* Updated badges to point to 'devel' branch & create-package to change to
'master' branch for release commit
* Added coverity & codecov badges to README.md
* Added vX.Y.Z-git tags to git repo and updated create-package script
* Added NEWS file to Doxygen documentation & updated doxygen settings
* Improved version build metadata string using "git describe"
* Updated link flags for codecov
=== kim-api-v2-2.0.1 ============ 27Feb2019 ====================================
* Fix bug in KIM::SemVer::ParseSemVer()
* Various minor fixes to address issues identified by Coverity Scan
* Fix version string in libkim-api-v2.pc to conform to RPM schema
* Added advanced CMake options for compilers used to build items after install
* Added item install prefix CMake variables to cache; helps with packaging
* Remove dead code in top level CMakeLists.txt
=== kim-api-v2-2.0.0 ============ 06Feb2019 ====================================
* Update main documentation.
* Added function level documentation with cross-references and input/output
argument descriptions.
* Added Known() member function to extensible enumerations.
* Extensible enumeration default constructors now create uninitialized objects.
* Rename C++ *.String() routines to *.ToString.
* Added 'recursive' to all Fortran routines (for better thread safety).
* Added support files for readthedocs.
* Additions and fixes for collections-management utility.
* Travis CI configuration updates.
* Avoid some compiler warnings from clang.
* Various CMake fixes/adjustments.
* Various bug fixes in api code.
=== kim-api-v2-2.0.0-beta.3 ===== 07Dec2018 ====================================
* Updated and added examples to work with and demonstrate api changes/additions
* Implemented new KIM::Model::IsRoutinePresent interface to facilitate
backward compatibility
* Updated SpeciesName entries for recently renamed periodic table elements
* Added WriteParameterizedModel Routine and assoc. code
* Added Extension Routine to allow for non-standard extensions
* Added Push/Pop Default Verbosity to KIM::Log
* Changed Release default LogVerbosity to INFORMATION
* Added ctest test for items to check that shared libraries can be opened
* Improvements to Collections-Management behavior
* Removed unnecessary header files
* Updated travis.ci configuration
* Refactored some backend implementation to improve maintainability, including
significant new KIM_SharedLibrarySchema interface
* Improvements to CMake build system
* Updated create-package script
* Updated documentation
=== kim-api-v2.0.0-beta.2 ======= 28Oct2018 ====================================
* CMake build and test replaces custom Makefiles; added travis, gitlab CI
A big thank you to Richard Berger and Christoph Junghans for their major
contribution in getting the KIM API package converted to CMake.
* Using standard pkg-config setup instead of custom kim-api-v2-build-config
* Major restructuring of the Fortran bindings.
* Make ModelRefresh and ModelComputeArgumentsDestroy functions optional
* Add Model routine and callback prototypes in KIM_Functions header
* Add a required unique name field for parameters.
* Refactoring of neighbor list hints. The half-list hint had a fatal flaw
which required its removal.
* Significant refactoring of the logging macros in C and C++. Complete removal
of all preprocessing for Fortran.
* Redesign of release and packaging script and process.
* Added a couple of new models that illustrate various features of the api.
* Removed v1 to v2 porting guide.
* "Summary of Differences Between kim-api-v1 and kim-api-v2" docs page now
contains tables with a complete listing of all kim-api identifiers in all
languages and their mappings between one-another.
* Complete update of documentation. Rework and correct definition of
partialVirial and partialParticleVirial.
* Added emacs cc-mode settings
* Added clang-format settings, scripts, and git-hooks for C/C++
* Complete review of C++, C, and Fortran bindings for consistency
* Many other small and not-so-small changes.
=== kim-api-v2.0.0-beta.1 ======= 07Jul2018 ====================================
* Fix memory leak and uninitialized variables id'ed by coverity scan.
* Update docs and porting guide for neighbor list hints changes.
* Implement neighbor list hints (paddingNeighbor & halfList); update examples.
* Add SetArgumentPointer(xxx * const ptr) to C++ bindings for consistency.
* Add C++ LennardJones_Ar stand-alone model example.
* Fix compatibility checking code in example simulators.
* Update LennardJones612 example to use 1/2 list short-circuit mechanism.
* Fix collections-info to set log verbosity to debug.
* Use NULL consistently to initialize pointers in implemenation code.
=== kim-api-v1.9.7 ============== 07Jul2018 ====================================
* Check for errors from mkdir() in KIM_API_DIRS.cpp (id'ed by coverity scan).
* Fix support for required-compute of forces in utility-forces-numer-deriv.
* Fix identifiers in bash-completions.
* Added --log option to CM 'list' command.
* Use fixed seed for random number generator in utility-forces-numer-deriv.
=== kim-api-v2.0.0-beta.0 ======= 26Jun2018 ====================================
* Added a 'Guide for porting content from KIM API v1 to v2' to documentation
* Documentation updates and improvements
* Implemented extensive error checking and logging within the API
* Separated Model object into ComputeArguments and Model
* Many refinements and corrections to the new API
=== kim-api-v1.9.6 ============== 26Jun2018 ====================================
* Updated INSTALL file
* Added 'install OpenKIM_with_history' and 'install --force' options to the
collections-management utility
* Collections-management utility now cleanly handles an unaccessible openkim.org
* Fixed bugs and made improvements to build system
=== kim-api-v1.9.5 ============== 12May2018 ====================================
* Update build system to support parallel builds (make -j).
* Fixed bug in collections-management for "install OpenKIM" option.
* Update INSTALL file
=== kim-api-v1.9.4 ============== 09Apr2018 ====================================
* Added '--interactive' option to collections-management utility.
* Added Travis-CI support through GitHub.
* Fixed bugs in collections-management utility.
* Fixed bugs in build system.
=== kim-api-v1.9.3 ============== 10Feb2018 ====================================
* Major additions to options supported by the kim-api-v1-collections-management
utility. Added options include:
- list --with-version
- install CWD
- install environment
- reinstall
- remove-all
Additionally, items can now be installed from a source directory on the local
file system. Also, multiple items can be listed on a single command line.
* Added a kim-api-v1-activate/deactivate utilities (available when installed to
non-standard locations). These add/remove to PATH and setup the bash
completions.
* Added bash completions for user utilities
* Added support for the sysconfdir variable to the build system
* Updated utilities to more closely follow docopt.org specifications.
* Model/Driver 'make install-*' now respect the DESTDIR environment variable.
* Added support for Model/Driver install to the environment collection.
* Add tracking of Parameterized Model parameter file file-names within the
generated model shared library.
* Rename vc_* examples to utility_* to avoid confusion with new openkim.org
Verification Checks.
* Various minor typo and bug fixes.
=== kim-api-v2.0.0-alpha.0 ====== 18Jan2018 ====================================
* Complete rewrite of the kim-api package. Released as "alpha" to solicit
feedback from the user community. Changes (possibly incompatible) will be
made based on user experience.
* Major changes are summarized below.
* NBCs have been eliminated.
* KIM descriptor files have been eliminated.
* A new memory management scheme has been adopted.
* The api is now much more consistent within each language (C++, C, Fortran)
binding.
* Improved logging facilities and error messages.
* Added Doxygen generated documentation. (See the docs for more details on
this version of the kim-api and on the differences between v1 and v2.)
=== kim-api-v1.9.2 ============== 08Oct2017 ====================================
* Update scripts to use xz compressed tarballs (txz) instead of gz (tgz). This
is for compatibility with the recent removal of tgz support on openkim.org.
=== kim-api-v1.9.1 ============== 27Sep2017 ====================================
* Adjustment to build config flags to make cross-language compiling a bit more
flexible
* Fix subtle Fortran implementation bug associated with non-short-circuit
conditional fortran behavior
* Remove 'make install-set-default-to-v1' target and update INSTALL instructions
No longer have kim-api-build-config, etc. Now they explicitly include the
major version number. For example, kim-api-v1-build-config
* Make some shell code more portable
* Fixed some other installation details
* Fixed missing semi-colon in makefile
=== kim-api-v1.9.0 ============== 09Sep2017 ====================================
* Added collections-management user utility to manage build and install
of OpenKIM Models and Model Drivers
* Added support for "Simulator Models"
* Dramatically simplify build system by removing supported scenarios.
+ Removed static-link build option
+ Removed "in-place" build scenario
+ Added support and use of the libexec directory to distinguish between
user executable utilities and program executable utilities
* Incorporate fix to configure script contributed by Christoph Junghans
* Fix minor bugs in KIM_API_DIRS
=== kim-api-v1.8.2 ============== 17Apr2017 ====================================
* Fixed issues reaised by Tobias Brink (this==NULL; and `find` portability)
=== kim-api-v1.8.1 ============== 28Mar2017 ====================================
* Added additional deprecations in prep. for kim-api-v2.0.0
* Fixed other minor bugs in create_package script and build-config.cpp
* Fixed bug in Makefile.ParameterizedModel
* Fixed formatting error in Makefiles created by build-config utility
* Fixed bug in ex_model_Ar_P_MLJ_CLUSTER_C example model
=== kim-api-v1.8.0 ============== 17Jan2017 ====================================
* Deprecated significatant features and methods in prep. for kim-api-v2.0.0
* Updated `build-config' utility with more flexible options
* Removed `KIM_LINK = dynamic-link' option of build system
* Modified/Fixed/Improved the configuration and build system
* Added `collections-info' utility for querying environment variables,
user configuration files, and lists of models and model drivers in the
collections.
=== kim-api-v1.7.3 ============== 02Jun2016 ====================================
* Added a `configure' script for setting up Makefile.KIM_Config
* Added support for environment-variable-collection
* Added support for user_config_file_dir_name setting
* Documentation update/improvements
* Minor improvements to error messages
* Added `make add-OpenKIM' feature
* Added `make help' feature
* Added release dates to NEWS file
* Bug fixs
=== kim-api-v1.7.2 ============== 25Jun2015 ====================================
* Updated copyright years in files
* Rewrite of INSTALL file to provide a significantly improved description and
instructions for build and installation of the KIM API
* Fix error checking bug in ex_test_Ar_multiple_models Test
* Improve the build and install process to better follow standard conventions
for library soname values.
* Increased the maximum number of species supported by the example Tests to 200
* Fixed bug in example Tests related to maximum number of supported species
* Updated 'make clean' so that it removes all old library files in the source
directories
* Fixed default make target for Parameterized Models
* Fixed a bug in the installation process associated with the use of DESTDIR
* Fixed a regular expression error in the build system
* Fixed memory leak in internal KIM API code
* Added sanity check to make sure that the 'xxd' utility is available
* vc_forces_numer_deriv now outputs configuration energy
* Documentation updates
=== kim-api-v1.7.1 ============== 02Dec2014 ====================================
* Bug fix for build of parameterized Models
* Minor documentation update
=== kim-api-v1.7.0 ============== 21Nov2014 ====================================
* Use 'xxd' utility for encapsulation of KIM descriptor files and param. files
* Added LINKSOPATH variable to build system for advanced system install options
* Added KIM_API_get_kim_str_len() routine
* Fix inconsistencies in ex_test_Ar_multiple_models
* remove build system dependency on 'ed' program
* Update 'make add-*' mechanism to use permanent url's for openkim.org items
* Fix bugs and minor improvements to build system
* Minor improvements to error messages
* Updates to documentation
=== kim-api-v1.6.3 ============== 18Aug2014 ====================================
* Fixed install to recognize := and = in Makefiles
* Removed use of non-standard strtok_r()
* Fixes to ex_model_Cu_PF_Johnson & model_El_PF_Template.c
* Fixes build system
=== kim-api-v1.6.2 ============== 11Aug2014 ====================================
* Correct KIM_API_Versions in template ".kim" files
* Update make clean target for Model Drivers and Models
* All template ".kim" files now generated from "legos" in git repo
=== kim-api-v1.6.1 ============== 08Aug2014 ====================================
* Updates to Model Driver and Model template files (in docs/templates/)
* Changed the internal mechanism for handling parameter files to remove a
security hole associated with the use of tmpnam().
* Revise kim.log entries to be more informative and clear
* Bug fixes in build system, examples, and build system
* Other small documentation and code improvements
=== kim-api-v1.6.0 ============== 28Jul2014 ====================================
* Documentation updates.
* Model Driver Template and training model examples are now generated from a
single consistent "lego" file. Training examples are not included in
official release tarballs.
* Add SemVer version routines to the KIM API. ".kim" files now require a
KIM_API_Version line to indicate the Model/Simulator compatibility.
* Change terminology from "Particle Types" to "Particle Species" for clarity
and uniformity with the rest of the OpenKIM project. (See
KIM_API_get_model_species(), and similar routines.)
* Changed KIM API routines that output strings. This avoids output of arrays
of strings, which are unnatural in C/C++ and allows for more natural handling
of string arguments in Fortran. (See: KIM_API_get_NBC_method(),
KIM_API_get_params(), and similar routines.)
* Simulators and OpenKIM Tests now should use the "kim-api-build-config"
utility in order to obtain appropriate compiler and linker flags for building
against the KIM API.
* Changed CCFLAGS to more standard CFLAGS Make variable.
* Build system now provides ability to download Model Drivers and Models
directly from openkim.org.
* Change package name from "openkim-api" to "kim-api".
* Rename this file (CHANGELOG) to NEWS, to better follow convention.
* A complete restructuring of the package directory layout has been performed
in order to conform to more standard practices and to better reflect the
intended behavior and use of the package components.
* Model Drivers now specify the name of their ".kim" file template in their
Makefile. The conventional name for these files now ends in ".kim.tpl".
* Model ".kim" file name is now specified in the Makefile and can be anything
the developer desires.
* Remove deprecated KIM_API_init() routine.
* Remove deprecated Fortran Cray pointer support.
=== openkim-api-v1.5.0 ========== 16Jul2014 ====================================
* Documentation updates, including an extensive discussion of the installation
process in INSTALL.
* Update examples to use KIM_API_file_init() and name their ".kim" file
"descriptor.kim" in accordance with the new convention of the openkim.org
processing pipeline.
* Deprecate KIM_API_init() and add KIM_API_file_init() to replace it as the
primary openkim.org Tests should initialize the KIM API and specify their KIM
descriptor files.
* Portability fixes for the make system
* Move away from naming various files based on the item (Model Driver, Model,
Test) name. Instead establish standard names for each item type.
* Added Makefile.Version to provided the make system with version information
and set policy (based on SemVer 2.0.0) for how, when, and why to update the
version.
* Significant updates to the make system. Primarily associated with
installation of the KIM API to a system-wide location, and its use once
installed there.
=== openkim-api-v1.4.1 ========== 19May2014 ====================================
* Added additional compiler flags to support differences between GCC and INTEL
* Fixed examples that used set_data when they should have used set_method.
* Added LDLIBS flag in split functionality of LDFLAGS variable more
appropriately. This is more inline with standard Makefile practice.
* Now 32Bit and 64Bit settings add -m32 and -m64 compiler flags automatically
* Added KIM_MAKE_VERBOSITY setting to Make system
* Updates to README, INSTALL, and Templates
* Make system improvements and fixes
* Added checks for known buggy compilers
* Updated and corrected documentation
=== openkim-api-v1.4.0 ========== 26Feb2014 ====================================
* Improvements to robustness and efficiency of MAKE_SYSTEM
* Updated copyright years in files
* Updated documentation to reflect new Fortran 2003 bindings
* Converted DOCS/TEMPLATES/ to Fortran 2003 bindings
* Made significant improvement to neighbor list handling in example Tests
* Made some minor improvements to example Models and Model Drivers
* Converted example Models, Model Drivers, and Tests to Fortran 2003 bindings
* DEPRECATED all Cray pointer bindings and associated code
* Added Fortran 2003 bindings
=== openkim-api-v1.3.1 ========== 20Jan2014 ====================================
* Fixes to make system to avoid undefined `directoryPATH()' symbol with INTEL
compilers and CYGWIN systems
* Added notes to INSTALL for gun 4.4 and CYGWIN systems
* Fixes to make system to work with gnu make 3.81 (avoid segmentation faults)
=== openkim-api-v1.3.0 ========== 10Dec2013 ====================================
* change KIM_KEY_STRING_LENGTH to 128 (despite git log that says 257)
* Split .kim files and parameter files into chunks to stay under C++ supported
string literal length.
* Fix for dynamic-link compile option
* Some minor code fixes/updates and documentation updates
* Updates to `make install'
* Fix bug in FCC example Tests
* Fix/Update Templates
* Fix a bug in Makefile.Test
* Added KIM_API_get_rank and KIM_API_get_rank_by_index functions
=== openkim-api-v1.2.3 ========== 15Nov2013 ====================================
* Fixed bugs in the KIM_API_string_init() function (discovered by Daniel Schopf)
* Fixed a memory leak in the api (patch provided by Tobias Brink)
* Moved `include "KIM_API_DIRS.h"' from KIM_API.h to KIM_API.cpp. This ensures
that this header file does not need to be installed by the `make install'
command.
* Changes to Makefiles to improve portability (of `make uninstall')
* Some minor changes to api code to remove compiler warnings from some compilers
=== openkim-api-v1.2.2 ========== 17Sep2013 ====================================
* Improved speed of make system when many Models/Tests (and Drivers) exist
* Improved an aspect of the api's error checking/reporting
=== openkim-api-v1.2.1 ========== 21Jul2013 ====================================
* Reverted to gnu make v3.81 from v3.82 to better represent actual needs.
=== openkim-api-v1.2.0 ========== 12Jul2013 ====================================
* Documentation updates.
* Various bug fixes.
* Added support for searching ${HOME}/.kim/ and ./ for Models and Model Drivers
when the package is installed via the `make install' command.
* Added install and uninstall targets to the Make system.
* Now the build system (in dynamic-load and dynamic-link modes) hides all
symbols in the Model Driver and Model libraries except for the model_init()
function and the Model's kim descriptor string. This means that there is no
need to worry about symbol clashes between Models, Model Drivers, or Tests.
* Implemented dynamic-load, dynamic-link, and static-link build options.
* Make system now provides only summary information on the build process. This
makes the progress easier to understand. To see the actual build commands
use `make -n'.
* Removed `integer*8' and changed `real' and `real*8' to `float' and `double'.
* Now use -g, -Wall, and -pedantic by default for all compilations.
* Changed model_init() function conventions to simplify the scheme. This also
resulted in the removal of the Model or Test name from the descriptor files.
* Added the openkim-api-descriptor-file-match utility.
* Completely rewrote and streamlined the openkim-api Make system
* Changed directory names from trailing `s' to trailing `S'.
* Updated example Tests and Models to use the new get/set method routines.
* Added `const' to api string parameters to avoid warnings in Models and Tests
* Added get/set method routines to properly transfer pointers to functions
or methods via the api.
* Added support to examples for NEIGH_RVEC_H.
* Added the NEIGH_RVEC_H NBC method.
* Added ex_free_cluster_CLUSTER_memory F90 Test which manages its own memory.
* Added ex_model_Cu_PF_Johnson C pair-functional model and template.
* Updates and bug fixes in example Models.
* Bug fixes for vc_forces_numer_deriv and added vc_config_ener_forces and
vc_forces_delta to the distribution.
=== openkim-api-v1.1.1 ========== 19Aug2012 ====================================
* Added run_forces_numer_deriv_for_all_models script that will run and
summarize the results of vc_forces_numer_deriv for all available Models.
* Added vc_forces_numer_deriv "verification check" that can be used with any
Model to check the consistency of its computed forces with a numerical
derivative based on the Model's energy.
* Fixed a bug in the MI_OPBC_* support for ex_model_Ne_P_fastLJ
* Fixed a bug in the make system that occurred when using static linking that
would cause some Models to be incorrectly identified as "unknown"
* ex_test_*_free_cluster and ex_test_*_free_cluster_stiff now support CLUSTER
NBC (which means they work with ALL NBC methods)
* Documentation updates
* Updated 32/64 bit switching in Fortran code for easier maintenance
* Moved library compile flags to end of command line to make sure all libraries
are correctly associated with the appropriate .so files
* Cleaned up ex_model_driver_P_* and ex_model_Ne_P_fastLJ to simplify memory
management and PARAM_* handling
=== openkim-api-v1.1.0 ========== 12Jul2012 ====================================
* Documentation updates
* Introduced the use of THIS_FILE_NAME in Fortran examples instead of __FILE__.
This allows for easily setting the value of THIS_FILE_NAME to something
appropriate (short) when the default preprocessor value of __FILE__ is longer
that 132 characters (the max line length for Fortran)
* Changed KIM standard time unit from `fs' to `ps' to be consistent with LAMMPS
`metal' unit system
* Changed KIM_COMPUTE and KIM_NOT_COMPUTE to KIM_COMPUTE_TRUE and
KIM_COMPUTE_FALSE, respectively
* Removed KIM_API_MAX_NEIGHBORS; the api no longer puts any restriction on the
number of neighbors for an atom
* Updated api and examples to always `return' with an error code instead of
`exit' or `stop'. This allows the Test to handle errors and is a better
convention for error handling
* Added KIM_STATUS_MODEL_UNSUPPORTED_CONFIGURATION for cases where a
configuration is identified at run time as unsupported
* Removed requirement for a trailing `/' in environment variables (such as
$KIM_DIR)
* Added make warning if `make' is invoked from a Model directory when static
linking is being used.
* Added `make examples-force' target
* `make examples' only copies files; it no longer also compiles everything
* Changed all call-back interfaces (model_init, model_reinit, model_compute,
model_destroy) to be consistent: integer functions (in Fortran speak). Also
updated examples and templates to conform to this new interface.
* Added get_model_partcl_typs() and get_test_partcl_type() service routines
Removed get_partcl_types() routine.
* Added ability of a Model/Model Driver to set its particle type codes at
runtime
* Added support for .kimignore files in MODELS, MODEL_DRIVERS, and TESTS
directories
* Added `Temperature' to standard.kim for "temperature dependent" Models
* New Model Driver interface supports reading from any number of files (not
strings)
* Support for 001-999 particle types in Model Drivers
* Use $(strip ) function to avoid difficult trailing space problem in make files
* Rearranged and simplify compiler settings files
(KIM_API/*_compiler_settings.mk)
* Changed CPPLIBFLAG to LINKLIBFLAG in Make files to better represent its use
* Many improvements to Make-system portability
* Carriage returns are now striped from kim and parameter files during Make
* Improvements to the vc_forces_numer_deriv verification check
* Bug fixes for KIM_API_init() matching
* Significant clean-up/rearrangement of core api code
=== openkim-api-v1.0.1 ========== 25Feb2012 ====================================
* Bug fix to ex_model_Ne_P_fastLJ
* Bug fix to ex_model_Al_PF_ErcolessiAdams (and associated template file)
* Documentation updates
=== openkim-api-v1.0.0 ========== 22Feb2012 ====================================
* Moved all examples to EXAMPLES directory and added `make examples' target.
* Renamed all example Model Drivers, Models, and Tests. Now have `ex_' prefix.
* Renamed nearly all API functions to improve readability and comprehension.
* Changed KIM_API_get_half_neigh and KIM_API_get_full_neigh to just
KIM_API_get_neigh.
* Total re-work of unit handling for the API.
* Added KIM_API_model_info() function for Tests to use for discovering what a
Model supports.
* Added KIM_API_getm_* and KIM_API_setm_* routines to get/set multiple arguments
in one function call.
* Added KIM_API_sting_init() for use by Tests that generate their KIM descriptor
file "on-the-fly".
* Added process_dEdr and process_dE2dr2 approach for calculating general
properties. Currently automatic support for `virial', `particleVirial', and
`hessian' is available.
* Added "unsymmetric half neighbor lists" (numberContributingParticles).
* Added model/test buffers for use by Model and Test, respectively.
* Improvements in dynamic linking setup.
* Examples additions, improvements, and bug fixes.
* Bug fixes.
=== openkim-api-v0.2.0 ========== 15Sep2011 ====================================
* Updated documentation
* Added KIM_API_report_error() service function and updated all examples
and templates to use this function.
* Added KIMstatus.h which contains definitions of KIM status codes.
* Added KIM_API_status_msg() service routine to return a string describing a
given status code.
* Updated messages printed to kim.log file to be more informative.
* Model KIM descriptor files are now incorporated into the Model's binary
library file. This means that the file is no longer required at run time and
that the Model must be recompiled after changes to the descriptor file.
* Added Model Driver Templates
* Added two Model Drivers and four Models based on the Model Drivers
* Removed example model_Ar_P_MMorse in favor of the Morse Driver and its Models
* Added support for Model Drivers
* Bug fixes
=== openkim-api-v0.1.2 ========== 22Aug2011 ====================================
* Fixed a number of bugs in the examples related to running on 64bit machines
* Fixed a bug in kim_api_get_nbc_method_f() related to running on 64bit
machines
=== openkim-api-v0.1.1 ========== 16Aug2011 ====================================
* Fixed memory handling bug associated with the service functions
KIM_API_get_listAtomTypes()
KIM_API_get_listParams()
KIM_API_get_listFreeParams()
KIM_API_get_listFixedParams()
KIM_API_get_NBC_method()
* Fixed bug in test_**_free_cluster.F90
* Renamed `README.git' to `README_GIT' to avoid confusion with the
git convention that the extension `.git' refers to a bare repository
=== openkim-api-v0.1.0 ========== 08Aug2011 ====================================
* Added TEMPLATE files to help users create their own KIM Models.
* Added a number of example Models and Tests to help users understand how to
implement their own openkim-api compliant codes.
* Added support for ATOM/PARTICLE types
* Added support for Models to publish their parameters
* Added support for Models to define a `reinit' function for use when their
parameters are changed by a Test.
* Improved the Makefile system in general (although, more needs to be done)
* Added support for neighbor list and boundary conditions (NBC)
* Added support for dynamic linking
* Updated documentation
* Added documentation to the standard.kim file which now describes in detail
the format and content of KIM descriptor files.
* Added README files to every directory. These files provide a short
(hopefully helpful) description of the contents of the directory)
=== openkim-api-v0.0.0 =========================================================
The initial release of the openkim-api package. This was first made available
to participants at the Inaugural Openkim Workshop held in San Diego, CA on
Feb. 26-27, 2011.
kim-api-2.2.1-git/README.md 0000664 0000000 0000000 00000007501 13765565573 0015134 0 ustar 00root root 0000000 0000000
[](https://travis-ci.com/openkim/kim-api)
[](https://kim-api.readthedocs.io/en/devel/?badge=devel)
[](https://scan.coverity.com/projects/openkim-kim-api)
[](https://codecov.io/gh/openkim/kim-api/branch/devel)
The KIM API package
The KIM API package is a system-level library that aims to give computer
programmers the ability to write atomistic or molecular simulation programs
that can seamlessly interface with implementations of interatomic models,
regardless of the programming language (C, C++, Fortran, Python, etc.) in which
the codes are written. It is part of the larger KIM project
(https://openkim.org).
Documentation
-------------
[Full documentation](https://kim-api.readthedocs.io/en/devel) is available online via [readthedocs.org](https://readthedocs.org)
Download
--------
All official release archives of the KIM API package can be downloaded from:
[https://openkim.org/kim-api/previous-versions](https://openkim.org/kim-api/previous-versions)
Release notes are available in the [NEWS](NEWS) file.
Installation
------------
See the [INSTALL](INSTALL) file for instructions on how to build and install
the package and its documentation.
Contributing
------------
Just send us a [pull request](https://help.github.com/articles/using-pull-requests/).
When you send your request, make `devel` the destination branch on the
[kim-api repository](https://github.com/openkim/kim-api).
Please see the [README_GIT](README_GIT) file for some additional details.
Issues, bugs, requests, ideas
-----------------------------
Use the [issues](https://github.com/openkim/kim-api/issues) tracker to report
bugs.
License
-------
The KIM API is distributed under the terms of the Common Development and
Distribution License (CDDL) Version 1.0.
All new contributions must be made under this license.
See [LICENSE.CDDL](LICENSE.CDDL) and
[http://opensource.org/licenses/CDDL-1.0](http://opensource.org/licenses/CDDL-1.0)
for details.
*******************************************************************************
SUPPORT
Support is always available by posting questions with all relevant information
to
Members of the OpenKIM development team actively monitor this forum and
will do their best to respond to questions in a timely fashion.
*******************************************************************************
kim-api-2.2.1-git/c/ 0000775 0000000 0000000 00000000000 13765565573 0014074 5 ustar 00root root 0000000 0000000 kim-api-2.2.1-git/c/include/ 0000775 0000000 0000000 00000000000 13765565573 0015517 5 ustar 00root root 0000000 0000000 kim-api-2.2.1-git/c/include/CMakeLists.txt 0000664 0000000 0000000 00000004571 13765565573 0020266 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
target_include_directories(kim-api PUBLIC
$
$
)
configure_file(KIM_Version.h.in ${CMAKE_CURRENT_BINARY_DIR}/KIM_Version.h)
set(C_HEADERS
KIM_ChargeUnit.h
KIM_Collection.h
KIM_Collections.h
KIM_CollectionItemType.h
KIM_ComputeArgumentName.h
KIM_ComputeArguments.h
KIM_ComputeCallbackName.h
KIM_DataType.h
KIM_EnergyUnit.h
KIM_FunctionTypes.h
KIM_LanguageName.h
KIM_LengthUnit.h
KIM_Log.h
KIM_LogMacros.h
KIM_LogVerbosity.h
KIM_Model.h
KIM_ModelCompute.h
KIM_ModelComputeArgumentsCreate.h
KIM_ModelComputeArgumentsDestroy.h
KIM_ModelComputeArguments.h
KIM_ModelCreate.h
KIM_ModelExtension.h
KIM_ModelDestroy.h
KIM_ModelDriverCreate.h
KIM_ModelDriverHeaders.h
KIM_ModelHeaders.h
KIM_ModelRefresh.h
KIM_ModelRoutineName.h
KIM_ModelWriteParameterizedModel.h
KIM_Numbering.h
KIM_SemVer.h
KIM_SimulatorHeaders.h
KIM_SimulatorModel.h
KIM_SpeciesName.h
KIM_SupportStatus.h
KIM_SupportedExtensions.h
KIM_TemperatureUnit.h
KIM_TimeUnit.h
KIM_UnitSystem.h
${CMAKE_CURRENT_BINARY_DIR}/KIM_Version.h
)
install(FILES ${C_HEADERS}
# use CMAKE_INSTALL_RELOC_* to get relocatable GNUInstallDir behavior
DESTINATION ${CMAKE_INSTALL_RELOC_INCLUDEDIR}/${PROJECT_NAME})
kim-api-2.2.1-git/c/include/KIM_ChargeUnit.h 0000664 0000000 0000000 00000013175 13765565573 0020430 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_CHARGE_UNIT_H_
#define KIM_CHARGE_UNIT_H_
/**
** \brief \copybrief KIM::ChargeUnit
**
** \sa KIM::ChargeUnit, kim_charge_unit_module::kim_charge_unit_type
**
** \since 2.0
**/
struct KIM_ChargeUnit
{
/**
** \brief \copybrief KIM::ChargeUnit::chargeUnitID
**
** \sa KIM::ChargeUnit::chargeUnitID,
** kim_charge_unit_module::kim_charge_unit_type::charge_unit_id
**
** \since 2.0
**/
int chargeUnitID;
};
#ifndef KIM_CHARGE_UNIT_DEFINED_
#define KIM_CHARGE_UNIT_DEFINED_
/**
** \brief Convenience typedef.
**
** \since 2.0
**/
typedef struct KIM_ChargeUnit KIM_ChargeUnit;
#endif
/**
** \brief \copybrief KIM::ChargeUnit::ChargeUnit(std::string const &)
**
** \sa KIM::ChargeUnit::ChargeUnit(std::string const &),
** kim_charge_unit_module::kim_from_string
**
** \since 2.0
**/
KIM_ChargeUnit KIM_ChargeUnit_FromString(char const * const str);
/**
** \brief \copybrief KIM::ChargeUnit::Known
**
** \sa KIM::ChargeUnit::Known, kim_charge_unit_module::kim_known
**
** \since 2.0
**/
int KIM_ChargeUnit_Known(KIM_ChargeUnit const chargeUnit);
/**
** \brief \copybrief KIM::ChargeUnit::operator==()
**
** \sa KIM::ChargeUnit::operator==(), kim_charge_unit_module::operator(.eq.)
**
** \since 2.0
**/
int KIM_ChargeUnit_Equal(KIM_ChargeUnit const lhs, KIM_ChargeUnit const rhs);
/**
** \brief \copybrief KIM::ChargeUnit::operator!=()
**
** \sa KIM::ChargeUnit::operator!=(), kim_charge_unit_module::operator(.ne.)
**
** \since 2.0
**/
int KIM_ChargeUnit_NotEqual(KIM_ChargeUnit const lhs, KIM_ChargeUnit const rhs);
/**
** \brief \copybrief KIM::ChargeUnit::ToString
**
** \sa KIM::ChargeUnit::ToString, kim_charge_unit_module::kim_to_string
**
** \since 2.0
**/
char const * KIM_ChargeUnit_ToString(KIM_ChargeUnit const chargeUnit);
/**
** \brief \copybrief KIM::CHARGE_UNIT::unused
**
** \sa KIM::CHARGE_UNIT::unused,
** kim_charge_unit_module::kim_charge_unit_unused
**
** \since 2.0
**/
extern KIM_ChargeUnit const KIM_CHARGE_UNIT_unused;
/**
** \brief \copybrief KIM::CHARGE_UNIT::C
**
** \sa KIM::CHARGE_UNIT::C, kim_charge_unit_module::kim_charge_unit_c
**
** \since 2.0
**/
extern KIM_ChargeUnit const KIM_CHARGE_UNIT_C;
/**
** \brief \copybrief KIM::CHARGE_UNIT::e
**
** \sa KIM::CHARGE_UNIT::e, kim_charge_unit_module::kim_charge_unit_e
**
** \since 2.0
**/
extern KIM_ChargeUnit const KIM_CHARGE_UNIT_e;
/**
** \brief \copybrief KIM::CHARGE_UNIT::statC
**
** \sa KIM::CHARGE_UNIT::StatC, kim_charge_unit_module::kim_charge_unit_statc
**
** \since 2.0
**/
extern KIM_ChargeUnit const KIM_CHARGE_UNIT_statC;
/**
** \brief \copybrief KIM::CHARGE_UNIT::GetNumberOfChargeUnits
**
** \sa KIM::CHARGE_UNIT::GetNumberOfChargeUnits,
** kim_charge_unit_module::kim_get_number_of_charge_units
**
** \since 2.0
**/
void KIM_CHARGE_UNIT_GetNumberOfChargeUnits(int * const numberOfChargeUnits);
/**
** \brief \brief \copybrief KIM::CHARGE_UNIT::GetChargeUnit
**
** \sa KIM::CHARGE_UNIT::GetChargeUnit,
** kim_charge_unit_module::kim_get_charge_unit
**
** \since 2.0
**/
int KIM_CHARGE_UNIT_GetChargeUnit(int const index,
KIM_ChargeUnit * const chargeUnit);
#endif /* KIM_CHARGE_UNIT_H_ */
kim-api-2.2.1-git/c/include/KIM_Collection.h 0000664 0000000 0000000 00000013372 13765565573 0020471 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_COLLECTION_H_
#define KIM_COLLECTION_H_
/**
** \brief \copybrief KIM::Collection
**
** \sa KIM::Collection, kim_collection_module::kim_collection_type
**
** \since 2.1
**/
struct KIM_Collection
{
/**
** \brief \copybrief KIM::Collection::collectionID
**
** \sa KIM::Collection::collectionID,
** kim_collection_module::kim_collection_type::collection_id
**
** \since 2.1
**/
int collectionID;
};
#ifndef KIM_COLLECTION_DEFINED_
#define KIM_COLLECTION_DEFINED_
/**
** \brief Convenience typedef.
**
** \since 2.1
**/
typedef struct KIM_Collection KIM_Collection;
#endif
/**
** \brief \copybrief KIM::Collection::Collection(std::string const &)
**
** \sa KIM::Collection::Collection(std::string const &),
** kim_collection_module::kim_from_string
**
** \since 2.1
**/
KIM_Collection KIM_Collection_FromString(char const * const str);
/**
** \brief \copybrief KIM::Collection::Known
**
** \sa KIM::Collection::Known, kim_collection_module::kim_known
**
** \since 2.1
**/
int KIM_Collection_Known(KIM_Collection const collection);
/**
** \brief \copybrief KIM::Collection::operator==()
**
** \sa KIM::Collection::operator==(), kim_collection_module::operator(.eq.)
**
** \since 2.1
**/
int KIM_Collection_Equal(KIM_Collection const lhs, KIM_Collection const rhs);
/**
** \brief \copybrief KIM::Collection::operator!=()
**
** \sa KIM::Collection::operator!=(), kim_collection_module::operator(.ne.)
**
** \since 2.1
**/
int KIM_Collection_NotEqual(KIM_Collection const lhs, KIM_Collection const rhs);
/**
** \brief \copybrief KIM::Collection::ToString
**
** \sa KIM::Collection::ToString, kim_collection_module::kim_to_string
**
** \since 2.1
**/
char const * KIM_Collection_ToString(KIM_Collection const collection);
/**
** \brief \copybrief KIM::COLLECTION::system
**
** \sa KIM::COLLECTION::system,
** kim_collection_module::kim_collection_system
**
** \since 2.1
**/
extern KIM_Collection const KIM_COLLECTION_system;
/**
** \brief \copybrief KIM::COLLECTION::user
**
** \sa KIM::COLLECTION::user,
** kim_collection_module::kim_collection_user
**
** \since 2.1
**/
extern KIM_Collection const KIM_COLLECTION_user;
/**
** \brief \copybrief KIM::COLLECTION::environmentVariable
**
** \sa KIM::COLLECTION::environmentVariable,
** kim_collection_module::kim_collection_environment_variable
**
** \since 2.1
**/
extern KIM_Collection const KIM_COLLECTION_environmentVariable;
/**
** \brief \copybrief KIM::COLLECTION::currentWorkingDirectory
**
** \sa KIM::COLLECTION::currentWorkingDirectory,
** kim_collection_module::kim_collection_current_working_directory
**
** \since 2.1
**/
extern KIM_Collection const KIM_COLLECTION_currentWorkingDirectory;
/**
** \brief \copybrief KIM::COLLECTION::GetNumberOfCollections
**
** \sa KIM::COLLECTION::GetNumberOfCollections,
** kim_collection_module::kim_get_number_of_collections
**
** \since 2.1
**/
void KIM_COLLECTION_GetNumberOfCollections(int * const numberOfCollections);
/**
** \brief \brief \copybrief KIM::COLLECTION::GetCollection
**
** \sa KIM::COLLECTION::GetCollection,
** kim_collection_module::kim_get_collection
**
** \since 2.1
**/
int KIM_COLLECTION_GetCollection(int const index,
KIM_Collection * const collection);
#endif /* KIM_COLLECTION_H_ */
kim-api-2.2.1-git/c/include/KIM_CollectionItemType.h 0000664 0000000 0000000 00000014525 13765565573 0022153 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_COLLECTION_ITEM_TYPE_H_
#define KIM_COLLECTION_ITEM_TYPE_H_
/**
** \brief \copybrief KIM::CollectionItemType
**
** \sa KIM::CollectionItemType,
** kim_collection_module::kim_collection_item_type_type
**
** \since 2.1
**/
struct KIM_CollectionItemType
{
/**
** \brief \copybrief KIM::CollectionItemType::collectionItemTypeID
**
** \sa KIM::CollectionItemType::collectionItemTypeID,
** kim_collection_module::kim_collection_type::collectionItemType_id
**
** \since 2.1
**/
int collectionItemTypeID;
};
#ifndef KIM_COLLECTION_ITEM_TYPE_DEFINED_
#define KIM_COLLECTION_ITEM_TYPE_DEFINED_
/**
** \brief Convenience typedef.
**
** \since 2.1
**/
typedef struct KIM_CollectionItemType KIM_CollectionItemType;
#endif
/**
** \brief \copybrief KIM::CollectionItemType::CollectionItemType(std::string const &)
**
** \sa KIM::CollectionItemType::CollectionItemType(std::string const &),
** kim_collection_item_type_module::kim_from_string
**
** \since 2.1
**/
KIM_CollectionItemType
KIM_CollectionItemType_FromString(char const * const str);
/**
** \brief \copybrief KIM::CollectionItemType::Known
**
** \sa KIM::CollectionItemType::Known,
** kim_collection_item_type_module::kim_known
**
** \since 2.1
**/
int KIM_CollectionItemType_Known(
KIM_CollectionItemType const collectionItemType);
/**
** \brief \copybrief KIM::CollectionItemType::operator==()
**
** \sa KIM::CollectionItemType::operator==(),
** kim_collection_item_type_module::operator(.eq.)
**
** \since 2.1
**/
int KIM_CollectionItemType_Equal(KIM_CollectionItemType const lhs,
KIM_CollectionItemType const rhs);
/**
** \brief \copybrief KIM::CollectionItemType::operator!=()
**
** \sa KIM::CollectionItemType::operator!=(),
** kim_collection_item_type_module::operator(.ne.)
**
** \since 2.1
**/
int KIM_CollectionItemType_NotEqual(KIM_CollectionItemType const lhs,
KIM_CollectionItemType const rhs);
/**
** \brief \copybrief KIM::CollectionItemType::ToString
**
** \sa KIM::CollectionItemType::ToString,
** kim_collection_item_type_module::kim_to_string
**
** \since 2.1
**/
char const * KIM_CollectionItemType_ToString(
KIM_CollectionItemType const collectionItemType);
/**
** \brief \copybrief KIM::COLLECTION_ITEM_TYPE::modelDriver
**
** \sa KIM::COLLECTION_ITEM_TYPE::modelDriver,
** kim_collection_item_type_module::kim_collection_item_type_model_driver
**
** \since 2.1
**/
extern KIM_CollectionItemType const KIM_COLLECTION_ITEM_TYPE_modelDriver;
/**
** \brief \copybrief KIM::COLLECTION_ITEM_TYPE::portableModel
**
** \sa KIM::COLLECTION_ITEM_TYPE::portableModel,
** kim_collection_item_type_module::kim_collection_item_type_portable_model
**
** \since 2.1
**/
extern KIM_CollectionItemType const KIM_COLLECTION_ITEM_TYPE_portableModel;
/**
** \brief \copybrief KIM::COLLECTION_ITEM_TYPE::simulatorModel
**
** \sa KIM::COLLECTION_ITEM_TYPE::simulatorModel,
** kim_collection_item_type_module::kim_collection_item_type_simulator_model
**
** \since 2.1
**/
extern KIM_CollectionItemType const KIM_COLLECTION_ITEM_TYPE_simulatorModel;
/**
** \brief \copybrief KIM::COLLECTION_ITEM_TYPE::GetNumberOfCollectionItemTypes
**
** \sa KIM::COLLECTION_ITEM_TYPE::GetNumberOfCollectionItemTypes,
** kim_collection_item_type_module::kim_get_number_of_collection_item_types
**
** \since 2.1
**/
void KIM_COLLECTION_ITEM_TYPE_GetNumberOfCollectionItemTypes(
int * const numberOfCollectionItemTypes);
/**
** \brief \brief \copybrief KIM::COLLECTION_ITEM_TYPE::GetCollectionItemType
**
** \sa KIM::COLLECTION_ITEM_TYPE::GetCollectionItemType,
** kim_collection_item_type_module::kim_get_collection_item_type
**
** \since 2.1
**/
int KIM_COLLECTION_ITEM_TYPE_GetCollectionItemType(
int const index, KIM_CollectionItemType * const collectionItemType);
#endif /* KIM_COLLECTION_ITEM_TYPE_H_ */
kim-api-2.2.1-git/c/include/KIM_Collections.h 0000664 0000000 0000000 00000030104 13765565573 0020644 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_COLLECTIONS_H_
#define KIM_COLLECTIONS_H_
/* Forward declarations */
#ifndef KIM_LOG_VERBOSITY_DEFINED_
#define KIM_LOG_VERBOSITY_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.1
**/
typedef struct KIM_LogVerbosity KIM_LogVerbosity;
#endif
/**
** \brief Forward declaration.
**
** \since 2.1
**/
#ifndef KIM_COLLECTION_DEFINED_
#define KIM_COLLECTION_DEFINED_
typedef struct KIM_Collection KIM_Collection;
#endif
/**
** \brief Forward declaration.
**
** \since 2.1
**/
#ifndef KIM_COLLECTION_ITEM_TYPE_DEFINED_
#define KIM_COLLECTION_ITEM_TYPE_DEFINED_
typedef struct KIM_CollectionItemType KIM_CollectionItemType;
#endif
#ifndef KIM_COLLECTIONS_DEFINED_
#define KIM_COLLECTIONS_DEFINED_
/**
** \brief \copybrief KIM::Collections
**
** \copydetails KIM::Collections
**
**
**/
typedef struct KIM_Collections KIM_Collections;
#endif
/**
** \brief \copybrief KIM::Collections::Create
**
** \sa KIM::Collections::Create,
** kim_collections_module::kim_collections_create
**
** \since 2.1
**/
int KIM_Collections_Create(KIM_Collections ** const collections);
/**
** \brief \copybrief KIM::Collections::Destroy
**
** \sa KIM::Collections::Destroy,
** kim_collections_module::kim_collections_destroy
**
** \since 2.1
**/
void KIM_Collections_Destroy(KIM_Collections ** const collections);
/**
** \brief \copybrief KIM::Collections::GetItemType
**
** \sa KIM::Collections::GetItemType,
** kim_collections_module::kim_get_item_type
**
** \since 2.1
**/
int KIM_Collections_GetItemType(KIM_Collections * const collections,
char const * const itemName,
KIM_CollectionItemType * const itemType);
/**
** \brief \copybrief KIM::Collections::GetItemLibraryFileNameAndCollection
**
** \sa KIM::Collections::GetItemLibraryFileNameAndCollection,
** kim_collections_module::kim_get_item_library_file_name_and_collection
**
** \since 2.1
**/
int KIM_Collections_GetItemLibraryFileNameAndCollection(
KIM_Collections * const collections,
KIM_CollectionItemType const itemType,
char const * const itemName,
char const ** const fileName,
KIM_Collection * const collection);
/**
** \brief \copybrief KIM::Collections::CacheListOfItemMetadataFiles
**
** \sa KIM::Collections::CacheListOfItemMetadataFiles,
** kim_collections_module::kim_cache_list_of_item_metadata_files
**
** \since 2.1
**/
int KIM_Collections_CacheListOfItemMetadataFiles(
KIM_Collections * const collections,
KIM_CollectionItemType const itemType,
char const * const itemName,
int * const extent);
/**
** \brief \copybrief KIM::Collections::GetItemMetadataFile
**
** \sa KIM::Collections::GetItemMetadataFile,
** kim_collections_module::kim_get_item_metadata_file_length,
** kim_collections_module::kim_get_item_metadata_file_values
**
** \since 2.1
**/
int KIM_Collections_GetItemMetadataFile(
KIM_Collections * const collections,
int const index,
char const ** const fileName,
unsigned int * const fileLength,
unsigned char const ** const fileRawData,
int * const availableAsString,
char const ** const fileString);
/**
** \brief \copybrief KIM::Collections::CacheListOfItemNamesByType
**
** \sa KIM::Collections::CacheListOfItemNamesByType,
** kim_collections_module::kim_cache_list_of_item_names_by_type
**
** \since 2.1
**/
int KIM_Collections_CacheListOfItemNamesByType(
KIM_Collections * const collections,
KIM_CollectionItemType const itemType,
int * const extent);
/**
** \brief \copybrief KIM::Collections::GetItemNameByType
**
** \sa KIM::Collections::GetItemNameByType,
** kim_collections_module::kim_get_item_name_by_type
**
** \since 2.1
**/
int KIM_Collections_GetItemNameByType(KIM_Collections * const collections,
int const index,
char const ** const itemName);
/**
** \brief \copybrief KIM::Collections::CacheListOfItemNamesByCollectionAndType
**
** \sa KIM::Collections::CacheListOfItemNamesByCollectionAndType,
** kim_collections_module::kim_cache_list_of_item_names_by_collection_and_type
**
** \since 2.1
**/
int KIM_Collections_CacheListOfItemNamesByCollectionAndType(
KIM_Collections * const collections,
KIM_Collection const collection,
KIM_CollectionItemType const itemType,
int * const extent);
/**
** \brief \copybrief KIM::Collections::GetItemNameByCollectionAndType
**
** \sa KIM::Collections::GetItemNameByCollectionAndType,
** kim_collections_module::kim_get_item_name_by_collection_and_type
**
** \since 2.1
**/
int KIM_Collections_GetItemNameByCollectionAndType(
KIM_Collections * const collections,
int const index,
char const ** const itemName);
/**
** \brief \copybrief KIM::Collections::GetItemLibraryFileNameByCollectionAndType
**
** \sa KIM::Collections::GetItemLibraryFileNameByCollectionAndType,
** kim_collections_module::kim_get_item_library_file_name_by_collection_and_type
**
** \since 2.1
**/
int KIM_Collections_GetItemLibraryFileNameByCollectionAndType(
KIM_Collections * const collections,
KIM_Collection const collection,
KIM_CollectionItemType const itemType,
char const * const itemName,
char const ** const fileName);
/**
** \brief \copybrief KIM::Collections::CacheListOfItemMetadataFilesByCollectionAndType
**
** \sa KIM::Collections::CacheListOfItemMetadataFilesByCollectionAndType,
** kim_collections_module::kim_cache_list_of_item_metadata_files_by_collection_and_type
**
** \since 2.1
**/
int KIM_Collections_CacheListOfItemMetadataFilesByCollectionAndType(
KIM_Collections * const collections,
KIM_Collection const collection,
KIM_CollectionItemType const itemType,
char const * const itemName,
int * const extent);
/**
** \brief \copybrief KIM::Collections::GetItemMetadataFileByCollectionAndType
**
** \sa KIM::Collections::GetItemMetadataFileByCollectionAndType,
** kim_collections_module::kim_get_item_metadata_file_length_by_collection_and_type,
** kim_collections_module::kim_get_item_metadata_file_values_by_collection_and_type
**
** \since 2.1
**/
int KIM_Collections_GetItemMetadataFileByCollectionAndType(
KIM_Collections * const collections,
int const index,
char const ** const fileName,
unsigned int * const fileLength,
unsigned char const ** const fileRawData,
int * const availableAsString,
char const ** const fileString);
/**
** \brief \copybrief KIM::Collections::GetProjectNameAndSemVer
**
** \sa KIM::Collections::GetProjectNameAndSemVer,
** kim_collections_module::kim_get_project_name_and_sem_ver
**
** \since 2.1
**/
void KIM_Collections_GetProjectNameAndSemVer(
KIM_Collections * const collections,
char const ** const projectName,
char const ** const semVer);
/**
** \brief \copybrief KIM::Collections::GetEnvironmentVariableName
**
** \sa KIM::Collections::GetEnvironmentVariableName,
** kim_collections_module::kim_get_environment_variable_name
**
** \since 2.1
**/
int KIM_Collections_GetEnvironmentVariableName(
KIM_Collections * const collections,
KIM_CollectionItemType const itemType,
char const ** const name);
/**
** \brief \copybrief KIM::Collections::GetConfigurationFileEnvironmentVariable
**
** \sa KIM::Collections::GetConfigurationFileEnvironmentVariable,
** kim_collections_module::kim_get_configuration_file_environment_variable
**
** \since 2.1
**/
void KIM_Collections_GetConfigurationFileEnvironmentVariable(
KIM_Collections * const collections,
char const ** const name,
char const ** const value);
/**
** \brief \copybrief KIM::Collections::GetConfigurationFileName
**
** \sa KIM::Collections::GetConfigurationFileName,
** kim_collections_module::kim_get_configuration_file_name
**
** \since 2.1
**/
void KIM_Collections_GetConfigurationFileName(
KIM_Collections * const collections, char const ** const fileName);
/**
** \brief \copybrief KIM::Collections::CacheListOfDirectoryNames
**
** \sa KIM::Collections::CacheListOfDirectoryNames,
** kim_collections_module::kim_cache_list_of_directory_names
**
** \since 2.1
**/
int KIM_Collections_CacheListOfDirectoryNames(
KIM_Collections * const collections,
KIM_Collection const collection,
KIM_CollectionItemType const itemType,
int * const extent);
/**
** \brief \copybrief KIM::Collections::GetDirectoryName
**
** \sa KIM::Collections::GetDirectoryName,
** kim_collections_module::kim_get_directory_name
**
** \since 2.1
**/
int KIM_Collections_GetDirectoryName(KIM_Collections * const collections,
int const index,
char const ** const directoryName);
/**
** \brief \copybrief KIM::Collections::SetLogID
**
** \sa KIM::Collections::SetLogID, kim_collections_module::kim_set_log_id
**
** \since 2.1
**/
void KIM_Collections_SetLogID(KIM_Collections * const collections,
char const * const logID);
/**
** \brief \copybrief KIM::Collections::PushLogVerbosity
**
** \sa KIM::Collections::PushLogVerbosity,
*kim_collections_module::kim_push_log_verbosity
**
** \since 2.1
**/
void KIM_Collections_PushLogVerbosity(KIM_Collections * const collections,
KIM_LogVerbosity const logVerbosity);
/**
** \brief \copybrief KIM::Collections::PopLogVerbosity
**
** \sa KIM::Collections::PopLogVerbosity,
*kim_collections_module::kim_pop_log_verbosity
**
** \since 2.1
**/
void KIM_Collections_PopLogVerbosity(KIM_Collections * const collections);
#endif /* KIM_COLLECTIONS_H_ */
kim-api-2.2.1-git/c/include/KIM_ComputeArgumentName.h 0000664 0000000 0000000 00000022056 13765565573 0022315 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_COMPUTE_ARGUMENT_NAME_H_
#define KIM_COMPUTE_ARGUMENT_NAME_H_
/* Forward declarations */
#ifndef KIM_DATA_TYPE_DEFINED_
#define KIM_DATA_TYPE_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_DataType KIM_DataType;
#endif
/**
** \brief \copybrief KIM::ComputeArgumentName
**
** \sa KIM::ComputeArgumentName,
** kim_compute_argument_name_module::kim_compute_argument_name_type
**
** \since 2.0
**/
struct KIM_ComputeArgumentName
{
/**
** \brief \copybrief KIM::ComputeArgumentName::computeArgumentNameID
**
** \sa KIM::ComputeArgumentName::computeArgumentNameID,
** kim_compute_argument_name_module::kim_compute_argument_name_type::compute_argument_name_id
**
** \since 2.0
**/
int computeArgumentNameID;
};
#ifndef KIM_COMPUTE_ARGUMENT_NAME_DEFINED_
#define KIM_COMPUTE_ARGUMENT_NAME_DEFINED_
/**
** \brief Convenience typedef.
**
** \since 2.0
**/
typedef struct KIM_ComputeArgumentName KIM_ComputeArgumentName;
#endif
/**
** \brief \copybrief KIM::ComputeArgumentName::ComputeArgumentName(std::string const &)
**
** \sa KIM::ComputeArgumentName::ComputeArgumentName(std::string const &),
** kim_compute_argument_name_module::kim_from_string
**
** \since 2.0
**/
KIM_ComputeArgumentName
KIM_ComputeArgumentName_FromString(char const * const str);
/**
** \brief \copybrief KIM::ComputeArgumentName::Known
**
** \sa KIM::ComputeArgumentName::Known,
** kim_compute_argument_name_module::kim_known
**
** \since 2.0
**/
int KIM_ComputeArgumentName_Known(
KIM_ComputeArgumentName const computeArgumentName);
/**
** \brief \copybrief KIM::ComputeArgumentName::operator==()
**
** \sa KIM::ComputeArgumentName::operator==(),
** kim_compute_argument_name_module::operator(.eq.)
**
** \since 2.0
**/
int KIM_ComputeArgumentName_Equal(KIM_ComputeArgumentName const lhs,
KIM_ComputeArgumentName const rhs);
/**
** \brief \copybrief KIM::ComputeArgumentName::operator!=()
**
** \sa KIM::ComputeArgumentName::operator!=(),
** kim_compute_argument_name_module::operator(.ne.)
**
** \since 2.0
**/
int KIM_ComputeArgumentName_NotEqual(KIM_ComputeArgumentName const lhs,
KIM_ComputeArgumentName const rhs);
/**
** \brief \copybrief KIM::ComputeArgumentName::ToString
**
** \sa KIM::ComputeArgumentName::ToString,
** kim_compute_argument_name_module::kim_to_string
**
** \since 2.0
**/
char const * KIM_ComputeArgumentName_ToString(
KIM_ComputeArgumentName const computeArgumentName);
/**
** \brief \copybrief KIM::COMPUTE_ARGUMENT_NAME::numberOfParticles
**
** \sa KIM::COMPUTE_ARGUMENT_NAME::numberOfParticles,
** kim_compute_argument_name_module::kim_compute_argument_name_number_of_particles
**
** \since 2.0
**/
extern KIM_ComputeArgumentName const
KIM_COMPUTE_ARGUMENT_NAME_numberOfParticles;
/**
** \brief \copybrief KIM::COMPUTE_ARGUMENT_NAME::particleSpeciesCodes
**
** \sa KIM::COMPUTE_ARGUMENT_NAME::particleSpeciesCodes,
** kim_compute_argument_name_module::kim_compute_argument_name_particle_species_codes
**
** \since 2.0
**/
extern KIM_ComputeArgumentName const
KIM_COMPUTE_ARGUMENT_NAME_particleSpeciesCodes;
/**
** \brief \copybrief KIM::COMPUTE_ARGUMENT_NAME::particleContributing
**
** \sa KIM::COMPUTE_ARGUMENT_NAME::particleContributing,
** kim_compute_argument_name_module::kim_compute_argument_name_particle_contributing
**
** \since 2.0
**/
extern KIM_ComputeArgumentName const
KIM_COMPUTE_ARGUMENT_NAME_particleContributing;
/**
** \brief \copybrief KIM::COMPUTE_ARGUMENT_NAME::coordinates
**
** \sa KIM::COMPUTE_ARGUMENT_NAME::coordinates,
** kim_compute_argument_name_module::kim_compute_argument_name_coordinates
**
** \since 2.0
**/
extern KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_coordinates;
/**
** \brief \copybrief KIM::COMPUTE_ARGUMENT_NAME::partialEnergy
**
** \sa KIM::COMPUTE_ARGUMENT_NAME::partialEnergy,
** kim_compute_argument_name_module::kim_compute_argument_name_partial_energy
**
** \since 2.0
**/
extern KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_partialEnergy;
/**
** \brief \copybrief KIM::COMPUTE_ARGUMENT_NAME::partialForces
**
** \sa KIM::COMPUTE_ARGUMENT_NAME::partialForces,
** kim_compute_argument_name_module::kim_compute_argument_name_partial_forces
**
** \since 2.0
**/
extern KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_partialForces;
/**
** \brief \copybrief KIM::COMPUTE_ARGUMENT_NAME::partialParticleEnergy
**
** \sa KIM::COMPUTE_ARGUMENT_NAME::partialParticleEnergy,
** kim_compute_argument_name_module::kim_compute_argument_name_partial_particle_energy
**
** \since 2.0
**/
extern KIM_ComputeArgumentName const
KIM_COMPUTE_ARGUMENT_NAME_partialParticleEnergy;
/**
** \brief \copybrief KIM::COMPUTE_ARGUMENT_NAME::partialVirial
**
** \sa KIM::COMPUTE_ARGUMENT_NAME::partialVirial,
** kim_compute_argument_name_module::kim_compute_argument_name_partial_virial
**
** \since 2.0
**/
extern KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_partialVirial;
/**
** \brief \copybrief KIM::COMPUTE_ARGUMENT_NAME::partialParticleVirial
**
** \sa KIM::COMPUTE_ARGUMENT_NAME::partialParticleVirial,
** kim_compute_argument_name_module::kim_compute_argument_name_partial_particle_virial
**
** \since 2.0
**/
extern KIM_ComputeArgumentName const
KIM_COMPUTE_ARGUMENT_NAME_partialParticleVirial;
/**
** \brief \copybrief KIM::COMPUTE_ARGUMENT_NAME::GetNumberOfComputeArgumentNames
**
** \sa KIM::COMPUTE_ARGUMENT_NAME::GetNumberOfComputeArgumentNames,
** kim_compute_argument_name_module::kim_get_number_of_compute_argument_names
**
** \since 2.0
**/
void KIM_COMPUTE_ARGUMENT_NAME_GetNumberOfComputeArgumentNames(
int * const numberOfComputeArgumentNames);
/**
** \brief \copybrief KIM::COMPUTE_ARGUMENT_NAME::GetComputeArgumentName
**
** \sa KIM::COMPUTE_ARGUMENT_NAME::GetComputeArgumentName,
** kim_compute_argument_name_module::kim_get_compute_argument_name
**
** \since 2.0
**/
int KIM_COMPUTE_ARGUMENT_NAME_GetComputeArgumentName(
int const index, KIM_ComputeArgumentName * const computeArgumentName);
/**
** \brief \copybrief KIM::COMPUTE_ARGUMENT_NAME::GetComputeArgumentDataType
**
** \sa KIM::COMPUTE_ARGUMENT_NAME::GetComputeArgumentDataType,
** kim_compute_argument_name_module::kim_get_compute_argument_data_type
**
** \since 2.0
**/
int KIM_COMPUTE_ARGUMENT_NAME_GetComputeArgumentDataType(
KIM_ComputeArgumentName const computeArgumentName,
KIM_DataType * const dataType);
#endif /* KIM_COMPUTE_ARGUMENT_NAME_H_ */
kim-api-2.2.1-git/c/include/KIM_ComputeArguments.h 0000664 0000000 0000000 00000020503 13765565573 0021672 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_COMPUTE_ARGUMENTS_H_
#define KIM_COMPUTE_ARGUMENTS_H_
#ifndef KIM_FUNCTION_TYPES_H_
#include "KIM_FunctionTypes.h" /* IWYU pragma: export */
#endif
/* Forward declarations */
#ifndef KIM_LOG_VERBOSITY_DEFINED_
#define KIM_LOG_VERBOSITY_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LogVerbosity KIM_LogVerbosity;
#endif
#ifndef KIM_LANGUAGE_NAME_DEFINED_
#define KIM_LANGUAGE_NAME_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LanguageName KIM_LanguageName;
#endif
#ifndef KIM_COMPUTE_ARGUMENT_NAME_DEFINED_
#define KIM_COMPUTE_ARGUMENT_NAME_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ComputeArgumentName KIM_ComputeArgumentName;
#endif
#ifndef KIM_COMPUTE_CALLBACK_NAME_DEFINED_
#define KIM_COMPUTE_CALLBACK_NAME_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ComputeCallbackName KIM_ComputeCallbackName;
#endif
#ifndef KIM_SUPPORT_STATUS_DEFINED_
#define KIM_SUPPORT_STATUS_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_SupportStatus KIM_SupportStatus;
#endif
#ifndef KIM_COMPUTE_ARGUMENTS_DEFINED_
#define KIM_COMPUTE_ARGUMENTS_DEFINED_
/**
** \brief \copybrief KIM::ComputeArguments
**
** \sa KIM::ComputeArguments,
** kim_compute_arguments_module::kim_compute_arguments_handle_type
**
** \since 2.0
**/
typedef struct KIM_ComputeArguments KIM_ComputeArguments;
#endif
/**
** \brief \copybrief KIM::ComputeArguments::GetArgumentSupportStatus
**
** \sa KIM::ComputeArguments::GetArgumentSupportStatus,
** kim_compute_arguments_module::kim_get_argument_support_status
**
** \since 2.0
**/
int KIM_ComputeArguments_GetArgumentSupportStatus(
KIM_ComputeArguments const * const computeArguments,
KIM_ComputeArgumentName const computeArgumentName,
KIM_SupportStatus * const supportStatus);
/**
** \brief \copybrief KIM::ComputeArguments::GetCallbackSupportStatus
**
** \sa KIM::ComputeArguments::GetCallbackSupportStatus,
** kim_compute_arguments_module::kim_get_callback_support_status
**
** \since 2.0
**/
int KIM_ComputeArguments_GetCallbackSupportStatus(
KIM_ComputeArguments const * const computeArguments,
KIM_ComputeCallbackName const computeCallbackName,
KIM_SupportStatus * const supportStatus);
/**
** \brief \copybrief KIM::ComputeArguments::SetArgumentPointer
**
** \sa KIM::ComputeArguments::SetArgumentPointer,
** kim_compute_arguments_module::kim_set_argument_pointer
**
** \since 2.0
**/
int KIM_ComputeArguments_SetArgumentPointerInteger(
KIM_ComputeArguments * const computeArguments,
KIM_ComputeArgumentName const computeArgumentName,
int const * const ptr);
/**
** \brief \copybrief KIM::ComputeArguments::SetArgumentPointer
**
** \sa KIM::ComputeArguments::SetArgumentPointer,
** kim_compute_arguments_module::kim_set_argument_pointer
**
** \since 2.0
**/
int KIM_ComputeArguments_SetArgumentPointerDouble(
KIM_ComputeArguments * const computeArguments,
KIM_ComputeArgumentName const computeArgumentName,
double const * const ptr);
/**
** \brief \copybrief KIM::ComputeArguments::SetCallbackPointer
**
** \sa KIM::ComputeArguments::SetCallbackPointer,
** kim_compute_arguments_module::kim_set_callback_pointer
**
** \since 2.0
**/
int KIM_ComputeArguments_SetCallbackPointer(
KIM_ComputeArguments * const computeArguments,
KIM_ComputeCallbackName const computeCallbackName,
KIM_LanguageName const languageName,
KIM_Function * const fptr,
void * const dataObject);
/**
** \brief \copybrief KIM::ComputeArguments::AreAllRequiredArgumentsAndCallbacksPresent
**
** \sa KIM::ComputeArguments::AreAllRequiredArgumentsAndCallbacksPresent,
** kim_compute_arguments_module::kim_are_all_required_present
**
** \since 2.0
**/
void KIM_ComputeArguments_AreAllRequiredArgumentsAndCallbacksPresent(
KIM_ComputeArguments const * const computeArguments, int * const result);
/**
** \brief \copybrief KIM::ComputeArguments::SetSimulatorBufferPointer
**
** \sa KIM::ComputeArguments::SetSimulatorBufferPointer,
** kim_compute_arguments_module::kim_set_simulator_buffer_pointer
**
** \since 2.0
**/
void KIM_ComputeArguments_SetSimulatorBufferPointer(
KIM_ComputeArguments * const computeArguments, void * const ptr);
/**
** \brief \copybrief KIM::ComputeArguments::GetSimulatorBufferPointer
**
** \sa KIM::ComputeArguments::GetSimulatorBufferPointer,
** kim_compute_arguments_module::kim_get_simulator_buffer_pointer
**
** \since 2.0
**/
void KIM_ComputeArguments_GetSimulatorBufferPointer(
KIM_ComputeArguments const * const computeArguments, void ** const ptr);
/**
** \brief \copybrief KIM::ComputeArguments::ToString
**
** \sa KIM::ComputeArguments::ToString,
** kim_compute_arguments_module::kim_to_string
**
** \since 2.0
**/
char const * KIM_ComputeArguments_ToString(
KIM_ComputeArguments const * const computeArguments);
/**
** \brief \copybrief KIM::ComputeArguments::SetLogID
**
** \sa KIM::ComputeArguments::SetLogID,
** kim_compute_arguments_module::kim_set_log_id
**
** \since 2.0
**/
void KIM_ComputeArguments_SetLogID(
KIM_ComputeArguments * const computeArguments, char const * const logID);
/**
** \brief \copybrief KIM::ComputeArguments::PushLogVerbosity
**
** \sa KIM::ComputeArguments::PushLogVerbosity,
** kim_compute_arguments_module::kim_push_log_verbosity
**
** \since 2.0
**/
void KIM_ComputeArguments_PushLogVerbosity(
KIM_ComputeArguments * const computeArguments,
KIM_LogVerbosity const logVerbosity);
/**
** \brief \copybrief KIM::ComputeArguments::PopLogVerbosity
**
** \sa KIM::ComputeArguments::PopLogVerbosity,
** kim_compute_arguments_module::kim_pop_log_verbosity
**
** \since 2.0
**/
void KIM_ComputeArguments_PopLogVerbosity(
KIM_ComputeArguments * const computeArguments);
#endif /* KIM_COMPUTE_ARGUMENTS_H_ */
kim-api-2.2.1-git/c/include/KIM_ComputeCallbackName.h 0000664 0000000 0000000 00000015053 13765565573 0022226 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_COMPUTE_CALLBACK_NAME_H_
#define KIM_COMPUTE_CALLBACK_NAME_H_
/**
** \brief \copybrief KIM::ComputeCallbackName
**
** \sa KIM::ComputeCallbackName,
** kim_compute_callback_name_module::kim_compute_callback_name_type
**
** \since 2.0
**/
struct KIM_ComputeCallbackName
{
/**
** \brief \copybrief KIM::ComputeCallbackName::computeCallbackNameID
**
** \sa KIM::ComputeCallbackName::computeCallbackNameID,
** kim_compute_callback_name_module::kim_compute_callback_name_type::compute_callback_name_id
**
** \since 2.0
**/
int computeCallbackNameID;
};
#ifndef KIM_COMPUTE_CALLBACK_NAME_DEFINED_
#define KIM_COMPUTE_CALLBACK_NAME_DEFINED_
/**
** \brief Convenience typedef.
**
** \since 2.0
**/
typedef struct KIM_ComputeCallbackName KIM_ComputeCallbackName;
#endif
/**
** \brief \copybrief KIM::ComputeCallbackName::ComputeCallbackName(std::string const &)
**
** \sa KIM::ComputeCallbackName::ComputeCallbackName(std::string const &),
** kim_compute_callback_name_module::kim_from_string
**
** \since 2.0
**/
KIM_ComputeCallbackName
KIM_ComputeCallbackName_FromString(char const * const str);
/**
** \brief \copybrief KIM::ComputeCallbackName::Known
**
** \sa KIM::ComputeCallbackName::Known,
** kim_compute_callback_name_module::kim_known
**
** \since 2.0
**/
int KIM_ComputeCallbackName_Known(
KIM_ComputeCallbackName const computeCallbackName);
/**
** \brief \copybrief KIM::ComputeCallbackName::operator==()
**
** \sa KIM::ComputeCallbackName::operator==(),
** kim_compute_callback_name_module::operator(.eq.)
**
** \since 2.0
**/
int KIM_ComputeCallbackName_Equal(KIM_ComputeCallbackName const lhs,
KIM_ComputeCallbackName const rhs);
/**
** \brief \copybrief KIM::ComputeCallbackName::operator!=()
**
** \sa KIM::ComputeCallbackName::operator!=(),
** kim_compute_callback_name_module::operator(.ne.)
**
** \since 2.0
**/
int KIM_ComputeCallbackName_NotEqual(KIM_ComputeCallbackName const lhs,
KIM_ComputeCallbackName const rhs);
/**
** \brief \copybrief KIM::ComputeCallbackName::ToString
**
** \sa KIM::ComputeCallbackName::ToString,
** kim_compute_callback_name_module::kim_to_string
**
** \since 2.0
**/
char const * KIM_ComputeCallbackName_ToString(
KIM_ComputeCallbackName const computeCallbackName);
/**
** \brief \copybrief KIM::COMPUTE_CALLBACK_NAME::GetNeighborList
**
** \sa KIM::COMPUTE_CALLBACK_NAME::GetNeighborList,
** kim_compute_callback_name_module::kim_compute_callback_name_get_neighbor_list
**
** \since 2.0
**/
extern KIM_ComputeCallbackName const KIM_COMPUTE_CALLBACK_NAME_GetNeighborList;
/**
** \brief \copybrief KIM::COMPUTE_CALLBACK_NAME::ProcessDEDrTerm
**
** \sa KIM::COMPUTE_CALLBACK_NAME::ProcessDEDrTerm,
** kim_compute_callback_name_module::kim_compute_callback_name_process_dedr_term
**
** \since 2.0
**/
extern KIM_ComputeCallbackName const KIM_COMPUTE_CALLBACK_NAME_ProcessDEDrTerm;
/**
** \brief \copybrief KIM::COMPUTE_CALLBACK_NAME::ProcessD2EDr2Term
**
** \sa KIM::COMPUTE_CALLBACK_NAME::ProcessD2EDr2Term,
** kim_compute_callback_name_module::kim_compute_callback_name_process_d2edr2_term
**
** \since 2.0
**/
extern KIM_ComputeCallbackName const
KIM_COMPUTE_CALLBACK_NAME_ProcessD2EDr2Term;
/**
** \brief \copybrief kim_model_compute_arguments_get_neighbor_list
**
** \since 2.0
**/
typedef int KIM_GetNeighborListFunction(void * const dataObject,
int const numberOfNeighborLists,
double const * const cutoffs,
int const neighborListIndex,
int const particleNumber,
int * const numberOfNeighbors,
int const ** const neighborsOfParticle);
/**
** \brief \copybrief KIM::ProcessDEDrTermFunction
**
** \sa KIM::ProcessDEDrTermFunction, kim_model_compute_arguments_module::kim_model_compute_arguments_process_dedr_term
**
** \since 2.0
**/
typedef int KIM_ProcessDEDrTermFunction(void * const dataObject,
double const de,
double const r,
double const * const dx,
int const i,
int const j);
/**
** \brief \copybrief KIM::ProcessD2EDr2TermFunction
**
** \sa KIM::ProcessD2EDr2TermFunction,
** kim_model_compute_arguments_module::kim_model_compute_arguments_process_d2edr2_term
**
** \since 2.0
**/
typedef int KIM_ProcessD2EDr2TermFunction(void * const dataObject,
double const de,
double const * const r,
double const * const dx,
int const * const i,
int const * const j);
/**
** \brief \copybrief KIM::ModelExtensionFunction
**
** \sa KIM::ModelExtensionFunction, kim_model_module::kim_model_extension
**
** \since 2.0
**/
typedef int
KIM_ModelExtensionFunction(KIM_ModelExtension * const modelExtension,
void * const extensionStructure);
/**
** \brief \copybrief KIM::ModelRefreshFunction
**
** \sa KIM::ModelRefreshFunction,
** kim_model_module::kim_model_clear_then_refresh
**
** \since 2.0
**/
typedef int KIM_ModelRefreshFunction(KIM_ModelRefresh * const modelRefresh);
/**
** \brief \copybrief KIM::ModelWriteParameterizedModelFunction
**
** \sa KIM::ModelWriteParameterizedModelFunction, kim_model_module::kim_model_compute_arguments_destroy
**
** \since 2.0
**/
typedef int KIM_ModelComputeArgumentsDestroyFunction(
KIM_ModelCompute const * const modelCompute,
KIM_ModelComputeArgumentsDestroy * const modelComputeArgumentsDestroy);
/**
** \brief \copybrief KIM::ModelDestroyFunction
**
** \sa KIM::ModelDestroyFunction, kim_model_module::kim_model_destroy
**
** \since 2.0
**/
typedef int KIM_ModelDestroyFunction(KIM_ModelDestroy * const modelDestroy);
/**
** \brief \copybrief KIM::LogPrintFunction
**
** \sa KIM::LogPrintFunction,
** kim_log_module::kim_log_push_default_print_function
**
** \since 2.2
**/
typedef int KIM_LogPrintFunction(char const * const entryString);
#endif /* KIM_FUNCTION_TYPES_H_ */
kim-api-2.2.1-git/c/include/KIM_LanguageName.h 0000664 0000000 0000000 00000013257 13765565573 0020724 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_LANGUAGE_NAME_H_
#define KIM_LANGUAGE_NAME_H_
/**
** \brief \copybrief KIM::LanguageName
**
** \sa KIM::LanguageName, kim_language_name_module::kim_language_name_type
**
** \since 2.0
**/
struct KIM_LanguageName
{
/**
** \brief \copybrief KIM::LanguageName::languageNameID
**
** \sa KIM::LanguageName::languageNameID,
** kim_language_name_module::kim_language_name_type::language_name_id
**
** \since 2.0
**/
int languageNameID;
};
#ifndef KIM_LANGUAGE_NAME_DEFINED_
#define KIM_LANGUAGE_NAME_DEFINED_
/**
** \brief Convenience typedef.
**
** \since 2.0
**/
typedef struct KIM_LanguageName KIM_LanguageName;
#endif
/**
** \brief \copybrief KIM::LanguageName::LanguageName(std::string const &)
**
** \sa KIM::LanguageName::LanguageName(std::string const &),
** kim_language_name_module::kim_from_string
**
** \since 2.0
**/
KIM_LanguageName KIM_LanguageName_FromString(char const * const str);
/**
** \brief \copybrief KIM::LanguageName::Known
**
** \sa KIM::LanguageName::Known, kim_language_name_module::kim_known
**
** \since 2.0
**/
int KIM_LanguageName_Known(KIM_LanguageName const languageName);
/**
** \brief \copybrief KIM::LanguageName::operator==()
**
** \sa KIM::LanguageName::operator==(),
** kim_language_name_module::operator(.eq.)
**
** \since 2.0
**/
int KIM_LanguageName_Equal(KIM_LanguageName const lhs,
KIM_LanguageName const rhs);
/**
** \brief \copybrief KIM::LanguageName::operator!=()
**
** \sa KIM::LanguageName::operator!=(),
** kim_language_name_module::operator(.ne.)
**
** \since 2.0
**/
int KIM_LanguageName_NotEqual(KIM_LanguageName const lhs,
KIM_LanguageName const rhs);
/**
** \brief \copybrief KIM::LanguageName::ToString
**
** \sa KIM::LanguageName::ToString, kim_language_name_module::kim_to_string
**
** \since 2.0
**/
char const * KIM_LanguageName_ToString(KIM_LanguageName const languageName);
/**
** \brief \copybrief KIM::LANGUAGE_NAME::cpp
**
** \sa KIM::LANGUAGE_NAME::cpp,
** kim_language_name_module::kim_language_name_cpp
**
** \since 2.0
**/
extern KIM_LanguageName const KIM_LANGUAGE_NAME_cpp;
/**
** \brief \copybrief KIM::LANGUAGE_NAME::c
**
** \sa KIM::LANGUAGE_NAME::c, kim_language_name_module::kim_language_name_c
**
** \since 2.0
**/
extern KIM_LanguageName const KIM_LANGUAGE_NAME_c;
/**
** \brief \copybrief KIM::LANGUAGE_NAME::fortran
**
** \sa KIM::LANGUAGE_NAME::fortran,
** kim_language_name_module::kim_language_name_fortran
**
** \since 2.0
**/
extern KIM_LanguageName const KIM_LANGUAGE_NAME_fortran;
/**
** \brief \copybrief KIM::LANGUAGE_NAME::GetNumberOfLanguageNames
**
** \sa KIM::LANGUAGE_NAME::GetNumberOfLanguageNames,
** kim_language_name_module::kim_get_number_of_language_names
**
** \since 2.0
**/
void KIM_LANGUAGE_NAME_GetNumberOfLanguageNames(
int * const numberOfLanguageNames);
/**
** \brief \copybrief KIM::LANGUAGE_NAME::GetLanguageName
**
** \sa KIM::LANGUAGE_NAME::GetLanguageName,
** kim_language_name_module::kim_get_language_name
**
** \since 2.0
**/
int KIM_LANGUAGE_NAME_GetLanguageName(int const index,
KIM_LanguageName * const languageName);
#endif /* KIM_LANGUAGE_NAME_H_ */
kim-api-2.2.1-git/c/include/KIM_LengthUnit.h 0000664 0000000 0000000 00000013774 13765565573 0020465 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_LENGTH_UNIT_H_
#define KIM_LENGTH_UNIT_H_
/**
** \brief \copybrief KIM::LengthUnit
**
** \sa KIM::LengthUnit, kim_length_unit_module::kim_length_unit_type
**
** \since 2.0
**/
struct KIM_LengthUnit
{
/**
** \brief \copybrief KIM::LengthUnit::lengthUnitID
**
** \sa KIM::LengthUnit::lengthUnitID,
** kim_length_unit_module::kim_length_unit_type::length_unit_id
**
** \since 2.0
**/
int lengthUnitID;
};
#ifndef KIM_LENGTH_UNIT_DEFINED_
#define KIM_LENGTH_UNIT_DEFINED_
/**
** \brief Convenience typedef.
**
** \since 2.0
**/
typedef struct KIM_LengthUnit KIM_LengthUnit;
#endif
/**
** \brief \copybrief KIM::LengthUnit::LengthUnit(std::string const &)
**
** \sa KIM::LengthUnit::LengthUnit(std::string const &),
** kim_length_unit_module::kim_from_string
**
** \since 2.0
**/
KIM_LengthUnit KIM_LengthUnit_FromString(char const * const str);
/**
** \brief \copybrief KIM::LengthUnit::Known
**
** \sa KIM::LengthUnit::Known, kim_length_unit_module::kim_known
**
** \since 2.0
**/
int KIM_LengthUnit_Known(KIM_LengthUnit const lengthUnit);
/**
** \brief \copybrief KIM::LengthUnit::operator==()
**
** \sa KIM::LengthUnit::operator==(), kim_length_unit_module::operator(.eq.)
**
** \since 2.0
**/
int KIM_LengthUnit_Equal(KIM_LengthUnit const lhs, KIM_LengthUnit const rhs);
/**
** \brief \copybrief KIM::LengthUnit::operator!=()
**
** \sa KIM::LengthUnit::operator!=(), kim_length_unit_module::operator(.ne.)
**
** \since 2.0
**/
int KIM_LengthUnit_NotEqual(KIM_LengthUnit const lhs, KIM_LengthUnit const rhs);
/**
** \brief \copybrief KIM::LengthUnit::ToString
**
** \sa KIM::LengthUnit::ToString, kim_length_unit_module::kim_to_string
**
** \since 2.0
**/
char const * KIM_LengthUnit_ToString(KIM_LengthUnit const lengthUnit);
/**
** \brief \copybrief KIM::LENGTH_UNIT::unused
**
** \sa KIM::LENGTH_UNIT::unused,
** kim_length_unit_module::kim_length_unit_unused
**
** \since 2.0
**/
extern KIM_LengthUnit const KIM_LENGTH_UNIT_unused;
/**
** \brief \copybrief KIM::LENGTH_UNIT::A
**
** \sa KIM::LENGTH_UNIT::A, kim_length_unit_module::kim_length_unit_a
**
** \since 2.0
**/
extern KIM_LengthUnit const KIM_LENGTH_UNIT_A;
/**
** \brief \copybrief KIM::LENGTH_UNIT::Bohr
**
** \sa KIM::LENGTH_UNIT::Bohr, kim_length_unit_module::kim_length_unit_bohr
**
** \since 2.0
**/
extern KIM_LengthUnit const KIM_LENGTH_UNIT_Bohr;
/**
** \brief \copybrief KIM::LENGTH_UNIT::cm
**
** \sa KIM::LENGTH_UNIT::cm, kim_length_unit_module::kim_length_unit_cm
**
** \since 2.0
**/
extern KIM_LengthUnit const KIM_LENGTH_UNIT_cm;
/**
** \brief \copybrief KIM::LENGTH_UNIT::m
**
** \sa KIM::LENGTH_UNIT::m, kim_length_unit_module::kim_length_unit_m
**
** \since 2.0
**/
extern KIM_LengthUnit const KIM_LENGTH_UNIT_m;
/**
** \brief \copybrief KIM::LENGTH_UNIT::nm
**
** \sa KIM::LENGTH_UNIT::nm, kim_length_unit_module::kim_length_unit_nm
**
** \since 2.0
**/
extern KIM_LengthUnit const KIM_LENGTH_UNIT_nm;
/**
** \brief \copybrief KIM::LENGTH_UNIT::GetNumberOfLengthUnits
**
** \sa KIM::LENGTH_UNIT::GetNumberOfLengthUnits,
** kim_length_unit_module::kim_get_number_of_length_units
**
** \since 2.0
**/
void KIM_LENGTH_UNIT_GetNumberOfLengthUnits(int * const numberOfLengthUnits);
/**
** \brief \copybrief KIM::LENGTH_UNIT::GetLengthUnit
**
** \sa KIM::LENGTH_UNIT::GetLengthUnit,
** kim_length_unit_module::kim_get_length_unit
**
** \since 2.0
**/
int KIM_LENGTH_UNIT_GetLengthUnit(int const index,
KIM_LengthUnit * const lengthUnit);
#endif /* KIM_LENGTH_UNIT_H_ */
kim-api-2.2.1-git/c/include/KIM_Log.h 0000664 0000000 0000000 00000013313 13765565573 0017112 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_LOG_H_
#define KIM_LOG_H_
#ifndef KIM_FUNCTION_TYPES_H_
#include "KIM_FunctionTypes.h" /* IWYU pragma: export */
#endif
/* Forward declarations */
#ifndef KIM_LOG_VERBOSITY_DEFINED_
#define KIM_LOG_VERBOSITY_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LogVerbosity KIM_LogVerbosity;
#endif
#ifndef KIM_LANGUAGE_NAME_DEFINED_
#define KIM_LANGUAGE_NAME_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.2
**/
typedef struct KIM_LanguageName KIM_LanguageName;
#endif
#ifndef KIM_LOG_DEFINED_
#define KIM_LOG_DEFINED_
/**
** \brief \copybrief KIM::Log
**
** \sa KIM::Log, kim_log_module::kim_log_handle_type
**
** \since 2.0
**/
typedef struct KIM_Log KIM_Log;
#endif
/**
** \brief \copybrief KIM::Log::Create
**
** \sa KIM::Log::Create, kim_log_module::kim_log_create
**
** \since 2.0
**/
int KIM_Log_Create(KIM_Log ** const log);
/**
** \brief \copybrief KIM::Log::Destroy
**
** \sa KIM::Log::Destroy, kim_log_module::kim_log_destroy
**
** \since 2.0
**/
void KIM_Log_Destroy(KIM_Log ** const log);
/**
** \brief \copybrief KIM::Log::PushDefaultVerbosity
**
** \sa KIM::Log::PushDefaultVerbosity,
** kim_log_module::kim_push_default_verbosity
**
** \since 2.0
**/
void KIM_Log_PushDefaultVerbosity(KIM_LogVerbosity const logVerbosity);
/**
** \brief \copybrief KIM::Log::PopDefaultVerbosity
**
** \sa KIM::Log::PopDefaultVerbosity,
** kim_log_module::kim_pop_default_verbosity
**
** \since 2.0
**/
void KIM_Log_PopDefaultVerbosity();
/**
** \brief \copybrief KIM::Log::PushDefaultPrintFunction
**
** \sa KIM::Log::PushDefaultPrintFunction,
** kim_log_module::kim_push_default_print_function
**
** \since 2.2
**/
void KIM_Log_PushDefaultPrintFunction(KIM_LanguageName const languageName,
KIM_Function * const fptr);
/**
** \brief \copybrief KIM::Log::PopDefaultPrintFunction
**
** \sa KIM::Log::PopDefaultPrintFunction,
** kim_log_module::kim_pop_default_print_function
**
** \since 2.2
**/
void KIM_Log_PopDefaultPrintFunction();
/**
** \brief \copybrief KIM::Log::GetID
**
** \sa KIM::Log::GetID, kim_log_module::kim_get_id
**
** \since 2.0
**/
char const * KIM_Log_GetID(KIM_Log const * const log);
/**
** \brief \copybrief KIM::Log::SetID
**
** \sa KIM::Log::SetID, kim_log_module::kim_set_id
**
** \since 2.0
**/
void KIM_Log_SetID(KIM_Log * const log, char const * const id);
/**
** \brief \copybrief KIM::Log::PushVerbosity
**
** \sa KIM::Log::PushVerbosity, kim_log_module::kim_push_verbosity
**
** \since 2.0
**/
void KIM_Log_PushVerbosity(KIM_Log * const log,
KIM_LogVerbosity const logVerbosity);
/**
** \brief \copybrief KIM::Log::PopVerbosity
**
** \sa KIM::Log::PopVerbosity, kim_log_module::kim_pop_verbosity
**
** \since 2.0
**/
void KIM_Log_PopVerbosity(KIM_Log * const log);
/**
** \brief \copybrief KIM::Log::LogEntry
**
** \sa KIM::Log::LogEntry, kim_log_module::kim_log_entry
**
** \since 2.0
**/
void KIM_Log_LogEntry(KIM_Log const * const log,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName);
#endif /* KIM_LOG_H_ */
kim-api-2.2.1-git/c/include/KIM_LogMacros.h 0000664 0000000 0000000 00000014063 13765565573 0020262 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#undef FATAL_VERBOSITY
/**
** \brief Defined if FATAL Log entries are to be compiled.
**/
#define FATAL_VERBOSITY (KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_FATAL_)
#undef LOG_FATAL
#if (KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_FATAL_)
/**
** \def LOG_FATAL(message)
** \brief Convenience macro for FATAL Log entries with compile-time
** optimization.
**/
#define LOG_FATAL(message) \
KIM_LOGGER_FUNCTION_NAME(KIM_LOGGER_OBJECT_NAME, \
KIM_LOG_VERBOSITY_fatal, \
message, \
__LINE__, \
__FILE__)
#else
#define LOG_FATAL(message)
#endif
#undef ERROR_VERBOSITY
/**
** \brief Defined if ERROR Log entries are to be compiled.
**/
#define ERROR_VERBOSITY (KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_ERROR_)
#undef LOG_ERROR
#if (KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_ERROR_)
/**
** \def LOG_ERROR(message)
** \brief Convenience macro for ERROR Log entries with compile-time
** optimization.
**/
#define LOG_ERROR(message) \
KIM_LOGGER_FUNCTION_NAME(KIM_LOGGER_OBJECT_NAME, \
KIM_LOG_VERBOSITY_error, \
message, \
__LINE__, \
__FILE__)
#else
#define LOG_ERROR(message)
#endif
#undef WARNING_VERBOSITY
/**
** \brief Defined if WARNING Log entries are to be compiled.
**/
#define WARNING_VERBOSITY (KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_WARNING_)
#undef LOG_WARNING
#if (KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_WARNING_)
/**
** \def LOG_WARNING(message)
** \brief Convenience macro for WARNING Log entries with compile-time
** optimization.
**/
#define LOG_WARNING(message) \
KIM_LOGGER_FUNCTION_NAME(KIM_LOGGER_OBJECT_NAME, \
KIM_LOG_VERBOSITY_warning, \
message, \
__LINE__, \
__FILE__)
#else
#define LOG_WARNING(message)
#endif
#undef INFORMATION_VERBOSITY
/**
** \brief Defined if INFORMATION Log entries are to be compiled.
**/
#define INFORMATION_VERBOSITY \
(KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_INFORMATION_)
#undef LOG_INFORMATION
#if (KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_INFORMATION_)
/**
** \def LOG_INFORMATION(message)
** \brief Convenience macro for INFORMATION Log entries with compile-time
** optimization.
**/
#define LOG_INFORMATION(message) \
KIM_LOGGER_FUNCTION_NAME(KIM_LOGGER_OBJECT_NAME, \
KIM_LOG_VERBOSITY_information, \
message, \
__LINE__, \
__FILE__)
#else
#define LOG_INFORMATION(message)
#endif
#undef DEBUG_VERBOSITY
/**
** \brief Defined if DEBUG Log entries are to be compiled.
**/
#define DEBUG_VERBOSITY (KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_DEBUG_)
#undef LOG_DEBUG
#if (KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_DEBUG_)
/**
** \def LOG_DEBUG(message)
** \brief Convenience macro for DEBUG Log entries with compile-time
** optimization.
**/
#define LOG_DEBUG(message) \
KIM_LOGGER_FUNCTION_NAME(KIM_LOGGER_OBJECT_NAME, \
KIM_LOG_VERBOSITY_debug, \
message, \
__LINE__, \
__FILE__)
#else
#define LOG_DEBUG(message)
#endif
kim-api-2.2.1-git/c/include/KIM_LogVerbosity.h 0000664 0000000 0000000 00000017064 13765565573 0021030 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_LOG_VERBOSITY_H_
#define KIM_LOG_VERBOSITY_H_
/**
** \brief \copybrief KIM::LogVerbosity
**
** \sa KIM::LogVerbosity, kim_log_verbosity_module::kim_log_verbosity_type
**
** \since 2.0
**/
struct KIM_LogVerbosity
{
/**
** \brief \copybrief KIM::LogVerbosity::logVerbosityID
**
** \sa KIM::LogVerbosity::logVerbosityID,
** kim_log_verbosity_module::kim_log_verbosity_type::log_verbosity_id
**
** \since 2.0
**/
int logVerbosityID;
};
#ifndef KIM_LOG_VERBOSITY_DEFINED_
#define KIM_LOG_VERBOSITY_DEFINED_
/**
** \brief Convenience typedef.
**
** \since 2.0
**/
typedef struct KIM_LogVerbosity KIM_LogVerbosity;
#endif
/**
** \brief \copybrief KIM::LogVerbosity::LogVerbosity(std::string const &)
**
** \sa KIM::LogVerbosity::LogVerbosity(std::string const &),
** kim_log_verbosity_module::kim_from_string
**
** \since 2.0
**/
KIM_LogVerbosity KIM_LogVerbosity_FromString(char const * const str);
/**
** \brief \copybrief KIM::LogVerbosity::Known
**
** \sa KIM::LogVerbosity::Known, kim_log_verbosity_module::kim_known
**
** \since 2.0
**/
int KIM_LogVerbosity_Known(KIM_LogVerbosity const logVerbosity);
/**
** \brief \copybrief KIM::LogVerbosity::operator<()
**
** \sa KIM::LogVerbosity::operator<(),
** kim_log_verbosity_module::operator(.lt.)
**
** \since 2.0
**/
int KIM_LogVerbosity_LessThan(KIM_LogVerbosity const lhs,
KIM_LogVerbosity const rhs);
/**
** \brief \copybrief KIM::LogVerbosity::operator>()
**
** \sa KIM::LogVerbosity::operator>(),
** kim_log_verbosity_module::operator(.gt.)
**
** \since 2.0
**/
int KIM_LogVerbosity_GreaterThan(KIM_LogVerbosity const lhs,
KIM_LogVerbosity const rhs);
/**
** \brief \copybrief KIM::LogVerbosity::operator<=()
**
** \sa KIM::LogVerbosity::operator<=(),
** kim_log_verbosity_module::operator(.le.)
**
** \since 2.0
**/
int KIM_LogVerbosity_LessThanEqual(KIM_LogVerbosity const lhs,
KIM_LogVerbosity const rhs);
/**
** \brief \copybrief KIM::LogVerbosity::operator>=()
**
** \sa KIM::LogVerbosity::operator>=(),
** kim_log_verbosity_module::operator(.ge.)
**
** \since 2.0
**/
int KIM_LogVerbosity_GreaterThanEqual(KIM_LogVerbosity const lhs,
KIM_LogVerbosity const rhs);
/**
** \brief \copybrief KIM::LogVerbosity::operator==()
**
** \sa KIM::LogVerbosity::operator==(),
** kim_log_verbosity_module::operator(.eq.)
**
** \since 2.0
**/
int KIM_LogVerbosity_Equal(KIM_LogVerbosity const lhs,
KIM_LogVerbosity const rhs);
/**
** \brief \copybrief KIM::LogVerbosity::operator!=()
**
** \sa KIM::LogVerbosity::operator!=(),
** kim_log_verbosity_module::operator(.ne.)
**
** \since 2.0
**/
int KIM_LogVerbosity_NotEqual(KIM_LogVerbosity const lhs,
KIM_LogVerbosity const rhs);
/**
** \brief \copybrief KIM::LogVerbosity::ToString
**
** \sa KIM::LogVerbosity::ToString, kim_log_verbosity_module::kim_to_string
**
** \since 2.0
**/
char const * KIM_LogVerbosity_ToString(KIM_LogVerbosity const logVerbosity);
/**
** \brief \copybrief KIM::LOG_VERBOSITY::silent
**
** \sa KIM::LOG_VERBOSITY::silent,
** kim_log_verbosity_module::kim_log_verbosity_silent
**
** \since 2.0
**/
extern KIM_LogVerbosity const KIM_LOG_VERBOSITY_silent;
/**
** \brief \copybrief KIM::LOG_VERBOSITY::fatal
**
** \sa KIM::LOG_VERBOSITY::fatal,
** kim_log_verbosity_module::kim_log_verbosity_fatal
**
** \since 2.0
**/
extern KIM_LogVerbosity const KIM_LOG_VERBOSITY_fatal;
/**
** \brief \copybrief KIM::LOG_VERBOSITY::error
**
** \sa KIM::LOG_VERBOSITY::error,
** kim_log_verbosity_module::kim_log_verbosity_error
**
** \since 2.0
**/
extern KIM_LogVerbosity const KIM_LOG_VERBOSITY_error;
/**
** \brief \copybrief KIM::LOG_VERBOSITY::warning
**
** \sa KIM::LOG_VERBOSITY::warning,
** kim_log_verbosity_module::kim_log_verbosity_warning
**
** \since 2.0
**/
extern KIM_LogVerbosity const KIM_LOG_VERBOSITY_warning;
/**
** \brief \copybrief KIM::LOG_VERBOSITY::information
**
** \sa KIM::LOG_VERBOSITY::information,
** kim_log_verbosity_module::kim_log_verbosity_information
**
** \since 2.0
**/
extern KIM_LogVerbosity const KIM_LOG_VERBOSITY_information;
/**
** \brief \copybrief KIM::LOG_VERBOSITY::debug
**
** \sa KIM::LOG_VERBOSITY::debug,
** kim_log_verbosity_module::kim_log_verbosity_debug
**
** \since 2.0
**/
extern KIM_LogVerbosity const KIM_LOG_VERBOSITY_debug;
/**
** \brief \copybrief KIM::LOG_VERBOSITY::GetNumberOfLogVerbosities
**
** \sa KIM::LOG_VERBOSITY::GetNumberOfLogVerbosities,
** kim_log_verbosity_module::kim_get_number_of_log_verbosities
**
** \since 2.0
**/
void KIM_LOG_VERBOSITY_GetNumberOfLogVerbosities(
int * const numberOfLogVerbosities);
/**
** \brief \copybrief KIM::LOG_VERBOSITY::GetLogVerbosity
**
** \sa KIM::LOG_VERBOSITY::GetLogVerbosity,
** kim_log_verbosity_module::kim_get_log_verbosity
**
** \since 2.0
**/
int KIM_LOG_VERBOSITY_GetLogVerbosity(int const index,
KIM_LogVerbosity * const logVerbosity);
#endif /* KIM_LOG_VERBOSITY_H_ */
kim-api-2.2.1-git/c/include/KIM_Model.h 0000664 0000000 0000000 00000033434 13765565573 0017437 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_MODEL_H_
#define KIM_MODEL_H_
/* Forward declarations */
#ifndef KIM_LOG_VERBOSITY_DEFINED_
#define KIM_LOG_VERBOSITY_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LogVerbosity KIM_LogVerbosity;
#endif
#ifndef KIM_DATA_TYPE_DEFINED_
#define KIM_DATA_TYPE_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_DataType KIM_DataType;
#endif
#ifndef KIM_MODEL_ROUTINE_NAME_DEFINED_
#define KIM_MODEL_ROUTINE_NAME_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ModelRoutineName KIM_ModelRoutineName;
#endif
#ifndef KIM_SPECIES_NAME_DEFINED_
#define KIM_SPECIES_NAME_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_SpeciesName KIM_SpeciesName;
#endif
#ifndef KIM_NUMBERING_DEFINED_
#define KIM_NUMBERING_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_Numbering KIM_Numbering;
#endif
#ifndef KIM_LENGTH_UNIT_DEFINED_
#define KIM_LENGTH_UNIT_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LengthUnit KIM_LengthUnit;
#endif
#ifndef KIM_ENERGY_UNIT_DEFINED_
#define KIM_ENERGY_UNIT_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_EnergyUnit KIM_EnergyUnit;
#endif
#ifndef KIM_CHARGE_UNIT_DEFINED_
#define KIM_CHARGE_UNIT_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ChargeUnit KIM_ChargeUnit;
#endif
#ifndef KIM_TEMPERATURE_UNIT_DEFINED_
#define KIM_TEMPERATURE_UNIT_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_TemperatureUnit KIM_TemperatureUnit;
#endif
#ifndef KIM_TIME_UNIT_DEFINED_
#define KIM_TIME_UNIT_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_TimeUnit KIM_TimeUnit;
#endif
#ifndef KIM_COMPUTE_ARGUMENTS_DEFINED_
#define KIM_COMPUTE_ARGUMENTS_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ComputeArguments KIM_ComputeArguments;
#endif
#ifndef KIM_MODEL_DEFINED_
#define KIM_MODEL_DEFINED_
/**
** \brief \copybrief KIM::Model
**
** \sa KIM::Model, kim_model_module::kim_model_handle_type
**
** \since 2.0
**/
typedef struct KIM_Model KIM_Model;
#endif
/**
** \brief \copybrief KIM::Model::Create
**
** \sa KIM::Model::Create, kim_model_module::kim_model_create
**
** \since 2.0
**/
int KIM_Model_Create(KIM_Numbering const numbering,
KIM_LengthUnit const requestedLengthUnit,
KIM_EnergyUnit const requestedEnergyUnit,
KIM_ChargeUnit const requestedChargeUnit,
KIM_TemperatureUnit const requestedTemperatureUnit,
KIM_TimeUnit const requestedTimeUnit,
char const * const modelName,
int * const requestedUnitsAccepted,
KIM_Model ** const model);
/**
** \brief \copybrief KIM::Model::Destroy
**
** \sa KIM::Model::Destroy, kim_model_module::kim_model_destroy
**
** \since 2.0
**/
void KIM_Model_Destroy(KIM_Model ** const model);
/**
** \brief \copybrief KIM::Model::IsRoutinePresent
**
** \sa KIM::Model::IsRoutinePresent, kim_model_module::kim_is_routine_present
**
** \since 2.0
**/
int KIM_Model_IsRoutinePresent(KIM_Model const * const model,
KIM_ModelRoutineName const modelRoutineName,
int * const present,
int * const required);
/**
** \brief \copybrief KIM::Model::GetInfluenceDistance
**
** \sa KIM::Model::GetInfluenceDistance,
** kim_model_module::kim_get_influence_distance
**
** \since 2.0
**/
void KIM_Model_GetInfluenceDistance(KIM_Model const * const model,
double * const influenceDistance);
/**
** \brief \copybrief KIM::Model::GetNeighborListPointers
**
** \sa KIM::Model::GetNeighborListPointers,
** kim_model_module::kim_get_number_of_neighbor_lists,
** kim_model_module::kim_get_neighbor_list_values
**
** \since 2.0
**/
void KIM_Model_GetNeighborListPointers(
KIM_Model const * const model,
int * const numberOfNeighborLists,
double const ** const cutoffs,
int const ** const modelWillNotRequestNeighborsOfNoncontributingParticles);
/**
** \brief \copybrief KIM::Model::GetUnits
**
** \sa KIM::Model::GetUnits, kim_model_module::kim_get_units
**
** \since 2.0
**/
void KIM_Model_GetUnits(KIM_Model const * const model,
KIM_LengthUnit * const lengthUnit,
KIM_EnergyUnit * const energyUnit,
KIM_ChargeUnit * const chargeUnit,
KIM_TemperatureUnit * const temperatureUnit,
KIM_TimeUnit * const timeUnit);
/**
** \brief \copybrief KIM::Model::ComputeArgumentsCreate
**
** \sa KIM::Model::ComputeArgumentsCreate,
** kim_model_module::kim_compute_arguments_create
**
** \since 2.0
**/
int KIM_Model_ComputeArgumentsCreate(
KIM_Model const * const model,
KIM_ComputeArguments ** const computeArguments);
/**
** \brief \copybrief KIM::Model::ComputeArgumentsDestroy
**
** \sa KIM::Model::ComputeArgumentsDestroy,
** kim_model_module::kim_compute_arguments_destroy
**
** \since 2.0
**/
int KIM_Model_ComputeArgumentsDestroy(
KIM_Model const * const model,
KIM_ComputeArguments ** const computeArguments);
/**
** \brief \copybrief KIM::Model::Compute
**
** \sa KIM::Model::Compute, kim_model_module::kim_compute
**
** \since 2.0
**/
int KIM_Model_Compute(KIM_Model const * const model,
KIM_ComputeArguments const * const computeArguments);
/**
** \brief \copybrief KIM::Model::Extension
**
** \sa KIM::Model::Extension, kim_model_module::kim_extension
**
** \since 2.0
**/
int KIM_Model_Extension(KIM_Model * const model,
char const * const extensionID,
void * const extensionStructure);
/**
** \brief \copybrief KIM::Model::ClearThenRefresh
**
** \sa KIM::Model::ClearThenRefresh, kim_model_module::kim_clear_then_refresh
**
** \since 2.0
**/
int KIM_Model_ClearThenRefresh(KIM_Model * const model);
/**
** \brief \copybrief KIM::Model::WriteParameterizedModel
**
** \sa KIM::Model::WriteParameterizedModel,
** kim_model_module::kim_write_parameterized_model
**
** \since 2.0
**/
int KIM_Model_WriteParameterizedModel(KIM_Model const * const model,
char const * const path,
char const * const modelName);
/**
** \brief \copybrief KIM::Model::GetSpeciesSupportAndCode
**
** \sa KIM::Model::GetSpeciesSupportAndCode,
** kim_model_module::kim_get_species_support_and_code
**
** \since 2.0
**/
int KIM_Model_GetSpeciesSupportAndCode(KIM_Model const * const model,
KIM_SpeciesName const speciesName,
int * const speciesIsSupported,
int * const code);
/**
** \brief \copybrief KIM::Model::GetNumberOfParameters
**
** \sa KIM::Model::GetNumberOfParameters,
** kim_model_module::kim_get_number_of_parameters
**
** \since 2.0
**/
void KIM_Model_GetNumberOfParameters(KIM_Model const * const model,
int * const numberOfParameters);
/**
** \brief \copybrief KIM::Model::GetParameterMetadata
**
** \sa KIM::Model::GetParameterMetadata,
** kim_model_module::kim_get_parameter_metadata
**
** \since 2.0
**/
int KIM_Model_GetParameterMetadata(KIM_Model const * const model,
int const parameterIndex,
KIM_DataType * const dataType,
int * const extent,
char const ** const name,
char const ** const description);
/**
** \brief \copybrief KIM::Model::GetParameter(int const, int const,
** int * const) const
**
** \sa KIM::Model::GetParameter(int const,int const, int * const) const,
** kim_model_module::kim_get_parameter
**
** \since 2.0
**/
int KIM_Model_GetParameterInteger(KIM_Model const * const model,
int const parameterIndex,
int const arrayIndex,
int * const parameterValue);
/**
** \brief \copybrief KIM::Model::GetParameter(int const, int const,
** int * const) const
**
** \sa KIM::Model::GetParameter(int const,int const, double * const) const,
** kim_model_module::kim_get_parameter
**
** \since 2.0
**/
int KIM_Model_GetParameterDouble(KIM_Model const * const model,
int const parameterIndex,
int const arrayIndex,
double * const parameterValue);
/**
** \brief \copybrief KIM::Model::SetParameter(int const, int const, int const)
**
** \sa KIM::Model::SetParameter(int const, int const, int const),
** kim_model_module::kim_set_parameter
**
** \since 2.0
**/
int KIM_Model_SetParameterInteger(KIM_Model * const model,
int const parameterIndex,
int const arrayIndex,
int const parameterValue);
/**
** \brief \copybrief KIM::Model::SetParameter(int const, int const, int const)
**
** \sa KIM::Model::SetParameter(int const, int const, double const),
** kim_model_module::kim_set_parameter
**
** \since 2.0
**/
int KIM_Model_SetParameterDouble(KIM_Model * const model,
int const parameterIndex,
int const arrayIndex,
double const parameterValue);
/**
** \brief \copybrief KIM::Model::SetSimulatorBufferPointer
**
** \sa KIM::Model::SetSimulatorBufferPointer,
** kim_model_module::kim_set_simulator_buffer_pointer
**
** \since 2.0
**/
void KIM_Model_SetSimulatorBufferPointer(KIM_Model * const model,
void * const ptr);
/**
** \brief \copybrief KIM::Model::GetSimulatorBufferPointer
**
** \sa KIM::Model::GetSimulatorBufferPointer,
** kim_model_module::kim_get_simulator_buffer_pointer
**
** \since 2.0
**/
void KIM_Model_GetSimulatorBufferPointer(KIM_Model const * const model,
void ** const ptr);
/**
** \brief \copybrief KIM::Model::ToString
**
** \sa KIM::Model::ToString, kim_model_module::kim_to_string
**
** \since 2.0
**/
char const * KIM_Model_ToString(KIM_Model const * const model);
/**
** \brief \copybrief KIM::Model::SetLogID
**
** \sa KIM::Model::SetLogID, kim_model_module::kim_set_log_id
**
** \since 2.0
**/
void KIM_Model_SetLogID(KIM_Model * const model, char const * const logID);
/**
** \brief \copybrief KIM::Model::PushLogVerbosity
**
** \sa KIM::Model::PushLogVerbosity, kim_model_module::kim_push_log_verbosity
**
** \since 2.0
**/
void KIM_Model_PushLogVerbosity(KIM_Model * const model,
KIM_LogVerbosity const logVerbosity);
/**
** \brief \copybrief KIM::Model::PopLogVerbosity
**
** \sa KIM::Model::PopLogVerbosity, kim_model_module::kim_pop_log_verbosity
**
** \since 2.0
**/
void KIM_Model_PopLogVerbosity(KIM_Model * const model);
#endif /* KIM_MODEL_H_ */
kim-api-2.2.1-git/c/include/KIM_ModelCompute.h 0000664 0000000 0000000 00000010066 13765565573 0020770 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_MODEL_COMPUTE_H_
#define KIM_MODEL_COMPUTE_H_
/* Forward declarations */
#ifndef KIM_LOG_VERBOSITY_DEFINED_
#define KIM_LOG_VERBOSITY_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LogVerbosity KIM_LogVerbosity;
#endif
#ifndef KIM_MODEL_COMPUTE_DEFINED_
#define KIM_MODEL_COMPUTE_DEFINED_
/**
** \brief \copybrief KIM::ModelCompute
**
** \sa KIM::ModelCompute,
*kim_model_compute_module::kim_model_compute_handle_type
**
** \since 2.0
**/
typedef struct KIM_ModelCompute KIM_ModelCompute;
#endif
/**
** \brief \copybrief KIM::ModelCompute::GetModelBufferPointer
**
** \sa KIM::ModelCompute::GetModelBufferPointer,
** kim_model_compute_module::kim_get_model_buffer_pointer
**
** \since 2.0
**/
void KIM_ModelCompute_GetModelBufferPointer(
KIM_ModelCompute const * const modelCompute, void ** const ptr);
/**
** \brief \copybrief KIM::ModelCompute::LogEntry
**
** \sa KIM::ModelCompute::LogEntry, kim_model_compute_module::kim_log_entry
**
** \since 2.0
**/
void KIM_ModelCompute_LogEntry(KIM_ModelCompute const * const modelCompute,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName);
/**
** \brief \copybrief KIM::ModelCompute::ToString
**
** \sa KIM::ModelCompute::ToString, kim_model_compute_module::kim_to_string
**
** \since 2.0
**/
char const *
KIM_ModelCompute_ToString(KIM_ModelCompute const * const modelCompute);
#endif /* KIM_MODEL_COMPUTE_H_ */
kim-api-2.2.1-git/c/include/KIM_ModelComputeArguments.h 0000664 0000000 0000000 00000017142 13765565573 0022660 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_H_
#define KIM_MODEL_COMPUTE_ARGUMENTS_H_
/* Forward declarations */
#ifndef KIM_LOG_VERBOSITY_DEFINED_
#define KIM_LOG_VERBOSITY_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LogVerbosity KIM_LogVerbosity;
#endif
#ifndef KIM_COMPUTE_ARGUMENT_NAME_DEFINED_
#define KIM_COMPUTE_ARGUMENT_NAME_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ComputeArgumentName KIM_ComputeArgumentName;
#endif
#ifndef KIM_COMPUTE_CALLBACK_NAME_DEFINED_
#define KIM_COMPUTE_CALLBACK_NAME_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ComputeCallbackName KIM_ComputeCallbackName;
#endif
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_DEFINED_
#define KIM_MODEL_COMPUTE_ARGUMENTS_DEFINED_
/**
** \brief \copybrief KIM::ModelComputeArguments
**
** \sa KIM::ModelComputeArguments,
** kim_model_compute_arguments_module::kim_model_compute_arguments_handle_type
**
** \since 2.0
**/
typedef struct KIM_ModelComputeArguments KIM_ModelComputeArguments;
#endif
/**
** \brief \copybrief KIM::ModelComputeArguments::GetNeighborList
**
** \sa KIM::ModelComputeArguments::GetNeighborList,
** kim_model_compute_arguments_module::kim_get_neighbor_list
**
** \since 2.0
**/
int KIM_ModelComputeArguments_GetNeighborList(
KIM_ModelComputeArguments const * const modelComputeArguments,
int const neighborListIndex,
int const particleNumber,
int * const numberOfNeighbors,
int const ** const neighborsOfParticle);
/**
** \brief \copybrief KIM::ModelComputeArguments::ProcessDEDrTerm
**
** \sa KIM::ModelComputeArguments::ProcessDEDrTerm,
** kim_model_compute_arguments_module::kim_process_dedr_term
**
** \since 2.0
**/
int KIM_ModelComputeArguments_ProcessDEDrTerm(
KIM_ModelComputeArguments const * const modelComputeArguments,
double const de,
double const r,
double const * const dx,
int const i,
int const j);
/**
** \brief \copybrief KIM::ModelComputeArguments::ProcessD2EDr2Term
**
** \sa KIM::ModelComputeArguments::ProcessD2EDr2Term,
** kim_model_compute_arguments_module::kim_process_d2edr2_term
**
** \since 2.0
**/
int KIM_ModelComputeArguments_ProcessD2EDr2Term(
KIM_ModelComputeArguments const * const modelComputeArguments,
double const de,
double const * const r,
double const * const dx,
int const * const i,
int const * const j);
/**
** \brief \copybrief KIM::ModelComputeArguments::GetArgumentPointer
**
** \sa KIM::ModelComputeArguments::GetArgumentPointer,
** kim_model_compute_arguments_module::kim_get_argument_pointer
**
** \since 2.0
**/
int KIM_ModelComputeArguments_GetArgumentPointerInteger(
KIM_ModelComputeArguments const * const modelComputeArguments,
KIM_ComputeArgumentName const computeArgumentName,
int ** const ptr);
/**
** \brief \copybrief KIM::ModelComputeArguments::GetArgumentPointer
**
** \sa KIM::ModelComputeArguments::GetArgumentPointer,
** kim_model_compute_arguments_module::kim_get_argument_pointer
**
** \since 2.0
**/
int KIM_ModelComputeArguments_GetArgumentPointerDouble(
KIM_ModelComputeArguments const * const modelComputeArguments,
KIM_ComputeArgumentName const computeArgumentName,
double ** const ptr);
/**
** \brief \copybrief KIM::ModelComputeArguments::IsCallbackPresent
**
** \sa KIM::ModelComputeArguments::IsCallbackPresent,
** kim_model_compute_arguments_module::kim_is_callback_present
**
** \since 2.0
**/
int KIM_ModelComputeArguments_IsCallbackPresent(
KIM_ModelComputeArguments const * const modelComputeArguments,
KIM_ComputeCallbackName const computeCallbackName,
int * const present);
/**
** \brief \copybrief KIM::ModelComputeArguments::SetModelBufferPointer
**
** \sa KIM::ModelComputeArguments::SetModelBufferPointer,
** kim_model_compute_arguments_module::kim_set_model_buffer_pointer
**
** \since 2.0
**/
void KIM_ModelComputeArguments_SetModelBufferPointer(
KIM_ModelComputeArguments * const modelComputeArguments, void * const ptr);
/**
** \brief \copybrief KIM::ModelComputeArguments::GetModelBufferPointer
**
** \sa KIM::ModelComputeArguments::GetModelBufferPointer,
** kim_model_compute_arguments_module::kim_get_model_buffer_pointer
**
** \since 2.0
**/
void KIM_ModelComputeArguments_GetModelBufferPointer(
KIM_ModelComputeArguments const * const modelComputeArguments,
void ** const ptr);
/**
** \brief \copybrief KIM::ModelComputeArguments::LogEntry
**
** \sa KIM::ModelComputeArguments::LogEntry,
** kim_model_compute_arguments_module::kim_log_entry
**
** \since 2.0
**/
void KIM_ModelComputeArguments_LogEntry(
KIM_ModelComputeArguments const * const modelComputeArguments,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName);
/**
** \brief \copybrief KIM::ModelComputeArguments::ToString
**
** \sa KIM::ModelComputeArguments::ToString,
** kim_model_compute_arguments_module::kim_to_string
**
** \since 2.0
**/
char const * KIM_ModelComputeArguments_ToString(
KIM_ModelComputeArguments const * const modelComputeArguments);
#endif /* KIM_MODEL_COMPUTE_ARGUMENTS_H_ */
kim-api-2.2.1-git/c/include/KIM_ModelComputeArgumentsCreate.h 0000664 0000000 0000000 00000013754 13765565573 0024011 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_CREATE_H_
#define KIM_MODEL_COMPUTE_ARGUMENTS_CREATE_H_
/* Forward declarations */
#ifndef KIM_LOG_VERBOSITY_DEFINED_
#define KIM_LOG_VERBOSITY_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LogVerbosity KIM_LogVerbosity;
#endif
#ifndef KIM_SUPPORT_STATUS_DEFINED_
#define KIM_SUPPORT_STATUS_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_SupportStatus KIM_SupportStatus;
#endif
#ifndef KIM_COMPUTE_ARGUMENT_NAME_DEFINED_
#define KIM_COMPUTE_ARGUMENT_NAME_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ComputeArgumentName KIM_ComputeArgumentName;
#endif
#ifndef KIM_COMPUTE_CALLBACK_NAME_DEFINED_
#define KIM_COMPUTE_CALLBACK_NAME_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ComputeCallbackName KIM_ComputeCallbackName;
#endif
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_CREATE_DEFINED_
#define KIM_MODEL_COMPUTE_ARGUMENTS_CREATE_DEFINED_
/**
** \brief \copybrief KIM::ModelComputeArgumentsCreate
**
** \sa KIM::ModelComputeArgumentsCreate,
** kim_model_compute_arguments_create_module::kim_model_compute_arguments_create_handle_type
**
** \since 2.0
**/
typedef struct KIM_ModelComputeArgumentsCreate KIM_ModelComputeArgumentsCreate;
#endif
/**
** \brief \copybrief KIM::ModelComputeArgumentsCreate::SetArgumentSupportStatus
**
** \sa KIM::ModelComputeArgumentsCreate::SetArgumentSupportStatus,
** kim_model_compute_arguments_create_module::kim_set_argument_support_status
**
** \since 2.0
**/
int KIM_ModelComputeArgumentsCreate_SetArgumentSupportStatus(
KIM_ModelComputeArgumentsCreate * const modelComputeArgumentsCreate,
KIM_ComputeArgumentName const computeArgumentName,
KIM_SupportStatus const supportStatus);
/**
** \brief \copybrief KIM::ModelComputeArgumentsCreate::SetCallbackSupportStatus
**
** \sa KIM::ModelComputeArgumentsCreate::SetCallbackSupportStatus,
** kim_model_compute_arguments_create_module::kim_set_callback_support_status
**
** \since 2.0
**/
int KIM_ModelComputeArgumentsCreate_SetCallbackSupportStatus(
KIM_ModelComputeArgumentsCreate * const modelComputeArgumentsCreate,
KIM_ComputeCallbackName const computeCallbackName,
KIM_SupportStatus const supportStatus);
/**
** \brief \copybrief KIM::ModelComputeArgumentsCreate::SetModelBufferPointer
**
** \sa KIM::ModelComputeArgumentsCreate::SetModelBufferPointer,
** kim_model_compute_arguments_module::kim_set_model_buffer_pointer
**
** \since 2.0
**/
void KIM_ModelComputeArgumentsCreate_SetModelBufferPointer(
KIM_ModelComputeArgumentsCreate * const modelComputeArgumentsCreate,
void * const ptr);
/**
** \brief \copybrief KIM::ModelComputeArgumentsCreate::LogEntry
**
** \sa KIM::ModelComputeArgumentsCreate::LogEntry,
** kim_model_compute_arguments_module::kim_log_entry
**
** \since 2.0
**/
void KIM_ModelComputeArgumentsCreate_LogEntry(
KIM_ModelComputeArgumentsCreate const * const modelComputeArgumentsCreate,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName);
/**
** \brief \copybrief KIM::ModelComputeArgumentsCreate::ToString
**
** \sa KIM::ModelComputeArgumentsCreate::ToString,
** kim_model_compute_arguments_module::kim_to_string
**
** \since 2.0
**/
char const * KIM_ModelComputeArgumentsCreate_ToString(
KIM_ModelComputeArgumentsCreate const * const modelComputeArgumentsCreate);
#endif /* KIM_MODEL_COMPUTE_ARGUMENTS_CREATE_H_ */
kim-api-2.2.1-git/c/include/KIM_ModelComputeArgumentsDestroy.h 0000664 0000000 0000000 00000010736 13765565573 0024234 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_DESTROY_H_
#define KIM_MODEL_COMPUTE_ARGUMENTS_DESTROY_H_
/* Forward declarations */
#ifndef KIM_LOG_VERBOSITY_DEFINED_
#define KIM_LOG_VERBOSITY_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LogVerbosity KIM_LogVerbosity;
#endif
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_DESTROY_DEFINED_
#define KIM_MODEL_COMPUTE_ARGUMENTS_DESTROY_DEFINED_
/**
** \brief \copybrief KIM::ModelComputeArgumentsDestroy
**
** \sa KIM::ModelComputeArgumentsDestroy,
** kim_model_compute_arguments_destroy_module::kim_model_compute_arguments_destroy_handle_type
**
** \since 2.0
**/
typedef struct KIM_ModelComputeArgumentsDestroy
KIM_ModelComputeArgumentsDestroy;
#endif
/**
** \brief \copybrief KIM::ModelComputeArgumentsDestroy::GetModelBufferPointer
**
** \sa KIM::ModelComputeArgumentsDestroy::GetModelBufferPointer,
** kim_model_compute_arguments_destroy_module::kim_get_model_buffer_pointer
**
** \since 2.0
**/
void KIM_ModelComputeArgumentsDestroy_GetModelBufferPointer(
KIM_ModelComputeArgumentsDestroy const * const modelComputeArgumentsDestroy,
void ** const ptr);
/**
** \brief \copybrief KIM::ModelComputeArgumentsDestroy::LogEntry
**
** \sa KIM::ModelComputeArgumentsDestroy::LogEntry,
** kim_model_compute_arguments_destroy_module::kim_log_entry
**
** \since 2.0
**/
void KIM_ModelComputeArgumentsDestroy_LogEntry(
KIM_ModelComputeArgumentsDestroy const * const modelComputeArgumentsDestroy,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName);
/**
** \brief \copybrief KIM::ModelComputeArgumentsDestroy::ToString
**
** \sa KIM::ModelComputeArgumentsDestroy::ToString,
** kim_model_compute_arguments_destroy_module::kim_to_string
**
** \since 2.0
**/
char const * KIM_ModelComputeArgumentsDestroy_ToString(
KIM_ModelComputeArgumentsDestroy const * const
modelComputeArgumentsDestroy);
#endif /* KIM_MODEL_COMPUTE_ARGUMENTS_DESTROY_H_ */
kim-api-2.2.1-git/c/include/KIM_ModelCreate.h 0000664 0000000 0000000 00000024232 13765565573 0020557 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_MODEL_CREATE_H_
#define KIM_MODEL_CREATE_H_
#ifndef KIM_FUNCTION_TYPES_H_
#include "KIM_FunctionTypes.h" /* IWYU pragma: export */
#endif
/* Forward declarations */
#ifndef KIM_LOG_VERBOSITY_DEFINED_
#define KIM_LOG_VERBOSITY_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LogVerbosity KIM_LogVerbosity;
#endif
#ifndef KIM_LANGUAGE_NAME_DEFINED_
#define KIM_LANGUAGE_NAME_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LanguageName KIM_LanguageName;
#endif
#ifndef KIM_NUMBERING_DEFINED_
#define KIM_NUMBERING_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_Numbering KIM_Numbering;
#endif
#ifndef KIM_MODEL_ROUTINE_NAME_DEFINED_
#define KIM_MODEL_ROUTINE_NAME_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ModelRoutineName KIM_ModelRoutineName;
#endif
#ifndef KIM_SPECIES_NAME_DEFINED_
#define KIM_SPECIES_NAME_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_SpeciesName KIM_SpeciesName;
#endif
#ifndef KIM_LENGTH_UNIT_DEFINED_
#define KIM_LENGTH_UNIT_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LengthUnit KIM_LengthUnit;
#endif
#ifndef KIM_ENERGY_UNIT_DEFINED_
#define KIM_ENERGY_UNIT_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_EnergyUnit KIM_EnergyUnit;
#endif
#ifndef KIM_CHARGE_UNIT_DEFINED_
#define KIM_CHARGE_UNIT_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ChargeUnit KIM_ChargeUnit;
#endif
#ifndef KIM_TEMPERATURE_UNIT_DEFINED_
#define KIM_TEMPERATURE_UNIT_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_TemperatureUnit KIM_TemperatureUnit;
#endif
#ifndef KIM_TIME_UNIT_DEFINED_
#define KIM_TIME_UNIT_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_TimeUnit KIM_TimeUnit;
#endif
#ifndef KIM_MODEL_CREATE_DEFINED_
#define KIM_MODEL_CREATE_DEFINED_
/**
** \brief \copybrief KIM::ModelCreate
**
** \sa KIM::ModelCreate, kim_model_create_module::kim_model_create_handle_type
**
** \since 2.0
**/
typedef struct KIM_ModelCreate KIM_ModelCreate;
#endif
/**
** \brief \copybrief KIM::ModelCreate::SetModelNumbering
**
** \sa KIM::ModelCreate::SetModelNumbering,
** kim_model_create_module::kim_set_model_numbering
**
** \since 2.0
**/
int KIM_ModelCreate_SetModelNumbering(KIM_ModelCreate * const modelCreate,
KIM_Numbering const numbering);
/**
** \brief \copybrief KIM::ModelCreate::SetInfluenceDistancePointer
**
** \sa KIM::ModelCreate::SetInfluenceDistancePointer,
** kim_model_create_module::kim_set_influence_distance_pointer
**
** \since 2.0
**/
void KIM_ModelCreate_SetInfluenceDistancePointer(
KIM_ModelCreate * const modelCreate,
double const * const influenceDistance);
/**
** \brief \copybrief KIM::ModelCreate::SetNeighborListPointers
**
** \sa KIM::ModelCreate::SetNeighborListPointers,
** kim_model_create_module::kim_set_neighbor_list_pointers
**
** \since 2.0
**/
void KIM_ModelCreate_SetNeighborListPointers(
KIM_ModelCreate * const modelCreate,
int const numberOfNeighborLists,
double const * const cutoffs,
int const * const modelWillNotRequestNeighborsOfNoncontributingParticles);
/**
** \brief \copybrief KIM::ModelCreate::SetRoutinePointer
**
** \sa KIM::ModelCreate::SetRoutinePointer,
** kim_model_create_module::kim_set_routine_pointer
**
** \since 2.0
**/
int KIM_ModelCreate_SetRoutinePointer(
KIM_ModelCreate * const modelCreate,
KIM_ModelRoutineName const modelRoutineName,
KIM_LanguageName const languageName,
int const required,
KIM_Function * const fptr);
/**
** \brief \copybrief KIM::ModelCreate::SetSpeciesCode
**
** \sa KIM::ModelCreate::SetSpeciesCode,
** kim_model_create_module::kim_set_species_code
**
** \since 2.0
**/
int KIM_ModelCreate_SetSpeciesCode(KIM_ModelCreate * const modelCreate,
KIM_SpeciesName const speciesName,
int const code);
/**
** \brief \copybrief KIM::ModelCreate::SetParameterPointer
**
** \sa KIM::ModelCreate::SetParameterPointer,
** kim_model_create_module::kim_set_parameter_pointer
**
** \since 2.0
**/
int KIM_ModelCreate_SetParameterPointerInteger(
KIM_ModelCreate * const modelCreate,
int const extent,
int * const ptr,
char const * const name,
char const * const description);
/**
** \brief \copybrief KIM::ModelCreate::SetParameterPointer
**
** \sa KIM::ModelCreate::SetParameterPointer,
** kim_model_create_module::kim_set_parameter_pointer
**
** \since 2.0
**/
int KIM_ModelCreate_SetParameterPointerDouble(
KIM_ModelCreate * const modelCreate,
int const extent,
double * const ptr,
char const * const name,
char const * const description);
/**
** \brief \copybrief KIM::ModelCreate::SetModelBufferPointer
**
** \sa KIM::ModelCreate::SetModelBufferPointer,
** kim_model_create_module::kim_set_model_buffer_pointer
**
** \since 2.0
**/
void KIM_ModelCreate_SetModelBufferPointer(KIM_ModelCreate * const modelCreate,
void * const ptr);
/**
** \brief \copybrief KIM::ModelCreate::SetUnits
**
** \sa KIM::ModelCreate::SetUnits, kim_model_create_module::kim_set_units
**
** \since 2.0
**/
int KIM_ModelCreate_SetUnits(KIM_ModelCreate * const modelCreate,
KIM_LengthUnit const lengthUnit,
KIM_EnergyUnit const energyUnit,
KIM_ChargeUnit const chargeUnit,
KIM_TemperatureUnit const temperatureUnit,
KIM_TimeUnit const timeUnit);
/**
** \brief \copybrief KIM::ModelCreate::ConvertUnit
**
** \sa KIM::ModelCreate::ConvertUnit,
** kim_model_create_module::kim_convert_unit
**
** \since 2.0
**/
int KIM_ModelCreate_ConvertUnit(KIM_LengthUnit const fromLengthUnit,
KIM_EnergyUnit const fromEnergyUnit,
KIM_ChargeUnit const fromChargeUnit,
KIM_TemperatureUnit const fromTemperatureUnit,
KIM_TimeUnit const fromTimeUnit,
KIM_LengthUnit const toLengthUnit,
KIM_EnergyUnit const toEnergyUnit,
KIM_ChargeUnit const toChargeUnit,
KIM_TemperatureUnit const toTemperatureUnit,
KIM_TimeUnit const toTimeUnit,
double const lengthExponent,
double const energyExponent,
double const chargeExponent,
double const temperatureExponent,
double const timeExponent,
double * const conversionFactor);
/**
** \brief \copybrief KIM::ModelCreate::LogEntry
**
** \sa KIM::ModelCreate::LogEntry, kim_model_create_module::kim_log_entry
**
** \since 2.0
**/
void KIM_ModelCreate_LogEntry(KIM_ModelCreate const * const modelCreate,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName);
/**
** \brief \copybrief KIM::ModelCreate::ToString
**
** \sa KIM::ModelCreate::ToString, kim_model_create_module::kim_to_string
**
** \since 2.0
**/
char const *
KIM_ModelCreate_ToString(KIM_ModelCreate const * const modelCreate);
#endif /* KIM_MODEL_CREATE_H_ */
kim-api-2.2.1-git/c/include/KIM_ModelDestroy.h 0000664 0000000 0000000 00000010070 13765565573 0021000 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_MODEL_DESTROY_H_
#define KIM_MODEL_DESTROY_H_
/* Forward declarations */
#ifndef KIM_LOG_VERBOSITY_DEFINED_
#define KIM_LOG_VERBOSITY_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LogVerbosity KIM_LogVerbosity;
#endif
#ifndef KIM_MODEL_DESTROY_DEFINED_
#define KIM_MODEL_DESTROY_DEFINED_
/**
** \brief \copybrief KIM::ModelDestroy
**
** \sa KIM::ModelDestroy,
** kim_model_destroy_module::kim_model_destroy_handle_type
**
** \since 2.0
**/
typedef struct KIM_ModelDestroy KIM_ModelDestroy;
#endif
/**
** \brief \copybrief KIM::ModelDestroy::GetModelBufferPointer
**
** \sa KIM::ModelDestroy::GetModelBufferPointer,
** kim_model_destroy_module::kim_get_model_buffer_pointer
**
** \since 2.0
**/
void KIM_ModelDestroy_GetModelBufferPointer(
KIM_ModelDestroy const * const modelDestroy, void ** const ptr);
/**
** \brief \copybrief KIM::ModelDestroy::LogEntry
**
** \sa KIM::ModelDestroy::LogEntry, kim_model_destroy_module::kim_log_entry
**
** \since 2.0
**/
void KIM_ModelDestroy_LogEntry(KIM_ModelDestroy const * const modelDestroy,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName);
/**
** \brief \copybrief KIM::ModelDestroy::ToString
**
** \sa KIM::ModelDestroy::ToString, kim_model_destroy_module::kim_to_string
**
** \since 2.0
**/
char const *
KIM_ModelDestroy_ToString(KIM_ModelDestroy const * const modelDestroy);
#endif /* KIM_MODEL_DESTROY_H_ */
kim-api-2.2.1-git/c/include/KIM_ModelDriverCreate.h 0000664 0000000 0000000 00000027122 13765565573 0021734 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_MODEL_DRIVER_CREATE_H_
#define KIM_MODEL_DRIVER_CREATE_H_
#ifndef KIM_FUNCTION_TYPES_H_
#include "KIM_FunctionTypes.h" /* IWYU pragma: export */
#endif
/* Forward declarations */
#ifndef KIM_LOG_VERBOSITY_DEFINED_
#define KIM_LOG_VERBOSITY_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LogVerbosity KIM_LogVerbosity;
#endif
#ifndef KIM_LANGUAGE_NAME_DEFINED_
#define KIM_LANGUAGE_NAME_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LanguageName KIM_LanguageName;
#endif
#ifndef KIM_NUMBERING_DEFINED_
#define KIM_NUMBERING_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_Numbering KIM_Numbering;
#endif
#ifndef KIM_MODEL_ROUTINE_NAME_DEFINED_
#define KIM_MODEL_ROUTINE_NAME_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ModelRoutineName KIM_ModelRoutineName;
#endif
#ifndef KIM_SPECIES_NAME_DEFINED_
#define KIM_SPECIES_NAME_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_SpeciesName KIM_SpeciesName;
#endif
#ifndef KIM_LENGTH_UNIT_DEFINED_
#define KIM_LENGTH_UNIT_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LengthUnit KIM_LengthUnit;
#endif
#ifndef KIM_ENERGY_UNIT_DEFINED_
#define KIM_ENERGY_UNIT_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_EnergyUnit KIM_EnergyUnit;
#endif
#ifndef KIM_CHARGE_UNIT_DEFINED_
#define KIM_CHARGE_UNIT_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ChargeUnit KIM_ChargeUnit;
#endif
#ifndef KIM_TEMPERATURE_UNIT_DEFINED_
#define KIM_TEMPERATURE_UNIT_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_TemperatureUnit KIM_TemperatureUnit;
#endif
#ifndef KIM_TIME_UNIT_DEFINED_
#define KIM_TIME_UNIT_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_TimeUnit KIM_TimeUnit;
#endif
#ifndef KIM_MODEL_DRIVER_CREATE_DEFINED_
#define KIM_MODEL_DRIVER_CREATE_DEFINED_
/**
** \brief \copybrief KIM::ModelDriverCreate
**
** \sa KIM::ModelDriverCreate,
** kim_model_driver_create_module::kim_model_driver_create_handle_type
**
** \since 2.0
**/
typedef struct KIM_ModelDriverCreate KIM_ModelDriverCreate;
#endif
/**
** \brief \copybrief KIM::ModelDriverCreate::GetParameterFileDirectoryName
**
** \sa KIM::ModelDriverCreate::GetParameterFileDirectoryName,
** kim_model_driver_create_module::kim_get_parameter_file_directory_name
**
** \since 2.2
**/
void KIM_ModelDriverCreate_GetParameterFileDirectoryName(
KIM_ModelDriverCreate const * const modelDriverCreate,
char const ** const directoryName);
/**
** \brief \copybrief KIM::ModelDriverCreate::GetNumberOfParameterFiles
**
** \sa KIM::ModelDriverCreate::GetNumberOfParameterFiles,
** kim_model_driver_create_module::kim_get_number_of_parameter_files
**
** \since 2.0
**/
void KIM_ModelDriverCreate_GetNumberOfParameterFiles(
KIM_ModelDriverCreate const * const modelDriverCreate,
int * const numberOfParameterFiles);
/**
** \brief \copybrief KIM::ModelDriverCreate::GetParameterFileName
**
** \sa KIM::ModelDriverCreate::GetParameterFileName,
** kim_model_driver_create_module::kim_get_parameter_file_name
**
** \since 2.0
**
** \deprecated As of 2.2. Please use
** KIM_ModelDriverCreate_GetParameterFileBasename() instead.
**/
int KIM_ModelDriverCreate_GetParameterFileName(
KIM_ModelDriverCreate const * const modelDriverCreate,
int const index,
char const ** const parameterFileName);
/**
** \brief \copybrief KIM::ModelDriverCreate::GetParameterFileBasename
**
** \sa KIM::ModelDriverCreate::GetParameterFileBasename,
** kim_model_driver_create_module::kim_get_parameter_file_basename
**
** \since 2.2
**/
int KIM_ModelDriverCreate_GetParameterFileBasename(
KIM_ModelDriverCreate const * const modelDriverCreate,
int const index,
char const ** const parameterFileBasename);
/**
** \brief \copybrief KIM::ModelDriverCreate::SetModelNumbering
**
** \sa KIM::ModelDriverCreate::SetModelNumbering,
** kim_model_driver_create_module::kim_set_model_numbering
**
** \since 2.0
**/
int KIM_ModelDriverCreate_SetModelNumbering(
KIM_ModelDriverCreate * const modelDriverCreate,
KIM_Numbering const numbering);
/**
** \brief \copybrief KIM::ModelDriverCreate::SetInfluenceDistancePointer
**
** \sa KIM::ModelDriverCreate::SetInfluenceDistancePointer,
** kim_model_driver_create_module::kim_set_influence_distance_pointer
**
** \since 2.0
**/
void KIM_ModelDriverCreate_SetInfluenceDistancePointer(
KIM_ModelDriverCreate * const modelDriverCreate,
double const * const influenceDistance);
/**
** \brief \copybrief KIM::ModelDriverCreate::SetNeighborListPointers
**
** \sa KIM::ModelDriverCreate::SetNeighborListPointers,
** kim_model_driver_create_module::kim_set_neighbor_list_pointers
**
** \since 2.0
**/
void KIM_ModelDriverCreate_SetNeighborListPointers(
KIM_ModelDriverCreate * const modelDriverCreate,
int const numberOfNeighborLists,
double const * const cutoffs,
int const * const modelWillNotRequestNeighborsOfNoncontributingParticles);
/**
** \brief \copybrief KIM::ModelDriverCreate::SetRoutinePointer
**
** \sa KIM::ModelDriverCreate::SetRoutinePointer,
** kim_model_driver_create_module::kim_set_routine_pointer
**
** \since 2.0
**/
int KIM_ModelDriverCreate_SetRoutinePointer(
KIM_ModelDriverCreate * const modelDriverCreate,
KIM_ModelRoutineName const modelRoutineName,
KIM_LanguageName const languageName,
int const required,
KIM_Function * const fptr);
/**
** \brief \copybrief KIM::ModelDriverCreate::SetSpeciesCode
**
** \sa KIM::ModelDriverCreate::SetSpeciesCode,
** kim_model_driver_create_module::kim_set_species_code
**
** \since 2.0
**/
int KIM_ModelDriverCreate_SetSpeciesCode(
KIM_ModelDriverCreate * const modelDriverCreate,
KIM_SpeciesName const speciesName,
int const code);
/**
** \brief \copybrief KIM::ModelDriverCreate::SetParameterPointer
**
** \sa KIM::ModelDriverCreate::SetParameterPointer,
** kim_model_driver_create_module::kim_set_parameter_pointer
**
** \since 2.0
**/
int KIM_ModelDriverCreate_SetParameterPointerInteger(
KIM_ModelDriverCreate * const modelDriverCreate,
int const extent,
int * const ptr,
char const * const name,
char const * const description);
/**
** \brief \copybrief KIM::ModelDriverCreate::SetParameterPointer
**
** \sa KIM::ModelDriverCreate::SetParameterPointer,
** kim_model_driver_create_module::kim_set_parameter_pointer
**
** \since 2.0
**/
int KIM_ModelDriverCreate_SetParameterPointerDouble(
KIM_ModelDriverCreate * const modelDriverCreate,
int const extent,
double * const ptr,
char const * const name,
char const * const description);
/**
** \brief \copybrief KIM::ModelDriverCreate::SetModelBufferPointer
**
** \sa KIM::ModelDriverCreate::SetModelBufferPointer,
** kim_model_driver_create_module::kim_set_model_buffer_pointer
**
** \since 2.0
**/
void KIM_ModelDriverCreate_SetModelBufferPointer(
KIM_ModelDriverCreate * const modelDriverCreate, void * const ptr);
/**
** \brief \copybrief KIM::ModelDriverCreate::SetUnits
**
** \sa KIM::ModelDriverCreate::SetUnits,
** kim_model_driver_create_module::kim_set_units
**
** \since 2.0
**/
int KIM_ModelDriverCreate_SetUnits(
KIM_ModelDriverCreate * const modelDriverCreate,
KIM_LengthUnit const lengthUnit,
KIM_EnergyUnit const energyUnit,
KIM_ChargeUnit const chargeUnit,
KIM_TemperatureUnit const temperatureUnit,
KIM_TimeUnit const timeUnit);
/**
** \brief \copybrief KIM::ModelDriverCreate::ConvertUnit
**
** \sa KIM::ModelDriverCreate::ConvertUnit,
** kim_model_driver_create_module::kim_convert_unit
**
** \since 2.0
**/
int KIM_ModelDriverCreate_ConvertUnit(
KIM_LengthUnit const fromLengthUnit,
KIM_EnergyUnit const fromEnergyUnit,
KIM_ChargeUnit const fromChargeUnit,
KIM_TemperatureUnit const fromTemperatureUnit,
KIM_TimeUnit const fromTimeUnit,
KIM_LengthUnit const toLengthUnit,
KIM_EnergyUnit const toEnergyUnit,
KIM_ChargeUnit const toChargeUnit,
KIM_TemperatureUnit const toTemperatureUnit,
KIM_TimeUnit const toTimeUnit,
double const lengthExponent,
double const energyExponent,
double const chargeExponent,
double const temperatureExponent,
double const timeExponent,
double * const conversionFactor);
/**
** \brief \copybrief KIM::ModelDriverCreate::LogEntry
**
** \sa KIM::ModelDriverCreate::LogEntry,
** kim_model_driver_create_module::kim_log_entry
**
** \since 2.0
**/
void KIM_ModelDriverCreate_LogEntry(
KIM_ModelDriverCreate const * const modelDriverCreate,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName);
/**
** \brief \copybrief KIM::ModelDriverCreate::ToString
**
** \sa KIM::ModelDriverCreate::ToString,
** kim_model_driver_create_module::kim_to_string
**
** \since 2.0
**/
char const * KIM_ModelDriverCreate_ToString(
KIM_ModelDriverCreate const * const modelDriverCreate);
#endif /* KIM_MODEL_DRIVER_CREATE_H_ */
kim-api-2.2.1-git/c/include/KIM_ModelDriverHeaders.h 0000664 0000000 0000000 00000010040 13765565573 0022073 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_MODEL_DRIVER_HEADERS_H_
#define KIM_MODEL_DRIVER_HEADERS_H_
/* IWYU pragma: begin_exports */
#ifndef KIM_MODEL_DRIVER_CREATE_H_
#include "KIM_ModelDriverCreate.h"
#endif
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
#ifndef KIM_LANGUAGE_NAME_H_
#include "KIM_LanguageName.h"
#endif
#ifndef KIM_NUMBERING_H_
#include "KIM_Numbering.h"
#endif
#ifndef KIM_MODEL_ROUTINE_NAME_H_
#include "KIM_ModelRoutineName.h"
#endif
#ifndef KIM_SPECIES_NAME_H_
#include "KIM_SpeciesName.h"
#endif
#ifndef KIM_SUPPORT_STATUS_H_
#include "KIM_SupportStatus.h"
#endif
#ifndef KIM_UNIT_SYSTEM_H_
#include "KIM_UnitSystem.h"
#endif
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_CREATE_H_
#include "KIM_ModelComputeArgumentsCreate.h"
#endif
#ifndef KIM_COMPUTE_ARGUMENT_NAME_H_
#include "KIM_ComputeArgumentName.h"
#endif
#ifndef KIM_DATA_TYPE_H_
#include "KIM_DataType.h"
#endif
#ifndef KIM_COMPUTE_CALLBACK_NAME_H_
#include "KIM_ComputeCallbackName.h"
#endif
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_H_
#include "KIM_ModelComputeArguments.h"
#endif
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_DESTROY_H_
#include "KIM_ModelComputeArgumentsDestroy.h"
#endif
#ifndef KIM_MODEL_COMPUTE_H_
#include "KIM_ModelCompute.h"
#endif
#ifndef KIM_MODEL_EXTENSION_H_
#include "KIM_ModelExtension.h"
#endif
#ifndef KIM_MODEL_REFRESH_H_
#include "KIM_ModelRefresh.h"
#endif
#ifndef KIM_MODEL_WRITE_PARAMETERIZED_MODEL_H_
#include "KIM_ModelWriteParameterizedModel.h"
#endif
#ifndef KIM_MODEL_DESTROY_H_
#include "KIM_ModelDestroy.h"
#endif
/* IWYU pragma: end_exports */
#endif /* KIM_MODEL_DRIVER_HEADERS_H_ */
kim-api-2.2.1-git/c/include/KIM_ModelExtension.h 0000664 0000000 0000000 00000023636 13765565573 0021337 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_MODEL_EXTENSION_H_
#define KIM_MODEL_EXTENSION_H_
/* Forward declarations */
#ifndef KIM_LOG_VERBOSITY_DEFINED_
#define KIM_LOG_VERBOSITY_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LogVerbosity KIM_LogVerbosity;
#endif
#ifndef KIM_MODEL_DEFINED_
#define KIM_MODEL_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_Model KIM_Model;
#endif
#ifndef KIM_MODEL_COMPUTE_DEFINED_
#define KIM_MODEL_COMPUTE_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ModelCompute KIM_ModelCompute;
#endif
#ifndef KIM_MODEL_CREATE_DEFINED_
#define KIM_MODEL_CREATE_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ModelCreate KIM_ModelCreate;
#endif
#ifndef KIM_MODEL_DESTROY_DEFINED_
#define KIM_MODEL_DESTROY_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ModelDestroy KIM_ModelDestroy;
#endif
#ifndef KIM_MODEL_DRIVER_CREATE_DEFINED_
#define KIM_MODEL_DRIVER_CREATE_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ModelDriverCreate KIM_ModelDriverCreate;
#endif
#ifndef KIM_MODEL_REFRESH_DEFINED_
#define KIM_MODEL_REFRESH_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ModelRefresh KIM_ModelRefresh;
#endif
#ifndef KIM_MODEL_WRITE_PARAMETERIZED_MODEL_DEFINED_
#define KIM_MODEL_WRITE_PARAMETERIZED_MODEL_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ModelWriteParameterizedModel
KIM_ModelWriteParameterizedModel;
#endif
#ifndef KIM_COMPUTE_ARGUMENTS_DEFINED_
#define KIM_COMPUTE_ARGUMENTS_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ComputeArguments KIM_ComputeArguments;
#endif
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_DEFINED_
#define KIM_MODEL_COMPUTE_ARGUMENTS_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ModelComputeArguments KIM_ModelComputeArguments;
#endif
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_CREATE_DEFINED_
#define KIM_MODEL_COMPUTE_ARGUMENTS_CREATE_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ModelComputeArgumentsCreate KIM_ModelComputeArgumentsCreate;
#endif
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_DESTROY_DEFINED_
#define KIM_MODEL_COMPUTE_ARGUMENTS_DESTROY_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_ModelComputeArgumentsDestroy
KIM_ModelComputeArgumentsDestroy;
#endif
#ifndef KIM_MODEL_EXTENSION_DEFINED_
#define KIM_MODEL_EXTENSION_DEFINED_
/**
** \brief \copybrief KIM::ModelExtension
**
** \sa KIM::ModelExtension,
** kim_model_extension_module::kim_model_extension_handle_type
**
** \since 2.0
**/
typedef struct KIM_ModelExtension KIM_ModelExtension;
#endif
/**
** \brief \copybrief KIM::ModelExtension::GetExtensionID
**
** \sa KIM::ModelExtension::GetExtensionID,
** kim_model_extension_module::kim_get_extension_id
**
** \since 2.0
**/
void KIM_ModelExtension_GetExtensionID(
KIM_ModelExtension const * const modelExtension,
char const ** const extensionID);
/**
** \brief \copybrief KIM::ModelExtension::Model
**
** \sa KIM::ModelExtension::Model, kim_model_extension_module::kim_to_model
**
** \since 2.0
**/
KIM_Model *
KIM_ModelExtension_ToModel(KIM_ModelExtension * const modelExtension);
/**
** \brief \copybrief KIM::ModelExtension::ModelCompute
**
** \sa KIM::ModelExtension::ModelCompute,
** kim_model_extension_module::kim_to_model_compute
**
** \since 2.0
**/
KIM_ModelCompute *
KIM_ModelExtension_ToModelCompute(KIM_ModelExtension * const modelExtension);
/**
** \brief \copybrief KIM::ModelExtension::ModelCreate
**
** \sa KIM::ModelExtension::ModelCreate,
** kim_model_extension_module::kim_to_model_create
**
** \since 2.0
**/
KIM_ModelCreate *
KIM_ModelExtension_ToModelCreate(KIM_ModelExtension * const modelExtension);
/**
** \brief \copybrief KIM::ModelExtension::ModelDestroy
**
** \sa KIM::ModelExtension::ModelDestroy,
** kim_model_extension_module::kim_to_model_destroy
**
** \since 2.0
**/
KIM_ModelDestroy *
KIM_ModelExtension_ToModelDestroy(KIM_ModelExtension * const modelExtension);
/**
** \brief \copybrief KIM::ModelExtension::ModelDriverCreate
**
** \sa KIM::ModelExtension::ModelDriverCreate,
** kim_model_extension_module::kim_to_model_driver_create
**
** \since 2.0
**/
KIM_ModelDriverCreate * KIM_ModelExtension_ToModelDriverCreate(
KIM_ModelExtension * const modelExtension);
/**
** \brief \copybrief KIM::ModelExtension::ModelRefresh
**
** \sa KIM::ModelExtension::ModelRefresh,
** kim_model_extension_module::kim_to_model_refresh
**
** \since 2.0
**/
KIM_ModelRefresh *
KIM_ModelExtension_ToModelRefresh(KIM_ModelExtension * const modelExtension);
/**
** \brief \copybrief KIM::ModelExtension::ModelWriteParameterizedModel
**
** \sa KIM::ModelExtension::ModelWriteParameterizedModel,
** kim_model_extension_module::kim_to_model_write_parameterized_model
**
** \since 2.0
**/
KIM_ModelWriteParameterizedModel *
KIM_ModelExtension_ToModelWriteParameterizedModel(
KIM_ModelExtension * const modelExtension);
/**
** \brief \copybrief KIM::ModelExtension::ModelComputeArguments
**
** \sa KIM::ModelExtension::ModelComputeArguments,
** kim_model_extension_module::kim_to_model_compute_arguments
**
** \since 2.0
**/
KIM_ModelComputeArguments * KIM_ModelExtension_ToModelComputeArguments(
KIM_ModelExtension const * const modelExtension,
KIM_ComputeArguments * const computeArguments);
KIM_ModelComputeArgumentsCreate *
/**
** \brief \copybrief KIM::ModelExtension::ModelComputeArgumentsCreate
**
** \sa KIM::ModelExtension::ModelComputeArgumentsCreate,
** kim_model_extension_module::kim_to_model_compute_arguments_create
**
** \since 2.0
**/
KIM_ModelExtension_ToModelComputeArgumentsCreate(
KIM_ModelExtension const * const modelExtension,
KIM_ComputeArguments * const computeArguments);
/**
** \brief \copybrief KIM::ModelExtension::ModelComputeArgumentsDestroy
**
** \sa KIM::ModelExtension::ModelComputeArgumentsDestroy,
** kim_model_extension_module::kim_to_model_compute_arguments_destroy
**
** \since 2.0
**/
KIM_ModelComputeArgumentsDestroy *
KIM_ModelExtension_ToModelComputeArgumentsDestroy(
KIM_ModelExtension const * const modelExtension,
KIM_ComputeArguments * const computeArguments);
/**
** \brief \copybrief KIM::ModelExtension::GetModelBufferPointer
**
** \sa KIM::ModelExtension::GetModelBufferPointer,
** kim_model_extension_module::kim_get_model_buffer_pointer
**
** \since 2.0
**/
void KIM_ModelExtension_GetModelBufferPointer(
KIM_ModelExtension const * const modelCompute, void ** const ptr);
/**
** \brief \copybrief KIM::ModelExtension::LogEntry
**
** \sa KIM::ModelExtension::LogEntry,
** kim_model_extension_module::kim_log_entry
**
** \since 2.0
**/
void KIM_ModelExtension_LogEntry(KIM_ModelExtension const * const modelCompute,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName);
/**
** \brief \copybrief KIM::ModelExtension::ToString
**
** \sa KIM::ModelExtension::ToString,
** kim_model_extension_module::kim_to_string
**
** \since 2.0
**/
char const *
KIM_ModelExtension_ToString(KIM_ModelExtension const * const modelCompute);
#endif /* KIM_MODEL_EXTENSION_H_ */
kim-api-2.2.1-git/c/include/KIM_ModelHeaders.h 0000664 0000000 0000000 00000007776 13765565573 0020745 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_MODEL_HEADERS_H_
#define KIM_MODEL_HEADERS_H_
/* IWYU pragma: begin_exports */
#ifndef KIM_MODEL_CREATE_H_
#include "KIM_ModelCreate.h"
#endif
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
#ifndef KIM_LANGUAGE_NAME_H_
#include "KIM_LanguageName.h"
#endif
#ifndef KIM_NUMBERING_H_
#include "KIM_Numbering.h"
#endif
#ifndef KIM_MODEL_ROUTINE_NAME_H_
#include "KIM_ModelRoutineName.h"
#endif
#ifndef KIM_SPECIES_NAME_H_
#include "KIM_SpeciesName.h"
#endif
#ifndef KIM_SUPPORT_STATUS_H_
#include "KIM_SupportStatus.h"
#endif
#ifndef KIM_UNIT_SYSTEM_H_
#include "KIM_UnitSystem.h"
#endif
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_CREATE_H_
#include "KIM_ModelComputeArgumentsCreate.h"
#endif
#ifndef KIM_COMPUTE_ARGUMENT_NAME_H_
#include "KIM_ComputeArgumentName.h"
#endif
#ifndef KIM_DATA_TYPE_H_
#include "KIM_DataType.h"
#endif
#ifndef KIM_COMPUTE_CALLBACK_NAME_H_
#include "KIM_ComputeCallbackName.h"
#endif
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_H_
#include "KIM_ModelComputeArguments.h"
#endif
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_DESTROY_H_
#include "KIM_ModelComputeArgumentsDestroy.h"
#endif
#ifndef KIM_MODEL_COMPUTE_H_
#include "KIM_ModelCompute.h"
#endif
#ifndef KIM_MODEL_EXTENSION_H_
#include "KIM_ModelExtension.h"
#endif
#ifndef KIM_MODEL_REFRESH_H_
#include "KIM_ModelRefresh.h"
#endif
#ifndef KIM_MODEL_WRITE_PARAMETERIZED_MODEL_H_
#include "KIM_ModelWriteParameterizedModel.h"
#endif
#ifndef KIM_MODEL_DESTROY_H_
#include "KIM_ModelDestroy.h"
#endif
/* IWYU pragma: end_exports */
#endif /* KIM_MODEL_HEADERS_H_ */
kim-api-2.2.1-git/c/include/KIM_ModelRefresh.h 0000664 0000000 0000000 00000011545 13765565573 0020755 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_MODEL_REFRESH_H_
#define KIM_MODEL_REFRESH_H_
/* Forward declarations */
#ifndef KIM_LOG_VERBOSITY_DEFINED_
#define KIM_LOG_VERBOSITY_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LogVerbosity KIM_LogVerbosity;
#endif
#ifndef KIM_MODEL_REFRESH_DEFINED_
#define KIM_MODEL_REFRESH_DEFINED_
/**
** \brief \copybrief KIM::ModelRefresh
**
** \sa KIM::ModelRefresh,
** kim_model_refresh_module::kim_model_refresh_handle_type
**
** \since 2.0
**/
typedef struct KIM_ModelRefresh KIM_ModelRefresh;
#endif
/**
** \brief \copybrief KIM::ModelRefresh::SetInfluenceDistancePointer
**
** \sa KIM::ModelRefresh::SetInfluenceDistancePointer,
** kim_model_refresh_module::kim_set_influence_distance_pointer
**
** \since 2.0
**/
void KIM_ModelRefresh_SetInfluenceDistancePointer(
KIM_ModelRefresh * const modelRefresh,
double const * const influenceDistance);
/**
** \brief \copybrief KIM::ModelRefresh::SetNeighborListPointers
**
** \sa KIM::ModelRefresh::SetNeighborListPointers,
** kim_model_refresh_module::kim_set_neighbor_list_pointers
**
** \since 2.0
**/
void KIM_ModelRefresh_SetNeighborListPointers(
KIM_ModelRefresh * const modelRefresh,
int const numberOfNeighborLists,
double const * const cutoffs,
int const * const modelWillNotRequestNeighborsOfNoncontributingParticles);
/**
** \brief \copybrief KIM::ModelRefresh::GetModelBufferPointer
**
** \sa KIM::ModelRefresh::GetModelBufferPointer,
** kim_model_refresh_module::kim_get_model_buffer_pointer
**
** \since 2.0
**/
void KIM_ModelRefresh_GetModelBufferPointer(
KIM_ModelRefresh const * const modelRefresh, void ** const ptr);
/**
** \brief \copybrief KIM::ModelRefresh::LogEntry
**
** \sa KIM::ModelRefresh::LogEntry, kim_model_refresh_module::kim_log_entry
**
** \since 2.0
**/
void KIM_ModelRefresh_LogEntry(KIM_ModelRefresh const * const modelRefresh,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName);
/**
** \brief \copybrief KIM::ModelRefresh::ToString
**
** \sa KIM::ModelRefresh::ToString, kim_model_refresh_module::kim_to_string
**
** \since 2.0
**/
char const *
KIM_ModelRefresh_ToString(KIM_ModelRefresh const * const modelRefresh);
#endif /* KIM_MODEL_REFRESH_H_ */
kim-api-2.2.1-git/c/include/KIM_ModelRoutineName.h 0000664 0000000 0000000 00000017175 13765565573 0021612 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_MODEL_ROUTINE_NAME_H_
#define KIM_MODEL_ROUTINE_NAME_H_
/**
** \brief \copybrief KIM::ModelRoutineName
**
** \sa KIM::ModelRoutineName,
** kim_model_routine_name_module::kim_model_routine_name_type
**
** \since 2.0
**/
struct KIM_ModelRoutineName
{
/**
** \brief \copybrief KIM::ModelRoutineName::modelRoutineNameID
**
** \sa KIM::ModelRoutineName::modelRoutineNameID,
** kim_model_routine_name_module::kim_model_routine_name_type::model_routine_name_id
**
** \since 2.0
**/
int modelRoutineNameID;
};
#ifndef KIM_MODEL_ROUTINE_NAME_DEFINED_
#define KIM_MODEL_ROUTINE_NAME_DEFINED_
/**
** \brief Convenience typedef.
**
** \since 2.0
**/
typedef struct KIM_ModelRoutineName KIM_ModelRoutineName;
#endif
/**
** \brief \copybrief KIM::ModelRoutineName::ModelRoutineName(std::string const &)
**
** \sa KIM::ModelRoutineName::ModelRoutineName(std::string const &),
** kim_model_routine_name_module::kim_from_string
**
** \since 2.0
**/
KIM_ModelRoutineName KIM_ModelRoutineName_FromString(char const * const str);
/**
** \brief \copybrief KIM::ModelRoutineName::Known
**
** \sa KIM::ModelRoutineName::Known, kim_model_routine_name_module::kim_known
**
** \since 2.0
**/
int KIM_ModelRoutineName_Known(KIM_ModelRoutineName const modelRoutineName);
/**
** \brief \copybrief KIM::ModelRoutineName::operator==()
**
** \sa KIM::ModelRoutineName::operator==(),
** kim_model_routine_name_module::operator(.eq.)
**
** \since 2.0
**/
int KIM_ModelRoutineName_Equal(KIM_ModelRoutineName const lhs,
KIM_ModelRoutineName const rhs);
/**
** \brief \copybrief KIM::ModelRoutineName::operator!=()
**
** \sa KIM::ModelRoutineName::operator!=(),
** kim_model_routine_name_module::operator(.ne.)
**
** \since 2.0
**/
int KIM_ModelRoutineName_NotEqual(KIM_ModelRoutineName const lhs,
KIM_ModelRoutineName const rhs);
/**
** \brief \copybrief KIM::ModelRoutineName::ToString
**
** \sa KIM::ModelRoutineName::ToString,
** kim_model_routine_name_module::kim_to_string
**
** \since 2.0
**/
char const *
KIM_ModelRoutineName_ToString(KIM_ModelRoutineName const modelRoutineName);
/**
** \brief \copybrief KIM::MODEL_ROUTINE_NAME::Create
**
** \sa KIM::MODEL_ROUTINE_NAME::Create,
** kim_model_routine_name_module::kim_model_routine_name_create
**
** \since 2.0
**/
extern KIM_ModelRoutineName const KIM_MODEL_ROUTINE_NAME_Create;
/**
** \brief \copybrief KIM::MODEL_ROUTINE_NAME::ComputeArgumentsCreate
**
** \sa KIM::MODEL_ROUTINE_NAME::ComputeArgumentsCreate,
** kim_model_routine_name_module::kim_model_routine_name_compute_arguments_create
**
** \since 2.0
**/
extern KIM_ModelRoutineName const KIM_MODEL_ROUTINE_NAME_ComputeArgumentsCreate;
/**
** \brief \copybrief KIM::MODEL_ROUTINE_NAME::Compute
**
** \sa KIM::MODEL_ROUTINE_NAME::Compute,
** kim_model_routine_name_module::kim_model_routine_name_compute
**
** \since 2.0
**/
extern KIM_ModelRoutineName const KIM_MODEL_ROUTINE_NAME_Compute;
/**
** \brief \copybrief KIM::MODEL_ROUTINE_NAME::Extension
**
** \sa KIM::MODEL_ROUTINE_NAME::Extension,
** kim_model_routine_name_module::kim_model_routine_name_extension
**
** \since 2.0
**/
extern KIM_ModelRoutineName const KIM_MODEL_ROUTINE_NAME_Extension;
/**
** \brief \copybrief KIM::MODEL_ROUTINE_NAME::Refresh
**
** \sa KIM::MODEL_ROUTINE_NAME::Refresh,
** kim_model_routine_name_module::kim_model_routine_name_refresh
**
** \since 2.0
**/
extern KIM_ModelRoutineName const KIM_MODEL_ROUTINE_NAME_Refresh;
/**
** \brief \copybrief KIM::MODEL_ROUTINE_NAME::WriteParameterizedModel
**
** \sa KIM::MODEL_ROUTINE_NAME::WriteParameterizedModel,
** kim_model_routine_name_module::kim_model_routine_name_write_parameterized_model
**
** \since 2.0
**/
extern KIM_ModelRoutineName const
KIM_MODEL_ROUTINE_NAME_WriteParameterizedModel;
/**
** \brief \copybrief KIM::MODEL_ROUTINE_NAME::ComputeArgumentsDestroy
**
** \sa KIM::MODEL_ROUTINE_NAME::ComputeArgumentsDestroy,
** kim_model_routine_name_module::kim_model_routine_name_compute_arguments_destroy
**
** \since 2.0
**/
extern KIM_ModelRoutineName const
KIM_MODEL_ROUTINE_NAME_ComputeArgumentsDestroy;
/**
** \brief \copybrief KIM::MODEL_ROUTINE_NAME::Destroy
**
** \sa KIM::MODEL_ROUTINE_NAME::Destroy,
** kim_model_routine_name_module::kim_model_routine_name_destroy
**
** \since 2.0
**/
extern KIM_ModelRoutineName const KIM_MODEL_ROUTINE_NAME_Destroy;
/**
** \brief \copybrief KIM::MODEL_ROUTINE_NAME::GetNumberOfModelRoutineNames
**
** \sa KIM::MODEL_ROUTINE_NAME::GetNumberOfModelRoutineNames,
** kim_model_routine_name_module::kim_get_number_of_model_routine_names
**
** \since 2.0
**/
void KIM_MODEL_ROUTINE_NAME_GetNumberOfModelRoutineNames(
int * const numberOfModelRoutineNames);
/**
** \brief \copybrief KIM::MODEL_ROUTINE_NAME::GetModelRoutineName
**
** \sa KIM::MODEL_ROUTINE_NAME::GetModelRoutineName,
** kim_model_routine_name_module::kim_get_model_routine_name
**
** \since 2.0
**/
int KIM_MODEL_ROUTINE_NAME_GetModelRoutineName(
int const index, KIM_ModelRoutineName * const modelRoutineName);
#endif /* KIM_MODEL_ROUTINE_NAME_H_ */
kim-api-2.2.1-git/c/include/KIM_ModelWriteParameterizedModel.h 0000664 0000000 0000000 00000013207 13765565573 0024144 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_MODEL_WRITE_PARAMETERIZED_MODEL_H_
#define KIM_MODEL_WRITE_PARAMETERIZED_MODEL_H_
/* Forward declarations */
#ifndef KIM_LOG_VERBOSITY_DEFINED_
#define KIM_LOG_VERBOSITY_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LogVerbosity KIM_LogVerbosity;
#endif
#ifndef KIM_MODEL_WRITE_PARAMETERIZED_MODEL_DEFINED_
#define KIM_MODEL_WRITE_PARAMETERIZED_MODEL_DEFINED_
/**
** \brief \copybrief KIM::ModelWriteParameterizedModel
**
** \sa KIM::ModelWriteParameterizedModel,
** kim_model_write_parameterized_model_module::kim_model_write_parameterized_model_handle_type
**
** \since 2.0
**/
typedef struct KIM_ModelWriteParameterizedModel
KIM_ModelWriteParameterizedModel;
#endif
/**
** \brief \copybrief KIM::ModelWriteParameterizedModel::GetPath
**
** \sa KIM::ModelWriteParameterizedModel::GetPath,
** kim_model_write_parameterized_model_module::kim_get_path
**
** \since 2.0
**/
void KIM_ModelWriteParameterizedModel_GetPath(
KIM_ModelWriteParameterizedModel const * const modelWriteParameterizedModel,
char const ** const path);
/**
** \brief \copybrief KIM::ModelWriteParameterizedModel::GetModelName
**
** \sa KIM::ModelWriteParameterizedModel::GetModelName,
** kim_model_write_parameterized_model_module::kim_get_model_name
**
** \since 2.0
**/
void KIM_ModelWriteParameterizedModel_GetModelName(
KIM_ModelWriteParameterizedModel const * const modelWriteParameterizedModel,
char const ** const modelName);
/**
** \brief \copybrief KIM::ModelWriteParameterizedModel::SetParameterFileName
**
** \sa KIM::ModelWriteParameterizedModel::SetParameterFileName,
** kim_model_write_parameterized_model_module::kim_set_parameter_file_name
**
** \since 2.0
**/
void KIM_ModelWriteParameterizedModel_SetParameterFileName(
KIM_ModelWriteParameterizedModel const * const modelWriteParameterizedModel,
char const * const fileName);
/**
** \brief \copybrief KIM::ModelWriteParameterizedModel::GetModelBufferPointer
**
** \sa KIM::ModelWriteParameterizedModel::GetModelBufferPointer,
** kim_model_write_parameterized_model_module::kim_get_model_buffer_pointer
**
** \since 2.0
**/
void KIM_ModelWriteParameterizedModel_GetModelBufferPointer(
KIM_ModelWriteParameterizedModel const * const modelWriteParameterizedModel,
void ** const ptr);
/**
** \brief \copybrief KIM::ModelWriteParameterizedModel::LogEntry
**
** \sa KIM::ModelWriteParameterizedModel::LogEntry,
** kim_model_write_parameterized_model_module::kim_log_entry
**
** \since 2.0
**/
void KIM_ModelWriteParameterizedModel_LogEntry(
KIM_ModelWriteParameterizedModel const * const modelWriteParameterizedModel,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName);
/**
** \brief \copybrief KIM::ModelWriteParameterizedModel::ToString
**
** \sa KIM::ModelWriteParameterizedModel::ToString,
** kim_model_write_parameterized_model_module::kim_to_string
**
** \since 2.0
**/
char const * KIM_ModelWriteParameterizedModel_ToString(
KIM_ModelWriteParameterizedModel const * const
modelWriteParameterizedModel);
#endif /* KIM_MODEL_WRITE_PARAMETERIZED_MODEL_H_ */
kim-api-2.2.1-git/c/include/KIM_Numbering.h 0000664 0000000 0000000 00000012222 13765565573 0020315 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_NUMBERING_H_
#define KIM_NUMBERING_H_
/**
** \brief \copybrief KIM::Numbering
**
** \sa KIM::Numbering, kim_numbering_module::kim_numbering_type
**
** \since 2.0
**/
struct KIM_Numbering
{
/**
** \brief \copybrief KIM::Numbering::numberingID
**
** \sa KIM::Numbering::numberingID,
** kim_numbering_module::kim_numbering_type::numbering_id
**
** \since 2.0
**/
int numberingID;
};
#ifndef KIM_NUMBERING_DEFINED_
#define KIM_NUMBERING_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_Numbering KIM_Numbering;
#endif
/**
** \brief \copybrief KIM::Numbering::Numbering(std::string const &)
**
** \sa KIM::Numbering::Numbering(std::string const &),
** kim_numbering_module::kim_from_string
**
** \since 2.0
**/
KIM_Numbering KIM_Numbering_FromString(char const * const str);
/**
** \brief \copybrief KIM::Numbering::Known
**
** \sa KIM::Numbering::Known, kim_numbering_module::kim_known
**
** \since 2.0
**/
int KIM_Numbering_Known(KIM_Numbering const numbering);
/**
** \brief \copybrief KIM::Numbering::operator==()
**
** \sa KIM::Numbering::operator==(), kim_numbering_module::operator(.eq.)
**
** \since 2.0
**/
int KIM_Numbering_Equal(KIM_Numbering const lhs, KIM_Numbering const rhs);
/**
** \brief \copybrief KIM::Numbering::operator!=()
**
** \sa KIM::Numbering::operator!=(), kim_numbering_module::operator(.ne.)
**
** \since 2.0
**/
int KIM_Numbering_NotEqual(KIM_Numbering const lhs, KIM_Numbering const rhs);
/**
** \brief \copybrief KIM::Numbering::ToString
**
** \sa KIM::Numbering::ToString, kim_numbering_module::kim_to_string
**
** \since 2.0
**/
char const * KIM_Numbering_ToString(KIM_Numbering const numbering);
/**
** \brief \copybrief KIM::NUMBERING::zeroBased
**
** \sa KIM::NUMBERING::zeroBased,
** kim_numbering_module::kim_numbering_zero_based
**
** \since 2.0
**/
extern KIM_Numbering const KIM_NUMBERING_zeroBased;
/**
** \brief \copybrief KIM::NUMBERING::oneBased
**
** \sa KIM::NUMBERING::oneBased, kim_numbering_module::kim_numbering_one_based
**
** \since 2.0
**/
extern KIM_Numbering const KIM_NUMBERING_oneBased;
/**
** \brief \copybrief KIM::NUMBERING::GetNumberOfNumberings
**
** \sa KIM::NUMBERING::GetNumberOfNumberings,
** kim_numbering_module::kim_get_number_of_numberings
**
** \since 2.0
**/
void KIM_NUMBERING_GetNumberOfNumberings(int * const numberOfNumberings);
/**
** \brief \copybrief KIM::NUMBERING::GetNumbering
**
** \sa KIM::NUMBERING::GetNumbering, kim_numbering_module::kim_get_numbering
**
** \since 2.0
**/
int KIM_NUMBERING_GetNumbering(int const index,
KIM_Numbering * const numbering);
#endif /* KIM_NUMBERING_H_ */
kim-api-2.2.1-git/c/include/KIM_SemVer.h 0000664 0000000 0000000 00000007111 13765565573 0017571 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_SEM_VER_H_
#define KIM_SEM_VER_H_
/**
** \brief \copybrief KIM::SEM_VER::GetSemVer
**
** \sa KIM::SEM_VER::GetSemVer, kim_sem_ver_module::kim_get_sem_ver
**
** \since 2.0
**/
char const * KIM_SEM_VER_GetSemVer();
/**
** \brief \copybrief KIM::SEM_VER::IsLessThan
**
** \sa KIM::SEM_VER::IsLessThan, kim_sem_ver_module::kim_is_less_than
**
** \since 2.0
**/
int KIM_SEM_VER_IsLessThan(char const * const lhs,
char const * const rhs,
int * const isLessThan);
/**
** \brief \copybrief KIM::SEM_VER::ParseSemVer
**
** \sa KIM::SEM_VER::ParseSemVer, kim_sem_ver_module::kim_parse_sem_ver
**
** \since 2.0
**/
int KIM_SEM_VER_ParseSemVer(char const * const version,
int const prereleaseLength,
int const buildMetadataLength,
int * const major,
int * const minor,
int * const patch,
char * const prerelease,
char * const buildMetadata);
#endif /* KIM_SEM_VER_H_ */
kim-api-2.2.1-git/c/include/KIM_SimulatorHeaders.h 0000664 0000000 0000000 00000007302 13765565573 0021645 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_SIMULATOR_HEADERS_H_
#define KIM_SIMULATOR_HEADERS_H_
/* IWYU pragma: begin_exports */
#ifndef KIM_COLLECTIONS_H_
#include "KIM_Collections.h"
#endif
#ifndef KIM_COLLECTION_H_
#include "KIM_Collection.h"
#endif
#ifndef KIM_COLLECTION_ITEM_TYPE_H_
#include "KIM_CollectionItemType.h"
#endif
#ifndef KIM_MODEL_H_
#include "KIM_Model.h"
#endif
#ifndef KIM_SIMULATOR_MODEL_H_
#include "KIM_SimulatorModel.h"
#endif
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
#ifndef KIM_DATA_TYPE_H_
#include "KIM_DataType.h"
#endif
#ifndef KIM_LANGUAGE_NAME_H_
#include "KIM_LanguageName.h"
#endif
#ifndef KIM_MODEL_ROUTINE_NAME_H_
#include "KIM_ModelRoutineName.h"
#endif
#ifndef KIM_SPECIES_NAME_H_
#include "KIM_SpeciesName.h"
#endif
#ifndef KIM_NUMBERING_H_
#include "KIM_Numbering.h"
#endif
#ifndef KIM_UNIT_SYSTEM_H_
#include "KIM_UnitSystem.h"
#endif
#ifndef KIM_COMPUTE_ARGUMENTS_H_
#include "KIM_ComputeArguments.h"
#endif
#ifndef KIM_COMPUTE_ARGUMENT_NAME_H_
#include "KIM_ComputeArgumentName.h"
#endif
#ifndef KIM_COMPUTE_CALLBACK_NAME_H_
#include "KIM_ComputeCallbackName.h"
#endif
#ifndef KIM_SUPPORT_STATUS_H_
#include "KIM_SupportStatus.h"
#endif
/* IWYU pragma: end_exports */
#endif /* KIM_SIMULATOR_HEADERS_H_ */
kim-api-2.2.1-git/c/include/KIM_SimulatorModel.h 0000664 0000000 0000000 00000025636 13765565573 0021344 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_SIMULATOR_MODEL_H_
#define KIM_SIMULATOR_MODEL_H_
/* Forward declarations */
#ifndef KIM_LOG_VERBOSITY_DEFINED_
#define KIM_LOG_VERBOSITY_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_LogVerbosity KIM_LogVerbosity;
#endif
#ifndef KIM_SIMULATOR_MODEL_DEFINED_
#define KIM_SIMULATOR_MODEL_DEFINED_
/**
** \brief \copybrief KIM::SimulatorModel
**
** \copydetails KIM::SimulatorModel
**
**
**/
typedef struct KIM_SimulatorModel KIM_SimulatorModel;
#endif
/**
** \brief \copybrief KIM::SimulatorModel::Create
**
** \sa KIM::SimulatorModel::Create,
** kim_simulator_model_module::kim_simulator_model_create
**
** \since 2.1
**/
int KIM_SimulatorModel_Create(char const * const simulatorModelName,
KIM_SimulatorModel ** const simulatorModel);
/**
** \brief \copybrief KIM::SimulatorModel::Destroy
**
** \sa KIM::SimulatorModel::Destroy,
** kim_simulator_model_module::kim_simulator_model_destroy
**
** \since 2.1
**/
void KIM_SimulatorModel_Destroy(KIM_SimulatorModel ** const simulatorModel);
/**
** \brief \copybrief KIM::SimulatorModel::GetSimulatorNameAndVersion
**
** \sa KIM::SimulatorModel::GetSimulatorNameAndVersion,
** kim_simulator_model_module::kim_get_simulator_name_and_version
**
** \since 2.1
**/
void KIM_SimulatorModel_GetSimulatorNameAndVersion(
KIM_SimulatorModel const * const simulatorModel,
char const ** const simulatorName,
char const ** const simulatorVersion);
/**
** \brief \copybrief KIM::SimulatorModel::GetNumberOfSupportedSpecies
**
** \sa KIM::SimulatorModel::GetNumberOfSupportedSpecies,
** kim_simulator_model_module::kim_get_number_of_supported_species
**
** \since 2.1
**/
void KIM_SimulatorModel_GetNumberOfSupportedSpecies(
KIM_SimulatorModel const * const simulatorModel,
int * const numberOfSupportedSpecies);
/**
** \brief \copybrief KIM::SimulatorModel::GetSupportedSpecies
**
** \sa KIM::SimulatorModel::GetSupportedSpecies,
** kim_simulator_model_module::kim_get_supported_species
**
** \since 2.1
**/
int KIM_SimulatorModel_GetSupportedSpecies(
KIM_SimulatorModel const * const simulatorModel,
int const index,
char const ** const speciesName);
/**
** \brief \copybrief KIM::SimulatorModel::OpenAndInitializeTemplateMap
**
** \sa KIM::SimulatorModel::OpenAndInitializeTemplateMap,
** kim_simulator_model_module::kim_open_and_initialize_template_map
**
** \since 2.1
**/
void KIM_SimulatorModel_OpenAndInitializeTemplateMap(
KIM_SimulatorModel const * const simulatorModel);
/**
** \brief \copybrief KIM::SimulatorModel::TemplateMapIsOpen
**
** \sa KIM::SimulatorModel::TemplateMapIsOpen,
** kim_simulator_model_module::kim_template_map_is_open
**
** \since 2.1
**/
int KIM_SimulatorModel_TemplateMapIsOpen(
KIM_SimulatorModel const * const simulatorModel);
/**
** \brief \copybrief KIM::SimulatorModel::AddTemplateMap
**
** \sa KIM::SimulatorModel::AddTemplateMap,
** kim_simulator_model_module::kim_add_template_map
**
** \since 2.1
**/
int KIM_SimulatorModel_AddTemplateMap(
KIM_SimulatorModel const * const simulatorModel,
char const * const key,
char const * const value);
/**
** \brief \copybrief KIM::SimulatorModel::CloseTemplateMap
**
** \sa KIM::SimulatorModel::CloseTemplateMap,
** kim_simulator_model_module::kim_close_template_map
**
** \since 2.1
**/
void KIM_SimulatorModel_CloseTemplateMap(
KIM_SimulatorModel const * const simulatorModel);
/**
** \brief \copybrief KIM::SimulatorModel::GetNumberOfSimulatorFields
**
** \sa KIM::SimulatorModel::GetNumberOfSimulatorFields,
** kim_simulator_model_module::kim_get_number_of_simulator_fields
**
** \since 2.1
**/
void KIM_SimulatorModel_GetNumberOfSimulatorFields(
KIM_SimulatorModel const * const simulatorModel,
int * const numberOfSimulatorFields);
/**
** \brief \copybrief KIM::SimulatorModel::GetSimulatorFieldMetadata
**
** \sa KIM::SimulatorModel::GetSimulatorFieldMetadata,
** kim_simulator_model_module::kim_get_simulator_field_metadata
**
** \since 2.1
**/
int KIM_SimulatorModel_GetSimulatorFieldMetadata(
KIM_SimulatorModel const * const simulatorModel,
int const fieldIndex,
int * const extent,
char const ** const fieldName);
/**
** \brief \copybrief KIM::SimulatorModel::GetSimulatorFieldLine
**
** \sa KIM::SimulatorModel::GetSimulatorFieldLine,
** kim_simulator_model_module::kim_get_simulator_field_line
**
** \since 2.1
**/
int KIM_SimulatorModel_GetSimulatorFieldLine(
KIM_SimulatorModel const * const simulatorModel,
int const fieldIndex,
int const lineIndex,
char const ** const lineValue);
/**
** \brief \copybrief KIM::SimulatorModel::GetParameterFileDirectoryName
**
** \sa KIM::SimulatorModel::GetParameterFileDirectoryName,
** kim_simulator_model_module::kim_get_parameter_file_directory_name
**
** \since 2.1
**/
void KIM_SimulatorModel_GetParameterFileDirectoryName(
KIM_SimulatorModel const * const simulatorModel,
char const ** const directoryName);
/**
** \brief \copybrief KIM::SimulatorModel::GetSpecificationFileName
**
** \sa KIM::SimulatorModel::GetSpecificationFileName,
** kim_simulator_model_module::kim_get_specification_file_name
**
** \since 2.1
**/
void KIM_SimulatorModel_GetSpecificationFileName(
KIM_SimulatorModel const * const simulatorModel,
char const ** const specificationFileName);
/**
** \brief \copybrief KIM::SimulatorModel::GetNumberOfParameterFiles
**
** \sa KIM::SimulatorModel::GetNumberOfParameterFiles,
** kim_simulator_model_module::kim_get_number_of_parameter_files
**
** \since 2.1
**/
void KIM_SimulatorModel_GetNumberOfParameterFiles(
KIM_SimulatorModel const * const simulatorModel,
int * const numberOfParameterFiles);
/**
** \brief \copybrief KIM::SimulatorModel::GetParameterFileName
**
** \sa KIM::SimulatorModel::GetParameterFileName,
** kim_simulator_model_module::kim_get_parameter_file_name
**
** \since 2.1
**
** \deprecated As of 2.2. Please use
** KIM_SimulatorModel_GetParameterFileBasename() instead.
**/
int KIM_SimulatorModel_GetParameterFileName(
KIM_SimulatorModel const * const simulatorModel,
int const index,
char const ** const parameterFileName);
/**
** \brief \copybrief KIM::SimulatorModel::GetParameterFileBasename
**
** \sa KIM::SimulatorModel::GetParameterFileBasename,
** kim_simulator_model_module::kim_get_parameter_file_basename
**
** \since 2.2
**/
int KIM_SimulatorModel_GetParameterFileBasename(
KIM_SimulatorModel const * const simulatorModel,
int const index,
char const ** const parameterFileBasename);
/**
** \brief \copybrief KIM::SimulatorModel::SetSimulatorBufferPointer
**
** \sa KIM::SimulatorModel::SetSimulatorBufferPointer,
** kim_simulator_model_module::kim_set_simulator_buffer_pointer
**
** \since 2.1
**/
void KIM_SimulatorModel_SetSimulatorBufferPointer(
KIM_SimulatorModel * const simulatorModel, void * const ptr);
/**
** \brief \copybrief KIM::SimulatorModel::GetSimulatorBufferPointer
**
** \sa KIM::SimulatorModel::GetSimulatorBufferPointer,
** kim_simulator_model_module::kim_get_simulator_buffer_pointer
**
** \since 2.1
**/
void KIM_SimulatorModel_GetSimulatorBufferPointer(
KIM_SimulatorModel const * const simulatorModel, void ** const ptr);
/**
** \brief \copybrief KIM::SimulatorModel::ToString
**
** \sa KIM::SimulatorModel::ToString, kim_simulator_model_module::kim_to_string
**
** \since 2.1
**/
char const *
KIM_SimulatorModel_ToString(KIM_SimulatorModel const * const simulatorModel);
/**
** \brief \copybrief KIM::SimulatorModel::SetLogID
**
** \sa KIM::SimulatorModel::SetLogID,
** kim_simulator_model_module::kim_set_log_id
**
** \since 2.1
**/
void KIM_SimulatorModel_SetLogID(KIM_SimulatorModel * const simulatorModel,
char const * const logID);
/**
** \brief \copybrief KIM::SimulatorModel::PushLogVerbosity
**
** \sa KIM::SimulatorModel::PushLogVerbosity,
** kim_simulator_model_module::kim_push_log_verbosity
**
** \since 2.1
**/
void KIM_SimulatorModel_PushLogVerbosity(
KIM_SimulatorModel * const simulatorModel,
KIM_LogVerbosity const logVerbosity);
/**
** \brief \copybrief KIM::SimulatorModel::PopLogVerbosity
**
** \sa KIM::SimulatorModel::PopLogVerbosity,
** kim_simulator_model_module::kim_pop_log_verbosity
**
** \since 2.1
**/
void KIM_SimulatorModel_PopLogVerbosity(
KIM_SimulatorModel * const simulatorModel);
#endif /* KIM_SIMULATOR_MODEL_H_ */
kim-api-2.2.1-git/c/include/KIM_SpeciesName.h 0000664 0000000 0000000 00000101535 13765565573 0020571 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_SPECIES_NAME_H_
#define KIM_SPECIES_NAME_H_
/**
** \brief \copybrief KIM::SpeciesName
**
** \sa KIM::SpeciesName, kim_species_name_module::kim_species_name_type
**
** \since 2.0
**/
struct KIM_SpeciesName
{
/**
** \brief \copybrief KIM::SpeciesName::speciesNameID
**
** \sa KIM::SpeciesName::speciesNameID,
** kim_species_name_module::kim_species_name_type::species_name_id
**
** \since 2.0
**/
int speciesNameID;
};
#ifndef KIM_SPECIES_NAME_DEFINED_
#define KIM_SPECIES_NAME_DEFINED_
/**
** \brief Forward declaration.
**
** \since 2.0
**/
typedef struct KIM_SpeciesName KIM_SpeciesName;
#endif
/**
** \brief \copybrief KIM::SpeciesName::SpeciesName(std::string const &)
**
** \sa KIM::SpeciesName::SpeciesName(std::string const &),
** kim_species_name_module::kim_from_string
**
** \since 2.0
**/
KIM_SpeciesName KIM_SpeciesName_FromString(char const * const str);
/**
** \brief \copybrief KIM::SpeciesName::Known
**
** \sa KIM::SpeciesName::Known, kim_species_name_module::kim_known
**
** \since 2.0
**/
int KIM_SpeciesName_Known(KIM_SpeciesName const speciesName);
/**
** \brief \copybrief KIM::SpeciesName::operator==()
**
** \sa KIM::SpeciesName::operator==(), kim_species_name_module::operator(.eq.)
**
** \since 2.0
**/
int KIM_SpeciesName_Equal(KIM_SpeciesName const lhs, KIM_SpeciesName const rhs);
/**
** \brief \copybrief KIM::SpeciesName::operator!=()
**
** \sa KIM::SpeciesName::operator!=(), kim_species_name_module::operator(.ne.)
**
** \since 2.0
**/
int KIM_SpeciesName_NotEqual(KIM_SpeciesName const lhs,
KIM_SpeciesName const rhs);
/**
** \brief \copybrief KIM::SpeciesName::ToString
**
** \sa KIM::SpeciesName::ToString, kim_species_name_module::kim_to_string
**
** \since 2.0
**/
char const * KIM_SpeciesName_ToString(KIM_SpeciesName const speciesName);
/**
** \brief \copybrief KIM::SPECIES_NAME::electron
**
** \sa KIM::SPECIES_NAME::electron,
** kim_species_name_module::kim_species_name_electron
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_electron;
/**
** \brief \copybrief KIM::SPECIES_NAME::H
**
** \sa KIM::SPECIES_NAME::H, kim_species_name_module::kim_species_name_h
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_H;
/**
** \brief \copybrief KIM::SPECIES_NAME::He
**
** \sa KIM::SPECIES_NAME::He, kim_species_name_module::kim_species_name_he
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_He;
/**
** \brief \copybrief KIM::SPECIES_NAME::Li
**
** \sa KIM::SPECIES_NAME::Li, kim_species_name_module::kim_species_name_li
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Li;
/**
** \brief \copybrief KIM::SPECIES_NAME::Be
**
** \sa KIM::SPECIES_NAME::Be, kim_species_name_module::kim_species_name_be
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Be;
/**
** \brief \copybrief KIM::SPECIES_NAME::B
**
** \sa KIM::SPECIES_NAME::B, kim_species_name_module::kim_species_name_b
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_B;
/**
** \brief \copybrief KIM::SPECIES_NAME::C
**
** \sa KIM::SPECIES_NAME::C, kim_species_name_module::kim_species_name_c
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_C;
/**
** \brief \copybrief KIM::SPECIES_NAME::N
**
** \sa KIM::SPECIES_NAME::N, kim_species_name_module::kim_species_name_n
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_N;
/**
** \brief \copybrief KIM::SPECIES_NAME::O
**
** \sa KIM::SPECIES_NAME::O, kim_species_name_module::kim_species_name_o
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_O;
/**
** \brief \copybrief KIM::SPECIES_NAME::F
**
** \sa KIM::SPECIES_NAME::F, kim_species_name_module::kim_species_name_f
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_F;
/**
** \brief \copybrief KIM::SPECIES_NAME::Ne
**
** \sa KIM::SPECIES_NAME::Ne, kim_species_name_module::kim_species_name_ne
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Ne;
/**
** \brief \copybrief KIM::SPECIES_NAME::Na
**
** \sa KIM::SPECIES_NAME::Na, kim_species_name_module::kim_species_name_na
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Na;
/**
** \brief \copybrief KIM::SPECIES_NAME::Mg
**
** \sa KIM::SPECIES_NAME::Mg, kim_species_name_module::kim_species_name_mg
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Mg;
/**
** \brief \copybrief KIM::SPECIES_NAME::Al
**
** \sa KIM::SPECIES_NAME::Al, kim_species_name_module::kim_species_name_al
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Al;
/**
** \brief \copybrief KIM::SPECIES_NAME::Si
**
** \sa KIM::SPECIES_NAME::Si, kim_species_name_module::kim_species_name_si
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Si;
/**
** \brief \copybrief KIM::SPECIES_NAME::P
**
** \sa KIM::SPECIES_NAME::P, kim_species_name_module::kim_species_name_p
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_P;
/**
** \brief \copybrief KIM::SPECIES_NAME::S
**
** \sa KIM::SPECIES_NAME::S, kim_species_name_module::kim_species_name_s
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_S;
/**
** \brief \copybrief KIM::SPECIES_NAME::Cl
**
** \sa KIM::SPECIES_NAME::Cl, kim_species_name_module::kim_species_name_cl
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Cl;
/**
** \brief \copybrief KIM::SPECIES_NAME::Ar
**
** \sa KIM::SPECIES_NAME::Ar, kim_species_name_module::kim_species_name_ar
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Ar;
/**
** \brief \copybrief KIM::SPECIES_NAME::K
**
** \sa KIM::SPECIES_NAME::K, kim_species_name_module::kim_species_name_k
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_K;
/**
** \brief \copybrief KIM::SPECIES_NAME::Ca
**
** \sa KIM::SPECIES_NAME::Ca, kim_species_name_module::kim_species_name_ca
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Ca;
/**
** \brief \copybrief KIM::SPECIES_NAME::Sc
**
** \sa KIM::SPECIES_NAME::Sc, kim_species_name_module::kim_species_name_sc
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Sc;
/**
** \brief \copybrief KIM::SPECIES_NAME::Ti
**
** \sa KIM::SPECIES_NAME::Ti, kim_species_name_module::kim_species_name_ti
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Ti;
/**
** \brief \copybrief KIM::SPECIES_NAME::V
**
** \sa KIM::SPECIES_NAME::V, kim_species_name_module::kim_species_name_v
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_V;
/**
** \brief \copybrief KIM::SPECIES_NAME::Cr
**
** \sa KIM::SPECIES_NAME::Cr, kim_species_name_module::kim_species_name_cr
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Cr;
/**
** \brief \copybrief KIM::SPECIES_NAME::Mn
**
** \sa KIM::SPECIES_NAME::Mn, kim_species_name_module::kim_species_name_mn
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Mn;
/**
** \brief \copybrief KIM::SPECIES_NAME::Fe
**
** \sa KIM::SPECIES_NAME::Fe, kim_species_name_module::kim_species_name_fe
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Fe;
/**
** \brief \copybrief KIM::SPECIES_NAME::Co
**
** \sa KIM::SPECIES_NAME::Co, kim_species_name_module::kim_species_name_co
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Co;
/**
** \brief \copybrief KIM::SPECIES_NAME::Ni
**
** \sa KIM::SPECIES_NAME::Ni, kim_species_name_module::kim_species_name_ni
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Ni;
/**
** \brief \copybrief KIM::SPECIES_NAME::Cu
**
** \sa KIM::SPECIES_NAME::Cu, kim_species_name_module::kim_species_name_cu
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Cu;
/**
** \brief \copybrief KIM::SPECIES_NAME::Zn
**
** \sa KIM::SPECIES_NAME::Zn, kim_species_name_module::kim_species_name_zn
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Zn;
/**
** \brief \copybrief KIM::SPECIES_NAME::Ga
**
** \sa KIM::SPECIES_NAME::Ga, kim_species_name_module::kim_species_name_ga
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Ga;
/**
** \brief \copybrief KIM::SPECIES_NAME::Ge
**
** \sa KIM::SPECIES_NAME::Ge, kim_species_name_module::kim_species_name_ge
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Ge;
/**
** \brief \copybrief KIM::SPECIES_NAME::As
**
** \sa KIM::SPECIES_NAME::As, kim_species_name_module::kim_species_name_as
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_As;
/**
** \brief \copybrief KIM::SPECIES_NAME::Se
**
** \sa KIM::SPECIES_NAME::Se, kim_species_name_module::kim_species_name_se
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Se;
/**
** \brief \copybrief KIM::SPECIES_NAME::Br
**
** \sa KIM::SPECIES_NAME::Br, kim_species_name_module::kim_species_name_br
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Br;
/**
** \brief \copybrief KIM::SPECIES_NAME::Kr
**
** \sa KIM::SPECIES_NAME::Kr, kim_species_name_module::kim_species_name_kr
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Kr;
/**
** \brief \copybrief KIM::SPECIES_NAME::Rb
**
** \sa KIM::SPECIES_NAME::Rb, kim_species_name_module::kim_species_name_rb
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Rb;
/**
** \brief \copybrief KIM::SPECIES_NAME::Sr
**
** \sa KIM::SPECIES_NAME::Sr, kim_species_name_module::kim_species_name_sr
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Sr;
/**
** \brief \copybrief KIM::SPECIES_NAME::Y
**
** \sa KIM::SPECIES_NAME::Y, kim_species_name_module::kim_species_name_y
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Y;
/**
** \brief \copybrief KIM::SPECIES_NAME::Zr
**
** \sa KIM::SPECIES_NAME::Zr, kim_species_name_module::kim_species_name_zr
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Zr;
/**
** \brief \copybrief KIM::SPECIES_NAME::Nb
**
** \sa KIM::SPECIES_NAME::Nb, kim_species_name_module::kim_species_name_nb
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Nb;
/**
** \brief \copybrief KIM::SPECIES_NAME::Mo
**
** \sa KIM::SPECIES_NAME::Mo, kim_species_name_module::kim_species_name_mo
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Mo;
/**
** \brief \copybrief KIM::SPECIES_NAME::Tc
**
** \sa KIM::SPECIES_NAME::Tc, kim_species_name_module::kim_species_name_tc
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Tc;
/**
** \brief \copybrief KIM::SPECIES_NAME::Ru
**
** \sa KIM::SPECIES_NAME::Ru, kim_species_name_module::kim_species_name_ru
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Ru;
/**
** \brief \copybrief KIM::SPECIES_NAME::Rh
**
** \sa KIM::SPECIES_NAME::Rh, kim_species_name_module::kim_species_name_rh
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Rh;
/**
** \brief \copybrief KIM::SPECIES_NAME::Pd
**
** \sa KIM::SPECIES_NAME::Pd, kim_species_name_module::kim_species_name_pd
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Pd;
/**
** \brief \copybrief KIM::SPECIES_NAME::Ag
**
** \sa KIM::SPECIES_NAME::Ag, kim_species_name_module::kim_species_name_ag
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Ag;
/**
** \brief \copybrief KIM::SPECIES_NAME::Cd
**
** \sa KIM::SPECIES_NAME::Cd, kim_species_name_module::kim_species_name_cd
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Cd;
/**
** \brief \copybrief KIM::SPECIES_NAME::In
**
** \sa KIM::SPECIES_NAME::In, kim_species_name_module::kim_species_name_in
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_In;
/**
** \brief \copybrief KIM::SPECIES_NAME::Sn
**
** \sa KIM::SPECIES_NAME::Sn, kim_species_name_module::kim_species_name_sn
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Sn;
/**
** \brief \copybrief KIM::SPECIES_NAME::Sb
**
** \sa KIM::SPECIES_NAME::Sb, kim_species_name_module::kim_species_name_sb
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Sb;
/**
** \brief \copybrief KIM::SPECIES_NAME::Te
**
** \sa KIM::SPECIES_NAME::Te, kim_species_name_module::kim_species_name_te
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Te;
/**
** \brief \copybrief KIM::SPECIES_NAME::I
**
** \sa KIM::SPECIES_NAME::I, kim_species_name_module::kim_species_name_i
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_I;
/**
** \brief \copybrief KIM::SPECIES_NAME::Xe
**
** \sa KIM::SPECIES_NAME::Xe, kim_species_name_module::kim_species_name_xe
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Xe;
/**
** \brief \copybrief KIM::SPECIES_NAME::Cs
**
** \sa KIM::SPECIES_NAME::Cs, kim_species_name_module::kim_species_name_cs
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Cs;
/**
** \brief \copybrief KIM::SPECIES_NAME::Ba
**
** \sa KIM::SPECIES_NAME::Ba, kim_species_name_module::kim_species_name_ba
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Ba;
/**
** \brief \copybrief KIM::SPECIES_NAME::La
**
** \sa KIM::SPECIES_NAME::La, kim_species_name_module::kim_species_name_la
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_La;
/**
** \brief \copybrief KIM::SPECIES_NAME::Ce
**
** \sa KIM::SPECIES_NAME::Ce, kim_species_name_module::kim_species_name_ce
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Ce;
/**
** \brief \copybrief KIM::SPECIES_NAME::Pr
**
** \sa KIM::SPECIES_NAME::Pr, kim_species_name_module::kim_species_name_pr
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Pr;
/**
** \brief \copybrief KIM::SPECIES_NAME::Nd
**
** \sa KIM::SPECIES_NAME::Nd, kim_species_name_module::kim_species_name_nd
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Nd;
/**
** \brief \copybrief KIM::SPECIES_NAME::Pm
**
** \sa KIM::SPECIES_NAME::Pm, kim_species_name_module::kim_species_name_pm
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Pm;
/**
** \brief \copybrief KIM::SPECIES_NAME::Sm
**
** \sa KIM::SPECIES_NAME::Sm, kim_species_name_module::kim_species_name_sm
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Sm;
/**
** \brief \copybrief KIM::SPECIES_NAME::Eu
**
** \sa KIM::SPECIES_NAME::Eu, kim_species_name_module::kim_species_name_eu
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Eu;
/**
** \brief \copybrief KIM::SPECIES_NAME::Gd
**
** \sa KIM::SPECIES_NAME::Gd, kim_species_name_module::kim_species_name_gd
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Gd;
/**
** \brief \copybrief KIM::SPECIES_NAME::Tb
**
** \sa KIM::SPECIES_NAME::Tb, kim_species_name_module::kim_species_name_tb
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Tb;
/**
** \brief \copybrief KIM::SPECIES_NAME::Dy
**
** \sa KIM::SPECIES_NAME::Dy, kim_species_name_module::kim_species_name_dy
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Dy;
/**
** \brief \copybrief KIM::SPECIES_NAME::Ho
**
** \sa KIM::SPECIES_NAME::Ho, kim_species_name_module::kim_species_name_ho
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Ho;
/**
** \brief \copybrief KIM::SPECIES_NAME::Er
**
** \sa KIM::SPECIES_NAME::Er, kim_species_name_module::kim_species_name_er
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Er;
/**
** \brief \copybrief KIM::SPECIES_NAME::Tm
**
** \sa KIM::SPECIES_NAME::Tm, kim_species_name_module::kim_species_name_tm
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Tm;
/**
** \brief \copybrief KIM::SPECIES_NAME::Yb
**
** \sa KIM::SPECIES_NAME::Yb, kim_species_name_module::kim_species_name_yb
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Yb;
/**
** \brief \copybrief KIM::SPECIES_NAME::Lu
**
** \sa KIM::SPECIES_NAME::Lu, kim_species_name_module::kim_species_name_lu
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Lu;
/**
** \brief \copybrief KIM::SPECIES_NAME::Hf
**
** \sa KIM::SPECIES_NAME::Hf, kim_species_name_module::kim_species_name_hf
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Hf;
/**
** \brief \copybrief KIM::SPECIES_NAME::Ta
**
** \sa KIM::SPECIES_NAME::Ta, kim_species_name_module::kim_species_name_ta
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Ta;
/**
** \brief \copybrief KIM::SPECIES_NAME::W
**
** \sa KIM::SPECIES_NAME::W, kim_species_name_module::kim_species_name_w
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_W;
/**
** \brief \copybrief KIM::SPECIES_NAME::Re
**
** \sa KIM::SPECIES_NAME::Re, kim_species_name_module::kim_species_name_re
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Re;
/**
** \brief \copybrief KIM::SPECIES_NAME::Os
**
** \sa KIM::SPECIES_NAME::Os, kim_species_name_module::kim_species_name_os
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Os;
/**
** \brief \copybrief KIM::SPECIES_NAME::Ir
**
** \sa KIM::SPECIES_NAME::Ir, kim_species_name_module::kim_species_name_ir
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Ir;
/**
** \brief \copybrief KIM::SPECIES_NAME::Pt
**
** \sa KIM::SPECIES_NAME::Pt, kim_species_name_module::kim_species_name_pt
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Pt;
/**
** \brief \copybrief KIM::SPECIES_NAME::Au
**
** \sa KIM::SPECIES_NAME::Au, kim_species_name_module::kim_species_name_au
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Au;
/**
** \brief \copybrief KIM::SPECIES_NAME::Hg
**
** \sa KIM::SPECIES_NAME::Hg, kim_species_name_module::kim_species_name_hg
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Hg;
/**
** \brief \copybrief KIM::SPECIES_NAME::Tl
**
** \sa KIM::SPECIES_NAME::Tl, kim_species_name_module::kim_species_name_tl
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Tl;
/**
** \brief \copybrief KIM::SPECIES_NAME::Pb
**
** \sa KIM::SPECIES_NAME::Pb, kim_species_name_module::kim_species_name_pb
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Pb;
/**
** \brief \copybrief KIM::SPECIES_NAME::Bi
**
** \sa KIM::SPECIES_NAME::Bi, kim_species_name_module::kim_species_name_bi
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Bi;
/**
** \brief \copybrief KIM::SPECIES_NAME::Po
**
** \sa KIM::SPECIES_NAME::Po, kim_species_name_module::kim_species_name_po
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Po;
/**
** \brief \copybrief KIM::SPECIES_NAME::At
**
** \sa KIM::SPECIES_NAME::At, kim_species_name_module::kim_species_name_at
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_At;
/**
** \brief \copybrief KIM::SPECIES_NAME::Rn
**
** \sa KIM::SPECIES_NAME::Rn, kim_species_name_module::kim_species_name_rn
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Rn;
/**
** \brief \copybrief KIM::SPECIES_NAME::Fr
**
** \sa KIM::SPECIES_NAME::Fr, kim_species_name_module::kim_species_name_fr
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Fr;
/**
** \brief \copybrief KIM::SPECIES_NAME::Ra
**
** \sa KIM::SPECIES_NAME::Ra, kim_species_name_module::kim_species_name_ra
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Ra;
/**
** \brief \copybrief KIM::SPECIES_NAME::Ac
**
** \sa KIM::SPECIES_NAME::Ac, kim_species_name_module::kim_species_name_ac
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Ac;
/**
** \brief \copybrief KIM::SPECIES_NAME::Th
**
** \sa KIM::SPECIES_NAME::Th, kim_species_name_module::kim_species_name_th
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Th;
/**
** \brief \copybrief KIM::SPECIES_NAME::Pa
**
** \sa KIM::SPECIES_NAME::Pa, kim_species_name_module::kim_species_name_pa
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Pa;
/**
** \brief \copybrief KIM::SPECIES_NAME::U
**
** \sa KIM::SPECIES_NAME::U, kim_species_name_module::kim_species_name_u
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_U;
/**
** \brief \copybrief KIM::SPECIES_NAME::Np
**
** \sa KIM::SPECIES_NAME::Np, kim_species_name_module::kim_species_name_np
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Np;
/**
** \brief \copybrief KIM::SPECIES_NAME::Pu
**
** \sa KIM::SPECIES_NAME::Pu, kim_species_name_module::kim_species_name_pu
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Pu;
/**
** \brief \copybrief KIM::SPECIES_NAME::Am
**
** \sa KIM::SPECIES_NAME::Am, kim_species_name_module::kim_species_name_am
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Am;
/**
** \brief \copybrief KIM::SPECIES_NAME::Cm
**
** \sa KIM::SPECIES_NAME::Cm, kim_species_name_module::kim_species_name_cm
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Cm;
/**
** \brief \copybrief KIM::SPECIES_NAME::Bk
**
** \sa KIM::SPECIES_NAME::Bk, kim_species_name_module::kim_species_name_bk
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Bk;
/**
** \brief \copybrief KIM::SPECIES_NAME::Cf
**
** \sa KIM::SPECIES_NAME::Cf, kim_species_name_module::kim_species_name_cf
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Cf;
/**
** \brief \copybrief KIM::SPECIES_NAME::Es
**
** \sa KIM::SPECIES_NAME::Es, kim_species_name_module::kim_species_name_es
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Es;
/**
** \brief \copybrief KIM::SPECIES_NAME::Fm
**
** \sa KIM::SPECIES_NAME::Fm, kim_species_name_module::kim_species_name_fm
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Fm;
/**
** \brief \copybrief KIM::SPECIES_NAME::Md
**
** \sa KIM::SPECIES_NAME::Md, kim_species_name_module::kim_species_name_md
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Md;
/**
** \brief \copybrief KIM::SPECIES_NAME::No
**
** \sa KIM::SPECIES_NAME::No, kim_species_name_module::kim_species_name_no
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_No;
/**
** \brief \copybrief KIM::SPECIES_NAME::Lr
**
** \sa KIM::SPECIES_NAME::Lr, kim_species_name_module::kim_species_name_lr
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Lr;
/**
** \brief \copybrief KIM::SPECIES_NAME::Rf
**
** \sa KIM::SPECIES_NAME::Rf, kim_species_name_module::kim_species_name_rf
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Rf;
/**
** \brief \copybrief KIM::SPECIES_NAME::Db
**
** \sa KIM::SPECIES_NAME::Db, kim_species_name_module::kim_species_name_db
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Db;
/**
** \brief \copybrief KIM::SPECIES_NAME::Sg
**
** \sa KIM::SPECIES_NAME::Sg, kim_species_name_module::kim_species_name_sg
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Sg;
/**
** \brief \copybrief KIM::SPECIES_NAME::Bh
**
** \sa KIM::SPECIES_NAME::Bh, kim_species_name_module::kim_species_name_bh
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Bh;
/**
** \brief \copybrief KIM::SPECIES_NAME::Hs
**
** \sa KIM::SPECIES_NAME::Hs, kim_species_name_module::kim_species_name_hs
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Hs;
/**
** \brief \copybrief KIM::SPECIES_NAME::Mt
**
** \sa KIM::SPECIES_NAME::Mt, kim_species_name_module::kim_species_name_mt
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Mt;
/**
** \brief \copybrief KIM::SPECIES_NAME::Ds
**
** \sa KIM::SPECIES_NAME::Ds, kim_species_name_module::kim_species_name_ds
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Ds;
/**
** \brief \copybrief KIM::SPECIES_NAME::Rg
**
** \sa KIM::SPECIES_NAME::Rg, kim_species_name_module::kim_species_name_rg
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Rg;
/**
** \brief \copybrief KIM::SPECIES_NAME::Cn
**
** \sa KIM::SPECIES_NAME::Cn, kim_species_name_module::kim_species_name_cn
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Cn;
/**
** \brief \copybrief KIM::SPECIES_NAME::Nh
**
** \sa KIM::SPECIES_NAME::Nh, kim_species_name_module::kim_species_name_nh
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Nh;
/**
** \brief \copybrief KIM::SPECIES_NAME::Fl
**
** \sa KIM::SPECIES_NAME::Fl, kim_species_name_module::kim_species_name_fl
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Fl;
/**
** \brief \copybrief KIM::SPECIES_NAME::Mc
**
** \sa KIM::SPECIES_NAME::Mc, kim_species_name_module::kim_species_name_mc
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Mc;
/**
** \brief \copybrief KIM::SPECIES_NAME::Lv
**
** \sa KIM::SPECIES_NAME::Lv, kim_species_name_module::kim_species_name_lv
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Lv;
/**
** \brief \copybrief KIM::SPECIES_NAME::Ts
**
** \sa KIM::SPECIES_NAME::Ts, kim_species_name_module::kim_species_name_ts
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Ts;
/**
** \brief \copybrief KIM::SPECIES_NAME::Og
**
** \sa KIM::SPECIES_NAME::Og, kim_species_name_module::kim_species_name_og
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_Og;
/**
** \brief \copybrief KIM::SPECIES_NAME::user01
**
** \sa KIM::SPECIES_NAME::user01,
** kim_species_name_module::kim_species_name_user01
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user01;
/**
** \brief \copybrief KIM::SPECIES_NAME::user02
**
** \sa KIM::SPECIES_NAME::user02,
** kim_species_name_module::kim_species_name_user02
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user02;
/**
** \brief \copybrief KIM::SPECIES_NAME::user03
**
** \sa KIM::SPECIES_NAME::user03,
** kim_species_name_module::kim_species_name_user03
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user03;
/**
** \brief \copybrief KIM::SPECIES_NAME::user04
**
** \sa KIM::SPECIES_NAME::user04,
** kim_species_name_module::kim_species_name_user04
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user04;
/**
** \brief \copybrief KIM::SPECIES_NAME::user05
**
** \sa KIM::SPECIES_NAME::user05,
** kim_species_name_module::kim_species_name_user05
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user05;
/**
** \brief \copybrief KIM::SPECIES_NAME::user06
**
** \sa KIM::SPECIES_NAME::user06,
** kim_species_name_module::kim_species_name_user06
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user06;
/**
** \brief \copybrief KIM::SPECIES_NAME::user07
**
** \sa KIM::SPECIES_NAME::user07,
** kim_species_name_module::kim_species_name_user07
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user07;
/**
** \brief \copybrief KIM::SPECIES_NAME::user08
**
** \sa KIM::SPECIES_NAME::user08,
** kim_species_name_module::kim_species_name_user08
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user08;
/**
** \brief \copybrief KIM::SPECIES_NAME::user09
**
** \sa KIM::SPECIES_NAME::user09,
** kim_species_name_module::kim_species_name_user09
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user09;
/**
** \brief \copybrief KIM::SPECIES_NAME::user10
**
** \sa KIM::SPECIES_NAME::user10,
** kim_species_name_module::kim_species_name_user10
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user10;
/**
** \brief \copybrief KIM::SPECIES_NAME::user11
**
** \sa KIM::SPECIES_NAME::user11,
** kim_species_name_module::kim_species_name_user11
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user11;
/**
** \brief \copybrief KIM::SPECIES_NAME::user12
**
** \sa KIM::SPECIES_NAME::user12,
** kim_species_name_module::kim_species_name_user12
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user12;
/**
** \brief \copybrief KIM::SPECIES_NAME::user13
**
** \sa KIM::SPECIES_NAME::user13,
** kim_species_name_module::kim_species_name_user13
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user13;
/**
** \brief \copybrief KIM::SPECIES_NAME::user14
**
** \sa KIM::SPECIES_NAME::user14,
** kim_species_name_module::kim_species_name_user14
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user14;
/**
** \brief \copybrief KIM::SPECIES_NAME::user15
**
** \sa KIM::SPECIES_NAME::user15,
** kim_species_name_module::kim_species_name_user15
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user15;
/**
** \brief \copybrief KIM::SPECIES_NAME::user16
**
** \sa KIM::SPECIES_NAME::user16,
** kim_species_name_module::kim_species_name_user16
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user16;
/**
** \brief \copybrief KIM::SPECIES_NAME::user17
**
** \sa KIM::SPECIES_NAME::user17,
** kim_species_name_module::kim_species_name_user17
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user17;
/**
** \brief \copybrief KIM::SPECIES_NAME::user18
**
** \sa KIM::SPECIES_NAME::user18,
** kim_species_name_module::kim_species_name_user18
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user18;
/**
** \brief \copybrief KIM::SPECIES_NAME::user19
**
** \sa KIM::SPECIES_NAME::user19,
** kim_species_name_module::kim_species_name_user19
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user19;
/**
** \brief \copybrief KIM::SPECIES_NAME::user20
**
** \sa KIM::SPECIES_NAME::user20,
** kim_species_name_module::kim_species_name_user20
**
** \since 2.0
**/
extern KIM_SpeciesName const KIM_SPECIES_NAME_user20;
/**
** \brief \copybrief KIM::SPECIES_NAME::GetNumberOfSpeciesNames
**
** \sa KIM::SPECIES_NAME::GetNumberOfSpeciesNames,
** kim_species_name_module::kim_get_number_of_species_names
**
** \since 2.0
**/
void KIM_SPECIES_NAME_GetNumberOfSpeciesNames(int * const numberOfSpeciesNames);
/**
** \brief \copybrief KIM::SPECIES_NAME::GetSpeciesName
**
** \sa KIM::SPECIES_NAME::GetSpeciesName,
** kim_species_name_module::kim_get_species_name
**
** \since 2.0
**/
int KIM_SPECIES_NAME_GetSpeciesName(int const index,
KIM_SpeciesName * const speciesName);
#endif /* KIM_SPECIES_NAME_H_ */
kim-api-2.2.1-git/c/include/KIM_SupportStatus.h 0000664 0000000 0000000 00000014077 13765565573 0021261 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_SUPPORT_STATUS_H_
#define KIM_SUPPORT_STATUS_H_
/**
** \brief \copybrief KIM::SupportStatus
**
** \sa KIM::SupportStatus, kim_support_status_module::kim_support_status_type
**
** \since 2.0
**/
struct KIM_SupportStatus
{
/**
** \brief \copybrief KIM::SupportStatus::supportStatusID
**
** \sa KIM::SupportStatus::supportStatusID,
** kim_support_status_module::kim_support_status_type::support_status_id
**
** \since 2.0
**/
int supportStatusID;
};
#ifndef KIM_SUPPORT_STATUS_DEFINED_
#define KIM_SUPPORT_STATUS_DEFINED_
/**
** \brief Convenience typedef.
**
** \since 2.0
**/
typedef struct KIM_SupportStatus KIM_SupportStatus;
#endif
/**
** \brief \copybrief KIM::SupportStatus::SupportStatus(std::string const &)
**
** \sa KIM::SupportStatus::SupportStatus(std::string const &),
** kim_support_status_module::kim_from_string
**
** \since 2.0
**/
KIM_SupportStatus KIM_SupportStatus_FromString(char const * const str);
/**
** \brief \copybrief KIM::SupportStatus::Known
**
** \sa KIM::SupportStatus::Known, kim_support_status_module::kim_known
**
** \since 2.0
**/
int KIM_SupportStatus_Known(KIM_SupportStatus const supportStatus);
/**
** \brief \copybrief KIM::SupportStatus::operator==()
**
** \sa KIM::SupportStatus::operator==(),
** kim_support_status_module::operator(.eq.)
**
** \since 2.0
**/
int KIM_SupportStatus_Equal(KIM_SupportStatus const lhs,
KIM_SupportStatus const rhs);
/**
** \brief \copybrief KIM::SupportStatus::operator!=()
**
** \sa KIM::SupportStatus::operator!=(),
** kim_support_status_module::operator(.ne.)
**
** \since 2.0
**/
int KIM_SupportStatus_NotEqual(KIM_SupportStatus const lhs,
KIM_SupportStatus const rhs);
/**
** \brief \copybrief KIM::SupportStatus::ToString
**
** \sa KIM::SupportStatus::ToString, kim_support_status_module::kim_to_string
**
** \since 2.0
**/
char const * KIM_SupportStatus_ToString(KIM_SupportStatus const supportStatus);
/**
** \brief \copybrief KIM::SUPPORT_STATUS::requiredByAPI
**
** \sa KIM::SUPPORT_STATUS::requiredByAPI,
** kim_support_status_module::kim_support_status_required_by_api
**
** \since 2.0
**/
extern KIM_SupportStatus const KIM_SUPPORT_STATUS_requiredByAPI;
/**
** \brief \copybrief KIM::SUPPORT_STATUS::notSupported
**
** \sa KIM::SUPPORT_STATUS::notSupported,
** kim_support_status_module::kim_support_status_not_supported
**
** \since 2.0
**/
extern KIM_SupportStatus const KIM_SUPPORT_STATUS_notSupported;
/**
** \brief \copybrief KIM::SUPPORT_STATUS::required
**
** \sa KIM::SUPPORT_STATUS::required,
** kim_support_status_module::kim_support_status_required
**
** \since 2.0
**/
extern KIM_SupportStatus const KIM_SUPPORT_STATUS_required;
/**
** \brief \copybrief KIM::SUPPORT_STATUS::optional
**
** \sa KIM::SUPPORT_STATUS::optional,
** kim_support_status_module::kim_support_status_optional
**
** \since 2.0
**/
extern KIM_SupportStatus const KIM_SUPPORT_STATUS_optional;
/**
** \brief \copybrief KIM::SUPPORT_STATUS::GetNumberOfSupportStatuses
**
** \sa KIM::SUPPORT_STATUS::GetNumberOfSupportStatuses,
** kim_support_status_module::kim_get_number_of_support_statuses
**
** \since 2.0
**/
void KIM_SUPPORT_STATUS_GetNumberOfSupportStatuses(
int * const numberOfSupportStatuses);
/**
** \brief \copybrief KIM::SUPPORT_STATUS::GetSupportStatus
**
** \sa KIM::SUPPORT_STATUS::GetSupportStatus,
** kim_support_status_module::kim_get_support_status
**
** \since 2.0
**/
int KIM_SUPPORT_STATUS_GetSupportStatus(
int const index, KIM_SupportStatus * const supportStatus);
#endif /* KIM_SUPPORT_STATUS_H_ */
kim-api-2.2.1-git/c/include/KIM_SupportedExtensions.h 0000664 0000000 0000000 00000010213 13765565573 0022432 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_SUPPORTED_EXTENSIONS_H_
#define KIM_SUPPORTED_EXTENSIONS_H_
#define KIM_SUPPORTED_EXTENSIONS_ID "KIM_SupportedExtensions"
#define KIM_MAX_EXTENSION_ID_LENGTH 128
#define KIM_MAX_NUMBER_OF_EXTENSIONS 64
/**
** \brief \copybrief KIM::SupportedExtensions
**
** \sa KIM::SupportedExtensions,
** kim_supported_extensions_module::kim_supported_extensions_type
**
** \since 2.0
**/
struct KIM_SupportedExtensions
{
/**
** \brief \copybrief KIM::SupportedExtensions::numberOfSupportedExtensions
**
** \sa KIM::SupportedExtensions::numberOfSupportedExtensions,
** kim_supported_extensions_module::kim_supported_extensions_type::number_of_supported_extensions
**
** \since 2.0
**/
int numberOfSupportedExtensions;
/**
** \brief \copybrief KIM::SupportedExtensions::supportedExtensionID
**
** \sa KIM::SupportedExtensions::supportedExtensionID,
** kim_supported_extensions_module::kim_supported_extensions_type::supported_extension_id
**
** \since 2.0
**/
char supportedExtensionID[KIM_MAX_NUMBER_OF_EXTENSIONS]
[KIM_MAX_EXTENSION_ID_LENGTH];
/**
** \brief \copybrief KIM::SupportedExtensions::supportedExtensionRequired
**
** \sa KIM::SupportedExtensions::supportedExtensionRequired,
** kim_supported_extensions_module::kim_supported_extensions_type::supported_extension_required
**
** \since 2.0
**/
int supportedExtensionRequired[KIM_MAX_NUMBER_OF_EXTENSIONS];
};
#ifndef KIM_SUPPORTED_EXTENSIONS_DEFINED_
#define KIM_SUPPORTED_EXTENSIONS_DEFINED_
typedef struct KIM_SupportedExtensions KIM_SupportedExtensions;
#endif
#endif /* KIM_SUPPORTED_EXTENSIONS_H_ */
kim-api-2.2.1-git/c/include/KIM_TemperatureUnit.h 0000664 0000000 0000000 00000013305 13765565573 0021527 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_TEMPERATURE_UNIT_H_
#define KIM_TEMPERATURE_UNIT_H_
/**
** \brief \copybrief KIM::TemperatureUnit
**
** \sa KIM::TemperatureUnit,
*kim_temperature_unit_module::kim_temperature_unit_type
**
** \since 2.0
**/
struct KIM_TemperatureUnit
{
/**
** \brief \copybrief KIM::TemperatureUnit::temperatureUnitID
**
** \sa KIM::TemperatureUnit::temperatureUnitID,
** kim_temperature_unit_module::kim_temperature_unit_type::temperature_unit_id
**
** \since 2.0
**/
int temperatureUnitID;
};
#ifndef KIM_TEMPERATURE_UNIT_DEFINED_
#define KIM_TEMPERATURE_UNIT_DEFINED_
/**
** \brief Convenience typedef.
**
** \since 2.0
**/
typedef struct KIM_TemperatureUnit KIM_TemperatureUnit;
#endif
/**
** \brief \copybrief KIM::TemperatureUnit::TemperatureUnit(std::string const &)
**
** \sa KIM::TemperatureUnit::TemperatureUnit(std::string const &),
** kim_temperature_unit_module::kim_from_string
**
** \since 2.0
**/
KIM_TemperatureUnit KIM_TemperatureUnit_FromString(char const * const str);
/**
** \brief \copybrief KIM::TemperatureUnit::Known
**
** \sa KIM::TemperatureUnit::Known, kim_temperature_unit_module::kim_known
**
** \since 2.0
**/
int KIM_TemperatureUnit_Known(KIM_TemperatureUnit const temperatureUnit);
/**
** \brief \copybrief KIM::TemperatureUnit::operator==()
**
** \sa KIM::TemperatureUnit::operator==(),
** kim_temperature_unit_module::operator(.eq.)
**
** \since 2.0
**/
int KIM_TemperatureUnit_Equal(KIM_TemperatureUnit const lhs,
KIM_TemperatureUnit const rhs);
/**
** \brief \copybrief KIM::TemperatureUnit::operator!=()
**
** \sa KIM::TemperatureUnit::operator!=(),
** kim_temperature_unit_module::operator(.ne.)
**
** \since 2.0
**/
int KIM_TemperatureUnit_NotEqual(KIM_TemperatureUnit const lhs,
KIM_TemperatureUnit const rhs);
/**
** \brief \copybrief KIM::TemperatureUnit::ToString
**
** \sa KIM::TemperatureUnit::ToString,
** kim_temperature_unit_module::kim_to_string
**
** \since 2.0
**/
char const *
KIM_TemperatureUnit_ToString(KIM_TemperatureUnit const temperatureUnit);
/**
** \brief \copybrief KIM::TEMPERATURE_UNIT::unused
**
** \sa KIM::TEMPERATURE_UNIT::unused,
** kim_temperature_unit_module::kim_temperature_unit_unused
**
** \since 2.0
**/
extern KIM_TemperatureUnit const KIM_TEMPERATURE_UNIT_unused;
/**
** \brief \copybrief KIM::TEMPERATURE_UNIT::K
**
** \sa KIM::TEMPERATURE_UNIT::K,
** kim_temperature_unit_module::kim_temperature_unit_k
**
** \since 2.0
**/
extern KIM_TemperatureUnit const KIM_TEMPERATURE_UNIT_K;
/**
** \brief \copybrief KIM::TEMPERATURE_UNIT::GetNumberOfTemperatureUnits
**
** \sa KIM::TEMPERATURE_UNIT::GetNumberOfTemperatureUnits,
** kim_temperature_unit_module::kim_get_number_of_temperature_units
**
** \since 2.0
**/
void KIM_TEMPERATURE_UNIT_GetNumberOfTemperatureUnits(
int * const numberOfTemperatureUnits);
/**
** \brief \copybrief KIM::TEMPERATURE_UNIT::GetTemperatureUnit
**
** \sa KIM::TEMPERATURE_UNIT::GetTemperatureUnit,
** kim_temperature_unit_module::kim_get_temperature_unit
**
** \since 2.0
**/
int KIM_TEMPERATURE_UNIT_GetTemperatureUnit(
int const index, KIM_TemperatureUnit * const temperatureUnit);
#endif /* KIM_TEMPERATURE_UNIT_H_ */
kim-api-2.2.1-git/c/include/KIM_TimeUnit.h 0000664 0000000 0000000 00000013101 13765565573 0020122 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_TIME_UNIT_H_
#define KIM_TIME_UNIT_H_
/**
** \brief \copybrief KIM::TimeUnit
**
** \sa KIM::TimeUnit, kim_time_unit_module::kim_time_unit_type
**
** \since 2.0
**/
struct KIM_TimeUnit
{
/**
** \brief \copybrief KIM::TimeUnit::timeUnitID
**
** \sa KIM::TimeUnit::timeUnitID,
** kim_time_unit_module::kim_time_unit_type::time_unit_id
**
** \since 2.0
**/
int timeUnitID;
};
#ifndef KIM_TIME_UNIT_DEFINED_
#define KIM_TIME_UNIT_DEFINED_
/**
** \brief Convenience typedef.
**
** \since 2.0
**/
typedef struct KIM_TimeUnit KIM_TimeUnit;
#endif
/**
** \brief \copybrief KIM::TimeUnit::TimeUnit(std::string const &)
**
** \sa KIM::TimeUnit::TimeUnit(std::string const &),
** kim_time_unit_module::kim_from_string
**
** \since 2.0
**/
KIM_TimeUnit KIM_TimeUnit_FromString(char const * const str);
/**
** \brief \copybrief KIM::TimeUnit::Known
**
** \sa KIM::TimeUnit::Known, kim_time_unit_module::kim_known
**
** \since 2.0
**/
int KIM_TimeUnit_Known(KIM_TimeUnit const timeUnit);
/**
** \brief \copybrief KIM::TimeUnit::operator==()
**
** \sa KIM::TimeUnit::operator==(), kim_time_unit_module::operator(.eq.)
**
** \since 2.0
**/
int KIM_TimeUnit_Equal(KIM_TimeUnit const lhs, KIM_TimeUnit const rhs);
/**
** \brief \copybrief KIM::TimeUnit::operator!=()
**
** \sa KIM::TimeUnit::operator!=(), kim_time_unit_module::operator(.ne.)
**
** \since 2.0
**/
int KIM_TimeUnit_NotEqual(KIM_TimeUnit const lhs, KIM_TimeUnit const rhs);
/**
** \brief \copybrief KIM::TimeUnit::ToString
**
** \sa KIM::TimeUnit::ToString, kim_time_unit_module::kim_to_string
**
** \since 2.0
**/
char const * KIM_TimeUnit_ToString(KIM_TimeUnit const timeUnit);
/**
** \brief \copybrief KIM::TIME_UNIT::unused
**
** \sa KIM::TIME_UNIT::unused, kim_time_unit_module::kim_time_unit_unused
**
** \since 2.0
**/
extern KIM_TimeUnit const KIM_TIME_UNIT_unused;
/**
** \brief \copybrief KIM::TIME_UNIT::fs
**
** \sa KIM::TIME_UNIT::fs, kim_time_unit_module::kim_time_unit_fs
**
** \since 2.0
**/
extern KIM_TimeUnit const KIM_TIME_UNIT_fs;
/**
** \brief \copybrief KIM::TIME_UNIT::ps
**
** \sa KIM::TIME_UNIT::ps, kim_time_unit_module::kim_time_unit_ps
**
** \since 2.0
**/
extern KIM_TimeUnit const KIM_TIME_UNIT_ps;
/**
** \brief \copybrief KIM::TIME_UNIT::ns
**
** \sa KIM::TIME_UNIT::ns, kim_time_unit_module::kim_time_unit_ns
**
** \since 2.0
**/
extern KIM_TimeUnit const KIM_TIME_UNIT_ns;
/**
** \brief \copybrief KIM::TIME_UNIT::s
**
** \sa KIM::TIME_UNIT::s, kim_time_unit_module::kim_time_unit_s
**
** \since 2.0
**/
extern KIM_TimeUnit const KIM_TIME_UNIT_s;
/**
** \brief \copybrief KIM::TIME_UNIT::GetNumberOfTimeUnits
**
** \sa KIM::TIME_UNIT::GetNumberOfTimeUnits,
** kim_time_unit_module::kim_get_number_of_time_units
**
** \since 2.0
**/
void KIM_TIME_UNIT_GetNumberOfTimeUnits(int * const numberOfTimeUnits);
/**
** \brief \copybrief KIM::TIME_UNIT::GetTimeUnit
**
** \sa KIM::TIME_UNIT::GetTimeUnit, kim_time_unit_module::kim_get_time_unit
**
** \since 2.0
**/
int KIM_TIME_UNIT_GetTimeUnit(int const index, KIM_TimeUnit * const timeUnit);
#endif /* KIM_TIME_UNIT_H_ */
kim-api-2.2.1-git/c/include/KIM_UnitSystem.h 0000664 0000000 0000000 00000005653 13765565573 0020525 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_UNIT_SYSTEM_H_
#define KIM_UNIT_SYSTEM_H_
/* IWYU pragma: begin_exports */
#ifndef KIM_LENGTH_UNIT_H_
#include "KIM_LengthUnit.h"
#endif
#ifndef KIM_ENERGY_UNIT_H_
#include "KIM_EnergyUnit.h"
#endif
#ifndef KIM_CHARGE_UNIT_H_
#include "KIM_ChargeUnit.h"
#endif
#ifndef KIM_TEMPERATURE_UNIT_H_
#include "KIM_TemperatureUnit.h"
#endif
#ifndef KIM_TIME_UNIT_H_
#include "KIM_TimeUnit.h"
#endif
/* IWYU pragma: end_exports */
#endif /* KIM_UNIT_SYSTEM_H_ */
kim-api-2.2.1-git/c/include/KIM_Version.h.in 0000664 0000000 0000000 00000010062 13765565573 0020421 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#ifndef KIM_VERSION_H_
#define KIM_VERSION_H_
/**
** \brief The major version number of the %KIM API
**
** The %KIM API conforms to Semantic Versioning
** 2.0.0.
**
** \since 2.0
**/
/* clang-format off */
#define KIM_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
/* clang-format on */
/**
** \brief The minor version number of the %KIM API
**
** The %KIM API conforms to Semantic Versioning
** 2.0.0.
**
** \since 2.0
**/
/* clang-format off */
#define KIM_VERSION_MINOR @PROJECT_VERSION_MINOR@
/* clang-format on */
/**
** \brief The patch version number of the %KIM API
**
** The %KIM API conforms to Semantic Versioning
** 2.0.0.
**
** \since 2.0
**/
/* clang-format off */
#define KIM_VERSION_PATCH @PROJECT_VERSION_PATCH@
/* clang-format on */
/**
** \brief The prerelease version string of the %KIM API
**
** The %KIM API conforms to Semantic Versioning
** 2.0.0.
**
** \since 2.0
**/
#define KIM_VERSION_PRERELEASE "@PROJECT_VERSION_PRERELEASE@"
/**
** \brief The build metadata version string of the %KIM API
**
** The %KIM API conforms to Semantic Versioning
** 2.0.0.
**
** \since 2.0
**/
#define KIM_VERSION_BUILD_METADATA "@PROJECT_VERSION_BUILD_METADATA@"
/**
** \brief The complete version string of the %KIM API
**
** The %KIM API conforms to Semantic Versioning
** 2.0.0.
**
** \since 2.0
**/
#define KIM_VERSION_STRING "@PROJECT_VERSION_STRING@"
#endif /* KIM_VERSION_H_ */
kim-api-2.2.1-git/c/src/ 0000775 0000000 0000000 00000000000 13765565573 0014663 5 ustar 00root root 0000000 0000000 kim-api-2.2.1-git/c/src/CMakeLists.txt 0000664 0000000 0000000 00000005407 13765565573 0017431 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
set(C_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ChargeUnit_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_Collection_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_Collections_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_CollectionItemType_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ComputeArgumentName_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ComputeArguments_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ComputeCallbackName_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_DataType_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_EnergyUnit_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_LanguageName_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_LengthUnit_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_Log_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_LogVerbosity_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_Model_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelCompute_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelComputeArguments_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelComputeArgumentsCreate_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelComputeArgumentsDestroy_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelCreate_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelExtension_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelDestroy_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelDriverCreate_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelRefresh_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelRoutineName_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelWriteParameterizedModel_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_Numbering_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_SemVer_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_SimulatorModel_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_SpeciesName_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_SupportStatus_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_TemperatureUnit_c.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_TimeUnit_c.cpp
)
target_sources(kim-api PRIVATE ${C_SOURCES})
kim-api-2.2.1-git/c/src/KIM_ChargeUnit_c.cpp 0000664 0000000 0000000 00000005640 13765565573 0020427 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common
// Development and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name
// LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner].
// All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_CHARGE_UNIT_HPP_
#include "KIM_ChargeUnit.hpp"
#endif
extern "C" {
#ifndef KIM_CHARGE_UNIT_H_
#include "KIM_ChargeUnit.h"
#endif
}
namespace
{
KIM::ChargeUnit makeChargeUnitCpp(KIM_ChargeUnit const chargeUnit)
{
KIM::ChargeUnit const * const chargeUnitCpp
= reinterpret_cast(&chargeUnit);
return *chargeUnitCpp;
}
KIM_ChargeUnit makeChargeUnitC(KIM::ChargeUnit const chargeUnit)
{
KIM_ChargeUnit const * const chargeUnitC
= reinterpret_cast(&chargeUnit);
return *chargeUnitC;
}
} // namespace
extern "C" {
KIM_ChargeUnit KIM_ChargeUnit_FromString(char const * const str)
{
return makeChargeUnitC(KIM::ChargeUnit(std::string(str)));
}
int KIM_ChargeUnit_Known(KIM_ChargeUnit const chargeUnit)
{
return makeChargeUnitCpp(chargeUnit).Known();
}
int KIM_ChargeUnit_Equal(KIM_ChargeUnit const lhs, KIM_ChargeUnit const rhs)
{
return (lhs.chargeUnitID == rhs.chargeUnitID);
}
int KIM_ChargeUnit_NotEqual(KIM_ChargeUnit const lhs, KIM_ChargeUnit const rhs)
{
return (!KIM_ChargeUnit_Equal(lhs, rhs));
}
char const * KIM_ChargeUnit_ToString(KIM_ChargeUnit const chargeUnit)
{
return makeChargeUnitCpp(chargeUnit).ToString().c_str();
}
#include "KIM_ChargeUnit.inc"
KIM_ChargeUnit const KIM_CHARGE_UNIT_unused = {ID_unused};
KIM_ChargeUnit const KIM_CHARGE_UNIT_C = {ID_C};
KIM_ChargeUnit const KIM_CHARGE_UNIT_e = {ID_e};
KIM_ChargeUnit const KIM_CHARGE_UNIT_statC = {ID_statC};
void KIM_CHARGE_UNIT_GetNumberOfChargeUnits(int * const numberOfChargeUnits)
{
KIM::CHARGE_UNIT::GetNumberOfChargeUnits(numberOfChargeUnits);
}
int KIM_CHARGE_UNIT_GetChargeUnit(int const index,
KIM_ChargeUnit * const chargeUnit)
{
KIM::ChargeUnit chargeUnitCpp;
int error = KIM::CHARGE_UNIT::GetChargeUnit(index, &chargeUnitCpp);
if (error) return error;
*chargeUnit = makeChargeUnitC(chargeUnitCpp);
return false;
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_CollectionItemType_c.cpp 0000664 0000000 0000000 00000007067 13765565573 0022157 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common
// Development and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name
// LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner].
// All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_COLLECTION_ITEM_TYPE_HPP_
#include "KIM_CollectionItemType.hpp"
#endif
extern "C" {
#ifndef KIM_COLLECTION_ITEM_TYPE_H_
#include "KIM_CollectionItemType.h"
#endif
} // extern "C"
namespace
{
KIM::CollectionItemType
makeCollectionItemTypeCpp(KIM_CollectionItemType const collectionItemType)
{
KIM::CollectionItemType const * const collectionItemTypeCpp
= reinterpret_cast(&collectionItemType);
return *collectionItemTypeCpp;
}
KIM_CollectionItemType
makeCollectionItemTypeC(KIM::CollectionItemType const collectionItemType)
{
KIM_CollectionItemType const * const collectionItemTypeC
= reinterpret_cast(&collectionItemType);
return *collectionItemTypeC;
}
} // namespace
extern "C" {
KIM_CollectionItemType KIM_CollectionItemType_FromString(char const * const str)
{
return makeCollectionItemTypeC(KIM::CollectionItemType(std::string(str)));
}
int KIM_CollectionItemType_Known(
KIM_CollectionItemType const collectionItemType)
{
return makeCollectionItemTypeCpp(collectionItemType).Known();
}
int KIM_CollectionItemType_Equal(KIM_CollectionItemType const lhs,
KIM_CollectionItemType const rhs)
{
return (lhs.collectionItemTypeID == rhs.collectionItemTypeID);
}
int KIM_CollectionItemType_NotEqual(KIM_CollectionItemType const lhs,
KIM_CollectionItemType const rhs)
{
return (!KIM_CollectionItemType_Equal(lhs, rhs));
}
char const *
KIM_CollectionItemType_ToString(KIM_CollectionItemType const collectionItemType)
{
return makeCollectionItemTypeCpp(collectionItemType).ToString().c_str();
}
#include "KIM_CollectionItemType.inc"
KIM_CollectionItemType const KIM_COLLECTION_ITEM_TYPE_modelDriver
= {ID_modelDriver};
KIM_CollectionItemType const KIM_COLLECTION_ITEM_TYPE_portableModel
= {ID_portableModel};
KIM_CollectionItemType const KIM_COLLECTION_ITEM_TYPE_simulatorModel
= {ID_simulatorModel};
void KIM_COLLECTION_ITEM_TYPE_GetNumberOfCollectionItemTypes(
int * const numberOfCollectionItemTypes)
{
KIM::COLLECTION_ITEM_TYPE::GetNumberOfCollectionItemTypes(
numberOfCollectionItemTypes);
}
int KIM_COLLECTION_ITEM_TYPE_GetCollectionItemType(
int const index, KIM_CollectionItemType * const collectionItemType)
{
KIM::CollectionItemType collectionItemTypeCpp;
int error = KIM::COLLECTION_ITEM_TYPE::GetCollectionItemType(
index, &collectionItemTypeCpp);
if (error) return error;
*collectionItemType = makeCollectionItemTypeC(collectionItemTypeCpp);
return false;
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_Collection_c.cpp 0000664 0000000 0000000 00000005772 13765565573 0020477 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common
// Development and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name
// LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner].
// All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_COLLECTION_HPP_
#include "KIM_Collection.hpp"
#endif
extern "C" {
#ifndef KIM_COLLECTION_H_
#include "KIM_Collection.h"
#endif
} // extern "C"
namespace
{
KIM::Collection makeCollectionCpp(KIM_Collection const collection)
{
KIM::Collection const * const collectionCpp
= reinterpret_cast(&collection);
return *collectionCpp;
}
KIM_Collection makeCollectionC(KIM::Collection const collection)
{
KIM_Collection const * const collectionC
= reinterpret_cast(&collection);
return *collectionC;
}
} // namespace
extern "C" {
KIM_Collection KIM_Collection_FromString(char const * const str)
{
return makeCollectionC(KIM::Collection(std::string(str)));
}
int KIM_Collection_Known(KIM_Collection const collection)
{
return makeCollectionCpp(collection).Known();
}
int KIM_Collection_Equal(KIM_Collection const lhs, KIM_Collection const rhs)
{
return (lhs.collectionID == rhs.collectionID);
}
int KIM_Collection_NotEqual(KIM_Collection const lhs, KIM_Collection const rhs)
{
return (!KIM_Collection_Equal(lhs, rhs));
}
char const * KIM_Collection_ToString(KIM_Collection const collection)
{
return makeCollectionCpp(collection).ToString().c_str();
}
#include "KIM_Collection.inc"
KIM_Collection const KIM_COLLECTION_system = {ID_system};
KIM_Collection const KIM_COLLECTION_user = {ID_user};
KIM_Collection const KIM_COLLECTION_environmentVariable
= {ID_environmentVariable};
KIM_Collection const KIM_COLLECTION_currentWorkingDirectory
= {ID_currentWorkingDirectory};
void KIM_COLLECTION_GetNumberOfCollections(int * const numberOfCollections)
{
KIM::COLLECTION::GetNumberOfCollections(numberOfCollections);
}
int KIM_COLLECTION_GetCollection(int const index,
KIM_Collection * const collection)
{
KIM::Collection collectionCpp;
int error = KIM::COLLECTION::GetCollection(index, &collectionCpp);
if (error) return error;
*collection = makeCollectionC(collectionCpp);
return false;
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_Collections_c.cpp 0000664 0000000 0000000 00000035225 13765565573 0020656 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common
// Development and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name
// LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner].
// All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#include
#include
#include
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
extern "C" {
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
} // extern "C"
#ifndef KIM_COLLECTION_HPP_
#include "KIM_Collection.hpp"
#endif
extern "C" {
#ifndef KIM_COLLECTION_H_
#include "KIM_Collection.h"
#endif
} // extern "C"
#ifndef KIM_COLLECTION_ITEM_TYPE_HPP_
#include "KIM_CollectionItemType.hpp"
#endif
extern "C" {
#ifndef KIM_COLLECTION_ITEM_TYPE_H_
#include "KIM_CollectionItemType.h"
#endif
} // extern "C"
#ifndef KIM_COLLECTIONS_HPP_
#include "KIM_Collections.hpp"
#endif
extern "C" {
#ifndef KIM_COLLECTIONS_H_
#include "KIM_Collections.h"
#endif
} // extern "C"
struct KIM_Collections
{
void * p;
};
#define CONVERT_POINTER \
KIM::Collections * pCollections \
= reinterpret_cast(collections->p)
namespace
{
KIM::CollectionItemType makeItemTypeCpp(KIM_CollectionItemType const itemType)
{
return KIM::CollectionItemType(itemType.collectionItemTypeID);
}
KIM::Collection makeCollectionCpp(KIM_Collection const collection)
{
return KIM::Collection(collection.collectionID);
}
KIM::LogVerbosity makeLogVerbosityCpp(KIM_LogVerbosity logVerbosity)
{
return KIM::LogVerbosity(logVerbosity.logVerbosityID);
}
} // namespace
int KIM_Collections_Create(KIM_Collections ** const collections)
{
KIM::Collections * pCollections;
int error = KIM::Collections::Create(&pCollections);
if (error)
{
*collections = NULL;
return true;
}
else
{
(*collections) = new KIM_Collections;
(*collections)->p = (void *) pCollections;
return false;
}
}
void KIM_Collections_Destroy(KIM_Collections ** const collections)
{
if (*collections != NULL)
{
KIM::Collections * pCollections
= reinterpret_cast((*collections)->p);
KIM::Collections::Destroy(&pCollections);
}
delete (*collections);
*collections = NULL;
}
int KIM_Collections_GetItemType(KIM_Collections * const collections,
char const * const itemName,
KIM_CollectionItemType * const itemType)
{
CONVERT_POINTER;
return pCollections->GetItemType(
itemName, reinterpret_cast(itemType));
}
int KIM_Collections_GetItemLibraryFileNameAndCollection(
KIM_Collections * const collections,
KIM_CollectionItemType const itemType,
char const * const itemName,
char const ** const fileName,
KIM_Collection * const collection)
{
CONVERT_POINTER;
std::string const * pStrFileName;
int error = pCollections->GetItemLibraryFileNameAndCollection(
makeItemTypeCpp(itemType),
itemName,
&pStrFileName,
reinterpret_cast(collection));
if (error)
return true;
else
{
*fileName = pStrFileName->c_str();
return false;
}
}
int KIM_Collections_CacheListOfItemMetadataFiles(
KIM_Collections * const collections,
KIM_CollectionItemType const itemType,
char const * const itemName,
int * const extent)
{
CONVERT_POINTER;
return pCollections->CacheListOfItemMetadataFiles(
makeItemTypeCpp(itemType), itemName, extent);
}
int KIM_Collections_GetItemMetadataFile(
KIM_Collections * const collections,
int const index,
char const ** const fileName,
unsigned int * const fileLength,
unsigned char const ** const fileRawData,
int * const availableAsString,
char const ** const fileString)
{
CONVERT_POINTER;
std::string const * pStrFileName;
std::string const ** ppStrFileName;
if (fileName == NULL)
ppStrFileName = NULL;
else
ppStrFileName = &pStrFileName;
std::string const * pStrFileString;
std::string const ** ppStrFileString;
if (fileString == NULL)
ppStrFileString = NULL;
else
ppStrFileString = &pStrFileString;
int error = pCollections->GetItemMetadataFile(index,
ppStrFileName,
fileLength,
fileRawData,
availableAsString,
ppStrFileString);
if (error)
return true;
else
{
if (fileName != NULL) *fileName = pStrFileName->c_str();
if (fileString != NULL)
{
if (pStrFileString == NULL)
*fileString = NULL;
else
*fileString = pStrFileString->c_str();
}
return false;
}
}
extern "C" {
int KIM_Collections_GetItemMetadataFile_fortran(
KIM_Collections * const collections,
int const index,
char const ** const fileName,
long * const fileLength,
unsigned char const ** const fileRawData,
int * const availableAsString,
char const ** const fileString)
{
unsigned int uFileLength;
int error = KIM_Collections_GetItemMetadataFile(collections,
index,
fileName,
&uFileLength,
fileRawData,
availableAsString,
fileString);
if (error)
return true;
else if ((sizeof(int) == sizeof(long)) && (uFileLength > INT_MAX))
{
std::cerr << "* Error : long overflow for fileLength. " << __FILE__ << ":"
<< __LINE__ << std::endl;
return true;
}
else
{
*fileLength = static_cast(uFileLength);
return false;
}
}
} // extern "C"
int KIM_Collections_CacheListOfItemNamesByType(
KIM_Collections * const collections,
KIM_CollectionItemType const itemType,
int * const extent)
{
CONVERT_POINTER;
return pCollections->CacheListOfItemNamesByType(makeItemTypeCpp(itemType),
extent);
}
int KIM_Collections_GetItemNameByType(KIM_Collections * const collections,
int const index,
char const ** const itemName)
{
CONVERT_POINTER;
std::string const * pStrItemName;
int error = pCollections->GetItemNameByType(index, &pStrItemName);
if (error)
return true;
else
{
*itemName = pStrItemName->c_str();
return false;
}
}
int KIM_Collections_CacheListOfItemNamesByCollectionAndType(
KIM_Collections * const collections,
KIM_Collection const collection,
KIM_CollectionItemType const itemType,
int * const extent)
{
CONVERT_POINTER;
return pCollections->CacheListOfItemNamesByCollectionAndType(
makeCollectionCpp(collection), makeItemTypeCpp(itemType), extent);
}
int KIM_Collections_GetItemNameByCollectionAndType(
KIM_Collections * const collections,
int const index,
char const ** const itemName)
{
CONVERT_POINTER;
std::string const * pStrItemName;
int error
= pCollections->GetItemNameByCollectionAndType(index, &pStrItemName);
if (error)
return true;
else
{
*itemName = pStrItemName->c_str();
return false;
}
}
int KIM_Collections_GetItemLibraryFileNameByCollectionAndType(
KIM_Collections * const collections,
KIM_Collection const collection,
KIM_CollectionItemType const itemType,
char const * const itemName,
char const ** const fileName)
{
CONVERT_POINTER;
std::string const * pStrFileName;
int error = pCollections->GetItemLibraryFileNameByCollectionAndType(
makeCollectionCpp(collection),
makeItemTypeCpp(itemType),
itemName,
&pStrFileName);
if (error)
return true;
else
{
*fileName = pStrFileName->c_str();
return false;
}
}
int KIM_Collections_CacheListOfItemMetadataFilesByCollectionAndType(
KIM_Collections * const collections,
KIM_Collection const collection,
KIM_CollectionItemType const itemType,
char const * const itemName,
int * const extent)
{
CONVERT_POINTER;
return pCollections->CacheListOfItemMetadataFilesByCollectionAndType(
makeCollectionCpp(collection),
makeItemTypeCpp(itemType),
itemName,
extent);
}
int KIM_Collections_GetItemMetadataFileByCollectionAndType(
KIM_Collections * const collections,
int const index,
char const ** const fileName,
unsigned int * const fileLength,
unsigned char const ** const fileRawData,
int * const availableAsString,
char const ** const fileString)
{
CONVERT_POINTER;
std::string const * pStrFileName;
std::string const ** ppStrFileName;
if (fileName == NULL)
ppStrFileName = NULL;
else
ppStrFileName = &pStrFileName;
std::string const * pStrFileString;
std::string const ** ppStrFileString;
if (fileString == NULL)
ppStrFileString = NULL;
else
ppStrFileString = &pStrFileString;
int error
= pCollections->GetItemMetadataFileByCollectionAndType(index,
ppStrFileName,
fileLength,
fileRawData,
availableAsString,
ppStrFileString);
if (error)
return true;
else
{
if (fileName != NULL) *fileName = pStrFileName->c_str();
if (fileString != NULL)
{
if (pStrFileString == NULL)
*fileString = NULL;
else
*fileString = pStrFileString->c_str();
}
return false;
}
}
extern "C" {
int KIM_Collections_GetItemMetadataFileByCollectionAndType_fortran(
KIM_Collections * const collections,
int const index,
char const ** const fileName,
long * const fileLength,
unsigned char const ** const fileRawData,
int * const availableAsString,
char const ** const fileString)
{
unsigned int uFileLength;
int error = KIM_Collections_GetItemMetadataFileByCollectionAndType(
collections,
index,
fileName,
&uFileLength,
fileRawData,
availableAsString,
fileString);
if (error)
return true;
else if ((sizeof(int) == sizeof(long)) && (uFileLength > INT_MAX))
{
std::cerr << "* Error : long overflow for fileLength. " << __FILE__ << ":"
<< __LINE__ << std::endl;
return true;
}
else
{
*fileLength = static_cast(uFileLength);
return false;
}
}
} // extern "C"
void KIM_Collections_GetProjectNameAndSemVer(
KIM_Collections * const collections,
char const ** const projectName,
char const ** const semVer)
{
CONVERT_POINTER;
std::string const * pStrProjectName;
std::string const ** ppStrProjectName;
if (projectName == NULL)
ppStrProjectName = NULL;
else
ppStrProjectName = &pStrProjectName;
std::string const * pStrSemVer;
std::string const ** ppStrSemVer;
if (semVer == NULL)
ppStrSemVer = NULL;
else
ppStrSemVer = &pStrSemVer;
pCollections->GetProjectNameAndSemVer(ppStrProjectName, ppStrSemVer);
if (projectName != NULL) *projectName = pStrProjectName->c_str();
if (semVer != NULL) *semVer = pStrSemVer->c_str();
}
int KIM_Collections_GetEnvironmentVariableName(
KIM_Collections * const collections,
KIM_CollectionItemType const itemType,
char const ** const name)
{
CONVERT_POINTER;
std::string const * pStrName;
int error = pCollections->GetEnvironmentVariableName(
makeItemTypeCpp(itemType), &pStrName);
if (error)
return true;
else
{
*name = pStrName->c_str();
return false;
}
}
void KIM_Collections_GetConfigurationFileEnvironmentVariable(
KIM_Collections * const collections,
char const ** const name,
char const ** const value)
{
CONVERT_POINTER;
std::string const * pStrName;
std::string const ** ppStrName;
if (name == NULL)
ppStrName = NULL;
else
ppStrName = &pStrName;
std::string const * pStrValue;
std::string const ** ppStrValue;
if (value == NULL)
ppStrValue = NULL;
else
ppStrValue = &pStrValue;
pCollections->GetConfigurationFileEnvironmentVariable(ppStrName, ppStrValue);
if (name != NULL) *name = pStrName->c_str();
if (value != NULL) *value = pStrValue->c_str();
}
void KIM_Collections_GetConfigurationFileName(
KIM_Collections * const collections, char const ** const fileName)
{
CONVERT_POINTER;
std::string const * pStrFileName;
pCollections->GetConfigurationFileName(&pStrFileName);
*fileName = pStrFileName->c_str();
}
int KIM_Collections_CacheListOfDirectoryNames(
KIM_Collections * const collections,
KIM_Collection const collection,
KIM_CollectionItemType const itemType,
int * const extent)
{
CONVERT_POINTER;
return pCollections->CacheListOfDirectoryNames(
makeCollectionCpp(collection), makeItemTypeCpp(itemType), extent);
}
int KIM_Collections_GetDirectoryName(KIM_Collections * const collections,
int const index,
char const ** const directoryName)
{
CONVERT_POINTER;
std::string const * pStrDirectoryName;
int error = pCollections->GetDirectoryName(index, &pStrDirectoryName);
if (error)
return true;
else
{
*directoryName = pStrDirectoryName->c_str();
return true;
}
}
void KIM_Collections_SetLogID(KIM_Collections * const collections,
char const * const logID)
{
CONVERT_POINTER;
pCollections->SetLogID(logID);
}
void KIM_Collections_PushLogVerbosity(KIM_Collections * const collections,
KIM_LogVerbosity const logVerbosity)
{
CONVERT_POINTER;
pCollections->PushLogVerbosity(makeLogVerbosityCpp(logVerbosity));
}
void KIM_Collections_PopLogVerbosity(KIM_Collections * const collections)
{
CONVERT_POINTER;
pCollections->PopLogVerbosity();
}
kim-api-2.2.1-git/c/src/KIM_ComputeArgumentName_c.cpp 0000664 0000000 0000000 00000012164 13765565573 0022315 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common
// Development and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name
// LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner].
// All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_DATA_TYPE_HPP_
#include "KIM_DataType.hpp"
#endif
extern "C" {
#ifndef KIM_DATA_TYPE_H_
#include "KIM_DataType.h"
#endif
} // extern "C"
#ifndef KIM_COMPUTE_ARGUMENT_NAME_HPP_
#include "KIM_ComputeArgumentName.hpp"
#endif
extern "C" {
#ifndef KIM_COMPUTE_ARGUMENT_NAME_H_
#include "KIM_ComputeArgumentName.h"
#endif
} // extern "C"
namespace
{
KIM::ComputeArgumentName
makeComputeArgumentNameCpp(KIM_ComputeArgumentName const computeArgumentName)
{
KIM::ComputeArgumentName const * const computeArgumentNameCpp
= reinterpret_cast(
&computeArgumentName);
return *computeArgumentNameCpp;
}
KIM_ComputeArgumentName
makeComputeArgumentNameC(KIM::ComputeArgumentName const computeArgumentName)
{
KIM_ComputeArgumentName const * const computeArgumentNameC
= reinterpret_cast(&computeArgumentName);
return *computeArgumentNameC;
}
KIM_DataType makeDataTypeC(KIM::DataType const dataType)
{
KIM_DataType const * const dataTypeC
= reinterpret_cast(&dataType);
return *dataTypeC;
}
} // namespace
extern "C" {
KIM_ComputeArgumentName
KIM_ComputeArgumentName_FromString(char const * const str)
{
return makeComputeArgumentNameC(KIM::ComputeArgumentName(std::string(str)));
}
int KIM_ComputeArgumentName_Known(
KIM_ComputeArgumentName const computeArgumentName)
{
return makeComputeArgumentNameCpp(computeArgumentName).Known();
}
int KIM_ComputeArgumentName_Equal(KIM_ComputeArgumentName const lhs,
KIM_ComputeArgumentName const rhs)
{
return (lhs.computeArgumentNameID == rhs.computeArgumentNameID);
}
int KIM_ComputeArgumentName_NotEqual(KIM_ComputeArgumentName const lhs,
KIM_ComputeArgumentName const rhs)
{
return (!KIM_ComputeArgumentName_Equal(lhs, rhs));
}
char const *
KIM_ComputeArgumentName_ToString(KIM_ComputeArgumentName computeArgumentName)
{
return makeComputeArgumentNameCpp(computeArgumentName).ToString().c_str();
}
// Order doesn't matter as long as all values are unique
#include "KIM_ComputeArgumentName.inc"
KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_numberOfParticles
= {ID_numberOfParticles};
KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_particleSpeciesCodes
= {ID_particleSpeciesCodes};
KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_particleContributing
= {ID_particleContributing};
KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_coordinates
= {ID_coordinates};
KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_partialEnergy
= {ID_partialEnergy};
KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_partialForces
= {ID_partialForces};
KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_partialParticleEnergy
= {ID_partialParticleEnergy};
KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_partialVirial
= {ID_partialVirial};
KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_partialParticleVirial
= {ID_partialParticleVirial};
void KIM_COMPUTE_ARGUMENT_NAME_GetNumberOfComputeArgumentNames(
int * const numberOfComputeArgumentNames)
{
KIM::COMPUTE_ARGUMENT_NAME::GetNumberOfComputeArgumentNames(
numberOfComputeArgumentNames);
}
int KIM_COMPUTE_ARGUMENT_NAME_GetComputeArgumentName(
int const index, KIM_ComputeArgumentName * const computeArgumentName)
{
KIM::ComputeArgumentName computeArgumentNameCpp;
int error = KIM::COMPUTE_ARGUMENT_NAME::GetComputeArgumentName(
index, &computeArgumentNameCpp);
if (error) return error;
*computeArgumentName = makeComputeArgumentNameC(computeArgumentNameCpp);
return false;
}
int KIM_COMPUTE_ARGUMENT_NAME_GetComputeArgumentDataType(
KIM_ComputeArgumentName const computeArgumentName,
KIM_DataType * const dataType)
{
KIM::ComputeArgumentName computeArgumentNameCpp
= makeComputeArgumentNameCpp(computeArgumentName);
KIM::DataType dataTypeCpp;
int error = KIM::COMPUTE_ARGUMENT_NAME::GetComputeArgumentDataType(
computeArgumentNameCpp, &dataTypeCpp);
if (error) return error;
*dataType = makeDataTypeC(dataTypeCpp);
return false;
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_ComputeArguments_c.cpp 0000664 0000000 0000000 00000015371 13765565573 0021702 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
extern "C" {
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
} // extern "C"
#ifndef KIM_LANGUAGE_NAME_HPP_
#include "KIM_LanguageName.hpp"
#endif
extern "C" {
#ifndef KIM_LANGUAGE_NAME_H_
#include "KIM_LanguageName.h"
#endif
} // extern "C"
#ifndef KIM_SUPPORT_STATUS_HPP_
#include "KIM_SupportStatus.hpp"
#endif
extern "C" {
#ifndef KIM_SUPPORT_STATUS_H_
#include "KIM_SupportStatus.h"
#endif
} // extern "C"
#ifndef KIM_COMPUTE_ARGUMENT_NAME_HPP_
#include "KIM_ComputeArgumentName.hpp"
#endif
extern "C" {
#ifndef KIM_COMPUTE_ARGUMENT_NAME_H_
#include "KIM_ComputeArgumentName.h"
#endif
} // extern "C"
#ifndef KIM_COMPUTE_CALLBACK_NAME_HPP_
#include "KIM_ComputeCallbackName.hpp"
#endif
extern "C" {
#ifndef KIM_COMPUTE_CALLBACK_NAME_H_
#include "KIM_ComputeCallbackName.h"
#endif
} // extern "C"
#ifndef KIM_COMPUTE_ARGUMENTS_HPP_
#include "KIM_ComputeArguments.hpp"
#endif
extern "C" {
#ifndef KIM_COMPUTE_ARGUMENTS_H_
#include "KIM_ComputeArguments.h"
#endif
} // extern "C"
struct KIM_ComputeArguments
{
void * p;
};
#define CONVERT_POINTER \
KIM::ComputeArguments * pComputeArguments \
= reinterpret_cast(computeArguments->p)
namespace
{
KIM::LanguageName makeLanguageNameCpp(KIM_LanguageName const languageName)
{
return KIM::LanguageName(languageName.languageNameID);
}
KIM_SupportStatus makeSupportStatusC(KIM::SupportStatus supportStatus)
{
KIM_SupportStatus supportStatusC = {supportStatus.supportStatusID};
return supportStatusC;
}
KIM::ComputeArgumentName
makeComputeArgumentNameCpp(KIM_ComputeArgumentName const computeArgumentName)
{
return KIM::ComputeArgumentName(computeArgumentName.computeArgumentNameID);
}
KIM::ComputeCallbackName
makeComputeCallbackNameCpp(KIM_ComputeCallbackName const computeCallbackName)
{
return KIM::ComputeCallbackName(computeCallbackName.computeCallbackNameID);
}
KIM::LogVerbosity makeLogVerbosityCpp(KIM_LogVerbosity logVerbosity)
{
return KIM::LogVerbosity(logVerbosity.logVerbosityID);
}
} // namespace
extern "C" {
int KIM_ComputeArguments_GetArgumentSupportStatus(
KIM_ComputeArguments const * const computeArguments,
KIM_ComputeArgumentName const computeArgumentName,
KIM_SupportStatus * const supportStatus)
{
CONVERT_POINTER;
KIM::SupportStatus supportStatusCpp;
int error = pComputeArguments->GetArgumentSupportStatus(
makeComputeArgumentNameCpp(computeArgumentName), &supportStatusCpp);
if (error)
return true;
else
{
*supportStatus = makeSupportStatusC(supportStatusCpp);
return false;
}
}
int KIM_ComputeArguments_GetCallbackSupportStatus(
KIM_ComputeArguments const * const computeArguments,
KIM_ComputeCallbackName const computeCallbackName,
KIM_SupportStatus * const supportStatus)
{
CONVERT_POINTER;
KIM::SupportStatus supportStatusCpp;
int error = pComputeArguments->GetCallbackSupportStatus(
makeComputeCallbackNameCpp(computeCallbackName), &supportStatusCpp);
if (error)
return true;
else
{
*supportStatus = makeSupportStatusC(supportStatusCpp);
return false;
}
}
int KIM_ComputeArguments_SetArgumentPointerInteger(
KIM_ComputeArguments * const computeArguments,
KIM_ComputeArgumentName const computeArgumentName,
int const * const ptr)
{
CONVERT_POINTER;
KIM::ComputeArgumentName argN
= makeComputeArgumentNameCpp(computeArgumentName);
return pComputeArguments->SetArgumentPointer(argN, ptr);
}
int KIM_ComputeArguments_SetArgumentPointerDouble(
KIM_ComputeArguments * const computeArguments,
KIM_ComputeArgumentName const computeArgumentName,
double const * const ptr)
{
CONVERT_POINTER;
KIM::ComputeArgumentName argN
= makeComputeArgumentNameCpp(computeArgumentName);
return pComputeArguments->SetArgumentPointer(argN, ptr);
}
int KIM_ComputeArguments_SetCallbackPointer(
KIM_ComputeArguments * const computeArguments,
KIM_ComputeCallbackName const computeCallbackName,
KIM_LanguageName const languageName,
KIM_Function * const fptr,
void * const dataObject)
{
CONVERT_POINTER;
KIM::ComputeCallbackName computeCallbackNameCpp
= makeComputeCallbackNameCpp(computeCallbackName);
KIM::LanguageName langN = makeLanguageNameCpp(languageName);
return pComputeArguments->SetCallbackPointer(
computeCallbackNameCpp, langN, fptr, dataObject);
}
void KIM_ComputeArguments_AreAllRequiredArgumentsAndCallbacksPresent(
KIM_ComputeArguments const * const computeArguments, int * const result)
{
CONVERT_POINTER;
return pComputeArguments->AreAllRequiredArgumentsAndCallbacksPresent(result);
}
void KIM_ComputeArguments_SetSimulatorBufferPointer(
KIM_ComputeArguments * const computeArguments, void * const ptr)
{
CONVERT_POINTER;
pComputeArguments->SetSimulatorBufferPointer(ptr);
}
void KIM_ComputeArguments_GetSimulatorBufferPointer(
KIM_ComputeArguments const * const computeArguments, void ** const ptr)
{
CONVERT_POINTER;
pComputeArguments->GetSimulatorBufferPointer(ptr);
}
char const * KIM_ComputeArguments_ToString(
KIM_ComputeArguments const * const computeArguments)
{
CONVERT_POINTER;
return pComputeArguments->ToString().c_str();
}
void KIM_ComputeArguments_SetLogID(
KIM_ComputeArguments * const computeArguments, char const * const logID)
{
CONVERT_POINTER;
pComputeArguments->SetLogID(logID);
}
void KIM_ComputeArguments_PushLogVerbosity(
KIM_ComputeArguments * const computeArguments,
KIM_LogVerbosity const logVerbosity)
{
CONVERT_POINTER;
pComputeArguments->PushLogVerbosity(makeLogVerbosityCpp(logVerbosity));
}
void KIM_ComputeArguments_PopLogVerbosity(
KIM_ComputeArguments * const computeArguments)
{
CONVERT_POINTER;
pComputeArguments->PopLogVerbosity();
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_ComputeCallbackName_c.cpp 0000664 0000000 0000000 00000007317 13765565573 0022233 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common
// Development and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name
// LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner].
// All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_COMPUTE_CALLBACK_NAME_HPP_
#include "KIM_ComputeCallbackName.hpp"
#endif
extern "C" {
#ifndef KIM_COMPUTE_CALLBACK_NAME_H_
#include "KIM_ComputeCallbackName.h"
#endif
} // extern "C"
namespace
{
KIM::ComputeCallbackName
makeComputeCallbackNameCpp(KIM_ComputeCallbackName const computeCallbackName)
{
KIM::ComputeCallbackName const * const computeCallbackNameCpp
= reinterpret_cast(
&computeCallbackName);
return *computeCallbackNameCpp;
}
KIM_ComputeCallbackName
makeComputeCallbackNameC(KIM::ComputeCallbackName const computeCallbackName)
{
KIM_ComputeCallbackName const * const computeCallbackNameC
= reinterpret_cast(&computeCallbackName);
return *computeCallbackNameC;
}
} // namespace
extern "C" {
KIM_ComputeCallbackName
KIM_ComputeCallbackName_FromString(char const * const str)
{
return makeComputeCallbackNameC(KIM::ComputeCallbackName(std::string(str)));
}
int KIM_ComputeCallbackName_Known(
KIM_ComputeCallbackName const computeCallbackName)
{
return makeComputeCallbackNameCpp(computeCallbackName).Known();
}
int KIM_ComputeCallbackName_Equal(KIM_ComputeCallbackName const lhs,
KIM_ComputeCallbackName const rhs)
{
return (lhs.computeCallbackNameID == rhs.computeCallbackNameID);
}
int KIM_ComputeCallbackNameNot_Equal(KIM_ComputeCallbackName const lhs,
KIM_ComputeCallbackName const rhs)
{
return (!KIM_ComputeCallbackName_Equal(lhs, rhs));
}
char const *
KIM_ComputeCallbackName_ToString(KIM_ComputeCallbackName computeCallbackName)
{
return makeComputeCallbackNameCpp(computeCallbackName).ToString().c_str();
}
// Order doesn't matter as long as all values are unique
#include "KIM_ComputeCallbackName.inc"
KIM_ComputeCallbackName const KIM_COMPUTE_CALLBACK_NAME_GetNeighborList
= {ID_GetNeighborList};
KIM_ComputeCallbackName const KIM_COMPUTE_CALLBACK_NAME_ProcessDEDrTerm
= {ID_ProcessDEDrTerm};
KIM_ComputeCallbackName const KIM_COMPUTE_CALLBACK_NAME_ProcessD2EDr2Term
= {ID_ProcessD2EDr2Term};
void KIM_COMPUTE_CALLBACK_NAME_GetNumberOfComputeCallbackNames(
int * const numberOfComputeCallbackNames)
{
KIM::COMPUTE_CALLBACK_NAME::GetNumberOfComputeCallbackNames(
numberOfComputeCallbackNames);
}
int KIM_COMPUTE_CALLBACK_NAME_GetComputeCallbackName(
int const index, KIM_ComputeCallbackName * const computeCallbackName)
{
KIM::ComputeCallbackName computeCallbackNameCpp;
int error = KIM::COMPUTE_CALLBACK_NAME::GetComputeCallbackName(
index, &computeCallbackNameCpp);
if (error) return error;
*computeCallbackName = makeComputeCallbackNameC(computeCallbackNameCpp);
return false;
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_DataType_c.cpp 0000664 0000000 0000000 00000005247 13765565573 0020114 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common
// Development and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name
// LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner].
// All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_DATA_TYPE_HPP_
#include "KIM_DataType.hpp"
#endif
extern "C" {
#ifndef KIM_DATA_TYPE_H_
#include "KIM_DataType.h"
#endif
} // extern "C"
namespace
{
KIM::DataType makeDataTypeCpp(KIM_DataType const dataType)
{
KIM::DataType const * const dataTypeCpp
= reinterpret_cast(&dataType);
return *dataTypeCpp;
}
KIM_DataType makeDataTypeC(KIM::DataType const dataType)
{
KIM_DataType const * const dataTypeC
= reinterpret_cast(&dataType);
return *dataTypeC;
}
} // namespace
extern "C" {
KIM_DataType KIM_DataType_FromString(char const * const str)
{
return makeDataTypeC(KIM::DataType(std::string(str)));
}
int KIM_DataType_Known(KIM_DataType const dataType)
{
return makeDataTypeCpp(dataType).Known();
}
int KIM_DataType_Equal(KIM_DataType const lhs, KIM_DataType const rhs)
{
return (lhs.dataTypeID == rhs.dataTypeID);
}
int KIM_DataType_NotEqual(KIM_DataType const lhs, KIM_DataType const rhs)
{
return (!KIM_DataType_Equal(lhs, rhs));
}
char const * KIM_DataType_ToString(KIM_DataType const dataType)
{
return makeDataTypeCpp(dataType).ToString().c_str();
}
#include "KIM_DataType.inc"
KIM_DataType const KIM_DATA_TYPE_Integer = {ID_Integer};
KIM_DataType const KIM_DATA_TYPE_Double = {ID_Double};
void KIM_DATA_TYPE_GetNumberOfDataTypes(int * const numberOfDataTypes)
{
KIM::DATA_TYPE::GetNumberOfDataTypes(numberOfDataTypes);
}
int KIM_DATA_TYPE_GetDataType(int const index, KIM_DataType * const dataType)
{
KIM::DataType dataTypeCpp;
int error = KIM::DATA_TYPE::GetDataType(index, &dataTypeCpp);
if (error) return error;
*dataType = makeDataTypeC(dataTypeCpp);
return false;
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_EnergyUnit_c.cpp 0000664 0000000 0000000 00000006145 13765565573 0020470 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common
// Development and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name
// LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner].
// All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_ENERGY_UNIT_HPP_
#include "KIM_EnergyUnit.hpp"
#endif
extern "C" {
#ifndef KIM_ENERGY_UNIT_H_
#include "KIM_EnergyUnit.h"
#endif
}
namespace
{
KIM::EnergyUnit makeEnergyUnitCpp(KIM_EnergyUnit const energyUnit)
{
KIM::EnergyUnit const * const energyUnitCpp
= reinterpret_cast(&energyUnit);
return *energyUnitCpp;
}
KIM_EnergyUnit makeEnergyUnitC(KIM::EnergyUnit const energyUnit)
{
KIM_EnergyUnit const * const energyUnitC
= reinterpret_cast(&energyUnit);
return *energyUnitC;
}
} // namespace
extern "C" {
KIM_EnergyUnit KIM_EnergyUnit_FromString(char const * const str)
{
return makeEnergyUnitC(KIM::EnergyUnit(std::string(str)));
}
int KIM_EnergyUnit_Known(KIM_EnergyUnit const energyUnit)
{
return makeEnergyUnitCpp(energyUnit).Known();
}
int KIM_EnergyUnit_Equal(KIM_EnergyUnit const lhs, KIM_EnergyUnit const rhs)
{
return (lhs.energyUnitID == rhs.energyUnitID);
}
int KIM_EnergyUnit_NotEqual(KIM_EnergyUnit const lhs, KIM_EnergyUnit const rhs)
{
return (!KIM_EnergyUnit_Equal(lhs, rhs));
}
char const * KIM_EnergyUnit_ToString(KIM_EnergyUnit const energyUnit)
{
return makeEnergyUnitCpp(energyUnit).ToString().c_str();
}
#include "KIM_EnergyUnit.inc"
KIM_EnergyUnit const KIM_ENERGY_UNIT_unused = {ID_unused};
KIM_EnergyUnit const KIM_ENERGY_UNIT_amu_A2_per_ps2 = {ID_amu_A2_per_ps2};
KIM_EnergyUnit const KIM_ENERGY_UNIT_erg = {ID_erg};
KIM_EnergyUnit const KIM_ENERGY_UNIT_eV = {ID_eV};
KIM_EnergyUnit const KIM_ENERGY_UNIT_Hartree = {ID_Hartree};
KIM_EnergyUnit const KIM_ENERGY_UNIT_J = {ID_J};
KIM_EnergyUnit const KIM_ENERGY_UNIT_kcal_mol = {ID_kcal_mol};
void KIM_ENERGY_UNIT_GetNumberOfEnergyUnits(int * const numberOfEnergyUnits)
{
KIM::ENERGY_UNIT::GetNumberOfEnergyUnits(numberOfEnergyUnits);
}
int KIM_ENERGY_UNIT_GetEnergyUnit(int const index,
KIM_EnergyUnit * const energyUnit)
{
KIM::EnergyUnit energyUnitCpp;
int error = KIM::ENERGY_UNIT::GetEnergyUnit(index, &energyUnitCpp);
if (error) return error;
*energyUnit = makeEnergyUnitC(energyUnitCpp);
return false;
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_LanguageName_c.cpp 0000664 0000000 0000000 00000006161 13765565573 0020721 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common
// Development and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name
// LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner].
// All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_LANGUAGE_NAME_HPP_
#include "KIM_LanguageName.hpp"
#endif
extern "C" {
#ifndef KIM_LANGUAGE_NAME_H_
#include "KIM_LanguageName.h"
#endif
} // extern "C"
namespace
{
KIM::LanguageName makeLanguageNameCpp(KIM_LanguageName languageName)
{
KIM::LanguageName const * const languageNameCpp
= reinterpret_cast(&languageName);
return *languageNameCpp;
}
KIM_LanguageName makeLanguageNameC(KIM::LanguageName languageName)
{
KIM_LanguageName const * const languageNameC
= reinterpret_cast(&languageName);
return *languageNameC;
}
} // namespace
extern "C" {
KIM_LanguageName KIM_LanguageName_FromString(char const * const str)
{
return makeLanguageNameC(KIM::LanguageName(std::string(str)));
}
int KIM_LanguageName_Known(KIM_LanguageName const languageName)
{
return makeLanguageNameCpp(languageName).Known();
}
int KIM_LanguageName_Equal(KIM_LanguageName const lhs,
KIM_LanguageName const rhs)
{
return (lhs.languageNameID == rhs.languageNameID);
}
int KIM_LanguageName_NotEqual(KIM_LanguageName const lhs,
KIM_LanguageName const rhs)
{
return (!KIM_LanguageName_Equal(lhs, rhs));
}
char const * KIM_LanguageName_ToString(KIM_LanguageName languageName)
{
return makeLanguageNameCpp(languageName).ToString().c_str();
}
// Order doesn't matter as long as all values are unique
#include "KIM_LanguageName.inc"
KIM_LanguageName const KIM_LANGUAGE_NAME_cpp = {ID_cpp};
KIM_LanguageName const KIM_LANGUAGE_NAME_c = {ID_c};
KIM_LanguageName const KIM_LANGUAGE_NAME_fortran = {ID_fortran};
void KIM_LANGUAGE_NAME_GetNumberOfLanguageNames(
int * const numberOfLanguageNames)
{
KIM::LANGUAGE_NAME::GetNumberOfLanguageNames(numberOfLanguageNames);
}
int KIM_LANGUAGE_NAME_GetLanguageName(int const index,
KIM_LanguageName * const languageName)
{
KIM::LanguageName languageNameCpp;
int error = KIM::LANGUAGE_NAME::GetLanguageName(index, &languageNameCpp);
if (error) return error;
*languageName = makeLanguageNameC(languageNameCpp);
return false;
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_LengthUnit_c.cpp 0000664 0000000 0000000 00000006004 13765565573 0020452 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common
// Development and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name
// LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner].
// All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_LENGTH_UNIT_HPP_
#include "KIM_LengthUnit.hpp"
#endif
extern "C" {
#ifndef KIM_LENGTH_UNIT_H_
#include "KIM_LengthUnit.h"
#endif
}
namespace
{
KIM::LengthUnit makeLengthUnitCpp(KIM_LengthUnit const lengthUnit)
{
KIM::LengthUnit const * const lengthUnitCpp
= reinterpret_cast(&lengthUnit);
return *lengthUnitCpp;
}
KIM_LengthUnit makeLengthUnitC(KIM::LengthUnit const lengthUnit)
{
KIM_LengthUnit const * const lengthUnitC
= reinterpret_cast(&lengthUnit);
return *lengthUnitC;
}
} // namespace
extern "C" {
KIM_LengthUnit KIM_LengthUnit_FromString(char const * const str)
{
return makeLengthUnitC(KIM::LengthUnit(std::string(str)));
}
int KIM_LengthUnit_Known(KIM_LengthUnit const lengthUnit)
{
return makeLengthUnitCpp(lengthUnit).Known();
}
int KIM_LengthUnit_Equal(KIM_LengthUnit const lhs, KIM_LengthUnit const rhs)
{
return (lhs.lengthUnitID == rhs.lengthUnitID);
}
int KIM_LengthUnit_NotEqual(KIM_LengthUnit const lhs, KIM_LengthUnit const rhs)
{
return (!KIM_LengthUnit_Equal(lhs, rhs));
}
char const * KIM_LengthUnit_ToString(KIM_LengthUnit const lengthUnit)
{
return makeLengthUnitCpp(lengthUnit).ToString().c_str();
}
#include "KIM_LengthUnit.inc"
KIM_LengthUnit const KIM_LENGTH_UNIT_unused = {ID_unused};
KIM_LengthUnit const KIM_LENGTH_UNIT_A = {ID_A};
KIM_LengthUnit const KIM_LENGTH_UNIT_Bohr = {ID_Bohr};
KIM_LengthUnit const KIM_LENGTH_UNIT_cm = {ID_cm};
KIM_LengthUnit const KIM_LENGTH_UNIT_m = {ID_m};
KIM_LengthUnit const KIM_LENGTH_UNIT_nm = {ID_nm};
void KIM_LENGTH_UNIT_GetNumberOfLengthUnits(int * const numberOfLengthUnits)
{
KIM::LENGTH_UNIT::GetNumberOfLengthUnits(numberOfLengthUnits);
}
int KIM_LENGTH_UNIT_GetLengthUnit(int const index,
KIM_LengthUnit * const lengthUnit)
{
KIM::LengthUnit lengthUnitCpp;
int error = KIM::LENGTH_UNIT::GetLengthUnit(index, &lengthUnitCpp);
if (error) return error;
*lengthUnit = makeLengthUnitC(lengthUnitCpp);
return false;
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_LogVerbosity_c.cpp 0000664 0000000 0000000 00000010253 13765565573 0021022 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common
// Development and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name
// LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner].
// All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
extern "C" {
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
} // extern "C"
namespace
{
KIM::LogVerbosity makeLogVerbosityCpp(KIM_LogVerbosity const logVerbosity)
{
KIM::LogVerbosity const * const logVerbosityCpp
= reinterpret_cast(&logVerbosity);
return *logVerbosityCpp;
}
KIM_LogVerbosity makeLogVerbosityC(KIM::LogVerbosity const logVerbosity)
{
KIM_LogVerbosity const * const logVerbosityC
= reinterpret_cast(&logVerbosity);
return *logVerbosityC;
}
} // namespace
extern "C" {
KIM_LogVerbosity KIM_LogVerbosity_FromString(char const * const str)
{
return makeLogVerbosityC(KIM::LogVerbosity(std::string(str)));
}
int KIM_LogVerbosity_Known(KIM_LogVerbosity const logVerbosity)
{
return makeLogVerbosityCpp(logVerbosity).Known();
}
int KIM_LogVerbosity_LessThan(KIM_LogVerbosity const lhs,
KIM_LogVerbosity const rhs)
{
return (lhs.logVerbosityID < rhs.logVerbosityID);
}
int KIM_LogVerbosity_GreaterThan(KIM_LogVerbosity const lhs,
KIM_LogVerbosity const rhs)
{
return (lhs.logVerbosityID > rhs.logVerbosityID);
}
int KIM_LogVerbosity_LessThanEqual(KIM_LogVerbosity const lhs,
KIM_LogVerbosity const rhs)
{
return (lhs.logVerbosityID <= rhs.logVerbosityID);
}
int KIM_LogVerbosity_GreaterThanEqual(KIM_LogVerbosity const lhs,
KIM_LogVerbosity const rhs)
{
return (lhs.logVerbosityID >= rhs.logVerbosityID);
}
int KIM_LogVerbosity_Equal(KIM_LogVerbosity const lhs,
KIM_LogVerbosity const rhs)
{
return (lhs.logVerbosityID == rhs.logVerbosityID);
}
int KIM_LogVerbosity_NotEqual(KIM_LogVerbosity const lhs,
KIM_LogVerbosity const rhs)
{
return (!KIM_LogVerbosity_Equal(lhs, rhs));
}
char const * KIM_LogVerbosity_ToString(KIM_LogVerbosity const logVerbosity)
{
return makeLogVerbosityCpp(logVerbosity).ToString().c_str();
}
KIM_LogVerbosity const KIM_LOG_VERBOSITY_silent
= {KIM::LOG_VERBOSITY::silent.logVerbosityID};
KIM_LogVerbosity const KIM_LOG_VERBOSITY_fatal
= {KIM::LOG_VERBOSITY::fatal.logVerbosityID};
KIM_LogVerbosity const KIM_LOG_VERBOSITY_error
= {KIM::LOG_VERBOSITY::error.logVerbosityID};
KIM_LogVerbosity const KIM_LOG_VERBOSITY_warning
= {KIM::LOG_VERBOSITY::warning.logVerbosityID};
KIM_LogVerbosity const KIM_LOG_VERBOSITY_information
= {KIM::LOG_VERBOSITY::information.logVerbosityID};
KIM_LogVerbosity const KIM_LOG_VERBOSITY_debug
= {KIM::LOG_VERBOSITY::debug.logVerbosityID};
void KIM_LOG_VERBOSITY_GetNumberOfLogVerbosities(
int * const numberOfLogVerbosities)
{
KIM::LOG_VERBOSITY::GetNumberOfLogVerbosities(numberOfLogVerbosities);
}
int KIM_LOG_VERBOSITY_GetLogVerbosity(int const index,
KIM_LogVerbosity * const logVerbosity)
{
KIM::LogVerbosity logVerbosityCpp;
int error = KIM::LOG_VERBOSITY::GetLogVerbosity(index, &logVerbosityCpp);
if (error) return error;
*logVerbosity = makeLogVerbosityC(logVerbosityCpp);
return false;
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_Log_c.cpp 0000664 0000000 0000000 00000007251 13765565573 0017117 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common
// Development and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name
// LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner].
// All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#include
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
extern "C" {
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
} // extern "C"
#ifndef KIM_LANGUAGE_NAME_HPP_
#include "KIM_LanguageName.hpp"
#endif
extern "C" {
#ifndef KIM_LANGUAGE_NAME_H_
#include "KIM_LanguageName.h"
#endif
} // extern "C"
#ifndef KIM_LOG_HPP_
#include "KIM_Log.hpp"
#endif
extern "C" {
#ifndef KIM_LOG_H_
#include "KIM_Log.h"
#endif
} // extern "C"
struct KIM_Log
{
void * p;
};
#define CONVERT_POINTER KIM::Log * pLog = reinterpret_cast(log->p)
namespace
{
KIM::LogVerbosity makeLogVerbosityCpp(KIM_LogVerbosity const logVerbosity)
{
return KIM::LogVerbosity(logVerbosity.logVerbosityID);
}
KIM::LanguageName makeLanguageNameCpp(KIM_LanguageName const languageName)
{
return KIM::LanguageName(languageName.languageNameID);
}
} // namespace
extern "C" {
int KIM_Log_Create(KIM_Log ** const log)
{
KIM::Log * pLog;
int error = KIM::Log::Create(&pLog);
if (error) return error;
(*log) = new KIM_Log;
(*log)->p = (void *) pLog;
return false;
}
void KIM_Log_Destroy(KIM_Log ** const log)
{
if (*log != NULL)
{
KIM::Log * pLog = reinterpret_cast((*log)->p);
KIM::Log::Destroy(&pLog);
}
delete (*log);
*log = NULL;
}
void KIM_Log_PushDefaultVerbosity(KIM_LogVerbosity const logVerbosity)
{
KIM::Log::PushDefaultVerbosity(makeLogVerbosityCpp(logVerbosity));
}
void KIM_Log_PopDefaultVerbosity() { KIM::Log::PopDefaultVerbosity(); }
void KIM_Log_PushDefaultPrintFunction(KIM_LanguageName const languageName,
KIM_Function * const fptr)
{
KIM::Log::PushDefaultPrintFunction(makeLanguageNameCpp(languageName), fptr);
}
void KIM_Log_PopDefaultPrintFunction() { KIM::Log::PopDefaultPrintFunction(); }
char const * KIM_Log_GetID(KIM_Log const * const log)
{
CONVERT_POINTER;
return pLog->GetID().c_str();
}
void KIM_Log_SetID(KIM_Log * const log, char const * const id)
{
CONVERT_POINTER;
pLog->SetID(id);
}
void KIM_Log_PushVerbosity(KIM_Log * const log,
KIM_LogVerbosity const logVerbosity)
{
CONVERT_POINTER;
pLog->PushVerbosity(makeLogVerbosityCpp(logVerbosity));
}
void KIM_Log_PopVerbosity(KIM_Log * const log)
{
CONVERT_POINTER;
pLog->PopVerbosity();
}
void KIM_Log_LogEntry(KIM_Log const * const log,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName)
{
CONVERT_POINTER;
pLog->LogEntry(
makeLogVerbosityCpp(logVerbosity), message, lineNumber, fileName);
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_ModelComputeArgumentsCreate_c.cpp 0000664 0000000 0000000 00000014106 13765565573 0024002 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#include
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
extern "C" {
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
} // extern "C"
#ifndef KIM_SUPPORT_STATUS_HPP_
#include "KIM_SupportStatus.hpp"
#endif
extern "C" {
#ifndef KIM_SUPPORT_STATUS_H_
#include "KIM_SupportStatus.h"
#endif
} // extern "C"
#ifndef KIM_COMPUTE_ARGUMENT_NAME_HPP_
#include "KIM_ComputeArgumentName.hpp"
#endif
extern "C" {
#ifndef KIM_COMPUTE_ARGUMENT_NAME_H_
#include "KIM_ComputeArgumentName.h"
#endif
} // extern "C"
#ifndef KIM_COMPUTE_CALLBACK_NAME_HPP_
#include "KIM_ComputeCallbackName.hpp"
#endif
extern "C" {
#ifndef KIM_COMPUTE_CALLBACK_NAME_H_
#include "KIM_ComputeCallbackName.h"
#endif
} // extern "C"
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_CREATE_HPP_
#include "KIM_ModelComputeArgumentsCreate.hpp"
#endif
extern "C" {
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_CREATE_H_
#include "KIM_ModelComputeArgumentsCreate.h"
#endif
} // extern "C"
struct KIM_ModelComputeArgumentsCreate
{
void * p;
};
#define CONVERT_POINTER \
KIM::ModelComputeArgumentsCreate * pModelComputeArgumentsCreate \
= reinterpret_cast( \
modelComputeArgumentsCreate->p)
namespace
{
KIM::LogVerbosity makeLogVerbosityCpp(KIM_LogVerbosity const logVerbosity)
{
return KIM::LogVerbosity(logVerbosity.logVerbosityID);
}
KIM::SupportStatus makeSupportStatusCpp(KIM_SupportStatus const supportStatus)
{
return KIM::SupportStatus(supportStatus.supportStatusID);
}
KIM::ComputeArgumentName
makeComputeArgumentNameCpp(KIM_ComputeArgumentName const computeArgumentName)
{
return KIM::ComputeArgumentName(computeArgumentName.computeArgumentNameID);
}
KIM::ComputeCallbackName
makeComputeCallbackNameCpp(KIM_ComputeCallbackName const computeCallbackName)
{
return KIM::ComputeCallbackName(computeCallbackName.computeCallbackNameID);
}
} // namespace
extern "C" {
int KIM_ModelComputeArgumentsCreate_SetArgumentSupportStatus(
KIM_ModelComputeArgumentsCreate * const modelComputeArgumentsCreate,
KIM_ComputeArgumentName const computeArgumentName,
KIM_SupportStatus const supportStatus)
{
CONVERT_POINTER;
return pModelComputeArgumentsCreate->SetArgumentSupportStatus(
makeComputeArgumentNameCpp(computeArgumentName),
makeSupportStatusCpp(supportStatus));
}
int KIM_ModelComputeArgumentsCreate_SetCallbackSupportStatus(
KIM_ModelComputeArgumentsCreate * const modelComputeArgumentsCreate,
KIM_ComputeCallbackName const computeCallbackName,
KIM_SupportStatus const supportStatus)
{
CONVERT_POINTER;
return pModelComputeArgumentsCreate->SetCallbackSupportStatus(
makeComputeCallbackNameCpp(computeCallbackName),
makeSupportStatusCpp(supportStatus));
}
void KIM_ModelComputeArgumentsCreate_SetModelBufferPointer(
KIM_ModelComputeArgumentsCreate * const modelComputeArgumentsCreate,
void * const ptr)
{
CONVERT_POINTER;
pModelComputeArgumentsCreate->SetModelBufferPointer(ptr);
}
void KIM_ModelComputeArgumentsCreate_LogEntry(
KIM_ModelComputeArgumentsCreate const * const modelComputeArgumentsCreate,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName)
{
CONVERT_POINTER;
pModelComputeArgumentsCreate->LogEntry(
makeLogVerbosityCpp(logVerbosity), message, lineNumber, fileName);
}
char const * KIM_ModelComputeArgumentsCreate_ToString(
KIM_ModelComputeArgumentsCreate const * const modelComputeArgumentsCreate)
{
CONVERT_POINTER;
return pModelComputeArgumentsCreate->ToString().c_str();
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_ModelComputeArgumentsDestroy_c.cpp 0000664 0000000 0000000 00000010340 13765565573 0024224 0 ustar 00root root 0000000 0000000 /* */
/* CDDL HEADER START */
/* */
/* The contents of this file are subject to the terms of the Common */
/* Development and Distribution License Version 1.0 (the "License"). */
/* */
/* You can obtain a copy of the license at */
/* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
/* specific language governing permissions and limitations under the License. */
/* */
/* When distributing Covered Code, include this CDDL HEADER in each file and */
/* include the License file in a prominent location with the name */
/* LICENSE.CDDL. */
/* If applicable, add the following below this CDDL HEADER, with the fields */
/* enclosed by brackets "[]" replaced with your own identifying information: */
/* */
/* Portions Copyright (c) [yyyy] [name of copyright owner]. */
/* All rights reserved. */
/* */
/* CDDL HEADER END */
/* */
/* */
/* Copyright (c) 2016--2020, Regents of the University of Minnesota. */
/* All rights reserved. */
/* */
/* Contributors: */
/* Ryan S. Elliott */
/* */
/* */
/* Release: This file is part of the kim-api.git repository. */
/* */
#include
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
extern "C" {
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
} // extern "C"
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_DESTROY_HPP_
#include "KIM_ModelComputeArgumentsDestroy.hpp"
#endif
extern "C" {
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_DESTROY_H_
#include "KIM_ModelComputeArgumentsDestroy.h"
#endif
} // extern "C"
struct KIM_ModelComputeArgumentsDestroy
{
void * p;
};
#define CONVERT_POINTER \
KIM::ModelComputeArgumentsDestroy * pModelComputeArgumentsDestroy \
= reinterpret_cast( \
modelComputeArgumentsDestroy->p)
namespace
{
KIM::LogVerbosity makeLogVerbosityCpp(KIM_LogVerbosity const logVerbosity)
{
return KIM::LogVerbosity(logVerbosity.logVerbosityID);
}
} // namespace
extern "C" {
void KIM_ModelComputeArgumentsDestroy_GetModelBufferPointer(
KIM_ModelComputeArgumentsDestroy const * const modelComputeArgumentsDestroy,
void ** const ptr)
{
CONVERT_POINTER;
pModelComputeArgumentsDestroy->GetModelBufferPointer(ptr);
}
void KIM_ModelComputeArgumentsDestroy_LogEntry(
KIM_ModelComputeArgumentsDestroy const * const modelComputeArgumentsDestroy,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName)
{
CONVERT_POINTER;
pModelComputeArgumentsDestroy->LogEntry(
makeLogVerbosityCpp(logVerbosity), message, lineNumber, fileName);
}
char const * KIM_ModelComputeArgumentsDestroy_ToString(
KIM_ModelComputeArgumentsDestroy const * const modelComputeArgumentsDestroy)
{
CONVERT_POINTER;
return pModelComputeArgumentsDestroy->ToString().c_str();
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_ModelComputeArguments_c.cpp 0000664 0000000 0000000 00000013505 13765565573 0022660 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
extern "C" {
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
} // extern "C"
#ifndef KIM_COMPUTE_ARGUMENT_NAME_HPP_
#include "KIM_ComputeArgumentName.hpp"
#endif
extern "C" {
#ifndef KIM_COMPUTE_ARGUMENT_NAME_H_
#include "KIM_ComputeArgumentName.h"
#endif
} // extern "C"
#ifndef KIM_COMPUTE_CALLBACK_NAME_HPP_
#include "KIM_ComputeCallbackName.hpp"
#endif
extern "C" {
#ifndef KIM_COMPUTE_CALLBACK_NAME_H_
#include "KIM_ComputeCallbackName.h"
#endif
} // extern "C"
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_HPP_
#include "KIM_ModelComputeArguments.hpp"
#endif
extern "C" {
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_H_
#include "KIM_ModelComputeArguments.h"
#endif
} // extern "C"
struct KIM_ModelComputeArguments
{
void * p;
};
#define CONVERT_POINTER \
KIM::ModelComputeArguments * pModelComputeArguments \
= reinterpret_cast( \
modelComputeArguments->p)
namespace
{
KIM::LogVerbosity makeLogVerbosityCpp(KIM_LogVerbosity const logVerbosity)
{
return KIM::LogVerbosity(logVerbosity.logVerbosityID);
}
KIM::ComputeArgumentName
makeComputeArgumentNameCpp(KIM_ComputeArgumentName const computeArgumentName)
{
return KIM::ComputeArgumentName(computeArgumentName.computeArgumentNameID);
}
KIM::ComputeCallbackName
makeComputeCallbackNameCpp(KIM_ComputeCallbackName const computeCallbackName)
{
return KIM::ComputeCallbackName(computeCallbackName.computeCallbackNameID);
}
} // namespace
extern "C" {
int KIM_ModelComputeArguments_GetNeighborList(
KIM_ModelComputeArguments const * const modelComputeArguments,
int const neighborListIndex,
int const particleNumber,
int * const numberOfNeighbors,
int const ** const neighborsOfParticle)
{
CONVERT_POINTER;
return pModelComputeArguments->GetNeighborList(neighborListIndex,
particleNumber,
numberOfNeighbors,
neighborsOfParticle);
}
int KIM_ModelComputeArguments_ProcessDEDrTerm(
KIM_ModelComputeArguments const * const modelComputeArguments,
double const de,
double const r,
double const * const dx,
int const i,
int const j)
{
CONVERT_POINTER;
return pModelComputeArguments->ProcessDEDrTerm(de, r, dx, i, j);
}
int KIM_ModelComputeArguments_ProcessD2EDr2Term(
KIM_ModelComputeArguments const * const modelComputeArguments,
double const de,
double const * const r,
double const * const dx,
int const * const i,
int const * const j)
{
CONVERT_POINTER;
return pModelComputeArguments->ProcessD2EDr2Term(de, r, dx, i, j);
}
int KIM_ModelComputeArguments_GetArgumentPointerInteger(
KIM_ModelComputeArguments const * const modelComputeArguments,
KIM_ComputeArgumentName const computeArgumentName,
int ** const ptr)
{
CONVERT_POINTER;
return pModelComputeArguments->GetArgumentPointer(
makeComputeArgumentNameCpp(computeArgumentName), ptr);
}
int KIM_ModelComputeArguments_GetArgumentPointerDouble(
KIM_ModelComputeArguments const * const modelComputeArguments,
KIM_ComputeArgumentName const computeArgumentName,
double ** const ptr)
{
CONVERT_POINTER;
return pModelComputeArguments->GetArgumentPointer(
makeComputeArgumentNameCpp(computeArgumentName), ptr);
}
int KIM_ModelComputeArguments_IsCallbackPresent(
KIM_ModelComputeArguments const * const modelComputeArguments,
KIM_ComputeCallbackName const computeCallbackName,
int * const present)
{
CONVERT_POINTER;
KIM::ComputeCallbackName computeCallbackNameC
= makeComputeCallbackNameCpp(computeCallbackName);
return pModelComputeArguments->IsCallbackPresent(computeCallbackNameC,
present);
}
void KIM_ModelComputeArguments_SetModelBufferPointer(
KIM_ModelComputeArguments * const modelComputeArguments, void * const ptr)
{
CONVERT_POINTER;
pModelComputeArguments->SetModelBufferPointer(ptr);
}
void KIM_ModelComputeArguments_GetModelBufferPointer(
KIM_ModelComputeArguments const * const modelComputeArguments,
void ** const ptr)
{
CONVERT_POINTER;
pModelComputeArguments->GetModelBufferPointer(ptr);
}
void KIM_ModelComputeArguments_LogEntry(
KIM_ModelComputeArguments const * const modelComputeArguments,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName)
{
CONVERT_POINTER;
pModelComputeArguments->LogEntry(
makeLogVerbosityCpp(logVerbosity), message, lineNumber, fileName);
}
char const * KIM_ModelComputeArguments_ToString(
KIM_ModelComputeArguments const * const modelComputeArguments)
{
CONVERT_POINTER;
return pModelComputeArguments->ToString().c_str();
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_ModelCompute_c.cpp 0000664 0000000 0000000 00000004710 13765565573 0020770 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
extern "C" {
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
} // extern "C"
#ifndef KIM_MODEL_COMPUTE_HPP_
#include "KIM_ModelCompute.hpp"
#endif
extern "C" {
#ifndef KIM_MODEL_COMPUTE_H_
#include "KIM_ModelCompute.h"
#endif
} // extern "C"
struct KIM_ModelCompute
{
void * p;
};
#define CONVERT_POINTER \
KIM::ModelCompute * pModelCompute \
= reinterpret_cast(modelCompute->p)
namespace
{
KIM::LogVerbosity makeLogVerbosityCpp(KIM_LogVerbosity const logVerbosity)
{
return KIM::LogVerbosity(logVerbosity.logVerbosityID);
}
} // namespace
extern "C" {
void KIM_ModelCompute_GetModelBufferPointer(
KIM_ModelCompute const * const modelCompute, void ** const ptr)
{
CONVERT_POINTER;
pModelCompute->GetModelBufferPointer(ptr);
}
void KIM_ModelCompute_LogEntry(KIM_ModelCompute const * const modelCompute,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName)
{
CONVERT_POINTER;
pModelCompute->LogEntry(
makeLogVerbosityCpp(logVerbosity), message, lineNumber, fileName);
}
char const *
KIM_ModelCompute_ToString(KIM_ModelCompute const * const modelCompute)
{
CONVERT_POINTER;
return pModelCompute->ToString().c_str();
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_ModelCreate_c.cpp 0000664 0000000 0000000 00000022007 13765565573 0020556 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
extern "C" {
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
} // extern "C"
#ifndef KIM_LANGUAGE_NAME_HPP_
#include "KIM_LanguageName.hpp"
#endif
extern "C" {
#ifndef KIM_LANGUAGE_NAME_H_
#include "KIM_LanguageName.h"
#endif
} // extern "C"
#ifndef KIM_NUMBERING_HPP_
#include "KIM_Numbering.hpp"
#endif
extern "C" {
#ifndef KIM_NUMBERING_H_
#include "KIM_Numbering.h"
#endif
} // extern "C"
#ifndef KIM_MODEL_ROUTINE_NAME_HPP_
#include "KIM_ModelRoutineName.hpp"
#endif
extern "C" {
#ifndef KIM_MODEL_ROUTINE_NAME_H_
#include "KIM_ModelRoutineName.h"
#endif
} // extern "C"
#ifndef KIM_SPECIES_NAME_HPP_
#include "KIM_SpeciesName.hpp"
#endif
extern "C" {
#ifndef KIM_SPECIES_NAME_H_
#include "KIM_SpeciesName.h"
#endif
} // extern "C"
#ifndef KIM_UNIT_SYSTEM_HPP_
#include "KIM_UnitSystem.hpp"
#endif
extern "C" {
#ifndef KIM_UNIT_SYSTEM_H_
#include "KIM_UnitSystem.h"
#endif
} // extern "C"
#ifndef KIM_MODEL_CREATE_HPP_
#include "KIM_ModelCreate.hpp"
#endif
extern "C" {
#ifndef KIM_MODEL_CREATE_H_
#include "KIM_ModelCreate.h"
#endif
} // extern "C"
struct KIM_ModelCreate
{
void * p;
};
#define CONVERT_POINTER \
KIM::ModelCreate * pModelCreate \
= reinterpret_cast(modelCreate->p)
namespace
{
KIM::LogVerbosity makeLogVerbosityCpp(KIM_LogVerbosity const logVerbosity)
{
return KIM::LogVerbosity(logVerbosity.logVerbosityID);
}
KIM::Numbering makeNumberingCpp(KIM_Numbering const numbering)
{
return KIM::Numbering(numbering.numberingID);
}
KIM::LengthUnit makeLengthUnitCpp(KIM_LengthUnit const lengthUnit)
{
return KIM::LengthUnit(lengthUnit.lengthUnitID);
}
KIM::EnergyUnit makeEnergyUnitCpp(KIM_EnergyUnit const energyUnit)
{
return KIM::EnergyUnit(energyUnit.energyUnitID);
}
KIM::ChargeUnit makeChargeUnitCpp(KIM_ChargeUnit const chargeUnit)
{
return KIM::ChargeUnit(chargeUnit.chargeUnitID);
}
KIM::TemperatureUnit
makeTemperatureUnitCpp(KIM_TemperatureUnit const temperatureUnit)
{
return KIM::TemperatureUnit(temperatureUnit.temperatureUnitID);
}
KIM::TimeUnit makeTimeUnitCpp(KIM_TimeUnit const timeUnit)
{
return KIM::TimeUnit(timeUnit.timeUnitID);
}
KIM::LanguageName makeLanguageNameCpp(KIM_LanguageName const languageName)
{
return KIM::LanguageName(languageName.languageNameID);
}
KIM::ModelRoutineName
makeRoutineNameCpp(KIM_ModelRoutineName const modelRoutineName)
{
return KIM::ModelRoutineName(modelRoutineName.modelRoutineNameID);
}
KIM::SpeciesName makeSpecNameCpp(KIM_SpeciesName const speciesName)
{
return KIM::SpeciesName(speciesName.speciesNameID);
}
} // namespace
extern "C" {
int KIM_ModelCreate_SetModelNumbering(KIM_ModelCreate * const modelCreate,
KIM_Numbering const numbering)
{
CONVERT_POINTER;
return pModelCreate->SetModelNumbering(makeNumberingCpp(numbering));
}
void KIM_ModelCreate_SetInfluenceDistancePointer(
KIM_ModelCreate * const modelCreate, double const * const influenceDistance)
{
CONVERT_POINTER;
pModelCreate->SetInfluenceDistancePointer(influenceDistance);
}
void KIM_ModelCreate_SetNeighborListPointers(
KIM_ModelCreate * const modelCreate,
int const numberOfNeighborLists,
double const * const cutoffs,
int const * const modelWillNotRequestNeighborsOfNoncontributingParticles)
{
CONVERT_POINTER;
pModelCreate->SetNeighborListPointers(
numberOfNeighborLists,
cutoffs,
modelWillNotRequestNeighborsOfNoncontributingParticles);
}
int KIM_ModelCreate_SetRoutinePointer(
KIM_ModelCreate * const modelCreate,
KIM_ModelRoutineName const modelRoutineName,
KIM_LanguageName const languageName,
int const required,
KIM_Function * const fptr)
{
CONVERT_POINTER;
KIM::ModelRoutineName routN = makeRoutineNameCpp(modelRoutineName);
KIM::LanguageName langN = makeLanguageNameCpp(languageName);
return pModelCreate->SetRoutinePointer(
routN, langN, required, reinterpret_cast(fptr));
}
int KIM_ModelCreate_SetSpeciesCode(KIM_ModelCreate * const modelCreate,
KIM_SpeciesName const speciesName,
int const code)
{
CONVERT_POINTER;
return pModelCreate->SetSpeciesCode(makeSpecNameCpp(speciesName), code);
}
int KIM_ModelCreate_SetParameterPointerInteger(
KIM_ModelCreate * const modelCreate,
int const extent,
int * const ptr,
char const * const name,
char const * const description)
{
CONVERT_POINTER;
return pModelCreate->SetParameterPointer(extent, ptr, name, description);
}
int KIM_ModelCreate_SetParameterPointerDouble(
KIM_ModelCreate * const modelCreate,
int const extent,
double * const ptr,
char const * const name,
char const * const description)
{
CONVERT_POINTER;
return pModelCreate->SetParameterPointer(extent, ptr, name, description);
}
void KIM_ModelCreate_SetModelBufferPointer(KIM_ModelCreate * const modelCreate,
void * const ptr)
{
CONVERT_POINTER;
pModelCreate->SetModelBufferPointer(ptr);
}
int KIM_ModelCreate_SetUnits(KIM_ModelCreate * const modelCreate,
KIM_LengthUnit const lengthUnit,
KIM_EnergyUnit const energyUnit,
KIM_ChargeUnit const chargeUnit,
KIM_TemperatureUnit const temperatureUnit,
KIM_TimeUnit const timeUnit)
{
CONVERT_POINTER;
KIM::LengthUnit lengthU = makeLengthUnitCpp(lengthUnit);
KIM::EnergyUnit energyU = makeEnergyUnitCpp(energyUnit);
KIM::ChargeUnit chargeU = makeChargeUnitCpp(chargeUnit);
KIM::TemperatureUnit temperatureU = makeTemperatureUnitCpp(temperatureUnit);
KIM::TimeUnit timeU = makeTimeUnitCpp(timeUnit);
return pModelCreate->SetUnits(lengthU, energyU, chargeU, temperatureU, timeU);
}
int KIM_ModelCreate_ConvertUnit(KIM_LengthUnit const fromLengthUnit,
KIM_EnergyUnit const fromEnergyUnit,
KIM_ChargeUnit const fromChargeUnit,
KIM_TemperatureUnit const fromTemperatureUnit,
KIM_TimeUnit const fromTimeUnit,
KIM_LengthUnit const toLengthUnit,
KIM_EnergyUnit const toEnergyUnit,
KIM_ChargeUnit const toChargeUnit,
KIM_TemperatureUnit const toTemperatureUnit,
KIM_TimeUnit const toTimeUnit,
double const lengthExponent,
double const energyExponent,
double const chargeExponent,
double const temperatureExponent,
double const timeExponent,
double * const conversionFactor)
{
return KIM::ModelCreate::ConvertUnit(
makeLengthUnitCpp(fromLengthUnit),
makeEnergyUnitCpp(fromEnergyUnit),
makeChargeUnitCpp(fromChargeUnit),
makeTemperatureUnitCpp(fromTemperatureUnit),
makeTimeUnitCpp(fromTimeUnit),
makeLengthUnitCpp(toLengthUnit),
makeEnergyUnitCpp(toEnergyUnit),
makeChargeUnitCpp(toChargeUnit),
makeTemperatureUnitCpp(toTemperatureUnit),
makeTimeUnitCpp(toTimeUnit),
lengthExponent,
energyExponent,
chargeExponent,
temperatureExponent,
timeExponent,
conversionFactor);
}
void KIM_ModelCreate_LogEntry(KIM_ModelCreate const * const modelCreate,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName)
{
CONVERT_POINTER;
pModelCreate->LogEntry(
makeLogVerbosityCpp(logVerbosity), message, lineNumber, fileName);
}
char const * KIM_ModelCreate_ToString(KIM_ModelCreate const * const modelCreate)
{
CONVERT_POINTER;
return pModelCreate->ToString().c_str();
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_ModelDestroy_c.cpp 0000664 0000000 0000000 00000004707 13765565573 0021013 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
extern "C" {
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
} // extern "C"
#ifndef KIM_MODEL_DESTROY_HPP_
#include "KIM_ModelDestroy.hpp"
#endif
extern "C" {
#ifndef KIM_MODEL_DESTROY_H_
#include "KIM_ModelDestroy.h"
#endif
} // extern "C"
struct KIM_ModelDestroy
{
void * p;
};
#define CONVERT_POINTER \
KIM::ModelDestroy * pModelDestroy \
= reinterpret_cast(modelDestroy->p)
namespace
{
KIM::LogVerbosity makeLogVerbosityCpp(KIM_LogVerbosity const logVerbosity)
{
return KIM::LogVerbosity(logVerbosity.logVerbosityID);
}
} // namespace
extern "C" {
void KIM_ModelDestroy_GetModelBufferPointer(
KIM_ModelDestroy const * const modelDestroy, void ** const ptr)
{
CONVERT_POINTER;
pModelDestroy->GetModelBufferPointer(ptr);
}
void KIM_ModelDestroy_LogEntry(KIM_ModelDestroy const * const modelDestroy,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName)
{
CONVERT_POINTER;
pModelDestroy->LogEntry(
makeLogVerbosityCpp(logVerbosity), message, lineNumber, fileName);
}
char const *
KIM_ModelDestroy_ToString(KIM_ModelDestroy const * const modelDestroy)
{
CONVERT_POINTER;
return pModelDestroy->ToString().c_str();
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_ModelDriverCreate_c.cpp 0000664 0000000 0000000 00000024507 13765565573 0021741 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#include
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
extern "C" {
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
} // extern "C"
#ifndef KIM_LANGUAGE_NAME_HPP_
#include "KIM_LanguageName.hpp"
#endif
extern "C" {
#ifndef KIM_LANGUAGE_NAME_H_
#include "KIM_LanguageName.h"
#endif
} // extern "C"
#ifndef KIM_NUMBERING_HPP_
#include "KIM_Numbering.hpp"
#endif
extern "C" {
#ifndef KIM_NUMBERING_H_
#include "KIM_Numbering.h"
#endif
} // extern "C"
#ifndef KIM_MODEL_ROUTINE_NAME_HPP_
#include "KIM_ModelRoutineName.hpp"
#endif
extern "C" {
#ifndef KIM_MODEL_ROUTINE_NAME_H_
#include "KIM_ModelRoutineName.h"
#endif
} // extern "C"
#ifndef KIM_SPECIES_NAME_HPP_
#include "KIM_SpeciesName.hpp"
#endif
extern "C" {
#ifndef KIM_SPECIES_NAME_H_
#include "KIM_SpeciesName.h"
#endif
} // extern "C"
#ifndef KIM_UNIT_SYSTEM_HPP_
#include "KIM_UnitSystem.hpp"
#endif
extern "C" {
#ifndef KIM_UNIT_SYSTEM_H_
#include "KIM_UnitSystem.h"
#endif
} // extern "C"
#ifndef KIM_MODEL_DRIVER_CREATE_HPP_
#include "KIM_ModelDriverCreate.hpp"
#endif
extern "C" {
#ifndef KIM_MODEL_DRIVER_CREATE_H_
#include "KIM_ModelDriverCreate.h"
#endif
} // extern "C"
struct KIM_ModelDriverCreate
{
void * p;
};
#define CONVERT_POINTER \
KIM::ModelDriverCreate * pModelDriverCreate \
= reinterpret_cast(modelDriverCreate->p)
namespace
{
KIM::LogVerbosity makeLogVerbosityCpp(KIM_LogVerbosity const logVerbosity)
{
return KIM::LogVerbosity(logVerbosity.logVerbosityID);
}
KIM::Numbering makeNumberingCpp(KIM_Numbering const numbering)
{
return KIM::Numbering(numbering.numberingID);
}
KIM::LengthUnit makeLengthUnitCpp(KIM_LengthUnit const lengthUnit)
{
return KIM::LengthUnit(lengthUnit.lengthUnitID);
}
KIM::EnergyUnit makeEnergyUnitCpp(KIM_EnergyUnit const energyUnit)
{
return KIM::EnergyUnit(energyUnit.energyUnitID);
}
KIM::ChargeUnit makeChargeUnitCpp(KIM_ChargeUnit const chargeUnit)
{
return KIM::ChargeUnit(chargeUnit.chargeUnitID);
}
KIM::TemperatureUnit
makeTemperatureUnitCpp(KIM_TemperatureUnit const temperatureUnit)
{
return KIM::TemperatureUnit(temperatureUnit.temperatureUnitID);
}
KIM::TimeUnit makeTimeUnitCpp(KIM_TimeUnit const timeUnit)
{
return KIM::TimeUnit(timeUnit.timeUnitID);
}
KIM::LanguageName makeLanguageNameCpp(KIM_LanguageName const languageName)
{
return KIM::LanguageName(languageName.languageNameID);
}
KIM::ModelRoutineName
makeRoutineNameCpp(KIM_ModelRoutineName const modelRoutineName)
{
return KIM::ModelRoutineName(modelRoutineName.modelRoutineNameID);
}
KIM::SpeciesName makeSpeciesNameCpp(KIM_SpeciesName const speciesName)
{
return KIM::SpeciesName(speciesName.speciesNameID);
}
} // namespace
extern "C" {
void KIM_ModelDriverCreate_GetParameterFileDirectoryName(
KIM_ModelDriverCreate const * const modelDriverCreate,
char const ** const directoryName)
{
CONVERT_POINTER;
std::string const * pStr = NULL;
pModelDriverCreate->GetParameterFileDirectoryName(&pStr);
*directoryName = pStr->c_str();
}
void KIM_ModelDriverCreate_GetNumberOfParameterFiles(
KIM_ModelDriverCreate const * const modelDriverCreate,
int * const numberOfParameterFiles)
{
CONVERT_POINTER;
pModelDriverCreate->GetNumberOfParameterFiles(numberOfParameterFiles);
}
int KIM_ModelDriverCreate_GetParameterFileName(
KIM_ModelDriverCreate const * const modelDriverCreate,
int const index,
char const ** const parameterFileName)
{
CONVERT_POINTER;
std::string const * pStr;
std::string const ** ppStr;
if (parameterFileName == NULL)
ppStr = NULL;
else
ppStr = &pStr;
int error = pModelDriverCreate->GetParameterFileName(index, ppStr);
if (error)
return true;
else
{
if (parameterFileName != NULL) *parameterFileName = pStr->c_str();
return false;
}
}
int KIM_ModelDriverCreate_GetParameterFileBasename(
KIM_ModelDriverCreate const * const modelDriverCreate,
int const index,
char const ** const parameterFileBasename)
{
CONVERT_POINTER;
std::string const * pStr;
std::string const ** ppStr;
if (parameterFileBasename == NULL)
ppStr = NULL;
else
ppStr = &pStr;
int error = pModelDriverCreate->GetParameterFileBasename(index, ppStr);
if (error)
return true;
else
{
if (parameterFileBasename != NULL) *parameterFileBasename = pStr->c_str();
return false;
}
}
int KIM_ModelDriverCreate_SetModelNumbering(
KIM_ModelDriverCreate * const modelDriverCreate,
KIM_Numbering const numbering)
{
CONVERT_POINTER;
return pModelDriverCreate->SetModelNumbering(makeNumberingCpp(numbering));
}
void KIM_ModelDriverCreate_SetInfluenceDistancePointer(
KIM_ModelDriverCreate * const modelDriverCreate,
double const * const influenceDistance)
{
CONVERT_POINTER;
pModelDriverCreate->SetInfluenceDistancePointer(influenceDistance);
}
void KIM_ModelDriverCreate_SetNeighborListPointers(
KIM_ModelDriverCreate * const modelDriverCreate,
int const numberOfNeighborLists,
double const * const cutoffs,
int const * const modelWillNotRequestNeighborsOfNoncontributingParticles)
{
CONVERT_POINTER;
pModelDriverCreate->SetNeighborListPointers(
numberOfNeighborLists,
cutoffs,
modelWillNotRequestNeighborsOfNoncontributingParticles);
}
int KIM_ModelDriverCreate_SetRoutinePointer(
KIM_ModelDriverCreate * const modelDriverCreate,
KIM_ModelRoutineName const modelRoutineName,
KIM_LanguageName const languageName,
int const required,
KIM_Function * const fptr)
{
CONVERT_POINTER;
KIM::ModelRoutineName routN = makeRoutineNameCpp(modelRoutineName);
KIM::LanguageName langN = makeLanguageNameCpp(languageName);
return pModelDriverCreate->SetRoutinePointer(
routN, langN, required, reinterpret_cast(fptr));
}
int KIM_ModelDriverCreate_SetSpeciesCode(
KIM_ModelDriverCreate * const modelDriverCreate,
KIM_SpeciesName const speciesName,
int const code)
{
CONVERT_POINTER;
return pModelDriverCreate->SetSpeciesCode(makeSpeciesNameCpp(speciesName),
code);
}
int KIM_ModelDriverCreate_SetParameterPointerInteger(
KIM_ModelDriverCreate * const modelDriverCreate,
int const extent,
int * const ptr,
char const * const name,
char const * const description)
{
CONVERT_POINTER;
return pModelDriverCreate->SetParameterPointer(
extent, ptr, name, description);
}
int KIM_ModelDriverCreate_SetParameterPointerDouble(
KIM_ModelDriverCreate * const modelDriverCreate,
int const extent,
double * const ptr,
char const * const name,
char const * const description)
{
CONVERT_POINTER;
return pModelDriverCreate->SetParameterPointer(
extent, ptr, name, description);
}
void KIM_ModelDriverCreate_SetModelBufferPointer(
KIM_ModelDriverCreate * const modelDriverCreate, void * const ptr)
{
CONVERT_POINTER;
pModelDriverCreate->SetModelBufferPointer(ptr);
}
int KIM_ModelDriverCreate_SetUnits(
KIM_ModelDriverCreate * const modelDriverCreate,
KIM_LengthUnit const lengthUnit,
KIM_EnergyUnit const energyUnit,
KIM_ChargeUnit const chargeUnit,
KIM_TemperatureUnit const temperatureUnit,
KIM_TimeUnit const timeUnit)
{
CONVERT_POINTER;
KIM::LengthUnit lengthU = makeLengthUnitCpp(lengthUnit);
KIM::EnergyUnit energyU = makeEnergyUnitCpp(energyUnit);
KIM::ChargeUnit chargeU = makeChargeUnitCpp(chargeUnit);
KIM::TemperatureUnit temperatureU = makeTemperatureUnitCpp(temperatureUnit);
KIM::TimeUnit timeU = makeTimeUnitCpp(timeUnit);
return pModelDriverCreate->SetUnits(
lengthU, energyU, chargeU, temperatureU, timeU);
}
int KIM_ModelDriverCreate_ConvertUnit(
KIM_LengthUnit const fromLengthUnit,
KIM_EnergyUnit const fromEnergyUnit,
KIM_ChargeUnit const fromChargeUnit,
KIM_TemperatureUnit const fromTemperatureUnit,
KIM_TimeUnit const fromTimeUnit,
KIM_LengthUnit const toLengthUnit,
KIM_EnergyUnit const toEnergyUnit,
KIM_ChargeUnit const toChargeUnit,
KIM_TemperatureUnit const toTemperatureUnit,
KIM_TimeUnit const toTimeUnit,
double const lengthExponent,
double const energyExponent,
double const chargeExponent,
double const temperatureExponent,
double const timeExponent,
double * const conversionFactor)
{
return KIM::ModelDriverCreate::ConvertUnit(
makeLengthUnitCpp(fromLengthUnit),
makeEnergyUnitCpp(fromEnergyUnit),
makeChargeUnitCpp(fromChargeUnit),
makeTemperatureUnitCpp(fromTemperatureUnit),
makeTimeUnitCpp(fromTimeUnit),
makeLengthUnitCpp(toLengthUnit),
makeEnergyUnitCpp(toEnergyUnit),
makeChargeUnitCpp(toChargeUnit),
makeTemperatureUnitCpp(toTemperatureUnit),
makeTimeUnitCpp(toTimeUnit),
lengthExponent,
energyExponent,
chargeExponent,
temperatureExponent,
timeExponent,
conversionFactor);
}
void KIM_ModelDriverCreate_LogEntry(
KIM_ModelDriverCreate const * const modelDriverCreate,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName)
{
CONVERT_POINTER;
pModelDriverCreate->LogEntry(
makeLogVerbosityCpp(logVerbosity), message, lineNumber, fileName);
}
char const * KIM_ModelDriverCreate_ToString(
KIM_ModelDriverCreate const * const modelDriverCreate)
{
CONVERT_POINTER;
return pModelDriverCreate->ToString().c_str();
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_ModelExtension_c.cpp 0000664 0000000 0000000 00000011466 13765565573 0021336 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
extern "C" {
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
} // extern "C"
#ifndef KIM_MODEL_EXTENSION_HPP_
#include "KIM_ModelExtension.hpp"
#endif
extern "C" {
#ifndef KIM_MODEL_EXTENSION_H_
#include "KIM_ModelExtension.h"
#endif
} // extern "C"
struct KIM_ModelExtension
{
void * p;
};
#define CONVERT_POINTER \
KIM::ModelExtension * pModelExtension \
= reinterpret_cast(modelExtension->p)
namespace
{
KIM::LogVerbosity makeLogVerbosityCpp(KIM_LogVerbosity const logVerbosity)
{
return KIM::LogVerbosity(logVerbosity.logVerbosityID);
}
} // namespace
extern "C" {
void KIM_ModelExtension_GetExtensionID(
KIM_ModelExtension const * const modelExtension,
char const ** const extensionID)
{
CONVERT_POINTER;
std::string const * pStrExtensionID;
pModelExtension->GetExtensionID(&pStrExtensionID);
*extensionID = pStrExtensionID->c_str();
}
KIM_Model *
KIM_ModelExtension_ToModel(KIM_ModelExtension * const modelExtension)
{
return reinterpret_cast(modelExtension);
}
KIM_ModelCompute *
KIM_ModelExtension_ToModelCompute(KIM_ModelExtension * const modelExtension)
{
return reinterpret_cast(modelExtension);
}
KIM_ModelCreate *
KIM_ModelExtension_ToModelCreate(KIM_ModelExtension * const modelExtension)
{
return reinterpret_cast(modelExtension);
}
KIM_ModelDestroy *
KIM_ModelExtension_ToModelDestroy(KIM_ModelExtension * const modelExtension)
{
return reinterpret_cast(modelExtension);
}
KIM_ModelDriverCreate * KIM_ModelExtension_ToModelDriverCreate(
KIM_ModelExtension * const modelExtension)
{
return reinterpret_cast(modelExtension);
}
KIM_ModelRefresh *
KIM_ModelExtension_ToModelRefresh(KIM_ModelExtension * const modelExtension)
{
return reinterpret_cast(modelExtension);
}
KIM_ModelWriteParameterizedModel *
KIM_ModelExtension_ToModelWriteParameterizedModel(
KIM_ModelExtension * const modelExtension)
{
return reinterpret_cast(modelExtension);
}
KIM_ModelComputeArguments * KIM_ModelExtension_ToModelComputeArguments(
KIM_ModelExtension const * const modelExtension,
KIM_ComputeArguments * const computeArguments)
{
(void) modelExtension; // Avoid unused parameter warning
return reinterpret_cast(computeArguments);
}
KIM_ModelComputeArgumentsCreate *
KIM_ModelExtension_ToModelComputeArgumentsCreate(
KIM_ModelExtension const * const modelExtension,
KIM_ComputeArguments * const computeArguments)
{
(void) modelExtension; // Avoid unused parameter warning
return reinterpret_cast(computeArguments);
}
KIM_ModelComputeArgumentsDestroy *
KIM_ModelExtension_ToModelComputeArgumentsDestroy(
KIM_ModelExtension const * const modelExtension,
KIM_ComputeArguments * const computeArguments)
{
(void) modelExtension; // Avoid unused parameter warning
return reinterpret_cast(computeArguments);
}
void KIM_ModelExtension_GetModelBufferPointer(
KIM_ModelExtension const * const modelExtension, void ** const ptr)
{
CONVERT_POINTER;
pModelExtension->GetModelBufferPointer(ptr);
}
void KIM_ModelExtension_LogEntry(
KIM_ModelExtension const * const modelExtension,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName)
{
CONVERT_POINTER;
pModelExtension->LogEntry(
makeLogVerbosityCpp(logVerbosity), message, lineNumber, fileName);
}
char const *
KIM_ModelExtension_ToString(KIM_ModelExtension const * const modelExtension)
{
CONVERT_POINTER;
return pModelExtension->ToString().c_str();
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_ModelRefresh_c.cpp 0000664 0000000 0000000 00000006110 13765565573 0020746 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
extern "C" {
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
} // extern "C"
#ifndef KIM_MODEL_REFRESH_HPP_
#include "KIM_ModelRefresh.hpp"
#endif
extern "C" {
#ifndef KIM_MODEL_REFRESH_H_
#include "KIM_ModelRefresh.h"
#endif
} // extern "C"
struct KIM_ModelRefresh
{
void * p;
};
#define CONVERT_POINTER \
KIM::ModelRefresh * pModelRefresh \
= reinterpret_cast(modelRefresh->p)
namespace
{
KIM::LogVerbosity makeLogVerbosityCpp(KIM_LogVerbosity const logVerbosity)
{
return KIM::LogVerbosity(logVerbosity.logVerbosityID);
}
} // namespace
extern "C" {
void KIM_ModelRefresh_SetInfluenceDistancePointer(
KIM_ModelRefresh * const modelRefresh,
double const * const influenceDistance)
{
CONVERT_POINTER;
pModelRefresh->SetInfluenceDistancePointer(influenceDistance);
}
void KIM_ModelRefresh_SetNeighborListPointers(
KIM_ModelRefresh * const modelRefresh,
int const numberOfNeighborLists,
double const * const cutoffs,
int const * const modelWillNotRequestNeighborsOfNoncontributingParticles)
{
CONVERT_POINTER;
pModelRefresh->SetNeighborListPointers(
numberOfNeighborLists,
cutoffs,
modelWillNotRequestNeighborsOfNoncontributingParticles);
}
void KIM_ModelRefresh_GetModelBufferPointer(
KIM_ModelRefresh const * const modelRefresh, void ** const ptr)
{
CONVERT_POINTER;
pModelRefresh->GetModelBufferPointer(ptr);
}
void KIM_ModelRefresh_LogEntry(KIM_ModelRefresh const * const modelRefresh,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName)
{
CONVERT_POINTER;
pModelRefresh->LogEntry(
makeLogVerbosityCpp(logVerbosity), message, lineNumber, fileName);
}
char const *
KIM_ModelRefresh_ToString(KIM_ModelRefresh const * const modelRefresh)
{
CONVERT_POINTER;
return pModelRefresh->ToString().c_str();
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_ModelRoutineName_c.cpp 0000664 0000000 0000000 00000007604 13765565573 0021607 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common
// Development and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name
// LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner].
// All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_MODEL_ROUTINE_NAME_HPP_
#include "KIM_ModelRoutineName.hpp"
#endif
extern "C" {
#ifndef KIM_MODEL_ROUTINE_NAME_H_
#include "KIM_ModelRoutineName.h"
#endif
} // extern "C"
namespace
{
KIM::ModelRoutineName
makeModelRoutineNameCpp(KIM_ModelRoutineName const modelRoutineName)
{
KIM::ModelRoutineName const * const modelRoutineNameCpp
= reinterpret_cast(&modelRoutineName);
return *modelRoutineNameCpp;
}
KIM_ModelRoutineName
makeModelRoutineNameC(KIM::ModelRoutineName const modelRoutineName)
{
KIM_ModelRoutineName const * const modelRoutineNameC
= reinterpret_cast(&modelRoutineName);
return *modelRoutineNameC;
}
} // namespace
extern "C" {
KIM_ModelRoutineName KIM_ModelRoutineName_FromString(char const * const str)
{
return makeModelRoutineNameC(KIM::ModelRoutineName(std::string(str)));
}
int KIM_ModelRoutineName_Known(KIM_ModelRoutineName const modelRoutineName)
{
return makeModelRoutineNameCpp(modelRoutineName).Known();
}
int KIM_ModelRoutineName_Equal(KIM_ModelRoutineName const lhs,
KIM_ModelRoutineName const rhs)
{
return (lhs.modelRoutineNameID == rhs.modelRoutineNameID);
}
int KIM_ModelRoutineName_NotEqual(KIM_ModelRoutineName const lhs,
KIM_ModelRoutineName const rhs)
{
return (!KIM_ModelRoutineName_Equal(lhs, rhs));
}
char const *
KIM_ModelRoutineName_ToString(KIM_ModelRoutineName modelRoutineName)
{
return makeModelRoutineNameCpp(modelRoutineName).ToString().c_str();
}
// Order doesn't matter as long as all values are unique
#include "KIM_ModelRoutineName.inc"
KIM_ModelRoutineName const KIM_MODEL_ROUTINE_NAME_Create = {ID_Create};
KIM_ModelRoutineName const KIM_MODEL_ROUTINE_NAME_ComputeArgumentsCreate
= {ID_ComputeArgumentsCreate};
KIM_ModelRoutineName const KIM_MODEL_ROUTINE_NAME_Compute = {ID_Compute};
KIM_ModelRoutineName const KIM_MODEL_ROUTINE_NAME_Extension = {ID_Extension};
KIM_ModelRoutineName const KIM_MODEL_ROUTINE_NAME_Refresh = {ID_Refresh};
KIM_ModelRoutineName const KIM_MODEL_ROUTINE_NAME_WriteParameterizedModel
= {ID_WriteParameterizedModel};
KIM_ModelRoutineName const KIM_MODEL_ROUTINE_NAME_ComputeArgumentsDestroy
= {ID_ComputeArgumentsDestroy};
KIM_ModelRoutineName const KIM_MODEL_ROUTINE_NAME_Destroy = {ID_Destroy};
void KIM_MODEL_ROUTINE_NAME_GetNumberOfModelRoutineNames(
int * const numberOfModelRoutineNames)
{
KIM::MODEL_ROUTINE_NAME::GetNumberOfModelRoutineNames(
numberOfModelRoutineNames);
}
int KIM_MODEL_ROUTINE_NAME_GetModelRoutineName(
int const index, KIM_ModelRoutineName * const modelRoutineName)
{
KIM::ModelRoutineName modelRoutineNameCpp;
int error = KIM::MODEL_ROUTINE_NAME::GetModelRoutineName(
index, &modelRoutineNameCpp);
if (error) return error;
*modelRoutineName = makeModelRoutineNameC(modelRoutineNameCpp);
return false;
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_ModelWriteParameterizedModel_c.cpp 0000664 0000000 0000000 00000007155 13765565573 0024152 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
extern "C" {
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
} // extern "C"
#ifndef KIM_MODEL_WRITE_PARAMETERIZED_MODEL_HPP_
#include "KIM_ModelWriteParameterizedModel.hpp"
#endif
extern "C" {
#ifndef KIM_MODEL_WRITE_PARAMETERIZED_MODEL_H_
#include "KIM_ModelWriteParameterizedModel.h"
#endif
} // extern "C"
struct KIM_ModelWriteParameterizedModel
{
void * p;
};
#define CONVERT_POINTER \
KIM::ModelWriteParameterizedModel * pModelWriteParameterizedModel \
= reinterpret_cast( \
modelWriteParameterizedModel->p)
namespace
{
KIM::LogVerbosity makeLogVerbosityCpp(KIM_LogVerbosity const logVerbosity)
{
return KIM::LogVerbosity(logVerbosity.logVerbosityID);
}
} // namespace
extern "C" {
void KIM_ModelWriteParameterizedModel_GetPath(
KIM_ModelWriteParameterizedModel const * const modelWriteParameterizedModel,
char const ** const path)
{
CONVERT_POINTER;
std::string const * pStrPath;
pModelWriteParameterizedModel->GetPath(&pStrPath);
*path = pStrPath->c_str();
}
void KIM_ModelWriteParameterizedModel_GetModelName(
KIM_ModelWriteParameterizedModel const * const modelWriteParameterizedModel,
char const ** const modelName)
{
CONVERT_POINTER;
std::string const * pStrModelName;
pModelWriteParameterizedModel->GetModelName(&pStrModelName);
*modelName = pStrModelName->c_str();
}
void KIM_ModelWriteParameterizedModel_SetParameterFileName(
KIM_ModelWriteParameterizedModel const * const modelWriteParameterizedModel,
char const * const fileName)
{
CONVERT_POINTER;
pModelWriteParameterizedModel->SetParameterFileName(fileName);
}
void KIM_ModelWriteParameterizedModel_GetModelBufferPointer(
KIM_ModelWriteParameterizedModel const * const modelWriteParameterizedModel,
void ** const ptr)
{
CONVERT_POINTER;
pModelWriteParameterizedModel->GetModelBufferPointer(ptr);
}
void KIM_ModelWriteParameterizedModel_LogEntry(
KIM_ModelWriteParameterizedModel const * const modelWriteParameterizedModel,
KIM_LogVerbosity const logVerbosity,
char const * const message,
int const lineNumber,
char const * const fileName)
{
CONVERT_POINTER;
pModelWriteParameterizedModel->LogEntry(
makeLogVerbosityCpp(logVerbosity), message, lineNumber, fileName);
}
char const * KIM_ModelWriteParameterizedModel_ToString(
KIM_ModelWriteParameterizedModel const * const modelWriteParameterizedModel)
{
CONVERT_POINTER;
return pModelWriteParameterizedModel->ToString().c_str();
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_Model_c.cpp 0000664 0000000 0000000 00000031325 13765565573 0017435 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#include
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
extern "C" {
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
} // extern "C"
#ifndef KIM_DATA_TYPE_HPP_
#include "KIM_DataType.hpp"
#endif
extern "C" {
#ifndef KIM_DATA_TYPE_H_
#include "KIM_DataType.h"
#endif
} // extern "C"
#ifndef KIM_MODEL_ROUTINE_NAME_HPP_
#include "KIM_ModelRoutineName.hpp"
#endif
extern "C" {
#ifndef KIM_MODEL_ROUTINE_NAME_H_
#include "KIM_ModelRoutineName.h"
#endif
} // extern "C"
#ifndef KIM_SPECIES_NAME_HPP_
#include "KIM_SpeciesName.hpp"
#endif
extern "C" {
#ifndef KIM_SPECIES_NAME_H_
#include "KIM_SpeciesName.h"
#endif
} // extern "C"
#ifndef KIM_NUMBERING_HPP_
#include "KIM_Numbering.hpp"
#endif
extern "C" {
#ifndef KIM_NUMBERING_H_
#include "KIM_Numbering.h"
#endif
} // extern "C"
#ifndef KIM_UNIT_SYSTEM_HPP_
#include "KIM_UnitSystem.hpp"
#endif
extern "C" {
#ifndef KIM_UNIT_SYSTEM_H_
#include "KIM_UnitSystem.h"
#endif
} // extern "C"
#ifndef KIM_MODEL_HPP_
#include "KIM_Model.hpp"
#endif
extern "C" {
#ifndef KIM_MODEL_H_
#include "KIM_Model.h"
#endif
} // extern "C"
namespace KIM
{
// Forward declarations
class ComputeArguments;
} // namespace KIM
struct KIM_ComputeArguments
{
void * p;
};
struct KIM_Model
{
void * p;
};
#define CONVERT_POINTER \
KIM::Model * pModel = reinterpret_cast(model->p)
namespace
{
KIM_DataType makeDataTypeC(KIM::DataType const dataType)
{
KIM_DataType typ;
KIM_DataType * pTyp = (KIM_DataType *) &dataType;
typ.dataTypeID = pTyp->dataTypeID;
return typ;
}
KIM::ModelRoutineName
makeRoutineNameCpp(KIM_ModelRoutineName const modelRoutineName)
{
return KIM::ModelRoutineName(modelRoutineName.modelRoutineNameID);
}
KIM::SpeciesName makeSpecNameCpp(KIM_SpeciesName const speciesName)
{
return KIM::SpeciesName(speciesName.speciesNameID);
}
KIM::LengthUnit makeLengthUnitCpp(KIM_LengthUnit lengthUnit)
{
return KIM::LengthUnit(lengthUnit.lengthUnitID);
}
KIM::EnergyUnit makeEnergyUnitCpp(KIM_EnergyUnit energyUnit)
{
return KIM::EnergyUnit(energyUnit.energyUnitID);
}
KIM::ChargeUnit makeChargeUnitCpp(KIM_ChargeUnit chargeUnit)
{
return KIM::ChargeUnit(chargeUnit.chargeUnitID);
}
KIM::TemperatureUnit makeTemperatureUnitCpp(KIM_TemperatureUnit temperatureUnit)
{
return KIM::TemperatureUnit(temperatureUnit.temperatureUnitID);
}
KIM::TimeUnit makeTimeUnitCpp(KIM_TimeUnit timeUnit)
{
return KIM::TimeUnit(timeUnit.timeUnitID);
}
KIM::Numbering makeNumberingCpp(KIM_Numbering numbering)
{
return KIM::Numbering(numbering.numberingID);
}
KIM::LogVerbosity makeLogVerbosityCpp(KIM_LogVerbosity logVerbosity)
{
return KIM::LogVerbosity(logVerbosity.logVerbosityID);
}
} // namespace
extern "C" {
int KIM_Model_Create(KIM_Numbering const numbering,
KIM_LengthUnit const requestedLengthUnit,
KIM_EnergyUnit const requestedEnergyUnit,
KIM_ChargeUnit const requestedChargeUnit,
KIM_TemperatureUnit const requestedTemperatureUnit,
KIM_TimeUnit const requestedTimeUnit,
char const * const modelName,
int * const requestedUnitsAccepted,
KIM_Model ** const model)
{
std::string modelNameC(modelName);
KIM::Model * pModel;
int error
= KIM::Model::Create(makeNumberingCpp(numbering),
makeLengthUnitCpp(requestedLengthUnit),
makeEnergyUnitCpp(requestedEnergyUnit),
makeChargeUnitCpp(requestedChargeUnit),
makeTemperatureUnitCpp(requestedTemperatureUnit),
makeTimeUnitCpp(requestedTimeUnit),
modelNameC,
requestedUnitsAccepted,
&pModel);
if (error)
{
*model = NULL;
return true;
}
else
{
(*model) = new KIM_Model;
(*model)->p = (void *) pModel;
return false;
}
}
void KIM_Model_Destroy(KIM_Model ** const model)
{
if (*model != NULL)
{
KIM::Model * pModel = reinterpret_cast((*model)->p);
KIM::Model::Destroy(&pModel);
}
delete (*model);
*model = NULL;
}
int KIM_Model_IsRoutinePresent(KIM_Model const * const model,
KIM_ModelRoutineName const modelRoutineName,
int * const present,
int * const required)
{
CONVERT_POINTER;
return pModel->IsRoutinePresent(
makeRoutineNameCpp(modelRoutineName), present, required);
}
void KIM_Model_GetInfluenceDistance(KIM_Model const * const model,
double * const influenceDistance)
{
CONVERT_POINTER;
pModel->GetInfluenceDistance(influenceDistance);
}
void KIM_Model_GetNeighborListPointers(
KIM_Model const * const model,
int * const numberOfNeighborLists,
double const ** const cutoffs,
int const ** const modelWillNotRequestNeighborsOfNoncontributingParticles)
{
CONVERT_POINTER;
pModel->GetNeighborListPointers(
numberOfNeighborLists,
cutoffs,
modelWillNotRequestNeighborsOfNoncontributingParticles);
}
void KIM_Model_GetUnits(KIM_Model const * const model,
KIM_LengthUnit * const lengthUnit,
KIM_EnergyUnit * const energyUnit,
KIM_ChargeUnit * const chargeUnit,
KIM_TemperatureUnit * const temperatureUnit,
KIM_TimeUnit * const timeUnit)
{
CONVERT_POINTER;
pModel->GetUnits(reinterpret_cast(lengthUnit),
reinterpret_cast(energyUnit),
reinterpret_cast(chargeUnit),
reinterpret_cast(temperatureUnit),
reinterpret_cast(timeUnit));
}
int KIM_Model_ComputeArgumentsCreate(
KIM_Model const * const model,
KIM_ComputeArguments ** const computeArguments)
{
CONVERT_POINTER;
KIM::ComputeArguments * pComputeArguments;
int error = pModel->ComputeArgumentsCreate(&pComputeArguments);
if (error)
{
*computeArguments = NULL;
return true;
}
else
{
(*computeArguments) = new KIM_ComputeArguments;
(*computeArguments)->p = (void *) pComputeArguments;
return false;
}
}
int KIM_Model_ComputeArgumentsDestroy(
KIM_Model const * const model,
KIM_ComputeArguments ** const computeArguments)
{
CONVERT_POINTER;
int error = false;
if (*computeArguments != NULL)
{
KIM::ComputeArguments * pComputeArguments
= reinterpret_cast((*computeArguments)->p);
error = pModel->ComputeArgumentsDestroy(&pComputeArguments);
}
delete (*computeArguments);
*computeArguments = NULL;
return error;
}
int KIM_Model_Compute(KIM_Model const * const model,
KIM_ComputeArguments const * const computeArguments)
{
CONVERT_POINTER;
KIM::ComputeArguments const * const pComputeArguments
= reinterpret_cast(computeArguments->p);
return pModel->Compute(pComputeArguments);
}
int KIM_Model_Extension(KIM_Model * const model,
char const * const extensionID,
void * const extensionStructure)
{
CONVERT_POINTER;
return pModel->Extension(extensionID, extensionStructure);
}
int KIM_Model_ClearThenRefresh(KIM_Model * const model)
{
CONVERT_POINTER;
return pModel->ClearThenRefresh();
}
int KIM_Model_WriteParameterizedModel(KIM_Model const * const model,
char const * const path,
char const * const modelName)
{
CONVERT_POINTER;
return pModel->WriteParameterizedModel(path, modelName);
}
int KIM_Model_GetSpeciesSupportAndCode(KIM_Model const * const model,
KIM_SpeciesName const speciesName,
int * const speciesIsSupported,
int * const code)
{
CONVERT_POINTER;
return pModel->GetSpeciesSupportAndCode(
makeSpecNameCpp(speciesName), speciesIsSupported, code);
}
void KIM_Model_GetNumberOfParameters(KIM_Model const * const model,
int * const numberOfParameters)
{
CONVERT_POINTER;
pModel->GetNumberOfParameters(numberOfParameters);
}
int KIM_Model_GetParameterMetadata(KIM_Model const * const model,
int const parameterIndex,
KIM_DataType * const dataType,
int * const extent,
char const ** const name,
char const ** const description)
{
CONVERT_POINTER;
KIM::DataType typ;
KIM::DataType * pTyp;
if (dataType == NULL)
pTyp = NULL;
else
pTyp = &typ;
std::string const * pStrName;
std::string const ** ppStrName;
if (name == NULL)
ppStrName = NULL;
else
ppStrName = &pStrName;
std::string const * pStrDesc;
std::string const ** ppStrDesc;
if (description == NULL)
ppStrDesc = NULL;
else
ppStrDesc = &pStrDesc;
int error = pModel->GetParameterMetadata(
parameterIndex, pTyp, extent, ppStrName, ppStrDesc);
if (error)
return true;
else
{
if (dataType != NULL) *dataType = makeDataTypeC(typ);
if (name != NULL) *name = pStrName->c_str();
if (description != NULL) *description = pStrDesc->c_str();
return false;
}
}
int KIM_Model_GetParameterInteger(KIM_Model const * const model,
int const parameterIndex,
int const arrayIndex,
int * const parameterValue)
{
CONVERT_POINTER;
return pModel->GetParameter(parameterIndex, arrayIndex, parameterValue);
}
int KIM_Model_GetParameterDouble(KIM_Model const * const model,
int const parameterIndex,
int const arrayIndex,
double * const parameterValue)
{
CONVERT_POINTER;
return pModel->GetParameter(parameterIndex, arrayIndex, parameterValue);
}
int KIM_Model_SetParameterInteger(KIM_Model * const model,
int const parameterIndex,
int const arrayIndex,
int const parameterValue)
{
CONVERT_POINTER;
return pModel->SetParameter(parameterIndex, arrayIndex, parameterValue);
}
int KIM_Model_SetParameterDouble(KIM_Model * const model,
int const parameterIndex,
int const arrayIndex,
double const parameterValue)
{
CONVERT_POINTER;
return pModel->SetParameter(parameterIndex, arrayIndex, parameterValue);
}
void KIM_Model_SetSimulatorBufferPointer(KIM_Model * const model,
void * const ptr)
{
CONVERT_POINTER;
pModel->SetSimulatorBufferPointer(ptr);
}
void KIM_Model_GetSimulatorBufferPointer(KIM_Model const * const model,
void ** const ptr)
{
CONVERT_POINTER;
pModel->GetSimulatorBufferPointer(ptr);
}
char const * KIM_Model_ToString(KIM_Model const * const model)
{
CONVERT_POINTER;
return pModel->ToString().c_str();
}
void KIM_Model_SetLogID(KIM_Model * const model, char const * const logID)
{
CONVERT_POINTER;
pModel->SetLogID(logID);
}
void KIM_Model_PushLogVerbosity(KIM_Model * const model,
KIM_LogVerbosity const logVerbosity)
{
CONVERT_POINTER;
pModel->PushLogVerbosity(makeLogVerbosityCpp(logVerbosity));
}
void KIM_Model_PopLogVerbosity(KIM_Model * const model)
{
CONVERT_POINTER;
pModel->PopLogVerbosity();
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_Numbering_c.cpp 0000664 0000000 0000000 00000005352 13765565573 0020324 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common
// Development and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name
// LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner].
// All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_NUMBERING_HPP_
#include "KIM_Numbering.hpp"
#endif
extern "C" {
#ifndef KIM_NUMBERING_H_
#include "KIM_Numbering.h"
#endif
} // extern "C"
namespace
{
KIM::Numbering makeNumberingCpp(KIM_Numbering const numbering)
{
KIM::Numbering const * const numberingCpp
= reinterpret_cast(&numbering);
return *numberingCpp;
}
KIM_Numbering makeNumberingC(KIM::Numbering const numbering)
{
KIM_Numbering const * const numberingC
= reinterpret_cast(&numbering);
return *numberingC;
}
} // namespace
extern "C" {
KIM_Numbering KIM_Numbering_FromString(char const * const str)
{
return makeNumberingC(KIM::Numbering(std::string(str)));
}
int KIM_Numbering_Known(KIM_Numbering const numbering)
{
return makeNumberingCpp(numbering).Known();
}
int KIM_Numbering_Equal(KIM_Numbering const lhs, KIM_Numbering const rhs)
{
return (lhs.numberingID == rhs.numberingID);
}
int KIM_Numbering_NotEqual(KIM_Numbering const lhs, KIM_Numbering const rhs)
{
return (!KIM_Numbering_Equal(lhs, rhs));
}
char const * KIM_Numbering_ToString(KIM_Numbering const numbering)
{
return makeNumberingCpp(numbering).ToString().c_str();
}
#include "KIM_Numbering.inc"
KIM_Numbering const KIM_NUMBERING_zeroBased = {ID_zeroBased};
KIM_Numbering const KIM_NUMBERING_oneBased = {ID_oneBased};
void KIM_NUMBERING_GetNumberOfNumberings(int * const numberOfNumberings)
{
KIM::NUMBERING::GetNumberOfNumberings(numberOfNumberings);
}
int KIM_NUMBERING_GetNumbering(int const index, KIM_Numbering * const numbering)
{
KIM::Numbering numberingCpp;
int error = KIM::NUMBERING::GetNumbering(index, &numberingCpp);
if (error) return error;
*numbering = makeNumberingC(numberingCpp);
return false;
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_SemVer_c.cpp 0000664 0000000 0000000 00000005340 13765565573 0017574 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#include
#ifndef KIM_SEM_VER_HPP_
#include "KIM_SemVer.hpp"
#endif
extern "C" {
#ifndef KIM_SEM_VER_H_
#include "KIM_SemVer.h"
#endif
} // extern "C"
extern "C" {
char const * KIM_SEM_VER_GetSemVer()
{
return KIM::SEM_VER::GetSemVer().c_str();
}
int KIM_SEM_VER_IsLessThan(char const * const lhs,
char const * const rhs,
int * const isLessThan)
{
return KIM::SEM_VER::IsLessThan(
std::string(lhs), std::string(rhs), isLessThan);
}
int KIM_SEM_VER_ParseSemVer(char const * const version,
int const prereleaseLength,
int const buildMetadataLength,
int * const major,
int * const minor,
int * const patch,
char * const prerelease,
char * const buildMetadata)
{
std::string prereleaseLocal;
std::string buildMetadataLocal;
std::string * prerel;
std::string * build;
if (prerelease == NULL)
prerel = NULL;
else
prerel = &prereleaseLocal;
if (buildMetadata == NULL)
build = NULL;
else
build = &buildMetadataLocal;
int error = KIM::SEM_VER::ParseSemVer(
std::string(version), major, minor, patch, prerel, build);
if (!error)
{
if (prerelease != NULL)
{
char * copyReturn
= strncpy(prerelease, prereleaseLocal.c_str(), prereleaseLength);
if (copyReturn != prerelease) error = 1;
}
if (buildMetadata != NULL)
{
char * copyReturn = strncpy(
buildMetadata, buildMetadataLocal.c_str(), buildMetadataLength);
if (copyReturn != buildMetadata) error = 1;
}
}
return error;
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_SimulatorModel_c.cpp 0000664 0000000 0000000 00000022000 13765565573 0021323 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#include
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
extern "C" {
#ifndef KIM_LOG_VERBOSITY_H_
#include "KIM_LogVerbosity.h"
#endif
} // extern "C"
#ifndef KIM_SIMULATOR_MODEL_HPP_
#include "KIM_SimulatorModel.hpp"
#endif
extern "C" {
#ifndef KIM_SIMULATOR_MODEL_H_
#include "KIM_SimulatorModel.h"
#endif
} // extern "C"
struct KIM_SimulatorModel
{
void * p;
};
#define CONVERT_POINTER \
KIM::SimulatorModel * pSimulatorModel \
= reinterpret_cast(simulatorModel->p)
namespace
{
KIM::LogVerbosity makeLogVerbosityCpp(KIM_LogVerbosity logVerbosity)
{
return KIM::LogVerbosity(logVerbosity.logVerbosityID);
}
} // namespace
extern "C" {
int KIM_SimulatorModel_Create(char const * const simulatorModelName,
KIM_SimulatorModel ** const simulatorModel)
{
std::string simulatorModelNameC(simulatorModelName);
KIM::SimulatorModel * pSimulatorModel;
int error
= KIM::SimulatorModel::Create(simulatorModelNameC, &pSimulatorModel);
if (error)
{
*simulatorModel = NULL;
return true;
}
else
{
(*simulatorModel) = new KIM_SimulatorModel;
(*simulatorModel)->p = (void *) pSimulatorModel;
return false;
}
}
void KIM_SimulatorModel_Destroy(KIM_SimulatorModel ** const simulatorModel)
{
if (*simulatorModel != NULL)
{
KIM::SimulatorModel * pSimulatorModel
= reinterpret_cast((*simulatorModel)->p);
KIM::SimulatorModel::Destroy(&pSimulatorModel);
}
delete (*simulatorModel);
*simulatorModel = NULL;
}
void KIM_SimulatorModel_GetSimulatorNameAndVersion(
KIM_SimulatorModel const * const simulatorModel,
char const ** const simulatorName,
char const ** const simulatorVersion)
{
CONVERT_POINTER;
std::string const * pStrSimulatorName;
std::string const ** ppStrSimulatorName;
if (simulatorName == NULL)
ppStrSimulatorName = NULL;
else
ppStrSimulatorName = &pStrSimulatorName;
std::string const * pStrSimulatorVersion;
std::string const ** ppStrSimulatorVersion;
if (simulatorVersion == NULL)
ppStrSimulatorVersion = NULL;
else
ppStrSimulatorVersion = &pStrSimulatorVersion;
pSimulatorModel->GetSimulatorNameAndVersion(ppStrSimulatorName,
ppStrSimulatorVersion);
if (simulatorName != NULL) *simulatorName = pStrSimulatorName->c_str();
if (simulatorVersion != NULL)
*simulatorVersion = pStrSimulatorVersion->c_str();
}
void KIM_SimulatorModel_GetNumberOfSupportedSpecies(
KIM_SimulatorModel const * const simulatorModel,
int * const numberOfSupportedSpecies)
{
CONVERT_POINTER;
pSimulatorModel->GetNumberOfSupportedSpecies(numberOfSupportedSpecies);
}
int KIM_SimulatorModel_GetSupportedSpecies(
KIM_SimulatorModel const * const simulatorModel,
int const index,
char const ** const speciesName)
{
CONVERT_POINTER;
std::string const * pStrSpecies;
int error = pSimulatorModel->GetSupportedSpecies(index, &pStrSpecies);
if (error)
return true;
else
{
*speciesName = pStrSpecies->c_str();
return false;
}
}
void KIM_SimulatorModel_OpenAndInitializeTemplateMap(
KIM_SimulatorModel const * const simulatorModel)
{
CONVERT_POINTER;
pSimulatorModel->OpenAndInitializeTemplateMap();
}
int KIM_SimulatorModel_TemplateMapIsOpen(
KIM_SimulatorModel const * const simulatorModel)
{
CONVERT_POINTER;
return pSimulatorModel->TemplateMapIsOpen();
}
int KIM_SimulatorModel_AddTemplateMap(
KIM_SimulatorModel const * const simulatorModel,
char const * const key,
char const * const value)
{
CONVERT_POINTER;
return pSimulatorModel->AddTemplateMap(key, value);
}
void KIM_SimulatorModel_CloseTemplateMap(
KIM_SimulatorModel const * const simulatorModel)
{
CONVERT_POINTER;
pSimulatorModel->CloseTemplateMap();
}
void KIM_SimulatorModel_GetNumberOfSimulatorFields(
KIM_SimulatorModel const * const simulatorModel,
int * const numberOfSimulatorFields)
{
CONVERT_POINTER;
return pSimulatorModel->GetNumberOfSimulatorFields(numberOfSimulatorFields);
}
int KIM_SimulatorModel_GetSimulatorFieldMetadata(
KIM_SimulatorModel const * const simulatorModel,
int const fieldIndex,
int * const extent,
char const ** const fieldName)
{
CONVERT_POINTER;
std::string const * pStrFieldName;
std::string const ** ppStrFieldName;
if (fieldName == NULL)
ppStrFieldName = NULL;
else
ppStrFieldName = &pStrFieldName;
int error = pSimulatorModel->GetSimulatorFieldMetadata(
fieldIndex, extent, ppStrFieldName);
if (error)
return true;
else
{
if (fieldName != NULL) *fieldName = pStrFieldName->c_str();
return false;
}
}
int KIM_SimulatorModel_GetSimulatorFieldLine(
KIM_SimulatorModel const * const simulatorModel,
int const fieldIndex,
int const lineIndex,
char const ** const lineValue)
{
CONVERT_POINTER;
std::string const * pStrLineValue;
int error = pSimulatorModel->GetSimulatorFieldLine(
fieldIndex, lineIndex, &pStrLineValue);
if (error)
return true;
else
{
*lineValue = pStrLineValue->c_str();
return false;
}
}
void KIM_SimulatorModel_GetParameterFileDirectoryName(
KIM_SimulatorModel const * const simulatorModel,
char const ** const directoryName)
{
CONVERT_POINTER;
std::string const * pStrDirectoryName;
pSimulatorModel->GetParameterFileDirectoryName(&pStrDirectoryName);
*directoryName = pStrDirectoryName->c_str();
}
void KIM_SimulatorModel_GetSpecificationFileName(
KIM_SimulatorModel const * const simulatorModel,
char const ** const specificationFileName)
{
CONVERT_POINTER;
std::string const * pStrSpecificationFileName;
pSimulatorModel->GetSpecificationFileName(&pStrSpecificationFileName);
*specificationFileName = pStrSpecificationFileName->c_str();
}
void KIM_SimulatorModel_GetNumberOfParameterFiles(
KIM_SimulatorModel const * const simulatorModel,
int * const numberOfParameterFiles)
{
CONVERT_POINTER;
pSimulatorModel->GetNumberOfParameterFiles(numberOfParameterFiles);
}
int KIM_SimulatorModel_GetParameterFileName(
KIM_SimulatorModel const * const simulatorModel,
int const index,
char const ** const parameterFileName)
{
CONVERT_POINTER;
std::string const * pStrParameterFileName;
int error
= pSimulatorModel->GetParameterFileName(index, &pStrParameterFileName);
if (error)
return true;
else
{
*parameterFileName = pStrParameterFileName->c_str();
return false;
}
}
int KIM_SimulatorModel_GetParameterFileBasename(
KIM_SimulatorModel const * const simulatorModel,
int const index,
char const ** const parameterFileBasename)
{
CONVERT_POINTER;
std::string const * pStrParameterFileBasename;
int error = pSimulatorModel->GetParameterFileBasename(
index, &pStrParameterFileBasename);
if (error)
return true;
else
{
*parameterFileBasename = pStrParameterFileBasename->c_str();
return false;
}
}
void KIM_SimulatorModel_SetSimulatorBufferPointer(
KIM_SimulatorModel * const simulatorModel, void * const ptr)
{
CONVERT_POINTER;
pSimulatorModel->SetSimulatorBufferPointer(ptr);
}
void KIM_SimulatorModel_GetSimulatorBufferPointer(
KIM_SimulatorModel const * const simulatorModel, void ** const ptr)
{
CONVERT_POINTER;
pSimulatorModel->GetSimulatorBufferPointer(ptr);
}
char const *
KIM_SimulatorModel_ToString(KIM_SimulatorModel const * const simulatorModel)
{
CONVERT_POINTER;
return pSimulatorModel->ToString().c_str();
}
void KIM_SimulatorModel_SetLogID(KIM_SimulatorModel * const simulatorModel,
char const * const logID)
{
CONVERT_POINTER;
pSimulatorModel->SetLogID(logID);
}
void KIM_SimulatorModel_PushLogVerbosity(
KIM_SimulatorModel * const simulatorModel,
KIM_LogVerbosity const logVerbosity)
{
CONVERT_POINTER;
pSimulatorModel->PushLogVerbosity(makeLogVerbosityCpp(logVerbosity));
}
void KIM_SimulatorModel_PopLogVerbosity(
KIM_SimulatorModel * const simulatorModel)
{
CONVERT_POINTER;
pSimulatorModel->PopLogVerbosity();
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_SpeciesName_c.cpp 0000664 0000000 0000000 00000027721 13765565573 0020576 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common
// Development and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name
// LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner].
// All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_SPECIES_NAME_HPP_
#include "KIM_SpeciesName.hpp"
#endif
extern "C" {
#ifndef KIM_SPECIES_NAME_H_
#include "KIM_SpeciesName.h"
#endif
} // extern "C"
namespace
{
KIM::SpeciesName makeSpeciesNameCpp(KIM_SpeciesName const speciesName)
{
KIM::SpeciesName const * const speciesNameCpp
= reinterpret_cast(&speciesName);
return *speciesNameCpp;
}
KIM_SpeciesName makeSpeciesNameC(KIM::SpeciesName speciesName)
{
KIM_SpeciesName const * const speciesNameC
= reinterpret_cast(&speciesName);
return *speciesNameC;
}
} // namespace
extern "C" {
KIM_SpeciesName KIM_SpeciesName_FromString(char const * const str)
{
return makeSpeciesNameC(KIM::SpeciesName(std::string(str)));
}
int KIM_SpeciesName_Known(KIM_SpeciesName const speciesName)
{
return makeSpeciesNameCpp(speciesName).Known();
}
int KIM_SpeciesName_Equal(KIM_SpeciesName const lhs, KIM_SpeciesName const rhs)
{
return (lhs.speciesNameID == rhs.speciesNameID);
}
int KIM_SpeciesName_NotEqual(KIM_SpeciesName const lhs,
KIM_SpeciesName const rhs)
{
return (!KIM_SpeciesName_Equal(lhs, rhs));
}
char const * KIM_SpeciesName_ToString(KIM_SpeciesName const speciesName)
{
return makeSpeciesNameCpp(speciesName).ToString().c_str();
}
#include "KIM_SpeciesName.inc"
KIM_SpeciesName const KIM_SPECIES_NAME_electron = {ID_electron}; // electron
KIM_SpeciesName const KIM_SPECIES_NAME_H = {ID_H}; // Hydrogen
KIM_SpeciesName const KIM_SPECIES_NAME_He = {ID_He}; // Helium
KIM_SpeciesName const KIM_SPECIES_NAME_Li = {ID_Li}; // Lithium
KIM_SpeciesName const KIM_SPECIES_NAME_Be = {ID_Be}; // Beryllium
KIM_SpeciesName const KIM_SPECIES_NAME_B = {ID_B}; // Boron
KIM_SpeciesName const KIM_SPECIES_NAME_C = {ID_C}; // Carbon
KIM_SpeciesName const KIM_SPECIES_NAME_N = {ID_N}; // Nitrogen
KIM_SpeciesName const KIM_SPECIES_NAME_O = {ID_O}; // Oxygen
KIM_SpeciesName const KIM_SPECIES_NAME_F = {ID_F}; // Fluorine
KIM_SpeciesName const KIM_SPECIES_NAME_Ne = {ID_Ne}; // Neon
KIM_SpeciesName const KIM_SPECIES_NAME_Na = {ID_Na}; // Sodium
KIM_SpeciesName const KIM_SPECIES_NAME_Mg = {ID_Mg}; // Magnesium
KIM_SpeciesName const KIM_SPECIES_NAME_Al = {ID_Al}; // Aluminum
KIM_SpeciesName const KIM_SPECIES_NAME_Si = {ID_Si}; // Silicon
KIM_SpeciesName const KIM_SPECIES_NAME_P = {ID_P}; // Phosphorus
KIM_SpeciesName const KIM_SPECIES_NAME_S = {ID_S}; // Sulfur
KIM_SpeciesName const KIM_SPECIES_NAME_Cl = {ID_Cl}; // Chlorine
KIM_SpeciesName const KIM_SPECIES_NAME_Ar = {ID_Ar}; // Argon
KIM_SpeciesName const KIM_SPECIES_NAME_K = {ID_K}; // Potassium
KIM_SpeciesName const KIM_SPECIES_NAME_Ca = {ID_Ca}; // Calcium
KIM_SpeciesName const KIM_SPECIES_NAME_Sc = {ID_Sc}; // Scandium
KIM_SpeciesName const KIM_SPECIES_NAME_Ti = {ID_Ti}; // Titanium
KIM_SpeciesName const KIM_SPECIES_NAME_V = {ID_V}; // Vanadium
KIM_SpeciesName const KIM_SPECIES_NAME_Cr = {ID_Cr}; // Chromium
KIM_SpeciesName const KIM_SPECIES_NAME_Mn = {ID_Mn}; // Manganese
KIM_SpeciesName const KIM_SPECIES_NAME_Fe = {ID_Fe}; // Iron
KIM_SpeciesName const KIM_SPECIES_NAME_Co = {ID_Co}; // Cobalt
KIM_SpeciesName const KIM_SPECIES_NAME_Ni = {ID_Ni}; // Nickel
KIM_SpeciesName const KIM_SPECIES_NAME_Cu = {ID_Cu}; // Copper
KIM_SpeciesName const KIM_SPECIES_NAME_Zn = {ID_Zn}; // Zinc
KIM_SpeciesName const KIM_SPECIES_NAME_Ga = {ID_Ga}; // Gallium
KIM_SpeciesName const KIM_SPECIES_NAME_Ge = {ID_Ge}; // Germanium
KIM_SpeciesName const KIM_SPECIES_NAME_As = {ID_As}; // Arsenic
KIM_SpeciesName const KIM_SPECIES_NAME_Se = {ID_Se}; // Selenium
KIM_SpeciesName const KIM_SPECIES_NAME_Br = {ID_Br}; // Bromine
KIM_SpeciesName const KIM_SPECIES_NAME_Kr = {ID_Kr}; // Krypton
KIM_SpeciesName const KIM_SPECIES_NAME_Rb = {ID_Rb}; // Rubidium
KIM_SpeciesName const KIM_SPECIES_NAME_Sr = {ID_Sr}; // Strontium
KIM_SpeciesName const KIM_SPECIES_NAME_Y = {ID_Y}; // Yttrium
KIM_SpeciesName const KIM_SPECIES_NAME_Zr = {ID_Zr}; // Zirconium
KIM_SpeciesName const KIM_SPECIES_NAME_Nb = {ID_Nb}; // Niobium
KIM_SpeciesName const KIM_SPECIES_NAME_Mo = {ID_Mo}; // Molybdenum
KIM_SpeciesName const KIM_SPECIES_NAME_Tc = {ID_Tc}; // Technetium
KIM_SpeciesName const KIM_SPECIES_NAME_Ru = {ID_Ru}; // Ruthenium
KIM_SpeciesName const KIM_SPECIES_NAME_Rh = {ID_Rh}; // Rhodium
KIM_SpeciesName const KIM_SPECIES_NAME_Pd = {ID_Pd}; // Palladium
KIM_SpeciesName const KIM_SPECIES_NAME_Ag = {ID_Ag}; // Silver
KIM_SpeciesName const KIM_SPECIES_NAME_Cd = {ID_Cd}; // Cadmium
KIM_SpeciesName const KIM_SPECIES_NAME_In = {ID_In}; // Indium
KIM_SpeciesName const KIM_SPECIES_NAME_Sn = {ID_Sn}; // Tin
KIM_SpeciesName const KIM_SPECIES_NAME_Sb = {ID_Sb}; // Antimony
KIM_SpeciesName const KIM_SPECIES_NAME_Te = {ID_Te}; // Tellurium
KIM_SpeciesName const KIM_SPECIES_NAME_I = {ID_I}; // Iodine
KIM_SpeciesName const KIM_SPECIES_NAME_Xe = {ID_Xe}; // Xenon
KIM_SpeciesName const KIM_SPECIES_NAME_Cs = {ID_Cs}; // Cesium
KIM_SpeciesName const KIM_SPECIES_NAME_Ba = {ID_Ba}; // Barium
KIM_SpeciesName const KIM_SPECIES_NAME_La = {ID_La}; // Lanthanum
KIM_SpeciesName const KIM_SPECIES_NAME_Ce = {ID_Ce}; // Cerium
KIM_SpeciesName const KIM_SPECIES_NAME_Pr = {ID_Pr}; // Praseodymium
KIM_SpeciesName const KIM_SPECIES_NAME_Nd = {ID_Nd}; // Neodymium
KIM_SpeciesName const KIM_SPECIES_NAME_Pm = {ID_Pm}; // Promethium
KIM_SpeciesName const KIM_SPECIES_NAME_Sm = {ID_Sm}; // Samarium
KIM_SpeciesName const KIM_SPECIES_NAME_Eu = {ID_Eu}; // Europium
KIM_SpeciesName const KIM_SPECIES_NAME_Gd = {ID_Gd}; // Gadolinium
KIM_SpeciesName const KIM_SPECIES_NAME_Tb = {ID_Tb}; // Terbium
KIM_SpeciesName const KIM_SPECIES_NAME_Dy = {ID_Dy}; // Dysprosium
KIM_SpeciesName const KIM_SPECIES_NAME_Ho = {ID_Ho}; // Holmium
KIM_SpeciesName const KIM_SPECIES_NAME_Er = {ID_Er}; // Erbium
KIM_SpeciesName const KIM_SPECIES_NAME_Tm = {ID_Tm}; // Thulium
KIM_SpeciesName const KIM_SPECIES_NAME_Yb = {ID_Yb}; // Ytterbium
KIM_SpeciesName const KIM_SPECIES_NAME_Lu = {ID_Lu}; // Lutetium
KIM_SpeciesName const KIM_SPECIES_NAME_Hf = {ID_Hf}; // Hafnium
KIM_SpeciesName const KIM_SPECIES_NAME_Ta = {ID_Ta}; // Tantalum
KIM_SpeciesName const KIM_SPECIES_NAME_W = {ID_W}; // Tungsten
KIM_SpeciesName const KIM_SPECIES_NAME_Re = {ID_Re}; // Rhenium
KIM_SpeciesName const KIM_SPECIES_NAME_Os = {ID_Os}; // Osmium
KIM_SpeciesName const KIM_SPECIES_NAME_Ir = {ID_Ir}; // Iridium
KIM_SpeciesName const KIM_SPECIES_NAME_Pt = {ID_Pt}; // Platinum
KIM_SpeciesName const KIM_SPECIES_NAME_Au = {ID_Au}; // Gold
KIM_SpeciesName const KIM_SPECIES_NAME_Hg = {ID_Hg}; // Mercury
KIM_SpeciesName const KIM_SPECIES_NAME_Tl = {ID_Tl}; // Thallium
KIM_SpeciesName const KIM_SPECIES_NAME_Pb = {ID_Pb}; // Lead
KIM_SpeciesName const KIM_SPECIES_NAME_Bi = {ID_Bi}; // Bismuth
KIM_SpeciesName const KIM_SPECIES_NAME_Po = {ID_Po}; // Polonium
KIM_SpeciesName const KIM_SPECIES_NAME_At = {ID_At}; // Astatine
KIM_SpeciesName const KIM_SPECIES_NAME_Rn = {ID_Rn}; // Radon
KIM_SpeciesName const KIM_SPECIES_NAME_Fr = {ID_Fr}; // Francium
KIM_SpeciesName const KIM_SPECIES_NAME_Ra = {ID_Ra}; // Radium
KIM_SpeciesName const KIM_SPECIES_NAME_Ac = {ID_Ac}; // Actinium
KIM_SpeciesName const KIM_SPECIES_NAME_Th = {ID_Th}; // Thorium
KIM_SpeciesName const KIM_SPECIES_NAME_Pa = {ID_Pa}; // Protactinium
KIM_SpeciesName const KIM_SPECIES_NAME_U = {ID_U}; // Uranium
KIM_SpeciesName const KIM_SPECIES_NAME_Np = {ID_Np}; // Neptunium
KIM_SpeciesName const KIM_SPECIES_NAME_Pu = {ID_Pu}; // Plutonium
KIM_SpeciesName const KIM_SPECIES_NAME_Am = {ID_Am}; // Americium
KIM_SpeciesName const KIM_SPECIES_NAME_Cm = {ID_Cm}; // Curium
KIM_SpeciesName const KIM_SPECIES_NAME_Bk = {ID_Bk}; // Berkelium
KIM_SpeciesName const KIM_SPECIES_NAME_Cf = {ID_Cf}; // Californium
KIM_SpeciesName const KIM_SPECIES_NAME_Es = {ID_Es}; // Einsteinium
KIM_SpeciesName const KIM_SPECIES_NAME_Fm = {ID_Fm}; // Fermium
KIM_SpeciesName const KIM_SPECIES_NAME_Md = {ID_Md}; // Mendelevium
KIM_SpeciesName const KIM_SPECIES_NAME_No = {ID_No}; // Nobelium
KIM_SpeciesName const KIM_SPECIES_NAME_Lr = {ID_Lr}; // Lawrencium
KIM_SpeciesName const KIM_SPECIES_NAME_Rf = {ID_Rf}; // Rutherfordium
KIM_SpeciesName const KIM_SPECIES_NAME_Db = {ID_Db}; // Dubnium
KIM_SpeciesName const KIM_SPECIES_NAME_Sg = {ID_Sg}; // Seaborgium
KIM_SpeciesName const KIM_SPECIES_NAME_Bh = {ID_Bh}; // Bohrium
KIM_SpeciesName const KIM_SPECIES_NAME_Hs = {ID_Hs}; // Hassium
KIM_SpeciesName const KIM_SPECIES_NAME_Mt = {ID_Mt}; // Meitnerium
KIM_SpeciesName const KIM_SPECIES_NAME_Ds = {ID_Ds}; // Darmstadtium
KIM_SpeciesName const KIM_SPECIES_NAME_Rg = {ID_Rg}; // Roentgenium
KIM_SpeciesName const KIM_SPECIES_NAME_Cn = {ID_Cn}; // Copernicium
KIM_SpeciesName const KIM_SPECIES_NAME_Nh = {ID_Nh}; // Nihonium
KIM_SpeciesName const KIM_SPECIES_NAME_Fl = {ID_Fl}; // Flerovium
KIM_SpeciesName const KIM_SPECIES_NAME_Mc = {ID_Mc}; // Moscovium
KIM_SpeciesName const KIM_SPECIES_NAME_Lv = {ID_Lv}; // Livermorium
KIM_SpeciesName const KIM_SPECIES_NAME_Ts = {ID_Ts}; // Tennessine
KIM_SpeciesName const KIM_SPECIES_NAME_Og = {ID_Og}; // Oganesson
KIM_SpeciesName const KIM_SPECIES_NAME_user01 = {ID_user01}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user02 = {ID_user02}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user03 = {ID_user03}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user04 = {ID_user04}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user05 = {ID_user05}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user06 = {ID_user06}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user07 = {ID_user07}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user08 = {ID_user08}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user09 = {ID_user09}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user10 = {ID_user10}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user11 = {ID_user11}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user12 = {ID_user12}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user13 = {ID_user13}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user14 = {ID_user14}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user15 = {ID_user15}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user16 = {ID_user16}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user17 = {ID_user17}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user18 = {ID_user18}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user19 = {ID_user19}; // user defined
KIM_SpeciesName const KIM_SPECIES_NAME_user20 = {ID_user20}; // user defined
void KIM_SPECIES_NAME_GetNumberOfSpeciesNames(int * const numberOfSpeciesNames)
{
KIM::SPECIES_NAME::GetNumberOfSpeciesNames(numberOfSpeciesNames);
}
int KIM_SPECIES_NAME_GetSpeciesName(int const index,
KIM_SpeciesName * const speciesName)
{
KIM::SpeciesName speciesNameCpp;
int error = KIM::SPECIES_NAME::GetSpeciesName(index, &speciesNameCpp);
if (error) return error;
*speciesName = makeSpeciesNameC(speciesNameCpp);
return false;
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_SupportStatus_c.cpp 0000664 0000000 0000000 00000006410 13765565573 0021252 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common
// Development and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name
// LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner].
// All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_SUPPORT_STATUS_HPP_
#include "KIM_SupportStatus.hpp"
#endif
extern "C" {
#ifndef KIM_SUPPORT_STATUS_H_
#include "KIM_SupportStatus.h"
#endif
} // extern "C"
namespace
{
KIM::SupportStatus makeSupportStatusCpp(KIM_SupportStatus const supportStatus)
{
KIM::SupportStatus const * const supportStatusCpp
= reinterpret_cast(&supportStatus);
return *supportStatusCpp;
}
KIM_SupportStatus makeSupportStatusC(KIM::SupportStatus const supportStatus)
{
KIM_SupportStatus const * const supportStatusC
= reinterpret_cast(&supportStatus);
return *supportStatusC;
}
} // namespace
extern "C" {
KIM_SupportStatus KIM_SupportStatus_FromString(char const * const str)
{
return makeSupportStatusC(KIM::SupportStatus(std::string(str)));
}
int KIM_SupportStatus_Known(KIM_SupportStatus const supportStatus)
{
return makeSupportStatusCpp(supportStatus).Known();
}
int KIM_SupportStatus_Equal(KIM_SupportStatus const lhs,
KIM_SupportStatus const rhs)
{
return (lhs.supportStatusID == rhs.supportStatusID);
}
int KIM_SupportStatus_NotEqual(KIM_SupportStatus const lhs,
KIM_SupportStatus const rhs)
{
return (!KIM_SupportStatus_Equal(lhs, rhs));
}
char const * KIM_SupportStatus_ToString(KIM_SupportStatus const supportStatus)
{
return makeSupportStatusCpp(supportStatus).ToString().c_str();
}
#include "KIM_SupportStatus.inc"
KIM_SupportStatus const KIM_SUPPORT_STATUS_requiredByAPI = {ID_requiredByAPI};
KIM_SupportStatus const KIM_SUPPORT_STATUS_notSupported = {ID_notSupported};
KIM_SupportStatus const KIM_SUPPORT_STATUS_required = {ID_required};
KIM_SupportStatus const KIM_SUPPORT_STATUS_optional = {ID_optional};
void KIM_SUPPORT_STATUS_GetNumberOfSupportStatuses(
int * const numberOfSupportStatuses)
{
KIM::SUPPORT_STATUS::GetNumberOfSupportStatuses(numberOfSupportStatuses);
}
int KIM_SUPPORT_STATUS_GetSupportStatus(int const index,
KIM_SupportStatus * const supportStatus)
{
KIM::SupportStatus supportStatusCpp;
int error = KIM::SUPPORT_STATUS::GetSupportStatus(index, &supportStatusCpp);
if (error) return error;
*supportStatus = makeSupportStatusC(supportStatusCpp);
return false;
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_TemperatureUnit_c.cpp 0000664 0000000 0000000 00000006267 13765565573 0021541 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common
// Development and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name
// LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner].
// All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_TEMPERATURE_UNIT_HPP_
#include "KIM_TemperatureUnit.hpp"
#endif
extern "C" {
#ifndef KIM_TEMPERATURE_UNIT_H_
#include "KIM_TemperatureUnit.h"
#endif
}
namespace
{
KIM::TemperatureUnit
makeTemperatureUnitCpp(KIM_TemperatureUnit const temperatureUnit)
{
KIM::TemperatureUnit const * const temperatureUnitCpp
= reinterpret_cast(&temperatureUnit);
return *temperatureUnitCpp;
}
KIM_TemperatureUnit
makeTemperatureUnitC(KIM::TemperatureUnit const temperatureUnit)
{
KIM_TemperatureUnit const * const temperatureUnitC
= reinterpret_cast(&temperatureUnit);
return *temperatureUnitC;
}
} // namespace
extern "C" {
KIM_TemperatureUnit KIM_TemperatureUnit_FromString(char const * const str)
{
return makeTemperatureUnitC(KIM::TemperatureUnit(std::string(str)));
}
int KIM_TemperatureUnit_Known(KIM_TemperatureUnit const temperatureUnit)
{
return makeTemperatureUnitCpp(temperatureUnit).Known();
}
int KIM_TemperatureUnit_Equal(KIM_TemperatureUnit const lhs,
KIM_TemperatureUnit const rhs)
{
return (lhs.temperatureUnitID == rhs.temperatureUnitID);
}
int KIM_TemperatureUnit_NotEqual(KIM_TemperatureUnit const lhs,
KIM_TemperatureUnit const rhs)
{
return (!KIM_TemperatureUnit_Equal(lhs, rhs));
}
char const *
KIM_TemperatureUnit_ToString(KIM_TemperatureUnit const temperatureUnit)
{
return makeTemperatureUnitCpp(temperatureUnit).ToString().c_str();
}
#include "KIM_TemperatureUnit.inc"
KIM_TemperatureUnit const KIM_TEMPERATURE_UNIT_unused = {ID_unused};
KIM_TemperatureUnit const KIM_TEMPERATURE_UNIT_K = {ID_K};
void KIM_TEMPERATURE_UNIT_GetNumberOfTemperatureUnits(
int * const numberOfTemperatureUnits)
{
KIM::TEMPERATURE_UNIT::GetNumberOfTemperatureUnits(numberOfTemperatureUnits);
}
int KIM_TEMPERATURE_UNIT_GetTemperatureUnit(
int const index, KIM_TemperatureUnit * const temperatureUnit)
{
KIM::TemperatureUnit temperatureUnitCpp;
int error
= KIM::TEMPERATURE_UNIT::GetTemperatureUnit(index, &temperatureUnitCpp);
if (error) return error;
*temperatureUnit = makeTemperatureUnitC(temperatureUnitCpp);
return false;
}
} // extern "C"
kim-api-2.2.1-git/c/src/KIM_TimeUnit_c.cpp 0000664 0000000 0000000 00000005431 13765565573 0020132 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common
// Development and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name
// LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner].
// All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_TIME_UNIT_HPP_
#include "KIM_TimeUnit.hpp"
#endif
extern "C" {
#ifndef KIM_TIME_UNIT_H_
#include "KIM_TimeUnit.h"
#endif
}
namespace
{
KIM::TimeUnit makeTimeUnitCpp(KIM_TimeUnit const timeUnit)
{
KIM::TimeUnit const * const timeUnitCpp
= reinterpret_cast(&timeUnit);
return *timeUnitCpp;
}
KIM_TimeUnit makeTimeUnitC(KIM::TimeUnit const timeUnit)
{
KIM_TimeUnit const * const timeUnitC
= reinterpret_cast(&timeUnit);
return *timeUnitC;
}
} // namespace
extern "C" {
KIM_TimeUnit KIM_TimeUnit_FromString(char const * const str)
{
return makeTimeUnitC(KIM::TimeUnit(std::string(str)));
}
int KIM_TimeUnit_Known(KIM_TimeUnit const timeUnit)
{
return makeTimeUnitCpp(timeUnit).Known();
}
int KIM_TimeUnit_Equal(KIM_TimeUnit const lhs, KIM_TimeUnit const rhs)
{
return (lhs.timeUnitID == rhs.timeUnitID);
}
int KIM_TimeUnit_NotEqual(KIM_TimeUnit const lhs, KIM_TimeUnit const rhs)
{
return (!KIM_TimeUnit_Equal(lhs, rhs));
}
char const * KIM_TimeUnit_ToString(KIM_TimeUnit const tiemUnit)
{
return makeTimeUnitCpp(tiemUnit).ToString().c_str();
}
#include "KIM_TimeUnit.inc"
KIM_TimeUnit const KIM_TIME_UNIT_unused = {ID_unused};
KIM_TimeUnit const KIM_TIME_UNIT_fs = {ID_fs};
KIM_TimeUnit const KIM_TIME_UNIT_ps = {ID_ps};
KIM_TimeUnit const KIM_TIME_UNIT_ns = {ID_ns};
KIM_TimeUnit const KIM_TIME_UNIT_s = {ID_s};
void KIM_TIME_UNIT_GetNumberOfTimeUnits(int * const numberOfTimeUnits)
{
KIM::TIME_UNIT::GetNumberOfTimeUnits(numberOfTimeUnits);
}
int KIM_TIME_UNIT_GetTimeUnit(int const index, KIM_TimeUnit * const timeUnit)
{
KIM::TimeUnit timeUnitCpp;
int error = KIM::TIME_UNIT::GetTimeUnit(index, &timeUnitCpp);
if (error) return error;
*timeUnit = makeTimeUnitC(timeUnitCpp);
return false;
}
} // extern "C"
kim-api-2.2.1-git/cmake/ 0000775 0000000 0000000 00000000000 13765565573 0014732 5 ustar 00root root 0000000 0000000 kim-api-2.2.1-git/cmake/CMakeLists.txt 0000664 0000000 0000000 00000015271 13765565573 0017500 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
include(CMakePackageConfigHelpers)
function(_configure_common_package_components)
set(_options "")
set(_oneValueArgs
INSTALL_TREE_DIR BUILD_TREE_DIR
INSTALL_CONFIG_IN BUILD_CONFIG_IN CONFIG
MACROS_IN MACROS
VERSION_FILE VERSION_COMPATIBILITY
)
set(_multiValueArgs "")
cmake_parse_arguments(_cpkg "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
if(_cpkg_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unparsed arguments found in '_configure_common_pacakge_components'")
endif()
# Create package files
configure_file("${_cpkg_INSTALL_CONFIG_IN}" "${CMAKE_CURRENT_BINARY_DIR}/${_cpkg_CONFIG}" @ONLY)
configure_file("${_cpkg_MACROS_IN}" "${CMAKE_CURRENT_BINARY_DIR}/${_cpkg_MACROS}" @ONLY)
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/${_cpkg_VERSION_FILE}"
VERSION ${PROJECT_VERSION}
COMPATIBILITY ${_cpkg_VERSION_COMPATIBILITY}
)
# Package files for *build tree*
configure_file("${_cpkg_BUILD_CONFIG_IN}" "${_cpkg_BUILD_TREE_DIR}/${_cpkg_CONFIG}" @ONLY)
configure_file("${CMAKE_CURRENT_BINARY_DIR}/${_cpkg_VERSION_FILE}" "${_cpkg_BUILD_TREE_DIR}/${_cpkg_VERSION_FILE}" COPYONLY)
configure_file("${CMAKE_CURRENT_BINARY_DIR}/${_cpkg_MACROS}" "${_cpkg_BUILD_TREE_DIR}/${_cpkg_MACROS}" COPYONLY)
# Package files for *install tree*
install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/${_cpkg_CONFIG}"
"${CMAKE_CURRENT_BINARY_DIR}/${_cpkg_MACROS}"
"${CMAKE_CURRENT_BINARY_DIR}/${_cpkg_VERSION_FILE}"
DESTINATION
"${_cpkg_INSTALL_TREE_DIR}"
)
endfunction(_configure_common_package_components)
###############################################################################
set(_BUILD_TREE_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/${KIM_API_BUILD_TREE_CONFIG_DIR_IDENTIFIER}")
set(_BUILD_TREE_ITEMS_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/${KIM_API_BUILD_TREE_CONFIG_DIR_IDENTIFIER}-items")
# use CMAKE_INSTALL_RELOC_* to get relocatable GNUInstallDir behavior
set(_INSTALL_TREE_CONFIG_DIR "${CMAKE_INSTALL_RELOC_DATADIR}/cmake/${PROJECT_NAME}")
set(_INSTALL_TREE_ITEMS_CONFIG_DIR "${CMAKE_INSTALL_RELOC_DATADIR}/cmake/${PROJECT_NAME}-items")
# KIM-API package
set(CONFIG_FILE_IN config.cmake.in)
set(CONFIG_FILE kim-api-config.cmake) # should _not_ use PROJECT_NAME here
set(BUILD_TREE_CONFIG_FILE_IN build-tree-config.cmake.in)
set(MACROS_FILE_IN macros.cmake.in)
set(MACROS_FILE kim-api-macros.cmake) # should _not_ use PROJECT_NAME here
set(TARGETS_FILE kim-api-targets.cmake) # should _not_ use PROJECT_NAME here
set(CONFIG_VERSION_FILE kim-api-config-version.cmake) # should _not_ use PROJECT_NAME here
_configure_common_package_components(
INSTALL_TREE_DIR ${_INSTALL_TREE_CONFIG_DIR}
BUILD_TREE_DIR ${_BUILD_TREE_CONFIG_DIR}
INSTALL_CONFIG_IN ${CONFIG_FILE_IN}
BUILD_CONFIG_IN ${BUILD_TREE_CONFIG_FILE_IN}
CONFIG ${CONFIG_FILE}
MACROS_IN ${MACROS_FILE_IN}
MACROS ${MACROS_FILE}
VERSION_FILE ${CONFIG_VERSION_FILE}
VERSION_COMPATIBILITY SameMajorVersion
)
# KIM-API Targets -- install tree only
install(EXPORT KIM_API_Targets
FILE "${TARGETS_FILE}"
NAMESPACE KIM-API::
DESTINATION "${_INSTALL_TREE_CONFIG_DIR}"
)
# REMOVE THE BELOW LINES FOR 3.0.0 RELEASE!!!
set(PRE_2_2_COMPATIBILITY_FILE_IN pre-2.2-compatibility.cmake.in) # REMOVE THIS LINE FOR 3.0.0 RELEASE!!!
set(PRE_2_2_COMPATIBILITY_FILE kim-api-pre-2.2-compatibility.cmake) # REMOVE THIS LINE FOR 3.0.0 RELEASE!!!
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${PRE_2_2_COMPATIBILITY_FILE_IN}" "${CMAKE_CURRENT_BINARY_DIR}/${PRE_2_2_COMPATIBILITY_FILE}" @ONLY) # REMOVE THIS LINE FOR 3.0.0 RELEASE!!!
configure_file("${CMAKE_CURRENT_BINARY_DIR}/${PRE_2_2_COMPATIBILITY_FILE}" "${_BUILD_TREE_CONFIG_DIR}/${PRE_2_2_COMPATIBILITY_FILE}" COPYONLY) # REMOVE THIS LINE FOR 3.0.0 RELEASE!!!
install( # REMOVE THESE LINES FOR 3.0.0 RELEASE!!!
FILES
"${CMAKE_CURRENT_BINARY_DIR}/${PRE_2_2_COMPATIBILITY_FILE}"
DESTINATION
"${_INSTALL_TREE_CONFIG_DIR}"
)
# KIM-API-ITEMS package
set(ITEMS_CONFIG_FILE_IN items-config.cmake.in)
set(ITEMS_CONFIG_FILE kim-api-items-config.cmake) # should _not_ use PROJECT_NAME here
set(BUILD_TREE_ITEMS_CONFIG_FILE_IN build-tree-items-config.cmake.in)
set(ITEMS_MACROS_FILE_IN items-macros.cmake.in)
set(ITEMS_MACROS_FILE kim-api-items-macros.cmake) # should _not_ use PROJECT_NAME here
set(ITEMS_CONFIG_VERSION_FILE kim-api-items-config-version.cmake) # should _not_ use PROJECT_NAME here
set(ITEM_COMPILED_WITH_VERSION_IN item-compiled-with-version.txt.in)
set(ITEM_COMPILED_WITH_VERSION item-compiled-with-version.txt)
set(ITEM_BUILD_SOURCES
KIM_SharedLibrarySchema.hpp
item-wrapper.cpp.in
item-info.txt.in
)
_configure_common_package_components(
INSTALL_TREE_DIR ${_INSTALL_TREE_ITEMS_CONFIG_DIR}
BUILD_TREE_DIR ${_BUILD_TREE_ITEMS_CONFIG_DIR}
INSTALL_CONFIG_IN ${ITEMS_CONFIG_FILE_IN}
BUILD_CONFIG_IN ${BUILD_TREE_ITEMS_CONFIG_FILE_IN}
CONFIG ${ITEMS_CONFIG_FILE}
MACROS_IN ${ITEMS_MACROS_FILE_IN}
MACROS ${ITEMS_MACROS_FILE}
VERSION_FILE ${ITEMS_CONFIG_VERSION_FILE}
VERSION_COMPATIBILITY AnyNewerVersion # allow newer major versions for KIM Items as convenience
)
# KIM-API-ITEMS extra files
configure_file("${ITEM_COMPILED_WITH_VERSION_IN}" "${CMAKE_CURRENT_BINARY_DIR}/${ITEM_COMPILED_WITH_VERSION}" @ONLY)
foreach(_FL IN LISTS ITEM_BUILD_SOURCES)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${_FL}" "${_BUILD_TREE_ITEMS_CONFIG_DIR}/${_FL}" COPYONLY)
endforeach()
unset(_FL)
# build tree
configure_file("${CMAKE_CURRENT_BINARY_DIR}/${ITEM_COMPILED_WITH_VERSION}" "${_BUILD_TREE_ITEMS_CONFIG_DIR}/${ITEM_COMPILED_WITH_VERSION}" COPYONLY)
# install tree
install(
FILES
${ITEM_BUILD_SOURCES}
"${CMAKE_CURRENT_BINARY_DIR}/${ITEM_COMPILED_WITH_VERSION}"
DESTINATION
"${_INSTALL_TREE_ITEMS_CONFIG_DIR}"
)
add_subdirectory(Modules)
kim-api-2.2.1-git/cmake/KIM_SharedLibrarySchema.hpp 0000664 0000000 0000000 00000005315 13765565573 0022023 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_SHARED_LIBRARY_SCHEMA_HPP_
#define KIM_SHARED_LIBRARY_SCHEMA_HPP_
#define KIM_SHARED_LIBRARY_SCHEMA_VERSION 2
#ifndef KIM_FUNCTION_TYPES_HPP_
#include "KIM_FunctionTypes.hpp"
#endif
#ifndef KIM_COLLECTION_ITEM_TYPE_HPP_
#include "KIM_CollectionItemType.hpp"
#endif
namespace KIM
{
// Forward declarations
class LanguageName;
namespace SHARED_LIBRARY_SCHEMA
{
struct SharedLibrarySchemaV2
{
struct EmbeddedFile
{
char const * fileName;
unsigned int const fileLength;
unsigned char const * const filePointer;
}; // struct EmbeddedFile
CollectionItemType const itemType;
char const * const itemName;
LanguageName const createLanguageName;
Function * createRoutine;
char const * const driverName;
EmbeddedFile const * const simulatorModelSpecificationFile;
int const numberOfParameterFiles;
EmbeddedFile const * const parameterFiles;
int const numberOfMetadataFiles;
EmbeddedFile const * const metadataFiles;
}; // struct SharedLibrarySchemaV2
struct SharedLibrarySchemaV1
{
enum ITEM_TYPE {
STAND_ALONE_MODEL,
PARAMETERIZED_MODEL,
SIMULATOR_MODEL,
MODEL_DRIVER
};
struct EmbeddedFile
{
char const * fileName;
unsigned int const fileLength;
unsigned char const * const filePointer;
}; // struct EmbeddedFile
char const * const compiledWithVersion;
ITEM_TYPE const itemType;
char const * const itemName;
LanguageName const createLanguageName;
Function * createRoutine;
char const * const driverName;
int const numberOfParameterFiles;
EmbeddedFile const * const parameterFiles;
EmbeddedFile const * const metadataFile;
}; // struct SharedLibrarySchemaV1
} // namespace SHARED_LIBRARY_SCHEMA
} // namespace KIM
#endif // KIM_SHARED_LIBRARY_SCHEMA_HPP_
kim-api-2.2.1-git/cmake/Modules/ 0000775 0000000 0000000 00000000000 13765565573 0016342 5 ustar 00root root 0000000 0000000 kim-api-2.2.1-git/cmake/Modules/CMakeLists.txt 0000664 0000000 0000000 00000002017 13765565573 0021102 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
# nothing to be done here...
kim-api-2.2.1-git/cmake/Modules/CompletionConfig.cmake 0000664 0000000 0000000 00000004770 13765565573 0022613 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Jim Madge
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
# - CompletionConfig
#
# Sets the install paths for completions.
#
# If the user defines a location use it. If installing to "standard" loc, use
# system bash-completion settings if available Otherwise, install into
# sysconfdir (but do not cache).
# bash completions
if((NOT BASH_COMPLETION_COMPLETIONSDIR) AND ("${CMAKE_INSTALL_PREFIX}" IN_LIST KIM_API_STANDARD_INSTALL_PREFIXES))
find_package(bash-completion QUIET) # sets BASH_COMPLETION_COMPLETIONSDIR
if(bash-completion_FOUND)
include(FindPackageMessage)
find_package_message(bash-completion "Found bash-completion: (${BASH_COMPLETION_COMPLETIONSDIR})" "found")
endif()
endif()
set_cache_with_fallback(BASH_COMPLETION_COMPLETIONSDIR "${CMAKE_INSTALL_RELOC_SYSCONFDIR}/bash_completion.d" PATH "Directory where bash completions are installed")
set(dir SYSCONFDIR)
GNUInstallDirs_get_absolute_install_dir(BASH_COMPLETION_FULL_COMPLETIONSDIR BASH_COMPLETION_COMPLETIONSDIR)
unset(dir)
RelocatableGNUInstallDirs_get_relocatable_dir(BASH_COMPLETION_RELOC_COMPLETIONSDIR BASH_COMPLETION_FULL_COMPLETIONSDIR BASH_COMPLETION_COMPLETIONSDIR)
# zsh completions
set_cache_with_fallback(ZSH_COMPLETION_COMPLETIONSDIR "${CMAKE_INSTALL_RELOC_SYSCONFDIR}/zsh_completion.d" PATH "Directory where zsh completions are installed")
set(dir SYSCONFDIR)
GNUInstallDirs_get_absolute_install_dir(ZSH_COMPLETION_FULL_COMPLETIONSDIR ZSH_COMPLETION_COMPLETIONSDIR)
unset(dir)
RelocatableGNUInstallDirs_get_relocatable_dir(ZSH_COMPLETION_RELOC_COMPLETIONSDIR ZSH_COMPLETION_FULL_COMPLETIONSDIR ZSH_COMPLETION_COMPLETIONSDIR)
kim-api-2.2.1-git/cmake/Modules/DefaultCompilerFlags.cmake 0000664 0000000 0000000 00000010766 13765565573 0023412 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
# Alexander Stukowski
#
#
# Release: This file is part of the kim-api.git repository.
#
# Set global compiler options
#
include(EnableCXXCompilerFlagIfSupported)
enable_cxx_compiler_flag_if_supported("-Wall")
enable_cxx_compiler_flag_if_supported("-Wextra")
enable_cxx_compiler_flag_if_supported("-pedantic")
if(KIM_API_ENABLE_COVERAGE)
set(KIM_API_CXX_FLAGS "${KIM_API_CXX_FLAGS} --coverage")
endif()
if(KIM_API_ENABLE_SANITIZE)
enable_cxx_compiler_flag_if_supported("-fsanitize=address")
endif()
string(STRIP "${KIM_API_CXX_FLAGS}" _s)
set(KIM_API_CXX_FLAGS "${_s}" CACHE STRING "KIM API C++ compiler flags")
unset(_s)
#
include(EnableCCompilerFlagIfSupported)
enable_c_compiler_flag_if_supported("-Wall")
enable_c_compiler_flag_if_supported("-Wextra")
enable_c_compiler_flag_if_supported("-pedantic")
if(KIM_API_ENABLE_COVERAGE)
set(KIM_API_C_FLAGS "${KIM_API_C_FLAGS} --coverage")
endif()
if(KIM_API_ENABLE_SANITIZE)
enable_c_compiler_flag_if_supported("-fsanitize=address")
endif()
string(STRIP "${KIM_API_C_FLAGS}" _s)
set(KIM_API_C_FLAGS "${_s}" CACHE STRING "KIM API C compiler flags")
unset(_s)
#
include(EnableFortranCompilerFlagIfSupported)
if(NOT CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
enable_fortran_compiler_flag_if_supported("-std=f2003")
enable_fortran_compiler_flag_if_supported("-Wall")
enable_fortran_compiler_flag_if_supported("-Wextra")
enable_fortran_compiler_flag_if_supported("-Wimplicit-interface")
enable_fortran_compiler_flag_if_supported("-pedantic")
else()
enable_fortran_compiler_flag_if_supported("-stand f03")
enable_fortran_compiler_flag_if_supported("-warn all")
enable_fortran_compiler_flag_if_supported("-e03")
enable_fortran_compiler_flag_if_supported("-warn interfaces")
enable_fortran_compiler_flag_if_supported("-diag-disable 5462") # disable "Global name too long" warning
endif()
if(KIM_API_ENABLE_COVERAGE)
set(KIM_API_Fortran_FLAGS "${KIM_API_Fortran_FLAGS} --coverage")
endif()
if(KIM_API_ENABLE_SANITIZE)
enable_fortran_compiler_flag_if_supported("-fsanitize=address")
endif()
string(STRIP "${KIM_API_Fortran_FLAGS}" _s)
set(KIM_API_Fortran_FLAGS "${_s}" CACHE STRING "KIM API Fortran compiler flags")
unset(_s)
#
# Set global linker flags
#
if(NOT KIM_API_EXE_LINKER_FLAGS)
set(KIM_API_EXE_LINKER_FLAGS "")
endif()
if(KIM_API_ENABLE_SANITIZE)
set(KIM_API_EXE_LINKER_FLAGS "${KIM_API_EXE_LINKER_FLAGS} -fsanitize=address")
endif()
if(KIM_API_ENABLE_COVERAGE)
set(KIM_API_EXE_LINKER_FLAGS "${KIM_API_EXE_LINKER_FLAGS} --coverage")
endif()
string(STRIP "${KIM_API_EXE_LINKER_FLAGS}" _s)
set(KIM_API_EXE_LINKER_FLAGS "${_s}")
unset(_s)
#
# Update CMAKE variables
#
string(STRIP "${KIM_API_CXX_FLAGS} ${CMAKE_CXX_FLAGS}" _s)
set(CMAKE_CXX_FLAGS_CACHED_VALUE "${CMAKE_CXX_FLAGS}") # for cmake's (< 3.13) that don't have $CACHE{} ;; remove once min cmake is > 3.12
set(CMAKE_CXX_FLAGS "${_s}")
unset(_s)
string(STRIP "${KIM_API_C_FLAGS} ${CMAKE_C_FLAGS}" _s)
set(CMAKE_C_FLAGS_CACHED_VALUE "${CMAKE_C_FLAGS}") # for cmake's (< 3.13) that don't have $CACHE{} ;; remove once min cmake is > 3.12
set(CMAKE_C_FLAGS "${_s}")
unset(_s)
string(STRIP "${KIM_API_Fortran_FLAGS} ${CMAKE_Fortran_FLAGS}" _s)
set(CMAKE_Fortran_FLAGS_CACHED_VALUE "${CMAKE_Fortran_FLAGS}") # for cmake's (< 3.13) that don't have $CACHE{} ;; remove once min cmake is > 3.12
set(CMAKE_Fortran_FLAGS "${_s}")
unset(_s)
#
string(STRIP "${KIM_API_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}" _s)
set(CMAKE_EXE_LINKER_FLAGS_CACHED_VALUE "${CMAKE_EXE_LINKER_FLAGS}") # for cmake's (< 3.13) that don't have $CACHE{} ;; remove once min cmake is > 3.12
set(CMAKE_EXE_LINKER_FLAGS "${_s}")
unset(_s)
#
kim-api-2.2.1-git/cmake/Modules/DefaultCompilerStandards.cmake 0000664 0000000 0000000 00000003675 13765565573 0024302 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
# Language standards (also enforced with FLAGS below)
#
set(CMAKE_CXX_STANDARD 98 CACHE STRING "CXX language standard") # cache to allow command line override
mark_as_advanced(CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL "CXX language standard required") # cache to allow command line override
mark_as_advanced(CMAKE_CXX_STANDARD_REQUIRED)
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "CXX extensions") # cache to allow command line override
mark_as_advanced(CMAKE_CXX_EXTENSIONS)
#
set(CMAKE_C_STANDARD 90 CACHE STRING "C language standard") # cache to allow command line override
mark_as_advanced(CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD_REQUIRED ON CACHE BOOL "C language standard required") # cache to allow command line override
mark_as_advanced(CMAKE_C_STANDARD_REQUIRED)
set(CMAKE_C_EXTENSIONS OFF "C extensions") # cache to allow command line override
mark_as_advanced(CMAKE_C_EXTENSIONS)
#
# NO similar setting exist yet in CMake for Fortran
kim-api-2.2.1-git/cmake/Modules/DefineInternalVariables.cmake 0000664 0000000 0000000 00000012765 13765565573 0024077 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
# Alexander Stukowski
#
#
# Release: This file is part of the kim-api.git repository.
#
# Define other internal variables
#
set(KIM_API_UID "${PROJECT_VERSION_STRING}.${KIM_API_CONFIGURATION_TIMESTAMP}" CACHE INTERNAL "Unique ID value for kim-api installation")
#
if(WIN32 AND NOT CYGWIN)
# Use ';' as path list separator on native Windows platform (including MinGW).
set(KIM_API_PATH_SEPARATOR ";" CACHE INTERNAL "Canonical separator character used in path lists")
set(KIM_API_STANDARD_INSTALL_PREFIXES "c:/Program Files/${PROJECT_NAME}" CACHE INTERNAL "Canonical list of standard install prefixes")
else()
# Use ':' as path list separator on Linux/Unix platforms (including Cygwin and Windows Subsystem for Linux).
set(KIM_API_PATH_SEPARATOR ":" CACHE INTERNAL "Canonical separator character used in path lists")
set(KIM_API_STANDARD_INSTALL_PREFIXES "/" "/usr" "/usr/local" CACHE INTERNAL "Canonical list of standard install prefixes")
endif()
#
set(KIM_API_BUILD_TREE_CONFIG_DIR_IDENTIFIER "build-tree-package-config-files" CACHE INTERNAL "Cononical id for build tree config dir")
#
set(KIM_API_PKG_CONFIG_DIR_IDENTIFIER "pkgconfig" CACHE INTERNAL "Canonical id for pkg-config dir")
#
set(KIM_API_Fortran_MODULE_DIR_IDENTIFIER "mod" CACHE INTERNAL "Canonical id for the Fortran module dir")
#
set(KIM_API_MODEL_DRIVER_IDENTIFIER "model-driver" CACHE INTERNAL "Canonical id for a model driver")
set(KIM_API_MODEL_DRIVER_PLURAL_IDENTIFIER "${KIM_API_MODEL_DRIVER_IDENTIFIER}s" CACHE INTERNAL "plural")
#
set(KIM_API_PORTABLE_MODEL_IDENTIFIER "portable-model" CACHE INTERNAL "Canonical id for a portable model")
set(KIM_API_PORTABLE_MODEL_PLURAL_IDENTIFIER "${KIM_API_PORTABLE_MODEL_IDENTIFIER}s" CACHE INTERNAL "plural")
#
set(KIM_API_SIMULATOR_MODEL_IDENTIFIER "simulator-model" CACHE INTERNAL "Canonical id for a simulator model")
set(KIM_API_SIMULATOR_MODEL_PLURAL_IDENTIFIER "${KIM_API_SIMULATOR_MODEL_IDENTIFIER}s" CACHE INTERNAL "plural")
#
string(MAKE_C_IDENTIFIER "${PROJECT_NAME}_CONFIGURATION_FILE" _KIM_API_ENVIRONMENT_CONFIGURATION_FILE)
string(TOUPPER ${_KIM_API_ENVIRONMENT_CONFIGURATION_FILE} _KIM_API_ENVIRONMENT_CONFIGURATION_FILE)
set(KIM_API_ENVIRONMENT_CONFIGURATION_FILE "${_KIM_API_ENVIRONMENT_CONFIGURATION_FILE}" CACHE INTERNAL "Configuration file environment variable name")
unset(_KIM_API_ENVIRONMENT_CONFIGURATION_FILE)
#
string(MAKE_C_IDENTIFIER "KIM_API_CMAKE_PREFIX_DIR" _KIM_API_ENVIRONMENT_CMAKE_PREFIX_DIR) # should _not_ use PROJECT_NAME here
string(TOUPPER ${_KIM_API_ENVIRONMENT_CMAKE_PREFIX_DIR} _KIM_API_ENVIRONMENT_CMAKE_PREFIX_DIR)
set(KIM_API_ENVIRONMENT_CMAKE_PREFIX_DIR "${_KIM_API_ENVIRONMENT_CMAKE_PREFIX_DIR}" CACHE INTERNAL "CMake prefix dir environment variable name")
unset(_KIM_API_ENVIRONMENT_CMAKE_PREFIX_DIR)
#
set(KIM_API_MODEL_DRIVER_PLURAL_DIR_IDENTIFIER "${KIM_API_MODEL_DRIVER_PLURAL_IDENTIFIER}-dir" CACHE INTERNAL "Model drivers directory identifier")
#
string(MAKE_C_IDENTIFIER "${PROJECT_NAME}_${KIM_API_MODEL_DRIVER_PLURAL_DIR_IDENTIFIER}" _KIM_API_ENVIRONMENT_MODEL_DRIVER_PLURAL_DIR)
string(TOUPPER ${_KIM_API_ENVIRONMENT_MODEL_DRIVER_PLURAL_DIR} _KIM_API_ENVIRONMENT_MODEL_DRIVER_PLURAL_DIR)
set(KIM_API_ENVIRONMENT_MODEL_DRIVER_PLURAL_DIR "${_KIM_API_ENVIRONMENT_MODEL_DRIVER_PLURAL_DIR}" CACHE INTERNAL "Model drivers directory environment variable name")
unset(_KIM_API_ENVIRONMENT_MODEL_DRIVER_PLURAL_DIR)
#
set(KIM_API_PORTABLE_MODEL_PLURAL_DIR_IDENTIFIER "${KIM_API_PORTABLE_MODEL_PLURAL_IDENTIFIER}-dir" CACHE INTERNAL "Portable models directory identifier")
#
string(MAKE_C_IDENTIFIER "${PROJECT_NAME}_${KIM_API_PORTABLE_MODEL_PLURAL_DIR_IDENTIFIER}" _KIM_API_ENVIRONMENT_PORTABLE_MODEL_PLURAL_DIR)
string(TOUPPER ${_KIM_API_ENVIRONMENT_PORTABLE_MODEL_PLURAL_DIR} _KIM_API_ENVIRONMENT_PORTABLE_MODEL_PLURAL_DIR)
set(KIM_API_ENVIRONMENT_PORTABLE_MODEL_PLURAL_DIR "${_KIM_API_ENVIRONMENT_PORTABLE_MODEL_PLURAL_DIR}" CACHE INTERNAL "Portable Models directory environment variable name")
unset(_KIM_API_ENVIRONMENT_PORTABLE_MODEL_PLURAL_DIR)
#
set(KIM_API_SIMULATOR_MODEL_PLURAL_DIR_IDENTIFIER "${KIM_API_SIMULATOR_MODEL_PLURAL_IDENTIFIER}-dir" CACHE INTERNAL "Simulator Models directory identifier")
#
string(MAKE_C_IDENTIFIER "${PROJECT_NAME}_${KIM_API_SIMULATOR_MODEL_PLURAL_DIR_IDENTIFIER}" _KIM_API_ENVIRONMENT_SIMULATOR_MODEL_PLURAL_DIR)
string(TOUPPER ${_KIM_API_ENVIRONMENT_SIMULATOR_MODEL_PLURAL_DIR} _KIM_API_ENVIRONMENT_SIMULATOR_MODEL_PLURAL_DIR)
set(KIM_API_ENVIRONMENT_SIMULATOR_MODEL_PLURAL_DIR "${_KIM_API_ENVIRONMENT_SIMULATOR_MODEL_PLURAL_DIR}" CACHE INTERNAL "Simulator Models directory environment variable name")
unset(_KIM_API_ENVIRONMENT_SIMULATOR_MODEL_PLURAL_DIR)
kim-api-2.2.1-git/cmake/Modules/DefineVersionVariables.cmake 0000664 0000000 0000000 00000011376 13765565573 0023745 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
set(PROJECT_VERSION_PRERELEASE "git" CACHE STRING "Project SemVer prerelease string") # cache to allow change from command line
set(_build_metadata "") # avoid uninitialized variable warning
find_package(Git QUIET)
if(${GIT_FOUND})
include(FindPackageMessage)
find_package_message(Git "Found Git: (${GIT_EXECUTABLE})" "found")
execute_process(COMMAND ${GIT_EXECUTABLE} -C "${PROJECT_SOURCE_DIR}" rev-parse --show-toplevel
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE _toplevel
RESULT_VARIABLE _isGitRepo
ERROR_QUIET
)
if((_isGitRepo EQUAL 0) AND ("${_toplevel}" STREQUAL "${PROJECT_SOURCE_DIR}"))
# set configuration to depend on _depend_file
#
# For details and discussion on the below approach, see:
# https://discourse.cmake.org/t/support-for-git-describe-output-in-a-semver-prerelease-string/1714?u=relliott
# https://github.com/ellio167/cmake-and-git-describe
#
# Overall this is a use case only of concern to active developers of the
# kim-api project. So, a better solution is not really necessary.
#
set(_git_describe_sentinel "git-describe-sentinel")
set(_depend_file "${CMAKE_CURRENT_BINARY_DIR}/.${_git_describe_sentinel}-file")
find_program(_touch touch)
if(${CMAKE_MINOR_VERSION} GREATER 11) # use file(GLOB CONFIGURE_DEPENDS ...) mechanism
if(EXISTS "${_depend_file}")
file(REMOVE "${_depend_file}")
endif()
file(GLOB _t CONFIGURE_DEPENDS "${_depend_file}")
unset(_t)
file(TOUCH "${_depend_file}")
elseif(_touch) # use system 'touch' with future timestamp and CMAKE_CONFIGURE_DEPENDS mechanism
string(TIMESTAMP _time "1%m%d%H%M")
math(EXPR _time "${_time} + 1")
string(REGEX REPLACE "^.(.*)$" "\\1" _time "${_time}")
execute_process(COMMAND ${_touch} -t "${_time}" "${_depend_file}") # set modification/access time 1min in the future
unset(_time)
set_property(DIRECTORY "${CURRENT_SOURCE_DIR}" APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${_depend_file}")
else() # use CMAKE_CONFIGURE_DEPENDS property mechanism [has a number of corner cases]
execute_process(COMMAND ${CMAKE_COMMAND} -E touch "${_depend_file}")
add_custom_target(${_git_describe_sentinel}-target ALL COMMAND ${CMAKE_COMMAND} -E touch "${_depend_file}")
set_property(DIRECTORY "${CURRENT_SOURCE_DIR}" APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${_depend_file}")
endif()
unset(_git_describe_sentinel)
unset(_depend_file)
execute_process(COMMAND ${GIT_EXECUTABLE} -C "${PROJECT_SOURCE_DIR}" update-index -q --refresh
TIMEOUT 5
OUTPUT_QUIET
ERROR_QUIET
)
if(READTHEDOCS)
set(_DIRTY "")
else()
set(_DIRTY ".dirty")
endif()
execute_process(
COMMAND ${GIT_EXECUTABLE} -C "${PROJECT_SOURCE_DIR}" describe --dirty=${_DIRTY} --broken=.broken --always
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE _git_describe
)
unset(_DIRTY)
set(_build_metadata "${_git_describe}")
unset(_git_describe)
endif()
endif()
if(NOT "${_build_metadata}" STREQUAL "")
string(APPEND _build_metadata ".")
endif()
string(APPEND _build_metadata "${CMAKE_CXX_COMPILER_ID}.${CMAKE_C_COMPILER_ID}.${CMAKE_Fortran_COMPILER_ID}")
set(PROJECT_VERSION_BUILD_METADATA "${_build_metadata}") # do not cache
unset(_build_metadata)
set(_version_string "${PROJECT_VERSION}")
if(PROJECT_VERSION_PRERELEASE)
set(_version_string "${_version_string}-${PROJECT_VERSION_PRERELEASE}")
endif()
set(PROJECT_VERSION_STRING_WITHOUT_BUILD_METADATA "${_version_string}") # used by pkg-config; do not cache
if(PROJECT_VERSION_BUILD_METADATA)
set(_version_string "${_version_string}+${PROJECT_VERSION_BUILD_METADATA}")
endif()
set(PROJECT_VERSION_STRING "${_version_string}") # do not cache
unset(_version_string)
kim-api-2.2.1-git/cmake/Modules/EnableCCompilerFlagIfSupported.cmake 0000664 0000000 0000000 00000003063 13765565573 0025311 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
include(CheckCCompilerFlag)
function(enable_c_compiler_flag_if_supported _flag)
if(NOT KIM_API_C_FLAGS)
set(KIM_API_C_FLAGS "")
endif()
string(MAKE_C_IDENTIFIER "${_flag}" _cid_flag)
string(FIND "${KIM_API_C_FLAGS}" "${_flag}" _flag_already_set)
if(_flag_already_set EQUAL -1)
check_c_compiler_flag("${_flag}" c_support_for_${_cid_flag})
if(c_support_for_${_cid_flag})
set(KIM_API_C_FLAGS "${KIM_API_C_FLAGS} ${_flag}" PARENT_SCOPE)
endif()
unset(c_support_for_${_cid_flag} CACHE)
endif()
endfunction(enable_c_compiler_flag_if_supported)
kim-api-2.2.1-git/cmake/Modules/EnableCXXCompilerFlagIfSupported.cmake 0000664 0000000 0000000 00000003113 13765565573 0025565 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
include(CheckCXXCompilerFlag)
function(enable_cxx_compiler_flag_if_supported _flag)
if(NOT KIM_API_CXX_FLAGS)
set(KIM_API_CXX_FLAGS "")
endif()
string(MAKE_C_IDENTIFIER "${_flag}" _cid_flag)
string(FIND "${KIM_API_CXX_FLAGS}" "${_flag}" _flag_already_set)
if(_flag_already_set EQUAL -1)
check_cxx_compiler_flag("${_flag}" cxx_support_for_${_cid_flag})
if(cxx_support_for_${_cid_flag})
set(KIM_API_CXX_FLAGS "${KIM_API_CXX_FLAGS} ${_flag}" PARENT_SCOPE)
endif()
unset(cxx_support_for_${_cid_flag} CACHE)
endif()
endfunction(enable_cxx_compiler_flag_if_supported)
kim-api-2.2.1-git/cmake/Modules/EnableFortranCompilerFlagIfSupported.cmake 0000664 0000000 0000000 00000003173 13765565573 0026544 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
include(CheckFortranCompilerFlag)
function(enable_fortran_compiler_flag_if_supported _flag)
if(NOT KIM_API_Fortran_FLAGS)
set(KIM_API_Fortran_FLAGS "")
endif()
string(MAKE_C_IDENTIFIER "${_flag}" _cid_flag)
string(FIND "${KIM_API_Fortran_FLAGS}" "${_flag}" _flag_already_set)
if(_flag_already_set EQUAL -1)
check_fortran_compiler_flag("${_flag}" fortran_support_for_${_cid_flag})
if(fortran_support_for_${_cid_flag})
set(KIM_API_Fortran_FLAGS "${KIM_API_Fortran_FLAGS} ${_flag}" PARENT_SCOPE)
endif()
unset(fortran_support_for_${_cid_flag} CACHE)
endif()
endfunction(enable_fortran_compiler_flag_if_supported)
kim-api-2.2.1-git/cmake/Modules/RelocatableGNUInstallDirs.cmake 0000664 0000000 0000000 00000003165 13765565573 0024311 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2020--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
macro(RelocatableGNUInstallDirs_get_relocatable_dir relocvar absvar var)
if("${${absvar}}" STREQUAL "${CMAKE_INSTALL_PREFIX}/${${var}}")
set(${relocvar} "${${var}}")
else()
set(${relocvar} "${${absvar}}")
endif()
endmacro(RelocatableGNUInstallDirs_get_relocatable_dir)
# Result directories
#
foreach(dir
BINDIR
SBINDIR
LIBEXECDIR
SYSCONFDIR
SHAREDSTATEDIR
LOCALSTATEDIR
RUNSTATEDIR
LIBDIR
INCLUDEDIR
OLDINCLUDEDIR
DATAROOTDIR
DATADIR
INFODIR
LOCALEDIR
MANDIR
DOCDIR
)
RelocatableGNUInstallDirs_get_relocatable_dir(CMAKE_INSTALL_RELOC_${dir} CMAKE_INSTALL_FULL_${dir} CMAKE_INSTALL_${dir})
endforeach()
kim-api-2.2.1-git/cmake/Modules/RelocatablePath.cmake 0000664 0000000 0000000 00000004655 13765565573 0022410 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2020--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
# relocatable_path() -- Construct a path "TO" one absolute filepath "FROM"
# another absolute path if their respective "TO_REL" and "FROM_REL" paths are
# both relative. Supports an optional RPATH_PREFIX to add any necessary
# leading rpath variable name. If either of "TO_REL" or "FROM_REL" are
# absolute, just return the absolute "FROM" filepath.
function(relocatable_path)
set(_options "")
set(_oneValueArgs RESULT_VARIABLE FROM FROM_REL TO TO_REL PREFIX)
set(_multiValueArgs "")
cmake_parse_arguments(_rel "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
if(_rel_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unparsed arguments found in 'relocatable_path()'")
endif()
if(NOT IS_ABSOLUTE "${_rel_FROM}")
message(FATAL_ERROR "FROM must be an absolute path in 'relocatable_path()'")
endif()
if(NOT IS_ABSOLUTE "${_rel_TO}")
message(FATAL_ERROR "TO must be an absolute filepath in 'relocatable_path()'")
endif()
if(NOT _rel_RESULT_VARIABLE)
message(FATAL_ERROR "RESULT_VARIABLE not provided in 'relocatable_path()'")
endif()
if(NOT _rel_PREFIX)
set(_rel_PREFIX "")
else()
set(_rel_PREFIX "${_rel_PREFIX}/")
endif()
if((NOT IS_ABSOLUTE "${_rel_FROM_REL}") AND (NOT IS_ABSOLUTE "${_rel_TO_REL}"))
file(RELATIVE_PATH _rel_rel "${_rel_FROM}" "${_rel_TO}")
set(${_rel_RESULT_VARIABLE} "${_rel_PREFIX}${_rel_rel}" PARENT_SCOPE)
else()
set(${_rel_RESULT_VARIABLE} "${_rel_TO}" PARENT_SCOPE)
endif()
endfunction(relocatable_path)
kim-api-2.2.1-git/cmake/Modules/SetCacheWithFallback.cmake 0000664 0000000 0000000 00000002321 13765565573 0023275 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2020--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
# inspired by GNUInstallDirs '_GNUInstallDirs_cache_path_fallback'
macro(set_cache_with_fallback var default type description)
if(NOT ${var})
set(${var} "" CACHE ${type} "${description}")
set(${var} "${default}")
endif()
endmacro(set_cache_with_fallback)
kim-api-2.2.1-git/cmake/Modules/WriteKIMConfigSummary.cmake 0000664 0000000 0000000 00000005112 13765565573 0023502 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
function(_write_kim_config_summary)
set(_log_detailed_in "${CMAKE_CURRENT_LIST_DIR}/kim-api-configuration-detailed.log.in")
set(_log_detailed "${PROJECT_BINARY_DIR}/kim-api-configuration-detailed.log")
set(_log_summary_in "${CMAKE_CURRENT_LIST_DIR}/kim-api-configuration-summary.log.in")
set(_log_summary "${PROJECT_BINARY_DIR}/kim-api-configuration-summary.log")
if(EXISTS "${_log_summary}")
file(SHA1 "${_log_summary}" _log_summary_sha1_before)
else()
set(_log_summary_sha1_before "")
endif()
set(UPDATE_WHEN_CMAKE_GREATER_THAN_3.12 "") # avoid uninitialized variable warning
# _log_detailed contains "CMAKE_*_CACHED_VALUE" references for cmake's (< 3.13) that don't have $CACHE{} ;; remove/change once min cmake is > 3.12
configure_file("${_log_detailed_in}" "${_log_detailed}")
# _log_summary contains "CMAKE_*_CACHED_VALUE" references for cmake's (< 3.13) that don't have $CACHE{} ;; remove/change once min cmake is > 3.12
string(TOUPPER "${CMAKE_BUILD_TYPE}" _BUILD_TYPE_UPPER) # used by _log_summary_in
configure_file("${_log_summary_in}" "${_log_summary}")
file(SHA1 "${_log_summary}" _log_summary_sha1_after)
if(NOT "${_log_summary_sha1_after}" STREQUAL "${_log_summary_sha1_before}")
file(READ "${_log_summary}" _log_content)
message(STATUS "\n\n${_log_content}")
message(STATUS "The above configuration information can also be found in:")
message(STATUS " ${_log_summary}")
message(STATUS "A more detailed configuration listing can be found in:")
message(STATUS " ${_log_detailed}")
message(STATUS "")
endif()
endfunction(_write_kim_config_summary)
_write_kim_config_summary()
kim-api-2.2.1-git/cmake/Modules/kim-api-configuration-detailed.log.in 0000664 0000000 0000000 00000013555 13765565573 0025430 0 ustar 00root root 0000000 0000000 ###
#
# kim-api configuration:
#
# === System values ======================
# CMAKE_SYSEM_NAME: ${CMAKE_SYSTEM_NAME}
# CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}
#
# === C++ compile values =================
# CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}
# CMAKE_CXX_COMPILER_VERSION: ${CMAKE_CXX_COMPILER_VERSION}
# CMAKE_CXX_COMPILER:
# ${CMAKE_CXX_COMPILER}
# KIM_API_CMAKE_CXX_COMPILER:
# ${KIM_API_CMAKE_CXX_COMPILER}
#
# CMAKE_CXX_STANDARD: ${CMAKE_CXX_STANDARD}
# CMAKE_CXX_STANDARD_REQUIRED: ${CMAKE_CXX_STANDARD_REQUIRED}
# CMAKE_CXX_EXTENSIONS: ${CMAKE_CXX_EXTENSIONS}
# CMAKE_CXX_FLAGS: ${UPDATE_WHEN_CMAKE_GREATER_THAN_3.12}${CMAKE_CXX_FLAGS_CACHED_VALUE}
# CMAKE_CXX_FLAGS_DEBUG: ${CMAKE_CXX_FLAGS_DEBUG}
# CMAKE_CXX_FLAGS_RELEASE: ${CMAKE_CXX_FLAGS_RELEASE}
# CMAKE_CXX_FLAGS_RELWITHDEBINFO: ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
# CMAKE_CXX_FLAGS_MINSIZEREL: ${CMAKE_CXX_FLAGS_MINSIZEREL}
#
# KIM_API_CXX_FLAGS: ${KIM_API_CXX_FLAGS}
#
# === C compile values ===================
# CMAKE_C_COMPILER_ID: ${CMAKE_C_COMPILER_ID}
# CMAKE_C_COMPILER_VERSION: ${CMAKE_C_COMPILER_VERSION}
# CMAKE_C_COMPILER:
# ${CMAKE_C_COMPILER}
# KIM_API_CMAKE_C_COMPILER:
# ${KIM_API_CMAKE_C_COMPILER}
#
# CMAKE_C_STANDARD: ${CMAKE_C_STANDARD}
# CMAKE_C_STANDARD_REQUIRED: ${CMAKE_C_STANDARD_REQUIRED}
# CMAKE_C_EXTENSIONS: ${CMAKE_C_EXTENSIONS}
# CMAKE_C_FLAGS: ${UPDATE_WHEN_CMAKE_GREATER_THAN_3.12}${CMAKE_C_FLAGS_CACHED_VALUE}
# CMAKE_C_FLAGS_DEBUG: ${CMAKE_C_FLAGS_DEBUG}
# CMAKE_C_FLAGS_RELEASE: ${CMAKE_C_FLAGS_RELEASE}
# CMAKE_C_FLAGS_RELWITHDEBINFO: ${CMAKE_C_FLAGS_RELWITHDEBINFO}
# CMAKE_C_FLAGS_MINSIZEREL: ${CMAKE_C_FLAGS_MINSIZEREL}
#
# KIM_API_C_FLAGS: ${KIM_API_C_FLAGS}
#
# === Fortran compile values =============
# CMAKE_Fortran_COMPILER_ID: ${CMAKE_Fortran_COMPILER_ID}
# CMAKE_Fortran_COMPILER_VERSION: ${CMAKE_Fortran_COMPILER_VERSION}
# CMAKE_Fortran_COMPILER:
# ${CMAKE_Fortran_COMPILER}
# KIM_API_CMAKE_Fortran_COMPILER:
# ${KIM_API_CMAKE_Fortran_COMPILER}
#
# CMAKE_Fortran_FLAGS: ${UPDATE_WHEN_CMAKE_GREATER_THAN_3.12}${CMAKE_Fortran_FLAGS_CACHED_VALUE}
# CMAKE_Fortran_FLAGS_DEBUG: ${CMAKE_Fortran_FLAGS_DEBUG}
# CMAKE_Fortran_FLAGS_RELEASE: ${CMAKE_Fortran_FLAGS_RELEASE}
# CMAKE_Fortran_FLAGS_RELWITHDEBINFO: ${CMAKE_Fortran_FLAGS_RELWITHDEBINFO}
# CMAKE_Fortran_FLAGS_MINSIZEREL: ${CMAKE_Fortran_FLAGS_MINSIZEREL}
#
# KIM_API_Fortran_FLAGS: ${KIM_API_Fortran_FLAGS}
#
# === Linker values ======================
# CMAKE_EXE_LINKER_FLAGS: ${UPDATE_WHEN_CMAKE_GREATER_THAN_3.12}${CMAKE_EXE_LINKER_FLAGS_CACHED_VALUE}
# CMAKE_EXE_LINKER_FLAGS_DEBUG: ${CMAKE_EXE_LINKER_FLAGS_DEBUG}
# CMAKE_EXE_LINKER_FLAGS_RELEASE: ${CMAKE_EXE_LINKER_FLAGS_RELEASE}
# CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO: ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO}
# CMAKE_EXE_LINKER_FLAGS_MINSIZEREL: ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL}
#
# KIM_API_EXE_LINKER_FLAGS: ${KIM_API_EXE_LINKER_FLAGS}
#
# === Build type value ===================
# CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}
#
# === Directory values ===================
# PROJECT_SOURCE_DIR:
# ${PROJECT_SOURCE_DIR}
# PROJECT_BINARY_DIR:
# ${PROJECT_BINARY_DIR}
#
# === Install directory values ===========
# CMAKE_INSTALL_PREFIX:
# ${CMAKE_INSTALL_PREFIX}
#
# CMAKE_INSTALL_INCLUDEDIR: ${CMAKE_INSTALL_INCLUDEDIR}
# CMAKE_INSTALL_BINDIR: ${CMAKE_INSTALL_BINDIR}
# CMAKE_INSTALL_LIBDIR: ${CMAKE_INSTALL_LIBDIR}
# CMAKE_INSTALL_LIBEXECDIR: ${CMAKE_INSTALL_LIBEXECDIR}
# CMAKE_INSTALL_SYSCONFDIR: ${CMAKE_INSTALL_SYSCONFDIR}
# CMAKE_INSTALL_DATADIR: ${CMAKE_INSTALL_DATADIR}
# CMAKE_INSTALL_DOCDIR: ${CMAKE_INSTALL_DOCDIR}
#
# BASH_COMPLETION_COMPLETIONSDIR: ${BASH_COMPLETION_COMPLETIONSDIR}
# ZSH_COMPLETION_COMPLETIONSDIR: ${ZSH_COMPLETION_COMPLETIONSDIR}
#
# === kim-api option values ==============
# KIM_API_PROJECT_NAME: ${KIM_API_PROJECT_NAME}
# KIM_API_CONFIGURATION_TIMESTAMP: ${KIM_API_CONFIGURATION_TIMESTAMP}
#
# PROJECT_VERSION: ${PROJECT_VERSION}
# PROJECT_VERSION_STRING: ${PROJECT_VERSION_STRING}
# KIM_API_UID: ${KIM_API_UID}
#
# KIM_API_LOG_MAXIMUM_LEVEL: ${KIM_API_LOG_MAXIMUM_LEVEL}
#
# KIM_API_BUILD_EXAMPLES: ${KIM_API_BUILD_EXAMPLES}
# KIM_API_ENABLE_SANITIZE: ${KIM_API_ENABLE_SANITIZE}
# KIM_API_ENABLE_COVERAGE: ${KIM_API_ENABLE_COVERAGE}
#
# KIM_API_USER_CONFIGURATION_FILE:
# ${KIM_API_USER_CONFIGURATION_FILE}
#
# KIM_API_SYSTEM_MODEL_DRIVERS_DIR:
# ${KIM_API_SYSTEM_MODEL_DRIVERS_DIR}
# KIM_API_SYSTEM_PORTABLE_MODELS_DIR:
# ${KIM_API_SYSTEM_PORTABLE_MODELS_DIR}
# KIM_API_SYSTEM_SIMULATOR_MODELS_DIR:
# ${KIM_API_SYSTEM_SIMULATOR_MODELS_DIR}
#
# KIM_API_USER_MODEL_DRIVERS_DIR_DEFAULT:
# ${KIM_API_USER_MODEL_DRIVERS_DIR_DEFAULT}
# KIM_API_USER_PORTABLE_MODELS_DIR_DEFAULT:
# ${KIM_API_USER_PORTABLE_MODELS_DIR_DEFAULT}
# KIM_API_USER_SIMULATOR_MODELS_DIR_DEFAULT:
# ${KIM_API_USER_SIMULATOR_MODELS_DIR_DEFAULT}
#
###
kim-api-2.2.1-git/cmake/Modules/kim-api-configuration-summary.log.in 0000664 0000000 0000000 00000003501 13765565573 0025340 0 ustar 00root root 0000000 0000000 ###
#
# kim-api configuration:
#
# === C++ compile values =================
# CMAKE_CXX_COMPILER: (${CMAKE_CXX_COMPILER_ID}, ${CMAKE_CXX_COMPILER_VERSION}, std=${CMAKE_CXX_STANDARD})
# ${CMAKE_CXX_COMPILER}
#
# === C compile values ===================
# CMAKE_C_COMPILER: (${CMAKE_C_COMPILER_ID}, ${CMAKE_C_COMPILER_VERSION}, std=${CMAKE_C_STANDARD})
# ${CMAKE_C_COMPILER}
#
# === Fortran compile values =============
# CMAKE_Fortran_COMPILER: (${CMAKE_Fortran_COMPILER_ID}, ${CMAKE_Fortran_COMPILER_VERSION})
# ${CMAKE_Fortran_COMPILER}
#
# === Build type value ===================
# CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}
#
# === Install directory values ===========
# CMAKE_INSTALL_PREFIX:
# ${CMAKE_INSTALL_PREFIX}
#
# CMAKE_INSTALL_INCLUDEDIR: ${CMAKE_INSTALL_INCLUDEDIR}
# CMAKE_INSTALL_BINDIR: ${CMAKE_INSTALL_BINDIR}
# CMAKE_INSTALL_LIBDIR: ${CMAKE_INSTALL_LIBDIR}
# CMAKE_INSTALL_LIBEXECDIR: ${CMAKE_INSTALL_LIBEXECDIR}
#
# === kim-api option values ==============
# KIM_API_PROJECT_NAME: ${KIM_API_PROJECT_NAME}
# KIM_API_CONFIGURATION_TIMESTAMP: ${KIM_API_CONFIGURATION_TIMESTAMP}
#
# PROJECT_VERSION: ${PROJECT_VERSION}
# PROJECT_VERSION_STRING: ${PROJECT_VERSION_STRING}
# KIM_API_UID: ${KIM_API_UID}
#
# KIM_API_LOG_MAXIMUM_LEVEL: ${KIM_API_LOG_MAXIMUM_LEVEL}
#
# KIM_API_BUILD_EXAMPLES: ${KIM_API_BUILD_EXAMPLES}
# KIM_API_ENABLE_SANITIZE: ${KIM_API_ENABLE_SANITIZE}
# KIM_API_ENABLE_COVERAGE: ${KIM_API_ENABLE_COVERAGE}
#
# KIM_API_USER_CONFIGURATION_FILE:
# ${KIM_API_USER_CONFIGURATION_FILE}
#
###
kim-api-2.2.1-git/cmake/build-tree-config.cmake.in 0000664 0000000 0000000 00000003344 13765565573 0021644 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
# Alexander Stukowski
#
#
# Release: This file is part of the kim-api.git repository.
#
# - KIM-API package for *build tree*
#
#
# REMOVE THIS IF AND KEEP BODY FOR 3.0.0 RELEASE!!!
if("${KIM-API_FIND_VERSION}" VERSION_GREATER "2.1.99")
add_library(KIM-API::kim-api ALIAS kim-api)
add_executable(KIM-API::portable-model-info ALIAS portable-model-info)
add_executable(KIM-API::simulator-model ALIAS simulator-model)
add_executable(KIM-API::collections-info ALIAS collections-info)
add_executable(KIM-API::shared-library-test ALIAS shared-library-test)
endif()
# REMOVE THE BELOW FOR 3.0.0 RELEASE!!!
if("${KIM-API_FIND_VERSION}" VERSION_LESS "2.2.0")
set(_KIM_API_BUILD_TREE_ACTIVE TRUE CACHE INTERNAL "build tree temp")
include("${CMAKE_CURRENT_LIST_DIR}/kim-api-pre-2.2-compatibility.cmake")
endif()
kim-api-2.2.1-git/cmake/build-tree-items-config.cmake.in 0000664 0000000 0000000 00000010256 13765565573 0022763 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
# Alexander Stukowski
#
#
# Release: This file is part of the kim-api.git repository.
#
# - KIM-API-ITEMS package for *build tree*
#
# kim_api_items_setup_before_project() - standard item configure, part 1
# kim_api_items_setup_after_project() - standard item configure, part 2
#
set(KIM_API_INSTALL_COLLECTION "SYSTEM" CACHE STRING "KIM API Collection in which to install items")
set_property(CACHE KIM_API_INSTALL_COLLECTION PROPERTY STRINGS SYSTEM)
mark_as_advanced(KIM_API_INSTALL_COLLECTION)
#
# Macro to perform any necessary standard configuration that must be completed
# BEFORE the user calls the 'project()' command
#
macro(kim_api_items_setup_before_project)
set(_options "")
set(_oneValueArgs ITEM_TYPE)
set(_multiValueArgs "")
cmake_parse_arguments(_before_setup "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
if(_before_setup_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unparsed arguments found in 'kim_api_items_setup_before_project'")
endif()
unset(_options)
unset(_oneValueArgs)
unset(_multiValueArgs)
set(_known_item_types portableModel modelDriver simulatorModel)
if(NOT ${_before_setup_ITEM_TYPE} IN_LIST _known_item_types)
message(FATAL_ERROR "Unknown KIM API Item type")
endif()
unset(_known_item_types)
# nothing else to do from the build tree...
endmacro(kim_api_items_setup_before_project)
#
# Macro to perform any necessary standard configuration that must be completed
# AFTER the user calls the 'project()' command
#
macro(kim_api_items_setup_after_project)
set(_options "")
set(_oneValueArgs ITEM_TYPE)
set(_multiValueArgs "")
cmake_parse_arguments(_after_setup "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
if(_after_setup_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unparsed arguments found in 'kim_api_items_setup_after_project'")
endif()
unset(_options)
unset(_oneValueArgs)
unset(_multiValueArgs)
set(_known_item_types portableModel modelDriver simulatorModel)
if(NOT ${_after_setup_ITEM_TYPE} IN_LIST _known_item_types)
message(FATAL_ERROR "Unknown KIM API Item type")
endif()
unset(_known_item_types)
# nothing else to do from the build tree...
find_package(KIM-API 2.2 REQUIRED CONFIG)
endmacro(kim_api_items_setup_after_project)
include("${CMAKE_CURRENT_LIST_DIR}/kim-api-items-macros.cmake")
function(_determine_default_system_collection_install_prefix _item_type)
if("${_item_type}" STREQUAL "")
message(FATAL_ERROR "Empty item type provided.")
endif()
if("${_item_type}" STREQUAL "modelDriver")
set(_dir_list "${KIM_API_SYSTEM_MODEL_DRIVERS_DIR}")
elseif("${_item_type}" STREQUAL "portableModel")
set(_dir_list "${KIM_API_SYSTEM_PORTABLE_MODELS_DIR}")
elseif("${_item_type}" STREQUAL "simulatorModel")
set(_dir_list "${KIM_API_SYSTEM_SIMULATOR_MODELS_DIR}")
else()
message(FATAL_ERROR "Unknown item type.")
endif()
string(REGEX REPLACE "^([^${KIM_API_PATH_SEPARATOR}]+).*" "\\1" _dir "${_dir_list}")
string(REGEX REPLACE "^(\\$ORIGIN|\\\${ORIGIN})" "${CMAKE_INSTALL_FULL_LIBDIR}" _dir "${_dir}")
if("${_dir}" STREQUAL "")
message(FATAL_ERROR "Unable to determine KIM API item install prefix.")
endif()
set(_ITEM_INSTALL_PREFIX "${_dir}" PARENT_SCOPE)
endfunction(_determine_default_system_collection_install_prefix)
kim-api-2.2.1-git/cmake/config.cmake.in 0000664 0000000 0000000 00000003030 13765565573 0017602 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
# Alexander Stukowski
#
#
# Release: This file is part of the kim-api.git repository.
#
#
# - KIM-API package
#
set(KIM-API_VERSION_STRING "@PROJECT_VERSION_STRING@")
set(KIM-API_UID "@KIM_API_UID@")
# REMOVE THIS IF AND KEEP BODY FOR 3.0.0 RELEASE!!!
if("${KIM-API_FIND_VERSION}" VERSION_GREATER "2.1.99")
include("${CMAKE_CURRENT_LIST_DIR}/kim-api-macros.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/kim-api-targets.cmake")
endif()
# REMOVE THE BELOW FOR 3.0.0 RELEASE!!!
if("${KIM-API_FIND_VERSION}" VERSION_LESS "2.2.0")
include("${CMAKE_CURRENT_LIST_DIR}/kim-api-pre-2.2-compatibility.cmake")
endif()
kim-api-2.2.1-git/cmake/item-compiled-with-version.txt.in 0000664 0000000 0000000 00000000031 13765565573 0023256 0 ustar 00root root 0000000 0000000 @PROJECT_VERSION_STRING@
kim-api-2.2.1-git/cmake/item-info.txt.in 0000664 0000000 0000000 00000002117 13765565573 0017770 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
item-type:@ITEM_TYPE@
item-name:@ITEM_NAME_QUOTED@
item-driver-name:@ITEM_DRIVER_NAME_QUOTED@
kim-api-2.2.1-git/cmake/item-wrapper.cpp.in 0000664 0000000 0000000 00000005063 13765565573 0020463 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include
#ifndef KIM_FUNCTION_TYPES_HPP_
#include "KIM_FunctionTypes.hpp"
#endif
extern "C" {
#ifndef KIM_FUNCTION_TYPES_H_
#include "KIM_FunctionTypes.h" // IWYU pragma: keep
#endif
}
#ifndef KIM_LANGUAGE_NAME_HPP_
#include "KIM_LanguageName.hpp"
#endif
#ifndef KIM_COLLECTION_ITEM_TYPE_HPP_
#include "KIM_CollectionItemType.hpp"
#endif
#ifndef KIM_SHARED_LIBRARY_SCHEMA_HPP_
#include "KIM_SharedLibrarySchema.hpp"
#endif
using namespace KIM::SHARED_LIBRARY_SCHEMA;
extern "C" {
// clang-format off
int kim_shared_library_schema_version = 2;
@ITEM_CREATE_ROUTINE_DECLARATION@
@ITEM_SM_SPEC_FILE_DECLARATIONS@
@ITEM_PARAMETER_FILE_DECLARATIONS@
@ITEM_METADATA_FILE_DECLARATIONS@
@ITEM_SM_SPEC_FILE_EMBEDDED_FILE_INITIALIZER_LIST@
@ITEM_PARAMETER_FILE_EMBEDDED_FILE_INITIALIZER_LIST@
@ITEM_METADATA_FILE_EMBEDDED_FILE_INITIALIZER_LIST@
SharedLibrarySchemaV2 kim_shared_library_schema = {
KIM::COLLECTION_ITEM_TYPE::@ITEM_TYPE@, // Item Type
@ITEM_NAME_QUOTED@, // Item Name
KIM::LANGUAGE_NAME::@ITEM_CREATE_ROUTINE_LANGUAGE@, // Create Routine Language
reinterpret_cast(@ITEM_CREATE_ROUTINE_NAME@), // Create Routine Name
@ITEM_DRIVER_NAME_QUOTED@, // Item Driver Name
@ITEM_SM_SPEC_FILE_EMBEDDED_FILE_IDENTIFIER@, // smspec File
@ITEM_NUMBER_OF_PARAMETER_FILES@, // Number of Parameter Files
@ITEM_PARAMETER_FILE_EMBEDDED_FILE_IDENTIFIER@, // Embedded Parameter Files
@ITEM_NUMBER_OF_METADATA_FILES@, // Number of Metadata Files
@ITEM_METADATA_FILE_EMBEDDED_FILE_IDENTIFIER@ // Embedded Metadata Files
};
}
// clang-format on
kim-api-2.2.1-git/cmake/items-config.cmake.in 0000664 0000000 0000000 00000006703 13765565573 0020733 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
# Alexander Stukowski
#
#
# Release: This file is part of the kim-api.git repository.
#
#
# - KIM-API-ITEMS package
#
# kim_api_items_setup_before_project() - standard item configure, part 1
# kim_api_items_setup_after_project() - standard item configure, part 2
#
if(NOT REMOVE_THIS_FOR_3_0_0_RELEASE)
set(REMOVE_THIS_FOR_3_0_0_RELEASE "")
endif()
set(KIM-API-ITEMS_VERSION_STRING "@PROJECT_VERSION_STRING@")
set(KIM-API-ITEMS_UID "@KIM_API_UID@")
#
# Macro to perform any necessary standard configuration that must be completed
# BEFORE the user calls the 'project()' command
#
macro(kim_api_items_setup_before_project)
set(_options "")
set(_oneValueArgs ITEM_TYPE)
set(_multiValueArgs "")
cmake_parse_arguments(_before_setup "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
if(_before_setup_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unparsed arguments found in 'kim_api_items_setup_before_project'")
endif()
unset(_options)
unset(_oneValueArgs)
unset(_multiValueArgs)
set(_known_item_types portableModel modelDriver simulatorModel)
if(NOT ${_before_setup_ITEM_TYPE} IN_LIST _known_item_types)
message(FATAL_ERROR "Unknown KIM API Item type")
endif()
unset(_known_item_types)
kim_api_items_set_cmake_compiler_variables()
kim_api_items_set_cmake_build_type_variable_in_cache()
endmacro(kim_api_items_setup_before_project)
#
# Macro to perform any necessary standard configuration that must be completed
# AFTER the user calls the 'project()' command
#
macro(kim_api_items_setup_after_project)
set(_options "")
set(_oneValueArgs ITEM_TYPE)
set(_multiValueArgs "")
cmake_parse_arguments(_after_setup "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
if(_after_setup_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unparsed arguments found in 'kim_api_items_setup_after_project'")
endif()
unset(_options)
unset(_oneValueArgs)
unset(_multiValueArgs)
set(_known_item_types portableModel modelDriver simulatorModel)
if(NOT ${_after_setup_ITEM_TYPE} IN_LIST _known_item_types)
message(FATAL_ERROR "Unknown KIM API Item type")
endif()
unset(_known_item_types)
# Enable CXX and C so that Items can list only the languages they actually use
enable_language(CXX)
enable_language(C)
enable_testing()
kim_api_items_set_cmake_compiler_standard_variables()
kim_api_items_prepend_compiler_flags_to_cmake_variables()
find_package(KIM-API 2.2 REQUIRED CONFIG)
endmacro(kim_api_items_setup_after_project)
include("${CMAKE_CURRENT_LIST_DIR}/kim-api-items-macros.cmake")
kim-api-2.2.1-git/cmake/items-macros.cmake.in 0000664 0000000 0000000 00000102545 13765565573 0020753 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
# Alexander Stukowski
#
#
# Release: This file is part of the kim-api.git repository.
#
# - Macros and Functions that are part of the KIM-API-ITEMS package
#
# add_kim_api_model_library() - create kim-api model target
# add_kim_api_model_driver_library() - creaet kim-api model driver target
#
#
# kim_api_items_set_compiler_variables()
# kim_api_items_set_cmake_compiler_variables()
#
# kim_api_items_set_compiler_standard_variables()
# kim_api_items_set_cmake_compiler_standard_variables()
#
# kim_api_items_set_compiler_flag_variables()
# kim_api_items_prepend_compiler_flags_to_cmake_variables()
#
# kim_api_items_set_build_type_variable()
# kim_api_items_set_cmake_build_type_variable_in_cache()
#
set(KIM_API_INSTALL_COLLECTION "SYSTEM" CACHE STRING "KIM API Collection in which to install items")
set_property(CACHE KIM_API_INSTALL_COLLECTION PROPERTY STRINGS SYSTEM USER ENVIRONMENT)
#
# Function to be used by KIM-API-ITEMS package users to add KIM-API items of type:
# * Portable models
# - Stand alone portable model
# - Parameterized portable model
# * Simulator model
#
function(add_kim_api_model_library${REMOVE_THIS_FOR_3_0_0_RELEASE})
set(_options "")
set(_oneValueArgs NAME DRIVER_NAME CREATE_ROUTINE_NAME CREATE_ROUTINE_LANGUAGE SM_SPEC_FILE)
set(_multiValueArgs PARAMETER_FILES METADATA_FILES)
cmake_parse_arguments(_MODEL "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
if(_MODEL_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unparsed arguments found in 'add_kim_api_model_library'")
endif()
# Determine item type
if(NOT "${_MODEL_SM_SPEC_FILE}" STREQUAL "")
set(_MODEL_TYPE "simulatorModel")
if(NOT "${_MODEL_DRIVER_NAME}" STREQUAL "")
message(FATAL_ERROR "Cannot specify SM_SPEC_FILE and DRIVER_NAME together")
endif()
if(NOT "${_MODEL_CREATE_ROUTINE_NAME}" STREQUAL "")
message(FATAL_ERROR "Cannot specify SM_SPEC_FILE and CREATE_ROUTINE_NAME together")
endif()
if(NOT "${_MODEL_CREATE_ROUTINE_LANGUAGE}" STREQUAL "")
message(FATAL_ERROR "Cannot specify SM_SPEC_FILE and CREATE_ROUTINE_LANGUAGE together")
endif()
else()
set(_MODEL_TYPE "portableModel")
if("${_MODEL_DRIVER_NAME}" STREQUAL "") # stand-alone
if("${_MODEL_CREATE_ROUTINE_NAME}" STREQUAL "")
message(FATAL_ERROR "Must specify CREATE_ROUTINE_NAME for stand-alone portable model")
endif()
if("${_MODEL_CREATE_ROUTINE_LANGUAGE}" STREQUAL "")
message(FATAL_ERROR "Must specify CREATE_ROUTINE_LANGUAGE for stand-alone portable model")
endif()
if(NOT "${_MODEL_PARAMETER_FILES}" STREQUAL "")
message(FATAL_ERROR "Cannot specify PARAMETER_FILES for stand-alone portable model")
endif()
else() # parameterized
if(NOT "${_MODEL_CREATE_ROUTINE_NAME}" STREQUAL "")
message(FATAL_ERROR "Cannot specify CREATE_ROUTINE_NAME for parameterized portable model")
endif()
if(NOT "${_MODEL_CREATE_ROUTINE_LANGUAGE}" STREQUAL "")
message(FATAL_ERROR "Cannot specify CREATE_ROUTINE_LANGUAGE for parameterized portable model")
endif()
if("${_MODEL_PARAMETER_FILES}" STREQUAL "")
message(FATAL_ERROR "Must specify PARAMETER_FILES for parameterized portable model")
endif()
endif()
endif()
_add_kim_api_library(
TYPE "${_MODEL_TYPE}"
NAME "${_MODEL_NAME}"
DRIVER_NAME "${_MODEL_DRIVER_NAME}"
CREATE_ROUTINE_LANGUAGE "${_MODEL_CREATE_ROUTINE_LANGUAGE}"
CREATE_ROUTINE_NAME "${_MODEL_CREATE_ROUTINE_NAME}"
SM_SPEC_FILE "${_MODEL_SM_SPEC_FILE}"
PARAMETER_FILES "${_MODEL_PARAMETER_FILES}"
METADATA_FILES "${_MODEL_METADATA_FILES}"
)
endfunction(add_kim_api_model_library${REMOVE_THIS_FOR_3_0_0_RELEASE})
#
# Function to be used by KIM-API-ITEMS package users to add KIM-API model driver items
#
function(add_kim_api_model_driver_library${REMOVE_THIS_FOR_3_0_0_RELEASE})
set(_options "")
set(_oneValueArgs NAME CREATE_ROUTINE_NAME CREATE_ROUTINE_LANGUAGE)
set(_multiValueArgs METADATA_FILES)
cmake_parse_arguments(_MODEL_DRIVER "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
if(_MODEL_DRIVER_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unparsed arguments found in 'add_kim_api_model_driver_library'")
endif()
if("${_MODEL_DRIVER_NAME}" STREQUAL "")
message(FATAL_ERROR "No Model Driver name provided")
endif()
if("${_MODEL_DRIVER_CREATE_ROUTINE_NAME}" STREQUAL "")
message(FATAL_ERROR "No Model Driver create routine name provided")
endif()
if("${_MODEL_DRIVER_CREATE_ROUTINE_LANGUAGE}" STREQUAL "")
message(FATAL_ERROR "No Model Driver create routine language provided")
endif()
_add_kim_api_library(
TYPE "modelDriver"
NAME "${_MODEL_DRIVER_NAME}"
DRIVER_NAME ""
CREATE_ROUTINE_LANGUAGE "${_MODEL_DRIVER_CREATE_ROUTINE_LANGUAGE}"
CREATE_ROUTINE_NAME "${_MODEL_DRIVER_CREATE_ROUTINE_NAME}"
SM_SPEC_FILE ""
PARAMETER_FILES ""
METADATA_FILES "${_MODEL_DRIVER_METADATA_FILES}"
)
endfunction(add_kim_api_model_driver_library${REMOVE_THIS_FOR_3_0_0_RELEASE})
macro(kim_api_items_set_compiler_variables)
set(KIM_API_CMAKE_CXX_COMPILER "@KIM_API_CMAKE_CXX_COMPILER@" CACHE FILEPATH "CXX Compiler used to build kim-api package")
set(KIM_API_CMAKE_C_COMPILER "@KIM_API_CMAKE_C_COMPILER@" CACHE FILEPATH "C Compiler used to build kim-api package")
set(KIM_API_CMAKE_Fortran_COMPILER "@KIM_API_CMAKE_Fortran_COMPILER@" CACHE FILEPATH "Fortran Compiler used to build kim-api package")
endmacro(kim_api_items_set_compiler_variables)
macro(kim_api_items_set_cmake_compiler_variables)
kim_api_items_set_compiler_variables()
set(CMAKE_CXX_COMPILER "${KIM_API_CMAKE_CXX_COMPILER}")
set(CMAKE_C_COMPILER "${KIM_API_CMAKE_C_COMPILER}")
set(CMAKE_Fortran_COMPILER "${KIM_API_CMAKE_Fortran_COMPILER}")
endmacro(kim_api_items_set_cmake_compiler_variables)
macro(kim_api_items_set_compiler_standard_variables)
# Language standards
#
set(KIM_API_CMAKE_CXX_STANDARD @CMAKE_CXX_STANDARD@ CACHE STRING "CXX_STANDARD used to build kim-api package")
set(KIM_API_CMAKE_CXX_STANDARD_REQUIRED @CMAKE_CXX_STANDARD_REQUIRED@ CACHE STRING "CXX_STANDARD_REQUIRED used to build kim-api package")
set(KIM_API_CMAKE_CXX_EXTENSIONS @CMAKE_CXX_EXTENSIONS@ CACHE STRING "CXX_EXTENSIONS used to build kim-api package")
#
set(KIM_API_CMAKE_C_STANDARD @CMAKE_C_STANDARD@ CACHE STRING "C_STANDARD used to build kim-api package")
set(KIM_API_CMAKE_C_STANDARD_REQUIRED @CMAKE_C_STANDARD_REQUIRED@ CACHE STRING "C_STANDARD_REQUIRED used to build kim-api package")
set(KIM_API_CMAKE_C_EXTENSIONS @CMAKE_C_EXTENSIONS@ CACHE STRING "C_EXTENSIONS used to build kim-api package")
#
# NO similar setting exist yet in CMake for Fortran
endmacro(kim_api_items_set_compiler_standard_variables)
macro(kim_api_items_set_cmake_compiler_standard_variables)
kim_api_items_set_compiler_standard_variables()
set(CMAKE_CXX_STANDARD ${KIM_API_CMAKE_CXX_STANDARD})
set(CMAKE_CXX_STANDARD_REQUIRED ${KIM_API_CMAKE_CXX_STANDARD_REQUIRED})
set(CMAKE_CXX_EXTENSIONS ${KIM_API_CMAKE_CXX_EXTENSIONS})
#
set(CMAKE_C_STANDARD ${KIM_API_CMAKE_C_STANDARD})
set(CMAKE_C_STANDARD_REQUIRED ${KIM_API_CMAKE_C_STANDARD_REQUIRED})
set(CMAKE_C_EXTENSIONS ${KIM_API_CMAKE_C_EXTENSIONS})
#
# NO similar setting exist yet in CMake for Fortran
endmacro(kim_api_items_set_cmake_compiler_standard_variables)
macro(kim_api_items_set_compiler_flag_variables)
set(KIM_API_EXE_LINKER_FLAGS "@KIM_API_EXE_LINKER_FLAGS@" CACHE STRING "EXE_LINKER_FLAGS used to build kim-api package")
set(KIM_API_CXX_FLAGS "@KIM_API_CXX_FLAGS@" CACHE STRING "CXX_FLAGS used to build kim-api package")
set(KIM_API_C_FLAGS "@KIM_API_C_FLAGS@" CACHE STRING "C_FLAGS used to build kim-api package")
set(KIM_API_Fortran_FLAGS "@KIM_API_Fortran_FLAGS@" CACHE STRING "Fortran_FLAGS used to build kim-api package")
endmacro(kim_api_items_set_compiler_flag_variables)
macro(kim_api_items_prepend_compiler_flags_to_cmake_variables)
kim_api_items_set_compiler_flag_variables()
set(CMAKE_EXE_LINKER_FLAGS "${KIM_API_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
set(CMAKE_CXX_FLAGS "${KIM_API_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")
set(CMAKE_C_FLAGS "${KIM_API_C_FLAGS} ${CMAKE_C_FLAGS}")
set(CMAKE_Fortran_FLAGS "${KIM_API_Fortran_FLAGS} ${CMAKE_Fortran_FLAGS}")
endmacro(kim_api_items_prepend_compiler_flags_to_cmake_variables)
macro(kim_api_items_set_build_type_variable)
set(KIM_API_CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@" CACHE STRING "Built type used to build kim-api package")
endmacro(kim_api_items_set_build_type_variable)
macro(kim_api_items_set_cmake_build_type_variable_in_cache)
kim_api_items_set_build_type_variable()
# enable_language() will cache a default value unless CMAKE_BUILD_TYPE has
# previously been cached elsewhere. So, typically this macro must be used
# before a call to project().
set(CMAKE_BUILD_TYPE "${KIM_API_CMAKE_BUILD_TYPE}" CACHE STRING "Build Type")
endmacro(kim_api_items_set_cmake_build_type_variable_in_cache)
#
# Function to set ITEM_* variables in parent scope for use in configuring
# item-wrapper.cpp.in
#
# This function does error checking only for each variable individaully,
# it does not attempt to validate values across variables.
#
function(_set_item_template_variables)
set(_options "")
set(_oneValueArgs
TYPE NAME DRIVER_NAME CREATE_ROUTINE_LANGUAGE CREATE_ROUTINE_NAME SM_SPEC_FILE)
set(_multiValueArgs PARAMETER_FILES METADATA_FILES)
cmake_parse_arguments(_ITEM "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
if(_ITEM_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unparsed arguments found in '_set_item_template_variables'")
endif()
# ITEM_TYPE
set(_KNOWN_TYPES portableModel modelDriver simulatorModel)
if(NOT ${_ITEM_TYPE} IN_LIST _KNOWN_TYPES)
message(FATAL_ERROR "Unknown KIM item type")
endif()
unset(_KNOWN_TYPES)
set(ITEM_TYPE "${_ITEM_TYPE}" PARENT_SCOPE)
# ITEM_NAME and ITEM_NAME_QUOTED
if("${_ITEM_NAME}" STREQUAL "")
message(FATAL_ERROR "KIM items must be given names")
endif()
string(MAKE_C_IDENTIFIER "${_ITEM_NAME}" _ITEM_C_NAME)
if(NOT "${_ITEM_C_NAME}" STREQUAL "${_ITEM_NAME}")
message(FATAL_ERROR "KIM item names must be valid C identifiers")
endif()
set(ITEM_NAME "${_ITEM_NAME}" PARENT_SCOPE)
set(ITEM_NAME_QUOTED "\"${_ITEM_NAME}\"" PARENT_SCOPE)
# ITEM_DRIVER_NAME and ITEM_DRIVER_NAME_QUOTED
if("${_ITEM_DRIVER_NAME}" STREQUAL "")
set(ITEM_DRIVER_NAME "" PARENT_SCOPE)
set(ITEM_DRIVER_NAME_QUOTED "NULL" PARENT_SCOPE)
else()
set(ITEM_DRIVER_NAME "${_ITEM_DRIVER_NAME}" PARENT_SCOPE)
set(ITEM_DRIVER_NAME_QUOTED "\"${_ITEM_DRIVER_NAME}\"" PARENT_SCOPE)
endif()
# ITEM_CREATE_ROUTINE_LANGUAGE
set(_KNOWN_LANGUAGES cpp c fortran)
if(NOT "${_ITEM_CREATE_ROUTINE_LANGUAGE}" IN_LIST _KNOWN_LANGUAGES)
message(FATAL_ERROR "Unknown KIM item create routine language")
endif()
unset(_KNOWN_LANGUAGES)
set(ITEM_CREATE_ROUTINE_LANGUAGE "${_ITEM_CREATE_ROUTINE_LANGUAGE}" PARENT_SCOPE)
# ITEM_CREATE_ROUTINE_NAME
if("${_ITEM_CREATE_ROUTINE_NAME}" STREQUAL "")
set(ITEM_CREATE_ROUTINE_NAME "NULL" PARENT_SCOPE)
else()
set(ITEM_CREATE_ROUTINE_NAME "${_ITEM_CREATE_ROUTINE_NAME}" PARENT_SCOPE)
endif()
# ITEM_CREATE_ROUTINE_DECLARATION
if("${_ITEM_CREATE_ROUTINE_NAME}" STREQUAL "")
set(ITEM_CREATE_ROUTINE_DECLARATION "" PARENT_SCOPE)
else()
if("${_ITEM_TYPE}" STREQUAL "modelDriver")
set(_create_typedef "ModelDriverCreateFunction")
else()
set(_create_typedef "ModelCreateFunction")
endif()
if("${_ITEM_CREATE_ROUTINE_LANGUAGE}" STREQUAL "cpp")
set(ITEM_CREATE_ROUTINE_DECLARATION "KIM::${_create_typedef} ${_ITEM_CREATE_ROUTINE_NAME};" PARENT_SCOPE)
elseif("${_ITEM_CREATE_ROUTINE_LANGUAGE}" STREQUAL "c")
set(ITEM_CREATE_ROUTINE_DECLARATION "KIM_${_create_typedef} ${_ITEM_CREATE_ROUTINE_NAME};" PARENT_SCOPE)
elseif("${_ITEM_CREATE_ROUTINE_LANGUAGE}" STREQUAL "fortran")
set(ITEM_CREATE_ROUTINE_DECLARATION
"void ${_ITEM_CREATE_ROUTINE_NAME}(KIM_${_create_typedef} *, KIM_LengthUnit, KIM_EnergyUnit, KIM_ChargeUnit, KIM_TemperatureUnit, KIM_TimeUnit, int *);" PARENT_SCOPE)
else()
message(FATAL_ERROR "Unknown KIM item create routine language")
endif()
unset(_create_typedef)
endif()
# ITEM_SM_SPEC_FILE
set(ITEM_SM_SPEC_FILE "${_ITEM_SM_SPEC_FILE}" PARENT_SCOPE)
# ITEM_NUMBER_OF_SM_SPEC_FILES
list(LENGTH _ITEM_SM_SPEC_FILE _LIST_LEN)
set(ITEM_NUMBER_OF_SM_SPEC_FILES ${_LIST_LEN} PARENT_SCOPE)
unset(_LIST_LEN)
if(ITEM_NUMBER_OF_SM_SPEC_FILES GREATER 1)
message(FATAL_ERROR "There can only be one smspec file")
endif()
# ITEM_PARAMETER_FILES
set(ITEM_PARAMETER_FILES "${_ITEM_PARAMETER_FILES}" PARENT_SCOPE)
# ITEM_NUMBER_OF_PARAMETER_FILES
list(LENGTH _ITEM_PARAMETER_FILES _LIST_LEN)
set(ITEM_NUMBER_OF_PARAMETER_FILES ${_LIST_LEN} PARENT_SCOPE)
# ITEM_METADATA_FILES
set(_METADATA_LOCAL_FILES "item-compiled-with-version.txt")
list(INSERT _ITEM_METADATA_FILES 0 "${_METADATA_LOCAL_FILES}")
unset(_METADATA_LOCAL_FILES)
file(GLOB _OPENKIM_STANDARD_METADATA_FILES
LIST_DIRECTORIES false
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
"kimspec.edn" "kimprovenance.edn" "kimcite-*.bib")
if(_OPENKIM_STANDARD_METADATA_FILES)
foreach(_FL IN LISTS _OPENKIM_STANDARD_METADATA_FILES)
file(SHA1 "${CMAKE_CURRENT_SOURCE_DIR}/${_FL}" _FL_SHA1)
if (NOT "${_FL_SHA1}" STREQUAL "da39a3ee5e6b4b0d3255bfef95601890afd80709") # SHA1 hash of empty file
list(APPEND _ITEM_METADATA_FILES "${_FL}")
endif()
endforeach()
unset(_FL)
endif()
unset(_OPENKIM_STANDARD_METADATA_FILES)
set(ITEM_METADATA_FILES "${_ITEM_METADATA_FILES}" PARENT_SCOPE)
# ITEM_NUMBER_OF_METADATA_FILES
list(LENGTH _ITEM_METADATA_FILES _LIST_LEN)
set(ITEM_NUMBER_OF_METADATA_FILES ${_LIST_LEN} PARENT_SCOPE)
unset(_LIST_LEN)
endfunction(_set_item_template_variables)
macro(_set_model_driver_template_variables)
set(_options "")
set(_oneValueArgs NAME CREATE_ROUTINE_LANGUAGE CREATE_ROUTINE_NAME)
set(_multiValueArgs METADATA_FILES)
cmake_parse_arguments(_ITEM "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
if(_ITEM_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unparsed arguments found in '_set_model_driver_template_variables'")
endif()
unset(_options)
unset(_oneValueArgs)
unset(_multiValueArgs)
if("${_ITEM_CREATE_ROUTINE_NAME}" STREQUAL "")
message(FATAL_ERROR "Create routine name must be provided")
endif()
_set_item_template_variables(
TYPE "modelDriver"
NAME "${_ITEM_NAME}"
DRIVER_NAME ""
CREATE_ROUTINE_LANGUAGE "${_ITEM_CREATE_ROUTINE_LANGUAGE}"
CREATE_ROUTINE_NAME "${_ITEM_CREATE_ROUTINE_NAME}"
SM_SPEC_FILE ""
PARAMETER_FILES ""
METADATA_FILES "${_ITEM_METADATA_FILES}"
)
endmacro(_set_model_driver_template_variables)
#
# Macro to set ITEM_* variables for a STAND ALONE PORTABLE MODEL in current
# scope for use in configuring item-wrapper.cpp.in
#
# This function does error checking to validate all necessary values are
# provided.
#
macro(_set_stand_alone_portable_model_template_variables)
set(_options "")
set(_oneValueArgs NAME CREATE_ROUTINE_LANGUAGE CREATE_ROUTINE_NAME)
set(_multiValueArgs METADATA_FILES)
cmake_parse_arguments(_ITEM "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
if(_ITEM_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unparsed arguments found in '_set_stand_alone_portable_model_template_variables'")
endif()
unset(_options)
unset(_oneValueArgs)
unset(_multiValueArgs)
if("${_ITEM_CREATE_ROUTINE_NAME}" STREQUAL "")
message(FATAL_ERROR "Create routine name must be provided")
endif()
_set_item_template_variables(
TYPE "portableModel"
NAME "${_ITEM_NAME}"
DRIVER_NAME ""
CREATE_ROUTINE_LANGUAGE "${_ITEM_CREATE_ROUTINE_LANGUAGE}"
CREATE_ROUTINE_NAME "${_ITEM_CREATE_ROUTINE_NAME}"
SM_SPEC_FILE ""
PARAMETER_FILES ""
METADATA_FILES "${_ITEM_METADATA_FILES}"
)
endmacro()
#
# Macro to set ITEM_* variables for a PARAMETERIZED PORTABLE MODEL in current
# scope for use in configuring item-wrapper.cpp.in
#
# This function does error checking to validate all necessary values are
# provided.
#
macro(_set_parameterized_portable_model_template_variables)
set(_options "")
set(_oneValueArgs NAME DRIVER_NAME)
set(_multiValueArgs PARAMETER_FILES METADATA_FILES)
cmake_parse_arguments(_ITEM "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
if(_ITEM_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unparsed arguments found in '_set_parameterized_portable_model_template_variables'")
endif()
unset(_options)
unset(_oneValueArgs)
unset(_multiValueArgs)
if("${_ITEM_DRIVER_NAME}" STREQUAL "")
message(FATAL_ERROR "Driver name must be provided")
endif()
if("${_ITEM_PARAMETER_FILES}" STREQUAL "")
message(FATAL_ERROR "Parameter files must be provided")
endif()
_set_item_template_variables(
TYPE "portableModel"
NAME "${_ITEM_NAME}"
DRIVER_NAME "${_ITEM_DRIVER_NAME}"
CREATE_ROUTINE_LANGUAGE "cpp"
CREATE_ROUTINE_NAME ""
SM_SPEC_FILE ""
PARAMETER_FILES "${_ITEM_PARAMETER_FILES}"
METADATA_FILES "${_ITEM_METADATA_FILES}"
)
endmacro()
#
# Macro to set ITEM_* variables for a SIMULATOR MODEL in current scope for use
# in configuring item-wrapper.cpp.in
#
# This function does error checking to validate all necessary values are
# provided.
#
macro(_set_simulator_model_template_variables)
set(_options "")
set(_oneValueArgs NAME SM_SPEC_FILE)
set(_multiValueArgs PARAMETER_FILES METADATA_FILES)
cmake_parse_arguments(_ITEM "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
if(_ITEM_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unparsed arguments found in '_set_simulator_model_template_variables'")
endif()
unset(_options)
unset(_oneValueArgs)
unset(_multiValueArgs)
if("${_ITEM_SM_SPEC_FILE}" STREQUAL "")
message(FATAL_ERROR "smspec file must be provided")
endif()
# OK for there to be no parameter files
_set_item_template_variables(
TYPE "simulatorModel"
NAME "${_ITEM_NAME}"
DRIVER_NAME ""
CREATE_ROUTINE_LANGUAGE "cpp"
CREATE_ROUTINE_NAME ""
SM_SPEC_FILE "${_ITEM_SM_SPEC_FILE}"
PARAMETER_FILES "${_ITEM_PARAMETER_FILES}"
METADATA_FILES "${_ITEM_METADATA_FILES}"
)
endmacro()
#
# Function to create a custom command to convert a file (blob) to a c source.
#
# Convert _filein to hex then format as c source file and write to _fileout.
# Assumes _filein is a relative file name in the _dirin directory.
#
# Sets _blob_to_c_command to string for use with add_custom_command()
#
function(_add_custom_command_blob_to_c _dirin _filein _fileout)
include(FindPackageMessage)
find_program(XXD_EXECUTABLE "xxd")
if(XXD_EXECUTABLE)
find_package_message(xxd "Found xxd: (${XXD_EXECUTABLE})" "found")
string(MAKE_C_IDENTIFIER ${_filein} _cfilein)
set(_edit_xxd_output "${CMAKE_CURRENT_BINARY_DIR}/EditXXDOutput.cmake")
if(NOT EXISTS "${_edit_xxd_output}")
file(WRITE "${_edit_xxd_output}" # use a bracket argument to avoid ugly escaping
[=[
# This file was automatically generated by CMake; do not edit.
file(READ "${fileout}" _content)
string(REGEX REPLACE "unsigned char.*[[][]]" "unsigned char const ${varname}[]" _content "${_content}")
string(REGEX REPLACE "unsigned int.*=" "unsigned int const ${varname}_len =" _content "${_content}")
file(WRITE "${fileout}" "${_content}")
unset(_content)
]=]
)
endif()
add_custom_command(OUTPUT ${_fileout}
COMMAND ${XXD_EXECUTABLE} -i "${_filein}" "${_fileout}"
COMMAND ${CMAKE_COMMAND} "-Dvarname=${_cfilein}" "-Dfilein=${_filein}" "-Dfileout=${_fileout}" -P "${_edit_xxd_output}"
DEPENDS "${_dirin}/${_filein}" "${_edit_xxd_output}"
WORKING_DIRECTORY "${_dirin}"
)
unset(_cfilein)
unset(_edit_xxd_output)
else()
find_package_message(xxd "Missing xxd: Falling back to less efficient cmake implementation." "missing")
string(MAKE_C_IDENTIFIER ${_filein} _cfilein)
set(_blob_to_source "${CMAKE_CURRENT_BINARY_DIR}/BlobToCSource.cmake")
if(NOT EXISTS "${_blob_to_source}")
file(WRITE "${_blob_to_source}" # use a bracket argument to avoid ugly escaping
[=[
# This file was automatically generated by CMake; do not edit.
file(READ "${filein}" _content HEX)
string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1," _content "${_content}")
string(REGEX REPLACE ",$" "" _content "${_content}")
file(WRITE "${fileout}" "unsigned char const ${varname}[] = { ${_content} };\n")
file(APPEND "${fileout}" "unsigned int const ${varname}_len = sizeof( ${varname} );\n")
unset(_content)
]=]
)
endif()
add_custom_command(OUTPUT ${_fileout}
COMMAND ${CMAKE_COMMAND} "-Dvarname=${_cfilein}" "-Dfilein=${_filein}" "-Dfileout=${_fileout}" -P "${_blob_to_source}"
DEPENDS "${_dirin}/${_filein}" "${_blob_to_source}"
WORKING_DIRECTORY "${_dirin}"
)
unset(_cfilein)
unset(_blob_to_source)
endif()
endfunction(_add_custom_command_blob_to_c)
#
# Function to create and define targets for c source files from provided data
# files. Assumes files are in either current source or current binary dir.
#
# Sets ITEM_*_SOURCES, ITEM_*_DECLARATIONS, ITEM_*_EMBEDDED_FILE_IDENTIFIER,
# and ITEM_*_EMBEDDED_FILE_INITIALIZER_LIST variables in parent scope.
#
function(_xxd_process_files)
set(_options "")
set(_oneValueArgs FILE_TYPE)
set(_multiValueArgs FILE_NAMES)
cmake_parse_arguments(_ITEM "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
if(_ITEM_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unparsed arguments found in macro '_xxd_process_files'")
endif()
unset(_options)
unset(_oneValueArgs)
unset(_multiValueArgs)
if("${_ITEM_FILE_TYPE}" STREQUAL "")
message(FATAL_ERROR "FILE_TYPE must be provided")
endif()
set(_ITEM_SOURCES "")
set(_ITEM_DECLARATIONS "")
set(_ITEM_EMBEDDED_FILE_INITIALIZER_LIST "")
set(_ITEM_EMBEDDED_FILE_IDENTIFIER "NULL")
if (_ITEM_FILE_NAMES)
foreach(_FNAME ${_ITEM_FILE_NAMES})
string(MAKE_C_IDENTIFIER ${_FNAME} _CFNAME)
if("${_ITEM_DECLARATIONS}" STREQUAL "")
set(_ITEM_DECLARATIONS "extern unsigned int const ${_CFNAME}_len;\n")
set(_ITEM_DECLARATIONS "${_ITEM_DECLARATIONS}extern unsigned char const ${_CFNAME}[];")
set(_ITEM_EMBEDDED_FILE_IDENTIFIER "${_ITEM_FILE_TYPE}_Files")
set(_ITEM_EMBEDDED_FILE_INITIALIZER_LIST "static SharedLibrarySchemaV2::EmbeddedFile const ${_ITEM_FILE_TYPE}_Files[] = {\n")
set(_ITEM_EMBEDDED_FILE_INITIALIZER_LIST "${_ITEM_EMBEDDED_FILE_INITIALIZER_LIST} {\"${_FNAME}\", ${_CFNAME}_len, ${_CFNAME}}")
else()
set(_ITEM_DECLARATIONS "${_ITEM_DECLARATIONS}\nextern unsigned int const ${_CFNAME}_len;\n")
set(_ITEM_DECLARATIONS "${_ITEM_DECLARATIONS}extern unsigned char const ${_CFNAME}[];")
set(_ITEM_EMBEDDED_FILE_INITIALIZER_LIST "${_ITEM_EMBEDDED_FILE_INITIALIZER_LIST},\n {\"${_FNAME}\", ${_CFNAME}_len, ${_CFNAME}}")
endif()
unset(_CFNAME)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_FNAME}")
set(_DIR_IN "${CMAKE_CURRENT_SOURCE_DIR}")
elseif(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/${_FNAME}")
set(_DIR_IN "${CMAKE_CURRENT_BINARY_DIR}")
else()
message(FATAL_ERROR "Cannot find metadata file '${_FNAME}'")
endif()
set(_FILE "${CMAKE_CURRENT_BINARY_DIR}/${_FNAME}.c")
list(APPEND _ITEM_SOURCES ${_FILE})
_add_custom_command_blob_to_c("${_DIR_IN}" "${_FNAME}" "${_FILE}")
unset(_DIR_IN)
endforeach()
unset(_FNAME)
set(_ITEM_EMBEDDED_FILE_INITIALIZER_LIST "${_ITEM_EMBEDDED_FILE_INITIALIZER_LIST}\n};")
endif()
set(ITEM_${_ITEM_FILE_TYPE}_SOURCES "${_ITEM_SOURCES}" PARENT_SCOPE)
set(ITEM_${_ITEM_FILE_TYPE}_DECLARATIONS "${_ITEM_DECLARATIONS}" PARENT_SCOPE)
set(ITEM_${_ITEM_FILE_TYPE}_EMBEDDED_FILE_IDENTIFIER "${_ITEM_EMBEDDED_FILE_IDENTIFIER}" PARENT_SCOPE)
set(ITEM_${_ITEM_FILE_TYPE}_EMBEDDED_FILE_INITIALIZER_LIST "${_ITEM_EMBEDDED_FILE_INITIALIZER_LIST}" PARENT_SCOPE)
endfunction(_xxd_process_files)
#
# Function to set collection install prefix and item library file name.
#
# Sets ITEM_INSTALL_PREFIX and ITEM_OUTPUT_NAME variables in parent scope.
#
function(_determine_collection_install_prefix_and_output_name _item_type)
if("${_item_type}" STREQUAL "")
message(FATAL_ERROR "Empty item type provided.")
endif()
if("${_item_type}" STREQUAL "modelDriver")
set(_item_type_upper "MODEL_DRIVER")
set(_item_arg "model_drivers")
set(_ITEM_OUTPUT_NAME "@PROJECT_NAME@-@KIM_API_MODEL_DRIVER_IDENTIFIER@")
elseif("${_item_type}" STREQUAL "portableModel")
set(_item_type_upper "PORTABLE_MODEL")
set(_item_arg "portable_models")
set(_ITEM_OUTPUT_NAME "@PROJECT_NAME@-@KIM_API_PORTABLE_MODEL_IDENTIFIER@")
elseif("${_item_type}" STREQUAL "simulatorModel")
set(_item_type_upper "SIMULATOR_MODEL")
set(_item_arg "simulator_models")
set(_ITEM_OUTPUT_NAME "@PROJECT_NAME@-@KIM_API_SIMULATOR_MODEL_IDENTIFIER@")
else()
message(FATAL_ERROR "Unknown item type.")
endif()
#
if("${KIM_API_INSTALL_COLLECTION}" STREQUAL "SYSTEM")
set(_col_arg "system")
elseif(KIM_API_INSTALL_COLLECTION STREQUAL "USER")
set(_col_arg "config_file")
elseif(KIM_API_INSTALL_COLLECTION STREQUAL "ENVIRONMENT")
set(_col_arg "env")
else()
message(FATAL_ERROR "Unknown value of KIM_API_INSTALL_COLLECTION : ${KIM_API_INSTALL_COLLECTION}.")
endif()
get_property(_IMPORTED TARGET KIM-API::collections-info PROPERTY "IMPORTED")
if(_IMPORTED) # using install tree config
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
set(_BUILD_TYPE "NOCONFIG")
else()
string(TOUPPER "${CMAKE_BUILD_TYPE}" _BUILD_TYPE)
endif()
get_property(_COLLECTIONS_INFO TARGET KIM-API::collections-info PROPERTY "IMPORTED_LOCATION_${_BUILD_TYPE}")
unset(_BUILD_TYPE)
if("${_COLLECTIONS_INFO}" STREQUAL "")
message(FATAL_ERROR "Unable to locate 'collections-info' utility")
endif()
execute_process(COMMAND ${_COLLECTIONS_INFO} ${_col_arg} ${_item_arg} OUTPUT_VARIABLE _ITEM_INSTALL_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE RESULT_VARIABLE _error)
unset(_COLLECTIONS_INFO)
unset(_col_arg)
unset(_item_arg)
string(REGEX REPLACE "^([^\n]+)\n.*" "\\1" _ITEM_INSTALL_PREFIX "${_ITEM_INSTALL_PREFIX}")
# check for command line override of install prefix
#
# UNDOCUMENTED FEATURE (used by homebrew, as of this writing)
#
# KIM_API_MODEL_DRIVER_INSTALL_PREFIX
# KIM_API_PORTABLE_MODEL_INSTALL_PREFIX
# KIM_API_SIMULATOR_MODEL_INSTALL_PREFIX
#
if(DEFINED KIM_API_${_item_type_upper}_INSTALL_PREFIX)
set(_ITEM_INSTALL_PREFIX "${KIM_API_${_item_type_upper}_INSTALL_PREFIX}")
endif()
unset(_item_type_upper)
else() # using build tree config
if(NOT "${KIM_API_INSTALL_COLLECTION}" STREQUAL "SYSTEM")
message(FATAL_ERROR "Cannot install into ${KIM_API_INSTALL_COLLECTION} collection during KIM API build")
else()
_determine_default_system_collection_install_prefix(${_item_type})
endif()
endif()
unset(_IMPORTED)
if("${_ITEM_INSTALL_PREFIX}" STREQUAL "")
message(FATAL_ERROR "Unable to determine KIM API item install prefix.")
endif()
#
set(ITEM_INSTALL_PREFIX "${_ITEM_INSTALL_PREFIX}" PARENT_SCOPE)
set(ITEM_OUTPUT_NAME "${_ITEM_OUTPUT_NAME}" PARENT_SCOPE)
endfunction(_determine_collection_install_prefix_and_output_name)
#
# Wrapper function for CMake's standard add_test() function, which takes care of setting up the DLL search path on Windows.
# The function signature is the same as for the built-in add_test() function:
#
# add_kim_api_test(NAME COMMAND [...]
# [CONFIGURATIONS ...]
# [WORKING_DIRECTORY]
# [COMMAND_EXPAND_LISTS])
#
# The wrapper function sets up the ENVIRONMENT property of the test case to extend the DLL search path.
# Make sure you do not overwrite that property's value when setting up a custom environment
# for the test case. Use set_property(TEST ... APPEND PROPERTY ENVIRONMENT ...) to add further
# environment variables.
#
function(add_kim_api_test)
# Foward the function call and all arguments to the built-in add_test() function.
cmake_parse_arguments(KIMAPI_TEST "" "NAME" "" ${ARGN})
add_test(NAME ${KIMAPI_TEST_NAME} ${KIMAPI_TEST_UNPARSED_ARGUMENTS})
# Determine the value of the PATH environment variable to be used for running the CMake test.
# It is required on Windows, because kim-api.dll needs to be in the search
# path when running the test executables. We prepend the CMake build directory to the existing PATH variable.
if(CYGWIN)
# CMake under Cygwin expects ':' separated path list with '/' directory separators (Unix style).
set_property(TEST ${KIMAPI_TEST_NAME} APPEND PROPERTY ENVIRONMENT "PATH=$:$ENV{PATH}")
elseif(MINGW)
# CMake under MinGW expects ';' separated path list with '\' directory separators (Windows style).
string(REPLACE ";" "\\;" PATH_VALUE "$ENV{PATH}")
set_property(TEST ${KIMAPI_TEST_NAME} APPEND PROPERTY ENVIRONMENT "PATH=$>\;${PATH_VALUE}")
else()
# No PATH needed on Unix/Linux platforms, where shared libraries are located using the rpath mechanism.
endif()
endfunction(add_kim_api_test)
#
# Function to create a library target of any item type. Uniformly processes
# various data files and creates shared-library cmake test which ensures that
# there are no undefined symbols in the shared library.
#
function(_add_kim_api_library)
set(_options "")
set(_oneValueArgs
TYPE NAME DRIVER_NAME CREATE_ROUTINE_LANGUAGE CREATE_ROUTINE_NAME SM_SPEC_FILE)
set(_multiValueArgs PARAMETER_FILES METADATA_FILES)
cmake_parse_arguments(_ITEM "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
if(_ITEM_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unparsed arguments found in '_add_kim_api_library'")
endif()
unset(_options)
unset(_oneValueArgs)
unset(_multiValueArgs)
file(COPY ${KIM-API-ITEMS_DIR}/item-compiled-with-version.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
if("${_ITEM_TYPE}" STREQUAL "modelDriver")
_set_model_driver_template_variables(
NAME "${_ITEM_NAME}"
CREATE_ROUTINE_NAME "${_ITEM_CREATE_ROUTINE_NAME}"
CREATE_ROUTINE_LANGUAGE "${_ITEM_CREATE_ROUTINE_LANGUAGE}"
METADATA_FILES "${_ITEM_METADATA_FILES}"
)
elseif("${_ITEM_TYPE}" STREQUAL "portableModel")
if("${_ITEM_CREATE_ROUTINE_NAME}" STREQUAL "")
_set_parameterized_portable_model_template_variables(
NAME "${_ITEM_NAME}"
DRIVER_NAME "${_ITEM_DRIVER_NAME}"
PARAMETER_FILES "${_ITEM_PARAMETER_FILES}"
METADATA_FILES "${_ITEM_METADATA_FILES}"
)
else()
_set_stand_alone_portable_model_template_variables(
NAME "${_ITEM_NAME}"
CREATE_ROUTINE_LANGUAGE "${_ITEM_CREATE_ROUTINE_LANGUAGE}"
CREATE_ROUTINE_NAME "${_ITEM_CREATE_ROUTINE_NAME}"
METADATA_FILES "${_ITEM_METADATA_FILES}"
)
endif()
elseif("${_ITEM_TYPE}" STREQUAL "simulatorModel")
_set_simulator_model_template_variables(
NAME "${_ITEM_NAME}"
SM_SPEC_FILE "${_ITEM_SM_SPEC_FILE}"
PARAMETER_FILES "${_ITEM_PARAMETER_FILES}"
METADATA_FILES "${_ITEM_METADATA_FILES}"
)
else()
message(FATAL_ERROR "Unknown item type")
endif()
set(_ITEM_SOURCES "")
_xxd_process_files(FILE_TYPE SM_SPEC_FILE FILE_NAMES "${ITEM_SM_SPEC_FILE}")
list(APPEND _ITEM_SOURCES ${ITEM_SM_SPEC_FILE_SOURCES})
_xxd_process_files(FILE_TYPE PARAMETER_FILE FILE_NAMES "${ITEM_PARAMETER_FILES}")
list(APPEND _ITEM_SOURCES ${ITEM_PARAMETER_FILE_SOURCES})
_xxd_process_files(FILE_TYPE METADATA_FILE FILE_NAMES "${ITEM_METADATA_FILES}")
list(APPEND _ITEM_SOURCES ${ITEM_METADATA_FILE_SOURCES})
configure_file(${KIM-API-ITEMS_DIR}/item-info.txt.in ${CMAKE_CURRENT_BINARY_DIR}/item-info.txt @ONLY)
configure_file(${KIM-API-ITEMS_DIR}/item-wrapper.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/item-wrapper.cpp @ONLY)
list(APPEND _ITEM_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/item-wrapper.cpp)
add_library(${ITEM_NAME} MODULE ${_ITEM_SOURCES})
target_include_directories(${ITEM_NAME} PRIVATE ${KIM-API-ITEMS_DIR})
target_link_libraries(${ITEM_NAME} PRIVATE KIM-API::kim-api)
_determine_collection_install_prefix_and_output_name("${_ITEM_TYPE}")
set_target_properties(${ITEM_NAME} PROPERTIES OUTPUT_NAME "${ITEM_OUTPUT_NAME}")
install(TARGETS ${ITEM_NAME} LIBRARY DESTINATION "${ITEM_INSTALL_PREFIX}/${ITEM_NAME}")
add_kim_api_test(NAME shared_library_test_${ITEM_NAME}
COMMAND KIM-API::shared-library-test $)
endfunction(_add_kim_api_library)
kim-api-2.2.1-git/cmake/macros.cmake.in 0000664 0000000 0000000 00000002050 13765565573 0017622 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
# Alexander Stukowski
#
#
# Release: This file is part of the kim-api.git repository.
#
# nothing to be done here...
kim-api-2.2.1-git/cmake/pre-2.2-compatibility.cmake.in 0000664 0000000 0000000 00000011141 13765565573 0022273 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
# Alexander Stukowski
#
#
# Release: This file is part of the kim-api.git repository.
#
#
# - Code for backward compatibility with pre 2.2.0 KIM-API behavior
#
# Set various cmake variables (compilers, etc.) and set various KIM_API
# variables. Also provide the following macros
#
# add_kim_api_imported_library() - add kim-api library target
# add_kim_api_compiler_flags() - set extra compile/link flags
#
# REMOVE THIS FILE FOR 3.0.0 RELEASE!!!
message(WARNING
"\n"
"Pre 2.2.0 KIM-API package behavior is deprecated and will be "
"removed in 3.0.0. Please update your CMakeLists.txt file to "
"use a find_package() signature similar to one of the following:\n"
" find_package(KIM-API 2.2 REQUIRED CONFIG)\n"
" find_package(KIM-API-ITEMS 2.2 REQUIRED CONFIG)\n"
"See the examples in the KIM API source package for more details."
"\n"
)
include(CMakeFindDependencyMacro)
set(REMOVE_THIS_FOR_3_0_0_RELEASE "_pre22")
find_dependency(KIM-API-ITEMS ${KIM-API_FIND_VERSION})
kim_api_items_set_cmake_compiler_standard_variables()
kim_api_items_set_cmake_build_type_variable_in_cache()
kim_api_items_set_cmake_compiler_variables()
kim_api_items_set_compiler_flag_variables()
set(KIM_API_PROJECT_NAME @KIM_API_PROJECT_NAME@)
set(KIM_API_VERSION @PROJECT_VERSION@)
# wrap add_kim_api_model_library() and add_kim_api_model_driver_library()
macro(add_kim_api_model_library)
if (NOT TARGET kim-api OR NOT TARGET KIM-API::kim-api)
kim_api_items_prepend_compiler_flags_to_cmake_variables()
add_kim_api_imported_library()
endif()
add_kim_api_model_library_pre22(${ARGN})
endmacro(add_kim_api_model_library)
macro(add_kim_api_model_driver_library)
if (NOT TARGET kim-api OR NOT TARGET KIM-API::kim-api)
kim_api_items_prepend_compiler_flags_to_cmake_variables()
add_kim_api_imported_library()
endif()
add_kim_api_model_driver_library_pre22(${ARGN})
endmacro(add_kim_api_model_driver_library)
macro(add_kim_api_imported_library)
if(_KIM_API_BUILD_TREE_ACTIVE)
add_library(KIM-API::kim-api ALIAS kim-api)
add_executable(KIM-API::portable-model-info ALIAS portable-model-info)
add_executable(KIM-API::simulator-model ALIAS simulator-model)
add_executable(KIM-API::collections-info ALIAS collections-info)
add_executable(KIM-API::shared-library-test ALIAS shared-library-test)
else()
include("${KIM-API_DIR}/kim-api-macros.cmake")
include("${KIM-API_DIR}/kim-api-targets.cmake")
# add shadow kim-api target
add_library(kim-api SHARED IMPORTED)
get_property(_config TARGET KIM-API::kim-api PROPERTY IMPORTED_CONFIGURATIONS)
foreach(_cfg IN LISTS _config)
get_property(_loc TARGET KIM-API::kim-api PROPERTY IMPORTED_LOCATION_${_cfg})
set_property(TARGET kim-api PROPERTY IMPORTED_LOCATION_${_cfg} ${_loc})
get_property(_so TARGET KIM-API::kim-api PROPERTY IMPORTED_SONAME_${_cfg})
set_property(TARGET kim-api PROPERTY IMPORTED_SONAME_${_cfg} ${_so})
endforeach()
get_property(_val TARGET KIM-API::kim-api PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
set_property(TARGET kim-api PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_val})
# add shadow collections-info target
add_executable(collections-info IMPORTED)
get_property(_config TARGET KIM-API::collections-info PROPERTY IMPORTED_CONFIGURATIONS)
foreach(_cfg IN LISTS _config)
get_property(_loc TARGET KIM-API::collections-info PROPERTY IMPORTED_LOCATION_${_cfg})
set_property(TARGET collections-info PROPERTY IMPORTED_LOCATION_${_cfg} ${_loc})
endforeach()
endif()
endmacro(add_kim_api_imported_library)
macro(add_kim_api_compiler_flags)
kim_api_items_prepend_compiler_flags_to_cmake_variables()
endmacro(add_kim_api_compiler_flags)
kim-api-2.2.1-git/completions/ 0000775 0000000 0000000 00000000000 13765565573 0016206 5 ustar 00root root 0000000 0000000 kim-api-2.2.1-git/completions/CMakeLists.txt 0000664 0000000 0000000 00000004571 13765565573 0020755 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
# Jim Madge
# Yaser Afshar
#
#
# Release: This file is part of the kim-api.git repository.
#
include(RelocatablePath)
set(BASH_COMPLETIONS ${PROJECT_NAME}-collections-management.bash)
set(ZSH_COMPLETIONS ${PROJECT_NAME}-collections-management.zsh)
relocatable_path(
FROM "${BASH_COMPLETION_FULL_COMPLETIONSDIR}" FROM_REL "${CMAKE_INSTALL_RELOC_SYSCONFDIR}"
TO "${CMAKE_INSTALL_FULL_LIBEXECDIR}/${PROJECT_NAME}/${PROJECT_NAME}-collections-info" TO_REL "${CMAKE_INSTALL_RELOC_LIBEXECDIR}"
PREFIX "\${ORIGIN}"
RESULT_VARIABLE _collections_info_rel
)
configure_file(collections-management.bash.in ${BASH_COMPLETIONS} @ONLY)
unset(_collections_info_rel)
relocatable_path(
FROM "${ZSH_COMPLETION_FULL_COMPLETIONSDIR}" FROM_REL "${CMAKE_INSTALL_RELOC_SYSCONFDIR}"
TO "${BASH_COMPLETION_FULL_COMPLETIONSDIR}/${BASH_COMPLETIONS}" TO_REL "${CMAKE_INSTALL_RELOC_SYSCONFDIR}"
PREFIX "\${ORIGIN}"
RESULT_VARIABLE _bashcomp_rel
)
configure_file(collections-management.zsh.in ${ZSH_COMPLETIONS} @ONLY)
unset(_bashcomp_rel)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/${BASH_COMPLETIONS}
# use CMAKE_INSTALL_RELOC_* to get relocatable GNUInstallDir behavior
DESTINATION ${BASH_COMPLETION_RELOC_COMPLETIONSDIR}
)
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/${ZSH_COMPLETIONS}
# use CMAKE_INSTALL_RELOC_* to get relocatable GNUInstallDir behavior
DESTINATION ${ZSH_COMPLETION_RELOC_COMPLETIONSDIR}
RENAME "_${PROJECT_NAME}-collections-management"
)
kim-api-2.2.1-git/completions/collections-management.bash.in 0000664 0000000 0000000 00000014170 13765565573 0024105 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2018--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
_@KIM_API_C_ID_PROJECT_NAME@_collections_management()
{
local ORIGIN
if test -n "${ZSH_VERSION}"; then
ORIGIN=$(cd "$(dirname "${(%):-%x}")" && pwd)
else
# Get ORIGIN location of this script:
SOURCE="${BASH_SOURCE[0]}"
# https://stackoverflow.com/questions/59895/how-to-get-the-source-directory-of-a-bash-script-from-within-the-script-itself
if command -v readlink >/dev/null 2>&1; then
while test -h "$SOURCE"; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
fi
ORIGIN="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
fi
local collections_info
collections_info=@_collections_info_rel@
local cd_type
if test -n "${ZSH_VERSION}"; then
cd_type=`type -w _cd | sed -e 's/^[^:]*: *//'`
else
cd_type=`type -t _cd`
fi
local cur subcommands opts
subcommands="list set-user-model-drivers-dir set-user-portable-models-dir "
subcommands="${subcommands} set-user-simulator-models-dir install reinstall"
subcommands="${subcommands} remove remove-all"
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
if test ${COMP_CWORD} -eq 1; then
COMPREPLY=( $(compgen -W "${subcommands}" -- "${cur}") )
return 0
else
case "${COMP_WORDS[1]}" in
list)
opts=""
if test ${COMP_CWORD} -eq 2; then
opts="--log"
else
return 1
fi
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
set-user-*)
if test ${COMP_CWORD} -gt 2; then
return 1
else
if test x"function" = x"${cd_type}"; then # check if bash_completion has been loaded & _cd defined
_cd
fi
return 0
fi
;;
install)
if test ${COMP_CWORD} -eq 2; then
COMPREPLY=( $(compgen -W "--force CWD environment user system" \
-- "${cur}") )
return 0
fi
if test ${COMP_CWORD} -eq 3 -a x"${COMP_WORDS[2]}" = x"--force"; then
COMPREPLY=( $(compgen -W "CWD environment user system" \
-- "${cur}") )
return 0
fi
local collection_position
if test x"${COMP_WORDS[2]}" = x"--force"; then
collection_position=3
else
collection_position=2
fi
opts=""
if test ${COMP_CWORD} -eq `expr ${collection_position} + 1` \
-a x"system" = x"${COMP_WORDS[${collection_position}]}"; then
opts="--sudo OpenKIM"
elif test ${COMP_CWORD} -eq 3; then
opts="OpenKIM"
fi
local query='query={"type":{"$regex":"md|mo|sm"},"kim-api-version":{"$regex":"^@PROJECT_VERSION_MAJOR@\\."}}'
query="${query}"'&fields={"kimcode":1}'
query="${query}"'&database=obj&history=on'
local list=`wget -q -O - --post-data="${query}" \
https://query.openkim.org/api | \
sed -e 's/\[//g' -e 's/\]//g' \
-e 's/{"kimcode": "\([^"]*\)"},*/\1/g'`
opts="${opts} ${list}"
if test x"function" = x"${cd_type}"; then # check if bash_completion has been loaded & _cd defined
_cd
fi
COMPREPLY=( "${COMPREPLY[@]}" $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
reinstall|remove)
opts=""
if test ${COMP_CWORD} -eq 2; then
opts="--force --interactive --sudo"
elif test ${COMP_CWORD} -eq 3 -a x"--interactive" = x"${COMP_WORDS[2]}"; then
opts="--sudo"
elif test ${COMP_CWORD} -eq 3 -a x"--force" = x"${COMP_WORDS[2]}"; then
opts="--sudo"
fi
local models drivers simulator_models
drivers=`${collections_info} model_drivers | sed -e 's|[^[:space:]]* \([^[:space:]]*\) .*|\1|'`
models=`${collections_info} portable_models | sed -e 's|[^[:space:]]* \([^[:space:]]*\) .*|\1|'`
drivers=`${collections_info} simulator_models | sed -e 's|[^[:space:]]* \([^[:space:]]*\) .*|\1|'`
opts="${opts} ${drivers} ${models} ${simulator_models}"
if test x"reinstall" = x"${COMP_WORDS[1]}"; then
if test x"function" = x"cd_type"; then # check if bash_completion has been loaded & _cd defined
_cd
fi
fi
COMPREPLY=( "${COMPREPLY[@]}" $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
remove-all)
opts=""
if test ${COMP_CWORD} -eq 2; then
opts="--force --interactive --sudo"
elif test ${COMP_CWORD} -eq 3 -a x"--interactive" = x"${COMP_WORDS[2]}"; then
opts="--sudo"
elif test ${COMP_CWORD} -eq 3 -a x"--force" = x"${COMP_WORDS[2]}"; then
opts="--sudo"
fi
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
*)
return 1
;;
esac
fi
return 1
}
complete -F _@KIM_API_C_ID_PROJECT_NAME@_collections_management @PROJECT_NAME@-collections-management
kim-api-2.2.1-git/completions/collections-management.zsh.in 0000664 0000000 0000000 00000002672 13765565573 0024000 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2018--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Ryan S. Elliott
# Yaser Afshar
#
#
# Release: This file is part of the kim-api.git repository.
#
if test -n "${ZSH_VERSION}"; then
# While complete is a bash builtin function, ZSH comes with
# bashcompinit that creates the same functionality.
# The option -U suppresses the alias expansion during reading
# using functions in ZSH.
autoload -U +X bashcompinit
bashcompinit
autoload -U +X compinit
if test x"${ZSH_DISABLE_COMPFIX}" = x"true"; then
compinit -u
else
compinit
fi
fi
ORIGIN=$(cd "$(dirname "${(%):-%x}")" && pwd)
source "@_bashcomp_rel@"
kim-api-2.2.1-git/cpp/ 0000775 0000000 0000000 00000000000 13765565573 0014434 5 ustar 00root root 0000000 0000000 kim-api-2.2.1-git/cpp/include/ 0000775 0000000 0000000 00000000000 13765565573 0016057 5 ustar 00root root 0000000 0000000 kim-api-2.2.1-git/cpp/include/CMakeLists.txt 0000664 0000000 0000000 00000005010 13765565573 0020613 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
#
#
# Release: This file is part of the kim-api.git repository.
#
target_include_directories(kim-api PUBLIC
$
$
)
configure_file(KIM_LOG_DEFINES.inc.in ${CMAKE_CURRENT_BINARY_DIR}/KIM_LOG_DEFINES.inc)
configure_file(KIM_Version.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/KIM_Version.hpp)
set(CPP_HEADERS
KIM_ChargeUnit.hpp
KIM_Collection.hpp
KIM_CollectionItemType.hpp
KIM_Collections.hpp
KIM_ComputeArgumentName.hpp
KIM_ComputeArguments.hpp
KIM_ComputeCallbackName.hpp
KIM_DataType.hpp
KIM_EnergyUnit.hpp
KIM_FunctionTypes.hpp
KIM_LanguageName.hpp
KIM_LengthUnit.hpp
KIM_Log.hpp
KIM_LogMacros.hpp
KIM_LogVerbosity.hpp
KIM_ModelComputeArgumentsCreate.hpp
KIM_ModelComputeArgumentsDestroy.hpp
KIM_ModelComputeArguments.hpp
KIM_ModelCompute.hpp
KIM_ModelCreate.hpp
KIM_ModelExtension.hpp
KIM_ModelDestroy.hpp
KIM_ModelDriverCreate.hpp
KIM_ModelDriverHeaders.hpp
KIM_ModelHeaders.hpp
KIM_Model.hpp
KIM_ModelRefresh.hpp
KIM_ModelRoutineName.hpp
KIM_ModelWriteParameterizedModel.hpp
KIM_Numbering.hpp
KIM_SemVer.hpp
KIM_SimulatorHeaders.hpp
KIM_SimulatorModel.hpp
KIM_SpeciesName.hpp
KIM_SupportedExtensions.hpp
KIM_SupportStatus.hpp
KIM_TemperatureUnit.hpp
KIM_TimeUnit.hpp
KIM_UnitSystem.hpp
${CMAKE_CURRENT_BINARY_DIR}/KIM_LOG_DEFINES.inc
${CMAKE_CURRENT_BINARY_DIR}/KIM_Version.hpp
)
install(FILES ${CPP_HEADERS}
# use CMAKE_INSTALL_RELOC_* to get relocatable GNUInstallDir behavior
DESTINATION ${CMAKE_INSTALL_RELOC_INCLUDEDIR}/${PROJECT_NAME})
kim-api-2.2.1-git/cpp/include/KIM_ChargeUnit.hpp 0000664 0000000 0000000 00000013532 13765565573 0021325 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_CHARGE_UNIT_HPP_
#define KIM_CHARGE_UNIT_HPP_
#include
namespace KIM
{
/// \brief An \ref extensible_enumeration "Extensible Enumeration" for the
/// ChargeUnit's supported by the %KIM API.
///
/// The enumeration constants are contained in the CHARGE_UNIT namespace.
///
/// \sa KIM_ChargeUnit, kim_charge_unit_module
///
/// \since 2.0
class ChargeUnit
{
public:
/// \brief Integer identifying the specific ChargeUnit represented.
///
/// \note This should not be directly accessed and is only public for
/// cross-language reasons.
///
/// \sa KIM_ChargeUnit::chargeUnitID,
/// kim_charge_unit_module::kim_charge_unit_type::charge_unit_id
///
/// \since 2.0
int chargeUnitID;
/// \brief Create an uninitialized ChargeUnit object.
///
/// \since 2.0
ChargeUnit();
/// \brief Create a ChargeUnit object with the specified id.
///
/// \note This should not be used directly.
///
/// \since 2.0
ChargeUnit(int const id);
/// \brief Create a ChargeUnit object corresponding to the provided string.
/// If the string does not match one of the values defined by the %KIM API,
/// then an "unknown" object is generated.
///
/// \sa KIM_ChargeUnit_FromString, kim_charge_unit_module::kim_from_string
///
/// \since 2.0
ChargeUnit(std::string const & str);
/// \brief Determines if the object is a quantity known to the %KIM API.
///
/// ChargeUnit's known to the %KIM API are found in the CHARGE_UNIT
/// namespace.
///
/// \sa KIM_ChargeUnit_Known, kim_charge_unit_module::kim_known
///
/// \since 2.0
bool Known() const;
/// \brief Compares ChargeUnit objects for equality.
///
/// \note Not all "unknown" objects are equal.
///
/// \sa KIM_ChargeUnit_Equal, kim_charge_unit_module::operator(.eq.)
///
/// \since 2.0
bool operator==(ChargeUnit const & rhs) const;
/// \brief Compares ChargeUnit objects for inequality.
///
/// \note It is possible for two "unknown" objects to be not equal.
///
/// \sa KIM_ChargeUnit_NotEqual, kim_charge_unit_module::operator(.ne.)
///
/// \since 2.0
bool operator!=(ChargeUnit const & rhs) const;
/// \brief Converts the object to a string.
///
/// \return A string object representing the ChargeUnit object.
///
/// \note If the ChargeUnit object does not correspond to a value defined by
/// the %KIM API, then the string "unknown" is returned.
///
/// \sa KIM_ChargeUnit_ToString, kim_charge_unit_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
}; // class ChargeUnit
/// \brief Contains the enumeration constants and the discovery routines for
/// the ChargeUnit \ref extensible_enumeration "Extensible Enumeration".
namespace CHARGE_UNIT
{
/// \brief Indicates that a ChargeUnit is not used.
///
/// \sa KIM_CHARGE_UNIT_unused, kim_charge_unit_module::kim_charge_unit_unused
///
/// \since 2.0
extern ChargeUnit const unused;
/// \brief The standard Coulomb unit of charge.
///
/// \sa KIM_CHARGE_UNIT_C, kim_charge_unit_module::kim_charge_unit_c
///
/// \since 2.0
extern ChargeUnit const C;
/// \brief The standard electron unit of charge.
///
/// \sa KIM_CHARGE_UNIT_e, kim_charge_unit_module::kim_charge_unit_e
///
/// \since 2.0
extern ChargeUnit const e;
/// \brief The standard statcoulomb unit of charge.
///
/// \sa KIM_CHARGE_UNIT_statC, kim_charge_unit_module::kim_charge_unit_statc
///
/// \since 2.0
extern ChargeUnit const statC;
/// \brief Get the number of standard ChargeUnit's defined by the %KIM API.
///
/// \param[out] numberOfChargeUnits The number of standard ChargeUnit's defined
/// by the %KIM API.
///
/// \sa KIM_CHARGE_UNIT_GetNumberOfChargeUnits,
/// kim_charge_unit_module::kim_get_number_of_charge_units
///
/// \since 2.0
void GetNumberOfChargeUnits(int * const numberOfChargeUnits);
/// \brief Get the identity of each defined standard ChargeUnit.
///
/// \param[in] index Zero-based index uniquely labeling each defined standard
/// ChargeUnit. This index ordering is only guaranteed to be
/// stable during the lifetime of the current process.
/// \param[out] chargeUnit The ChargeUnit object associated with \c index.
///
/// \return \c true if `index < 0` or `index >= numberOfChargeUnits`.
/// \return \c false otherwise.
///
/// \sa KIM_CHARGE_UNIT_GetChargeUnit,
/// kim_charge_unit_module::kim_get_charge_unit
///
/// \since 2.0
int GetChargeUnit(int const index, ChargeUnit * const chargeUnit);
/// \brief Structure provided for use with std::map.
///
/// \since 2.0
struct Comparator
{
/// \brief Provides an (logically unmeaningful) ordering for ChargeUnit
/// objects so that they can be stored in a std::map.
///
/// \since 2.0
bool operator()(ChargeUnit const & a, ChargeUnit const & b) const
{
return a.chargeUnitID < b.chargeUnitID;
}
}; // struct Comparator
} // namespace CHARGE_UNIT
} // namespace KIM
#endif // KIM_CHARGE_UNIT_HPP_
kim-api-2.2.1-git/cpp/include/KIM_Collection.hpp 0000664 0000000 0000000 00000014166 13765565573 0021373 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_COLLECTION_HPP_
#define KIM_COLLECTION_HPP_
#include
namespace KIM
{
/// \brief An \ref extensible_enumeration "Extensible Enumeration" for the
/// Collection's supported by the %KIM API.
///
/// The enumeration constants are contained in the COLLECTION namespace.
///
/// \sa KIM_Collection, kim_collection_module::kim_collection_type
///
/// \since 2.1
class Collection
{
public:
/// \brief Integer identifying the specific Collection represented.
///
/// \note This should not be directly accessed and is only public for
/// cross-language reasons.
///
/// \sa KIM_Collection::collectionID,
/// kim_collection_module::kim_collection_type::collection_id
///
/// \since 2.1
int collectionID;
/// \brief Create an uninitialized Collection object.
///
/// \since 2.1
Collection();
/// \brief Create a Collection object with the specified id.
///
/// \note This should not be used directly.
///
/// \since 2.1
Collection(int const id);
/// \brief Create a Collection object corresponding to the provided
/// string. If the string does not match one of the values defined by the
/// %KIM API, then an "unknown" object is generated.
///
/// \sa KIM_Collection_FromString, kim_collection_module::kim_from_string
///
/// \since 2.1
Collection(std::string const & str);
/// \brief Determines if the object is a quantity known to the %KIM API.
///
/// Collection's known to the %KIM API are found in the COLLECTION namespace.
///
/// \sa KIM_Collection_Known, kim_collection_module::kim_known
///
/// \since 2.1
bool Known() const;
/// \brief Compares Collection objects for equality.
///
/// \note Not all "unknown" objects are equal.
///
/// \sa KIM_Collection_Equal, kim_collection_module::operator(.eq.)
///
/// \since 2.1
bool operator==(Collection const & rhs) const;
/// \brief Compares Collection objects for inequality.
///
/// \note It is possible for two "unknown" objects to be not equal.
///
/// \sa KIM_Collection_NotEqual,
/// kim_collection_module::operator(.ne.)
///
/// \since 2.1
bool operator!=(Collection const & rhs) const;
/// \brief Converts the object to a string.
///
/// \return A string object representing the Collection object.
///
/// \note If the Collection object does not correspond to a value
/// defined by the %KIM API, then the string "unknown" is returned.
///
/// \sa KIM_Collection_ToString, kim_collection_module::kim_to_string
///
/// \since 2.1
std::string const & ToString() const;
}; // class Collection
/// \brief Contains the enumeration constants and the discovery routines for
/// the Collection \ref extensible_enumeration "Extensible Enumeration".
namespace COLLECTION
{
/// \brief The standard \c system Collection.
///
/// The system wide collection.
///
/// \sa KIM_COLLECTION_system, kim_collection_module::kim_collection_system
///
/// \since 2.1
extern Collection const system;
/// \brief The standard \c user Collection.
///
/// The user collection.
///
/// \sa KIM_COLLECTION_user,
/// kim_collection_module::kim_collection_user
///
/// \since 2.1
extern Collection const user;
/// \brief The standard \c environmentVariable Collection.
///
/// The environment variable collection.
///
/// \sa KIM_COLLECTION_environmentVariable,
/// kim_collection_module::kim_collection_environment_variable
///
/// \since 2.1
extern Collection const environmentVariable;
/// \brief The standard \c currentWorkingDirectory Collection.
///
/// The current working directory collection.
///
/// \sa KIM_COLLECTION_currentWorkingDirectory,
/// kim_collection_module::kim_collection_currentWorkingDirectory
///
/// \since 2.1
extern Collection const currentWorkingDirectory;
/// \brief Get the number of standard Collection's defined by the %KIM API.
///
/// \param[out] numberOfCollections The number of standard Collection's defined
/// by the %KIM API.
///
/// \sa KIM_COLLECTION_GetNumberOfCollections,
/// kim_collection_module::kim_get_number_of_collections
///
/// \since 2.1
void GetNumberOfCollections(int * const numberOfCollections);
/// \brief Get the identity of each defined standard Collection.
///
/// \param[in] index Zero-based index uniquely labeling each defined standard
/// Collection. This index ordering is only guaranteed to be
/// stable during the lifetime of the current process.
/// \param[out] collection The Collection object associated with \c index.
///
/// \return \c true if `index < 0` or `index >= numberOfCollections`.
/// \return \c false otherwise.
///
/// \sa KIM_COLLECTION_GetCollection, kim_collection_module::kim_get_collection
///
/// \since 2.1
int GetCollection(int const index, Collection * const collection);
/// \brief Structure provided for use with std::map.
///
/// \since 2.1
struct Comparator
{
/// \brief Provides an (logically unmeaningful) ordering for
/// Collection objects so that they can be stored in a std::map.
///
/// \since 2.1
bool operator()(Collection const & a, Collection const & b) const
{
return a.collectionID < b.collectionID;
}
}; // struct Comparator
} // namespace COLLECTION
} // namespace KIM
#endif // KIM_COLLECTION_HPP_
kim-api-2.2.1-git/cpp/include/KIM_CollectionItemType.hpp 0000664 0000000 0000000 00000015312 13765565573 0023046 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_COLLECTION_ITEM_TYPE_HPP_
#define KIM_COLLECTION_ITEM_TYPE_HPP_
#include
namespace KIM
{
/// \brief An \ref extensible_enumeration "Extensible Enumeration" for the
/// CollectionItemType's supported by the %KIM API.
///
/// The enumeration constants are contained in the COLLECTION_ITEM_TYPE
/// namespace.
///
/// \sa KIM_CollectionItemType,
/// kim_collection_item_type_module::kim_collection_item_type_type
///
/// \since 2.1
class CollectionItemType
{
public:
/// \brief Integer identifying the specific CollectionItemType represented.
///
/// \note This should not be directly accessed and is only public for
/// cross-language reasons.
///
/// \sa KIM_CollectionItemType::collectionItemTypeID,
/// kim_collection_item_type_module::kim_collection_item_type_type::collection_item_type_id
///
/// \since 2.1
int collectionItemTypeID;
/// \brief Create an uninitialized CollectionItemType object.
///
/// \since 2.1
CollectionItemType();
/// \brief Create a CollectionItemType object with the specified id.
///
/// \note This should not be used directly.
///
/// \since 2.1
CollectionItemType(int const id);
/// \brief Create a CollectionItemType object corresponding to the provided
/// string. If the string does not match one of the values defined by the
/// %KIM API, then an "unknown" object is generated.
///
/// \sa KIM_CollectionItemType_FromString,
/// kim_collection_item_type_module::kim_from_string
///
/// \since 2.1
CollectionItemType(std::string const & str);
/// \brief Determines if the object is a quantity known to the %KIM API.
///
/// CollectionItemType's known to the %KIM API are found in the
/// COLLECTION_TIME_TYPE namespace.
///
/// \sa KIM_CollectionItemType_Known,
/// kim_collection_item_type_module::kim_known
///
/// \since 2.1
bool Known() const;
/// \brief Compares CollectionItemType objects for equality.
///
/// \note Not all "unknown" objects are equal.
///
/// \sa KIM_CollectionItemType_Equal,
/// kim_collection_item_type_module::operator(.eq.)
///
/// \since 2.1
bool operator==(CollectionItemType const & rhs) const;
/// \brief Compares CollectionItemType objects for inequality.
///
/// \note It is possible for two "unknown" objects to be not equal.
///
/// \sa KIM_CollectionItemType_NotEqual,
/// kim_collection_item_type_module::operator(.ne.)
///
/// \since 2.1
bool operator!=(CollectionItemType const & rhs) const;
/// \brief Converts the object to a string.
///
/// \return A string object representing the CollectionItemType object.
///
/// \note If the CollectionItemType object does not correspond to a value
/// defined by the %KIM API, then the string "unknown" is returned.
///
/// \sa KIM_CollectionItemType_ToString,
/// kim_collection_item_type_module::kim_to_string
///
/// \since 2.1
std::string const & ToString() const;
}; // class CollectionItemType
/// \brief Contains the enumeration constants and the discovery routines for
/// the CollectionItemType \ref extensible_enumeration "Extensible Enumeration".
namespace COLLECTION_ITEM_TYPE
{
/// \brief The standard \c modelDriver CollectionItemType.
///
/// The item is a model driver.
///
/// \sa KIM_COLLECTION_ITEM_TYPE_modelDriver,
/// kim_collection_item_type_module::kim_collection_item_type_model_driver
///
/// \since 2.1
extern CollectionItemType const modelDriver;
/// \brief The standard \c portableModel CollectionItemType.
///
/// The item is a portable model.
///
/// \sa KIM_COLLECTION_ITEM_TYPE_portableModel,
/// kim_collection_item_type_module::kim_collection_item_type_portable_model
///
/// \since 2.1
extern CollectionItemType const portableModel;
/// \brief The standard \c simulatorModel CollectionItemType.
///
/// The item is a simulator model.
///
/// \sa KIM_COLLECTION_ITEM_TYPE_simulatorModel,
/// kim_collection_item_type_module::kim_collection_item_type_simulator_model
///
/// \since 2.1
extern CollectionItemType const simulatorModel;
/// \brief Get the number of standard CollectionItemType's defined by the %KIM
/// API.
///
/// \param[out] numberOfCollectionItemTypes The number of standard
/// CollectionItemType's defined by the %KIM API.
///
/// \sa KIM_COLLECTION_ITEM_TYPE_GetNumberOfCollectionItemTypes,
/// kim_collection_item_type_module::kim_get_number_of_collection_item_types
///
/// \since 2.1
void GetNumberOfCollectionItemTypes(int * const numberOfCollectionItemTypes);
/// \brief Get the identity of each defined standard CollectionItemType.
///
/// \param[in] index Zero-based index uniquely labeling each defined standard
/// CollectionItemType. This index ordering is only guaranteed to
/// be stable during the lifetime of the current process.
/// \param[out] collectionItemType The CollectionItemType object associated with
/// \c index.
///
/// \return \c true if `index < 0` or `index >= numberOfCollectionItemTypes`.
/// \return \c false otherwise.
///
/// \sa KIM_COLLECTION_ITEM_TYPE_GetCollectionItemType,
/// kim_collection_item_type_module::kim_get_collection_item_type
///
/// \since 2.1
int GetCollectionItemType(int const index,
CollectionItemType * const collectionItemType);
/// \brief Structure provided for use with std::map.
///
/// \since 2.1
struct Comparator
{
/// \brief Provides an (logically unmeaningful) ordering for
/// CollectionItemType objects so that they can be stored in a std::map.
///
/// \since 2.1
bool operator()(CollectionItemType const & a,
CollectionItemType const & b) const
{
return a.collectionItemTypeID < b.collectionItemTypeID;
}
}; // struct Comparator
} // namespace COLLECTION_ITEM_TYPE
} // namespace KIM
#endif // KIM_COLLECTION_ITEM_TYPE_HPP_
kim-api-2.2.1-git/cpp/include/KIM_Collections.hpp 0000664 0000000 0000000 00000063367 13765565573 0021565 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_COLLECTIONS_HPP_
#define KIM_COLLECTIONS_HPP_
#include
namespace KIM
{
// Forward declarations
class LogVerbosity;
class Collection;
class CollectionItemType;
class CollectionsImplementation;
/// \brief Provides the interface to the %KIM API %Collections and is meant to
/// be used by simulators.
///
/// The %KIM API defines interfaces to various types of "items"
/// (KIM::CollectionItemType) and these items are organized and stored in
/// various "collections" (KIM::Collection) on the user's system. Items are
/// generally installed to or removed from the collections by using the \c
/// kim-api-collections-management utility, and the %KIM API/PMI and %KIM
/// API/SMI find items within the collections using the KIM::Collections
/// interface. Typically, the collections are associated with different levels
/// of user permissions on the system. The KIM::COLLECTION::system collection
/// is available to all users on the system and is managed by the system
/// administrator and cannot be changed by users without administrator
/// privileges. The KIM::COLLECTION::user collection is specific to each user
/// and the use has full privileges to manage the collection. The
/// KIM::COLLECTION::environmentVariable and the
/// KIM::COLLECTION::currentWorkingDirectory collections allow users more
/// dynamic flexibility to manage and store items for special purposes.
///
/// Each collection consists of a set of items organized by their item type
/// (KIM::CollectionItemType). There are currently three item types:
/// KIM::COLLECTION_ITEM_TYPE::portableModel represents %KIM Portable Models
/// that can be used with any simulator that supports the %KIM API/PMI;
/// KIM::COLLECTION_ITEM_TYPE::simulatorModel represents the %KIM Simulator
/// Models that can be used with a specific simulator that supports the %KIM
/// API/SMI; and KIM::COLLECTION_ITEM_TYPE::modelDriver represents %KIM %Model
/// Drivers that are libraries of code that can be used by multiple Portable
/// Models to help reduce code duplication. The KIM::Collections interface
/// provides programatic access to the contents and system settings for the
/// %KIM API collections and items stored within them. The contents and
/// settings of the collections can change during the lifetime of a
/// KIM::Collections object (due to installation or removal of items by other
/// processes on the machine and/or changes to environment variables or the
/// configuration file). Therefore, when lists of information about the
/// collections are requested (via a "CacheListOf...()" routine), the
/// KIM::Collections interface first creates a cache of the list and then
/// provides access to the cached list via a getter ("Get...()") routine. The
/// cached list is only updated when the simulator makes another request for
/// the list (via a "CacheListOf...()" routine).
///
/// Items in the %KIM API collections are generally referred to by name. An
/// item name is required to be a valid C-identifier (no other restrictions are
/// imposed by the %KIM API). Items in different collections can have the same
/// name and items of different type can have the same name. However, this
/// should generally be avoided. Typically, an item is referred to by
/// specifying its type and name. In such cases the %KIM API will search
/// through the %KIM API collections in a specific order (\anchor collection_search_order first the
/// KIM::COLLECTION::currentWorkingDirectory, then
/// KIM::COLLECTION::environmentVariable, then KIM::COLLECTION::user, and
/// finally KIM::COLLECTION::system) and return the first occurrence of an item
/// with the requested type and name that is found. In some cases only the
/// name of the desired item is known, and Collections::GetItemType must be
/// used first to determine the item's type. The Collections::GetItemType
/// routine will search through each collection (in the order described just
/// \ref collection_search_order "above") and through each item type within
/// each collection in a specific order (\anchor collection_item_type_search_order first the
/// KIM::COLLECTION_ITEM_TYPE::portableModel type, then the
/// KIM::COLLECTION_ITEM_TYPE::simulatorModel type, and finally the
/// KIM::COLLECTION_ITEM_TYPE::modelDriver type) and return the first
/// occurrence of an item with the requested name that is found.
///
/// \sa KIM_Collections, kim_collections_module::kim_collections_handle_type
///
/// \since 2.1
class Collections
{
public:
/// \brief Create a new %KIM API Collections object.
///
/// \param[out] collections Pointer to the newly created Collections object.
///
/// \return \c true if the %KIM API is unable to allocate a new log object.
/// \return \c false otherwise.
///
/// \post \c `collections == NULL` if an error occurs.
///
/// \sa KIM_Collections_Create, kim_collections_module::kim_collections_create
///
/// \since 2.1
static int Create(Collections ** const collections);
/// \brief Destroy a previously Collections::Create'd object.
///
/// \param[inout] collections Pointer to the Collections object.
///
/// \pre \c collections points to a previously created %KIM API Collections
/// object.
///
/// \post `collections == NULL`.
///
/// \sa KIM_Collections_Destroy,
/// kim_collections_module::kim_collections_destroy
///
/// \since 2.1
static void Destroy(Collections ** const collections);
/// \brief Get the KIM::CollectionItemType of the item in the %KIM API
/// collections with a specific name.
///
/// Searches for an item with the given name in the %KIM API collections and
/// item types (using the standard order for \ref collection_search_order "collections" and \ref collection_item_type_search_order "item types").
///
/// \param[in] itemName The item name to be found.
/// \param[out] itemType The KIM::CollectionItemType of the item.
///
/// \return \c true if an item with the specificed name cannot be found.
/// \return \c false otherwise.
///
/// \post \c itemType is unchanged if an error occurs.
///
/// \sa KIM_Collections_GetItemType,
/// kim_collections_module::kim_get_item_type
///
/// \since 2.1
int GetItemType(std::string const & itemName,
CollectionItemType * const itemType) const;
/// \brief Get the item's library file name and its KIM::Collection.
///
/// \param[in] itemType The KIM::CollectionItemType of the item.
/// \param[in] itemName The name of the item.
/// \param[out] fileName The absolute file and path name of the item's
/// library.
/// \param[out] collection The KIM::Collection in which the item was found.
///
/// \return \c true if \c itemType is unknown.
/// \return \c true if a item with the specified type and name cannot be
/// found.
/// \return \c false otherwise.
///
/// \pre \c fileName and \c collection may be \c NULL if the corresponding
/// value is not needed.
///
/// \post \c fileName and \c collection are unchanged if an error occurs.
///
/// \sa KIM_Collections_GetItemLibraryFileNameAndCollection,
/// kim_collections_module::kim_get_item_library_file_name_and_collection
///
/// \since 2.1
int GetItemLibraryFileNameAndCollection(CollectionItemType const itemType,
std::string const & itemName,
std::string const ** const fileName,
Collection * const collection) const;
/// \brief Cache a list of an item's metadata files.
///
/// \param[in] itemType The KIM::CollectionItemType of the item.
/// \param[in] itemName The name of the item.
/// \param[out] extent The number of metadata files in the list.
///
/// \return \c true if \c itemType is unknown.
/// \return \c true if the list is not successfully cached for some reason.
/// \return \c false otherwise.
///
/// \post `extent == 0` and the cached list is empty if an error occurs.
///
/// \sa KIM_Collections_CacheListOfItemMetadataFiles,
/// kim_collections_module::kim_cache_list_of_item_metadata_files
///
/// \since 2.1
int CacheListOfItemMetadataFiles(CollectionItemType const itemType,
std::string const & itemName,
int * const extent);
/// \brief Get the name and content of one of an item's metadata files.
///
/// Provide access to the specified metadata file's name and raw data. If
/// there are no embedded NULL characters in the raw data, the file contents
/// are also provided as a string, for convenience.
///
/// \param[in] index Zero-based index for the metadata file of interest.
/// \param[out] fileName The basename (file name without path) of the
/// metadata file.
/// \param[out] fileLength The length of the metadata file.
/// \param[out] fileRawData The raw metadata file content, as a contiguous
/// block of memory of length \c fileLength.
/// \param[out] availableAsString An integer that is set to \c true if the
/// metadata file has no embedded \c NULL characters, and set to
/// \c false otherwise.
/// \param[out] fileString The contents of the metadata file as a string, if
/// `availableAsString == true`, \c NULL otherwise.
///
/// \note String pointers obtained from this routine are valid until the next
/// call to Collections::CacheListOfItemMetadataFiles or the KIM::Collections
/// object is Collections::Destroy'd.
///
/// \return \c true if \c index is invalid.
/// \return \c false otherwise.
///
/// \pre Collections::CacheListOfItemMetadataFiles must have been
/// successfully executed before Collections::GetItemMetadataFile is
/// called.
///
/// \pre \c fileName, \c fileLength, \c fileRawData, \c availableAsString,
/// and \c fileString may be \c NULL if the corresponding value is not
/// needed.
///
/// \post \c fileName, \c fileLength, \c fileRawData, \c availableAsString,
/// \c fileString are unchanged if an error occurs.
///
/// \sa KIM_Collections_GetItemMetadataFile,
/// kim_collections_module::kim_get_item_metadata_file_length,
/// kim_collections_module::kim_get_item_metadata_file_values
///
/// \since 2.1
int GetItemMetadataFile(int const index,
std::string const ** const fileName,
unsigned int * const fileLength,
unsigned char const ** const fileRawData,
int * const availableAsString,
std::string const ** const fileString) const;
/// \brief Cache a list of all item names of a specific type in the %KIM API
/// collections.
///
/// \param[in] itemType The KIM::CollectionItemType of the items.
/// \param[out] extent The number of item names in the list.
///
/// \return \c true if \c itemType is unknown.
/// \return \c false otherwise.
///
/// \post `extent == 0` and the cached list is empty if an error occurs.
///
/// \sa KIM_Collections_CacheListOfItemNamesByType,
/// kim_collections_module::kim_cache_list_of_item_names_by_type
///
/// \since 2.1
int CacheListOfItemNamesByType(CollectionItemType const itemType,
int * const extent);
/// \brief Get the name of an item from the cached list.
///
/// \param[in] index Zero-based index for the item name of interest.
/// \param[out] itemName The item's name.
///
/// \note String pointers obtained from this routine are valid until the next
/// call to Collections::CacheListOfItemNamesByType or the KIM::Collections
/// object is Collections::Destroy'd.
///
/// \return \c true if \c index is invalid.
/// \return \c false otherwise.
///
/// \pre Collections::CacheListOfItemNamesByType must have been successfully
/// executed before Collections::GetItemNameByType is called.
///
/// \post \c itemName is unchanged if an error occurs.
///
/// \sa KIM_Collections_GetItemNameByType,
/// kim_collections_module::kim_get_item_name_by_type
///
/// \since 2.1
int GetItemNameByType(int const index,
std::string const ** const itemName) const;
/// \brief Cache a list of all item names of a specific type in a specific
/// collection.
///
/// \param[in] collection The KIM::Collection of the items.
/// \param[in] itemType The KIM::CollectionItemType of the items.
/// \param[out] extent The number of item names in the list.
///
/// \return \c true if \c collection or \c itemType are unknown.
/// \return \c false otherwise.
///
/// \post `extent == 0` and the cached list is empty if an error occurs.
///
/// \sa KIM_Collections_CacheListOfItemNamesByCollectionAndType,
/// kim_collections_module::kim_cache_list_of_item_names_by_collection_and_type
///
/// \since 2.1
int CacheListOfItemNamesByCollectionAndType(Collection const collection,
CollectionItemType const itemType,
int * const extent);
/// \brief Get the name of an item from the cached list.
///
/// \param[in] index Zero-based index for the item name of interest.
/// \param[out] itemName The item's name.
///
/// \note String pointers obtained from this routine are valid until the next
/// call to Collections::CacheListOfItemNamesByCollectionAndType or the
/// KIM::Collections object is Collections::Destroy'd.
///
/// \return \c true if \c index is invalid.
/// \return \c false otherwise.
///
/// \pre Collections::CacheListOfItemNamesByCollectionAndType must have been
/// successfully executed before
/// Collections::GetItemNameByCollectionAndType is called.
///
/// \post \c itemName is unchanged if an error occurs.
///
/// \sa KIM_Collections_GetItemNameByCollectionAndType,
/// kim_collections_module::kim_get_item_name_by_collection_and_type
///
/// \since 2.1
int GetItemNameByCollectionAndType(int const index,
std::string const ** const itemName) const;
/// \brief Get the item's library file name.
///
/// \param[in] collection The KIM::Collection of the item.
/// \param[in] itemType The KIM::CollectionItemType of the item.
/// \param[in] itemName The name of the item.
/// \param[out] fileName The absolute file and path name of the item's
/// library.
///
/// \return \c true if \c collection or \c itemType are unknown.
/// \return \c true if a item with the specified type and name cannot be
/// found in the specified collection.
/// \return \c false otherwise.
///
/// \post \c fileName is unchanged if an error occurs.
///
/// \sa KIM_Collections_GetItemLibraryFileNameByCollectionAndType,
/// kim_collections_module::kim_get_item_library_file_name_by_collection_and_type
///
/// \since 2.1
int GetItemLibraryFileNameByCollectionAndType(
Collection const collection,
CollectionItemType const itemType,
std::string const & itemName,
std::string const ** const fileName) const;
/// \brief Cache a list of an item's metadata files.
///
/// \param[in] collection The KIM::Collection of the item.
/// \param[in] itemType The KIM::CollectionItemType of the item.
/// \param[in] itemName The name of the item.
/// \param[out] extent The number of metadata files in the list.
///
/// \return \c true if \c collection or \c itemType are unknown.
/// \return \c true if the list is not successfully cached for some reason.
/// \return \c false otherwise.
///
/// \post `extent == 0` and the cached list is empty if an error occurs.
///
/// \sa KIM_Collections_CacheListOfItemMetadataFilesByCollectionAndType,
/// kim_collections_module::kim_cache_list_of_item_metadata_files_by_collection_and_type
///
/// \since 2.1
int CacheListOfItemMetadataFilesByCollectionAndType(
Collection const collection,
CollectionItemType const itemType,
std::string const & itemName,
int * const extent);
/// \brief Get the name and content of one of an item's metadata files.
///
/// Provide access to the specified metadata file's name and raw data. If
/// there are no embedded NULL characters in the raw data, the file contents
/// are also provided as a string, for convenience.
///
/// \param[in] index Zero-based index for the metadata file of interest.
/// \param[out] fileName The basename (file name without path) of the
/// metadata file.
/// \param[out] fileLength The length of the metadata file.
/// \param[out] fileRawData The raw metadata file content, as a contiguous
/// block of memory of length \c fileLength.
/// \param[out] availableAsString An integer that is set to \c true if the
/// metadata file has no embedded \c NULL characters, and set to
/// \c false otherwise.
/// \param[out] fileString The contents of the metadata file as a string, if
/// `availableAsString == true`, \c NULL otherwise.
///
/// \note String pointers obtained from this routine are valid until the next
/// call to Collections::CacheListOfItemMetadataFilesByCollectionAndType or
/// the KIM::Collections object is Collections::Destroy'd.
///
/// \return \c true if \c index is invalid.
/// \return \c false otherwise.
///
/// \pre Collections::CacheListOfItemMetadataFilesByCollectionAndType must
/// have been successfully executed before
/// Collections::GetItemMetadataFileByCollectionAndType is called.
///
/// \pre \c fileName, \c fileLength, \c fileRawData, \c availableAsString,
/// and \c fileString may be \c NULL if the corresponding value is not
/// needed.
///
/// \post \c fileName, \c fileLength, \c fileRawData, \c availableAsString,
/// \c fileString are unchanged if an error occurs.
///
/// \sa KIM_Collections_GetItemMetadataFileByCollectionAndType,
/// kim_collections_module::kim_get_item_metadata_file_length_by_collection_and_type,
/// kim_collections_module::kim_get_item_metadata_file_values_by_collection_and_type
///
/// \since 2.1
int GetItemMetadataFileByCollectionAndType(
int const index,
std::string const ** const fileName,
unsigned int * const fileLength,
unsigned char const ** const fileRawData,
int * const availableAsString,
std::string const ** const fileString) const;
/// \brief Get the %KIM API project name and full Semantic Version string.
///
/// The %KIM API project name and version string are controlled by CMake
/// settings during the configuration process.
///
/// \note String pointers obtained from this routine are valid until the
/// KIM::Collections object is Collections::Destroy'd.
///
/// \param[out] projectName The project name.
/// \param[out] semVer The complete Semantic Version string.
///
/// \pre \c projectName and \c semVer may be \c NULL if the corresponding
/// value is not needed.
///
/// \sa KIM_Collections_GetProjectNameAndSemVer,
/// kim_collections_module::kim_get_project_name_and_sem_ver
///
/// \since 2.1
void GetProjectNameAndSemVer(std::string const ** const projectName,
std::string const ** const semVer) const;
/// \brief Get the names of environment variables that store configuration
/// settings for the KIM::COLLECTION::environmentVariable collection.
///
/// \param[in] itemType The KIM::CollectionItemType of interest.
/// \param[out] name The environment variable name.
///
/// \return \c true if \c itemType is unknown.
/// \return \c false otherwise.
///
/// \post \c name is unchanged if an error occurs.
///
/// \sa KIM_Collections_GetEnvironmentVariableName,
/// kim_collections_module::kim_get_environment_variable_name
///
/// \since 2.1
int GetEnvironmentVariableName(CollectionItemType const itemType,
std::string const ** const name) const;
/// \brief Get the name and value of the environment variable that stores the
/// name of the %KIM API user configuration file.
///
/// The %KIM API user configuration file contains configuration settings for
/// the KIM::COLLECTION::user collection.
///
/// \note String pointers obtained from this routine are valid until the next
/// call to Collections::GetConfigurationFileEnvironmentVariable or the
/// KIM::Collections object is Collections::Destroy'd.
///
/// \param[out] name The name of the environment variable.
/// \param[out] value The current value of the environment variable.
///
/// \pre \c name and \c value may be \c NULL if the corresponding value is
/// not needed.
///
/// \sa KIM_Collections_GetConfigurationFileEnvironmentVariable,
/// kim_collections_module::kim_get_configuration_file_environment_variable
///
/// \since 2.1
void GetConfigurationFileEnvironmentVariable(
std::string const ** const name, std::string const ** const value) const;
/// \brief Get the absolute file and path name of the %KIM API user
/// configuration file.
///
/// The %KIM API user configuration file contains configuration settings for
/// the KIM::COLLECTION::user collection.
///
/// \note String pointer obtained from this routine are valid until the next
/// call to Collections::GetConfigurationFileName or the KIM::Collections
/// object is Collections::Destroy'd.
///
/// \param[out] fileName The absolute file and path name of the configuration
/// file.
///
/// \sa KIM_Collections_GetConfigurationFileName,
/// kim_collections_module::kim_get_configuration_file_name
///
/// \since 2.1
void GetConfigurationFileName(std::string const ** const fileName) const;
/// \brief Cache a list of directory names where a specific %KIM API
/// collection stores library files for a specific item type.
///
/// \param[in] collection The KIM::Collection of the items.
/// \param[in] itemType The KIM::CollectionItemType of the items.
/// \param[out] extent The number of directory names in the list.
///
/// \return \c true if \c collection or \c itemType are unknown.
/// \return \c true if the list is not successfully cached for some reason.
/// \return \c false otherwise.
///
/// \post `extent == 0` and the cached list is empty if an error occurs.
///
/// \sa KIM_Collections_CacheListOfDirectoryNames,
/// kim_collections_module::kim_cache_list_of_directory_names
///
/// \since 2.1
int CacheListOfDirectoryNames(Collection const collection,
CollectionItemType const itemType,
int * const extent);
/// \brief Get the name of a directory from the cached list.
///
/// \param[in] index Zero-based index for the directory name of interest.
/// \param[out] directoryName The directory's name.
///
/// \note String pointers obtained from this routine are valid until the next
/// call to Collections::CacheListOfDirectoryNames or the KIM::Collections
/// object is Collections::Destroy'd.
///
/// \return \c true if \c index is invalid.
/// \return \c false otherwise.
///
/// \pre Collections::CacheListOfDirectoryNames must have been successfully
/// executed before Collections::GetDirectoryName is called.
///
/// \post \c directoryName is unchanged if an error occurs.
///
/// \sa KIM_Collections_GetDirectoryName,
/// kim_collections_module::kim_get_directory_name
///
/// \since 2.1
int GetDirectoryName(int const index,
std::string const ** const directoryName) const;
/// \brief Set the identity of the Log object
/// associated with the Collections object.
///
/// \param[in] logID String identifying the Collections object's Log object.
///
/// \sa KIM_Collections_SetLogID, kim_collections_module::kim_set_log_id
///
/// \since 2.1
void SetLogID(std::string const & logID);
/// \brief Push a new LogVerbosity onto the Collections object's Log object
/// verbosity stack.
///
/// \param[in] logVerbosity A LogVerbosity value.
///
/// \sa KIM_Collections_PushLogVerbosity,
/// kim_collections_module::kim_push_log_verbosity
///
/// \since 2.1
void PushLogVerbosity(LogVerbosity const logVerbosity);
/// \brief Pop a LogVerbosity from the Collections object's Log object
/// verbosity stack.
///
/// \sa KIM_Collections_PopLogVerbosity,
/// kim_collections_module::kim_pop_log_verbosity
///
/// \since 2.1
void PopLogVerbosity();
private:
// do not allow copy constructor or operator=
Collections(Collections const &);
void operator=(Collections const &);
Collections();
~Collections();
CollectionsImplementation * pimpl;
}; // class Collections
} // namespace KIM
#endif // KIM_COLLECTIONS_HPP_
kim-api-2.2.1-git/cpp/include/KIM_ComputeArgumentName.hpp 0000664 0000000 0000000 00000022741 13765565573 0023216 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_COMPUTE_ARGUMENT_NAME_HPP_
#define KIM_COMPUTE_ARGUMENT_NAME_HPP_
#include
namespace KIM
{
// Forward declaration
class DataType;
/// \brief An \ref extensible_enumeration "Extensible Enumeration" for the
/// ComputeArgumentName's supported by the %KIM API.
///
/// The enumeration constants are contained in the COMPUTE_ARGUMENT_NAME
/// namespace.
///
/// \sa KIM_ComputeArgumentName,
/// kim_compute_argument_name_module::kim_compute_argument_name_type
///
/// \since 2.0
class ComputeArgumentName
{
public:
/// \brief Integer identifying the specific ComputeArgumentName represented.
///
/// \note This should not be directly accessed and is only public for
/// cross-language reasons.
///
/// \sa KIM_ComputeArgumentName::computeArgumentNameID,
/// kim_compute_argument_name_module::kim_compute_argument_name_type::compute_argument_name_id
///
/// \since 2.0
int computeArgumentNameID;
/// \brief Create an uninitialized ComputeArgumentName object.
///
/// \since 2.0
ComputeArgumentName();
/// \brief Create a ComputeArgumentName object with the specified id.
///
/// \note This should not be used directly.
///
/// \since 2.0
ComputeArgumentName(int const id);
/// \brief Create a ComputeArgumentName object corresponding to the provided
/// string. If the string does not match one of the values defined by the
/// %KIM API, then an "unknown" object is generated.
///
/// \sa KIM_ComputeArgumentName_FromString,
/// kim_compute_argument_name_module::kim_from_string
///
/// \since 2.0
ComputeArgumentName(std::string const & str);
/// \brief Determines if the object is a quantity known to the %KIM API.
///
/// ComputeArgumentName's known to the %KIM API are found in the
/// COMPUTE_ARGUMENT_NAME namespace.
///
/// \sa KIM_ComputeArgumentName_Known,
/// kim_compute_argument_name_module::kim_known
///
/// \since 2.0
bool Known() const;
/// \brief Compares ComputeArgumentName objects for equality.
///
/// \note Not all "unknown" objects are equal.
///
/// \sa KIM_ComputeArgumentName_Equal,
/// kim_compute_argument_name_module::operator(.eq.)
///
/// \since 2.0
bool operator==(ComputeArgumentName const & rhs) const;
/// \brief Compares ComputeArgumentName objects for inequality.
///
/// \note It is possible for two "unknown" objects to be not equal.
///
/// \sa KIM_ComputeArgumentName_NotEqual,
/// kim_compute_argument_name_module::operator(.ne.)
///
/// \since 2.0
bool operator!=(ComputeArgumentName const & rhs) const;
/// \brief Converts the object to a string.
///
/// \return A string object representing the ComputeArgumentName object.
///
/// \note If the ComputeArgumentName object does not correspond to a value
/// defined by the %KIM API, then the string "unknown" is returned.
///
/// \sa KIM_ComputeArgumentName_ToString,
/// kim_compute_argument_name_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
}; // class ComputeArgumentName
/// \brief Contains the enumeration constants and the discovery routines for
/// the ComputeArgumentName \ref extensible_enumeration
/// "Extensible Enumeration".
namespace COMPUTE_ARGUMENT_NAME
{
/// \brief The standard \c numberOfParticles argument.
///
/// \todo Add more detailed description of argument.
///
/// \sa KIM_COMPUTE_ARGUMENT_NAME_numberOfParticles,
/// kim_compute_argument_name_module::kim_compute_argument_name_number_of_particles
///
/// \since 2.0
extern ComputeArgumentName const numberOfParticles;
/// \brief The standard \c particleSpeciesCodes argument.
///
/// \todo Add more detailed description of argument.
///
/// \sa KIM_COMPUTE_ARGUMENT_NAME_particleSpeciesCodes,
/// kim_compute_argument_name_module::kim_compute_argument_name_particle_species_codes
///
/// \since 2.0
extern ComputeArgumentName const particleSpeciesCodes;
/// \brief The standard \c particleContributing argument.
///
/// \todo Add more detailed description of argument.
///
/// \sa KIM_COMPUTE_ARGUMENT_NAME_particleContributing,
/// kim_compute_argument_name_module::kim_compute_argument_name_particle_contributing
///
/// \since 2.0
extern ComputeArgumentName const particleContributing;
/// \brief The standard \c coordinates argument.
///
/// \todo Add more detailed description of argument.
///
/// \sa KIM_COMPUTE_ARGUMENT_NAME_coordinates,
/// kim_compute_argument_name_module::kim_compute_argument_name_coordinates
///
/// \since 2.0
extern ComputeArgumentName const coordinates;
/// \brief The standard \c partialEnergy argument.
///
/// \todo Add more detailed description of argument.
///
/// \sa KIM_COMPUTE_ARGUMENT_NAME_partialEnergy,
/// kim_compute_argument_name_module::kim_compute_argument_name_partial_energy
///
/// \since 2.0
extern ComputeArgumentName const partialEnergy;
/// \brief The standard \c partialForces argument.
///
/// \todo Add more detailed description of argument.
///
/// \sa KIM_COMPUTE_ARGUMENT_NAME_partialForces,
/// kim_compute_argument_name_module::kim_compute_argument_name_partial_forces
///
/// \since 2.0
extern ComputeArgumentName const partialForces;
/// \brief The standard \c partialParticleEnergy argument.
///
/// \todo Add more detailed description of argument.
///
/// \sa KIM_COMPUTE_ARGUMENT_NAME_partialParticleEnergy,
/// kim_compute_argument_name_module::kim_compute_argument_name_partial_particle_energy
///
/// \since 2.0
extern ComputeArgumentName const partialParticleEnergy;
/// \brief The standard \c partialVirial argument.
///
/// \todo Add more detailed description of argument.
///
/// \sa KIM_COMPUTE_ARGUMENT_NAME_partialVirial,
/// kim_compute_argument_name_module::kim_compute_argument_name_partial_virial
///
/// \since 2.0
extern ComputeArgumentName const partialVirial;
/// \brief The standard \c partialParticleVirial argument.
///
/// \todo Add more detailed description of argument.
///
/// \sa KIM_COMPUTE_ARGUMENT_NAME_partialParticleVirial,
/// kim_compute_argument_name_module::kim_compute_argument_name_partial_particle_virial
///
/// \since 2.0
extern ComputeArgumentName const partialParticleVirial;
/// \brief Get the number of standard ComputeArgumentName's defined by the %KIM
/// API.
///
/// \param[out] numberOfComputeArgumentNames The number of standard
/// ComputeArgumentName's defined by the %KIM API.
///
/// \sa KIM_COMPUTE_ARGUMENT_NAME_GetNumberOfComputeArgumentNames,
/// kim_compute_argument_name_module::kim_get_number_of_compute_argument_names
///
/// \since 2.0
void GetNumberOfComputeArgumentNames(int * const numberOfComputeArgumentNames);
/// \brief Get the identity of each defined standard ComputeArgumentName.
///
/// \param[in] index Zero-based index uniquely labeling each defined standard
/// ComputeArgumentName. This index ordering is only guaranteed to
/// be stable during the lifetime of the current process.
/// \param[out] computeArgumentName The ComputeArgumentName object associated
/// with \c index.
///
/// \return \c true if `index < 0` or `index >= numberOfComputeArgumentNames`.
/// \return \c false otherwise.
///
/// \sa KIM_COMPUTE_ARGUMENT_NAME_GetComputeArgumentName,
/// kim_compute_argument_name_module::kim_get_compute_argument_name
///
/// \since 2.0
int GetComputeArgumentName(int const index,
ComputeArgumentName * const computeArgumentName);
/// \brief Get the DataType of each defined standard ComputeArgumentName.
///
/// \param[in] computeArgumentName The ComputeArgumentName object of interest.
/// \param[out] dataType The DataType of the associated ComputeArgumentName.
///
/// \return \c true if \p computeArgumentName is "unknown".
/// \return \c false otherwise.
///
/// \sa KIM_COMPUTE_ARGUMENT_NAME_GetComputeArgumentDataType,
/// kim_compute_argument_name_module::kim_get_compute_argument_data_type
///
/// \since 2.0
int GetComputeArgumentDataType(ComputeArgumentName const computeArgumentName,
DataType * const dataType);
/// \brief Structure provided for use with std::map.
///
/// \since 2.0
struct Comparator
{
/// \brief Provides an (logically unmeaningful) ordering for
/// ComputeArgumentsName objects so that they can be stored in a std::map.
///
/// \since 2.0
bool operator()(ComputeArgumentName const & a,
ComputeArgumentName const & b) const
{
return a.computeArgumentNameID < b.computeArgumentNameID;
}
}; // struct Comparator
} // namespace COMPUTE_ARGUMENT_NAME
} // namespace KIM
#endif // KIM_COMPUTE_ARGUMENT_NAME_HPP_
kim-api-2.2.1-git/cpp/include/KIM_ComputeArguments.hpp 0000664 0000000 0000000 00000021271 13765565573 0022575 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 3.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_COMPUTE_ARGUMENTS_HPP_
#define KIM_COMPUTE_ARGUMENTS_HPP_
#include
#ifndef KIM_FUNCTION_TYPES_HPP_
#include "KIM_FunctionTypes.hpp" // IWYU pragma: export
#endif
namespace KIM
{
// Forward declarations
class LogVerbosity;
class LanguageName;
class ComputeArgumentName;
class ComputeCallbackName;
class SupportStatus;
class ComputeArgumentsImplementation;
/// \brief Provides the primary interface to a %KIM API ComputeArguments object
/// and is meant to be used by simulators.
///
/// \sa KIM_ComputeArguments,
/// kim_compute_arguments_module::kim_compute_arguments_handle_type
///
/// \since 2.0
class ComputeArguments
{
public:
/// \brief Get the SupportStatus of a ComputeArgumentName.
///
/// \param[in] computeArgumentName The ComputeArgumentName of interest.
/// \param[out] supportStatus The Model's corresponding SupportStatus.
///
/// \return \c true if \c computeArgumentName is unknown.
/// \return \c false otherwise.
///
/// \sa KIM_ComputeArguments_GetArgumentSupportStatus,
/// kim_compute_arguments_module::kim_get_argument_support_status
///
/// \since 2.0
int GetArgumentSupportStatus(ComputeArgumentName const computeArgumentName,
SupportStatus * const supportStatus) const;
/// \brief Get the SupportStatus of a ComputeCallbackName.
///
/// \param[in] computeCallbackName The ComputeCallbackName of interest.
/// \param[out] supportStatus The Model's corresponding SupportStatus.
///
/// \return \c true if \c computeCallbackName is unknown.
/// \return \c false otherwise.
///
/// \sa KIM_ComputeArguments_GetCallbackSupportStatus,
/// kim_compute_arguments_module::kim_get_callback_support_status
///
/// \since 2.0
int GetCallbackSupportStatus(ComputeCallbackName const computeCallbackName,
SupportStatus * const supportStatus) const;
/// \brief 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.
///
/// \param[in] computeArgumentName The ComputeArgumentName of interest.
/// \param[in] ptr The data pointer.
///
/// \return \c true if \c computeArgumentName is unknown.
/// \return \c true if `ptr != NULL` and `computeArgumentName ==
/// SUPPORT_STATUS::notSupported`.
/// \return \c false otherwise.
///
/// \sa KIM_ComputeArguments_SetArgumentPointerInteger,
/// KIM_ComputeArguments_SetArgumentPointerDouble,
/// kim_compute_arguments_module::kim_set_argument_pointer
///
/// \since 2.0
int SetArgumentPointer(ComputeArgumentName const computeArgumentName,
int const * const ptr);
/// \overload
int SetArgumentPointer(ComputeArgumentName const computeArgumentName,
int * const ptr);
/// \overload
int SetArgumentPointer(ComputeArgumentName const computeArgumentName,
double const * const ptr);
/// \overload
int SetArgumentPointer(ComputeArgumentName const computeArgumentName,
double * const ptr);
/// \brief 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.
///
/// \param[in] computeCallbackName The ComputeCallbackName of interest.
/// \param[in] languageName The LanguageName of the callback.
/// \param[in] fptr The function pointer.
/// \param[in] dataObject The data pointer associated with the callback.
///
/// \return \c true if \c computeCallbackName is unknown.
/// \return \c true if `fptr != NULL` and `computeCallbackName ==
/// SUPPORT_STATUS::notSupported`.
/// \return \c false otherwise.
///
/// \sa KIM_ComputeArguments_SetCallbackPointer,
/// kim_compute_arguments_module::kim_set_callback_pointer
///
/// \since 2.0
int SetCallbackPointer(ComputeCallbackName const computeCallbackName,
LanguageName const languageName,
Function * const fptr,
void * const dataObject);
/// \brief 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.
///
/// \param[out] result Is \c true if all such arguments and callbacks have
/// non-NULL pointers, and is \c false otherwise.
///
/// \sa KIM_ComputeArguments_AreAllRequiredArgumentsAndCallbacksPresent,
/// kim_compute_arguments_module::kim_are_all_required_present
///
/// \since 2.0
void AreAllRequiredArgumentsAndCallbacksPresent(int * const result) const;
/// \brief Set the \ref cache_buffer_pointers "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.
///
/// \param[in] ptr The simulator buffer data pointer.
///
/// \sa KIM_ComputeArguments_SetSimulatorBufferPointer,
/// kim_compute_arguments_module::kim_set_simulator_buffer_pointer
///
/// \since 2.0
void SetSimulatorBufferPointer(void * const ptr);
/// \brief Get the \ref cache_buffer_pointers "Simulator's buffer pointer"
/// from the ComputeArguments object.
///
/// \param[out] ptr The simulator buffer data pointer.
///
/// \note `ptr == NULL` if the simulator has not previously called
/// ComputeArguments::SetSimulatorBufferPointer.
///
/// \sa KIM_ComputeArguments_GetSimulatorBufferPointer,
/// kim_compute_arguments_module::kim_get_simulator_buffer_pointer
///
/// \since 2.0
void GetSimulatorBufferPointer(void ** const ptr) const;
/// \brief 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 \c
/// ='s.
///
/// \sa KIM_ComputeArguments_ToString,
/// kim_compute_arguments_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
/// \brief Set the identity of the Log object associated with the
/// ComputeArguments object.
///
/// \param[in] logID String identifying the ComputeArguments object's Log
/// object.
///
/// \sa KIM_ComputeArguments_SetLogID,
/// kim_compute_arguments_module::kim_set_log_id
///
/// \since 2.0
void SetLogID(std::string const & logID);
/// \brief Push a new LogVerbosity onto the ComputeArguments object's Log
/// object verbosity stack.
///
/// \param[in] logVerbosity A LogVerbosity value.
///
/// \sa KIM_ComputeArguments_PushLogVerbosity,
/// kim_compute_arguments_module::kim_push_log_verbosity
///
/// \since 2.0
void PushLogVerbosity(LogVerbosity const logVerbosity);
/// \brief Pop a LogVerbosity from the ComputeArguments object's Log object
/// verbosity stack.
///
/// \sa KIM_ComputeArguments_PopLogVerbosity,
/// kim_compute_arguments_module::kim_pop_log_verbosity
///
/// \since 2.0
void PopLogVerbosity();
/// \brief Allows Model objects to directly access private member data of a
/// ComputeArguments object.
///
/// \note This has no practical effect on \e users of the %KIM API.
///
/// \since 2.0
friend class ModelImplementation;
private:
// do not allow copy constructor or operator=
ComputeArguments(ComputeArguments const &);
void operator=(ComputeArguments const &);
ComputeArguments();
~ComputeArguments();
ComputeArgumentsImplementation * pimpl;
}; // class ComputeArguments
} // namespace KIM
#endif // KIM_COMPUTE_ARGUMENTS_HPP_
kim-api-2.2.1-git/cpp/include/KIM_ComputeCallbackName.hpp 0000664 0000000 0000000 00000016515 13765565573 0023132 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_COMPUTE_CALLBACK_NAME_HPP_
#define KIM_COMPUTE_CALLBACK_NAME_HPP_
#include
namespace KIM
{
/// \brief An \ref extensible_enumeration "Extensible Enumeration" for the
/// ComputeCallbackName's supported by the %KIM API.
///
/// The enumeration constants are contained in the COMPUTE_CALLBACK_NAME
/// namespace.
///
/// \sa KIM_ComputeCallbackName,
/// kim_compute_callback_name_module::kim_compute_callback_name_type
///
/// \since 2.0
class ComputeCallbackName
{
public:
/// \brief Integer identifying the specific ComputeCallbackName represented.
///
/// \note This should not be directly accessed and is only public for
/// cross-language reasons.
///
/// \sa KIM_ComputeCallbackName::computeCallbackNameID,
/// kim_compute_callback_name_module::kim_compute_callback_name_type::compute_callback_name_id
///
/// \since 2.0
int computeCallbackNameID;
/// \brief Create an uninitialized ComputeCallbackName object.
///
/// \since 2.0
ComputeCallbackName();
/// \brief Create a ComputeCallbackName object with the specified id.
///
/// \note This should not be used directly.
///
/// \since 2.0
ComputeCallbackName(int const id);
/// \brief Create a ComputeCallbackName object corresponding to the provided
/// string. If the string does not match one of the values defined by the
/// %KIM API, then an "unknown" object is generated.
///
/// \sa KIM_ComputeCallbackName_FromString,
/// kim_compute_callback_name_module::kim_from_string
///
/// \since 2.0
ComputeCallbackName(std::string const & str);
/// \brief Determines if the object is a quantity known to the %KIM API.
///
/// ComputeCallbackName's known to the %KIM API are found in the
/// COMPUTE_CALLBACK_NAME namespace.
///
/// \sa KIM_ComputeCallbackName_Known,
/// kim_compute_callback_name_module::kim_known
///
/// \since 2.0
bool Known() const;
/// \brief Compares ComputeCallbackName objects for equality.
///
/// \note Not all "unknown" objects are equal.
///
/// \sa KIM_ComputeCallbackName_Equal,
/// kim_compute_callback_name_module::operator(.eq.)
///
/// \since 2.0
bool operator==(ComputeCallbackName const & rhs) const;
/// \brief Compares ComputeCallbackName objects for inequality.
///
/// \note It is possible for two "unknown" objects to be not equal.
///
/// \sa KIM_ComputeCallbackName_NotEqual,
/// kim_compute_callback_name_module::operator(.ne.)
///
/// \since 2.0
bool operator!=(ComputeCallbackName const & rhs) const;
/// \brief Converts the object to a string.
///
/// \return A string object representing the ComputeCallbackName object.
///
/// \note If the ComputeCallbackName object does not correspond to a value
/// defined by the %KIM API, then the string "unknown" is returned.
///
/// \sa KIM_ComputeCallbackName_ToString,
/// kim_compute_callback_name_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
}; // class ComputeCallbackName
/// \brief Contains the enumeration constants and the discovery routines for
/// the ComputeCallbackName \ref extensible_enumeration
/// "Extensible Enumeration".
namespace COMPUTE_CALLBACK_NAME
{
/// \brief The standard \c GetNeighborList callback.
///
/// The C++ prototype for this routine is GetNeighborListFunction(). The C
/// prototype for this routine is KIM_GetNeighborListFunction().
///
/// \todo Add more detailed description of callback.
///
/// \sa KIM_COMPUTE_CALLBACK_NAME_GetNeighborList,
/// kim_compute_callback_name_module::kim_compute_callback_name_get_neighbor_list
///
/// \since 2.0
extern ComputeCallbackName const GetNeighborList;
/// \brief The standard \c ProcessDEDrTerm callback.
///
/// The C++ prototype for this routine is ProcessDEDrTermFunction(). The C
/// prototype for this routine is KIM_ProcessDEDrTermFunction().
///
/// \todo Add more detailed description of callback.
///
/// \sa KIM_COMPUTE_CALLBACK_NAME_ProcessDEDrTerm,
/// kim_compute_callback_name_module::kim_compute_callback_name_process_dedr_term
///
/// \since 2.0
extern ComputeCallbackName const ProcessDEDrTerm;
/// \brief The standard \c ProcessD2EDr2Term callback.
///
/// The C++ prototype for this routine is ProcessD2EDr2TermFunction(). The C
/// prototype for this routine is KIM_ProcessD2EDr2TermFunction().
///
/// \todo Add more detailed description of callback.
///
/// \sa KIM_COMPUTE_CALLBACK_NAME_ProcessD2EDr2Term,
/// kim_compute_callback_name_module::kim_compute_callback_name_process_d2edr2_term
///
/// \since 2.0
extern ComputeCallbackName const ProcessD2EDr2Term;
/// \brief Get the number of standard ComputeCallbackName's defined by the %KIM
/// API.
///
/// \param[out] numberOfComputeCallbackNames The number of standard
/// ComputeCallbackName's defined by the %KIM API.
///
/// \sa KIM_COMPUTE_CALLBACK_NAME_GetNumberOfComputeCallbackNames,
/// kim_compute_callback_name_module::kim_get_number_of_compute_callback_names
///
/// \since 2.0
void GetNumberOfComputeCallbackNames(int * const numberOfComputeCallbackNames);
/// \brief Get the identity of each defined standard ComputeCallbackName.
///
/// \param[in] index Zero-based index uniquely labeling each defined standard
/// ComputeCallbackName. This index ordering is only guaranteed to
/// be stable during the lifetime of the current process.
/// \param[out] computeCallbackName The ComputeCallbackName object associated
/// with \c index.
///
/// \return \c true if `index < 0` or `index >= numberOfComputeCallbackNames`.
/// \return \c false otherwise.
///
/// \sa KIM_COMPUTE_CALLBACK_NAME_GetComputeCallbackName,
/// kim_compute_callback_name_module::kim_get_compute_callback_name
///
/// \since 2.0
int GetComputeCallbackName(int const index,
ComputeCallbackName * const computeCallbackName);
/// \brief Structure provided for use with std::map.
///
/// \since 2.0
struct Comparator
{
/// \brief Provides an (logically unmeaningful) ordering for
/// ComputeCallbackName objects so that they can be stored in a std::map.
///
/// \since 2.0
bool operator()(ComputeCallbackName const & a,
ComputeCallbackName const & b) const
{
return a.computeCallbackNameID < b.computeCallbackNameID;
}
}; // struct Comparator
} // namespace COMPUTE_CALLBACK_NAME
} // namespace KIM
#endif // KIM_COMPUTE_CALLBACK_NAME_HPP_
kim-api-2.2.1-git/cpp/include/KIM_DataType.hpp 0000664 0000000 0000000 00000012755 13765565573 0021015 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_DATA_TYPE_HPP_
#define KIM_DATA_TYPE_HPP_
#include
namespace KIM
{
/// \brief An \ref extensible_enumeration "Extensible Enumeration" for the
/// DataType's supported by the %KIM API.
///
/// The enumeration constants are contained in the DATA_TYPE namespace.
///
/// \sa KIM_DataType, kim_data_type_module::kim_data_type_type
///
/// \since 2.0
class DataType
{
public:
/// \brief Integer identifying the specific DataType represented.
///
/// \note This should not be directly accessed and is only public for
/// cross-language reasons.
///
/// \sa KIM_DataType::dataTypeID,
/// kim_data_type_module::kim_data_type_type::data_type_id
///
/// \since 2.0
int dataTypeID;
/// \brief Create an uninitialized DataType object.
///
/// \since 2.0
DataType();
/// \brief Create a DataType object with the specified id.
///
/// \note This should not be used directly.
///
/// \since 2.0
DataType(int const id);
/// \brief Create a DataType object corresponding to the provided string. If
/// the string does not match one of the values defined by the %KIM API, then
/// an "unknown" object is generated.
///
/// \sa KIM_DataType_FromString, kim_data_type_module::kim_from_string
///
/// \since 2.0
DataType(std::string const & str);
/// \brief Determines if the object is a quantity known to the %KIM API.
///
/// DataType's known to the %KIM API are found in the DATA_TYPE namespace.
///
/// \sa KIM_DataType_Known, kim_data_type_module::kim_known
///
/// \since 2.0
bool Known() const;
/// \brief Compares DataType objects for equality.
///
/// \note Not all "unknown" objects are equal.
///
/// \sa KIM_DataType_Equal, kim_data_type_module::operator(.eq.)
///
/// \since 2.0
bool operator==(DataType const & rhs) const;
/// \brief Compares DataType objects for inequality.
///
/// \note It is possible for two "unknown" objects to be not equal.
///
/// \sa KIM_DataType_NotEqual, kim_data_type_module::operator(.ne.)
///
/// \since 2.0
bool operator!=(DataType const & rhs) const;
/// \brief Converts the object to a string.
///
/// \return A string object representing the DataType object.
///
/// \note If the DataType object does not correspond to a value defined by
/// the %KIM API, then the string "unknown" is returned.
///
/// \sa KIM_DataType_ToString, kim_data_type_module::kim_to_string()
///
/// \since 2.0
std::string const & ToString() const;
}; // class DataType
/// \brief Contains the enumeration constants and the discovery routines for
/// the DataType \ref extensible_enumeration "Extensible Enumeration".
namespace DATA_TYPE
{
/// \brief The standard \c Integer data type.
///
/// \todo Add more detailed description of data type.
///
/// \sa KIM_DATA_TYPE_Integer, kim_data_type_module::kim_data_type_integer
///
/// \since 2.0
extern DataType const Integer;
/// \brief The standard \c Double data type.
///
/// \todo Add more detailed description of data type.
///
/// \sa KIM_DATA_TYPE_Double, kim_data_type_module::kim_data_type_double
///
/// \since 2.0
extern DataType const Double;
/// \brief Get the number of standard DataType's defined by the %KIM
/// API.
///
/// \param[out] numberOfDataTypes The number of standard DataType's defined by
/// the %KIM API.
///
/// \sa KIM_DATA_TYPE_GetNumberOfDataTypes,
/// kim_data_type_module::kim_get_number_of_data_types
///
/// \since 2.0
void GetNumberOfDataTypes(int * const numberOfDataTypes);
/// \brief Get the identity of each defined standard DataType.
///
/// \param[in] index Zero-based index uniquely labeling each defined standard
/// DataType. This index ordering is only guaranteed to be stable
/// during the lifetime of the current process.
/// \param[out] dataType The DataType object associated with \c index.
///
/// \return \c true if `index < 0` or `index >= numberOfDataTypes`.
/// \return \c false otherwise.
///
/// \sa KIM_DATA_TYPE_GetDataType, kim_data_type_module::kim_get_data_type
///
/// \since 2.0
int GetDataType(int const index, DataType * const dataType);
/// \brief Structure provided for use with std::map.
///
/// \since 2.0
struct Comparator
{
/// \brief Provides an (logically unmeaningful) ordering for DataType objects
/// so that they can be stored in a std::map.
///
/// \since 2.0
bool operator()(DataType const & a, DataType const & b) const
{
return a.dataTypeID < b.dataTypeID;
}
}; // struct Comparator
} // namespace DATA_TYPE
} // namespace KIM
#endif // KIM_DATA_TYPE_HPP_
kim-api-2.2.1-git/cpp/include/KIM_EnergyUnit.hpp 0000664 0000000 0000000 00000015010 13765565573 0021356 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_ENERGY_UNIT_HPP_
#define KIM_ENERGY_UNIT_HPP_
#include
namespace KIM
{
/// \brief An \ref extensible_enumeration "Extensible Enumeration" for the
/// EnergyUnit's supported by the %KIM API.
///
/// The enumeration constants are contained in the ENERGY_UNIT namespace.
///
/// \sa KIM_EnergyUnit, kim_energy_unit_module::kim_energy_unit_type
///
/// \since 2.0
class EnergyUnit
{
public:
/// \brief Integer identifying the specific EnergyUnit represented.
///
/// \note This should not be directly accessed and is only public for
/// cross-language reasons.
///
/// \sa KIM_EnergyUnit::energyUnitID,
/// kim_energy_unit_module::kim_energy_unit_type::energy_unit_id
///
/// \since 2.0
int energyUnitID;
/// \brief Create an uninitialized EnergyUnit object.
///
/// \since 2.0
EnergyUnit();
/// \brief Create a EnergyUnit object with the specified id.
///
/// \note This should not be used directly.
///
/// \since 2.0
EnergyUnit(int const id);
/// \brief Create an EnergyUnit object corresponding to the provided string.
/// If the string does not match one of the values defined by the %KIM API,
/// then an "unknown" object is generated.
///
/// \sa KIM_EnergyUnit_FromString,
/// kim_energy_unit_module::kim_from_string
///
/// \since 2.0
EnergyUnit(std::string const & str);
/// \brief Determines if the object is a quantity known to the %KIM API.
///
/// EnergyUnit's known to the %KIM API are found in the ENERGY_UNIT
/// namespace.
///
/// \sa KIM_EnergyUnit_Known,
/// kim_energy_unit_module::kim_known
///
/// \since 2.0
bool Known() const;
/// \brief Compares EnergyUnit objects for equality.
///
/// \note Not all "unknown" objects are equal.
///
/// \sa KIM_EnergyUnit_Equal,
/// kim_energy_unit_module::operator(.eq.)
///
/// \since 2.0
bool operator==(EnergyUnit const & rhs) const;
/// \brief Compares EnergyUnit objects for inequality.
///
/// \note It is possible for two "unknown" objects to be not equal.
///
/// \sa KIM_EnergyUnit_NotEqual,
/// kim_energy_unit_module::operator(.ne.)
///
/// \since 2.0
bool operator!=(EnergyUnit const & rhs) const;
/// \brief Converts the object to a string.
///
/// \return A string object representing the EnergyUnit object.
///
/// \note If the EnergyUnit object does not correspond to a value defined by
/// the %KIM API, then the string "unknown" is returned.
///
/// \sa KIM_EnergyUnit_ToString,
/// kim_energy_unit_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
}; // class EnergyUnit
/// \brief Contains the enumeration constants and the discovery routines for
/// the EnergyUnit \ref extensible_enumeration "Extensible Enumeration".
namespace ENERGY_UNIT
{
/// \brief Indicates that a EnergyUnit is not used.
///
/// \sa KIM_ENERGY_UNIT_unused,
/// kim_energy_unit_module::kim_energy_unit_unused
///
/// \since 2.0
extern EnergyUnit const unused;
/// \brief The standard `amu*A`\f$^2\f$`/ps`\f$^2\f$ unit of energy.
///
/// \sa KIM_ENERGY_UNIT_amu_A2_per_ps2,
/// kim_energy_unit_module::kim_energy_unit_amu_a2_per_ps2
///
/// \since 2.0
extern EnergyUnit const amu_A2_per_ps2;
/// \brief The standard erg unit of energy.
///
/// \sa KIM_ENERGY_UNIT_erg,
/// kim_energy_unit_module::kim_energy_unit_erg
///
/// \since 2.0
extern EnergyUnit const erg;
/// \brief The standard electronvolt unit of energy.
///
/// \sa KIM_ENERGY_UNIT_eV,
/// kim_energy_unit_module::kim_energy_unit_ev
///
/// \since 2.0
extern EnergyUnit const eV;
/// \brief The standard Hartree unit of energy.
///
/// \sa KIM_ENERGY_UNIT_Hartre,
/// kim_energy_unit_module::kim_energy_unit_hartree
///
/// \since 2.0
extern EnergyUnit const Hartree;
/// \brief The standard Joule unit of energy.
///
/// \sa KIM_ENERGY_UNIT_J,
/// kim_energy_unit_module::kim_energy_unit_j
///
/// \since 2.0
extern EnergyUnit const J;
/// \brief The standard kilocalorie per mole unit of energy.
///
/// \sa KIM_ENERGY_UNIT_kcal_mol,
/// kim_energy_unit_module::kim_energy_unit_kcal_mol
///
/// \since 2.0
extern EnergyUnit const kcal_mol;
/// \brief Get the number of standard EnergyUnit's defined by the %KIM API.
///
/// \param[out] numberOfEnergyUnits The number of standard EnergyUnit's defined
/// by the %KIM API.
///
/// \sa KIM_ENERGY_UNIT_GetNumberOfEnergyUnits,
/// kim_energy_unit_module::kim_get_number_of_energy_units
///
/// \since 2.0
void GetNumberOfEnergyUnits(int * const numberOfEnergyUnits);
/// \brief Get the identity of each defined standard EnergyUnit.
///
/// \param[in] index Zero-based index uniquely labeling each defined standard
/// EnergyUnit. This index ordering is only guaranteed to be
/// stable during the lifetime of the current process.
/// \param[out] energyUnit The EnergyUnit object associated with \c index.
///
/// \return \c true if `index < 0` or `index >= numberOfEnergyUnits`.
/// \return \c false otherwise.
///
/// \sa KIM_ENERGY_UNIT_GetEnergyUnit,
/// kim_energy_unit_module::kim_get_energy_unit
///
/// \since 2.0
int GetEnergyUnit(int const index, EnergyUnit * const energyUnit);
/// \brief Structure provided for use with std::map.
///
/// \since 2.0
struct Comparator
{
/// \brief Provides an (logically unmeaningful) ordering for EnergyUnit
/// objects so that they can be stored in a std::map.
///
/// \since 2.0
bool operator()(EnergyUnit const & a, EnergyUnit const & b) const
{
return a.energyUnitID < b.energyUnitID;
}
}; // struct Comparator
} // namespace ENERGY_UNIT
} // namespace KIM
#endif // KIM_ENERGY_UNIT_HPP_
kim-api-2.2.1-git/cpp/include/KIM_FunctionTypes.hpp 0000664 0000000 0000000 00000015627 13765565573 0022115 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_FUNCTION_TYPES_HPP_
#define KIM_FUNCTION_TYPES_HPP_
#include
namespace KIM
{
// Forward declarations
class LengthUnit;
class EnergyUnit;
class ChargeUnit;
class TemperatureUnit;
class TimeUnit;
class ModelCreate;
class ModelDriverCreate;
class ModelCompute;
class ModelExtension;
class ModelComputeArgumentsCreate;
class ModelComputeArguments;
class ModelRefresh;
class ModelWriteParameterizedModel;
class ModelComputeArgumentsDestroy;
class ModelDestroy;
/// \brief Generic function type.
///
/// \sa KIM_Function
///
/// \since 2.0
typedef void(Function)(void); // Generic function pointer
/// \brief Prototype for MODEL_ROUTINE_NAME::Create routine.
///
/// \sa KIM_ModelCreateFunction, kim_model_module::kim_model_create
///
/// \since 2.0
typedef int ModelCreateFunction(ModelCreate * const modelCreate,
LengthUnit const requestedLengthUnit,
EnergyUnit const requestedEnergyUnit,
ChargeUnit const requestedChargeUnit,
TemperatureUnit const requestedTemperatureUnit,
TimeUnit const requestedTimeUnit);
/// \brief Prototype for MODEL_ROUTINE_NAME::Create routine.
///
/// \sa KIM_ModelDriverCreateFunction, kim_model_module::kim_model_create
///
/// \since 2.0
typedef int
ModelDriverCreateFunction(ModelDriverCreate * const modelDriverCreate,
LengthUnit const requestedLengthUnit,
EnergyUnit const requestedEnergyUnit,
ChargeUnit const requestedChargeUnit,
TemperatureUnit const requestedTemperatureUnit,
TimeUnit const requestedTimeUnit);
/// \brief Prototype for MODEL_ROUTINE_NAME::ComputeArgumentsCreate
/// routine.
///
/// \sa KIM_ModelComputeArgumentsCreateFunction,
/// kim_model_module::kim_model_compute_arguments_create
///
/// \since 2.0
typedef int ModelComputeArgumentsCreateFunction(
ModelCompute const * const modelCompute,
ModelComputeArgumentsCreate * const modelComputeArgumentsCreate);
/// \brief Prototype for MODEL_ROUTINE_NAME::Compute routine.
///
/// \sa KIM_ModelComputeFunction, kim_model_module::kim_model_compute
///
/// \since 2.0
typedef int ModelComputeFunction(
ModelCompute const * const modelCompute,
ModelComputeArguments const * const modelComputeArgumentsCreate);
/// \brief Prototype for COMPUTE_CALLBACK_NAME::GetNeighborList routine.
///
/// \sa KIM_GetNeighborListFunction, kim_model_compute_arguments_module::kim_model_compute_arguments_get_neighbor_list
///
/// \since 2.0
typedef int GetNeighborListFunction(void * const dataObject,
int const numberOfNeighborLists,
double const * const cutoffs,
int const neighborListIndex,
int const particleNumber,
int * const numberOfNeighbors,
int const ** const neighborsOfParticle);
/// \brief Prototype for COMPUTE_CALLBACK_NAME::ProcessDEDrTerm
/// routine.
///
/// \sa KIM_ProcessDEDrTermFunction, kim_model_compute_arguments_module::kim_model_compute_arguments_process_dedr_term
///
/// \since 2.0
typedef int ProcessDEDrTermFunction(void * const dataObject,
double const de,
double const r,
double const * const dx,
int const i,
int const j);
/// \brief Prototype for COMPUTE_CALLBACK_NAME::ProcessD2EDr2Term
/// routine.
///
/// \sa KIM_ProcessD2EDr2TermFunction, kim_model_compute_arguments_module::kim_model_compute_arguments_process_d2edr2_term
///
///
/// \since 2.0
typedef int ProcessD2EDr2TermFunction(void * const dataObject,
double const de,
double const * const r,
double const * const dx,
int const * const i,
int const * const j);
/// \brief Prototype for MODEL_ROUTINE_NAME::Extension routine.
///
/// \sa KIM_ModelExtensionFunction, kim_model_module::kim_model_extension
///
/// \since 2.0
typedef int ModelExtensionFunction(ModelExtension * const modelExtension,
void * const extensionStructure);
/// \brief Prototype for MODEL_ROUTINE_NAME::Refresh routine.
///
/// \sa KIM_ModelRefreshFunction,
/// kim_model_module::kim_model_clear_then_refresh
///
/// \since 2.0
typedef int ModelRefreshFunction(ModelRefresh * const modelRefresh);
/// \brief Prototype for MODEL_ROUTINE_NAME::WriteParameterizedModel routine.
///
/// \sa KIM_ModelWriteParameterizedModelFunction,
/// kim_model_module::kim_model_write_parameterized_model
///
/// \since 2.0
typedef int ModelWriteParameterizedModelFunction(
ModelWriteParameterizedModel const * const modelWriteParameterizedModel);
/// \brief Prototype for MODEL_ROUTINE_NAME::ComputeArgumentsDestroy
/// routine.
///
/// \sa KIM_ModelComputeArgumentsDestroyFunction,
/// kim_model_module::kim_model_compute_arguments_destroy
///
/// \since 2.0
typedef int ModelComputeArgumentsDestroyFunction(
ModelCompute const * const modelCompute,
ModelComputeArgumentsDestroy * const modelComputeArgumentsDestroy);
/// \brief Prototype for MODEL_ROUTINE_NAME::Destroy routine.
///
/// \sa KIM_ModelDestroyFunction, kim_model_module::kim_model_destroy
///
/// \since 2.0
typedef int ModelDestroyFunction(ModelDestroy * const modelDestroy);
/// \brief Prototype for Log PrintFunction routine.
///
/// \sa KIM_LogPrintFunction,
/// kim_log_module::kim_log_push_default_print_function
///
/// \since 2.2
typedef int LogPrintFunction(std::string const & entryString);
} // namespace KIM
#endif // KIM_FUNCTION_TYPES_HPP_
kim-api-2.2.1-git/cpp/include/KIM_LOG_DEFINES.inc.in 0000664 0000000 0000000 00000000630 13765565573 0021434 0 ustar 00root root 0000000 0000000 #ifndef KIM_LOG_DEFINES_INC_
#define KIM_LOG_DEFINES_INC_
#define KIM_LOG_VERBOSITY_SILENT_ 0
#define KIM_LOG_VERBOSITY_FATAL_ 1
#define KIM_LOG_VERBOSITY_ERROR_ 2
#define KIM_LOG_VERBOSITY_WARNING_ 3
#define KIM_LOG_VERBOSITY_INFORMATION_ 4
#define KIM_LOG_VERBOSITY_DEBUG_ 5
/* clang-format off */
#define KIM_LOG_MAXIMUM_LEVEL KIM_LOG_VERBOSITY_@KIM_API_LOG_MAXIMUM_LEVEL@_
/* clang-format on */
#endif
kim-api-2.2.1-git/cpp/include/KIM_LanguageName.hpp 0000664 0000000 0000000 00000014022 13765565573 0021613 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_LANGUAGE_NAME_HPP_
#define KIM_LANGUAGE_NAME_HPP_
#include
namespace KIM
{
/// \brief An \ref extensible_enumeration "Extensible Enumeration" for the
/// LanguageName's supported by the %KIM API.
///
/// The enumeration constants are contained in the LANGUAGE_NAME namespace.
///
/// \sa KIM_LanguageName, kim_language_name_module::kim_language_name_type
///
/// \since 2.0
class LanguageName
{
public:
/// \brief Integer identifying the specific LanguageName represented.
///
/// \note This should not be directly accessed and is only public for
/// cross-language reasons.
///
/// \sa KIM_LanguageName::languageNameID,
/// kim_language_name_module::kim_language_name_type::language_name_id
///
/// \since 2.0
int languageNameID;
/// \brief Create an uninitialized LanguageName object.
///
/// \since 2.0
LanguageName();
/// \brief Create a LanguageName object with the specified id.
///
/// \note This should not be used directly.
///
/// \since 2.0
LanguageName(int const id);
/// \brief Create a LanguageName object corresponding to the provided string.
/// If the string does not match one of the values defined by the %KIM API,
/// then an "unknown" object is generated.
///
/// \sa KIM_LanguageName_FromString,
/// kim_language_name_module::kim_from_string
///
/// \since 2.0
LanguageName(std::string const & str);
/// \brief Determines if the object is a quantity known to the %KIM API.
///
/// LanguageName's known to the %KIM API are found in the LANGUAGE_NAME
/// namespace.
///
/// \sa KIM_LanguageName_Known, kim_language_name_module::kim_known
///
/// \since 2.0
bool Known() const;
/// \brief Compares LanguageName objects for equality.
///
/// \note Not all "unknown" objects are equal.
///
/// \sa KIM_LanguageName_Equal, kim_language_name_module::operator(.eq.)
///
/// \since 2.0
bool operator==(LanguageName const & rhs) const;
/// \brief Compares LanguageName objects for inequality.
///
/// \note It is possible for two "unknown" objects to be not equal.
///
/// \sa KIM_LanguageName_NotEqual, kim_language_name_module::operator(.ne.)
///
/// \since 2.0
bool operator!=(LanguageName const & rhs) const;
/// \brief Converts the object to a string.
///
/// \return A string object representing the LanguageName object.
///
/// \note If the LanguageName object does not correspond to a value defined
/// by the %KIM API, then the string "unknown" is returned.
///
/// \sa KIM_LanguageName_ToString, kim_language_name_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
}; // class LanguageName
/// \brief Contains the enumeration constants and the discovery routines for
/// the LanguageName \ref extensible_enumeration "Extensible Enumeration".
namespace LANGUAGE_NAME
{
/// \brief The standard \c cpp language.
///
/// \todo Add more detailed description of the language.
///
/// \sa KIM_LANGUAGE_NAME_cpp, kim_language_name_module::kim_language_name_cpp
///
/// \since 2.0
extern LanguageName const cpp;
/// \brief The standard \c c language.
///
/// \todo Add more detailed description of the language.
///
/// \sa KIM_LANGUAGE_NAME_c, kim_language_name_module::kim_language_name_c
///
/// \since 2.0
extern LanguageName const c;
/// \brief The standard \c fortran language.
///
/// \todo Add more detailed description of the language.
///
/// \sa KIM_LANGUAGE_NAME_fortran,
/// kim_language_name_module::kim_language_name_fortran
///
/// \since 2.0
extern LanguageName const fortran;
/// \brief Get the number of standard LanguageName's defined by the %KIM
/// API.
///
/// \param[out] numberOfLanguageNames The number of standard LanguageName's
/// defined by the %KIM API.
///
/// \sa KIM_LANGUAGE_NAME_GetNumberOfLanguageNames,
/// kim_language_name_module::kim_get_number_of_language_names
///
/// \since 2.0
void GetNumberOfLanguageNames(int * const numberOfLanguageNames);
/// \brief Get the identity of each defined standard LanguageName.
///
/// \param[in] index Zero-based index uniquely labeling each defined standard
/// LanguageName. This index ordering is only guaranteed to be
/// stable during the lifetime of the current process.
/// \param[out] languageName The LanguageName object associated with \c index.
///
/// \return \c true if `index < 0` or `index >= numberOfLanguageNames`.
/// \return \c false otherwise.
///
/// \sa KIM_LANGUAGE_NAME_GetLanguageName,
/// kim_language_name_module::kim_get_language_name
///
/// \since 2.0
int GetLanguageName(int const index, LanguageName * const languageName);
/// \brief Structure provided for use with std::map.
///
/// \since 2.0
struct Comparator
{
/// \brief Provides an (logically unmeaningful) ordering for LanguageName
/// objects so that they can be stored in a std::map.
///
/// \since 2.0
bool operator()(LanguageName const & a, LanguageName const & b) const
{
return a.languageNameID < b.languageNameID;
}
}; // struct Comparator
} // namespace LANGUAGE_NAME
} // namespace KIM
#endif // KIM_LANGUAGE_NAME_HPP_
kim-api-2.2.1-git/cpp/include/KIM_LengthUnit.hpp 0000664 0000000 0000000 00000014276 13765565573 0021363 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_LENGTH_UNIT_HPP_
#define KIM_LENGTH_UNIT_HPP_
#include
namespace KIM
{
/// \brief An \ref extensible_enumeration "Extensible Enumeration" for the
/// LengthUnit's supported by the %KIM API.
///
/// The enumeration constants are contained in the LENGTH_UNIT namespace.
///
/// \sa KIM_LengthUnit, kim_length_unit_module::kim_length_unit_type
///
/// \since 2.0
class LengthUnit
{
public:
/// \brief Integer identifying the specific LengthUnit represented.
///
/// \note This should not be directly accessed and is only public for
/// cross-language reasons.
///
/// \sa KIM_LengthUnit::lengthUnitID,
/// kim_length_unit_module::kim_length_unit_type::length_unit_id
///
/// \since 2.0
int lengthUnitID;
/// \brief Create an uninitialized LengthUnit object.
///
/// \since 2.0
LengthUnit();
/// \brief Create a LengthUnit object with the specified id.
///
/// \note This should not be used directly.
///
/// \since 2.0
LengthUnit(int const id);
/// \brief Create a LengthUnit object corresponding to the provided string.
/// If the string does not match one of the values defined by the %KIM API,
/// then an "unknown" object is generated.
///
/// \sa KIM_LengthUnit_FromString, kim_length_unit_module::kim_from_string
///
/// \since 2.0
LengthUnit(std::string const & str);
/// \brief Determines if the object is a quantity known to the %KIM API.
///
/// LengthUnit's known to the %KIM API are found in the LENGTH_UNIT
/// namespace.
///
/// \sa KIM_LengthUnit_Known, kim_length_unit_module::kim_known
///
/// \since 2.0
bool Known() const;
/// \brief Compares LengthUnit objects for equality.
///
/// \note Not all "unknown" objects are equal.
///
/// \sa KIM_LengthUnit_Equal, kim_length_unit_module::operator(.eq.)
///
/// \since 2.0
bool operator==(LengthUnit const & rhs) const;
/// \brief Compares LengthUnit objects for inequality.
///
/// \note It is possible for two "unknown" objects to be not equal.
///
/// \sa KIM_LengthUnit_NotEqual, kim_length_unit_module::operator(.ne.)
///
/// \since 2.0
bool operator!=(LengthUnit const & rhs) const;
/// \brief Converts the object to a string.
///
/// \return A string object representing the LengthUnit object.
///
/// \note If the LengthUnit object does not correspond to a value defined by
/// the %KIM API, then the string "unknown" is returned.
///
/// \sa KIM_LengthUnit_ToString, kim_length_unit_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
}; // class LengthUnit
/// \brief Contains the enumeration constants and the discovery routines for
/// the LengthUnit \ref extensible_enumeration "Extensible Enumeration".
namespace LENGTH_UNIT
{
/// \brief Indicates that a LengthUnit is not used.
///
/// \sa KIM_LENGTH_UNIT_unused, kim_length_unit_module::kim_length_unit_unused
///
/// \since 2.0
extern LengthUnit const unused;
/// \brief The standard angstrom unit of length.
///
/// \sa KIM_LENGTH_UNIT_A, kim_length_unit_module::kim_length_unit_a
///
/// \since 2.0
extern LengthUnit const A;
/// \brief The standard Bohr unit of length.
///
/// \sa KIM_LENGTH_UNIT_Bohr, kim_length_unit_module::kim_length_unit_bohr
///
/// \since 2.0
extern LengthUnit const Bohr;
/// \brief The standard centimeter unit of length.
///
/// \sa KIM_LENGTH_UNIT_cm, kim_length_unit_module::kim_length_unit_cm
///
/// \since 2.0
extern LengthUnit const cm;
/// \brief The standard meter unit of length.
///
/// \sa KIM_LENGTH_UNIT_m, kim_length_unit_module::kim_length_unit_m
///
/// \since 2.0
extern LengthUnit const m;
/// \brief The standard nanometer unit of length.
///
/// \sa KIM_LENGTH_UNIT_nm, kim_length_unit_module::kim_length_unit_nm
///
/// \since 2.0
extern LengthUnit const nm;
/// \brief Get the number of standard LengthUnit's defined by the %KIM API.
///
/// \param[out] numberOfLengthUnits The number of standard LengthUnit's defined
/// by the %KIM API.
///
/// \sa KIM_LENGTH_UNIT_GetNumberOfLengthUnits,
/// kim_length_unit_module::kim_get_number_of_length_units
///
/// \since 2.0
void GetNumberOfLengthUnits(int * const numberOfLengthUnits);
/// \brief Get the identity of each defined standard LengthUnit.
///
/// \param[in] index Zero-based index uniquely labeling each defined standard
/// LengthUnit. This index ordering is only guaranteed to be
/// stable during the lifetime of the current process.
/// \param[out] lengthUnit The LengthUnit object associated with \c index.
///
/// \return \c true if `index < 0` or `index >= numberOfLengthUnits`.
/// \return \c false otherwise.
///
/// \sa KIM_LENGTH_UNIT_GetLengthUnit,
/// kim_length_unit_module::kim_get_length_unit
///
/// \since 2.0
int GetLengthUnit(int const index, LengthUnit * const lengthUnit);
/// \brief Structure provided for use with std::map.
///
/// \since 2.0
struct Comparator
{
/// \brief Provides an (logically unmeaningful) ordering for LengthUnit
/// objects so that they can be stored in a std::map.
///
/// \since 2.0
bool operator()(LengthUnit const & a, LengthUnit const & b) const
{
return a.lengthUnitID < b.lengthUnitID;
}
}; // struct Comparator
} // namespace LENGTH_UNIT
} // namespace KIM
#endif // KIM_LENGTH_UNIT_HPP_
kim-api-2.2.1-git/cpp/include/KIM_Log.hpp 0000664 0000000 0000000 00000012757 13765565573 0020025 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_LOG_HPP_
#define KIM_LOG_HPP_
#include
#include
#ifndef KIM_FUNCTION_TYPES_HPP_
#include "KIM_FunctionTypes.hpp" // IWYU pragma: export
#endif
namespace KIM
{
// Forward declarations
class LogVerbosity;
class LanguageName;
class LogImplementation;
/// \brief Provides the logging interface for the %KIM API.
///
/// \sa KIM_Log, kim_log_module::kim_log_handle_type
///
/// \since 2.0
class Log
{
public:
/// \brief Create a new %KIM API Log object.
///
/// \param[out] log Pointer to the newly created Log object.
///
/// \return \c false
///
/// \sa KIM_Log_Create, kim_log_module::kim_log_create
///
/// \since 2.0
static int Create(Log ** const log);
/// \brief Destroy a previously Log::Create'd object.
///
/// \param[inout] log Pointer to the Log object.
///
/// \pre \c log points to a previously created %KIM API Log object.
///
/// \post `log == NULL`.
///
/// \sa KIM_Log_Destroy, kim_log_module::kim_log_destroy
///
/// \since 2.0
static void Destroy(Log ** const log);
/// \brief Push a new default LogVerbosity onto the %KIM API global default
/// verbosity stack.
///
/// The default LogVerbosity is used when creating new Log objects.
///
/// \param[in] logVerbosity A LogVerbosity value.
///
/// \sa KIM_Log_PushDefaultVerbosity,
/// kim_log_module::kim_push_default_verbosity
///
/// \since 2.0
static void PushDefaultVerbosity(LogVerbosity const logVerbosity);
/// \brief Pop a LogVerbosity from the %KIM API global default verbosity
/// stack.
///
/// \sa KIM_Log_PopDefaultVerbosity,
/// kim_log_module::kim_pop_default_verbosity
///
/// \since 2.0
static void PopDefaultVerbosity();
/// \brief Push a new default log PrintFunction onto the %KIM API global
/// default log PrintFunction stack.
///
/// The default log PrintFunction is used when creating new Log objects.
///
/// \param[in] languageName The LanguageName of the function.
/// \param[in] fptr The function pointer.
///
/// \sa KIM_Log_PushDefaultPrintFunction,
/// kim_log_module::kim_push_default_print_function
///
/// \since 2.2
static void PushDefaultPrintFunction(LanguageName const languageName,
Function * const fptr);
/// \brief Pop a log PrintFunction from the %KIM API global default log
/// PrintFunction stack.
///
/// \sa KIM_Log_PopDefaultPrintFunction,
/// kim_log_module::kim_pop_default_print_function
///
/// \since 2.2
static void PopDefaultPrintFunction();
/// \brief Get the identity of the Log object.
///
/// \sa KIM_Log_GetID, kim_log_module::kim_get_id
///
/// \since 2.0
std::string const & GetID() const;
/// \brief Set the identity of the Log object.
///
/// \param[in] id String identifying the Log object.
///
/// \sa KIM_Log_SetID, kim_log_module::kim_set_id
///
/// \since 2.0
void SetID(std::string const & id);
/// \brief Push a new LogVerbosity onto the Log object's verbosity stack.
///
/// \param[in] logVerbosity A LogVerbosity value.
///
/// \sa KIM_Log_PushVerbosity, kim_log_module::kim_push_verbosity
///
/// \since 2.0
void PushVerbosity(LogVerbosity const logVerbosity);
/// \brief Pop a LogVerbosity from the Log object's verbosity stack.
///
/// \sa KIM_Log_PopVerbosity, kim_log_module::kim_pop_verbosity
///
/// \since 2.0
void PopVerbosity();
/// \brief Write a log entry into the log file.
///
/// This results in a no-op if \c logVerbosity is LOG_VERBOSITY::silent or if
/// \c logVerbosity is greater-than the Log object's top LogVerbosity on its
/// stack.
///
/// \param[in] logVerbosity The LogVerbosity level for the entry.
/// \param[in] message The body text of the log entry.
/// \param[in] lineNumber The source code file line number.
/// \param[in] fileName The source code file name.
///
/// \sa KIM_Log_LogEntry, kim_log_module::kim_log_entry
///
/// \since 2.0
void LogEntry(LogVerbosity const logVerbosity,
std::string const & message,
int const lineNumber,
std::string const & fileName) const;
/// \overload
void LogEntry(LogVerbosity const logVerbosity,
std::stringstream const & message,
int const lineNumber,
std::string const & fileName) const;
private:
// do not allow copy constructor or operator=
Log(Log const &);
void operator=(Log const &);
Log();
~Log();
LogImplementation * pimpl;
}; // class Log
} // namespace KIM
#endif // KIM_LOG_HPP_
kim-api-2.2.1-git/cpp/include/KIM_LogMacros.hpp 0000664 0000000 0000000 00000007174 13765565573 0021167 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#undef FATAL_VERBOSITY
/// \brief Defined if FATAL Log entries are to be compiled.
#define FATAL_VERBOSITY (KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_FATAL_)
#undef LOG_FATAL
#if (KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_FATAL_)
/// \def LOG_FATAL(message)
/// \brief Convenience macro for FATAL Log entries with compile-time
/// optimization.
#define LOG_FATAL(message) \
KIM_LOGGER_OBJECT_NAME->LogEntry( \
KIM::LOG_VERBOSITY::fatal, message, __LINE__, __FILE__)
#else
#define LOG_FATAL(message)
#endif
#undef ERROR_VERBOSITY
/// \brief Defined if ERROR Log entries are to be compiled.
#define ERROR_VERBOSITY (KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_ERROR_)
#undef LOG_ERROR
#if (KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_ERROR_)
/// \def LOG_ERROR(message)
/// \brief Convenience macro for ERROR Log entries with compile-time
/// optimization.
#define LOG_ERROR(message) \
KIM_LOGGER_OBJECT_NAME->LogEntry( \
KIM::LOG_VERBOSITY::error, message, __LINE__, __FILE__)
#else
#define LOG_ERROR(message)
#endif
#undef WARNING_VERBOSITY
/// \brief Defined if WARNING Log entries are to be compiled.
#define WARNING_VERBOSITY (KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_WARNING_)
#undef LOG_WARNING
#if (KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_WARNING_)
/// \def LOG_WARNING(message)
/// \brief Convenience macro for WARNING Log entries with compile-time
/// optimization.
#define LOG_WARNING(message) \
KIM_LOGGER_OBJECT_NAME->LogEntry( \
KIM::LOG_VERBOSITY::warning, message, __LINE__, __FILE__)
#else
#define LOG_WARNING(message)
#endif
#undef INFORMATION_VERBOSITY
/// \brief Defined if INFORMATION Log entries are to be compiled.
#define INFORMATION_VERBOSITY \
(KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_INFORMATION_)
#undef LOG_INFORMATION
#if (KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_INFORMATION_)
/// \def LOG_INFORMATION(message)
/// \brief Convenience macro for INFORMATION Log entries with compile-time
/// optimization.
#define LOG_INFORMATION(message) \
KIM_LOGGER_OBJECT_NAME->LogEntry( \
KIM::LOG_VERBOSITY::information, message, __LINE__, __FILE__)
#else
#define LOG_INFORMATION(message)
#endif
#undef DEBUG_VERBOSITY
/// \brief Defined if DEBUG Log entries are to be compiled.
#define DEBUG_VERBOSITY (KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_DEBUG_)
#undef LOG_DEBUG
#if (KIM_LOG_MAXIMUM_LEVEL >= KIM_LOG_VERBOSITY_DEBUG_)
/// \def LOG_DEBUG(message)
/// \brief Convenience macro for DEBUG Log entries with compile-time
/// optimization.
#define LOG_DEBUG(message) \
KIM_LOGGER_OBJECT_NAME->LogEntry( \
KIM::LOG_VERBOSITY::debug, message, __LINE__, __FILE__)
#else
#define LOG_DEBUG(message)
#endif
kim-api-2.2.1-git/cpp/include/KIM_LogVerbosity.hpp 0000664 0000000 0000000 00000022271 13765565573 0021724 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_LOG_VERBOSITY_HPP_
#define KIM_LOG_VERBOSITY_HPP_
#include
namespace KIM
{
/// \brief An \ref extensible_enumeration "Extensible Enumeration" for the
/// LogVerbosity's supported by the %KIM API.
///
/// The enumeration constants are contained in the LOG_VERBOSITY namespace.
///
/// \sa KIM_LogVerbosity,
/// kim_log_verbosity_module::kim_log_verbosity_type
///
/// \since 2.0
class LogVerbosity
{
public:
/// \brief Integer identifying the specific LogVerbosity represented.
///
/// \note This should not be directly accessed and is only public for
/// cross-language reasons.
///
/// \sa KIM_LogVerbosity::logVerbosityID,
/// kim_log_verbosity_module::kim_log_verbosity_type::log_verbosity_id
///
/// \since 2.0
int logVerbosityID;
/// \brief Create an uninitialized LogVerbosity object.
///
/// \since 2.0
LogVerbosity();
/// \brief Create a LogVerbosity object with the specified id.
///
/// \note This should not be used directly.
///
/// \since 2.0
LogVerbosity(int const id);
/// \brief Create a LogVerbosity object corresponding to the provided string.
/// If the string does not match one of the values defined by the %KIM API,
/// then an "unknown" object is generated.
///
/// \sa KIM_LogVerbosity_FromString,
/// kim_log_verbosity_module::kim_from_string
///
/// \since 2.0
LogVerbosity(std::string const & str);
/// \brief Determines if the object is a quantity known to the %KIM API.
///
/// LogVerbosity's known to the %KIM API are found in the LOG_VERBOSITY
/// namespace.
///
/// \sa KIM_LogVerbosity_Known, kim_log_verbosity_module::kim_known
///
/// \since 2.0
bool Known() const;
/// \brief Compares LogVerbosity objects for less-than.
///
/// \sa KIM_LogVerbosity_LessThan, kim_log_verbosity_module::operator(.lt.)
///
/// \since 2.0
bool operator<(LogVerbosity const & rhs) const;
/// \brief Compares LogVerbosity objects for greater-than.
///
/// \sa KIM_LogVerbosity_GreaterThan,
/// kim_log_verbosity_module::operator(.gt.)
///
/// \since 2.0
bool operator>(LogVerbosity const & rhs) const;
/// \brief Compares LogVerbosity objects for less-than-equal.
///
/// \sa KIM_LogVerbosity_LessThanEqual,
/// kim_log_verbosity_module::operator(.le.)
///
/// \since 2.0
bool operator<=(LogVerbosity const & rhs) const;
/// \brief Compares LogVerbosity objects for greater-than-equal.
///
/// \sa KIM_LogVerbosity_GreaterThanEqual,
/// kim_log_verbosity_module::operator(.ge.)
///
/// \since 2.0
bool operator>=(LogVerbosity const & rhs) const;
/// \brief Compares LogVerbosity objects for equality.
///
/// \note Not all "unknown" objects are equal.
///
/// \sa KIM_LogVerbosity_Equal, kim_log_verbosity_module::operator(.eq.)
///
/// \since 2.0
bool operator==(LogVerbosity const & rhs) const;
/// \brief Compares LogVerbosity objects for inequality.
///
/// \note It is possible for two "unknown" objects to be not equal.
///
/// \sa KIM_LogVerbosity_NotEqual, kim_log_verbosity_module::operator(.ne.)
///
/// \since 2.0
bool operator!=(LogVerbosity const & rhs) const;
/// \brief Converts the object to a string.
///
/// \return A string object representing the LogVerbosity object.
///
/// \note If the LogVerbosity object does not correspond to a value defined
/// by the %KIM API, then the string "unknown" is returned.
///
/// \sa KIM_LogVerbosity_ToString, kim_log_verbosity_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
}; // class LogVerbosity
/// \brief Contains the enumeration constants and the discovery routines for
/// the LogVerbosity \ref extensible_enumeration "Extensible Enumeration".
namespace LOG_VERBOSITY
{
/// \brief The standard \c silent verbosity.
///
/// The \c silent verbosity level should be used when absolutely no messages
/// should be written into the log file.
///
/// \sa KIM_LOG_VERBOSITY_silent,
/// kim_log_verbosity_module::kim_log_verbosity_silent
///
/// \since 2.0
extern LogVerbosity const silent;
/// \brief The standard \c fatal verbosity.
///
/// The \c fatal verbosity level should be used when the execution of the
/// program cannot continue in any way and \c exit will be called. Generic
/// examples of a \c fatal condition include: failure to allocate requested
/// memory, etc.
///
/// \sa KIM_LOG_VERBOSITY_fatal,
/// kim_log_verbosity_module::kim_log_verbosity_fatal
///
/// \since 2.0
extern LogVerbosity const fatal;
/// \brief The standard \c error verbosity.
///
/// The \c error verbosity level should be used when the execution of some task
/// could not be completed. Generic examples of an \c error condition include:
/// an email could not be sent, a page could not be rendered, some data could
/// not be stored to a database, etc. Something has definitively gone wrong.
///
/// \sa KIM_LOG_VERBOSITY_error,
/// kim_log_verbosity_module::kim_log_verbosity_error
///
/// \since 2.0
extern LogVerbosity const error;
/// \brief The standard \c warning verbosity.
///
/// The \c warning verbosity level should be used when something unexpected
/// happened, but that execution can continue, perhaps in a degraded mode.
/// Generic examples of a \c warning condition include: a configuration file
/// was missing but defaults were used, a price was calculated as negative, so
/// it was clamped to zero, etc. Something is not right, but it has not gone
/// properly wrong yet - warnings are often a sign that there will be an error
/// very soon.
///
/// \sa KIM_LOG_VERBOSITY_warning,
/// kim_log_verbosity_module::kim_log_verbosity_warning
///
/// \since 2.0
extern LogVerbosity const warning;
/// \brief The standard \c information verbosity.
///
/// The \c information verbosity level should be used when something normal but
/// significant happened. Generic examples of an \c information condition
/// include: the system started, the system stopped, the daily inventory update
/// job ran, etc. There should not be a continual torrent of these, otherwise
/// there is just too much to read.
///
/// \sa KIM_LOG_VERBOSITY_information,
/// kim_log_verbosity_module::kim_log_verbosity_information
///
/// \since 2.0
extern LogVerbosity const information;
/// \brief The standard \c debug verbosity.
///
/// The \c debug verbosity level should be used when something normal and
/// insignificant happened. Generic examples of a \c debug condition include:
/// a new user came to the site, a page was rendered, an order was taken, a
/// price was updated. This is the stuff excluded from \c info because there
/// would be too much of it.
///
/// \sa KIM_LOG_VERBOSITY_debug,
/// kim_log_verbosity_module::kim_log_verbosity_debug
///
/// \since 2.0
extern LogVerbosity const debug;
/// \brief Get the number of standard LogVerbosity's defined by the %KIM
/// API.
///
/// \param[out] numberOfLogVerbosities The number of standard LogVerbosity's
/// defined by the %KIM API.
///
/// \sa KIM_LOG_VERBOSITY_GetNumberOfLogVerbosities,
/// kim_log_verbosity_module::kim_get_number_of_log_verbosities
///
/// \since 2.0
void GetNumberOfLogVerbosities(int * const numberOfLogVerbosities);
/// \brief Get the identity of each defined standard LogVerbosity.
///
/// \param[in] index Zero-based index uniquely labeling each defined standard
/// LogVerbosity. This index ordering is only guaranteed to be
/// stable during the lifetime of the current process.
/// \param[out] logVerbosity The LogVerbosity object associated with \c index.
///
/// \return \c true if `index < 0` or `index >= numberOfLogVerbosities`.
/// \return \c false otherwise.
///
/// \sa KIM_LOG_VERBOSITY_GetLogVerbosity,
/// kim_log_verbosity_module::kim_get_log_verbosity
///
/// \since 2.0
int GetLogVerbosity(int const index, LogVerbosity * const logVerbosity);
/// \brief Structure provided for use with std::map.
///
/// \since 2.0
struct Comparator
{
/// \brief Provides an (logically unmeaningful) ordering for LogVerbosity
/// objects so that they can be stored in a std::map.
///
/// \since 2.0
bool operator()(LogVerbosity const & a, LogVerbosity const & b) const
{
return a.logVerbosityID < b.logVerbosityID;
}
}; // struct Comparator
} // namespace LOG_VERBOSITY
} // namespace KIM
#endif // KIM_LOG_VERBOSITY_HPP_
kim-api-2.2.1-git/cpp/include/KIM_Model.hpp 0000664 0000000 0000000 00000053005 13765565573 0020333 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_MODEL_HPP_
#define KIM_MODEL_HPP_
#include
namespace KIM
{
// Forward declarations
class LogVerbosity;
class DataType;
class ModelRoutineName;
class SpeciesName;
class Numbering;
class LengthUnit;
class EnergyUnit;
class ChargeUnit;
class TemperatureUnit;
class TimeUnit;
class ComputeArguments;
class ModelImplementation;
/// \brief Provides the primary interface to a %KIM API Model object and is
/// meant to be used by simulators.
///
/// \sa KIM_Model, kim_model_module::kim_model_handle_type
///
/// \since 2.0
class Model
{
public:
/// \brief Create a new %KIM API Model object.
///
/// Allocates a new %KIM API Model object for use by a Simulator and calls
/// the Model's MODEL_ROUTINE_NAME::Create routine.
///
/// \param[in] numbering The Numbering value used by the Simulator.
/// \param[in] requestedLengthUnit The base LengthUnit requested by the
/// Simulator.
/// \param[in] requestedEnergyUnit The base EnergyUnit requested by the
/// Simulator.
/// \param[in] requestedChargeUnit The base ChargeUnit requested by the
/// Simulator.
/// \param[in] requestedTemperatureUnit The base TemperatureUnit requested
/// by the Simulator.
/// \param[in] requestedTimeUnit The base TimeUnit requested by the
/// Simulator.
/// \param[in] modelName The name of the Model to be created.
/// \param[out] requestedUnitsAccepted An integer that is set to \c true if
/// the Model accepts the Simulator's requested base units, \c
/// false if the Model will use base units other than those
/// requested by the Simulator.
/// \param[out] model Pointer to the newly created Model object.
///
/// \note The value of `modelName` is required to be a valid C-identifier.
///
/// \note A requested unit of \c unused indicates that the Simulator will not
/// employ any derived units connected to the associated base unit. This
/// avoids the need for the Simulator to make an arbitrary choice that could
/// cause the Model to not accept its requested base units.
///
/// \return \c true if the %KIM API is unable to allocate a new log object.
/// \return \c true if \c numbering or any of the base units are unknown.
/// \return \c true if the requested model's library cannot be found,
/// opened, is of the wrong type, or has some other problem.
/// \return \c true if the Model's MODEL_ROUTINE_NAME::Create routine
/// returns \c true.
/// \return \c true if the Model's MODEL_ROUTINE_NAME::Create routine does
/// not set the Model's (1) numbering, (2) base units, (3) influence
/// distance, (4) numberOfNeighborLists, (5) cutoff values, (6)
/// modelWillNotRequesNeighborsOfNoncontributingParticles, (7)
/// required ModelRoutineName pointers, or (8) supported species
/// codes.
/// \return \c true if `max(cutoffs) > influenceDistance`.
/// \return \c true if parameters are registered but not a
/// MODEL_ROUTINE_NAME::Refresh pointer, or vise-versa.
/// \return \c true if a MODEL_ROUTINE_NAME::WriteParameterizedModel
/// pointer is provided but no parameters are registered.
/// \return \c true if the Model's MODEL_ROUTINE_NAME::Create routine
/// does not set the Model's Numbering.
/// \return \c false otherwise.
///
/// \post \c requestedUnitsAccepted is unchanged and `model == NULL` if an
/// error occurs.
///
/// \sa KIM_Model_Create, kim_model_module::kim_model_create
///
/// \since 2.0
static int Create(Numbering const numbering,
LengthUnit const requestedLengthUnit,
EnergyUnit const requestedEnergyUnit,
ChargeUnit const requestedChargeUnit,
TemperatureUnit const requestedTemperatureUnit,
TimeUnit const requestedTimeUnit,
std::string const & modelName,
int * const requestedUnitsAccepted,
Model ** const model);
/// \brief Destroy a previously Model::Create'd object.
///
/// Call the Model's MODEL_ROUTINE_NAME::Destroy routine and deallocate
/// the Model object.
///
/// \param[inout] model Pointer to the Model object.
///
/// \pre \c model points to a previously created %KIM API Model object.
///
/// \post `model == NULL`.
///
/// \sa KIM_Model_Destroy, kim_model_module::kim_model_destroy
///
// \since 2.0
static void Destroy(Model ** const model);
/// \brief Determine presence and required status of the given
/// ModelRoutineName.
///
/// \param[in] modelRoutineName The ModelRoutineName of interest.
/// \param[out] present \c true if the Model provides the routine, \c false
/// otherwise.
/// \param[out] required \c true if the Model requires the use of the routine,
/// \c false otherwise.
///
/// \return \c true if \c modelRoutineName is unknown.
/// \return \c false otherwise.
///
/// \pre \c present or \c required may be \c NULL if the corresponding value
/// is not needed.
///
/// \post \c present and \c required are unchanged if an error occurs.
///
/// \sa KIM_Model_IsRoutinePresent, kim_model_module::kim_is_routine_present
///
/// \since 2.0
int IsRoutinePresent(ModelRoutineName const modelRoutineName,
int * const present,
int * const required) const;
/// \brief Get the Model's influence distance.
///
/// \param[out] influenceDistance
///
/// \todo Add more detailed description of \c influenceDistance. (or link to
/// docs elsewhere?)
///
/// \sa KIM_Model_GetInfluenceDistance,
/// kim_model_module::kim_get_influence_distance
///
/// \since 2.0
void GetInfluenceDistance(double * const influenceDistance) const;
/// \brief Get the Model's neighbor list information.
///
/// Each neighbor list has a cutoff value and a flag indicating if the Model
/// will request the neighbors of non-contributing particles.
///
/// \note Output pointers obtained from this routine are valid until the next
/// call to Model::ClearThenRefresh of the KIM::Model object is
/// Model::Destroy'd.
///
/// \param[out] numberOfNeighborLists The number of neighbor lists required
/// by the Model.
/// \param[out] cutoffs The cutoff distance for each neighbor list.
/// \param[out] modelWillNotRequestNeighborsOfNoncontributingParticles
/// \c true if such neighbor lists will not be requested,
/// \c false otherwise.
///
/// \pre \c numberOfNeighborLists, \c cutoffs, or
/// \c modelWillNotRequestNeighborsOfNoncontributingParticles may be
/// \c NULL if the corresponding value is not needed.
///
/// \sa KIM_Model_GetNeighborListPointers,
/// kim_model_module::kim_get_number_of_neighbor_lists,
/// kim_model_module::kim_get_neighbor_list_values
///
/// \since 2.0
void GetNeighborListPointers(
int * const numberOfNeighborLists,
double const ** const cutoffs,
int const ** const modelWillNotRequestNeighborsOfNoncontributingParticles)
const;
/// \brief Get the Model's base unit values.
///
/// \param[out] lengthUnit The Model's base LengthUnit.
/// \param[out] energyUnit The Model's base EnergyUnit.
/// \param[out] chargeUnit The Model's base ChargeUnit.
/// \param[out] temperatureUnit The Model's base TemperatureUnit.
/// \param[out] timeUnit The Model's base TimeUnit.
///
/// \note A unit of \c 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 \c chargeUnit, \c temperatureUnit, and \c timeUnit to \c
/// unused.
///
/// \pre \c lengthUnit, \c energyUnit, \c chargeUnit, \c temperatureUnit, or
/// \c timeUnit may be \c NULL if the corresponding value is not needed.
///
/// \sa KIM_Model_GetUnits, kim_model_module::kim_get_units
///
/// \since 2.0
void GetUnits(LengthUnit * const lengthUnit,
EnergyUnit * const energyUnit,
ChargeUnit * const chargeUnit,
TemperatureUnit * const temperatureUnit,
TimeUnit * const timeUnit) const;
/// \brief Create a new ComputeArguments object for the Model object.
///
/// Allocates a new ComputeArguments object for use by a Simulator and
/// calls the Model's MODEL_ROUTINE_NAME::ComputeArgumentsCreate routine.
///
/// \param[inout] computeArguments Pointer to the newly created
/// ComputeArguments object.
///
/// \return \c true if the %KIM API is unable to allocate a new
/// ComputeArguments object.
/// \return \c true if the Model's MODEL_ROUTINE_NAME::ComputeArgumentsCreate
/// routine returns \c true.
/// \return \c false otherwise.
///
/// \post `computeArguments == NULL` if an error occurs.
///
/// \sa KIM_Model_ComputeArgumentsCreate,
/// kim_model_module::kim_compute_arguments_create
///
/// \since 2.0
int ComputeArgumentsCreate(ComputeArguments ** const computeArguments) const;
/// \brief Destroy a previously Model::ComputeArgumentsCreate'd object.
///
/// Call the Model's MODEL_ROUTINE_NAME::ComputeArgumentsDestroy routine
/// and deallocate the ComputeArguments object.
///
/// \param[inout] computeArguments Pointer to the ComputeArguments object.
///
/// \return \c true if the ComputeArguments object was created by a
/// different Model (as identified by its name string).
/// \return \c true if the Model's
/// MODEL_ROUTINE_NAME::ComputeArgumentsDestroy routine returns \c
/// true.
/// \return \c false otherwise.
///
/// \post \c computeArguments is unchanged if an error occurs, otherwise
/// `computeArguments == NULL`.
///
/// \sa KIM_Model_ComputeArgumentsDestroy,
/// kim_model_module::kim_compute_arguments_destroy
///
/// \since 2.0
int ComputeArgumentsDestroy(ComputeArguments ** const computeArguments) const;
/// \brief Call the Model's MODEL_ROUTINE_NAME::Compute routine.
///
/// \param[in] computeArguments A ComputeArguments object.
///
/// \return \c true if \c computeArguments was created by a different Model
/// (as identified by its name string).
/// \return \c true if
/// ComputeArguments::AreAllRequiredArgumentsAndCallbacksPresent
/// returns \c false for \c computeArguments.
/// \return \c true if the Model's MODEL_ROUTINE_NAME::Compute routine
/// returns \c true.
/// \return \c false otherwise.
///
/// \sa KIM_Model_Compute, kim_model_module::kim_compute
///
/// \since 2.0
int Compute(ComputeArguments const * const computeArguments) const;
/// \brief Call the Model's MODEL_ROUTINE_NAME::Extension routine.
///
/// \param[in] extensionID A string uniquely identifying the extension to
/// be executed.
/// \param[inout] extensionStructure Pointer to a data structure of the type
/// defined by the extension to be executed.
///
/// \return \c true if the Model does not provide a
/// MODEL_ROUTINE_NAME::Extension routine.
/// \return \c true if the Model's MODEL_ROUTINE_NAME::Extension routine
/// returns \c true.
/// \return \c false otherwise.
///
/// \sa KIM_Model_Extension, kim_model_module::kim_extension
///
/// \since 2.0
int Extension(std::string const & extensionID,
void * const extensionStructure);
/// \brief Clear influence distance and neighbor list pointers and refresh
/// Model object after parameter changes.
///
/// Nullify the Model's influence distance, neighbor list cutoff, and \c
/// modelWillNotRequestNeighborsOfNoncontributingParticles pointers. Then
/// call the Model's MODEL_ROUTINE_NAME::Refresh routine.
///
/// \return \c true if the Model does not register any parameters.
/// \return \c true if the Model's MODEL_ROUTINE_NAME::Refresh routine
/// returns \c true.
/// \return \c true if the Model's MODEL_ROUTINE_NAME::Refresh routine
/// does not set the influence distance, the number of neighbor lists,
/// the neighbor list cutoffs, or the \c
/// modelWillNotRequestNeighborsOfNoncontributingParticles pointer.
/// \return \c false otherwise.
///
/// \sa KIM_Model_ClearThenRefresh, kim_model_module::kim_clear_then_refresh
///
/// \since 2.0
int ClearThenRefresh();
/// \brief Call the Model's MODEL_ROUTINE_NAME::WriteParameterizedModel
/// routine.
///
/// \param[in] path Path string to directory within which the new
/// parameterized model files should be written.
/// \param[in] modelName Name of the parameterized model to be created. Must
/// be a valid C identifier.
///
/// \return \c true if the Model object is not a parameterized model.
/// \return \c true if \c modelName is not a valid C identifier.
/// \return \c true if the Model's
/// MODEL_ROUTINE_NAME::WriteParameterizedModel routine returns
/// \c true.
/// \return \c true if the %KIM API is unable to write the \c CMakeLists.txt
/// file.
/// \return \c false otherwise.
///
/// \sa KIM_Model_WriteParameterizedModel,
/// kim_model_module::kim_write_parameterized_model
///
/// \since 2.0
int WriteParameterizedModel(std::string const & path,
std::string const & modelName) const;
/// \brief Get the Model's support and code for the requested SpeciesName.
///
/// \param[in] speciesName The SpeciesName of interest.
/// \param[out] speciesIsSupported \c true if the Model supports the species
/// of interest, \c false otherwise.
/// \param[out] code Value used by the Model to refer to the species of
/// interest.
///
/// \return \c true if \c speciesName is unknown.
/// \return \c false otherwise.
///
/// \pre \c code may be \c NULL if the value is not needed.
///
/// \post \c speciesIsSupported and \c code are unchanged if an error occurs.
/// \c code is unchanged if `speciesIsSupported == false`.
///
/// \sa KIM_Model_GetSpeciesSupportAndCode,
/// kim_model_module::kim_get_species_support_and_code
///
/// \since 2.0
int GetSpeciesSupportAndCode(SpeciesName const speciesName,
int * const speciesIsSupported,
int * const code) const;
/// \brief Get the number of parameter arrays provided by the Model.
///
/// \param[out] numberOfParameters The number of parameter arrays provided
/// by the Model.
///
/// \sa KIM_Model_GetNumberOfParameters,
/// kim_model_module::kim_get_number_of_parameters
///
/// \since 2.0
void GetNumberOfParameters(int * const numberOfParameters) const;
/// \brief Get the metadata associated with one of the Model's parameter
/// arrays.
///
/// \note String pointers obtained from this routine are valid until the
/// KIM::Model object is Model::Destroy'd.
///
/// \param[in] parameterIndex Zero-based index for the parameter array.
/// \param[out] dataType The DataType value for the parameter array.
/// \param[out] extent The number of parameters in the array.
/// \param[out] name A string identifying the parameter array (will be a valid
/// C identifier).
/// \param[out] description A free-form string description of the parameter
/// array's content.
///
/// \return \c true if \c parameterIndex is invalid
/// \return \c false otherwise.
///
/// \pre \c dataType, \c extent, \c name, or \c description may be \c NULL if
/// the corresponding value is not needed.
///
/// \sa KIM_Model_GetParameterMetadata,
/// kim_model_module::kim_get_parameter_metadata
///
/// \since 2.0
int GetParameterMetadata(int const parameterIndex,
DataType * const dataType,
int * const extent,
std::string const ** const name,
std::string const ** const description) const;
/// \brief Get a parameter value from the Model.
///
/// \param[in] parameterIndex Zero-based index for the parameter array of
/// interest.
/// \param[in] arrayIndex Zero-based index within the array for the parameter
/// of interest.
/// \param[out] parameterValue The value of the parameter of interest.
///
/// \return \c true if \c parameterIndex is invalid.
/// \return \c true if the specified parameter and \c parameterValue are of
/// different data types.
/// \return \c true if \c arrayIndex is invalid.
/// \return \c false otherwise.
///
/// \sa KIM_Model_GetParameterInteger, KIM_Model_GetParameterDouble,
/// kim_model_module::kim_get_parameter
///
/// \since 2.0
int GetParameter(int const parameterIndex,
int const arrayIndex,
int * const parameterValue) const;
/// \overload
int GetParameter(int const parameterIndex,
int const arrayIndex,
double * const parameterValue) const;
/// \brief Set a parameter value for the Model.
///
/// \param[in] parameterIndex Zero-based index for the parameter array of
/// interest.
/// \param[in] arrayIndex Zero-based index within the array for the parameter
/// of interest.
/// \param[in] parameterValue The new value for the parameter of interest.
///
/// \return \c true if \c parameterIndex is invalid.
/// \return \c true if the specified parameter and \c parameterValue are of
/// different data types.
/// \return \c true if \c arrayIndex is invalid.
/// \return \c false otherwise.
///
/// \sa KIM_Model_SetParameterInteger, KIM_Model_SetParameterDouble,
/// kim_model_module::kim_set_parameter
///
/// \since 2.0
int SetParameter(int const parameterIndex,
int const arrayIndex,
int const parameterValue);
/// \overload
int SetParameter(int const parameterIndex,
int const arrayIndex,
double const parameterValue);
/// \brief Set the \ref cache_buffer_pointers "Simulator's buffer pointer"
/// within the Model object.
///
/// The simulator buffer pointer may be used by the simulator to associate
/// a memory buffer with the Model object.
///
/// \param[in] ptr The simulator buffer data pointer.
///
/// \sa KIM_Model_SetSimulatorBufferPointer,
/// kim_model_module::kim_set_simulator_buffer_pointer
///
/// \since 2.0
void SetSimulatorBufferPointer(void * const ptr);
/// \brief Get the \ref cache_buffer_pointers "Simulator's buffer pointer"
/// from the Model object.
///
/// \param[out] ptr The simulator buffer data pointer.
///
/// \note `ptr == NULL` if the simulator has not previously called
/// Model::SetSimulatorBufferPointer.
///
/// \sa KIM_Model_GetSimulatorBufferPointer,
/// kim_model_module::kim_get_simulator_buffer_pointer
///
/// \since 2.0
void GetSimulatorBufferPointer(void ** const ptr) const;
/// \brief 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 \c
/// ='s.
///
/// \sa KIM_Model_ToString, kim_model_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
/// \brief Set the identity of the Log object associated with the Model
/// object.
///
/// \param[in] logID String identifying the Model object's Log object.
///
/// \sa KIM_Model_SetLogID, kim_model_module::kim_set_log_id
///
/// \since 2.0
void SetLogID(std::string const & logID);
/// \brief Push a new LogVerbosity onto the Model object's Log object
/// verbosity stack.
///
/// \param[in] logVerbosity A LogVerbosity value.
///
/// \sa KIM_Model_PushLogVerbosity, kim_model_module::kim_push_log_verbosity
///
/// \since 2.0
void PushLogVerbosity(LogVerbosity const logVerbosity);
/// \brief Pop a LogVerbosity from the Model object's Log object verbosity
/// stack.
///
/// \sa KIM_Model_PopLogVerbosity, kim_model_module::kim_pop_log_verbosity
///
/// \since 2.0
void PopLogVerbosity();
private:
// do not allow copy constructor or operator=
Model(Model const &);
void operator=(Model const &);
Model();
~Model();
ModelImplementation * pimpl;
}; // class Model
} // namespace KIM
#endif // KIM_MODEL_HPP_
kim-api-2.2.1-git/cpp/include/KIM_ModelCompute.hpp 0000664 0000000 0000000 00000007311 13765565573 0021667 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_MODEL_COMPUTE_HPP_
#define KIM_MODEL_COMPUTE_HPP_
#include
#include
namespace KIM
{
// Forward declarations
class LogVerbosity;
class ModelComputeImplementation;
/// \brief Provides the interface to a %KIM API Model object for use by models
/// within their MODEL_ROUTINE_NAME::Compute routine.
///
/// \sa KIM_ModelCompute,
/// kim_model_compute_module::kim_model_compute_handle_type
///
/// \since 2.0
class ModelCompute
{
public:
/// \brief Get the \ref cache_buffer_pointers "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.
///
/// \param[out] ptr The model buffer data pointer.
///
/// \note `ptr == NULL` if the model has not previously called
/// ModelCreate::SetModelBufferPointer or
/// ModelDriverCreate::SetModelBufferPointer.
///
/// \sa KIM_ModelCompute_GetModelBufferPointer,
/// kim_model_compute_module::kim_get_model_buffer_pointer
///
/// \since 2.0
void GetModelBufferPointer(void ** const ptr) const;
/// \brief Write a log entry into the log file.
///
/// This results in a no-op if \c logVerbosity is LOG_VERBOSITY::silent or if
/// \c logVerbosity is greater-than the Log object's top LogVerbosity on its
/// stack.
///
/// \param[in] logVerbosity The LogVerbosity level for the entry.
/// \param[in] message The body text of the log entry.
/// \param[in] lineNumber The source code file line number.
/// \param[in] fileName The source code file name.
///
/// \sa KIM_ModelCompute_LogEntry, kim_model_compute_module::kim_log_entry
///
/// \since 2.0
void LogEntry(LogVerbosity const logVerbosity,
std::string const & message,
int const lineNumber,
std::string const & fileName) const;
/// \overload
void LogEntry(LogVerbosity const logVerbosity,
std::stringstream const & message,
int const lineNumber,
std::string const & fileName) const;
/// \brief 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 \c
/// ='s.
///
/// \sa KIM_ModelCompute_ToString, kim_model_compute_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
private:
// do not allow copy constructor or operator=
ModelCompute(ModelCompute const &);
void operator=(ModelCompute const &);
ModelCompute();
~ModelCompute();
ModelComputeImplementation * pimpl;
}; // class ModelCompute
} // namespace KIM
#endif // KIM_MODEL_COMPUTE_HPP_
kim-api-2.2.1-git/cpp/include/KIM_ModelComputeArguments.hpp 0000664 0000000 0000000 00000024654 13765565573 0023566 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_HPP_
#define KIM_MODEL_COMPUTE_ARGUMENTS_HPP_
#include
#include
namespace KIM
{
// Forward declarations
class LogVerbosity;
class ComputeArgumentName;
class ComputeCallbackName;
class ModelComputeArgumentsImplementation;
/// \brief Provides the interface to a %KIM API ComputeArguments object for use
/// by models within their MODEL_ROUTINE_NAME::Compute routine.
///
/// \sa KIM_ModelComputeArguments,
/// kim_model_compute_arguments_module::kim_model_compute_arguments_handle_type
///
/// \since 2.0
class ModelComputeArguments
{
public:
/// \brief Get the neighbor list for a particle of interest corresponding to
/// a particular neighbor list cutoff distance.
///
/// \param[in] neighborListIndex Zero-based index corresponding to the
/// desired neighbor list cutoff distance.
/// \param[in] particleNumber Particle number (using the Model's Numbering,
/// as specified in the call to ModelCreate::SetModelNumbering or
/// ModelDriverCreate::SetModelNumbering) for the particle of
/// interest.
/// \param[out] numberOfNeighbors Number of neighbor particles in the list.
/// \param[out] neighborsOfParticle Pointer to array of particle neighbor
/// numbers (using the Model's Numbering).
///
/// \return \c true if \c neighborListIndex is invalid.
/// \return \c true if \c particleNumber is invalid.
/// \return \c true if the Simulator's COMPUTE_CALLBACK_NAME::GetNeighborList
/// routine returns \c true.
/// \return \c false otherwise.
///
/// \sa KIM_ModelComputeArguments_GetNeighborList,
/// kim_model_compute_arguments_module::kim_get_neighbor_list
///
/// \since 2.0
int GetNeighborList(int const neighborListIndex,
int const particleNumber,
int * const numberOfNeighbors,
int const ** const neighborsOfParticle) const;
/// \brief Call the Simulator's COMPUTE_CALLBACK_NAME::ProcessDEDrTerm
/// routine.
///
/// \todo Add more detailed description of Process mechanism.
///
/// \param[in] de Value of DEDr for particle pair.
/// \param[in] r Value of particle pair distance, \f$
/// \|\mathbf{r}^{(ij)}\|\f$, where \f$\mathbf{r}^{(ij)} \equiv
/// \mathbf{r}^{(j)} - \mathbf{r}^{(i)}\f$ (see the \ref theory
/// section).
/// \param[in] dx Value of particle pair relative position vector,
/// \f$\mathbf{r}^{(ij)}\f$.
/// \param[in] i Particle number (using the Model's Numbering, as specified
/// in the call to ModelCreate::SetModelNumbering or
/// ModelDriverCreate::SetModelNumbering) for first particle in
/// pair.
/// \param[in] j Particle number (using the Model's Numbering) for second
/// particle in pair.
///
/// \returns \c true if the Simulator's
/// COMPUTE_CALLBACK_NAME::ProcessDEDrTerm routine returns \c true.
/// \returns \c false otherwise.
///
/// \sa KIM_ModelComputeArguments_ProcessDEDrTerm,
/// kim_model_compute_arguments_module::kim_process_dedr_term
///
/// \since 2.0
int ProcessDEDrTerm(double const de,
double const r,
double const * const dx,
int const i,
int const j) const;
/// \brief Call the Simulator's COMPUTE_CALLBACK_NAME::ProcessD2EDr2Term
/// routine.
///
/// \todo Add more detailed description of Process mechanism.
///
/// \param[in] de Value of D2EDr2 for particle pairs.
/// \param[in] r Array of particle pair distances.
/// \param[in] dx Array of particle pair relative position vectors.
/// \param[in] i Array of particle numbers (using the Model's Numbering, as
/// specified in the call to ModelCreate::SetModelNumbering or
/// ModelDriverCreate::SetModelNumbering) for first particle in
/// each pair.
/// \param[in] j Array of particle numbers (using the Model's Numbering) for
/// second particle in each pair.
///
/// \returns \c true if the Simulator's
/// COMPUTE_CALLBACK_NAME::ProcessD2EDr2Term routine returns \c
/// true.
/// \returns \c false otherwise.
///
/// \sa KIM_ModelComputeArguments_ProcessD2EDr2Term,
/// kim_model_compute_arguments_module::kim_process_d2edr2_term
///
/// \since 2.0
int ProcessD2EDr2Term(double const de,
double const * const r,
double const * const dx,
int const * const i,
int const * const j) const;
/// \brief Get the data pointer for a ComputeArgumentName.
///
/// \param[in] computeArgumentName The ComputeArgumentName of interest.
/// \param[out] ptr The data pointer.
///
/// \return \c true if \c computeArgumentName is unknown.
/// \return \c true if `computeArgumentName == SUPPORT_STATUS::notSupported`.
/// \return \c false otherwise.
///
/// \sa KIM_ModelComputeArguments_GetArgumentPointerInteger,
/// KIM_ModelComputeArguments_GetArgumentPointerDouble,
/// kim_model_compute_arguments_module::kim_get_argument_pointer
///
/// \since 2.0
int GetArgumentPointer(ComputeArgumentName const computeArgumentName,
int const ** const ptr) const;
/// \overload
int GetArgumentPointer(ComputeArgumentName const computeArgumentName,
int ** const ptr) const;
/// \overload
int GetArgumentPointer(ComputeArgumentName const computeArgumentName,
double const ** const ptr) const;
/// \overload
int GetArgumentPointer(ComputeArgumentName const computeArgumentName,
double ** const ptr) const;
/// \brief Determine if the Simulator has provided a non-NULL function
/// pointer for a ComputeCallbackName of interest.
///
/// \param[in] computeCallbackName The ComputeCallbackName of interest.
/// \param[out] present Is \c true if the callback's function pointer is
/// non-NULL, and is \c false otherwise.
///
/// \return \c true if \c computeArgumentName is unknown.
/// \return \c true if \c computeArguemntName is SUPPORT_STATUS::notSupported.
/// \return \c false otherwise.
///
/// \post \c present is unchanged in an error occurs.
///
/// \sa KIM_ModelComputeArguments_IsCallbackPresent,
/// kim_model_compute_arguments_module::kim_is_callback_present
///
/// \since 2.0
int IsCallbackPresent(ComputeCallbackName const computeCallbackName,
int * const present) const;
/// \brief Set the \ref cache_buffer_pointers "Model's buffer pointer"
/// within the ComputeArguments object.
///
/// The model buffer pointer may be used by the model to associate
/// a memory buffer with the ComputeArguments object.
///
/// \param[in] ptr The model buffer data pointer.
///
/// \sa KIM_ModelComputeArguments_SetModelBufferPointer,
/// kim_model_compute_arguments_module::kim_set_model_buffer_pointer
///
/// \since 2.0
void SetModelBufferPointer(void * const ptr);
/// \brief Get the \ref cache_buffer_pointers "Model's buffer pointer"
/// within the ComputeArguments object.
///
/// The model buffer pointer may be used by the Model to associate
/// a memory buffer with the ComputeArguments object.
///
/// \param[out] ptr The model buffer data pointer.
///
/// \note `ptr == NULL` if the model has not previously called
/// ModelComputeArguments::SetModelBufferPointer.
///
/// \sa KIM_ModelComputeArguments_GetModelBufferPointer,
/// kim_model_compute_arguments_module::kim_get_model_buffer_pointer
///
/// \since 2.0
void GetModelBufferPointer(void ** const ptr) const;
/// \brief Write a log entry into the log file.
///
/// This results in a no-op if \c logVerbosity is LOG_VERBOSITY::silent or if
/// \c logVerbosity is greater-than the Log object's top LogVerbosity on its
/// stack.
///
/// \param[in] logVerbosity The LogVerbosity level for the entry.
/// \param[in] message The body text of the log entry.
/// \param[in] lineNumber The source code file line number.
/// \param[in] fileName The source code file name.
///
/// \sa KIM_ModelComputeArguments_LogEntry,
/// kim_model_compute_arguments_module::kim_log_entry
///
/// \since 2.0
void LogEntry(LogVerbosity const logVerbosity,
std::string const & message,
int const lineNumber,
std::string const & fileName) const;
/// \overload
void LogEntry(LogVerbosity const logVerbosity,
std::stringstream const & message,
int const lineNumber,
std::string const & fileName) const;
/// \brief 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 \c
/// ='s.
///
/// \sa KIM_ModelComputeArguments_ToString,
/// kim_model_compute_arguments_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
private:
// do not allow copy constructor or operator=
ModelComputeArguments(ModelComputeArguments const &);
void operator=(ModelComputeArguments const &);
ModelComputeArguments();
~ModelComputeArguments();
ModelComputeArgumentsImplementation * pimpl;
}; // class ModelComputeArguments
} // namespace KIM
#endif // KIM_MODEL_COMPUTE_ARGUMENTS_HPP_
kim-api-2.2.1-git/cpp/include/KIM_ModelComputeArgumentsCreate.hpp 0000664 0000000 0000000 00000013031 13765565573 0024675 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_CREATE_HPP_
#define KIM_MODEL_COMPUTE_ARGUMENTS_CREATE_HPP_
#include
#include
namespace KIM
{
// Forward declarations
class LogVerbosity;
class SupportStatus;
class ComputeArgumentName;
class ComputeCallbackName;
class ModelComputeArgumentsCreateImplementation;
/// \brief Provides the interface to a %KIM API ComputeArguments object for use
/// by models within their MODEL_ROUTINE_NAME::ComputeArgumentsCreate routine.
///
/// \sa KIM_ModelComputeArgumentsCreate,
/// kim_model_compute_arguments_create_module::kim_model_compute_arguments_create_handle_type
///
/// \since 2.0
class ModelComputeArgumentsCreate
{
public:
/// \brief Set the SupportStatus of a ComputeArgumentName.
///
/// \param[in] computeArgumentName The ComputeArgumentName of interest.
/// \param[in] supportStatus The corresponding SupportStatus.
///
/// \return \c true if \c computeArgumentName is unknown.
/// \return \c true if \c computeArgumentName is SUPPORT_STATUS::requiredByAPI
/// and \c supportStatus is not SUPPORT_STATUS::requiredByAPI.
/// \return \c false otherwise.
///
/// \sa KIM_ModelComputeArgumentsCreate_SetArgumentSupportStatus,
/// kim_model_compute_arguments_create_module::kim_set_argument_support_status
///
/// \since 2.0
int SetArgumentSupportStatus(ComputeArgumentName const computeArgumentName,
SupportStatus const supportStatus);
/// \brief Set the SupportStatus of a ComputeCallbackName.
///
/// \param[in] computeCallbackName The ComputeCallbackName of interest.
/// \param[in] supportStatus The corresponding SupportStatus.
///
/// \return \c true if \c computeCallbackName is unknown.
/// \return \c true if \c computeCallbackName is SUPPORT_STATUS::requiredByAPI
/// and \c supportStatus is not SUPPORT_STATUS::requiredByAPI.
/// \return \c false otherwise.
///
/// \sa KIM_ModelComputeArgumentsCreate_SetCallbackSupportStatus,
/// kim_model_compute_arguments_create_module::kim_set_callback_support_status
///
/// \since 2.0
int SetCallbackSupportStatus(ComputeCallbackName const computeCallbackName,
SupportStatus const supportStatus);
/// \brief Set the \ref cache_buffer_pointers "Model's buffer pointer"
/// within the ComputeArguments object.
///
/// The model buffer pointer may be used by the model to associate a memory
/// buffer with the ComputeArguments object.
///
/// \param[in] ptr The model buffer data pointer.
///
/// \sa KIM_ModelComputeArguments_SetModelBufferPointer,
/// kim_model_compute_arguments_create_module::kim_set_model_buffer_pointer
///
/// \since 2.0
void SetModelBufferPointer(void * const ptr);
/// \brief Write a log entry into the log file.
///
/// This results in a no-op if \c logVerbosity is LOG_VERBOSITY::silent or if
/// \c logVerbosity is greater-than the Log object's top LogVerbosity on its
/// stack.
///
/// \param[in] logVerbosity The LogVerbosity level for the entry.
/// \param[in] message The body text of the log entry.
/// \param[in] lineNumber The source code file line number.
/// \param[in] fileName The source code file name.
///
/// \sa KIM_ModelComputeArgumentsCreate_LogEntry,
/// kim_model_compute_arguments_create_module::kim_log_entry
///
/// \since 2.0
void LogEntry(LogVerbosity const logVerbosity,
std::string const & message,
int const lineNumber,
std::string const & fileName) const;
/// \overload
void LogEntry(LogVerbosity const logVerbosity,
std::stringstream const & message,
int const lineNumber,
std::string const & fileName) const;
/// \brief 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 \c
/// ='s.
///
/// \sa KIM_ModelComputeArgumentsCreate_ToString,
/// kim_model_compute_arguments_create_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
private:
// do not allow copy constructor or operator=
ModelComputeArgumentsCreate(ModelComputeArgumentsCreate const &);
void operator=(ModelComputeArgumentsCreate const &);
ModelComputeArgumentsCreate();
~ModelComputeArgumentsCreate();
ModelComputeArgumentsCreateImplementation * pimpl;
}; // class ModelComputeArgumentsCreate
} // namespace KIM
#endif // KIM_MODEL_COMPUTE_ARGUMENTS_CREATE_HPP_
kim-api-2.2.1-git/cpp/include/KIM_ModelComputeArgumentsDestroy.hpp 0000664 0000000 0000000 00000010124 13765565573 0025123 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_DESTROY_HPP_
#define KIM_MODEL_COMPUTE_ARGUMENTS_DESTROY_HPP_
#include
#include
namespace KIM
{
// Forward declarations
class LogVerbosity;
class ModelComputeArgumentsDestroyImplementation;
/// \brief Provides the interface to a %KIM API ComputeArguments object for use
/// by models within their MODEL_ROUTINE_NAME::ComputeArgumentsDestroy routine.
///
/// \sa KIM_ModelComputeArgumentsDestroy,
/// kim_model_compute_arguments_destroy_module::kim_model_compute_arguments_destroy_handle_type
///
/// \since 2.0
class ModelComputeArgumentsDestroy
{
public:
/// \brief Get the \ref cache_buffer_pointers "Model's buffer pointer"
/// within the ComputeArguments object.
///
/// The model buffer pointer may be used by the model to associate
/// a memory buffer with the ComputeArguments object.
///
/// \param[in] ptr The model buffer data pointer.
///
/// \note `ptr == NULL` if the model has not previously called
/// ModelComputeArguments::SetModelBufferPointer.
///
/// \sa KIM_ModelComputeArgumentsDestroy_GetModelBufferPointer,
/// kim_model_compute_arguments_destroy_module::kim_get_model_buffer_pointer
///
/// \since 2.0
void GetModelBufferPointer(void ** const ptr) const;
/// \brief Write a log entry into the log file.
///
/// This results in a no-op if \c logVerbosity is LOG_VERBOSITY::silent or if
/// \c logVerbosity is greater-than the Log object's top LogVerbosity on its
/// stack.
///
/// \param[in] logVerbosity The LogVerbosity level for the entry.
/// \param[in] message The body text of the log entry.
/// \param[in] lineNumber The source code file line number.
/// \param[in] fileName The source code file name.
///
/// \sa KIM_ModelComputeArgumentsDestroy_LogEntry,
/// kim_model_compute_arguments_destroy_module::kim_log_entry
///
/// \since 2.0
void LogEntry(LogVerbosity const logVerbosity,
std::string const & message,
int const lineNumber,
std::string const & fileName) const;
/// \overload
void LogEntry(LogVerbosity const logVerbosity,
std::stringstream const & message,
int const lineNumber,
std::string const & fileName) const;
/// \brief 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 \c
/// ='s.
///
/// \sa KIM_ModelComputeArgumentsDestroy_ToString,
/// kim_model_compute_arguments_destroy_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
private:
// do not allow copy constructor or operator=
ModelComputeArgumentsDestroy(ModelComputeArgumentsDestroy const &);
void operator=(ModelComputeArgumentsDestroy const &);
ModelComputeArgumentsDestroy();
~ModelComputeArgumentsDestroy();
ModelComputeArgumentsDestroyImplementation * pimpl;
}; // class ModelComputeArgumentsDestroy
} // namespace KIM
#endif // KIM_MODEL_COMPUTE_ARGUMENTS_DESTROY_HPP_
kim-api-2.2.1-git/cpp/include/KIM_ModelCreate.hpp 0000664 0000000 0000000 00000034135 13765565573 0021462 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_MODEL_CREATE_HPP_
#define KIM_MODEL_CREATE_HPP_
#include
#include
#ifndef KIM_FUNCTION_TYPES_HPP_
#include "KIM_FunctionTypes.hpp" // IWYU pragma: export
#endif
namespace KIM
{
// Forward declarations
class LogVerbosity;
class LanguageName;
class Numbering;
class ModelRoutineName;
class SpeciesName;
class LengthUnit;
class EnergyUnit;
class ChargeUnit;
class TemperatureUnit;
class TimeUnit;
class ModelCreateImplementation;
/// \brief Provides the interface to a %KIM API Model object for use by models
/// within their MODEL_ROUTINE_NAME::Create routine.
///
/// \sa ModelDriverCreate, KIM_ModelCreate, KIM_ModelDriverCreate,
/// kim_model_driver_create_module::kim_model_driver_create_handle_type
///
/// \since 2.0
class ModelCreate
{
public:
/// \brief Set the Model's particle Numbering.
///
/// \param[in] numbering The Model's particle Numbering.
///
/// \return \c true if \c numbering is unknown.
/// \return \c false otherwise.
///
/// \sa ModelDriverCreate::SetModelNumbering,
/// KIM_ModelCreate_SetModelNumbering,
/// KIM_ModelDriverCreate_SetModelNumbering,
/// kim_model_driver_create_module::kim_set_model_numbering
///
/// \since 2.0
int SetModelNumbering(Numbering const numbering);
/// \brief Set the Model's influence distance data pointer.
///
/// \todo Add more detailed description of \c influenceDistance (or link to
/// docs elsewhere?)
///
/// \param[in] influenceDistance Pointer to Model's influence distance.
///
/// \note The model is responsible for allocating the memory associated with
/// the influence distance data. The model must use the \ref
/// cache_buffer_pointers "Model's buffer pointer" to retain access to this
/// memory location and avoid a memory leak.
///
/// \sa ModelDriverCreate::SetInfluenceDistancePointer,
/// KIM_ModelCreate_SetInfluenceDistancePointer,
/// KIM_ModelDriverCreate_SetInfluenceDistancePointer,
/// kim_model_driver_create_module::kim_set_influence_distance_pointer
///
/// \since 2.0
void SetInfluenceDistancePointer(double const * const influenceDistance);
/// \brief Set the Model's neighbor list data pointers.
///
/// \todo Add more detailed description
///
/// \param[in] numberOfNeighborLists The number of neighbor lists required by
/// the Model.
/// \param[in] cutoffs Array of cutoff values for each of the required
/// neighbor lists.
/// \param[in] modelWillNotRequestNeighborsOfNoncontributingParticles Array
/// of integers; \c true or \c 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 \c
/// modelWillNotRequestNeighborsOfNoncontributingParticles data. The model
/// must use the \ref cache_buffer_pointers "Model's buffer pointer" to
/// retain access to this memory location and avoid a memory leak.
///
/// \sa ModelDriverCreate::SetNeighborListPointers,
/// KIM_ModelCreate_SetNeighborListPointers,
/// KIM_ModelDriverCreate_SetNeighborListPointers,
/// kim_model_driver_create_module::kim_set_neighbor_list_pointers
///
/// \since 2.0
void SetNeighborListPointers(
int const numberOfNeighborLists,
double const * const cutoffs,
int const * const modelWillNotRequestNeighborsOfNoncontributingParticles);
/// \brief Set the function pointer for the ModelRoutineName of interest.
///
/// \param[in] modelRoutineName The ModelRoutineName of interest.
/// \param[in] languageName The LanguageName of the ModelRoutineName.
/// \param[in] required Integer, \c true if the model requires the simulator
/// to call the associated ModelRoutineName in order to be used
/// correctly, \c false otherwise.
/// \param[in] fptr Function pointer for the Model's ModelRoutineName
/// routine.
///
/// \return \c true if \c modelRoutineName or \c langaugeName are unknown.
/// \return \c true if `required == false` and \c modelRoutineName has
/// SupportStatus SUPPORT_STATUS::requiredByAPI.
/// \return \c false otherwise.
///
/// \sa ModelDriverCreate::SetRoutinePointer,
/// KIM_ModelCreate_SetRoutinePointer,
/// KIM_ModelDriverCreate_SetRoutinePointer,
/// kim_model_driver_create_module::kim_set_routine_pointer
///
/// \since 2.0
int SetRoutinePointer(ModelRoutineName const modelRoutineName,
LanguageName const languageName,
int const required,
Function * const fptr);
/// \brief Set integer code for supported SpeciesName.
///
/// A call to this routine adds/updates the list of SpeciesName's supported
/// by the Model and associates the specified SpeciesName with the integer
/// code to be used within the COMPUTE_ARGUMENT_NAME::particleSpeciesCodes
/// argument.
///
/// \param[in] speciesName The SpeciesName of interest.
/// \param[in] code The associated code.
///
/// \return \c true if \c speciesName is unknown.
/// \return \c false otherwise.
///
/// \sa ModelDriverCreate::SetSpeciesCode, KIM_ModelCreate_SetSpeciesCode,
/// KIM_ModelDriverCreate_SetSpeciesCode,
/// kim_model_driver_create_module::kim_set_species_code
///
/// \since 2.0
int SetSpeciesCode(SpeciesName const speciesName, int const code);
/// \brief Set the next parameter data pointer to be provided by the model.
///
/// This routine is called once for each parameter array to be provided by
/// the model. The order of these calls is important and determines the
/// index assigned to each parameter array for use in the Model::GetParameter
/// and related routines.
///
/// \param[in] extent The number of entries in the parameter array.
/// \param[in] ptr The parameter array data pointer.
/// \param[in] name A brief unique name for the parameter array. This name
/// must be a valid C identifier.
/// \param[in] description A free-form text description of the parameter
/// array. This should include details about the data layout
/// (e.g., the array corresponds to a square upper-triangular
/// matrix in row-major storage).
///
/// \note The model is responsible for allocating the memory associated with
/// the parameter array data. The model must use the \ref
/// cache_buffer_pointers "Model's buffer pointer" to retain access to this
/// memory location and avoid a memory leak.
///
/// \sa ModelDriverCreate::SetParameterPointer,
/// KIM_ModelCreate_SetParameterPointerInteger,
/// KIM_ModelCreate_SetParameterPointerDouble,
/// KIM_ModelDriverCreate_SetParameterPointerInteger,
/// KIM_ModelDriverCreate_SetParameterPointerDouble,
/// kim_model_driver_create_module::kim_set_parameter_pointer
///
/// \since 2.0
int SetParameterPointer(int const extent,
int * const ptr,
std::string const & name,
std::string const & description);
/// \overload
int SetParameterPointer(int const extent,
double * const ptr,
std::string const & name,
std::string const & description);
/// \brief Set the \ref cache_buffer_pointers "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.
///
/// \param[in] ptr The model buffer data pointer.
///
/// \sa ModelDriverCreate::SetModelBufferPointer,
/// KIM_ModelCreate_SetModelBufferPointer,
/// KIM_ModelDriverCreate_SetModelBufferPointer,
/// kim_model_driver_create_module::kim_set_model_buffer_pointer
///
/// \since 2.0
void SetModelBufferPointer(void * const ptr);
/// \brief Set the Model's base unit values.
///
/// \param[in] lengthUnit The Model's base LengthUnit.
/// \param[in] energyUnit The Model's base EnergyUnit.
/// \param[in] chargeUnit The Model's base ChargeUnit.
/// \param[in] temperatureUnit The Model's base TemperatureUnit.
/// \param[in] timeUnit The Model's base TimeUnit.
///
/// \note A unit of \c 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 \c chargeUnit, \c temperatureUnit, and \c timeUnit to \c
/// unused.
///
/// \return \c true if any of the base units are unknown.
/// \return \c true if \c lengthUnit or \c energyUnit are unused.
/// \return \c false otherwise.
///
/// \sa ModelDriverCreate::SetUnits, KIM_ModelCreate_SetUnits,
/// KIM_ModelDriverCreate_SetUnits,
/// kim_model_driver_create_module::kim_set_units
///
/// \since 2.0
int SetUnits(LengthUnit const lengthUnit,
EnergyUnit const energyUnit,
ChargeUnit const chargeUnit,
TemperatureUnit const temperatureUnit,
TimeUnit const timeUnit);
/// \brief Get the multiplicative factor to convert between a derived unit
/// represented in two different sets of base units.
///
/// \param[in] fromLengthUnit The "from" base length unit.
/// \param[in] fromEnergyUnit The "from" base energy unit.
/// \param[in] fromChargeUnit The "from" base charge unit.
/// \param[in] fromTemperatureUnit The "from" base temperature unit.
/// \param[in] fromTimeUnit The "from" base time unit.
/// \param[in] toLengthUnit The "to" base length unit.
/// \param[in] toEnergyUnit The "to" base energy unit.
/// \param[in] toChargeUnit The "to" base charge unit.
/// \param[in] toTemperatureUnit The "to" base temperature unit.
/// \param[in] toTimeUnit The "to" base time unit.
/// \param[in] lengthExponent The derived unit's length exponent.
/// \param[in] energyExponent The derived unit's energy exponent.
/// \param[in] chargeExponent The derived unit's charge exponent.
/// \param[in] temperatureExponent The derived unit's temperature exponent.
/// \param[in] timeExponent The derived unit's time exponent.
/// \param[out] conversionFactor The desired conversion factor.
///
/// \return \c true if any of the base units are unknown.
/// \return \c true if any of the base units are \c unused and the
/// corresponding exponent is nonzero.
/// \return \c false otherwise.
///
/// \sa ModelDriverCreate::ConvertUnit, KIM_ModelCreate_ConvertUnit,
/// KIM_ModelDriverCreate_ConvertUnit,
/// kim_model_driver_create_module::kim_convert_unit
///
/// \since 2.0
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);
/// \brief Write a log entry into the log file.
///
/// This results in a no-op if \c logVerbosity is LOG_VERBOSITY::silent or if
/// \c logVerbosity is greater-than the Log object's top LogVerbosity on its
/// stack.
///
/// \param[in] logVerbosity The LogVerbosity level for the entry.
/// \param[in] message The body text of the log entry.
/// \param[in] lineNumber The source code file line number.
/// \param[in] fileName The source code file name.
///
/// \sa KIM_ModelCreate_LogEntry,
/// kim_model_driver_create_module::kim_log_entry
///
/// \since 2.0
void LogEntry(LogVerbosity const logVerbosity,
std::string const & message,
int const lineNumber,
std::string const & fileName) const;
/// \overload
void LogEntry(LogVerbosity const logVerbosity,
std::stringstream const & message,
int const lineNumber,
std::string const & fileName) const;
/// \brief 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 \c
/// ='s.
///
/// \sa KIM_ModelCreate_ToString,
/// kim_model_driver_create_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
private:
// do not allow copy constructor or operator=
ModelCreate(ModelCreate const &);
void operator=(ModelCreate const &);
ModelCreate();
~ModelCreate();
ModelCreateImplementation * pimpl;
}; // class ModelCreate
} // namespace KIM
#endif // KIM_MODEL_CREATE_HPP_
kim-api-2.2.1-git/cpp/include/KIM_ModelDestroy.hpp 0000664 0000000 0000000 00000007311 13765565573 0021704 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_MODEL_DESTROY_HPP_
#define KIM_MODEL_DESTROY_HPP_
#include
#include
namespace KIM
{
// Forward declarations
class LogVerbosity;
class ModelDestroyImplementation;
/// \brief Provides the interface to a %KIM API Model object for use by models
/// within their MODEL_ROUTINE_NAME::Destroy routine.
///
/// \sa KIM_ModelDestroy,
/// kim_model_destroy_module::kim_model_destroy_handle_type
///
/// \since 2.0
class ModelDestroy
{
public:
/// \brief Get the \ref cache_buffer_pointers "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.
///
/// \param[out] ptr The model buffer data pointer.
///
/// \note `ptr == NULL` if the model has not previously called
/// ModelCreate::SetModelBufferPointer or
/// ModelDriverCreate::SetModelBufferPointer.
///
/// \sa KIM_ModelDestroy_GetModelBufferPointer,
/// kim_model_destroy_module::kim_get_model_buffer_pointer
///
/// \since 2.0
void GetModelBufferPointer(void ** const ptr) const;
/// \brief Write a log entry into the log file.
///
/// This results in a no-op if \c logVerbosity is LOG_VERBOSITY::silent or if
/// \c logVerbosity is greater-than the Log object's top LogVerbosity on its
/// stack.
///
/// \param[in] logVerbosity The LogVerbosity level for the entry.
/// \param[in] message The body text of the log entry.
/// \param[in] lineNumber The source code file line number.
/// \param[in] fileName The source code file name.
///
/// \sa KIM_ModelDestroy_LogEntry, kim_model_destroy_module::kim_log_entry
///
/// \since 2.0
void LogEntry(LogVerbosity const logVerbosity,
std::string const & message,
int const lineNumber,
std::string const & fileName) const;
/// \overload
void LogEntry(LogVerbosity const logVerbosity,
std::stringstream const & message,
int const lineNumber,
std::string const & fileName) const;
/// \brief 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 \c
/// ='s.
///
/// \sa KIM_ModelDestroy_ToString, kim_model_destroy_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
private:
// do not allow copy constructor or operator=
ModelDestroy(ModelDestroy const &);
void operator=(ModelDestroy const &);
ModelDestroy();
~ModelDestroy();
ModelDestroyImplementation * pimpl;
}; // class ModelDestroy
} // namespace KIM
#endif // KIM_MODEL_DESTROY_HPP_
kim-api-2.2.1-git/cpp/include/KIM_ModelDriverCreate.hpp 0000664 0000000 0000000 00000041221 13765565573 0022630 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_MODEL_DRIVER_CREATE_HPP_
#define KIM_MODEL_DRIVER_CREATE_HPP_
#include
#include
#ifndef KIM_FUNCTION_TYPES_HPP_
#include "KIM_FunctionTypes.hpp" // IWYU pragma: export
#endif
namespace KIM
{
// Forward declarations
class LogVerbosity;
class LanguageName;
class Numbering;
class ModelRoutineName;
class SpeciesName;
class LengthUnit;
class EnergyUnit;
class ChargeUnit;
class TemperatureUnit;
class TimeUnit;
class ModelDriverCreateImplementation;
/// \brief Provides the interface to a %KIM API Model object for use by models
/// within their MODEL_ROUTINE_NAME::Create routine.
///
/// \sa ModelCreate, KIM_ModelDriverCreate, KIM_ModelCreate,
/// kim_model_driver_create_module::kim_model_driver_create_handle_type
///
/// \since 2.0
class ModelDriverCreate
{
public:
/// \brief Get absolute path name of the temporary directory where parameter
/// files provided by the model are written.
///
/// \param[out] directoryName The absolute path name of the Model's
/// temporary parameter file directory.
///
/// \sa KIM_ModelDriverCreate_GetParameterFileDirectoryName,
/// kim_model_driver_create_module::kim_get_parameter_file_directory_name
///
/// \since 2.2
void
GetParameterFileDirectoryName(std::string const ** const directoryName) const;
/// \brief Get the number of parameter files provided by the parameterized
/// model.
///
/// \param[out] numberOfParameterFiles The number of parameter files.
///
/// \sa KIM_ModelDriverCreate_GetNumberOfParameterFiles,
/// kim_model_driver_create_module::kim_get_number_of_parameter_files
///
/// \since 2.0
void GetNumberOfParameterFiles(int * const numberOfParameterFiles) const;
/// \brief Get a particular parameter file name.
///
/// \param[in] index Zero-based index for the parameter file of interest.
/// \param[out] parameterFileName The fully-qualified path name for the
/// parameter file of interest.
///
/// \return \c true if the Model object is not a parameterized model
/// \return \c true if \c index is invalid.
/// \return \c true if `parameterFileName == NULL`.
/// \return \c false otherwise.
///
/// \sa KIM_ModelDriverCreate_GetParameterFileName,
/// kim_model_driver_create_module::kim_get_parameter_file_name
///
/// \since 2.0
///
/// \deprecated As of 2.2. Please use GetParameterFileDirectoryName() and
/// GetParameterFileBasename() instead.
int GetParameterFileName(int const index,
std::string const ** const parameterFileName) const;
/// \brief Get a particular parameter file basename. The file is located in
/// the Model's parameter file directory.
///
/// \param[in] index Zero-based index for the parameter file of interest.
/// \param[out] parameterFileBasename The basename (file name without path)
/// for the parameter file of interest.
///
/// \return \c true if the Model object is not a parameterized model
/// \return \c true if \c index is invalid.
/// \return \c true if `parameterFileBasename == NULL`.
/// \return \c false otherwise.
///
/// \sa KIM_ModelDriverCreate_GetParameterFileBasename,
/// kim_model_driver_create_module::kim_get_parameter_file_basename
///
/// \since 2.2
int GetParameterFileBasename(
int const index, std::string const ** const parameterFileBasename) const;
/// \brief Set the Model's particle Numbering.
///
/// \param[in] numbering The Model's particle Numbering.
///
/// \return \c true if \c numbering is unknown.
/// \return \c false otherwise.
///
/// \sa ModelCreate::SetModelNumbering,
/// KIM_ModelDriverCreate_SetModelNumbering,
/// KIM_ModelCreate_SetModelNumbering,
/// kim_model_driver_create_module::kim_set_model_numbering
///
/// \since 2.0
int SetModelNumbering(Numbering const numbering);
/// \brief Set the Model's influence distance data pointer.
///
/// \todo Add more detailed description of \c influenceDistance (or link to
/// docs elsewhere?)
///
/// \param[in] influenceDistance Pointer to Model's influence distance.
///
/// \note The model is responsible for allocating the memory associated with
/// the influence distance data. The model must use the \ref
/// cache_buffer_pointers "Model's buffer pointer" to retain access to this
/// memory location and avoid a memory leak.
///
/// \sa ModelCreate::SetInfluenceDistancePointer,
/// KIM_ModelDriverCreate_SetInfluenceDistancePointer,
/// KIM_ModelCreate_SetInfluenceDistancePointer,
/// kim_model_driver_create_module::kim_set_influence_distance_pointer
///
/// \since 2.0
void SetInfluenceDistancePointer(double const * const influenceDistance);
/// \brief Set the Model's neighbor list data pointers.
///
/// \todo Add more detailed description
///
/// \param[in] numberOfNeighborLists The number of neighbor lists required by
/// the Model.
/// \param[in] cutoffs Array of cutoff values for each of the required
/// neighbor lists.
/// \param[in] modelWillNotRequestNeighborsOfNoncontributingParticles Array
/// of integers; \c true or \c 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 \c
/// modelWillNotRequestNeighborsOfNoncontributingParticles data. The model
/// must use the \ref cache_buffer_pointers "Model's buffer pointer" to
/// retain access to this memory location and avoid a memory leak.
///
/// \sa ModelCreate::SetNeighborListPointers,
/// KIM_ModelDriverCreate_SetNeighborListPointers,
/// KIM_ModelCreate_SetNeighborListPointers,
/// kim_model_driver_create_module::kim_set_neighbor_list_pointers
///
/// \since 2.0
void SetNeighborListPointers(
int const numberOfNeighborLists,
double const * const cutoffs,
int const * const modelWillNotRequestNeighborsOfNoncontributingParticles);
/// \brief Set the function pointer for the ModelRoutineName of interest.
///
/// \param[in] modelRoutineName The ModelRoutineName of interest.
/// \param[in] languageName The LanguageName of the ModelRoutineName.
/// \param[in] required Integer, \c true if the model requires the simulator
/// to call the associated ModelRoutineName in order to be used
/// correctly, \c false otherwise.
/// \param[in] fptr Function pointer for the Model's ModelRoutineName
/// routine.
///
/// \return \c true if \c modelRoutineName or \c langaugeName are unknown.
/// \return \c true if `required == false` and \c modelRoutineName has
/// SupportStatus SUPPORT_STATUS::requiredByAPI.
/// \return \c false otherwise.
///
/// \sa ModelCreate::SetRoutinePointer, KIM_ModelCreate_SetRoutinePointer,
/// KIM_ModelDriverCreate_SetRoutinePointer,
/// kim_model_driver_create_module::kim_set_routine_pointer
///
/// \since 2.0
int SetRoutinePointer(ModelRoutineName const modelRoutineName,
LanguageName const languageName,
int const required,
Function * const fptr);
/// \brief Set integer code for supported SpeciesName.
///
/// A call to this routine adds/updates the list of SpeciesName's supported
/// by the Model and associates the specified SpeciesName with the integer
/// code to be used within the COMPUTE_ARGUMENT_NAME::particleSpeciesCodes
/// argument.
///
/// \param[in] speciesName The SpeciesName of interest.
/// \param[in] code The associated code.
///
/// \return \c true if \c speciesName is unknown.
/// \return \c false otherwise.
///
/// \sa ModelCreate::SetSpeciesCode, KIM_ModelDriverCreate_SetSpeciesCode,
/// KIM_ModelCreate_SetSpeciesCode,
/// kim_model_driver_create_module::kim_set_species_code
///
/// \since 2.0
int SetSpeciesCode(SpeciesName const speciesName, int const code);
/// \brief Set the next parameter data pointer to be provided by the model.
///
/// This routine is called once for each parameter array to be provided by
/// the model. The order of these calls is important and determines the
/// index assigned to each parameter array for use in the Model::GetParameter
/// and related routines.
///
/// \param[in] extent The number of entries in the parameter array.
/// \param[in] ptr The parameter array data pointer.
/// \param[in] name A brief unique name for the parameter array. This name
/// must be a valid C identifier.
/// \param[in] description A free-form text description of the parameter
/// array. This should include details about the data layout
/// (e.g., the array corresponds to a square upper-triangular
/// matrix in row-major storage).
///
/// \note The model is responsible for allocating the memory associated with
/// the parameter array data. The model must use the \ref
/// cache_buffer_pointers "Model's buffer pointer" to retain access to this
/// memory location and avoid a memory leak.
///
/// \sa ModelCreate::SetParameterPointer,
/// KIM_ModelDriverCreate_SetParameterPointerInteger,
/// KIM_ModelDriverCreate_SetParameterPointerDouble,
/// KIM_ModelCreate_SetParameterPointerInteger,
/// KIM_ModelCreate_SetParameterPointerDouble,
/// kim_model_driver_create_module::kim_set_parameter_pointer
///
/// \since 2.0
int SetParameterPointer(int const extent,
int * const ptr,
std::string const & name,
std::string const & description);
/// \overload
int SetParameterPointer(int const extent,
double * const ptr,
std::string const & name,
std::string const & description);
/// \brief Set the \ref cache_buffer_pointers "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.
///
/// \param[in] ptr The model buffer data pointer.
///
/// \sa ModelCreate::SetModelBufferPointer,
/// KIM_ModelDriverCreate_SetModelBufferPointer,
/// KIM_ModelCreate_SetModelBufferPointer,
/// kim_model_driver_create_module::kim_set_model_buffer_pointer
///
/// \since 2.0
void SetModelBufferPointer(void * const ptr);
/// \brief Set the Model's base unit values.
///
/// \param[in] lengthUnit The Model's base LengthUnit.
/// \param[in] energyUnit The Model's base EnergyUnit.
/// \param[in] chargeUnit The Model's base ChargeUnit.
/// \param[in] temperatureUnit The Model's base TemperatureUnit.
/// \param[in] timeUnit The Model's base TimeUnit.
///
/// \note A unit of \c 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 \c chargeUnit, \c temperatureUnit, and \c timeUnit to \c
/// unused.
///
/// \return \c true if any of the base units are unknown.
/// \return \c true if \c lengthUnit or \c energyUnit are unused.
/// \return \c false otherwise.
///
/// \sa ModelCreate::SetUnits, KIM_ModelDriverCreate_SetUnits,
/// KIM_ModelCreate_SetUnits, kim_model_driver_create_module::kim_set_units
///
/// \since 2.0
int SetUnits(LengthUnit const lengthUnit,
EnergyUnit const energyUnit,
ChargeUnit const chargeUnit,
TemperatureUnit const temperatureUnit,
TimeUnit const timeUnit);
/// \brief Get the multiplicative factor to convert between a derived unit
/// represented in two different sets of base units.
///
/// \param[in] fromLengthUnit The "from" base length unit.
/// \param[in] fromEnergyUnit The "from" base energy unit.
/// \param[in] fromChargeUnit The "from" base charge unit.
/// \param[in] fromTemperatureUnit The "from" base temperature unit.
/// \param[in] fromTimeUnit The "from" base time unit.
/// \param[in] toLengthUnit The "to" base length unit.
/// \param[in] toEnergyUnit The "to" base energy unit.
/// \param[in] toChargeUnit The "to" base charge unit.
/// \param[in] toTemperatureUnit The "to" base temperature unit.
/// \param[in] toTimeUnit The "to" base time unit.
/// \param[in] lengthExponent The derived unit's length exponent.
/// \param[in] energyExponent The derived unit's energy exponent.
/// \param[in] chargeExponent The derived unit's charge exponent.
/// \param[in] temperatureExponent The derived unit's temperature exponent.
/// \param[in] timeExponent The derived unit's time exponent.
/// \param[out] conversionFactor The desired conversion factor.
///
/// \return \c true if any of the base units are unknown.
/// \return \c true if any of the base units are \c unused and the
/// corresponding exponent is nonzero.
/// \return \c false otherwise.
///
/// \sa ModelCreate::ConvertUnit, KIM_ModelDriverCreate_ConvertUnit,
/// KIM_ModelCreate_ConvertUnit,
/// kim_model_driver_create_module::kim_convert_unit
///
/// \since 2.0
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);
/// \brief Write a log entry into the log file.
///
/// This results in a no-op if \c logVerbosity is LOG_VERBOSITY::silent or if
/// \c logVerbosity is greater-than the Log object's top LogVerbosity on its
/// stack.
///
/// \param[in] logVerbosity The LogVerbosity level for the entry.
/// \param[in] message The body text of the log entry.
/// \param[in] lineNumber The source code file line number.
/// \param[in] fileName The source code file name.
///
/// \sa KIM_ModelDriverCreate_LogEntry,
/// kim_model_driver_create_module::kim_log_entry
///
/// \since 2.0
void LogEntry(LogVerbosity const logVerbosity,
std::string const & message,
int const lineNumber,
std::string const & fileName) const;
/// \overload
void LogEntry(LogVerbosity const logVerbosity,
std::stringstream const & message,
int const lineNumber,
std::string const & fileName) const;
/// \brief 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 \c
/// ='s.
///
/// \sa KIM_ModelCreate_ToString,
/// kim_model_driver_create_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
private:
// do not allow copy constructor or operator=
ModelDriverCreate(ModelDriverCreate const &);
void operator=(ModelDriverCreate const &);
ModelDriverCreate();
~ModelDriverCreate();
ModelDriverCreateImplementation * pimpl;
}; // class ModelDriverCreate
} // namespace KIM
#endif // KIM_MODEL_DRIVER_CREATE_HPP_
kim-api-2.2.1-git/cpp/include/KIM_ModelDriverHeaders.hpp 0000664 0000000 0000000 00000005172 13765565573 0023005 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_MODEL_DRIVER_HEADERS_HPP_
#define KIM_MODEL_DRIVER_HEADERS_HPP_
// IWYU pragma: begin_exports
#ifndef KIM_MODEL_DRIVER_CREATE_HPP_
#include "KIM_ModelDriverCreate.hpp"
#endif
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
#ifndef KIM_LANGUAGE_NAME_HPP_
#include "KIM_LanguageName.hpp"
#endif
#ifndef KIM_NUMBERING_HPP_
#include "KIM_Numbering.hpp"
#endif
#ifndef KIM_MODEL_ROUTINE_NAME_HPP_
#include "KIM_ModelRoutineName.hpp"
#endif
#ifndef KIM_SPECIES_NAME_HPP_
#include "KIM_SpeciesName.hpp"
#endif
#ifndef KIM_SUPPORT_STATUS_HPP_
#include "KIM_SupportStatus.hpp"
#endif
#ifndef KIM_UNIT_SYSTEM_HPP_
#include "KIM_UnitSystem.hpp"
#endif
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_CREATE_HPP_
#include "KIM_ModelComputeArgumentsCreate.hpp"
#endif
#ifndef KIM_COMPUTE_ARGUMENT_NAME_HPP_
#include "KIM_ComputeArgumentName.hpp"
#endif
#ifndef KIM_DATA_TYPE_HPP_
#include "KIM_DataType.hpp"
#endif
#ifndef KIM_COMPUTE_CALLBACK_NAME_HPP_
#include "KIM_ComputeCallbackName.hpp"
#endif
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_HPP_
#include "KIM_ModelComputeArguments.hpp"
#endif
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_DESTROY_HPP_
#include "KIM_ModelComputeArgumentsDestroy.hpp"
#endif
#ifndef KIM_MODEL_COMPUTE_HPP_
#include "KIM_ModelCompute.hpp"
#endif
#ifndef KIM_MODEL_EXTENSION_HPP_
#include "KIM_ModelExtension.hpp"
#endif
#ifndef KIM_MODEL_REFRESH_HPP_
#include "KIM_ModelRefresh.hpp"
#endif
#ifndef KIM_MODEL_WRITE_PARAMETERIZED_MODEL_HPP_
#include "KIM_ModelWriteParameterizedModel.hpp"
#endif
#ifndef KIM_MODEL_DESTROY_HPP_
#include "KIM_ModelDestroy.hpp"
#endif
// IWYU pragma: end_exports
#endif // KIM_MODEL_DRIVER_HEADERS_HPP_
kim-api-2.2.1-git/cpp/include/KIM_ModelExtension.hpp 0000664 0000000 0000000 00000016643 13765565573 0022237 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_MODEL_EXTENSION_HPP_
#define KIM_MODEL_EXTENSION_HPP_
#include
#include
namespace KIM
{
// Forward declarations
class LogVerbosity;
class Model;
class ModelCompute;
class ModelCreate;
class ModelDestroy;
class ModelDriverCreate;
class ModelRefresh;
class ModelWriteParameterizedModel;
class ComputeArguments;
class ModelComputeArguments;
class ModelComputeArgumentsCreate;
class ModelComputeArgumentsDestroy;
class ModelExtensionImplementation;
/// \brief Provides the interface to a %KIM API Model object for use by models
/// within their MODEL_ROUTINE_NAME::Extension routine.
///
/// \sa KIM_ModelExtension,
/// kim_model_extension_module::kim_model_extension_handle_type
///
/// \since 2.0
class ModelExtension
{
public:
/// \brief Get the extension identification string.
///
/// \param[out] extensionID The extension identification string.
///
/// \sa KIM_ModelExtension_GetExtensionID,
/// kim_model_extension_module::kim_get_extension_id
///
/// \since 2.0
void GetExtensionID(std::string const ** const extensionID) const;
/// \brief Convert the ModelExtension interface to the Model object to a
/// Model interface.
///
/// \sa KIM_ModelExtension_ToModel, kim_model_extension_module::kim_to_model
///
/// \since 2.0
KIM::Model * Model();
/// \brief Convert the ModelExtension interface to the Model object to a
/// ModelCompute interface.
///
/// \sa KIM_ModelExtension_ToModelCompute,
/// kim_model_extension_module::kim_to_model_compute
///
/// \since 2.0
KIM::ModelCompute * ModelCompute();
/// \brief Convert the ModelExtension interface to the Model object to a
/// ModelCreate interface.
///
/// \sa KIM_ModelExtension_ToModelCreate,
/// kim_model_extension_module::kim_to_model_create
///
/// \since 2.0
KIM::ModelCreate * ModelCreate();
/// \brief Convert the ModelExtension interface to the Model object to a
/// ModelDestroy interface.
///
/// \sa KIM_ModelExtension_ToModelDestroy,
/// kim_model_extension_module::kim_to_model_destroy
///
/// \since 2.0
KIM::ModelDestroy * ModelDestroy();
/// \brief Convert the ModelExtension interface to the Model object to a
/// ModelDriverCreate interface.
///
/// \sa KIM_ModelExtension_ToModelDriverCreate,
/// kim_model_extension_module::kim_to_model_driver_create
///
/// \since 2.0
KIM::ModelDriverCreate * ModelDriverCreate();
/// \brief Convert the ModelExtension interface to the Model object to a
/// ModelRefresh interface.
///
/// \sa KIM_ModelExtension_ToModelRefresh,
/// kim_model_extension_module::kim_to_model_refresh
///
/// \since 2.0
KIM::ModelRefresh * ModelRefresh();
/// \brief Convert the ModelExtension interface to the Model object to a
/// ModelWriteParameterizedModel interface.
///
/// \sa KIM_ModelExtension_ToModelWriteParameterizedModel,
/// kim_model_extension_module::kim_to_model_write_parameterized_model
///
/// \since 2.0
KIM::ModelWriteParameterizedModel * ModelWriteParameterizedModel();
/// \brief Convert the ModelExtension interface to the Model object to a
/// ModelComputeArguments interface.
///
/// \sa KIM_ModelExtension_ToModelComputeArguments,
/// kim_model_extension_module::kim_to_model_compute_arguments
///
/// \since 2.0
KIM::ModelComputeArguments *
ModelComputeArguments(ComputeArguments * const computeArguments) const;
/// \brief Convert the ModelExtension interface to the Model object to a
/// ModelComputeArgumentsCreate interface.
///
/// \sa KIM_ModelExtension_ToModelComputeArgumentsCreate,
/// kim_model_extension_module::kim_to_model_compute_arguments_create
///
/// \since 2.0
KIM::ModelComputeArgumentsCreate *
ModelComputeArgumentsCreate(ComputeArguments * const computeArguments) const;
/// \brief Convert the ModelExtension interface to the Model object to a
/// ModelComputeArgumentsDestroy interface.
///
/// \sa KIM_ModelExtension_ToModelComputeArgumentsDestroy,
/// kim_model_extension_module::kim_to_model_compute_arguments_destroy
///
/// \since 2.0
KIM::ModelComputeArgumentsDestroy *
ModelComputeArgumentsDestroy(ComputeArguments * const computeArguments) const;
/// \brief Get the \ref cache_buffer_pointers "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.
///
/// \param[out] ptr The model buffer data pointer.
///
/// \note `ptr == NULL` if the model has not previously called
/// ModelCreate::SetModelBufferPointer or
/// ModelDriverCreate::SetModelBufferPointer.
///
/// \sa KIM_ModelExtension_GetModelBufferPointer,
/// kim_model_extension_module::kim_get_model_buffer_pointer
///
/// \since 2.0
void GetModelBufferPointer(void ** const ptr) const;
/// \brief Write a log entry into the log file.
///
/// This results in a no-op if \c logVerbosity is LOG_VERBOSITY::silent or if
/// \c logVerbosity is greater-than the Log object's top LogVerbosity on its
/// stack.
///
/// \param[in] logVerbosity The LogVerbosity level for the entry.
/// \param[in] message The body text of the log entry.
/// \param[in] lineNumber The source code file line number.
/// \param[in] fileName The source code file name.
///
/// \sa KIM_ModelExtension_LogEntry,
/// kim_model_extension_module::kim_log_entry
///
/// \since 2.0
void LogEntry(LogVerbosity const logVerbosity,
std::string const & message,
int const lineNumber,
std::string const & fileName) const;
/// \overload
void LogEntry(LogVerbosity const logVerbosity,
std::stringstream const & message,
int const lineNumber,
std::string const & fileName) const;
/// \brief 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 \c
/// ='s.
///
/// \sa KIM_ModelExtension_ToString,
/// kim_model_extension_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
private:
// do not allow copy constructor or operator=
ModelExtension(ModelExtension const &);
void operator=(ModelExtension const &);
ModelExtension();
~ModelExtension();
ModelExtensionImplementation * pimpl;
}; // class ModelExtension
} // namespace KIM
#endif // KIM_MODEL_EXTENSION_HPP_
kim-api-2.2.1-git/cpp/include/KIM_ModelHeaders.hpp 0000664 0000000 0000000 00000005130 13765565573 0021623 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_MODEL_HEADERS_HPP_
#define KIM_MODEL_HEADERS_HPP_
// IWYU pragma: begin_exports
#ifndef KIM_MODEL_CREATE_HPP_
#include "KIM_ModelCreate.hpp"
#endif
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
#ifndef KIM_LANGUAGE_NAME_HPP_
#include "KIM_LanguageName.hpp"
#endif
#ifndef KIM_NUMBERING_HPP_
#include "KIM_Numbering.hpp"
#endif
#ifndef KIM_MODEL_ROUTINE_NAME_HPP_
#include "KIM_ModelRoutineName.hpp"
#endif
#ifndef KIM_SPECIES_NAME_HPP_
#include "KIM_SpeciesName.hpp"
#endif
#ifndef KIM_SUPPORT_STATUS_HPP_
#include "KIM_SupportStatus.hpp"
#endif
#ifndef KIM_UNIT_SYSTEM_HPP_
#include "KIM_UnitSystem.hpp"
#endif
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_CREATE_HPP_
#include "KIM_ModelComputeArgumentsCreate.hpp"
#endif
#ifndef KIM_COMPUTE_ARGUMENT_NAME_HPP_
#include "KIM_ComputeArgumentName.hpp"
#endif
#ifndef KIM_DATA_TYPE_HPP_
#include "KIM_DataType.hpp"
#endif
#ifndef KIM_COMPUTE_CALLBACK_NAME_HPP_
#include "KIM_ComputeCallbackName.hpp"
#endif
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_HPP_
#include "KIM_ModelComputeArguments.hpp"
#endif
#ifndef KIM_MODEL_COMPUTE_ARGUMENTS_DESTROY_HPP_
#include "KIM_ModelComputeArgumentsDestroy.hpp"
#endif
#ifndef KIM_MODEL_COMPUTE_HPP_
#include "KIM_ModelCompute.hpp"
#endif
#ifndef KIM_MODEL_EXTENSION_HPP_
#include "KIM_ModelExtension.hpp"
#endif
#ifndef KIM_MODEL_REFRESH_HPP_
#include "KIM_ModelRefresh.hpp"
#endif
#ifndef KIM_MODEL_WRITE_PARAMETERIZED_MODEL_HPP_
#include "KIM_ModelWriteParameterizedModel.hpp"
#endif
#ifndef KIM_MODEL_DESTROY_HPP_
#include "KIM_ModelDestroy.hpp"
#endif
// IWYU pragma: end_exports
#endif // KIM_MODEL_HEADERS_HPP_
kim-api-2.2.1-git/cpp/include/KIM_ModelRefresh.hpp 0000664 0000000 0000000 00000013144 13765565573 0021652 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_MODEL_REFRESH_HPP_
#define KIM_MODEL_REFRESH_HPP_
#include
#include
namespace KIM
{
// Forward declarations
class LogVerbosity;
class ModelRefreshImplementation;
/// \brief Provides the interface to a %KIM API Model object for use by models
/// within their MODEL_ROUTINE_NAME::Refresh routine.
///
/// \sa KIM_ModelRefresh,
/// kim_model_refresh_module::kim_model_refresh_handle_type
///
/// \since 2.0
class ModelRefresh
{
public:
/// \brief Set the Model's influence distance data pointer.
///
/// \todo Add more detailed description of \c influenceDistance (or link to
/// docs elsewhere?)
///
/// \param[in] influenceDistance Pointer to Model's influence distance.
///
/// \note The model is responsible for allocating the memory associated with
/// the influence distance data. The model must use the \ref
/// cache_buffer_pointers "Model's buffer pointer" to retain access to this
/// memory location and avoid a memory leak.
///
/// \sa KIM_ModelRefresh_SetInfluenceDistancePointer,
/// kim_model_refresh_module::kim_set_influence_distance_pointer
///
/// \since 2.0
void SetInfluenceDistancePointer(double const * const influenceDistance);
/// \brief Set the Model's neighbor list data pointers.
///
/// \todo Add more detailed description
///
/// \param[in] numberOfNeighborLists The number of neighbor lists required by
/// the Model.
/// \param[in] cutoffs Array of cutoff values for each of the required
/// neighbor lists.
/// \param[in] modelWillNotRequestNeighborsOfNoncontributingParticles Array
/// of integers; \c true or \c 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 \c
/// modelWillNotRequestNeighborsOfNoncontributingParticles data. The model
/// must use the \ref cache_buffer_pointers "Model's buffer pointer" to
/// retain access to this memory location and avoid a memory leak.
///
/// \sa KIM_ModelRefresh_SetNeighborListPointers,
/// kim_model_refresh_module::kim_set_neighbor_list_pointers
///
/// \since 2.0
void SetNeighborListPointers(
int const numberOfNeighborLists,
double const * const cutoffs,
int const * const modelWillNotRequestNeighborsOfNoncontributingParticles);
/// \brief Get the \ref cache_buffer_pointers "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.
///
/// \param[out] ptr The model buffer data pointer.
///
/// \note `ptr == NULL` if the model has not previously called
/// ModelCreate::SetModelBufferPointer or
/// ModelDriverCreate::SetModelBufferPointer.
///
/// \sa KIM_ModelRefresh_GetModelBufferPointer,
/// kim_model_refresh_module::kim_get_model_buffer_pointer
///
/// \since 2.0
void GetModelBufferPointer(void ** const ptr) const;
/// \brief Write a log entry into the log file.
///
/// This results in a no-op if \c logVerbosity is LOG_VERBOSITY::silent or if
/// \c logVerbosity is greater-than the Log object's top LogVerbosity on its
/// stack.
///
/// \param[in] logVerbosity The LogVerbosity level for the entry.
/// \param[in] message The body text of the log entry.
/// \param[in] lineNumber The source code file line number.
/// \param[in] fileName The source code file name.
///
/// \sa KIM_ModelRefresh_LogEntry, kim_model_refresh_module::kim_log_entry
///
/// \since 2.0
void LogEntry(LogVerbosity const logVerbosity,
std::string const & message,
int const lineNumber,
std::string const & fileName) const;
/// \overload
void LogEntry(LogVerbosity const logVerbosity,
std::stringstream const & message,
int const lineNumber,
std::string const & fileName) const;
/// \brief 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 \c
/// ='s.
///
/// \sa KIM_ModelRefresh_ToString, kim_model_refresh_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
private:
// do not allow copy constructor or operator=
ModelRefresh(ModelRefresh const &);
void operator=(ModelRefresh const &);
ModelRefresh();
~ModelRefresh();
ModelRefreshImplementation * pimpl;
}; // class ModelRefresh
} // namespace KIM
#endif // KIM_MODEL_REFRESH_HPP_
kim-api-2.2.1-git/cpp/include/KIM_ModelRoutineName.hpp 0000664 0000000 0000000 00000022331 13765565573 0022500 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_MODEL_ROUTINE_NAME_HPP_
#define KIM_MODEL_ROUTINE_NAME_HPP_
#include
namespace KIM
{
/// \brief An \ref extensible_enumeration "Extensible Enumeration" for the
/// ModelRoutineName's supported by the %KIM API.
///
/// The enumeration constants are contained in the MODEL_ROUTINE_NAME
/// namespace.
///
/// \sa KIM_ModelRoutineName,
/// kim_model_routine_name_module::kim_model_routine_name_type
///
/// \since 2.0
class ModelRoutineName
{
public:
/// \brief Integer identifying the specific ModelRoutineName represented.
///
/// \note This should not be directly accessed and is only public for
/// cross-language reasons.
///
/// \sa KIM_ModelRoutineName::modelRoutineNameID,
/// kim_model_routine_name_module::kim_model_routine_name_type::model_routine_name_id
///
/// \since 2.0
int modelRoutineNameID;
/// \brief Create an uninitialized ModelRoutineName object.
///
/// \since 2.0
ModelRoutineName();
/// \brief Create a ModelRoutineName object with the specified id.
///
/// \note This should not be used directly.
///
/// \since 2.0
ModelRoutineName(int const id);
/// \brief Create a ModelRoutineName object corresponding to the provided
/// string. If the string does not match one of the values defined by the
/// %KIM API, then an "unknown" object is generated.
///
/// \sa KIM_ModelRoutineName_FromString,
/// kim_model_routine_name_module::kim_from_string
///
/// \since 2.0
ModelRoutineName(std::string const & str);
/// \brief Determines if the object is a quantity known to the %KIM API.
///
/// ModelRoutineName's known to the %KIM API are found in the
/// MODEL_ROUTINE_NAME namespace.
///
/// \sa KIM_ModelRoutineName_Known, kim_model_routine_name_module::kim_known
///
/// \since 2.0
bool Known() const;
/// \brief Compares ModelRoutineName objects for equality.
///
/// \note Not all "unknown" objects are equal.
///
/// \sa KIM_ModelRoutineName_Equal,
/// kim_model_routine_name_module::operator(.eq.)
///
/// \since 2.0
bool operator==(ModelRoutineName const & rhs) const;
/// \brief Compares ModelRoutineName objects for inequality.
///
/// \note It is possible for two "unknown" objects to be not equal.
///
/// \sa KIM_ModelRoutineName_NotEqual,
/// kim_model_routine_name_module::operator(.ne.)
///
/// \since 2.0
bool operator!=(ModelRoutineName const & rhs) const;
/// \brief Converts the object to a string.
///
/// \return A string object representing the ModelRoutineName object.
///
/// \note If the ModelRoutineName object does not correspond to a value
/// defined by the %KIM API, then the string "unknown" is returned.
///
/// \sa KIM_ModelRoutineName_ToString,
/// kim_model_routine_name_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
}; // class ModelRoutineName
/// \brief Contains the enumeration constants and the discovery routines for
/// the ModelRoutineName \ref extensible_enumeration "Extensible Enumeration".
namespace MODEL_ROUTINE_NAME
{
/// \brief The standard \c Create routine.
///
/// The C++ prototype for this routine is ModelCreateFunction(). The C
/// prototype for this routine is KIM_ModelCreateFunction().
///
/// \todo Add more detailed description of routine.
///
/// \sa KIM_MODEL_ROUTINE_NAME_Create,
/// kim_model_routine_name_module::kim_model_routine_name_create
///
/// \since 2.0
extern ModelRoutineName const Create;
/// \brief The standard \c ComputeArgumentsCreate routine.
///
/// The C++ prototype for this routine is
/// ModelComputeArgumentsCreateFunction(). The C prototype for this routine is
/// KIM_ModelComputeArgumentsCreateFunction().
///
/// \todo Add more detailed description of routine.
///
/// \sa KIM_MODEL_ROUTINE_NAME_ComputeArgumentsCreate,
/// kim_model_routine_name_module::kim_model_routine_name_compute_arguments_create
///
/// \since 2.0
extern ModelRoutineName const ComputeArgumentsCreate;
/// \brief The standard \c Compute routine.
///
/// The C++ prototype for this routine is ModelComputeFunction(). The C
/// prototype for this routine is KIM_ModelComputeFunction().
///
/// \todo Add more detailed description of routine.
///
/// \sa KIM_MODEL_ROUTINE_NAME_Compute,
/// kim_model_routine_name_module::kim_model_routine_name_compute
///
/// \since 2.0
extern ModelRoutineName const Compute;
/// \brief The standard \c Extension routine.
///
/// The C++ prototype for this routine is ModelExtensionFunction(). The C
/// prototype for this routine is KIM_ModelExtensionFunction().
///
/// \todo Add more detailed description of routine.
///
/// \sa KIM_MODEL_ROUTINE_NAME_Extension,
/// kim_model_routine_name_module::kim_model_routine_name_extension
///
/// \since 2.0
extern ModelRoutineName const Extension;
/// \brief The standard \c Refresh routine.
///
/// The C++ prototype for this routine is ModelRefreshFunction(). The C
/// prototype for this routine is KIM_ModelRefreshFunction().
///
/// \todo Add more detailed description of routine.
///
/// \sa KIM_MODEL_ROUTINE_NAME_Refresh,
/// kim_model_routine_name_module::kim_model_routine_name_refresh
///
/// \since 2.0
extern ModelRoutineName const Refresh;
/// \brief The standard \c WriteParameterizedModel routine.
///
/// The C++ prototype for this routine is
/// ModelWriteParameterizedModelFunction(). The C prototype for this routine
/// is KIM_ModelWriteParameterizedModelFunction().
///
/// \todo Add more detailed description of routine.
///
/// \sa KIM_MODEL_ROUTINE_NAME_WriteParameterizedModel,
/// kim_model_routine_name_module::kim_model_routine_name_write_parameterized_model
///
/// \since 2.0
extern ModelRoutineName const WriteParameterizedModel;
/// \brief The standard \c ComputeArgumentsDestroy routine.
///
/// The C++ prototype for this routine is
/// ModelComputeArgumentsDestroyFunction(). The C prototype for this routine
/// is KIM_ModelComputeArgumentsDestroyFunction().
///
/// \todo Add more detailed description of routine.
///
/// \sa KIM_MODEL_ROUTINE_NAME_ComputeArgumentsDestroy,
/// kim_model_routine_name_module::kim_model_routine_name_compute_arguments_destroy
///
/// \since 2.0
extern ModelRoutineName const ComputeArgumentsDestroy;
/// \brief The standard \c Destroy routine.
///
/// The C++ prototype for this routine is ModelDestroyFunction(). The C
/// prototype for this routine is KIM_ModelDestroyFunction().
///
/// \todo Add more detailed description of routine.
///
/// \sa KIM_MODEL_ROUTINE_NAME_Destroy,
/// kim_model_routine_name_module::kim_model_routine_name_destroy
///
/// \since 2.0
extern ModelRoutineName const Destroy;
/// \brief Get the number of standard ModelRoutineName's defined by the %KIM
/// API.
///
/// \param[out] numberOfModelRoutineNames The number of standard
/// ModelRoutineName's defined by the %KIM API.
///
/// \sa KIM_MODEL_ROUTINE_NAME_GetNumberOfModelRoutineNames,
/// kim_model_routine_name_module::kim_get_number_of_model_routine_names
///
/// \since 2.0
void GetNumberOfModelRoutineNames(int * const numberOfModelRoutineNames);
/// \brief Get the identity of each defined standard ModelRoutineName.
///
/// \param[in] index Zero-based index uniquely labeling each defined standard
/// ModelRoutineName. This index ordering is only guaranteed to be
/// stable during the lifetime of the current process.
/// \param[out] modelRoutineName The ModelRoutineName object associated with \c
/// index.
///
/// \return \c true if `index < 0` or `index >= numberOfModelRoutineNames`.
/// \return \c false otherwise.
///
/// \sa KIM_MODEL_ROUTINE_NAME_GetModelRoutineName,
/// kim_model_routine_name_module::kim_get_model_routine_name
///
/// \since 2.0
int GetModelRoutineName(int const index,
ModelRoutineName * const modelRoutineName);
/// \brief Structure provided for use with std::map.
///
/// \since 2.0
struct Comparator
{
/// \brief Provides an (logically unmeaningful) ordering for ModelRoutineName
/// objects so that they can be stored in a std::map.
///
/// \since 2.0
bool operator()(ModelRoutineName const & a, ModelRoutineName const & b) const
{
return a.modelRoutineNameID < b.modelRoutineNameID;
}
}; // struct Comparator
} // namespace MODEL_ROUTINE_NAME
} // namespace KIM
#endif // KIM_MODEL_ROUTINE_NAME_HPP_
kim-api-2.2.1-git/cpp/include/KIM_ModelWriteParameterizedModel.hpp 0000664 0000000 0000000 00000013003 13765565573 0025036 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_MODEL_WRITE_PARAMETERIZED_MODEL_HPP_
#define KIM_MODEL_WRITE_PARAMETERIZED_MODEL_HPP_
#include
#include
namespace KIM
{
// Forward declarations
class LogVerbosity;
class ModelWriteParameterizedModelImplementation;
/// \brief Provides the interface to a %KIM API Model object for use by models
/// within their MODEL_ROUTINE_NAME::WriteParameterizedModel routine.
///
/// \sa KIM_ModelWriteParameterizedModel,
/// kim_model_write_parameterized_model_module::kim_model_write_parameterized_model_handle_type
///
/// \since 2.0
class ModelWriteParameterizedModel
{
public:
/// \brief Get the directory path where the parameterized model files should
/// be written.
///
/// \param[out] path Path string.
///
/// \sa KIM_ModelWriteParameterizedModel_GetPath,
/// kim_model_write_parameterized_model_module::kim_get_path
///
/// \since 2.0
void GetPath(std::string const ** const path) const;
/// \brief Get the name of the new parameterized model.
///
/// The model name is a valid C identifier and is available as a convenience.
/// It is not required for the model to use this name in any way.
///
/// \param[out] modelName The parameterized model name.
///
/// \sa KIM_ModelWriteParameterizedModel_GetModelName,
/// kim_model_write_parameterized_model_module::kim_get_model_name
///
/// \since 2.0
void GetModelName(std::string const ** const modelName) const;
/// \brief Set the file name for the next parameter file.
///
/// This routine must be called once for each parameter file. The order of
/// these calls is important and determines the order in which the parameter
/// files will be listed in the automatically generated CMakeLists.txt file.
///
/// \param[in] fileName File name (basename and extension, without path).
///
/// \sa KIM_ModelWriteParameterizedModel_SetParameterFileName,
/// kim_model_write_parameterized_model_module::kim_set_parameter_file_name
///
/// \since 2.0
void SetParameterFileName(std::string const & fileName) const;
/// \brief Get the \ref cache_buffer_pointers "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.
///
/// \param[out] ptr The model buffer data pointer.
///
/// \note `ptr == NULL` if the model has not previously called
/// ModelCreate::SetModelBufferPointer or
/// ModelDriverCreate::SetModelBufferPointer.
///
/// \sa KIM_ModelWriteParameterizedModel_GetModelBufferPointer,
/// kim_model_write_parameterized_model_module::kim_get_model_buffer_pointer
///
/// \since 2.0
void GetModelBufferPointer(void ** const ptr) const;
/// \brief Write a log entry into the log file.
///
/// This results in a no-op if \c logVerbosity is LOG_VERBOSITY::silent or if
/// \c logVerbosity is greater-than the Log object's top LogVerbosity on its
/// stack.
///
/// \param[in] logVerbosity The LogVerbosity level for the entry.
/// \param[in] message The body text of the log entry.
/// \param[in] lineNumber The source code file line number.
/// \param[in] fileName The source code file name.
///
/// \sa KIM_ModelWriteParameterizedModel_LogEntry,
/// kim_model_write_parameterized_model_module::kim_log_entry
///
/// \since 2.0
void LogEntry(LogVerbosity const logVerbosity,
std::string const & message,
int const lineNumber,
std::string const & fileName) const;
/// \overload
void LogEntry(LogVerbosity const logVerbosity,
std::stringstream const & message,
int const lineNumber,
std::string const & fileName) const;
/// \brief 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 \c
/// ='s.
///
/// \sa KIM_ModelWriteParameterizedModel_ToString,
/// kim_model_write_parameterized_model_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
private:
// do not allow copy constructor or operator=
ModelWriteParameterizedModel(ModelWriteParameterizedModel const &);
void operator=(ModelWriteParameterizedModel const &);
ModelWriteParameterizedModel();
~ModelWriteParameterizedModel();
ModelWriteParameterizedModelImplementation * pimpl;
}; // class ModelWriteParameterizedModel
} // namespace KIM
#endif // KIM_MODEL_WRITE_PARAMETERIZED_MODEL_HPP_
kim-api-2.2.1-git/cpp/include/KIM_Numbering.hpp 0000664 0000000 0000000 00000013040 13765565573 0021214 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_NUMBERING_HPP_
#define KIM_NUMBERING_HPP_
#include
namespace KIM
{
/// \brief An \ref extensible_enumeration "Extensible Enumeration" for the
/// Numbering's supported by the %KIM API.
///
/// The enumeration constants are contained in the NUMBERING namespace.
///
/// \sa KIM_Numbering, kim_numbering_module::kim_numbering_type
///
/// \since 2.0
class Numbering
{
public:
/// \brief Integer identifying the specific Numbering represented.
///
/// \note This should not be directly accessed and is only public for
/// cross-language reasons.
///
/// \sa KIM_Numbering::numberingID,
/// kim_numbering_module::kim_numbering_type::numbering_id
///
/// \since 2.0
int numberingID;
/// \brief Create an uninitialized Numbering object.
///
/// \since 2.0
Numbering();
/// \brief Create a Numbering object with the specified id.
///
/// \note This should not be used directly.
///
/// \since 2.0
Numbering(int const id);
/// \brief Create a Numbering object corresponding to the provided string.
/// If the string does not match one of the values defined by the %KIM API,
/// then an "unknown" object is generated.
///
/// \sa KIM_Numbering_FromString, kim_numbering_module::kim_from_string
///
/// \since 2.0
Numbering(std::string const & str);
/// \brief Determines if the object is a quantity known to the %KIM API.
///
/// Numbering's known to the %KIM API are found in the NUMBERING namespace.
///
/// \sa KIM_Numbering_Known, kim_numbering_module::kim_known
///
/// \since 2.0
bool Known() const;
/// \brief Compares Numbering objects for equality.
///
/// \note Not all "unknown" objects are equal.
///
/// \sa KIM_Numbering_Equal, kim_numbering_module::operator(.eq.)
///
/// \since 2.0
bool operator==(Numbering const & rhs) const;
/// \brief Compares Numbering objects for inequality.
///
/// \note It is possible for two "unknown" objects to be not equal.
///
/// \sa KIM_Numbering_NotEqual, kim_numbering_module::operator(.ne.)
///
/// \since 2.0
bool operator!=(Numbering const & rhs) const;
/// \brief Converts the object to a string.
///
/// \return A string object representing the Numbering object.
///
/// \note If the Numbering object does not correspond to a value defined by
/// the %KIM API, then the string "unknown" is returned.
///
/// \sa KIM_Numbering_ToString, kim_numbering_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
}; // class Numbering
/// \brief Contains the enumeration constants and the discovery routines for
/// the Numbering \ref extensible_enumeration "Extensible Enumeration".
namespace NUMBERING
{
/// \brief The standard \c zeroBased numbering.
///
/// Quantities are numbered starting from zero.
///
/// \sa KIM_NUMBERING_zeroBased, kim_numbering_module::kim_numbering_zero_based
///
/// \since 2.0
extern Numbering const zeroBased;
/// \brief The standard \c oneBased numbering.
///
/// Quantities are numbered starting from one.
///
/// \sa KIM_NUMBERING_oneBased, kim_numbering_module::kim_numbering_one_based
///
/// \since 2.0
extern Numbering const oneBased;
/// \brief Get the number of standard Numbering's defined by the %KIM
/// API.
///
/// \param[out] numberOfNumberings The number of standard Numbering's defined
/// by the %KIM API.
///
/// \sa KIM_NUMBERING_GetNumberOfNumberings,
/// kim_numbering_module::kim_get_number_of_numberings
///
/// \since 2.0
void GetNumberOfNumberings(int * const numberOfNumberings);
/// \brief Get the identity of each defined standard Numbering.
///
/// \param[in] index Zero-based index uniquely labeling each defined standard
/// Numbering. This index ordering is only guaranteed to be stable
/// during the lifetime of the current process.
/// \param[out] numbering The Numbering object associated with \c index.
///
/// \return \c true if `index < 0` or `index >= numberOfNumberings`.
/// \return \c false otherwise.
///
/// \sa KIM_NUMBERING_GetNumbering, kim_numbering_module::kim_get_numbering
///
/// \since 2.0
int GetNumbering(int const index, Numbering * const numbering);
/// \brief Structure provided for use with std::map.
///
/// \since 2.0
struct Comparator
{
/// \brief Provides an (logically unmeaningful) ordering for Numbering
/// objects so that they can be stored in a std::map.
///
/// \since 2.0
bool operator()(Numbering const & a, Numbering const & b) const
{
return a.numberingID < b.numberingID;
}
}; // struct Comparator
} // namespace NUMBERING
} // namespace KIM
#endif // KIM_NUMBERING_HPP_
kim-api-2.2.1-git/cpp/include/KIM_SemVer.hpp 0000664 0000000 0000000 00000007244 13765565573 0020500 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_SEM_VER_HPP_
#define KIM_SEM_VER_HPP_
#include
namespace KIM
{
/// \brief Contains routines related to the %KIM API Semantic Version.
namespace SEM_VER
{
/// \brief Get the %KIM API complete Semantic Version string.
///
/// \sa KIM_SEM_VER_GetSemVer, kim_sem_ver_module::kim_get_sem_ver
///
/// \since 2.0
std::string const & GetSemVer();
/// \brief Compare two Semantic Version strings.
///
/// See the Semantic Version 2.0.0 standard
/// for the definition of the partial ordering for valid Semantic Version
/// strings.
///
/// \param[in] lhs Left hand side version string in comparison.
/// \param[in] rhs Right hand side version string in comparison.
/// \param[out] isLessThan Truth value of `lhs < rhs` as defined by the
/// Semantic Version 2.0.0 standard.
///
/// \return \c true if ParseSemVer returns \c true for \c lhs or \c rhs.
/// \return \c false otherwise.
///
/// \sa KIM_SEM_VER_IsLessThan, kim_sem_ver_module::kim_is_less_than
///
/// \since 2.0
int IsLessThan(std::string const & lhs,
std::string const & rhs,
int * const isLessThan);
/// \brief Parse Semantic Version string into its six components.
///
/// See the Semantic Version 2.0.0 standard
/// for definitions of valid Semantic Version strings.
///
/// \param[in] version The Semantic Version string to be parsed.
/// \param[out] major The major version number.
/// \param[out] minor The minor version number.
/// \param[out] patch The patch version number.
/// \param[out] prerelease The prerelease string.
/// \param[out] buildMetadata The build metadata string.
///
/// \return \c true if minor and/or patch are missing.
/// \return \c true if major number has a leading zero or is not a valid
/// integer.
/// \return \c true if minor number has a leading zero or is not a valid
/// integer.
/// \return \c true if patch number has a leading zero or is not a valid
/// integer.
/// \return \c true if the prerelease string is invalid.
/// \return \c true if the build metadata string is invalid.
/// \return \c false otherwise.
///
/// \pre All output arguments may be \c NULL if the corresponding value is
/// not needed.
///
/// \post All output arguments are unchanged if an error occurs.
///
/// \sa KIM_SEM_VER_ParseSemVer, kim_sem_ver_module::kim_parse_sem_ver
///
/// \since 2.0
int ParseSemVer(std::string const & version,
int * const major,
int * const minor,
int * const patch,
std::string * const prerelease,
std::string * const buildMetadata);
} // namespace SEM_VER
} // namespace KIM
#endif // KIM_SEM_VER_HPP_
kim-api-2.2.1-git/cpp/include/KIM_SimulatorHeaders.hpp 0000664 0000000 0000000 00000004420 13765565573 0022543 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_SIMULATOR_HEADERS_HPP_
#define KIM_SIMULATOR_HEADERS_HPP_
// IWYU pragma: begin_exports
#ifndef KIM_COLLECTIONS_HPP_
#include "KIM_Collections.hpp"
#endif
#ifndef KIM_COLLECTION_HPP_
#include "KIM_Collection.hpp"
#endif
#ifndef KIM_COLLECTION_ITEM_TYPE_HPP_
#include "KIM_CollectionItemType.hpp"
#endif
#ifndef KIM_MODEL_HPP_
#include "KIM_Model.hpp"
#endif
#ifndef KIM_SIMULATOR_MODEL_HPP_
#include "KIM_SimulatorModel.hpp"
#endif
#ifndef KIM_LOG_VERBOSITY_HPP_
#include "KIM_LogVerbosity.hpp"
#endif
#ifndef KIM_DATA_TYPE_HPP_
#include "KIM_DataType.hpp"
#endif
#ifndef KIM_LANGUAGE_NAME_HPP_
#include "KIM_LanguageName.hpp"
#endif
#ifndef KIM_MODEL_ROUTINE_NAME_HPP_
#include "KIM_ModelRoutineName.hpp"
#endif
#ifndef KIM_SPECIES_NAME_HPP_
#include "KIM_SpeciesName.hpp"
#endif
#ifndef KIM_NUMBERING_HPP_
#include "KIM_Numbering.hpp"
#endif
#ifndef KIM_UNIT_SYSTEM_HPP_
#include "KIM_UnitSystem.hpp"
#endif
#ifndef KIM_COMPUTE_ARGUMENTS_HPP_
#include "KIM_ComputeArguments.hpp"
#endif
#ifndef KIM_COMPUTE_ARGUMENT_NAME_HPP_
#include "KIM_ComputeArgumentName.hpp"
#endif
#ifndef KIM_COMPUTE_CALLBACK_NAME_HPP_
#include "KIM_ComputeCallbackName.hpp"
#endif
#ifndef KIM_SUPPORT_STATUS_HPP_
#include "KIM_SupportStatus.hpp"
#endif
// IWYU pragma: end_exports
#endif // KIM_SIMULATOR_HEADERS_HPP_
kim-api-2.2.1-git/cpp/include/KIM_SimulatorModel.hpp 0000664 0000000 0000000 00000051002 13765565573 0022226 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_SIMULATOR_MODEL_HPP_
#define KIM_SIMULATOR_MODEL_HPP_
#include
namespace KIM
{
// Forward declarations
class LogVerbosity;
class SimulatorModelImplementation;
/// \brief Provides the primary interface to a %KIM API SimulatorModel object
/// and is meant to be used by simulators.
///
/// Simulator Models (SMs) are a mechanism by which the %KIM API provides
/// support for models that are implemented natively in simulation codes
/// ("Simulators"). An SM consists of all the information and data required to
/// use the model from within its simulator. This includes a specification
/// file in EDN format (see https://openkim.org/about-edn/) containing
/// instructions and settings that must be specified for the simulator to
/// define and use the model, and one or more parameter files. The %KIM API
/// SimulatorModel model object provides a generic interface to access the
/// parameter files and the contents of the specification file. Each simulator
/// may define its own set of "simulator fields" that contain
/// simulator-specific content for the model's setup. A simulator field
/// consists of zero or more "lines". Each line is a string containing
/// information that is meaningful to the simulator. To allow the simulator to
/// specialize the field lines based on user input, the SimulatorModel
/// interface provides a template substitution mechanism. Each simulator field
/// line may contain template tags of the form "@@" and will be replaced
/// by an appropriate value provided by the SimulatorModel object or the
/// simulator.
///
/// The %KIM API defines the following set of standard template key-value
/// entries \anchor standard_template_entries:
///
/// * \c parameter-file-dir, with a value equal to the absolute path name of
/// the SimulatorModel's temporary parameter file directory. This directory
/// is created when the SimulatorModel object is SimulatorModel::Create'd and
/// is removed when the object is SimulatorModel::Destroy'd.
/// * \c parameter-file-basename-# (# ranges from 1 to the SimulatorModel's
/// number of parameter files), with a value equal to the basename (file name
/// without path) of the corresponding parameter file. (Parameter file
/// ordering is defined by the order files are listed in the SMs
/// CMakeLists.txt file.)
/// * \c parameter-file-# (# ranges from 1 to the SimulatorModel's number of
/// parameter files), with a value equal to the full absolute file name (path
/// and base name) of the corresponding parameter file.
///
/// To facilitate backward-compatibility, the schema of the specification file
/// is explicitly versioned. Each version of the schema is documented here.
///
/// ------
///
/// \anchor kim_api_sm_schema_version_1 `kim-api-sm-schema-version = 1`
/// (Since 2.1):
///
/// The specification file consists of a single EDN Map. Each key-value pair
/// in the map has a key element-type of string. The following list gives the
/// *required* key values and the element-type of their corresponding value:
///
/// * "kim-api-sm-schema-version", integer
/// * "model-name", string
/// * "simulator-name", string
/// * "simulator-version", string
/// * "supported-species", string
///
/// The "model-name" string value must be identical to the SimulatorModel's
/// name. The "supported-species" string value is a space separated list of
/// labels that identify the species supported by the model. The %KIM API does
/// not impose any additional constraints on these species labels.
///
/// All other key-value pairs in the EDN map are "simulator fields" which must
/// have a value with element-type string or vector. If a vector of length
/// zero or greater is provided, each element of the vector must have
/// element-type string.
///
/// **Example of `kim-api-sm-schema-version = 1` file format**
/// \code{.edn}
/// {
/// "kim-api-sm-schema-version" 1
/// "model-name" "Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu"
/// "simulator-name" "LAMMPS"
/// "simulator-version" "12 Dec 2018"
/// "supported-species" "Pb Au"
/// "units" "metal"
/// "model-defn" [ "pair_style lj/cut 10.4057000"
/// "variable alchemy_mapping index @@"
/// "variable alchemy_curr_type loop 10000"
/// "include @@"
/// "pair_modify mix arithmetic"
/// ]
/// }
/// \endcode
///
/// In this example the "units" and "model-defn" key-value pairs are "simulator
/// fields" whose format is defined by the LAMMPS kim_init command. There are
/// also two examples of template tags: "@@", which is
/// defined by the LAMMPS simulator, and "@@", which is
/// defined by the SimulatorModel object.
///
/// ------
///
/// \sa KIM_SimulatorModel,
/// kim_simulator_model_module::kim_simulator_model_handle_type
///
/// \since 2.1
class SimulatorModel
{
public:
/// \brief Create a new %KIM API SimulatorModel object.
///
/// Allocates a new %KIM API SimulatorModel object for use by a Simulator.
///
/// \param[in] simulatorModelName The name of the SimulatorModel to be
/// created.
/// \param[out] simulatorModel Pointer to the newly created SimulatorModel
/// object.
///
/// \note The value of `simulatorModelName` is required to be a valid
/// C-identifier.
///
/// \return \c true if the %KIM API is unable to allocate a new log object.
/// \return \c true if the requested simulator model's library cannot be
/// found, opened, is of the wrong type, or has some other problem.
/// \return \c true if the simulator model's parameter files cannot be
/// written to scratch space.
/// \return \c true if the simulator model's specification file is invalid
/// EDN, is written in an unsupported schema version, or does not
/// provide all required data.
/// \return \c false otherwise.
///
/// \post `simulatorModel == NULL` if an error occurs.
///
/// \sa KIM_SimulatorModel_Create,
/// kim_simulator_model_module::kim_simulator_model_create
///
/// \since 2.1
static int Create(std::string const & simulatorModelName,
SimulatorModel ** const simulatorModel);
/// \brief Destroy a previously SimulatorModel::Create'd object.
///
/// Deallocate the SimulatorModel object.
///
/// \param[inout] simulatorModel Pointer to the SimulatorModel object.
///
/// \pre \c simulatorModel points to a previously created %KIM API
/// SimulatorModel object.
///
/// \post `simulatorModel == NULL`.
///
/// \sa KIM_SimulatorModel_Destroy,
/// kim_simulator_model_module::kim_simulator_model_destroy
///
// \since 2.1
static void Destroy(SimulatorModel ** const simulatorModel);
/// \brief Get the SimulatorModel's simulator name and version.
///
/// \param[out] simulatorName Simulator name.
/// \param[out] simulatorVersion Simulator version.
///
/// \pre \c simulatorName and \c simulatorVersion may be \c NULL if the
/// cooresponding value is not needed.
///
/// \sa KIM_SimulatorModel_GetSimulatorNameAndVersion,
/// kim_simulator_model_module::kim_get_simulator_name_and_version
///
/// \since 2.1
void
GetSimulatorNameAndVersion(std::string const ** const simulatorName,
std::string const ** const simulatorVersion) const;
/// \brief Get the number of species supported by the SimulatorModel.
///
/// \param[out] numberOfSupportedSpecies The number of species supported by
/// the Simulator Model.
///
/// \sa KIM_SimulatorModel_GetNumberOfSupportedSpecies,
/// kim_simulator_model_module::kim_get_number_of_supported_species
///
/// \since 2.1
void GetNumberOfSupportedSpecies(int * const numberOfSupportedSpecies) const;
/// \brief Get a species name supported by the SimulatorModel.
///
/// \param[in] index Zero-based index for the species name.
/// \param[out] speciesName The value of the species name of interest.
///
/// \return \c true if \c index is invalid.
/// \return \c false otherwise.
///
/// \sa KIM_SimulatorModel_GetSupportedSpecies,
/// kim_simulator_model_module::kim_get_supported_species
///
/// \since 2.1
int GetSupportedSpecies(int const index,
std::string const ** const speciesName) const;
/// \brief Open and initialize the template map for simulator field line
/// substitutions.
///
/// This routine clears the template map of all existing entries, adds the
/// %KIM API \ref standard_template_entries "standard template entries", and
/// opens the template map for addition of new entries. This allows the
/// simulator significant flexibilty. For instance, when only a partial set
/// of the simulator's template map key-value entries are known (such as when
/// the simulator's input file has been only partially processed). In this
/// case, the simulator can close the template map to obtain certain field
/// lines that it knows to be complete. Then it can open and initialize the
/// template map and continue processing its input.
///
/// \sa KIM_SimulatorModel_OpenAndInitializeTemplateMap,
/// kim_simulator_model_module::kim_open_and_initialize_template_map
///
/// \since 2.1
void OpenAndInitializeTemplateMap();
/// \brief Determine if the template map is open.
///
/// \return \c true if the template map is open.
/// \return \c false if the template map is closed.
///
/// \sa KIM_SimulatorModel_TemplateMapIsOpen,
/// kim_simulator_model_module::kim_template_map_is_open
///
/// \since 2.1
int TemplateMapIsOpen() const;
/// \brief Add a new key-value entry to the template map.
///
/// As part of the SimulatorModel::Create'ion of a SimulatorModel object its
/// template map is opened and initialized by (internally) executing a call
/// to OpenAndInitializeTemplateMap(). The AddTemplateMap() routine allows
/// new key-value entries to be added to the open template map.
///
/// Once the CloseTemplateMap() routine is executed, the map entries are used
/// to perform template substitution on the simulator field line strings. In
/// each simulator field line and for each map key-value entry, when \c key,
/// surrounded by the template tags "@<" and ">@", is found it will be
/// replaced by \c value. For example, if \c key is \c my-key, and \c value
/// is \c the-result, then wherever the string `@@` is found within a
/// simulator field line it will be replaced by the string `the-result`.
//
/// \param[in] key The \c key value. Must consist only of digits (0-9),
/// lower case letters (a-z), and dashes (-).
/// \param[in] value The \c value value. All valid strings are allowed.
///
/// \return \c true if the template map has been closed by a call to
/// CloseTempateMap().
/// \return \c true if \c key contains invalid characters.
/// \return \c false otherwise.
///
/// \sa KIM_SimulatorModel_AddTemplateMap,
/// kim_simulator_model_module::kim_add_template_map
///
/// \since 2.1
int AddTemplateMap(std::string const & key, std::string const & value);
/// \brief Close the template map and perform template substitutions.
///
/// Close the template map and use the map entries to perform
/// search-and-replace substitutions on all simulator field lines. The
/// template map must be closed to access the simulator field lines via
/// GetSimulatorFieldLine().
///
/// \sa KIM_SimulatorModel_CloseTemplateMap,
/// kim_simulator_model_module::kim_close_template_map
///
/// \since 2.1
void CloseTemplateMap();
/// \brief Get the number of simulator fields provided by the SimulatorModel.
///
///
/// \param[out] numberOfSimulatorFields The number of simulator fields
/// provided by the SimulatorModel.
///
/// \sa KIM_SimulatorModel_GetNumberOfSimulatorFields,
/// kim_simulator_model_module::kim_get_number_of_simulator_fields
///
/// \since 2.1
void GetNumberOfSimulatorFields(int * const numberOfSimulatorFields) const;
/// \brief Get the metadata for the simulator field of interest.
///
/// \param[in] fieldIndex Zero-based index of the simulator field of
/// interest.
/// \param[out] extent Number of lines in the simulator field of interest.
/// \param[out] fieldName Name of the simulator field.
///
/// \pre \c extent and \c fieldName may be \c NULL if the corresponding value
/// is not needed.
///
/// \post \c extent and \c fieldName are unchanged if an error occurs.
///
/// \return \c true if \c fieldIndex is invalid.
/// \return \c false otherwise.
///
/// \sa KIM_SimulatorModel_GetSimulatorFieldMetadata,
/// kim_simulator_model_module::kim_get_simulator_field_metadata
///
/// \since 2.1
int GetSimulatorFieldMetadata(int const fieldIndex,
int * const extent,
std::string const ** const fieldName) const;
/// \brief Get a line for the simulator field of interest with all template
/// substitutions performed (Requires the template map is closed).
///
/// \param[in] fieldIndex Zero-based index of the simulator field of
/// interest.
/// \param[in] lineIndex Zero-based index of the line of interest.
/// \param[out] lineValue The value of the simulator field line.
///
/// \post \c lineValue is unchanged if an error occurs.
///
/// \return \c true if the template map is open.
/// \return \c true if \c fieldIndex is invalid.
/// \return \c true if \c lineIndex is invalid.
/// \return \c false otherwise.
///
/// \sa KIM_SimulatorModel_GetSimulatorFieldLine,
/// kim_simulator_model_module::kim_get_simulator_field_line
///
/// \since 2.1
int GetSimulatorFieldLine(int const fieldIndex,
int const lineIndex,
std::string const ** const lineValue) const;
/// \brief Get absolute path name of the temporary directory where parameter
/// files provided by the simulator model are written.
///
/// \param[out] directoryName The absolute path name of the SimulatorModel's
/// temporary parameter file directory.
///
/// \sa KIM_SimulatorModel_GetParameterFileDirectoryName,
/// kim_simulator_model_module::kim_get_parameter_file_directory_name
///
/// \since 2.1
void
GetParameterFileDirectoryName(std::string const ** const directoryName) const;
/// \brief Get the SimulatorModel's specification file basename (file name
/// without path). The file is located in the SimulatorModel's parameter
/// file directory.
///
/// \param[out] specificationFileName The basename (file name without path)
/// of the specification file.
///
/// \sa KIM_SimulatorModel_GetSpecificationFileName,
/// kim_simulator_model_module::kim_get_specification_file_name
///
/// \since 2.1
void GetSpecificationFileName(
std::string const ** const specificationFileName) const;
/// \brief Get the number of parameter files provided by the SimulatorModel.
///
/// \param[out] numberOfParameterFiles The number of parameter files.
///
/// \sa KIM_SimulatorModel_GetNumberOfParameterFiles,
/// kim_simulator_model_module::kim_get_number_of_parameter_files
///
/// \since 2.1
void GetNumberOfParameterFiles(int * const numberOfParameterFiles) const;
/// \brief Get the basename (file name without path) of a particular
/// parameter file. The file is located in the SimulatorModel's parameter
/// file directory.
///
/// \param[in] index Zero-based index for the parameter file of interest.
/// \param[out] parameterFileName Basename (file name without path) of the
/// parameter file.
///
/// \post \c parameterFileName is unchanged if an error occurs.
///
/// \return \c true if \c index is invalid.
/// \return \c false otherwise.
///
/// \sa KIM_SimulatorModel_GetParameterFileName,
/// kim_simulator_model_module::kim_get_parameter_file_name
///
/// \since 2.1
///
/// \deprecated As of 2.2. Please use GetParameterFileBasename() instead.
int GetParameterFileName(int const index,
std::string const ** const parameterFileName) const;
/// \brief Get the basename (file name without path) of a particular
/// parameter file. The file is located in the SimulatorModel's parameter
/// file directory.
///
/// \param[in] index Zero-based index for the parameter file of interest.
/// \param[out] parameterFileBasename Basename (file name without path) of
/// the parameter file.
///
/// \post \c parameterFileBasename is unchanged if an error occurs.
///
/// \return \c true if \c index is invalid.
/// \return \c false otherwise.
///
/// \sa KIM_SimulatorModel_GetParameterFileBasename,
/// kim_simulator_model_module::kim_get_parameter_file_basename
///
/// \since 2.2
int GetParameterFileBasename(
int const index, std::string const ** const parameterFileBasename) const;
/// \brief Set the \ref cache_buffer_pointers "Simulator's buffer pointer"
/// within the SimulatorModel object.
///
/// The simulator buffer pointer may be used by the simulator to associate
/// a memory buffer with the SimulatorModel object.
///
/// \param[in] ptr The simulator buffer data pointer.
///
/// \sa KIM_SimulatorModel_SetSimulatorBufferPointer,
/// kim_simulator_model_module::kim_set_simulator_buffer_pointer
///
/// \since 2.1
void SetSimulatorBufferPointer(void * const ptr);
/// \brief Get the \ref cache_buffer_pointers "Simulator's buffer pointer"
/// from the SimulatorModel object.
///
/// \param[out] ptr The simulator buffer data pointer.
///
/// \note `ptr == NULL` if the simulator has not previously called
/// SimulatorModel::SetSimulatorBufferPointer.
///
/// \sa KIM_SimulatorModel_GetSimulatorBufferPointer,
/// kim_simulator_model_module::kim_get_simulator_buffer_pointer
///
/// \since 2.1
void GetSimulatorBufferPointer(void ** const ptr) const;
/// \brief Get a string representing the internal state of the SimulatorModel
/// 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 \c
/// ='s.
///
/// \sa KIM_SimulatorModel_ToString,
/// kim_simulator_model_module::kim_to_string
///
/// \since 2.1
std::string const & ToString() const;
/// \brief Set the identity of the Log object associated with the
/// SimulatorModel object.
///
/// \param[in] logID String identifying the SimulatorModel object's Log
/// object.
///
/// \sa KIM_SimulatorModel_SetLogID,
/// kim_simulator_model_module::kim_set_log_id
///
/// \since 2.1
void SetLogID(std::string const & logID);
/// \brief Push a new LogVerbosity onto the SimulatorModel object's Log
/// object verbosity stack.
///
/// \param[in] logVerbosity A LogVerbosity value.
///
/// \sa KIM_SimulatorModel_PushLogVerbosity,
/// kim_simulator_model_module::kim_push_log_verbosity
///
/// \since 2.1
void PushLogVerbosity(LogVerbosity const logVerbosity);
/// \brief Pop a LogVerbosity from the SimulatorModel object's Log object
/// verbosity stack.
///
/// \sa KIM_SimulatorModel_PopLogVerbosity,
/// kim_simulator_model_module::kim_pop_log_verbosity
///
/// \since 2.1
void PopLogVerbosity();
private:
// do not allow copy constructor or operator=
SimulatorModel(SimulatorModel const &);
void operator=(SimulatorModel const &);
SimulatorModel();
~SimulatorModel();
SimulatorModelImplementation * pimpl;
}; // class SimulatorModel
} // namespace KIM
#endif // KIM_SIMULATOR_MODEL_HPP_
kim-api-2.2.1-git/cpp/include/KIM_SpeciesName.hpp 0000664 0000000 0000000 00000071503 13765565573 0021472 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_SPECIES_NAME_HPP_
#define KIM_SPECIES_NAME_HPP_
#include
namespace KIM
{
/// \brief An \ref extensible_enumeration "Extensible Enumeration" for the
/// SpeciesName's supported by the %KIM API.
///
/// The enumeration constants are contained in the SPECIES_NAME namespace.
///
/// \sa KIM_SpeciesName, kim_species_name_module::kim_species_name_type
///
/// \since 2.0
class SpeciesName
{
public:
/// \brief Integer identifying the specific SpeciesName represented.
///
/// \note This should not be directly accessed and is only public for
/// cross-language reasons.
///
/// \sa KIM_SpeciesName::speciesNameID,
/// kim_species_name_module::kim_species_name_type::species_name_id
///
/// \since 2.0
int speciesNameID;
/// \brief Create an uninitialized SpeciesName object.
///
/// \since 2.0
SpeciesName();
/// \brief Create a SpeciesName object with the specified id.
///
/// \note This should not be used directly.
///
/// \since 2.0
SpeciesName(int const id);
/// \brief Create a SpeciesName object corresponding to the provided string.
/// If the string does not match one of the values defined by the %KIM API,
/// then an "unknown" object is generated.
///
/// \sa KIM_SpeciesName_FromString, kim_species_name_module::kim_from_string
///
/// \since 2.0
SpeciesName(std::string const & str);
/// \brief Determines if the object is a quantity known to the %KIM API.
///
/// SpeciesName's known to the %KIM API are found in the SPECIES_NAME
/// namespace.
///
/// \sa KIM_SpeciesName_Known, kim_species_name_module::kim_known
///
/// \since 2.0
bool Known() const;
/// \brief Compares SpeciesName objects for equality.
///
/// \note Not all "unknown" objects are equal.
///
/// \sa KIM_SpeciesName_Equal, kim_species_name_module::operator(.eq.)
///
/// \since 2.0
bool operator==(SpeciesName const & rhs) const;
/// \brief Compares SpeciesName objects for inequality.
///
/// \note It is possible for two "unknown" objects to be not equal.
///
/// \sa KIM_SpeciesName_NotEqual, kim_species_name_module::operator(.ne.)
///
/// \since 2.0
bool operator!=(SpeciesName const & rhs) const;
/// \brief Converts the object to a string.
///
/// \return A string object representing the SpeciesName object.
///
/// \note If the SpeciesName object does not correspond to a value defined by
/// the %KIM API, then the string "unknown" is returned.
///
/// \sa KIM_SpeciesName_ToString, kim_species_name_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
}; // class SpeciesName
/// \brief Contains the enumeration constants and the discovery routines for
/// the SpeciesName \ref extensible_enumeration "Extensible Enumeration".
namespace SPECIES_NAME
{
/// \brief The standard \c electron species.
///
/// \sa KIM_SPECIES_NAME_electron,
/// kim_species_name_module::kim_species_name_electron
///
/// \since 2.0
extern SpeciesName const electron;
/// \brief The standard \c Hydrogen species.
///
/// \sa KIM_SPECIES_NAME_H, kim_species_name_module::kim_species_name_h
///
/// \since 2.0
extern SpeciesName const H;
/// \brief The standard \c Helium species.
///
/// \sa KIM_SPECIES_NAME_He, kim_species_name_module::kim_species_name_he
///
/// \since 2.0
extern SpeciesName const He;
/// \brief The standard \c Lithium species.
///
/// \sa KIM_SPECIES_NAME_Li, kim_species_name_module::kim_species_name_li
///
/// \since 2.0
extern SpeciesName const Li;
/// \brief The standard \c Beryllium species.
///
/// \sa KIM_SPECIES_NAME_Be, kim_species_name_module::kim_species_name_be
///
/// \since 2.0
extern SpeciesName const Be;
/// \brief The standard \c Boron species.
///
/// \sa KIM_SPECIES_NAME_B, kim_species_name_module::kim_species_name_b
///
/// \since 2.0
extern SpeciesName const B;
/// \brief The standard \c Carbon species.
///
/// \sa KIM_SPECIES_NAME_C, kim_species_name_module::kim_species_name_c
///
/// \since 2.0
extern SpeciesName const C;
/// \brief The standard \c Nitrogen species.
///
/// \sa KIM_SPECIES_NAME_N, kim_species_name_module::kim_species_name_n
///
/// \since 2.0
extern SpeciesName const N;
/// \brief The standard \c Oxygen species.
///
/// \sa KIM_SPECIES_NAME_O, kim_species_name_module::kim_species_name_o
///
/// \since 2.0
extern SpeciesName const O;
/// \brief The standard \c Fluorine species.
///
/// \sa KIM_SPECIES_NAME_F, kim_species_name_module::kim_species_name_f
///
/// \since 2.0
extern SpeciesName const F;
/// \brief The standard \c Neon species.
///
/// \sa KIM_SPECIES_NAME_Ne, kim_species_name_module::kim_species_name_ne
///
/// \since 2.0
extern SpeciesName const Ne;
/// \brief The standard \c Sodium species.
///
/// \sa KIM_SPECIES_NAME_Na, kim_species_name_module::kim_species_name_na
///
/// \since 2.0
extern SpeciesName const Na;
/// \brief The standard \c Magnesium species.
///
/// \sa KIM_SPECIES_NAME_Mg, kim_species_name_module::kim_species_name_mg
///
/// \since 2.0
extern SpeciesName const Mg;
/// \brief The standard \c Aluminum species.
///
/// \sa KIM_SPECIES_NAME_Al, kim_species_name_module::kim_species_name_al
///
/// \since 2.0
extern SpeciesName const Al;
/// \brief The standard \c Silicon species.
///
/// \sa KIM_SPECIES_NAME_Si, kim_species_name_module::kim_species_name_si
///
/// \since 2.0
extern SpeciesName const Si;
/// \brief The standard \c Phosphorus species.
///
/// \sa KIM_SPECIES_NAME_P, kim_species_name_module::kim_species_name_p
///
/// \since 2.0
extern SpeciesName const P;
/// \brief The standard \c Sulfur species.
///
/// \sa KIM_SPECIES_NAME_S, kim_species_name_module::kim_species_name_s
///
/// \since 2.0
extern SpeciesName const S;
/// \brief The standard \c Chlorine species.
///
/// \sa KIM_SPECIES_NAME_Cl, kim_species_name_module::kim_species_name_cl
///
/// \since 2.0
extern SpeciesName const Cl;
/// \brief The standard \c Argon species.
///
/// \sa KIM_SPECIES_NAME_Ar, kim_species_name_module::kim_species_name_ar
///
/// \since 2.0
extern SpeciesName const Ar;
/// \brief The standard \c Potassium species.
///
/// \sa KIM_SPECIES_NAME_K, kim_species_name_module::kim_species_name_k
///
/// \since 2.0
extern SpeciesName const K;
/// \brief The standard \c Calcium species.
///
/// \sa KIM_SPECIES_NAME_Ca, kim_species_name_module::kim_species_name_ca
///
/// \since 2.0
extern SpeciesName const Ca;
/// \brief The standard \c Scandium species.
///
/// \sa KIM_SPECIES_NAME_Sc, kim_species_name_module::kim_species_name_sc
///
/// \since 2.0
extern SpeciesName const Sc;
/// \brief The standard \c Titanium species.
///
/// \sa KIM_SPECIES_NAME_Ti, kim_species_name_module::kim_species_name_ti
///
/// \since 2.0
extern SpeciesName const Ti;
/// \brief The standard \c Vanadium species.
///
/// \sa KIM_SPECIES_NAME_V, kim_species_name_module::kim_species_name_v
///
/// \since 2.0
extern SpeciesName const V;
/// \brief The standard \c Chromium species.
///
/// \sa KIM_SPECIES_NAME_Cr, kim_species_name_module::kim_species_name_cr
///
/// \since 2.0
extern SpeciesName const Cr;
/// \brief The standard \c Manganese species.
///
/// \sa KIM_SPECIES_NAME_Mn, kim_species_name_module::kim_species_name_mn
///
/// \since 2.0
extern SpeciesName const Mn;
/// \brief The standard \c Iron species.
///
/// \sa KIM_SPECIES_NAME_Fe, kim_species_name_module::kim_species_name_fe
///
/// \since 2.0
extern SpeciesName const Fe;
/// \brief The standard \c Cobalt species.
///
/// \sa KIM_SPECIES_NAME_Co, kim_species_name_module::kim_species_name_co
///
/// \since 2.0
extern SpeciesName const Co;
/// \brief The standard \c Nickel species.
///
/// \sa KIM_SPECIES_NAME_Ni, kim_species_name_module::kim_species_name_ni
///
/// \since 2.0
extern SpeciesName const Ni;
/// \brief The standard \c Copper species.
///
/// \sa KIM_SPECIES_NAME_Cu, kim_species_name_module::kim_species_name_cu
///
/// \since 2.0
extern SpeciesName const Cu;
/// \brief The standard \c Zinc species.
///
/// \sa KIM_SPECIES_NAME_Zn, kim_species_name_module::kim_species_name_zn
///
/// \since 2.0
extern SpeciesName const Zn;
/// \brief The standard \c Gallium species.
///
/// \sa KIM_SPECIES_NAME_Ga, kim_species_name_module::kim_species_name_ga
///
/// \since 2.0
extern SpeciesName const Ga;
/// \brief The standard \c Germanium species.
///
/// \sa KIM_SPECIES_NAME_Ge, kim_species_name_module::kim_species_name_ge
///
/// \since 2.0
extern SpeciesName const Ge;
/// \brief The standard \c Arsenic species.
///
/// \sa KIM_SPECIES_NAME_As, kim_species_name_module::kim_species_name_as
///
/// \since 2.0
extern SpeciesName const As;
/// \brief The standard \c Selenium species.
///
/// \sa KIM_SPECIES_NAME_Se, kim_species_name_module::kim_species_name_se
///
/// \since 2.0
extern SpeciesName const Se;
/// \brief The standard \c Bromine species.
///
/// \sa KIM_SPECIES_NAME_Br, kim_species_name_module::kim_species_name_br
///
/// \since 2.0
extern SpeciesName const Br;
/// \brief The standard \c Krypton species.
///
/// \sa KIM_SPECIES_NAME_Kr, kim_species_name_module::kim_species_name_kr
///
/// \since 2.0
extern SpeciesName const Kr;
/// \brief The standard \c Rubidium species.
///
/// \sa KIM_SPECIES_NAME_Rb, kim_species_name_module::kim_species_name_rb
///
/// \since 2.0
extern SpeciesName const Rb;
/// \brief The standard \c Strontium species.
///
/// \sa KIM_SPECIES_NAME_Sr, kim_species_name_module::kim_species_name_sr
///
/// \since 2.0
extern SpeciesName const Sr;
/// \brief The standard \c Yttrium species.
///
/// \sa KIM_SPECIES_NAME_Y, kim_species_name_module::kim_species_name_y
///
/// \since 2.0
extern SpeciesName const Y;
/// \brief The standard \c Zirconium species.
///
/// \sa KIM_SPECIES_NAME_Zr, kim_species_name_module::kim_species_name_zr
///
/// \since 2.0
extern SpeciesName const Zr;
/// \brief The standard \c Niobium species.
///
/// \sa KIM_SPECIES_NAME_Nb, kim_species_name_module::kim_species_name_nb
///
/// \since 2.0
extern SpeciesName const Nb;
/// \brief The standard \c Molybdenum species.
///
/// \sa KIM_SPECIES_NAME_Mo, kim_species_name_module::kim_species_name_mo
///
/// \since 2.0
extern SpeciesName const Mo;
/// \brief The standard \c Technetium species.
///
/// \sa KIM_SPECIES_NAME_Tc, kim_species_name_module::kim_species_name_tc
///
/// \since 2.0
extern SpeciesName const Tc;
/// \brief The standard \c Ruthenium species.
///
/// \sa KIM_SPECIES_NAME_Ru, kim_species_name_module::kim_species_name_ru
///
/// \since 2.0
extern SpeciesName const Ru;
/// \brief The standard \c Rhodium species.
///
/// \sa KIM_SPECIES_NAME_Rh, kim_species_name_module::kim_species_name_rh
///
/// \since 2.0
extern SpeciesName const Rh;
/// \brief The standard \c Palladium species.
///
/// \sa KIM_SPECIES_NAME_Pd, kim_species_name_module::kim_species_name_pd
///
/// \since 2.0
extern SpeciesName const Pd;
/// \brief The standard \c Silver species.
///
/// \sa KIM_SPECIES_NAME_Ag, kim_species_name_module::kim_species_name_ag
///
/// \since 2.0
extern SpeciesName const Ag;
/// \brief The standard \c Cadmium species.
///
/// \sa KIM_SPECIES_NAME_Cd, kim_species_name_module::kim_species_name_cd
///
/// \since 2.0
extern SpeciesName const Cd;
/// \brief The standard \c Indium species.
///
/// \sa KIM_SPECIES_NAME_In, kim_species_name_module::kim_species_name_in
///
/// \since 2.0
extern SpeciesName const In;
/// \brief The standard \c Tin species.
///
/// \sa KIM_SPECIES_NAME_Sn, kim_species_name_module::kim_species_name_sn
///
/// \since 2.0
extern SpeciesName const Sn;
/// \brief The standard \c Antimony species.
///
/// \sa KIM_SPECIES_NAME_Sb, kim_species_name_module::kim_species_name_sb
///
/// \since 2.0
extern SpeciesName const Sb;
/// \brief The standard \c Tellurium species.
///
/// \sa KIM_SPECIES_NAME_Te, kim_species_name_module::kim_species_name_te
///
/// \since 2.0
extern SpeciesName const Te;
/// \brief The standard \c Iodine species.
///
/// \sa KIM_SPECIES_NAME_I, kim_species_name_module::kim_species_name_i
///
/// \since 2.0
extern SpeciesName const I;
/// \brief The standard \c Xenon species.
///
/// \sa KIM_SPECIES_NAME_Xe, kim_species_name_module::kim_species_name_xe
///
/// \since 2.0
extern SpeciesName const Xe;
/// \brief The standard \c Cesium species.
///
/// \sa KIM_SPECIES_NAME_Cs, kim_species_name_module::kim_species_name_cs
///
/// \since 2.0
extern SpeciesName const Cs;
/// \brief The standard \c Barium species.
///
/// \sa KIM_SPECIES_NAME_Ba, kim_species_name_module::kim_species_name_ba
///
/// \since 2.0
extern SpeciesName const Ba;
/// \brief The standard \c Lanthanum species.
///
/// \sa KIM_SPECIES_NAME_La, kim_species_name_module::kim_species_name_la
///
/// \since 2.0
extern SpeciesName const La;
/// \brief The standard \c Cerium species.
///
/// \sa KIM_SPECIES_NAME_Ce, kim_species_name_module::kim_species_name_ce
///
/// \since 2.0
extern SpeciesName const Ce;
/// \brief The standard \c Praseodymium species.
///
/// \sa KIM_SPECIES_NAME_Pr, kim_species_name_module::kim_species_name_pr
///
/// \since 2.0
extern SpeciesName const Pr;
/// \brief The standard \c Neodymium species.
///
/// \sa KIM_SPECIES_NAME_Nd, kim_species_name_module::kim_species_name_nd
///
/// \since 2.0
extern SpeciesName const Nd;
/// \brief The standard \c Promethium species.
///
/// \sa KIM_SPECIES_NAME_Pm, kim_species_name_module::kim_species_name_pm
///
/// \since 2.0
extern SpeciesName const Pm;
/// \brief The standard \c Samarium species.
///
/// \sa KIM_SPECIES_NAME_Sm, kim_species_name_module::kim_species_name_sm
///
/// \since 2.0
extern SpeciesName const Sm;
/// \brief The standard \c Europium species.
///
/// \sa KIM_SPECIES_NAME_Eu, kim_species_name_module::kim_species_name_eu
///
/// \since 2.0
extern SpeciesName const Eu;
/// \brief The standard \c Gadolinium species.
///
/// \sa KIM_SPECIES_NAME_Gd, kim_species_name_module::kim_species_name_gd
///
/// \since 2.0
extern SpeciesName const Gd;
/// \brief The standard \c Terbium species.
///
/// \sa KIM_SPECIES_NAME_Tb, kim_species_name_module::kim_species_name_tb
///
/// \since 2.0
extern SpeciesName const Tb;
/// \brief The standard \c Dysprosium species.
///
/// \sa KIM_SPECIES_NAME_Dy, kim_species_name_module::kim_species_name_dy
///
/// \since 2.0
extern SpeciesName const Dy;
/// \brief The standard \c Holmium species.
///
/// \sa KIM_SPECIES_NAME_Ho, kim_species_name_module::kim_species_name_ho
///
/// \since 2.0
extern SpeciesName const Ho;
/// \brief The standard \c Erbium species.
///
/// \sa KIM_SPECIES_NAME_Er, kim_species_name_module::kim_species_name_er
///
/// \since 2.0
extern SpeciesName const Er;
/// \brief The standard \c Thulium species.
///
/// \sa KIM_SPECIES_NAME_Tm, kim_species_name_module::kim_species_name_tm
///
/// \since 2.0
extern SpeciesName const Tm;
/// \brief The standard \c Ytterbium species.
///
/// \sa KIM_SPECIES_NAME_Yb, kim_species_name_module::kim_species_name_yb
///
/// \since 2.0
extern SpeciesName const Yb;
/// \brief The standard \c Lutetium species.
///
/// \sa KIM_SPECIES_NAME_Lu, kim_species_name_module::kim_species_name_lu
///
/// \since 2.0
extern SpeciesName const Lu;
/// \brief The standard \c Hafnium species.
///
/// \sa KIM_SPECIES_NAME_Hf, kim_species_name_module::kim_species_name_hf
///
/// \since 2.0
extern SpeciesName const Hf;
/// \brief The standard \c Tantalum species.
///
/// \sa KIM_SPECIES_NAME_Ta, kim_species_name_module::kim_species_name_ta
///
/// \since 2.0
extern SpeciesName const Ta;
/// \brief The standard \c Tungsten species.
///
/// \sa KIM_SPECIES_NAME_W, kim_species_name_module::kim_species_name_w
///
/// \since 2.0
extern SpeciesName const W;
/// \brief The standard \c Rhenium species.
///
/// \sa KIM_SPECIES_NAME_Re, kim_species_name_module::kim_species_name_re
///
/// \since 2.0
extern SpeciesName const Re;
/// \brief The standard \c Osmium species.
///
/// \sa KIM_SPECIES_NAME_Os, kim_species_name_module::kim_species_name_os
///
/// \since 2.0
extern SpeciesName const Os;
/// \brief The standard \c Iridium species.
///
/// \sa KIM_SPECIES_NAME_Ir, kim_species_name_module::kim_species_name_ir
///
/// \since 2.0
extern SpeciesName const Ir;
/// \brief The standard \c Platinum species.
///
/// \sa KIM_SPECIES_NAME_Pt, kim_species_name_module::kim_species_name_pt
///
/// \since 2.0
extern SpeciesName const Pt;
/// \brief The standard \c Gold species.
///
/// \sa KIM_SPECIES_NAME_Au, kim_species_name_module::kim_species_name_au
///
/// \since 2.0
extern SpeciesName const Au;
/// \brief The standard \c Mercury species.
///
/// \sa KIM_SPECIES_NAME_Hg, kim_species_name_module::kim_species_name_hg
///
/// \since 2.0
extern SpeciesName const Hg;
/// \brief The standard \c Thallium species.
///
/// \sa KIM_SPECIES_NAME_Tl, kim_species_name_module::kim_species_name_tl
///
/// \since 2.0
extern SpeciesName const Tl;
/// \brief The standard \c Lead species.
///
/// \sa KIM_SPECIES_NAME_Pb, kim_species_name_module::kim_species_name_pb
///
/// \since 2.0
extern SpeciesName const Pb;
/// \brief The standard \c Bismuth species.
///
/// \sa KIM_SPECIES_NAME_Bi, kim_species_name_module::kim_species_name_bi
///
/// \since 2.0
extern SpeciesName const Bi;
/// \brief The standard \c Polonium species.
///
/// \sa KIM_SPECIES_NAME_Po, kim_species_name_module::kim_species_name_po
///
/// \since 2.0
extern SpeciesName const Po;
/// \brief The standard \c Astatine species.
///
/// \sa KIM_SPECIES_NAME_At, kim_species_name_module::kim_species_name_at
///
/// \since 2.0
extern SpeciesName const At;
/// \brief The standard \c Radon species.
///
/// \sa KIM_SPECIES_NAME_Rn, kim_species_name_module::kim_species_name_rn
///
/// \since 2.0
extern SpeciesName const Rn;
/// \brief The standard \c Francium species.
///
/// \sa KIM_SPECIES_NAME_Fr, kim_species_name_module::kim_species_name_fr
///
/// \since 2.0
extern SpeciesName const Fr;
/// \brief The standard \c Radium species.
///
/// \sa KIM_SPECIES_NAME_Ra, kim_species_name_module::kim_species_name_ra
///
/// \since 2.0
extern SpeciesName const Ra;
/// \brief The standard \c Actinium species.
///
/// \sa KIM_SPECIES_NAME_Ac, kim_species_name_module::kim_species_name_ac
///
/// \since 2.0
extern SpeciesName const Ac;
/// \brief The standard \c Thorium species.
///
/// \sa KIM_SPECIES_NAME_Th, kim_species_name_module::kim_species_name_th
///
/// \since 2.0
extern SpeciesName const Th;
/// \brief The standard \c Protactinium species.
///
/// \sa KIM_SPECIES_NAME_Pa, kim_species_name_module::kim_species_name_pa
///
/// \since 2.0
extern SpeciesName const Pa;
/// \brief The standard \c Uranium species.
///
/// \sa KIM_SPECIES_NAME_U, kim_species_name_module::kim_species_name_u
///
/// \since 2.0
extern SpeciesName const U;
/// \brief The standard \c Neptunium species.
///
/// \sa KIM_SPECIES_NAME_Np, kim_species_name_module::kim_species_name_np
///
/// \since 2.0
extern SpeciesName const Np;
/// \brief The standard \c Plutonium species.
///
/// \sa KIM_SPECIES_NAME_Pu, kim_species_name_module::kim_species_name_pu
///
/// \since 2.0
extern SpeciesName const Pu;
/// \brief The standard \c Americium species.
///
/// \sa KIM_SPECIES_NAME_Am, kim_species_name_module::kim_species_name_am
///
/// \since 2.0
extern SpeciesName const Am;
/// \brief The standard \c Curium species.
///
/// \sa KIM_SPECIES_NAME_Cm, kim_species_name_module::kim_species_name_cm
///
/// \since 2.0
extern SpeciesName const Cm;
/// \brief The standard \c Berkelium species.
///
/// \sa KIM_SPECIES_NAME_Bk, kim_species_name_module::kim_species_name_bk
///
/// \since 2.0
extern SpeciesName const Bk;
/// \brief The standard \c Californium species.
///
/// \sa KIM_SPECIES_NAME_Cf, kim_species_name_module::kim_species_name_cf
///
/// \since 2.0
extern SpeciesName const Cf;
/// \brief The standard \c Einsteinium species.
///
/// \sa KIM_SPECIES_NAME_Es, kim_species_name_module::kim_species_name_es
///
/// \since 2.0
extern SpeciesName const Es;
/// \brief The standard \c Fermium species.
///
/// \sa KIM_SPECIES_NAME_Fm, kim_species_name_module::kim_species_name_fm
///
/// \since 2.0
extern SpeciesName const Fm;
/// \brief The standard \c Mendelevium species.
///
/// \sa KIM_SPECIES_NAME_Md, kim_species_name_module::kim_species_name_md
///
/// \since 2.0
extern SpeciesName const Md;
/// \brief The standard \c Nobelium species.
///
/// \sa KIM_SPECIES_NAME_No, kim_species_name_module::kim_species_name_no
///
/// \since 2.0
extern SpeciesName const No;
/// \brief The standard \c Lawrencium species.
///
/// \sa KIM_SPECIES_NAME_Lr, kim_species_name_module::kim_species_name_lr
///
/// \since 2.0
extern SpeciesName const Lr;
/// \brief The standard \c Rutherfordium species.
///
/// \sa KIM_SPECIES_NAME_Rf, kim_species_name_module::kim_species_name_rf
///
/// \since 2.0
extern SpeciesName const Rf;
/// \brief The standard \c Dubnium species.
///
/// \sa KIM_SPECIES_NAME_Db, kim_species_name_module::kim_species_name_db
///
/// \since 2.0
extern SpeciesName const Db;
/// \brief The standard \c Seaborgium species.
///
/// \sa KIM_SPECIES_NAME_Sg, kim_species_name_module::kim_species_name_sg
///
/// \since 2.0
extern SpeciesName const Sg;
/// \brief The standard \c Bohrium species.
///
/// \sa KIM_SPECIES_NAME_Bh, kim_species_name_module::kim_species_name_bh
///
/// \since 2.0
extern SpeciesName const Bh;
/// \brief The standard \c Hassium species.
///
/// \sa KIM_SPECIES_NAME_Hs, kim_species_name_module::kim_species_name_hs
///
/// \since 2.0
extern SpeciesName const Hs;
/// \brief The standard \c Meitnerium species.
///
/// \sa KIM_SPECIES_NAME_Mt, kim_species_name_module::kim_species_name_mt
///
/// \since 2.0
extern SpeciesName const Mt;
/// \brief The standard \c Darmstadtium species.
///
/// \sa KIM_SPECIES_NAME_Ds, kim_species_name_module::kim_species_name_ds
///
/// \since 2.0
extern SpeciesName const Ds;
/// \brief The standard \c Roentgenium species.
///
/// \sa KIM_SPECIES_NAME_Rg, kim_species_name_module::kim_species_name_rg
///
/// \since 2.0
extern SpeciesName const Rg;
/// \brief The standard \c Copernicium species.
///
/// \sa KIM_SPECIES_NAME_Cn, kim_species_name_module::kim_species_name_cn
///
/// \since 2.0
extern SpeciesName const Cn;
/// \brief The standard \c Nihonium species.
///
/// \sa KIM_SPECIES_NAME_Nh, kim_species_name_module::kim_species_name_nh
///
/// \since 2.0
extern SpeciesName const Nh;
/// \brief The standard \c Flerovium species.
///
/// \sa KIM_SPECIES_NAME_Fl, kim_species_name_module::kim_species_name_fl
///
/// \since 2.0
extern SpeciesName const Fl;
/// \brief The standard \c Moscovium species.
///
/// \sa KIM_SPECIES_NAME_Mc, kim_species_name_module::kim_species_name_mc
///
/// \since 2.0
extern SpeciesName const Mc;
/// \brief The standard \c Livermorium species.
///
/// \sa KIM_SPECIES_NAME_Lv, kim_species_name_module::kim_species_name_lv
///
/// \since 2.0
extern SpeciesName const Lv;
/// \brief The standard \c Tennessine species.
///
/// \sa KIM_SPECIES_NAME_Ts, kim_species_name_module::kim_species_name_ts
///
/// \since 2.0
extern SpeciesName const Ts;
/// \brief The standard \c Oganesson species.
///
/// \sa KIM_SPECIES_NAME_Og, kim_species_name_module::kim_species_name_og
///
/// \since 2.0
extern SpeciesName const Og;
/// \brief The standard \c user01 species.
///
/// \sa KIM_SPECIES_NAME_user01,
/// kim_species_name_module::kim_species_name_user01
///
/// \since 2.0
extern SpeciesName const user01;
/// \brief The standard \c user02 species.
///
/// \sa KIM_SPECIES_NAME_user02,
/// kim_species_name_module::kim_species_name_user02
///
/// \since 2.0
extern SpeciesName const user02;
/// \brief The standard \c user03 species.
///
/// \sa KIM_SPECIES_NAME_user03,
/// kim_species_name_module::kim_species_name_user03
///
/// \since 2.0
extern SpeciesName const user03;
/// \brief The standard \c user04 species.
///
/// \sa KIM_SPECIES_NAME_user04,
/// kim_species_name_module::kim_species_name_user04
///
/// \since 2.0
extern SpeciesName const user04;
/// \brief The standard \c user05 species.
///
/// \sa KIM_SPECIES_NAME_user05,
/// kim_species_name_module::kim_species_name_user05
///
/// \since 2.0
extern SpeciesName const user05;
/// \brief The standard \c user06 species.
///
/// \sa KIM_SPECIES_NAME_user06,
/// kim_species_name_module::kim_species_name_user06
///
/// \since 2.0
extern SpeciesName const user06;
/// \brief The standard \c user07 species.
///
/// \sa KIM_SPECIES_NAME_user07,
/// kim_species_name_module::kim_species_name_user07
///
/// \since 2.0
extern SpeciesName const user07;
/// \brief The standard \c user08 species.
///
/// \sa KIM_SPECIES_NAME_user08,
/// kim_species_name_module::kim_species_name_user08
///
/// \since 2.0
extern SpeciesName const user08;
/// \brief The standard \c user09 species.
///
/// \sa KIM_SPECIES_NAME_user09,
/// kim_species_name_module::kim_species_name_user09
///
/// \since 2.0
extern SpeciesName const user09;
/// \brief The standard \c user10 species.
///
/// \sa KIM_SPECIES_NAME_user10,
/// kim_species_name_module::kim_species_name_user10
///
/// \since 2.0
extern SpeciesName const user10;
/// \brief The standard \c user11 species.
///
/// \sa KIM_SPECIES_NAME_user11,
/// kim_species_name_module::kim_species_name_user11
///
/// \since 2.0
extern SpeciesName const user11;
/// \brief The standard \c user12 species.
///
/// \sa KIM_SPECIES_NAME_user12,
/// kim_species_name_module::kim_species_name_user12
///
/// \since 2.0
extern SpeciesName const user12;
/// \brief The standard \c user13 species.
///
/// \sa KIM_SPECIES_NAME_user13,
/// kim_species_name_module::kim_species_name_user13
///
/// \since 2.0
extern SpeciesName const user13;
/// \brief The standard \c user14 species.
///
/// \sa KIM_SPECIES_NAME_user14,
/// kim_species_name_module::kim_species_name_user14
///
/// \since 2.0
extern SpeciesName const user14;
/// \brief The standard \c user15 species.
///
/// \sa KIM_SPECIES_NAME_user15,
/// kim_species_name_module::kim_species_name_user15
///
/// \since 2.0
extern SpeciesName const user15;
/// \brief The standard \c user16 species.
///
/// \sa KIM_SPECIES_NAME_user16,
/// kim_species_name_module::kim_species_name_user16
///
/// \since 2.0
extern SpeciesName const user16;
/// \brief The standard \c user17 species.
///
/// \sa KIM_SPECIES_NAME_user17,
/// kim_species_name_module::kim_species_name_user17
///
/// \since 2.0
extern SpeciesName const user17;
/// \brief The standard \c user18 species.
///
/// \sa KIM_SPECIES_NAME_user18,
/// kim_species_name_module::kim_species_name_user18
///
/// \since 2.0
extern SpeciesName const user18;
/// \brief The standard \c user19 species.
///
/// \sa KIM_SPECIES_NAME_user19,
/// kim_species_name_module::kim_species_name_user19
///
/// \since 2.0
extern SpeciesName const user19;
/// \brief The standard \c user20 species.
///
/// \sa KIM_SPECIES_NAME_user20,
/// kim_species_name_module::kim_species_name_user20
///
/// \since 2.0
extern SpeciesName const user20;
/// \brief Get the number of standard SpeciesName's defined by the %KIM API.
///
/// \param[out] numberOfSpeciesNames The number of standard SpeciesName's
/// defined by the %KIM API.
///
/// \sa KIM_SPECIES_NAME_GetNumberOfSpeciesNames,
/// kim_species_name_module::kim_get_number_of_species_names
///
/// \since 2.0
void GetNumberOfSpeciesNames(int * const numberOfSpeciesNames);
/// \brief Get the identity of each defined standard SpeciesName.
///
/// \param[in] index Zero-based index uniquely labeling each defined standard
/// SpeciesName. This index ordering is only guaranteed to be
/// stable during the lifetime of the current process.
/// \param[out] speciesName The SpeciesName object associated with \c index.
///
/// \return \c true if `index < 0` or `index >= numberOfSpeciesNames`.
/// \return \c false otherwise.
///
/// \sa KIM_SPECIES_NAME_GetSpeciesName,
/// kim_species_name_module::kim_get_species_name
///
/// \since 2.0
int GetSpeciesName(int const index, SpeciesName * const speciesName);
/// \brief Structure provided for use with std::map.
///
/// \since 2.0
struct Comparator
{
/// \brief Provides an (logically unmeaningful) ordering for SpeciesName
/// objects so that they can be stored in a std::map.
///
/// \since 2.0
bool operator()(SpeciesName const & a, SpeciesName const & b) const
{
return a.speciesNameID < b.speciesNameID;
}
}; // struct Comparator
} // namespace SPECIES_NAME
} // namespace KIM
#endif // KIM_SPECIES_NAME_HPP_
kim-api-2.2.1-git/cpp/include/KIM_SupportStatus.hpp 0000664 0000000 0000000 00000014666 13765565573 0022165 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_SUPPORT_STATUS_HPP_
#define KIM_SUPPORT_STATUS_HPP_
#include
namespace KIM
{
/// \brief An \ref extensible_enumeration "Extensible Enumeration" for the
/// SupportStatus's supported by the %KIM API.
///
/// The enumeration constants are contained in the SUPPORT_STATUS namespace.
///
/// \sa KIM_SupportStatus, kim_support_status_module::kim_support_status_type
///
/// \since 2.0
class SupportStatus
{
public:
/// \brief Integer identifying the specific SupportStatus represented.
///
/// \note This should not be directly accessed and is only public for
/// cross-language reasons.
///
/// \sa KIM_SupportStatus::supportStatusID,
/// kim_support_status_module::kim_support_status_type::support_status_id
///
/// \since 2.0
int supportStatusID;
/// \brief Create an uninitialized SupportStatus object.
///
/// \since 2.0
SupportStatus();
/// \brief Create a SupportStatus object with the specified id.
///
/// \note This should not be used directly.
///
/// \since 2.0
SupportStatus(int const id);
/// \brief Create a SupportStatus object corresponding to the provided
/// string. If the string does not match one of the values defined by the
/// %KIM API, then an "unknown" object is generated.
///
/// \sa KIM_SupportStatus_FromString,
/// kim_support_status_module::kim_from_string
///
/// \since 2.0
SupportStatus(std::string const & str);
/// \brief Determines if the object is a quantity known to the %KIM API.
///
/// SupportStatus's known to the %KIM API are found in the SUPPORT_STATUS
/// namespace.
///
/// \sa KIM_SupportStatus_Known, kim_support_status_module::kim_known
///
/// \since 2.0
bool Known() const;
/// \brief Compares SupportStatus objects for equality.
///
/// \note Not all "unknown" objects are equal.
///
/// \sa KIM_SupportStatus_Equal, kim_support_status_module::operator(.eq.)
///
/// \since 2.0
bool operator==(SupportStatus const & rhs) const;
/// \brief Compares SupportStatus objects for inequality.
///
/// \note It is possible for two "unknown" objects to be not equal.
///
/// \sa KIM_SupportStatus_NotEqual, kim_support_status_module::operator(.ne.)
///
/// \since 2.0
bool operator!=(SupportStatus const & rhs) const;
/// \brief Converts the object to a string.
///
/// \return A string object representing the SupportStatus object.
///
/// \note If the SupportStatus object does not correspond to a value defined
/// by the %KIM API, then the string "unknown" is returned.
///
/// \sa KIM_SupportStatus_ToString, kim_support_status_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
}; // class SupportStatus
/// \brief Contains the enumeration constants and the discovery routines for
/// the SupportStatus \ref extensible_enumeration "Extensible Enumeration".
namespace SUPPORT_STATUS
{
/// \brief The standard \c requiredByAPI status.
///
/// \todo Add more detailed description of status.
///
/// \sa KIM_SUPPORT_STATUS_requiredByAPI,
/// kim_support_status_module::kim_support_status_required_by_api
///
/// \since 2.0
extern SupportStatus const requiredByAPI;
/// \brief The standard \c notSupported status.
///
/// \todo Add more detailed description of status.
///
/// \sa KIM_SUPPORT_STATUS_notSupported,
/// kim_support_status_module::kim_support_status_not_supported
///
/// \since 2.0
extern SupportStatus const notSupported;
/// \brief The standard \c required status.
///
/// \todo Add more detailed description of status.
///
/// \sa KIM_SUPPORT_STATUS_required,
/// kim_support_status_module::kim_support_status_required
///
/// \since 2.0
extern SupportStatus const required;
/// \brief The standard \c optional status.
///
/// \todo Add more detailed description of status.
///
/// \sa KIM_SUPPORT_STATUS_optional,
/// kim_support_status_module::kim_support_status_optional
///
/// \since 2.0
extern SupportStatus const optional;
/// \brief Get the number of standard SupportStatus's defined by the %KIM
/// API.
///
/// \param[out] numberOfSupportStatuses The number of standard SupportStatus's
/// defined by the %KIM API.
///
/// \sa KIM_SUPPORT_STATUS_GetNumberOfSupportStatuses,
/// kim_support_status_module::kim_get_number_of_support_statuses
///
/// \since 2.0
void GetNumberOfSupportStatuses(int * const numberOfSupportStatuses);
/// \brief Get the identity of each defined standard SupportStatus.
///
/// \param[in] index Zero-based index uniquely labeling each defined standard
/// SupportStatus. This index ordering is only guaranteed to be
/// stable during the lifetime of the current process.
/// \param[out] supportStatus The SupportStatus object associated with \c index.
///
/// \return \c true if `index < 0` or `index >= numberOfSupportStatuses`.
/// \return \c false otherwise.
///
/// \sa KIM_SUPPORT_STATUS_GetSupportStatus,
/// kim_support_status_module::kim_get_support_status
///
/// \since 2.0
int GetSupportStatus(int const index, SupportStatus * const supportStatus);
/// \brief Structure provided for use with std::map.
///
/// \since 2.0
struct Comparator
{
/// \brief Provides an (logically unmeaningful) ordering for SupportStatus
/// objects so that they can be stored in a std::map.
///
/// \since 2.0
bool operator()(SupportStatus const & a, SupportStatus const & b) const
{
return a.supportStatusID < b.supportStatusID;
}
}; // struct Comparator
} // namespace SUPPORT_STATUS
} // namespace KIM
#endif // KIM_SUPPORT_STATUS_HPP_
kim-api-2.2.1-git/cpp/include/KIM_SupportedExtensions.hpp 0000664 0000000 0000000 00000004114 13765565573 0023335 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_SUPPORTED_EXTENSIONS_HPP_
#define KIM_SUPPORTED_EXTENSIONS_HPP_
#define KIM_SUPPORTED_EXTENSIONS_ID "KIM_SupportedExtensions"
#define KIM_MAX_EXTENSION_ID_LENGTH 128
#define KIM_MAX_NUMBER_OF_EXTENSIONS 64
namespace KIM
{
/// \brief The only standard extension defined by the %KIM API.
///
/// This structure provides a standard mechanism for extensions to be
/// discovered at run time.
///
/// \sa KIM_SupportedExtensions,
/// kim_supported_extensions_module::kim_supported_extensions_type
///
/// \since 2.0
struct SupportedExtensions
{
/// The number of extensions supported by the Model.
int numberOfSupportedExtensions;
/// The unique extension ID's of each supported extension.
char supportedExtensionID[KIM_MAX_NUMBER_OF_EXTENSIONS]
[KIM_MAX_EXTENSION_ID_LENGTH];
/// \c true if the model requires the simulator to execute the corresponding
/// extension in order to be used correctly, \c false otherwise.
int supportedExtensionRequired[KIM_MAX_NUMBER_OF_EXTENSIONS];
}; // struct SupportedExtensions
} // namespace KIM
#endif // KIM_SUPPORTED_EXTENSIONS_HPP_
kim-api-2.2.1-git/cpp/include/KIM_TemperatureUnit.hpp 0000664 0000000 0000000 00000013774 13765565573 0022441 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_TEMPERATURE_UNIT_HPP_
#define KIM_TEMPERATURE_UNIT_HPP_
#include
namespace KIM
{
/// \brief An \ref extensible_enumeration "Extensible Enumeration" for the
/// TemperatureUnit's supported by the %KIM API.
///
/// The enumeration constants are contained in the TEMPERATURE_UNIT namespace.
///
/// \sa KIM_TemperatureUnit,
/// kim_temperature_unit_module::kim_temperature_unit_type
///
/// \since 2.0
class TemperatureUnit
{
public:
/// \brief Integer identifying the specific TemperatureUnit represented.
///
/// \note This should not be directly accessed and is only public for
/// cross-language reasons.
///
/// \sa KIM_TemperatureUnit::temperatureUnitID,
/// kim_temperature_unit_module::kim_temperature_unit_type::temperature_unit_id
///
/// \since 2.0
int temperatureUnitID;
/// \brief Create an uninitialized TemperatureUnit object.
///
/// \since 2.0
TemperatureUnit();
/// \brief Create a TemperatureUnit object with the specified id.
///
/// \note This should not be used directly.
///
/// \since 2.0
TemperatureUnit(int const id);
/// \brief Create a TemperatureUnit object corresponding to the provided
/// string. If the string does not match one of the values defined by the
/// %KIM API, then an "unknown" object is generated.
///
/// \sa KIM_TemperatureUnit_FromString,
/// kim_temperature_unit_module::kim_from_string
///
/// \since 2.0
TemperatureUnit(std::string const & str);
/// \brief Determines if the object is a quantity known to the %KIM API.
///
/// TemperatureUnit's known to the %KIM API are found in the TEMPERATURE_UNIT
/// namespace.
///
/// \sa KIM_TemperatureUnit_Known, kim_temperature_unit_module::kim_known
///
/// \since 2.0
bool Known() const;
/// \brief Compares TemperatureUnit objects for equality.
///
/// \note Not all "unknown" objects are equal.
///
/// \sa KIM_TemperatureUnit_Equal,
/// kim_temperature_unit_module::operator(.eq.)
///
/// \since 2.0
bool operator==(TemperatureUnit const & rhs) const;
/// \brief Compares TemperatureUnit objects for inequality.
///
/// \note It is possible for two "unknown" objects to be not equal.
///
/// \sa KIM_TemperatureUnit_NotEqual,
/// kim_temperature_unit_module::operator(.ne.)
///
/// \since 2.0
bool operator!=(TemperatureUnit const & rhs) const;
/// \brief Converts the object to a string.
///
/// \return A string object representing the TemperatureUnit object.
///
/// \note If the TemperatureUnit object does not correspond to a value
/// defined by the %KIM API, then the string "unknown" is returned.
///
/// \sa KIM_TemperatureUnit_ToString,
/// kim_temperature_unit_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
}; // class TemperatureUnit
/// \brief Contains the enumeration constants and the discovery routines for
/// the TemperatureUnit \ref extensible_enumeration "Extensible Enumeration".
namespace TEMPERATURE_UNIT
{
/// \brief Indicates that a TemperatureUnit is not used.
///
/// \sa KIM_TEMPERATURE_UNIT_unused,
/// kim_temperature_unit_module::kim_temperature_unit_unused
///
/// \since 2.0
extern TemperatureUnit const unused;
/// \brief The standard Kelvin unit of temperature.
///
/// \sa KIM_TEMPERATURE_UNIT_K,
/// kim_temperature_unit_module::kim_temperature_unit_k
///
/// \since 2.0
extern TemperatureUnit const K;
/// \brief Get the number of standard TemperatureUnit's defined by the %KIM
/// API.
///
/// \param[out] numberOfTemperatureUnits The number of standard
/// TemperatureUnit's defined by the %KIM API.
///
/// \sa KIM_TEMPERATURE_UNIT_GetNumberOfTemperatureUnits,
/// kim_temperature_unit_module::kim_get_number_of_temperature_units
///
/// \since 2.0
void GetNumberOfTemperatureUnits(int * const numberOfTemperatureUnits);
/// \brief Get the identity of each defined standard TemperatureUnit.
///
/// \param[in] index Zero-based index uniquely labeling each defined standard
/// TemperatureUnit. This index ordering is only guaranteed to be
/// stable during the lifetime of the current process.
/// \param[out] temperatureUnit The TemperatureUnit object associated with \c
/// index.
///
/// \return \c true if `index < 0` or `index >= numberOfTemperatureUnits`.
/// \return \c false otherwise.
///
/// \sa KIM_TEMPERATURE_UNIT_GetTemperatureUnit,
/// kim_temperature_unit_module::kim_get_temperature_unit
///
/// \since 2.0
int GetTemperatureUnit(int const index,
TemperatureUnit * const temperatureUnit);
/// \brief Structure provided for use with std::map.
///
/// \since 2.0
struct Comparator
{
/// \brief Provides an (logically unmeaningful) ordering for TemperatureUnit
/// objects so that they can be stored in a std::map.
///
/// \since 2.0
bool operator()(TemperatureUnit const & a, TemperatureUnit const & b) const
{
return a.temperatureUnitID < b.temperatureUnitID;
}
}; // struct Comparator
} // namespace TEMPERATURE_UNIT
} // namespace KIM
#endif // KIM_TEMPERATURE_UNIT_HPP_
kim-api-2.2.1-git/cpp/include/KIM_TimeUnit.hpp 0000664 0000000 0000000 00000013524 13765565573 0021033 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_TIME_UNIT_HPP_
#define KIM_TIME_UNIT_HPP_
#include
namespace KIM
{
/// \brief An \ref extensible_enumeration "Extensible Enumeration" for the
/// TimeUnit's supported by the %KIM API.
///
/// The enumeration constants are contained in the TIME_UNIT namespace.
///
/// \sa KIM_TimeUnit, kim_time_unit_module::kim_time_unit_type
///
/// \since 2.0
class TimeUnit
{
public:
/// \brief Integer identifying the specific TimeUnit represented.
///
/// \note This should not be directly accessed and is only public for
/// cross-language reasons.
///
/// \sa KIM_TimeUnit::timeUnitID,
/// kim_time_unit_module::kim_time_unit_type::time_unit_id
///
/// \since 2.0
int timeUnitID;
/// \brief Create an uninitialized TimeUnit object.
///
/// \since 2.0
TimeUnit();
/// \brief Create a TimeUnit object with the specified id.
///
/// \note This should not be used directly.
///
/// \since 2.0
TimeUnit(int const id);
/// \brief Create a TimeUnit object corresponding to the provided string. If
/// the string does not match one of the values defined by the %KIM API, then
/// an "unknown" object is generated.
///
/// \sa KIM_TimeUnit_FromString, kim_time_unit_module::kim_from_string
///
/// \since 2.0
TimeUnit(std::string const & str);
/// \brief Determines if the object is a quantity known to the %KIM API.
///
/// TimeUnit's known to the %KIM API are found in the TIME_UNIT namespace.
///
/// \sa KIM_TimeUnit_Known, kim_time_unit_module::kim_known
///
/// \since 2.0
bool Known() const;
/// \brief Compares TimeUnit objects for equality.
///
/// \note Not all "unknown" objects are equal.
///
/// \sa KIM_TimeUnit_Equal, kim_time_unit_module::operator(.eq.)
///
/// \since 2.0
bool operator==(TimeUnit const & rhs) const;
/// \brief Compares TimeUnit objects for inequality.
///
/// \note It is possible for two "unknown" objects to be not equal.
///
/// \sa KIM_TimeUnit_NotEqual, kim_time_unit_module::operator(.ne.)
///
/// \since 2.0
bool operator!=(TimeUnit const & rhs) const;
/// \brief Converts the object to a string.
///
/// \return A string object representing the TimeUnit object.
///
/// \note If the TimeUnit object does not correspond to a value defined by
/// the %KIM API, then the string "unknown" is returned.
///
/// \sa KIM_TimeUnit_ToString, kim_time_unit_module::kim_to_string
///
/// \since 2.0
std::string const & ToString() const;
}; // class TimeUnit
/// \brief Contains the enumeration constants and the discovery routines for
/// the TimeUnit \ref extensible_enumeration "Extensible Enumeration".
namespace TIME_UNIT
{
/// \brief Indicates that a TimeUnit is not used.
///
/// \sa KIM_TIME_UNIT_unused, kim_time_unit_module::kim_time_unit_unused
///
/// \since 2.0
extern TimeUnit const unused;
/// \brief The standard femtosecond unit of time.
///
/// \sa KIM_TIME_UNIT_fs, kim_time_unit_module::kim_time_unit_fs
///
/// \since 2.0
extern TimeUnit const fs;
/// \brief The standard picosecond unit of time.
///
/// \sa KIM_TIME_UNIT_ps, kim_time_unit_module::kim_time_unit_ps
///
/// \since 2.0
extern TimeUnit const ps;
/// \brief The standard nanosecond unit of time.
///
/// \sa KIM_TIME_UNIT_ns, kim_time_unit_module::kim_time_unit_ns
///
/// \since 2.0
extern TimeUnit const ns;
/// \brief The standard second unit of time.
///
/// \sa KIM_TIME_UNIT_s, kim_time_unit_module::kim_time_unit_s
///
/// \since 2.0
extern TimeUnit const s;
/// \brief Get the number of standard TimeUnit's defined by the %KIM API.
///
/// \param[out] numberOfTimeUnits The number of standard TimeUnit's defined by
/// the %KIM API.
///
/// \sa KIM_TIME_UNIT_GetNumberOfTimeUnits,
/// kim_time_unit_module::kim_get_number_of_time_units
///
/// \since 2.0
void GetNumberOfTimeUnits(int * const numberOfTimeUnits);
/// \brief Get the identity of each defined standard TimeUnit.
///
/// \param[in] index Zero-based index uniquely labeling each defined standard
/// TimeUnitnit. This index ordering is only guaranteed to be
/// stable during the lifetime of the current process.
/// \param[out] timeUnit The TimeUnit object associated with \c index.
///
/// \return \c true if `index < 0` or `index >= numberOfTimeUnits`.
/// \return \c false otherwise.
///
/// \sa KIM_TIME_UNIT_GetTimeUnit, kim_time_unit_module::kim_get_time_unit
///
/// \since 2.0
int GetTimeUnit(int const index, TimeUnit * const timeUnit);
/// \brief Structure provided for use with std::map.
///
/// \since 2.0
struct Comparator
{
/// \brief Provides an (logically unmeaningful) ordering for TimeUnit objects
/// so that they can be stored in a std::map.
///
/// \since 2.0
bool operator()(TimeUnit const & a, TimeUnit const & b) const
{
return a.timeUnitID < b.timeUnitID;
}
}; // struct Comparator
} // namespace TIME_UNIT
} // namespace KIM
#endif // KIM_TIME_UNIT_HPP_
kim-api-2.2.1-git/cpp/include/KIM_UnitSystem.hpp 0000664 0000000 0000000 00000002715 13765565573 0021421 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_UNIT_SYSTEM_HPP_
#define KIM_UNIT_SYSTEM_HPP_
// IWYU pragma: begin_exports
#ifndef KIM_LENGTH_UNIT_HPP_
#include "KIM_LengthUnit.hpp"
#endif
#ifndef KIM_ENERGY_UNIT_HPP_
#include "KIM_EnergyUnit.hpp"
#endif
#ifndef KIM_CHARGE_UNIT_HPP_
#include "KIM_ChargeUnit.hpp"
#endif
#ifndef KIM_TEMPERATURE_UNIT_HPP_
#include "KIM_TemperatureUnit.hpp"
#endif
#ifndef KIM_TIME_UNIT_HPP_
#include "KIM_TimeUnit.hpp"
#endif
// IWYU pragma: end_exports
#endif // KIM_UNIT_SYSTEM_HPP_
kim-api-2.2.1-git/cpp/include/KIM_Version.hpp.in 0000664 0000000 0000000 00000004776 13765565573 0021340 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#ifndef KIM_VERSION_HPP_
#define KIM_VERSION_HPP_
/// \brief The major version number of the %KIM API
///
/// The %KIM API conforms to Semantic Versioning
/// 2.0.0.
///
/// \since 2.0
// clang-format off
#define KIM_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
// clang-format on
/// \brief The minor version number of the %KIM API
///
/// The %KIM API conforms to Semantic Versioning
/// 2.0.0.
///
/// \since 2.0
// clang-format off
#define KIM_VERSION_MINOR @PROJECT_VERSION_MINOR@
// clang-format on
/// \brief The patch version number of the %KIM API
///
/// The %KIM API conforms to Semantic Versioning
/// 2.0.0.
///
/// \since 2.0
// clang-format off
#define KIM_VERSION_PATCH @PROJECT_VERSION_PATCH@
// clang-format on
/// \brief The prerelease version string of the %KIM API
///
/// The %KIM API conforms to Semantic Versioning
/// 2.0.0.
///
/// \since 2.0
#define KIM_VERSION_PRERELEASE "@PROJECT_VERSION_PRERELEASE@"
/// \brief The build metadata version string of the %KIM API
///
/// The %KIM API conforms to Semantic Versioning
/// 2.0.0.
///
/// \since 2.0
#define KIM_VERSION_BUILD_METADATA "@PROJECT_VERSION_BUILD_METADATA@"
/// \brief The complete version string of the %KIM API
///
/// The %KIM API conforms to Semantic Versioning
/// 2.0.0.
///
/// \since 2.0
#define KIM_VERSION_STRING "@PROJECT_VERSION_STRING@"
#endif // KIM_VERSION_HPP_
kim-api-2.2.1-git/cpp/src/ 0000775 0000000 0000000 00000000000 13765565573 0015223 5 ustar 00root root 0000000 0000000 kim-api-2.2.1-git/cpp/src/CMakeLists.txt 0000664 0000000 0000000 00000011035 13765565573 0017763 0 ustar 00root root 0000000 0000000 #
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#
#
# Copyright (c) 2013--2020, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
# Alexander Stukowski
#
#
# Release: This file is part of the kim-api.git repository.
#
target_include_directories(kim-api PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${PROJECT_SOURCE_DIR}/cmake # for KIM_SharedLibrarySchema.hpp
)
configure_file(KIM_Configuration.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/KIM_Configuration.hpp)
set(CPP_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ChargeUnit.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_Collection.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_CollectionItemType.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_Collections.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_CollectionsImplementation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ComputeArgumentName.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ComputeArguments.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ComputeCallbackName.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_DataType.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_EnergyUnit.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_FilesystemPath.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_LanguageName.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_LengthUnit.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_Log.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_LogVerbosity.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_Model.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelCompute.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelComputeArguments.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelComputeArgumentsCreate.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelComputeArgumentsDestroy.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelCreate.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelDestroy.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelDriverCreate.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelExtension.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelRefresh.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelRoutineName.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelWriteParameterizedModel.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_Numbering.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_SemVer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_SpeciesName.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_SupportStatus.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_SimulatorModel.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_SimulatorModelImplementation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_TemperatureUnit.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_TimeUnit.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ComputeArgumentsImplementation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_LogImplementation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_ModelImplementation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/KIM_SharedLibrary.cpp
)
target_sources(kim-api PRIVATE ${CPP_SOURCES})
if(WIN32 AND NOT CYGWIN)
# Activate C++17 language standard on Win32 platform, because kim-api code uses C++ filesystem library internally.
# Note: The 'cxx_std_17' target compile feature was added by CMake version 3.8.
# For older CMake versions, fall back to setting the CXX_STANDARD target property instead.
get_property(cxx_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES)
if("cxx_std_17" IN_LIST cxx_features)
target_compile_features(kim-api PUBLIC cxx_std_17)
else()
set_property(TARGET kim-api PROPERTY CXX_STANDARD 17)
set_property(TARGET kim-api PROPERTY CXX_STANDARD_REQUIRED YES)
endif()
endif()
# The KIM API code uses POSIX.1-2008 functions such as strdup() or mkstemp(), which are
# not part of the ISO C standard. Thus, when compiling with -std=c++98 instead of -std=gnu98,
# these function would be unavailable.
# Defining _DEFAULT_SOURCE during compilation tells the GNU C Library headers to make the
# POSIX and System V functions available also in strict ANSI C mode.
# See also: https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
target_compile_definitions(kim-api PRIVATE _DEFAULT_SOURCE)
kim-api-2.2.1-git/cpp/src/KIM_ChargeUnit.cpp 0000664 0000000 0000000 00000006662 13765565573 0020472 0 ustar 00root root 0000000 0000000 //
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the Common Development
// and Distribution License Version 1.0 (the "License").
//
// You can obtain a copy of the license at
// http://www.opensource.org/licenses/CDDL-1.0. See the License for the
// specific language governing permissions and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each file and
// include the License file in a prominent location with the name LICENSE.CDDL.
// If applicable, add the following below this CDDL HEADER, with the fields
// enclosed by brackets "[]" replaced with your own identifying information:
//
// Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
//
// CDDL HEADER END
//
//
// Copyright (c) 2016--2020, Regents of the University of Minnesota.
// All rights reserved.
//
// Contributors:
// Ryan S. Elliott
//
//
// Release: This file is part of the kim-api.git repository.
//
#include