Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codespellexclude
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
mErrors.clear();
mTasksErrors = mErrors;
mErrors.clear();
// Note: the clearing of mIssues, mErrors, and mWarnings could be done using removeAllIssues(), but this would
// Note #1: the clearing of mIssues, mErrors, and mWarnings could be done using removeAllIssues(), but this would
mErrors = mTasksErrors;
mErrorCount.store(mErrors.size(), std::memory_order_release);
if ((document->getNumErrors() == 0)
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.20261125.0
2.20261126.0
6 changes: 3 additions & 3 deletions cmake/applypatches.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
# Apply our patches to the source code of a third-party library.
# Note #1: the patches are applied by build_package() when building a third-party library from source (see
# patch_package_args() in packages.cmake), which is also how our prebuilt packages are built.
# Note #2: ExternalProject downloads and extracts the source code afresh whenever our patches or this script change
# (see patch_package_args() in packages.cmake), so we always patch a pristine copy of it and never need to
# revert anything.
# Note #2: ExternalProject downloads and extracts the source code afresh whenever our patches or this script change (see
# patch_package_args() in packages.cmake), so we always patch a pristine copy of it and never need to revert
# anything.
# Note #3: our patches have LF line endings, whatever the platform (see .gitattributes) and so do (normally) the source
# files that they patch. Still, we make sure that Git never writes CRLF line endings into the patched files
# (core.autocrlf=input overrides Git for Windows' default, i.e. core.autocrlf=true), and we ask Git to ignore
Expand Down
6 changes: 3 additions & 3 deletions cmake/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,9 @@ endmacro()

function(prepare_test TARGET)
# Prepare the given test.
# Note: we don't want modp_b64.cc to be subjected to Clang-Tidy, hence we compile it separately. From Cmake 3.27,
# we could use the SKIP_LINTING property to exclude it from Clang-Tidy, but for some reasons it's not working,
# so we compile it separately (as suggested at https://stackoverflow.com/a/75858167).
# Note: we don't want modp_b64.cc to be subjected to Clang-Tidy, hence we compile it separately. From Cmake 3.27, we
# could use the SKIP_LINTING property to exclude it from Clang-Tidy, but for some reasons it's not working, so
# we compile it separately (as suggested at https://stackoverflow.com/a/75858167).

add_executable(${TARGET}
${ARGN})
Expand Down
14 changes: 7 additions & 7 deletions cmake/packages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ function(retrieve_package PACKAGE_NAME PACKAGE_VERSION PACKAGE_REPOSITORY RELEAS
# Check whether the package has already been retrieved by checking whether its installation directory contains a
# marker file with the SHA-1 value of the package that we want. If the marker file is missing or if it has a
# different SHA-1 value, then we remove the installation directory and retrieve the package anew.
# Note: the marker file is located at the root of the installation directory, so create_package() never includes
# it in a package since it only packages some specific subdirectories and/or files.
# Note: the marker file is located at the root of the installation directory, so create_package() never includes it
# in a package since it only packages some specific subdirectories and/or files.

set(INSTALL_DIR ${PREBUILT_DIR}/${PACKAGE_NAME})
set(MARKER_FILE ${INSTALL_DIR}/.sha1)
Expand Down Expand Up @@ -395,9 +395,9 @@ set(PREBUILT_DIR "${PREBUILT_DIR}" CACHE INTERNAL "Prebuilt directory.")

include(ExternalProject)

# On Linux, build our third-party libraries as position-independent code and put each of their functions and data in
# its own section, so that the linker can remove the ones that we don't use when building libOpenCOR (see --gc-sections
# in src/CMakeLists.txt and src/bindings/python/CMakeLists.txt). Indeed, the linker can only remove whole sections and,
# On Linux, build our third-party libraries as position-independent code and put each of their functions and data in its
# own section, so that the linker can remove the ones that we don't use when building libOpenCOR (see --gc-sections in
# src/CMakeLists.txt and src/bindings/python/CMakeLists.txt). Indeed, the linker can only remove whole sections and,
# without this, all the functions of an object file would be in the same section.
# Note: there is no need for this on Windows (MSVC does it by default in release mode) or on macOS (the linker removes
# unused functions and data anyway, see -dead_strip in src/CMakeLists.txt).
Expand Down Expand Up @@ -454,8 +454,8 @@ endif()
if(EMSCRIPTEN)
# Note #1: we are using the same CMake variables that we used to build libOpenCOR, so that we can build our
# third-party libraries in the same way that we built libOpenCOR.
# Note #2: with Emscripten 7, libc++ no longer includes some headers indirectly, but some third-party libraries
# may use something from them without including them (e.g., libCellML uses std::strtod() without including
# Note #2: with Emscripten 7, libc++ no longer includes some headers indirectly, but some third-party libraries may
# use something from them without including them (e.g., libCellML uses std::strtod() without including
# <cstdlib> and libSBML uses std::nothrow without including <new>), so we force their inclusion.

list(APPEND CMAKE_ARGS
Expand Down
22 changes: 11 additions & 11 deletions src/3rdparty/libCellML/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
# limitations under the License.

set(PACKAGE_NAME libCellML)
set(PACKAGE_VERSION 2026-11-25)
set(PACKAGE_VERSION 2026-11-26)
set(PACKAGE_REPOSITORY libcellml)
set(RELEASE_TAG 2026-11-25)
set(RELEASE_TAG 2026-11-26)
set(INSTALL_DIR ${PREBUILT_DIR}/${PACKAGE_NAME})

if(WIN32 AND NOT RELEASE_MODE)
Expand Down Expand Up @@ -71,49 +71,49 @@ if(LIBOPENCOR_PREBUILT_LIBCELLML)
if(EMSCRIPTEN)
retrieve_package(${PACKAGE_NAME} ${PACKAGE_VERSION}
${PACKAGE_REPOSITORY} ${RELEASE_TAG}
17561666cb2003119b79192aa66f84dec619389a)
d701da4026183e08f9155288928a999709121ccf)
else()
if(WIN32)
if(RELEASE_MODE)
if(INTEL_MODE)
retrieve_package(${PACKAGE_NAME} ${PACKAGE_VERSION}
${PACKAGE_REPOSITORY} ${RELEASE_TAG}
0882e97eb368c02af18fede335ca69d017fa0258)
3172ebe3675c041834e6cd385cba10e8e04ec801)
else()
retrieve_package(${PACKAGE_NAME} ${PACKAGE_VERSION}
${PACKAGE_REPOSITORY} ${RELEASE_TAG}
96ae88307fb5b0d9302e8d54ae5bb6d74bed6353)
4c5bd77735176f7a5bef3c91775e6522cf565b7d)
endif()
else()
if(INTEL_MODE)
retrieve_package(${PACKAGE_NAME} ${PACKAGE_VERSION}
${PACKAGE_REPOSITORY} ${RELEASE_TAG}
d01ed65f6888ead42d8e12431459e082a06372c8)
f13c426bed9a2681b0b58cb1dcde051f7538e196)
else()
retrieve_package(${PACKAGE_NAME} ${PACKAGE_VERSION}
${PACKAGE_REPOSITORY} ${RELEASE_TAG}
937937d4acdd07195f82cf2a51a08c70e26e3685)
a0706257082902c457eedd2d53480680a9bec5e8)
endif()
endif()
elseif(APPLE)
if(INTEL_MODE)
retrieve_package(${PACKAGE_NAME} ${PACKAGE_VERSION}
${PACKAGE_REPOSITORY} ${RELEASE_TAG}
1712bdfff14dbfa6652fc56a0ac102bdf9a84f87)
0cb7e7bc3cd8a7f38cf5544d22cea44a5debc1ff)
else()
retrieve_package(${PACKAGE_NAME} ${PACKAGE_VERSION}
${PACKAGE_REPOSITORY} ${RELEASE_TAG}
606fca99935c7d1cf8c99005a8f31c765853b7d7)
a783799c596dee614ee22c66e0e2177e087a5e27)
endif()
else()
if(INTEL_MODE)
retrieve_package(${PACKAGE_NAME} ${PACKAGE_VERSION}
${PACKAGE_REPOSITORY} ${RELEASE_TAG}
b3b64587e61ad7e1f46426b25ed738fd07984e3c)
5963f741cb0c45ab714ea742e18e12035b9d055f)
else()
retrieve_package(${PACKAGE_NAME} ${PACKAGE_VERSION}
${PACKAGE_REPOSITORY} ${RELEASE_TAG}
b441e19b6699c908e0a72505f4b5d04909d8d9b1)
8603ecd5d988da5be31bc46d9e9a2087f5236043)
endif()
endif()
endif()
Expand Down
8 changes: 4 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ set(INTERNAL_SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/solver/solversecondorderrungekutta.cpp
${CMAKE_CURRENT_SOURCE_DIR}/support/cellml/cellmlfile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/support/cellml/cellmlfileruntime.cpp
${CMAKE_CURRENT_SOURCE_DIR}/support/combine/combinearchive.cpp
${CMAKE_CURRENT_SOURCE_DIR}/support/omex/omexfile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/support/sedml/sedmlfile.cpp
)

Expand Down Expand Up @@ -320,8 +320,8 @@ set(INTERNAL_HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/support/cellml/cellmlfile.h
${CMAKE_CURRENT_SOURCE_DIR}/support/cellml/cellmlfileruntime_p.h
${CMAKE_CURRENT_SOURCE_DIR}/support/cellml/cellmlfileruntime.h
${CMAKE_CURRENT_SOURCE_DIR}/support/combine/combinearchive_p.h
${CMAKE_CURRENT_SOURCE_DIR}/support/combine/combinearchive.h
${CMAKE_CURRENT_SOURCE_DIR}/support/omex/omexfile_p.h
${CMAKE_CURRENT_SOURCE_DIR}/support/omex/omexfile.h
${CMAKE_CURRENT_SOURCE_DIR}/support/sedml/sedmlfile_p.h
${CMAKE_CURRENT_SOURCE_DIR}/support/sedml/sedmlfile.h
${CMAKE_CURRENT_SOURCE_DIR}/unittestingexport.h
Expand All @@ -343,7 +343,7 @@ include_directories(file
misc
solver
support/cellml
support/combine
support/omex
support/sedml
${CMAKE_CURRENT_BINARY_DIR})

Expand Down
21 changes: 10 additions & 11 deletions src/api/libopencor/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class LIBOPENCOR_EXPORT File: public Logger
, public std::enable_shared_from_this<File>
{
friend class CellmlFile;
friend class CombineArchive;
friend class OmexFile;
friend class SedDocument;
friend class SedInstanceTask;
friend class SedmlFile;
Expand All @@ -43,8 +43,7 @@ class LIBOPENCOR_EXPORT File: public Logger
/**
* @brief The type of a file.
*
* The type of a file, i.e. whether it is unknown, a CellML file, a SED-ML file, a COMBINE archive, or
* irretrievable.
* The type of a file, i.e. whether it is unknown, a CellML file, a SED-ML file, an OMEX file, or irretrievable.
*/

enum class Type
Expand All @@ -53,9 +52,9 @@ class LIBOPENCOR_EXPORT File: public Logger
CELLML_FILE, /**< The file is a CellML file. */
SEDML_FILE, /**< The file is a SED-ML file. */
#ifdef __EMSCRIPTEN__
COMBINE_ARCHIVE /**< The file is a COMBINE archive. */
OMEX_FILE /**< The file is an OMEX file. */
#else
COMBINE_ARCHIVE, /**< The file is a COMBINE archive. */
OMEX_FILE, /**< The file is an OMEX file. */
IRRETRIEVABLE_FILE /**< The file is irretrievable. */
#endif
};
Expand Down Expand Up @@ -180,7 +179,7 @@ class LIBOPENCOR_EXPORT File: public Logger
/**
* @brief Return whether there are some child files.
*
* Return whether there are some child files. This method is only relevant for COMBINE archives.
* Return whether there are some child files. This method is only relevant for OMEX files.
*
* @return @c true if there are some child files, @c false otherwise.
*/
Expand All @@ -190,7 +189,7 @@ class LIBOPENCOR_EXPORT File: public Logger
/**
* @brief Return the number of child files.
*
* Return the number of child files. This method is only relevant for COMBINE archives.
* Return the number of child files. This method is only relevant for OMEX files.
*
* @return The number of child files.
*/
Expand All @@ -200,7 +199,7 @@ class LIBOPENCOR_EXPORT File: public Logger
/**
* @brief Return the child file names.
*
* Return the child file names. This method is only relevant for COMBINE archives.
* Return the child file names. This method is only relevant for OMEX files.
*
* @return The child file names, as a @ref Strings.
*/
Expand All @@ -210,7 +209,7 @@ class LIBOPENCOR_EXPORT File: public Logger
/**
* @brief Return the child files.
*
* Return the child files. This method is only relevant for COMBINE archives.
* Return the child files. This method is only relevant for OMEX files.
*
* @return The child files, as a @ref FilePtrs.
*/
Expand All @@ -220,7 +219,7 @@ class LIBOPENCOR_EXPORT File: public Logger
/**
* @brief Return the child file at the given index.
*
* Return the child file at the given index. This method is only relevant for COMBINE archives.
* Return the child file at the given index. This method is only relevant for OMEX files.
*
* @param pIndex The index of the child file.
*
Expand All @@ -232,7 +231,7 @@ class LIBOPENCOR_EXPORT File: public Logger
/**
* @brief Return the child file with the given file name.
*
* Return the child file with the given file name. This method is only relevant for COMBINE archives.
* Return the child file with the given file name. This method is only relevant for OMEX files.
*
* @param pFileName The name of the child file.
*
Expand Down
6 changes: 3 additions & 3 deletions src/api/libopencor/sedinstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ class LIBOPENCOR_EXPORT SedInstance: public Logger
/**
* @brief Start running, in a background thread, all the tasks associated with this instance.
*
* Start running, in a background thread, all the tasks associated with this instance. The results of the tasks
* are (re)allocated before this method returns, so they can be retrieved while the tasks are being run (e.g., to
* plot them progressively). The simulation settings and model changes used are those in effect when this method is
* Start running, in a background thread, all the tasks associated with this instance. The results of the tasks are
* (re)allocated before this method returns, so they can be retrieved while the tasks are being run (e.g., to plot
* them progressively). The simulation settings and model changes used are those in effect when this method is
* called.
*
* Note: in a Web browser, this method can only be used if the page is cross-origin isolated (i.e. served with the
Expand Down
3 changes: 1 addition & 2 deletions src/api/libopencor/seduniformtimecourse.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ class LIBOPENCOR_EXPORT SedUniformTimeCourse: public SedSimulation
* auto simulation {libOpenCOR::SedUniformTimeCourse::create(document)};
* ```
*
* @param pDocument The @ref SedDocument object to which the @ref SedUniformTimeCourse object is to
* belong.
* @param pDocument The @ref SedDocument object to which the @ref SedUniformTimeCourse object is to belong.
*
* @return A smart pointer to a @ref SedUniformTimeCourse object.
*/
Expand Down
10 changes: 5 additions & 5 deletions src/api/libopencor/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ const std::string LIBOPENCOR_EXPORT &libcombineVersionString();
unsigned int LIBOPENCOR_EXPORT libcurlVersion();

/**
* Return the version of libcurl as a string. The version string is in the format x.y.z, where the "."s are literal,
* and x, y, and z represent counting numbers, in which case x is the major version, y the minor version, and z the
* patch level.
* Return the version of libcurl as a string. The version string is in the format x.y.z, where the "."s are literal, and
* x, y, and z represent counting numbers, in which case x is the major version, y the minor version, and z the patch
* level.
*
* @return A string that represents the version of libcurl.
*/
Expand Down Expand Up @@ -128,8 +128,8 @@ const std::string LIBOPENCOR_EXPORT &libsedmlVersionString();
unsigned int LIBOPENCOR_EXPORT llvmVersion();

/**
* Return the version of LLVM as a string. The version string is in the format x.y.z, where the "."s are literal, and
* x, y, and z represent counting numbers, in which case x is the major version, y the minor version, and z the patch
* Return the version of LLVM as a string. The version string is in the format x.y.z, where the "."s are literal, and x,
* y, and z represent counting numbers, in which case x is the major version, y the minor version, and z the patch
* level.
*
* @return A string that represents the version of LLVM.
Expand Down
5 changes: 2 additions & 3 deletions src/bindings/javascript/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ if(EMSCRIPTEN OR LIBOPENCOR_JAVASCRIPT_BINDINGS)
# supported by all major browsers (and by Node.js). Indeed, Emscripten otherwise aborts on any C++
# exception, even one that would be caught. This means that something that works natively would abort
# in our WASM version (e.g., libCellML handles a units prefix that is out of the integer range by
# catching the std::out_of_range exception thrown by std::stoi()). Unlike Emscripten's
# JavaScript-based exception handling, WebAssembly exception handling has no runtime cost when no
# exception is thrown.
# catching the std::out_of_range exception thrown by std::stoi()). Unlike Emscripten's JavaScript-based
# exception handling, WebAssembly exception handling has no runtime cost when no exception is thrown.
# Note #3: the linker flags also allow the WebAssembly table to grow (-sALLOW_TABLE_GROWTH), which we need to
# install the functions of the WebAssembly modules that we generate for our models (see
# initialiseWorkerWasmJS()).
Expand Down
6 changes: 3 additions & 3 deletions src/bindings/javascript/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void fileApi()
.value("UNKNOWN_FILE", libOpenCOR::File::Type::UNKNOWN_FILE)
.value("CELLML_FILE", libOpenCOR::File::Type::CELLML_FILE)
.value("SEDML_FILE", libOpenCOR::File::Type::SEDML_FILE)
.value("COMBINE_ARCHIVE", libOpenCOR::File::Type::COMBINE_ARCHIVE);
.value("OMEX_FILE", libOpenCOR::File::Type::OMEX_FILE);

emscripten::class_<libOpenCOR::File, emscripten::base<libOpenCOR::Logger>>("File")
// clang-format off
Expand All @@ -47,8 +47,8 @@ void fileApi()

// Note: we avoid using emscripten::typed_memory_view() as an intermediate step since it creates a
// JavaScript's TypedArray view directly backed by wasmMemory.buffer. This is fragile since our memory
// can grow (see src/CMakeLists.txt). By performing the copy entirely within a single EM_ASM()
// block, HEAPU8 is fetched and used atomically.
// can grow (see src/CMakeLists.txt). By performing the copy entirely within a single EM_ASM() block,
// HEAPU8 is fetched and used atomically.

return emscripten::val::take_ownership(static_cast<emscripten::EM_VAL>(EM_ASM_PTR({
let jsArray = new Uint8Array(HEAPU8.subarray($0, $0 + $1));
Expand Down
4 changes: 2 additions & 2 deletions src/bindings/javascript/postprocess.dts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ function findMatchingClosingBrace(text, start) {
return -1;
}

// Normalise an interface declaration by adding 2 extra spaces of indentation to every non-empty line in the body
// and re-indenting the closing brace by 2 spaces.
// Normalise an interface declaration by adding 2 extra spaces of indentation to every non-empty line in the body and
// re-indenting the closing brace by 2 spaces.

function normaliseInterfaceDeclaration(interfaceDeclaration) {
const openingBraceIndex = interfaceDeclaration.indexOf('{');
Expand Down
Loading
Loading