├── .clang-format ├── .codespellexclude ├── .github └── workflows │ ├── ci.yml │ ├── deploy-on-release.yml │ └── spell-check.yml ├── .gitignore ├── CMakeLists.txt ├── CODE_OF_CONDUCT.rst ├── LICENSE ├── README.rst ├── cmake ├── FindSphinx.cmake ├── TestLibXml2ConstErrorStructuredErrorCallback.cmake ├── TestUndefinedSymbolsAllowed.cmake ├── binarytochararray.cmake ├── checkfordebugheaderusage.cmake ├── clcachewrapper.c ├── cmake_command_check_code_formatting.in.cmake ├── cmake_uninstall.in.cmake ├── common.cmake ├── environmentchecks.cmake ├── finalise_python_package.in.cmake ├── generateprofilesha1header.cmake ├── libcellml-config.cmake ├── macros.cmake ├── packaging │ ├── CMakeLists.txt │ └── distrib │ │ ├── description.txt │ │ ├── macos │ │ └── welcome.txt │ │ └── windows │ │ ├── libcellml.ico │ │ ├── libcellml_banner_hori.bmp │ │ └── libcellml_banner_vert.bmp ├── python_package_check.py └── utils │ ├── CMakeLists.txt │ ├── calculatesha1.cpp │ ├── compress.cpp │ └── compress.in.h ├── docs ├── CMakeLists.txt ├── Doxyfile.api-xml.in.config ├── Doxyfile.in.config ├── Makefile ├── changelogs │ ├── changelog_v0.1.0.rst │ ├── changelog_v0.2.0.rst │ ├── changelog_v0.3.100.rst │ ├── changelog_v0.3.101.rst │ ├── changelog_v0.3.102.rst │ ├── changelog_v0.3.103.rst │ ├── changelog_v0.3.104.rst │ ├── changelog_v0.3.99.rst │ ├── changelog_v0.4.0.rst │ ├── changelog_v0.5.0.rst │ ├── changelog_v0.6.0.rst │ ├── changelog_v0.6.1.rst │ ├── changelog_v0.6.2.rst │ ├── changelog_v0.6.3.rst │ └── index.rst ├── coding_standards.rst ├── conf.in.py ├── configure_and_build.rst ├── contributing.rst ├── coverage_statistics.rst ├── current_thinking.rst ├── dev_building_web_assembly.rst ├── dev_configuration_options.rst ├── dev_configuration_options_gui.rst ├── dev_utilities.rst ├── glossary.rst ├── images │ ├── abi.png │ ├── libCellMLBuilding-CMakeGUISourceBuildDirs.png │ ├── libCellMLBuilding-CMakeOptionsInRed.png │ ├── libCellMLBuilding-CMakeWindowsConfigurationError.png │ ├── libCellMLBuilding-CMakeWindowsLibXml2DIRNotFound.png │ ├── libCellMLBuilding-CMakeWindowsLibXml2DirSet.png │ ├── libCellMLBuilding-PolicyCMP0086Error.png │ ├── libCellMLBuilding-PythonDebugLibrary.png │ ├── libCellMLBuilding-WindowsRunAsAdmin.png │ ├── libCellMLBuilding-dllNotFound.png │ ├── libCellMLProcesses-DevelopmentProcess.png │ ├── libCellMLProcesses-GitBranching.png │ ├── libCellMLProcesses-GitHubForkButton.png │ ├── libCellMLProcesses-GitHubRepos.png │ ├── libCellMLRoughObjectModel-Entities.png │ ├── libCellMLRoughObjectModel-IOError.png │ ├── libCellMLRoughObjectModel-Overview.png │ ├── release_process │ │ ├── create_release_builder.png │ │ ├── create_release_builder_interface.png │ │ ├── end_to_end_database_tag_chooser_example.png │ │ ├── end_to_end_framework_tag_chooser_example.png │ │ ├── finalise_release_builder.png │ │ ├── finalise_release_builder_interface.png │ │ ├── prepare_release_builder.png │ │ ├── prepare_release_builder_interface.png │ │ ├── release_branch_chooser_example.png │ │ ├── set_version_builder.png │ │ └── set_version_builder_interface.png │ └── vpr.png ├── index.rst ├── mainpage.dox ├── make.bat ├── masters │ ├── libCellMLProcesses.vdx │ └── readme.txt ├── object_model.rst ├── release_process.rst ├── review_process.rst ├── roadmap.rst ├── setup.rst ├── testing.rst ├── theme │ ├── static │ │ └── theme.css │ └── theme.conf └── versions.rst ├── src ├── CMakeLists.txt ├── analyser.cpp ├── analyserequation.cpp ├── analyserequation_p.h ├── analyserequationast.cpp ├── analyserequationast_p.h ├── analyserexternalvariable.cpp ├── analyserexternalvariable_p.h ├── analysermodel.cpp ├── analysermodel_p.h ├── analyservariable.cpp ├── analyservariable_p.h ├── annotator.cpp ├── anycellmlelement_p.h ├── api │ └── libcellml │ │ ├── analyser.h │ │ ├── analyserequation.h │ │ ├── analyserequationast.h │ │ ├── analyserexternalvariable.h │ │ ├── analysermodel.h │ │ ├── analyservariable.h │ │ ├── annotator.h │ │ ├── component.h │ │ ├── componententity.h │ │ ├── entity.h │ │ ├── enums.h │ │ ├── generator.h │ │ ├── generatorprofile.h │ │ ├── importedentity.h │ │ ├── importer.h │ │ ├── importsource.h │ │ ├── issue.h │ │ ├── logger.h │ │ ├── model.h │ │ ├── module │ │ └── libcellml │ │ ├── namedentity.h │ │ ├── parentedentity.h │ │ ├── parser.h │ │ ├── printer.h │ │ ├── reset.h │ │ ├── strict.h │ │ ├── types.h │ │ ├── undefines.h │ │ ├── units.h │ │ ├── validator.h │ │ ├── variable.h │ │ └── version.h ├── bindings │ ├── CMakeLists.txt │ ├── interface │ │ ├── analyser.i │ │ ├── analyserequation.i │ │ ├── analyserequationast.i │ │ ├── analyserexternalvariable.i │ │ ├── analysermodel.i │ │ ├── analyservariable.i │ │ ├── annotator.i │ │ ├── component.i │ │ ├── componententity.i │ │ ├── createconstructor.i │ │ ├── entity.i │ │ ├── enums.i │ │ ├── generator.i │ │ ├── generatorprofile.i │ │ ├── importedentity.i │ │ ├── importer.i │ │ ├── importsource.i │ │ ├── issue.i │ │ ├── logger.i │ │ ├── model.i │ │ ├── namedentity.i │ │ ├── parentedentity.i │ │ ├── parser.i │ │ ├── printer.i │ │ ├── reset.i │ │ ├── strict.i │ │ ├── types.i │ │ ├── units.i │ │ ├── validator.i │ │ ├── variable.i │ │ └── version.i │ ├── javascript │ │ ├── .npmrc │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── analyser.cpp │ │ ├── analyserequation.cpp │ │ ├── analyserequationast.cpp │ │ ├── analyserexternalvariable.cpp │ │ ├── analysermodel.cpp │ │ ├── analyservariable.cpp │ │ ├── annotator.cpp │ │ ├── component.cpp │ │ ├── componententity.cpp │ │ ├── entity.cpp │ │ ├── enums.cpp │ │ ├── generator.cpp │ │ ├── generatorprofile.cpp │ │ ├── importedentity.cpp │ │ ├── importedentity.impl │ │ ├── importer.cpp │ │ ├── importsource.cpp │ │ ├── issue.cpp │ │ ├── logger.cpp │ │ ├── model.cpp │ │ ├── namedentity.cpp │ │ ├── parentedentity.cpp │ │ ├── parser.cpp │ │ ├── printer.cpp │ │ ├── reset.cpp │ │ ├── strict.cpp │ │ ├── strict.impl │ │ ├── types.cpp │ │ ├── units.cpp │ │ ├── validator.cpp │ │ ├── variable.cpp │ │ ├── version.cpp │ │ └── vue-app-with-libcellml.png │ └── python │ │ ├── CMakeLists.txt │ │ ├── README.rst │ │ ├── __init__.py │ │ ├── cibuildwheel.setup.py │ │ ├── pre_gen.setup.in.py │ │ ├── pyproject.toml │ │ └── wheel_dependencies │ │ └── CMakeLists.txt ├── commonutils.cpp ├── commonutils.h ├── component.cpp ├── component_p.h ├── componententity.cpp ├── componententity_p.h ├── configure │ ├── generatorprofilesha1values.in.h │ ├── mathmldtd.in.cpp │ ├── mathmldtd.in.h │ └── versionconfig.in.h ├── debug.cpp ├── debug.h ├── dtds │ └── mathml2 │ │ ├── html │ │ ├── lat1.ent │ │ ├── special.ent │ │ └── symbol.ent │ │ ├── iso8879 │ │ ├── isoamsa.ent │ │ ├── isoamsb.ent │ │ ├── isoamsc.ent │ │ ├── isoamsn.ent │ │ ├── isoamso.ent │ │ ├── isoamsr.ent │ │ ├── isobox.ent │ │ ├── isocyr1.ent │ │ ├── isocyr2.ent │ │ ├── isodia.ent │ │ ├── isogrk1.ent │ │ ├── isogrk2.ent │ │ ├── isogrk3.ent │ │ ├── isogrk4.ent │ │ ├── isolat1.ent │ │ ├── isolat2.ent │ │ ├── isonum.ent │ │ ├── isopub.ent │ │ └── isotech.ent │ │ ├── iso9573-13 │ │ ├── isoamsa.ent │ │ ├── isoamsb.ent │ │ ├── isoamsc.ent │ │ ├── isoamsn.ent │ │ ├── isoamso.ent │ │ ├── isoamsr.ent │ │ ├── isogrk3.ent │ │ ├── isogrk4.ent │ │ ├── isomfrk.ent │ │ ├── isomopf.ent │ │ ├── isomscr.ent │ │ └── isotech.ent │ │ ├── mathml │ │ ├── mmlalias.ent │ │ └── mmlextra.ent │ │ ├── mathml2-qname-1.mod │ │ ├── mathml2.dtd │ │ └── xhtml-math11-f.dtd ├── entity.cpp ├── entity_p.h ├── enums.cpp ├── generator.cpp ├── generator_p.h ├── generatorprofile.cpp ├── generatorprofilesha1values.h ├── generatorprofiletools.cpp ├── generatorprofiletools.h ├── importedentity.cpp ├── importer.cpp ├── importsource.cpp ├── internaltypes.cpp ├── internaltypes.h ├── issue.cpp ├── issue_p.h ├── logger.cpp ├── logger_p.h ├── mathmldtd.cpp ├── mathmldtd.h ├── model.cpp ├── model_p.h ├── namedentity.cpp ├── namedentity_p.h ├── namespaces.h ├── parentedentity.cpp ├── parentedentity_p.h ├── parser.cpp ├── printer.cpp ├── reset.cpp ├── reset_p.h ├── strict.cpp ├── types.cpp ├── units.cpp ├── units_p.h ├── utilities.cpp ├── utilities.h ├── validator.cpp ├── variable.cpp ├── variable_p.h ├── version.cpp ├── xmlattribute.cpp ├── xmlattribute.h ├── xmldoc.cpp ├── xmldoc.h ├── xmlnode.cpp ├── xmlnode.h ├── xmlutils.cpp └── xmlutils.h └── tests ├── CMakeLists.txt ├── analyser ├── analyser.cpp ├── analyserexternalvariable.cpp ├── analyserunits.cpp └── tests.cmake ├── annotator ├── annotator.cpp └── tests.cmake ├── api_headers ├── api_header_test.in.cmake ├── api_header_test.in.cpp └── tests.cmake ├── bindings ├── CMakeLists.txt ├── javascript │ ├── CMakeLists.txt │ ├── analyser.test.js │ ├── analyserequation.test.js │ ├── analyserequationast.test.js │ ├── analyserexternalvariable.test.js │ ├── analysermodel.test.js │ ├── analyservariable.test.js │ ├── annotator.test.js │ ├── component.test.js │ ├── componententity.test.js │ ├── entity.test.js │ ├── enums.test.js │ ├── generator.test.js │ ├── generatorprofile.test.js │ ├── importsource.test.js │ ├── issue.test.js │ ├── model.test.js │ ├── namedentity.test.js │ ├── parentedentity.test.js │ ├── parser.test.js │ ├── printer.test.js │ ├── reset.test.js │ ├── resources.js │ ├── types.test.js │ ├── units.test.js │ ├── validator.test.js │ ├── variable.test.js │ └── version.test.js └── python │ ├── CMakeLists.txt │ ├── requirements.txt │ ├── runner.py │ ├── test_analyser.py │ ├── test_analyser_equation_ast.py │ ├── test_analyser_external_variable.py │ ├── test_annotator.py │ ├── test_component.py │ ├── test_docstrings.py │ ├── test_entity.py │ ├── test_generator.py │ ├── test_generator_profile.py │ ├── test_import_requirement.py │ ├── test_import_source.py │ ├── test_importer.py │ ├── test_issue.py │ ├── test_model.py │ ├── test_parser.py │ ├── test_printer.py │ ├── test_reset.py │ ├── test_resources.cmake │ ├── test_resources.in.py │ ├── test_units.py │ ├── test_validator.py │ ├── test_variable.py │ └── test_version.py ├── clone ├── clone.cpp └── tests.cmake ├── component ├── component.cpp ├── encapsulation.cpp └── tests.cmake ├── connection ├── connection.cpp └── tests.cmake ├── coverage ├── coverage.cpp └── tests.cmake ├── equality ├── equality.cpp └── tests.cmake ├── gcovr-4.1.1.zip ├── generator ├── generator.cpp ├── generatorprofile.cpp └── tests.cmake ├── gtest ├── CMakeLists.txt ├── cmake │ └── internal_utils.cmake ├── include │ └── gtest │ │ └── gtest.h └── src │ ├── gtest-all.cc │ └── gtest_main.cc ├── import_source ├── import_source.cpp └── tests.cmake ├── importer ├── cellml_1_1.cpp ├── file_parser.cpp ├── importer.cpp ├── model_flattening.cpp └── tests.cmake ├── isolated ├── generator.cpp └── tests.cmake ├── libxml2issues.2.9.10.h ├── libxml2issues.2.9.11.h ├── libxml2issues.2.9.13.h ├── libxml2issues.2.9.4.h ├── math ├── math.cpp └── tests.cmake ├── model ├── component_import.cpp ├── import_requirement.cpp ├── model.cpp ├── tests.cmake └── units_import.cpp ├── parser ├── cellml_1_0.cpp ├── cellml_1_1.cpp ├── file_parser.cpp ├── libxml_user.cpp ├── parser.cpp └── tests.cmake ├── printer ├── printer.cpp └── tests.cmake ├── reset ├── reset.cpp └── tests.cmake ├── resources ├── Ohara_Rudy_2011.cellml ├── a_plus_b.cellml ├── analyser │ ├── initialised_variable_of_integration.cellml │ ├── initialised_variable_of_integration_in_non_first_component.cellml │ ├── non_constant_initialising_variable.cellml │ ├── non_existing_initialising_variable.cellml │ ├── non_first_order_odes.cellml │ ├── non_initialised_state.cellml │ ├── not_equality_statement.cellml │ ├── overconstrained.cellml │ ├── overconstrained_nla_system.cellml │ ├── two_variables_of_integration.cellml │ ├── undefined_variables.cellml │ ├── underconstrained.cellml │ ├── units │ │ ├── abs.cellml │ │ ├── and.cellml │ │ ├── arccos.cellml │ │ ├── arccosh.cellml │ │ ├── arccot.cellml │ │ ├── arccoth.cellml │ │ ├── arccsc.cellml │ │ ├── arccsch.cellml │ │ ├── arcsec.cellml │ │ ├── arcsech.cellml │ │ ├── arcsin.cellml │ │ ├── arcsinh.cellml │ │ ├── arctan.cellml │ │ ├── arctanh.cellml │ │ ├── basic.cellml │ │ ├── built_in_units.cellml │ │ ├── ceiling.cellml │ │ ├── ci.cellml │ │ ├── cn.cellml │ │ ├── complex_units.cellml │ │ ├── constants.cellml │ │ ├── cos.cellml │ │ ├── cosh.cellml │ │ ├── cot.cellml │ │ ├── coth.cellml │ │ ├── csc.cellml │ │ ├── csch.cellml │ │ ├── divide.cellml │ │ ├── eq.cellml │ │ ├── exp.cellml │ │ ├── fabbri_fantini_wilders_severi_human_san_model_2017_with_incompatible_units.cellml │ │ ├── floor.cellml │ │ ├── geq.cellml │ │ ├── gt.cellml │ │ ├── leq.cellml │ │ ├── ln.cellml │ │ ├── log.cellml │ │ ├── lt.cellml │ │ ├── max.cellml │ │ ├── min.cellml │ │ ├── minus.cellml │ │ ├── multipliers.cellml │ │ ├── neq.cellml │ │ ├── not.cellml │ │ ├── or.cellml │ │ ├── piecewise.cellml │ │ ├── plus.cellml │ │ ├── power.cellml │ │ ├── power_values.cellml │ │ ├── rem.cellml │ │ ├── rhs.cellml │ │ ├── root.cellml │ │ ├── sec.cellml │ │ ├── sech.cellml │ │ ├── sin.cellml │ │ ├── sinh.cellml │ │ ├── tan.cellml │ │ ├── tanh.cellml │ │ ├── times.cellml │ │ └── xor.cellml │ ├── unsuitably_constrained.cellml │ └── variable_initialised_twice.cellml ├── annotator │ ├── duplicate_ids.cellml │ ├── invalid_ids_on_every_element.cellml │ ├── lots_of_duplicate_ids.cellml │ ├── no_ids.cellml │ └── unique_ids.cellml ├── cellml1X │ ├── Hodgkin_Huxley_1952_modified.cellml │ ├── annotated_model.cellml │ ├── cardiac_constant_simplified.cellml │ ├── cardiac_constant_simplified_alternative.cellml │ ├── cellml_ns_cn.cellml │ ├── deriv_approx_sin.xml │ ├── non_si_units.cellml │ ├── parabolic_approx_sin.xml │ ├── sin.xml │ ├── sin_approximations.xml │ └── sin_approximations_import.xml ├── complex_encapsulation.xml ├── complex_imports.xml ├── coverage │ ├── analyser.cellml │ ├── cellml1x_import_component.xml │ ├── cellml1x_relationshipref.xml │ ├── cmeta_id_cellml2.xml │ ├── converttodouble.cellml │ ├── converttoint.cellml │ ├── generator │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ ├── model.implementation.out │ │ ├── model.interface.out │ │ ├── model.modified.profile.c │ │ ├── model.modified.profile.h │ │ ├── model.modified.profile.py │ │ ├── model.out │ │ └── model.py │ ├── invalidxmlids.cellml │ └── non_model_root.xml ├── deriv_approx_sin.xml ├── dirty_encapsulated_model.cellml ├── dirty_model.cellml ├── generator │ ├── algebraic_eqn_computed_var_on_rhs │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.external.c │ │ ├── model.external.h │ │ ├── model.external.py │ │ ├── model.h │ │ └── model.py │ ├── algebraic_eqn_const_var_on_rhs │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── algebraic_eqn_constant_on_rhs │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── algebraic_eqn_derivative_on_rhs │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── algebraic_eqn_derivative_on_rhs_one_component │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── algebraic_eqn_state_var_on_rhs │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── algebraic_eqn_state_var_on_rhs_one_component │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── algebraic_eqn_with_one_non_isolated_unknown │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.external.c │ │ ├── model.external.h │ │ ├── model.external.py │ │ ├── model.h │ │ └── model.py │ ├── algebraic_system_with_three_linked_unknowns │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ ├── model.one.external.c │ │ ├── model.one.external.h │ │ ├── model.one.external.py │ │ ├── model.py │ │ ├── model.three.externals.c │ │ ├── model.three.externals.h │ │ ├── model.three.externals.py │ │ ├── model.two.externals.c │ │ ├── model.two.externals.h │ │ └── model.two.externals.py │ ├── algebraic_system_with_various_dependencies │ │ ├── model.not.ordered.c │ │ ├── model.not.ordered.cellml │ │ ├── model.not.ordered.h │ │ ├── model.not.ordered.py │ │ ├── model.ordered.c │ │ ├── model.ordered.cellml │ │ ├── model.ordered.h │ │ └── model.ordered.py │ ├── algebraic_unknown_var_on_rhs │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── cell_geometry_model │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.external.c │ │ ├── model.external.h │ │ ├── model.external.py │ │ ├── model.h │ │ └── model.py │ ├── cellml_mappings_and_encapsulations │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── cellml_slc_example │ │ ├── model.py │ │ ├── slc_model.cellml │ │ ├── slc_model_units_only.cellml │ │ └── units_BG.cellml │ ├── cellml_state_initialised_using_variable │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── cellml_unit_scaling_constant │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── cellml_unit_scaling_rate │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── cellml_unit_scaling_state │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── cellml_unit_scaling_state_initialised_using_constant │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── cellml_unit_scaling_state_initialised_using_variable │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── cellml_unit_scaling_voi_direct │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── cellml_unit_scaling_voi_indirect │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── dae_cellml_1_1_model │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── dependent_eqns │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── fabbri_fantini_wilders_severi_human_san_model_2017 │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── garny_kohl_hunter_boyett_noble_rabbit_san_model_2003 │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── hodgkin_huxley_squid_axon_model_1952 │ │ ├── model.algebraic.c │ │ ├── model.algebraic.h │ │ ├── model.algebraic.py │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.computed.constant.c │ │ ├── model.computed.constant.h │ │ ├── model.computed.constant.py │ │ ├── model.constant.c │ │ ├── model.constant.h │ │ ├── model.constant.py │ │ ├── model.dae.c │ │ ├── model.dae.cellml │ │ ├── model.dae.h │ │ ├── model.dae.py │ │ ├── model.dependent.algebraic.c │ │ ├── model.dependent.algebraic.h │ │ ├── model.dependent.algebraic.py │ │ ├── model.dependent.computed.constant.c │ │ ├── model.dependent.computed.constant.h │ │ ├── model.dependent.computed.constant.py │ │ ├── model.dependent.constant.c │ │ ├── model.dependent.constant.h │ │ ├── model.dependent.constant.py │ │ ├── model.dependent.state.c │ │ ├── model.dependent.state.h │ │ ├── model.dependent.state.py │ │ ├── model.external.c │ │ ├── model.external.h │ │ ├── model.external.py │ │ ├── model.h │ │ ├── model.py │ │ ├── model.state.c │ │ ├── model.state.h │ │ ├── model.state.py │ │ └── model_unknown_vars_on_rhs.cellml │ ├── noble_model_1962 │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── ode_computed_var_on_rhs │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── ode_computed_var_on_rhs_one_component │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── ode_const_var_on_rhs │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── ode_const_var_on_rhs_one_component │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── ode_constant_on_rhs │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── ode_constant_on_rhs_one_component │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── ode_multiple_dependent_odes │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── ode_multiple_dependent_odes_one_component │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── ode_multiple_odes_with_same_name │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── ode_unknown_var_on_rhs │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ ├── robertson_model_1966 │ │ ├── model.dae.c │ │ ├── model.dae.cellml │ │ ├── model.dae.h │ │ ├── model.dae.py │ │ ├── model.ode.c │ │ ├── model.ode.cellml │ │ ├── model.ode.h │ │ └── model.ode.py │ ├── sine_model_imports │ │ ├── model.c │ │ ├── model.h │ │ └── model.py │ ├── unknown_variable_as_external_variable │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py │ └── variable_initialised_using_a_constant │ │ ├── model.c │ │ ├── model.cellml │ │ ├── model.h │ │ └── model.py ├── import-requirements │ ├── complicatedExample.cellml │ ├── importExample1.cellml │ └── importExample2.cellml ├── import_units_model.cellml ├── importedModelWithMaps.cellml ├── importer │ ├── CircularReference.cellml │ ├── CircularReference2.cellml │ ├── HH │ │ ├── LeakageModel.cellml │ │ ├── MembraneModel.cellml │ │ ├── PotassiumChannelModel.cellml │ │ └── SodiumChannelModel.cellml │ ├── HHComplete │ │ ├── GateModel.cellml │ │ ├── LeakageModel.cellml │ │ ├── MembraneModel.cellml │ │ ├── MembraneModelController.cellml │ │ ├── PotassiumChannelModel.cellml │ │ └── SodiumChannelModel.cellml │ ├── ImportCircularReferences.cellml │ ├── NotCircularReference.cellml │ ├── bondgraph │ │ ├── cpp_coupling.cellml │ │ ├── cpp_coupling_modules.cellml │ │ └── cpp_coupling_parameters.cellml │ ├── branchTemplate.cellml │ ├── circularImport_1.cellml │ ├── circularImport_1_duplicated_name.cellml │ ├── circularImport_2.cellml │ ├── circularImport_3.cellml │ ├── circularUnits_1.cellml │ ├── circularUnits_1_duplicated_name.cellml │ ├── circularUnits_2.cellml │ ├── circularUnits_3.cellml │ ├── common_units_import_1.xml │ ├── common_units_import_2.xml │ ├── common_units_import_units.xml │ ├── complexbondgraph │ │ ├── cpp_coupling.cellml │ │ ├── cpp_coupling_modules.cellml │ │ └── cpp_coupling_parameters.cellml │ ├── complicated.cellml │ ├── component_importer.cellml │ ├── component_importer_unresolved.cellml │ ├── component_library.cellml │ ├── component_that_is_invalid.cellml │ ├── components_concrete.cellml │ ├── components_imported.cellml │ ├── components_missing_children.cellml │ ├── components_missing_units.cellml │ ├── components_source.cellml │ ├── diamond.cellml │ ├── diamond_left.cellml │ ├── diamond_point.cellml │ ├── diamond_right.cellml │ ├── forkedImport.cellml │ ├── generic.cellml │ ├── generic_no_source.cellml │ ├── import_invalid_component.cellml │ ├── import_invalid_import_url.cellml │ ├── import_invalid_units.cellml │ ├── import_invalid_xml.cellml │ ├── import_units_that_are_invalid.cellml │ ├── import_units_that_are_not_there.cellml │ ├── import_units_that_have_unknown_children.cellml │ ├── importing_a_component_that_is_invalid.cellml │ ├── importing_a_component_that_is_not_there.cellml │ ├── importing_bad_design_c_shape_import_hierarchy.cellml │ ├── importing_bad_design_z_import_hierarchy.cellml │ ├── importing_bad_design_z_offset_import_hierarchy.cellml │ ├── importing_component_with_imported_units_missing_model.cellml │ ├── importing_component_with_missing_children.cellml │ ├── importing_component_with_missing_units.cellml │ ├── importing_nonexistent_items.cellml │ ├── importing_units_with_child_units_missing_model.cellml │ ├── importing_units_with_missing_children.cellml │ ├── importing_units_with_present_children.cellml │ ├── importing_units_with_unresolved_children.cellml │ ├── invalid_import_url.cellml │ ├── invalid_model.cellml │ ├── layer1 │ │ ├── component_library.cellml │ │ ├── import_from_component_library.cellml │ │ ├── importing_bad_design_z_import_hierarchy.cellml │ │ ├── layer1 │ │ │ └── importing_bad_design_z_import_hierarchy.cellml │ │ ├── layer2 │ │ │ ├── layer3 │ │ │ │ └── model.cellml │ │ │ └── model.cellml │ │ └── model.cellml │ ├── main_referenced_units_missing.cellml │ ├── master1.cellml │ ├── master2.cellml │ ├── master_units.cellml │ ├── master_units_unresolved.cellml │ ├── mediumbondgraph │ │ ├── cpp_coupling.cellml │ │ ├── cpp_coupling_modules.cellml │ │ └── cpp_coupling_parameters.cellml │ ├── missingImport_1.cellml │ ├── model.cellml │ ├── model1.cellml │ ├── model2.cellml │ ├── model_cascaded_units.cellml │ ├── model_with_components_1.cellml │ ├── model_with_components_1_unresolved.cellml │ ├── model_with_components_2.cellml │ ├── nested_components.cellml │ ├── nested_units.cellml │ ├── not_even_proper.xml │ ├── periodicstimulus │ │ ├── components │ │ │ ├── INa.xml │ │ │ ├── stimulated.xml │ │ │ └── units.xml │ │ └── experiments │ │ │ └── periodic-stimulus.xml │ ├── prong.cellml │ ├── referenced_units_missing.cellml │ ├── simple_model.cellml │ ├── simple_model_2.cellml │ ├── simplebondgraph │ │ ├── cpp_coupling.cellml │ │ ├── cpp_coupling_modules.cellml │ │ └── cpp_coupling_parameters.cellml │ ├── source.cellml │ ├── source_units.cellml │ ├── thingsThatGrowOnBranches.cellml │ ├── triangle_units_base.cellml │ ├── triangle_units_opposite.cellml │ ├── triangle_units_opposite_I.cellml │ ├── triangle_units_point.cellml │ ├── triangle_units_point_I.cellml │ ├── trunk.cellml │ ├── units │ │ ├── base_model.cellml │ │ ├── base_model_illdefined.cellml │ │ ├── left_model.cellml │ │ ├── main.cellml │ │ ├── right_model.cellml │ │ └── units_definitions.cellml │ ├── units_children.cellml │ ├── units_concrete.cellml │ ├── units_definition_level_1.cellml │ ├── units_definition_level_1_child.cellml │ ├── units_definition_level_1_unresolved.cellml │ ├── units_imported.cellml │ ├── units_library.cellml │ └── units_source.cellml ├── importingModel.cellml ├── importingModelChildComponent.cellml ├── importingModelParentComponent.cellml ├── invalid_cellml_2.0.xml ├── invalidmathmlelementschildrenorsiblings.cellml ├── level0-broken-imports.xml ├── level0.xml ├── level1-3.xml ├── level1.xml ├── level2.xml ├── mixed │ ├── sin_approximations_import_1X_and_20.xml │ └── sin_approximations_import_20_and_1X.xml ├── modelflattening │ ├── SN_to_cAMP │ │ ├── SN_to_cAMP.cellml │ │ ├── SN_to_cAMP_modules.cellml │ │ ├── SN_to_cAMP_parameters.cellml │ │ └── SN_to_cAMP_units.cellml │ ├── basic_membrane_model.cellml │ ├── basic_sodium_channel.cellml │ ├── circularImport1.cellml │ ├── circularImport1units.cellml │ ├── circularImport2.cellml │ ├── circularImport2units.cellml │ ├── equivalentimportedvariable.xml │ ├── hodgkin_huxley_squid_axon_model_1952 │ │ ├── leakage_current.cellml │ │ ├── model.cellml │ │ ├── potassium_channel.cellml │ │ └── sodium_channel.cellml │ ├── importExample2b.cellml │ ├── importExampleUnits.cellml │ ├── import_for_import_for_importedcomponentusingimportedcomponent.xml │ ├── import_for_importedcomponentswithnameclashes.xml │ ├── import_for_importedcomponentusingimportedcomponent.xml │ ├── import_for_importedunitswithnameclashes.xml │ ├── import_for_repeatedimportofsameunitsviadifferentcomponents.xml │ ├── import_for_unitsdefinedinimportedmodel.xml │ ├── imported_hierarchy_model.cellml │ ├── importedcomponentswithnameclashes.xml │ ├── importedcomponentusingimportedcomponent.xml │ ├── importedunitswithnameclashes.xml │ ├── internalequivalentvariables.xml │ ├── outsidecomponentequivalentvariables.xml │ ├── repeatedimportofsameunitsviadifferentcomponents.xml │ ├── reusable.xml │ ├── reusable2.xml │ ├── reusable3.xml │ ├── unitsdefinedinimportedmodel.xml │ └── user_ex_01 │ │ ├── child.cellml │ │ └── parent.cellml ├── multiplecellmlnamespaces.cellml ├── parabolic_approx_sin.xml ├── printer │ ├── component_with_multiple_math.cellml │ ├── spaced_model.cellml │ └── tabulated_model.cellml ├── requires_imports.cellml ├── sin.xml ├── sine_approximations.xml ├── sine_approximations_import.xml ├── sine_approximations_import_simple.xml ├── units_definitions.cellml └── units_in_cn.cellml ├── test_resources.cmake ├── test_resources.in.h ├── test_template.cmake ├── test_utils.cpp ├── test_utils.h ├── units ├── tests.cmake └── units.cpp ├── valgrindmemcheck.py ├── validator ├── tests.cmake └── validator.cpp ├── variable ├── tests.cmake └── variable.cpp └── version ├── tests.cmake └── version.cpp /.github/workflows/spell-check.yml: -------------------------------------------------------------------------------- 1 | # GitHub Action to automate the identification of common misspellings in text files. 2 | # https://github.com/codespell-project/actions-codespell 3 | # https://github.com/codespell-project/codespell 4 | name: codespell 5 | on: [pull_request] 6 | 7 | permissions: 8 | contents: read 9 | 10 | jobs: 11 | codespell: 12 | if: github.repository == 'cellml/libcellml' 13 | name: Check for spelling errors 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v4 17 | - uses: codespell-project/actions-codespell@v2 18 | with: 19 | check_filenames: true 20 | skip: ./.git,./tests/gtest/include/gtest/gtest.h,./tests/gtest/src/gtest-all.cc,./src/dtds/mathml2/* 21 | exclude_file: .codespellexclude 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X hidden system files 2 | .DS_Store 3 | 4 | # Ignore the build directory 5 | build/ 6 | 7 | # Eclipse project files 8 | .project 9 | .pydevproject 10 | .settings/ 11 | 12 | # Qt Creator generated files 13 | CMakeLists.txt.user 14 | *.autosave 15 | 16 | # PyCharm generated files 17 | .idea/ 18 | 19 | # VS Code system files 20 | .vscode/ 21 | -------------------------------------------------------------------------------- /cmake/FindSphinx.cmake: -------------------------------------------------------------------------------- 1 | 2 | find_program(SPHINX_EXECUTABLE NAMES ${SPHINX_PREFERRED_NAMES} sphinx-build sphinx-build2 3 | HINTS 4 | $ENV{SPHINX_DIR} 5 | PATH_SUFFIXES bin 6 | DOC "Sphinx documentation generator" 7 | ) 8 | 9 | include(FindPackageHandleStandardArgs) 10 | 11 | find_package_handle_standard_args(Sphinx DEFAULT_MSG 12 | SPHINX_EXECUTABLE 13 | ) 14 | 15 | mark_as_advanced(SPHINX_EXECUTABLE) 16 | 17 | -------------------------------------------------------------------------------- /cmake/finalise_python_package.in.cmake: -------------------------------------------------------------------------------- 1 | configure_file(@CMAKE_CURRENT_SOURCE_DIR@/__init__.py ${LIBCELLML_PYTHON_PACKAGE_DIR}/__init__.py) 2 | configure_file(@CMAKE_CURRENT_SOURCE_DIR@/README.rst ${LIBCELLML_PYTHON_PACKAGE_DIR}/../README.rst) 3 | configure_file(@SETUP_PRE_GEN_PY_FILE@ ${LIBCELLML_PYTHON_PACKAGE_DIR}/../setup.py) 4 | -------------------------------------------------------------------------------- /cmake/generateprofilesha1header.cmake: -------------------------------------------------------------------------------- 1 | # Copyright libCellML Contributors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License.cmake_minimum_required (VERSION 3.1) 14 | 15 | include("generatorprofilesha1values.cmake") 16 | configure_file("${CMAKE_CURRENT_LIST_DIR}/../src/configure/generatorprofilesha1values.in.h" "${CMAKE_CURRENT_LIST_DIR}/../src/generatorprofilesha1values.h") 17 | -------------------------------------------------------------------------------- /cmake/libcellml-config.cmake: -------------------------------------------------------------------------------- 1 | @LIBXML2_CONFIG_MODE_INFORMATION@ 2 | include("${CMAKE_CURRENT_LIST_DIR}/libcellml-targets.cmake") 3 | -------------------------------------------------------------------------------- /cmake/macros.cmake: -------------------------------------------------------------------------------- 1 | macro(apply_compiler_cache_settings) 2 | # Use compiler cache. 3 | if(BUILDCACHE_EXE) 4 | set(CMAKE_CXX_COMPILER_LAUNCHER ${BUILDCACHE_EXE}) 5 | elseif(CLCACHE_EXE) 6 | set(CLCACHEWRAPPER ${CMAKE_CURRENT_BINARY_DIR}/clcachewrapper) 7 | execute_process(COMMAND ${CMAKE_C_COMPILER} /O2 /Fe${CLCACHEWRAPPER} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/clcachewrapper.c 8 | RESULT_VARIABLE RESULT OUTPUT_QUIET ERROR_QUIET) 9 | if(RESULT EQUAL 0) 10 | set(CMAKE_CXX_COMPILER_LAUNCHER ${CLCACHEWRAPPER}) 11 | endif() 12 | else() 13 | set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_EXE}) 14 | endif() 15 | 16 | # On Windows, if we are using MSVC then replace some compiler flags. 17 | if(MSVC) 18 | # Replace the /Zi option (i.e. enable debugging information), if present, 19 | # with the /Z7 option (i.e. enable old-style debugging information) 20 | # otherwise caching (be it with buildcache or clcache) won't work. 21 | if(BUILDCACHE_EXE OR CLCACHE_EXE) 22 | replace_compiler_flag("/Zi" "/Z7") 23 | endif() 24 | endif() 25 | endmacro() 26 | -------------------------------------------------------------------------------- /cmake/packaging/distrib/description.txt: -------------------------------------------------------------------------------- 1 | 2 | libCellML Library 3 | ================= 4 | 5 | The libCellML library is a library that supports the creation, modification, printing, parsing, validation, and code generation of CellML 2.0 models. 6 | 7 | -------------------------------------------------------------------------------- /cmake/packaging/distrib/macos/welcome.txt: -------------------------------------------------------------------------------- 1 | This installer will guide you through the installation of libCellML on your machine. It will install the libCellML library and API header files. 2 | 3 | Thanks and enjoy, the libCellML developers. 4 | -------------------------------------------------------------------------------- /cmake/packaging/distrib/windows/libcellml.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/cmake/packaging/distrib/windows/libcellml.ico -------------------------------------------------------------------------------- /cmake/packaging/distrib/windows/libcellml_banner_hori.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/cmake/packaging/distrib/windows/libcellml_banner_hori.bmp -------------------------------------------------------------------------------- /cmake/packaging/distrib/windows/libcellml_banner_vert.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/cmake/packaging/distrib/windows/libcellml_banner_vert.bmp -------------------------------------------------------------------------------- /cmake/python_package_check.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | import sys 3 | 4 | reqs = subprocess.check_output([sys.executable, '-m', 'pip', 'list']) 5 | 6 | output_lines = reqs.splitlines() 7 | # Remove two header lines from pip list output. 8 | output_lines = output_lines[2:] 9 | 10 | installed_packages = [r.decode().split()[0] for r in output_lines] 11 | 12 | check_package = sys.argv[1] 13 | result = 0 if check_package in installed_packages else 1 14 | 15 | sys.exit(result) 16 | -------------------------------------------------------------------------------- /cmake/utils/compress.in.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright libCellML Contributors 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | const char INPUT_FILE[] = "${MATHML_DTD_LOCATION}"; 20 | -------------------------------------------------------------------------------- /docs/changelogs/changelog_v0.3.100.rst: -------------------------------------------------------------------------------- 1 | libCellML v0.3.100 Changelog 2 | ============================ 3 | 4 | Infrastructure 5 | -------------- 6 | 7 | * Fix for the deployment of wheels to PyPI by `@hsorby `_ [`#1020 `_]. 8 | 9 | Miscellaneous 10 | ------------- 11 | 12 | * Make template names consistent by `@hsorby `_ [`#1021 `_]. 13 | 14 | Contributors 15 | ------------ 16 | 17 | .. image:: https://avatars.githubusercontent.com/u/778048?v=4 18 | :target: https://github.com/hsorby 19 | :height: 32 20 | :width: 32 21 | -------------------------------------------------------------------------------- /docs/changelogs/changelog_v0.3.101.rst: -------------------------------------------------------------------------------- 1 | libCellML v0.3.101 Changelog 2 | ============================ 3 | 4 | Infrastructure 5 | -------------- 6 | 7 | * Fixing the manylinux tag name by `@hsorby `_ [`#1029 `_]. 8 | 9 | Contributors 10 | ------------ 11 | 12 | .. image:: https://avatars.githubusercontent.com/u/778048?v=4 13 | :target: https://github.com/hsorby 14 | :height: 32 15 | :width: 32 16 | -------------------------------------------------------------------------------- /docs/changelogs/changelog_v0.3.102.rst: -------------------------------------------------------------------------------- 1 | libCellML v0.3.102 Changelog 2 | ============================ 3 | 4 | Documentation 5 | ------------- 6 | 7 | * Update changelog_v0.3.101.rst by `@hsorby `_ [`#1032 `_]. 8 | 9 | Infrastructure 10 | -------------- 11 | 12 | * Adding support for Python 3.8 macOS wheels by `@hsorby `_ [`#1034 `_]. 13 | 14 | Contributors 15 | ------------ 16 | 17 | .. image:: https://avatars.githubusercontent.com/u/778048?v=4 18 | :target: https://github.com/hsorby 19 | :height: 32 20 | :width: 32 21 | -------------------------------------------------------------------------------- /docs/changelogs/changelog_v0.3.103.rst: -------------------------------------------------------------------------------- 1 | libCellML v0.3.103 Changelog 2 | ============================ 3 | 4 | Bug 5 | --- 6 | 7 | * Fix segfault when printing complete MathML document by `@hsorby `_ [`#1026 `_]. 8 | 9 | Python bindings 10 | --------------- 11 | 12 | * Add more search paths for macOS python bindings by `@hsorby `_ [`#1037 `_]. 13 | 14 | Contributors 15 | ------------ 16 | 17 | .. image:: https://avatars.githubusercontent.com/u/778048?v=4 18 | :target: https://github.com/hsorby 19 | :height: 32 20 | :width: 32 21 | -------------------------------------------------------------------------------- /docs/changelogs/changelog_v0.3.104.rst: -------------------------------------------------------------------------------- 1 | libCellML v0.3.104 Changelog 2 | ============================ 3 | 4 | Python bindings 5 | --------------- 6 | 7 | * Shift to use dynamic lookup for undefined symbols in shared libraries by `@hsorby `_ [`#1040 `_]. 8 | 9 | Contributors 10 | ------------ 11 | 12 | .. image:: https://avatars.githubusercontent.com/u/778048?v=4 13 | :target: https://github.com/hsorby 14 | :height: 32 15 | :width: 32 16 | -------------------------------------------------------------------------------- /docs/changelogs/changelog_v0.6.1.rst: -------------------------------------------------------------------------------- 1 | libCellML v0.6.1 Changelog 2 | ========================== 3 | 4 | Infrastructure 5 | -------------- 6 | 7 | * Fix error with Windows paths in deployment script using GitHub actions by `@hsorby `_ [`#1280 `_]. 8 | * Fix location of permissions flag in deploy-on-release.yml by `@hsorby `_ [`#1277 `_]. 9 | * Add a test to check what type is used in the LibXml2 structuredErrorCallback function by `@hsorby `_ [`#1274 `_]. 10 | * Deploy updates by `@hsorby `_ [`#1273 `_]. 11 | 12 | Contributors 13 | ------------ 14 | 15 | .. image:: https://avatars.githubusercontent.com/u/778048?v=4 16 | :target: https://github.com/hsorby 17 | :height: 32 18 | :width: 32 19 | -------------------------------------------------------------------------------- /docs/changelogs/changelog_v0.6.2.rst: -------------------------------------------------------------------------------- 1 | libCellML v0.6.2 Changelog 2 | ========================== 3 | 4 | Infrastructure 5 | -------------- 6 | 7 | * Fix publishing of PyPI wheels by `@hsorby `_ [`#1284 `_]. 8 | 9 | Contributors 10 | ------------ 11 | 12 | .. image:: https://avatars.githubusercontent.com/u/778048?v=4 13 | :target: https://github.com/hsorby 14 | :height: 32 15 | :width: 32 16 | -------------------------------------------------------------------------------- /docs/changelogs/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Changelogs 3 | ========== 4 | 5 | .. toctree:: 6 | 7 | changelog_v0.6.3 8 | changelog_v0.6.2 9 | changelog_v0.6.1 10 | changelog_v0.6.0 11 | changelog_v0.5.0 12 | changelog_v0.4.0 13 | changelog_v0.3.104 14 | changelog_v0.3.103 15 | changelog_v0.3.102 16 | changelog_v0.3.101 17 | changelog_v0.3.100 18 | changelog_v0.3.99 19 | changelog_v0.2.0 20 | changelog_v0.1.0 21 | 22 | -------------------------------------------------------------------------------- /docs/coverage_statistics.rst: -------------------------------------------------------------------------------- 1 | .. _coverage_statistics: 2 | 3 | =================== 4 | Coverage Statistics 5 | =================== 6 | 7 | **TODO** 8 | The output from the coverage testing using gcov is available TODO. 9 | 10 | .. note:: 11 | 12 | The coverage test sometimes (this behaviour has been observed on macOS using Clang) reports single lines containing only a closing curly brace as not covered. 13 | This is currently being treated as a false positive. 14 | This can be seen in the 'Missing' column of the test report where only single lines are reported. 15 | For the case discussed here, the reported line should only contain a single closing curly brace. 16 | In this situation, we will accept the missed coverage report. 17 | -------------------------------------------------------------------------------- /docs/images/abi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/abi.png -------------------------------------------------------------------------------- /docs/images/libCellMLBuilding-CMakeGUISourceBuildDirs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/libCellMLBuilding-CMakeGUISourceBuildDirs.png -------------------------------------------------------------------------------- /docs/images/libCellMLBuilding-CMakeOptionsInRed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/libCellMLBuilding-CMakeOptionsInRed.png -------------------------------------------------------------------------------- /docs/images/libCellMLBuilding-CMakeWindowsConfigurationError.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/libCellMLBuilding-CMakeWindowsConfigurationError.png -------------------------------------------------------------------------------- /docs/images/libCellMLBuilding-CMakeWindowsLibXml2DIRNotFound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/libCellMLBuilding-CMakeWindowsLibXml2DIRNotFound.png -------------------------------------------------------------------------------- /docs/images/libCellMLBuilding-CMakeWindowsLibXml2DirSet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/libCellMLBuilding-CMakeWindowsLibXml2DirSet.png -------------------------------------------------------------------------------- /docs/images/libCellMLBuilding-PolicyCMP0086Error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/libCellMLBuilding-PolicyCMP0086Error.png -------------------------------------------------------------------------------- /docs/images/libCellMLBuilding-PythonDebugLibrary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/libCellMLBuilding-PythonDebugLibrary.png -------------------------------------------------------------------------------- /docs/images/libCellMLBuilding-WindowsRunAsAdmin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/libCellMLBuilding-WindowsRunAsAdmin.png -------------------------------------------------------------------------------- /docs/images/libCellMLBuilding-dllNotFound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/libCellMLBuilding-dllNotFound.png -------------------------------------------------------------------------------- /docs/images/libCellMLProcesses-DevelopmentProcess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/libCellMLProcesses-DevelopmentProcess.png -------------------------------------------------------------------------------- /docs/images/libCellMLProcesses-GitBranching.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/libCellMLProcesses-GitBranching.png -------------------------------------------------------------------------------- /docs/images/libCellMLProcesses-GitHubForkButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/libCellMLProcesses-GitHubForkButton.png -------------------------------------------------------------------------------- /docs/images/libCellMLProcesses-GitHubRepos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/libCellMLProcesses-GitHubRepos.png -------------------------------------------------------------------------------- /docs/images/libCellMLRoughObjectModel-Entities.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/libCellMLRoughObjectModel-Entities.png -------------------------------------------------------------------------------- /docs/images/libCellMLRoughObjectModel-IOError.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/libCellMLRoughObjectModel-IOError.png -------------------------------------------------------------------------------- /docs/images/libCellMLRoughObjectModel-Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/libCellMLRoughObjectModel-Overview.png -------------------------------------------------------------------------------- /docs/images/release_process/create_release_builder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/release_process/create_release_builder.png -------------------------------------------------------------------------------- /docs/images/release_process/create_release_builder_interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/release_process/create_release_builder_interface.png -------------------------------------------------------------------------------- /docs/images/release_process/end_to_end_database_tag_chooser_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/release_process/end_to_end_database_tag_chooser_example.png -------------------------------------------------------------------------------- /docs/images/release_process/end_to_end_framework_tag_chooser_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/release_process/end_to_end_framework_tag_chooser_example.png -------------------------------------------------------------------------------- /docs/images/release_process/finalise_release_builder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/release_process/finalise_release_builder.png -------------------------------------------------------------------------------- /docs/images/release_process/finalise_release_builder_interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/release_process/finalise_release_builder_interface.png -------------------------------------------------------------------------------- /docs/images/release_process/prepare_release_builder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/release_process/prepare_release_builder.png -------------------------------------------------------------------------------- /docs/images/release_process/prepare_release_builder_interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/release_process/prepare_release_builder_interface.png -------------------------------------------------------------------------------- /docs/images/release_process/release_branch_chooser_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/release_process/release_branch_chooser_example.png -------------------------------------------------------------------------------- /docs/images/release_process/set_version_builder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/release_process/set_version_builder.png -------------------------------------------------------------------------------- /docs/images/release_process/set_version_builder_interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/release_process/set_version_builder_interface.png -------------------------------------------------------------------------------- /docs/images/vpr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/docs/images/vpr.png -------------------------------------------------------------------------------- /docs/mainpage.dox: -------------------------------------------------------------------------------- 1 | 2 | /// @mainpage libCellML 3 | 4 | libCellML Code Documentation 5 | ============================ 6 | 7 | This is the documentation for the source code. 8 | 9 | -------------------------------------------------------------------------------- /docs/masters/readme.txt: -------------------------------------------------------------------------------- 1 | libCellMLProcesses.vdx is edited using https://www.lucidchart.com/. 2 | -------------------------------------------------------------------------------- /docs/object_model.rst: -------------------------------------------------------------------------------- 1 | .. _libCellMLObjectModel: 2 | 3 | ====================== 4 | libCellML Object Model 5 | ====================== 6 | 7 | Introduction 8 | ============ 9 | 10 | The object model described by this document is a very high level conceptual design. 11 | This document is organic and is expected to change in accordance with community decisions/discussion. 12 | 13 | Overview of Object Model 14 | ======================== 15 | 16 | .. figure:: ./images/libCellMLRoughObjectModel-Overview.png 17 | :alt: libCellML Overview Object Model. 18 | :name: overview_of_libcellml_objects 19 | 20 | Showing the inheritance structure between libCellML items within the model. 21 | 22 | Detailed 23 | ======== 24 | 25 | .. figure:: ./images/libCellMLRoughObjectModel-Entities.png 26 | :alt: libCellML Object Model. 27 | 28 | .. figure:: ./images/libCellMLRoughObjectModel-IOError.png 29 | :alt: libCellML Object Model. 30 | -------------------------------------------------------------------------------- /docs/theme/static/theme.css: -------------------------------------------------------------------------------- 1 | @import url("alabaster.css"); 2 | 3 | div.figure a.image-reference { 4 | border: none; 5 | } 6 | -------------------------------------------------------------------------------- /docs/theme/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = alabaster 3 | stylesheet = theme.css 4 | -------------------------------------------------------------------------------- /docs/versions.rst: -------------------------------------------------------------------------------- 1 | .. _versions: 2 | 3 | ===================================== 4 | Dependency versions and compatibility 5 | ===================================== 6 | 7 | This document outlines the versions of packages which libCellML requires. 8 | 9 | **TODO** 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/api/libcellml/undefines.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright libCellML Contributors 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Note that: 18 | // 1) this header file MUST NOT start with #pragma once; and that 19 | // 2) this header file MUST be included LAST by a .cpp/.h file. 20 | // 21 | // This ensures that TRUE, FALSE, and NAN can be safely used in AnalyserEquationAst::Type. 22 | 23 | #ifdef TRUE 24 | # undef TRUE 25 | #endif 26 | 27 | #ifdef FALSE 28 | # undef FALSE 29 | #endif 30 | 31 | #ifdef NAN 32 | # undef NAN 33 | #endif 34 | -------------------------------------------------------------------------------- /src/bindings/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright libCellML Contributors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | if(LIBCELLML_BINDINGS_PYTHON) # Or any other bindings that use SWIG. 16 | include(${SWIG_USE_FILE}) 17 | endif() 18 | 19 | if(LIBCELLML_BINDINGS_PYTHON) 20 | if(NOT LIBCELLML_BUILD_SHARED) 21 | message(WARNING "It is **not** recommended to build the Python bindings with static libraries.") 22 | endif() 23 | add_subdirectory(python) 24 | endif() 25 | 26 | if (EMSCRIPTEN) 27 | add_subdirectory(javascript) 28 | endif () 29 | -------------------------------------------------------------------------------- /src/bindings/interface/entity.i: -------------------------------------------------------------------------------- 1 | %module(package="libcellml") entity 2 | 3 | #define LIBCELLML_EXPORT 4 | 5 | %include 6 | 7 | %import "types.i" 8 | 9 | %feature("docstring") libcellml::Entity 10 | "Abstract base class for all libCellML core classes." 11 | 12 | %feature("docstring") libcellml::Entity::id 13 | "Returns the `id` document identifier for this entity, or an empty string if 14 | not set."; 15 | 16 | %feature("docstring") libcellml::Entity::setId 17 | "Sets the `id` document identifier for this entity."; 18 | 19 | %feature("docstring") libcellml::Entity::removeId 20 | "Removes the `id` document identifier set for this entity."; 21 | 22 | %{ 23 | #include "libcellml/entity.h" 24 | %} 25 | 26 | %pythoncode %{ 27 | # libCellML generated wrapper code starts here. 28 | %} 29 | 30 | %ignore libcellml::Entity::Entity(); 31 | 32 | %include "libcellml/entity.h" 33 | -------------------------------------------------------------------------------- /src/bindings/interface/namedentity.i: -------------------------------------------------------------------------------- 1 | %module(package="libcellml") namedentity 2 | 3 | #define LIBCELLML_EXPORT 4 | 5 | %import "parentedentity.i" 6 | %import "types.i" 7 | 8 | %feature("docstring") libcellml::NamedEntity 9 | "Abstract base class for all nameable libCellML classes."; 10 | 11 | %feature("docstring") libcellml::NamedEntity::name 12 | "Returns this entity's name (empty string if not set)."; 13 | 14 | %feature("docstring") libcellml::NamedEntity::setName 15 | "Sets this entity's name (empty string to unset)."; 16 | 17 | %feature("docstring") libcellml::NamedEntity::removeName 18 | "Remove this entity's name."; 19 | 20 | %{ 21 | #include "libcellml/namedentity.h" 22 | %} 23 | 24 | %pythoncode %{ 25 | # libCellML generated wrapper code starts here. 26 | %} 27 | 28 | %ignore libcellml::NamedEntity::NamedEntity(); 29 | 30 | %include "libcellml/namedentity.h" 31 | -------------------------------------------------------------------------------- /src/bindings/interface/parser.i: -------------------------------------------------------------------------------- 1 | %module(package="libcellml") parser 2 | 3 | #define LIBCELLML_EXPORT 4 | 5 | %include 6 | 7 | %import "createconstructor.i" 8 | %import "logger.i" 9 | %import "strict.i" 10 | %import "types.i" 11 | 12 | %feature("docstring") libcellml::Parser 13 | "Can parse Models encoded as XML strings."; 14 | 15 | %feature("docstring") libcellml::Parser::parseModel 16 | "Parses a string and returns a :class:`Model`."; 17 | 18 | %{ 19 | #include "libcellml/parser.h" 20 | %} 21 | 22 | %pythoncode %{ 23 | # libCellML generated wrapper code starts here. 24 | %} 25 | 26 | %create_constructor(Parser) 27 | %extend libcellml::Parser { 28 | Parser(bool strict) { 29 | auto ptr = new std::shared_ptr< libcellml::Parser >(libcellml::Parser::create(strict)); 30 | return reinterpret_cast(ptr); 31 | } 32 | } 33 | 34 | %include "libcellml/parser.h" 35 | -------------------------------------------------------------------------------- /src/bindings/interface/printer.i: -------------------------------------------------------------------------------- 1 | %module(package="libcellml") printer 2 | 3 | #define LIBCELLML_EXPORT 4 | 5 | %include 6 | 7 | %import "createconstructor.i" 8 | %import "logger.i" 9 | %import "types.i" 10 | 11 | %feature("docstring") libcellml::Printer 12 | "Prints CellML models to an XML string."; 13 | 14 | %feature("docstring") libcellml::Printer::printModel 15 | "Serialises the given :class:`Model` to an XML string."; 16 | 17 | %{ 18 | #include "libcellml/printer.h" 19 | %} 20 | 21 | %pythoncode %{ 22 | # libCellML generated wrapper code starts here. 23 | %} 24 | 25 | %create_constructor(Printer) 26 | 27 | %include "libcellml/printer.h" 28 | -------------------------------------------------------------------------------- /src/bindings/interface/strict.i: -------------------------------------------------------------------------------- 1 | %module(package="libcellml") strict 2 | 3 | #define LIBCELLML_EXPORT 4 | 5 | %import "types.i" 6 | 7 | %feature("docstring") libcellml::Strict 8 | "Abstract base class for entities that can be strict."; 9 | 10 | %feature("docstring") libcellml::Strict::isStrict 11 | "Returns True if the entity is strict, else False."; 12 | 13 | %feature("docstring") libcellml::Strict::setStrict 14 | "Set the entity as strict or not strict."; 15 | 16 | %{ 17 | #include "libcellml/types.h" 18 | #include "libcellml/strict.h" 19 | %} 20 | 21 | %pythoncode %{ 22 | # libCellML generated wrapper code starts here. 23 | %} 24 | 25 | %ignore libcellml::Strict::Strict(); 26 | 27 | %include "libcellml/strict.h" 28 | -------------------------------------------------------------------------------- /src/bindings/interface/validator.i: -------------------------------------------------------------------------------- 1 | %module(package="libcellml") validator 2 | 3 | #define LIBCELLML_EXPORT 4 | 5 | %import "createconstructor.i" 6 | %import "logger.i" 7 | %import "types.i" 8 | 9 | %feature("docstring") libcellml::Validator 10 | "Validates CellML objects."; 11 | 12 | %feature("docstring") libcellml::Validator::validateModel 13 | "Validate the given `model` and its encapsulated entities using the CellML 2.0 14 | Specification. Any errors will be logged in the `Validator`."; 15 | 16 | %{ 17 | #include "libcellml/validator.h" 18 | %} 19 | 20 | %pythoncode %{ 21 | # libCellML generated wrapper code starts here. 22 | %} 23 | 24 | %create_constructor(Validator) 25 | 26 | %include "libcellml/types.h" 27 | %include "libcellml/validator.h" 28 | -------------------------------------------------------------------------------- /src/bindings/interface/version.i: -------------------------------------------------------------------------------- 1 | %module(package="libcellml") version 2 | 3 | #define LIBCELLML_EXPORT 4 | 5 | %include 6 | 7 | %feature("docstring") libcellml::version 8 | "Returns the version of the library as a number."; 9 | 10 | %feature("docstring") libcellml::versionString 11 | "Returns the libcellml version string. 12 | 13 | The version string is in the format x.y.z, where the '.'s are literal, and x, y 14 | and z represent counting numbers, in which case x is the major version, y the 15 | minor version, and z the patch level."; 16 | 17 | %{ 18 | #include "libcellml/version.h" 19 | %} 20 | 21 | %pythoncode %{ 22 | # libCellML generated wrapper code starts here. 23 | %} 24 | 25 | %include "libcellml/version.h" 26 | -------------------------------------------------------------------------------- /src/bindings/javascript/.npmrc: -------------------------------------------------------------------------------- 1 | //registry.npmjs.org/:_authToken=${NPM_TOKEN} 2 | -------------------------------------------------------------------------------- /src/bindings/javascript/printer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright libCellML Contributors 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | #include "libcellml/printer.h" 20 | 21 | using namespace emscripten; 22 | 23 | EMSCRIPTEN_BINDINGS(libcellml_printer) { 24 | 25 | class_("Printer") 26 | .smart_ptr_constructor("Printer", &libcellml::Printer::create) 27 | .function("printModel", &libcellml::Printer::printModel) 28 | ; 29 | } 30 | -------------------------------------------------------------------------------- /src/bindings/javascript/strict.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright libCellML Contributors 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | #include "libcellml/importedentity.h" 20 | 21 | using namespace emscripten; 22 | 23 | EMSCRIPTEN_BINDINGS(libcellml_strict) { 24 | 25 | class_("Strict") 26 | .function("isStrict", &libcellml::Strict::isStrict) 27 | .function("setStrict", &libcellml::Strict::setStrict) 28 | ; 29 | } 30 | -------------------------------------------------------------------------------- /src/bindings/javascript/strict.impl: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright libCellML Contributors 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | bool isStrict() const 18 | { 19 | return Strict::isStrict(); 20 | } 21 | 22 | void setStrict(bool strict) 23 | { 24 | Strict::setStrict(strict); 25 | } 26 | 27 | -------------------------------------------------------------------------------- /src/bindings/javascript/validator.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright libCellML Contributors 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | #include "libcellml/validator.h" 20 | 21 | using namespace emscripten; 22 | 23 | EMSCRIPTEN_BINDINGS(libcellml_validator) { 24 | 25 | class_>("Validator") 26 | .smart_ptr_constructor("Validator", &libcellml::Validator::create) 27 | .function("validateModel", &libcellml::Validator::validateModel) 28 | ; 29 | } 30 | -------------------------------------------------------------------------------- /src/bindings/javascript/version.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright libCellML Contributors 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | #include "libcellml/version.h" 20 | 21 | using namespace emscripten; 22 | 23 | EMSCRIPTEN_BINDINGS(libcellml_version) { 24 | function("versionString", &libcellml::versionString); 25 | function("version", &libcellml::version); 26 | } 27 | -------------------------------------------------------------------------------- /src/bindings/javascript/vue-app-with-libcellml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/src/bindings/javascript/vue-app-with-libcellml.png -------------------------------------------------------------------------------- /src/bindings/python/README.rst: -------------------------------------------------------------------------------- 1 | libCellML Python Package 2 | ======================== 3 | 4 | libCellML is a library for the creation, printing, parsing, and manipulation of CellML 2.0 models. 5 | 6 | Visit https://libcellml.org for help on getting started. 7 | -------------------------------------------------------------------------------- /src/bindings/python/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = [ 3 | 'setuptools', 4 | 'wheel', 5 | 'scikit-build>=0.12', 6 | 'cmake', 7 | 'ninja', 8 | ] 9 | build-backend = 'setuptools.build_meta' 10 | 11 | -------------------------------------------------------------------------------- /src/bindings/python/wheel_dependencies/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project(prepare_dependencies) 4 | 5 | #include(FetchContent) 6 | include(ExternalProject) 7 | 8 | ExternalProject_Add(zlib_library 9 | GIT_REPOSITORY "https://github.com/OpenCMISS-Dependencies/zlib" 10 | GIT_TAG "9f3d4d3" 11 | CMAKE_GENERATOR Ninja 12 | CMAKE_ARGS -DBUILD_SHARED_LIBS=FALSE -DCMAKE_BUILD_TYPE=Release 13 | ) 14 | 15 | set(ZLIB_DIR_DEFINE "-DZLIB_DIR=C:/Program Files (x86)/ZLIB/ZLIB-1.2.3/CMake/") 16 | ExternalProject_Add(libxml2_library 17 | GIT_REPOSITORY "https://github.com/OpenCMISS-Dependencies/libxml2" 18 | GIT_TAG "ba37145" 19 | CMAKE_GENERATOR Ninja 20 | CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release \\"-DZLIB_DIR=C:/Program Files (x86)/ZLIB/ZLIB-1.2.3/CMake/\\" -DBUILD_SHARED_LIBS=OFF -DLIBXML2_WITH_ICONV=OFF -DLIBXML2_WITH_LZMA=OFF -DLIBXML2_WITH_PYTHON=OFF -DLIBXML2_WITH_TESTS=OFF -DLIBXML2_WITH_PROGRAMS=OFF 21 | DEPENDS zlib_library 22 | ) 23 | 24 | -------------------------------------------------------------------------------- /src/configure/mathmldtd.in.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright libCellML Contributors 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "mathmldtd.h" 18 | 19 | #include 20 | 21 | namespace libcellml { 22 | 23 | static const std::array COMPRESSED_MATHML_DTD = ${COMPRESSED_MATHML_DTD_DATA}; 24 | 25 | const unsigned char *compressedMathMLDTD() 26 | { 27 | return &COMPRESSED_MATHML_DTD[0]; 28 | } 29 | 30 | } // namespace libcellml 31 | -------------------------------------------------------------------------------- /src/configure/mathmldtd.in.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright libCellML Contributors 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | namespace libcellml { 22 | 23 | static const size_t MATHML_DTD_LEN = ${MATHML_DTD_LEN}; 24 | static const size_t COMPRESSED_MATHML_DTD_LEN = ${COMPRESSED_MATHML_DTD_LEN}; 25 | 26 | const unsigned char *compressedMathMLDTD(); 27 | 28 | } // namespace libcellml 29 | -------------------------------------------------------------------------------- /src/entity_p.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright libCellML Contributors 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include "libcellml/entity.h" 20 | 21 | namespace libcellml { 22 | 23 | /** 24 | * @brief The Entity::EntityImpl class. 25 | * 26 | * The private implementation for the Entity class. 27 | */ 28 | class Entity::EntityImpl 29 | { 30 | public: 31 | std::string mId; /**< String document identifier for this entity. */ 32 | }; 33 | 34 | } // namespace libcellml 35 | -------------------------------------------------------------------------------- /src/mathmldtd.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright libCellML Contributors 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace libcellml { 23 | 24 | static const size_t MATHML_DTD_LEN = 391336; 25 | static const size_t COMPRESSED_MATHML_DTD_LEN = 67752; 26 | 27 | const unsigned char *compressedMathMLDTD(); 28 | 29 | } // namespace libcellml 30 | -------------------------------------------------------------------------------- /src/version.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright libCellML Contributors 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #include "libcellml/version.h" 18 | 19 | #include 20 | 21 | #include "versionconfig.h" 22 | 23 | namespace libcellml { 24 | 25 | unsigned int version() 26 | { 27 | return LIBCELLML_LIBRARY_VERSION; 28 | } 29 | 30 | std::string versionString() 31 | { 32 | return LIBCELLML_LIBRARY_VERSION_STRING; 33 | } 34 | 35 | } // namespace libcellml 36 | -------------------------------------------------------------------------------- /tests/analyser/tests.cmake: -------------------------------------------------------------------------------- 1 | set(CURRENT_TEST analyser) 2 | set(${CURRENT_TEST}_CATEGORY utils) 3 | 4 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 5 | 6 | set(${CURRENT_TEST}_SRCS 7 | ${CMAKE_CURRENT_LIST_DIR}/analyser.cpp 8 | ${CMAKE_CURRENT_LIST_DIR}/analyserexternalvariable.cpp 9 | ${CMAKE_CURRENT_LIST_DIR}/analyserunits.cpp 10 | ) 11 | -------------------------------------------------------------------------------- /tests/annotator/tests.cmake: -------------------------------------------------------------------------------- 1 | # Set the test name, 'test_' will be prepended to the 2 | # name set here 3 | set(CURRENT_TEST annotator) 4 | # Set a category name to enable running commands like: 5 | # ctest -R 6 | # which will run the tests matching this category-label. 7 | # Can be left empty (or just not set) 8 | set(${CURRENT_TEST}_CATEGORY utils) 9 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 10 | # Using absolute path relative to this file 11 | set(${CURRENT_TEST}_SRCS 12 | ${CMAKE_CURRENT_LIST_DIR}/annotator.cpp 13 | ) 14 | #set(${CURRENT_TEST}_HDRS 15 | # ${CMAKE_CURRENT_LIST_DIR}/ 16 | #) 17 | -------------------------------------------------------------------------------- /tests/api_headers/api_header_test.in.cmake: -------------------------------------------------------------------------------- 1 | 2 | add_executable(${CURRENT_TEST} ${TEST_SRC}) 3 | target_link_libraries(${CURRENT_TEST} cellml gtest_main) 4 | 5 | set_target_properties(${CURRENT_TEST} PROPERTIES 6 | CXX_STANDARD 11 7 | CXX_STANDARD_REQUIRED ON 8 | FOLDER tests) 9 | 10 | add_test(NAME api_header_inclusion_${CURRENT_TEST} COMMAND ${CURRENT_TEST}) 11 | 12 | if(MSVC) 13 | # The libxml2 DLL and zlib DLL must be on the path otherwise the tests will not be able to run. 14 | set_tests_properties(api_header_inclusion_${CURRENT_TEST} 15 | PROPERTIES ENVIRONMENT "PATH=$\;$${GEN_EXP_XML2_TARGET_FILE_DIR}${GEN_EXP_ZLIB_TARGET_FILE_DIR}") 16 | endif() 17 | 18 | list(APPEND TEST_LIST ${CURRENT_TEST}) 19 | -------------------------------------------------------------------------------- /tests/api_headers/api_header_test.in.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | Copyright libCellML Contributors 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | 18 | #include 19 | 20 | #include "gtest/gtest.h" 21 | 22 | /* 23 | * Generated test to ensure header files can be included independently. 24 | */ 25 | TEST(APIHeader, @TEST_HEADER_NAME@) 26 | { 27 | EXPECT_TRUE(size_t(4) == size_t(4)); 28 | } 29 | 30 | -------------------------------------------------------------------------------- /tests/api_headers/tests.cmake: -------------------------------------------------------------------------------- 1 | foreach(_API_HEADER_FILE ${API_HEADER_FILES}) 2 | get_filename_component(TEST_HEADER_NAME ${_API_HEADER_FILE} NAME_WE) 3 | get_filename_component(TEST_HEADER ${_API_HEADER_FILE} NAME) 4 | set(CURRENT_TEST test_api_headers_${TEST_HEADER_NAME}) 5 | 6 | set(TEST_SRC ${CMAKE_CURRENT_BINARY_DIR}/api_headers/api_header_${TEST_HEADER_NAME}.cpp) 7 | set(TEST_CMAKE_FILE ${CMAKE_CURRENT_BINARY_DIR}/api_headers/api_header_${TEST_HEADER_NAME}.cmake) 8 | configure_file(api_headers/api_header_test.in.cpp ${TEST_SRC}) 9 | configure_file(api_headers/api_header_test.in.cmake ${TEST_CMAKE_FILE}) 10 | include(${TEST_CMAKE_FILE}) 11 | endforeach() 12 | -------------------------------------------------------------------------------- /tests/bindings/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright libCellML Contributors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | if(LIBCELLML_BINDINGS_PYTHON) 16 | add_subdirectory(python) 17 | endif() 18 | -------------------------------------------------------------------------------- /tests/bindings/javascript/enums.test.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright libCellML Contributors 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | const loadLibCellML = require('libcellml.js/libcellml.common') 18 | 19 | let libcellml = null 20 | 21 | describe("Enums tests", () => { 22 | beforeAll(async () => { 23 | libcellml = await loadLibCellML() 24 | }); 25 | test("Checking cellmlElementTypeAsString.", () => { 26 | expect(libcellml.cellmlElementTypeAsString(libcellml.CellmlElementType.ENCAPSULATION)).toBe("encapsulation") 27 | }) 28 | }) 29 | -------------------------------------------------------------------------------- /tests/bindings/javascript/issue.test.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright libCellML Contributors 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | -------------------------------------------------------------------------------- /tests/bindings/javascript/version.test.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright libCellML Contributors 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | const libCellMLModule = require('libcellml.js/libcellml.common') 18 | let libcellml = null 19 | 20 | describe("Version tests", () => { 21 | beforeAll(async () => { 22 | libcellml = await libCellMLModule(); 23 | }); 24 | test('Checking version string.', () => { 25 | expect(libcellml.versionString()).toBe('0.6.3'); 26 | }); 27 | }) 28 | -------------------------------------------------------------------------------- /tests/bindings/python/requirements.txt: -------------------------------------------------------------------------------- 1 | 2 | exclude-until-coverage-plugin 3 | 4 | -------------------------------------------------------------------------------- /tests/bindings/python/runner.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import unittest 4 | 5 | import coverage 6 | 7 | args = sys.argv[:] 8 | args.pop(0) # Remove program name. 9 | 10 | configuration = "" 11 | if len(args): 12 | configuration = args.pop(0) 13 | 14 | arg1 = "" 15 | if len(args): 16 | arg1 = args.pop(0) 17 | 18 | cov = coverage.Coverage(source=["libcellml"]) 19 | cov.set_option("run:plugins", ["exclude_until_coverage_plugin"]) 20 | cov.set_option("exclude_until_coverage_plugin:marker", "# libCellML generated wrapper code starts here.") 21 | 22 | os.chdir(os.path.join("@PYTHON_COVERAGE_WORKING_DIRECTORY@", configuration)) 23 | 24 | cov.start() 25 | 26 | suite = unittest.TestLoader().discover("@CMAKE_CURRENT_BINARY_DIR@") 27 | unittest.TextTestRunner(verbosity=1).run(suite) 28 | 29 | cov.stop() 30 | cov.save() 31 | 32 | if arg1 == "html": 33 | cov.html_report(directory='coverage_report') 34 | else: 35 | cov.report() 36 | -------------------------------------------------------------------------------- /tests/bindings/python/test_analyser_equation_ast.py: -------------------------------------------------------------------------------- 1 | # 2 | # Tests the AnalyserEquationAst class bindings 3 | # 4 | import unittest 5 | 6 | 7 | class AnalyserEquationAstTestCase(unittest.TestCase): 8 | 9 | def test_create_destroy(self): 10 | from libcellml import AnalyserEquationAst 11 | 12 | x = AnalyserEquationAst() 13 | del x 14 | 15 | def test_analyser_equation_ast(self): 16 | from libcellml import AnalyserEquationAst 17 | 18 | # Create an equation AST and check its default settings. 19 | ast = AnalyserEquationAst() 20 | self.assertEqual(AnalyserEquationAst.Type.EQUALITY, ast.type()) 21 | self.assertEqual('', ast.value()) 22 | self.assertIsNone(ast.variable()) 23 | self.assertIsNone(ast.parent()) 24 | self.assertIsNone(ast.leftChild()) 25 | self.assertIsNone(ast.rightChild()) 26 | 27 | 28 | if __name__ == '__main__': 29 | unittest.main() 30 | -------------------------------------------------------------------------------- /tests/bindings/python/test_import_requirement.py: -------------------------------------------------------------------------------- 1 | # 2 | # Tests for the ImportRequirement class. 3 | # 4 | import unittest 5 | 6 | from test_resources import file_contents 7 | 8 | 9 | class ImportRequirementTestCase(unittest.TestCase): 10 | 11 | def test_requirements(self): 12 | from libcellml import Parser, Importer 13 | keys = [ 14 | 'complicatedComponents.cellml', 15 | 'complicatedUnits.cellml', 16 | ] 17 | 18 | parser = Parser() 19 | model = parser.parseModel(file_contents('import-requirements/complicatedExample.cellml')) 20 | self.assertEqual(0, parser.issueCount()) 21 | 22 | requirements = model.importRequirements() 23 | 24 | i = 0 25 | for r in requirements: 26 | self.assertEqual(keys[i], r) 27 | i += 1 28 | 29 | 30 | if __name__ == '__main__': 31 | unittest.main() 32 | -------------------------------------------------------------------------------- /tests/bindings/python/test_printer.py: -------------------------------------------------------------------------------- 1 | # 2 | # Tests the Printer class bindings 3 | # 4 | import unittest 5 | 6 | 7 | class PrinterTestCase(unittest.TestCase): 8 | 9 | def test_create_destroy(self): 10 | from libcellml import Printer 11 | 12 | x = Printer() 13 | del x 14 | 15 | def test_print_model(self): 16 | from libcellml import Printer, Model 17 | 18 | # std::string printModel(ModelPtr model) 19 | p = Printer() 20 | self.assertIsInstance(p.printModel(Model()), str) 21 | 22 | 23 | if __name__ == '__main__': 24 | unittest.main() 25 | -------------------------------------------------------------------------------- /tests/bindings/python/test_resources.cmake: -------------------------------------------------------------------------------- 1 | 2 | configure_file(test_resources.in.py test_resources.py) 3 | -------------------------------------------------------------------------------- /tests/bindings/python/test_resources.in.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | TESTS_RESOURCE_LOCATION = "${TESTS_RESOURCE_LOCATION}" 4 | 5 | 6 | def resource_path(relative_path=''): 7 | return TESTS_RESOURCE_LOCATION + '/' + relative_path 8 | 9 | 10 | def file_contents(file_name): 11 | with open(os.path.join(TESTS_RESOURCE_LOCATION, file_name)) as f: 12 | content = f.read() 13 | 14 | return content 15 | -------------------------------------------------------------------------------- /tests/bindings/python/test_validator.py: -------------------------------------------------------------------------------- 1 | # 2 | # Tests the Validator class bindings 3 | # 4 | import unittest 5 | 6 | 7 | class ValidatorTestCase(unittest.TestCase): 8 | 9 | def test_create_destroy(self): 10 | from libcellml import Validator 11 | 12 | x = Validator() 13 | del x 14 | 15 | def test_inheritance(self): 16 | import libcellml 17 | from libcellml import Validator 18 | 19 | # Test inheritance 20 | x = Validator() 21 | self.assertIsInstance(x, libcellml.logger.Logger) 22 | 23 | # Test access to inherited methods 24 | self.assertIsNone(x.issue(0)) 25 | self.assertIsNone(x.issue(-1)) 26 | self.assertEqual(x.issueCount(), 0) 27 | 28 | def test_validate_model(self): 29 | import libcellml 30 | from libcellml import Validator 31 | 32 | # void validateModel(const ModelPtr &model) 33 | v = Validator() 34 | v.validateModel(libcellml.Model()) 35 | 36 | 37 | if __name__ == '__main__': 38 | unittest.main() 39 | -------------------------------------------------------------------------------- /tests/bindings/python/test_version.py: -------------------------------------------------------------------------------- 1 | # 2 | # Tests the version function bindings 3 | # 4 | import unittest 5 | 6 | 7 | class VersionTestCase(unittest.TestCase): 8 | 9 | def test_version(self): 10 | import libcellml 11 | 12 | # unsigned int version() 13 | self.assertIsInstance(libcellml.version(), int) 14 | self.assertGreater(libcellml.version(), 0) 15 | 16 | # const std::string versionString() 17 | self.assertIsInstance(libcellml.versionString(), str) 18 | self.assertNotEqual(libcellml.versionString(), '') 19 | 20 | 21 | if __name__ == '__main__': 22 | unittest.main() 23 | -------------------------------------------------------------------------------- /tests/clone/tests.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set the test name, 'test_' will be prepended to the 3 | # name set here 4 | set(CURRENT_TEST clone) 5 | # Set a category name to enable running commands like: 6 | # ctest -R 7 | # which will run the tests matching this category-label. 8 | # Can be left empty (or just not set) 9 | set(${CURRENT_TEST}_CATEGORY utils) 10 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 11 | # Using absolute path relative to this file 12 | set(${CURRENT_TEST}_SRCS 13 | ${CMAKE_CURRENT_LIST_DIR}/clone.cpp 14 | ) 15 | set(${CURRENT_TEST}_HDRS 16 | ) 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/component/tests.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set the test name, 'test_' will be prepended to the 3 | # name set here 4 | set(CURRENT_TEST component) 5 | # Set a category name to enable running commands like: 6 | # ctest -R 7 | # which will run the tests matching this category-label. 8 | # Can be left empty (or just not set) 9 | set(${CURRENT_TEST}_CATEGORY entities) 10 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 11 | # Using absolute path relative to this file 12 | set(${CURRENT_TEST}_SRCS 13 | ${CMAKE_CURRENT_LIST_DIR}/component.cpp 14 | ${CMAKE_CURRENT_LIST_DIR}/encapsulation.cpp 15 | ) 16 | set(${CURRENT_TEST}_HDRS 17 | ) 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/connection/tests.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set the test name, 'test_' will be prepended to the 3 | # name set here 4 | set(CURRENT_TEST connection) 5 | # Set a category name to enable running commands like: 6 | # ctest -R 7 | # which will run the tests matching this category-label. 8 | # Can be left empty (or just not set) 9 | set(${CURRENT_TEST}_CATEGORY entities) 10 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 11 | # Using absolute path relative to this file 12 | set(${CURRENT_TEST}_SRCS 13 | ${CMAKE_CURRENT_LIST_DIR}/connection.cpp 14 | ) 15 | set(${CURRENT_TEST}_HDRS 16 | ) 17 | -------------------------------------------------------------------------------- /tests/coverage/tests.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set the test name, 'test_' will be prepended to the 3 | # name set here 4 | set(CURRENT_TEST coverage) 5 | # Set a category name to enable running commands like: 6 | # ctest -R 7 | # which will run the tests matching this category-label. 8 | # Can be left empty (or just not set) 9 | set(${CURRENT_TEST}_CATEGORY misc) 10 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 11 | # Using absolute path relative to this file 12 | set(${CURRENT_TEST}_SRCS 13 | ${CMAKE_CURRENT_LIST_DIR}/coverage.cpp 14 | ) 15 | #set(${CURRENT_TEST}_HDRS 16 | # ${CMAKE_CURRENT_LIST_DIR}/ 17 | #) 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/equality/tests.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set the test name, 'test_' will be prepended to the 3 | # name set here 4 | set(CURRENT_TEST equality) 5 | # Set a category name to enable running commands like: 6 | # ctest -R 7 | # which will run the tests matching this category-label. 8 | # Can be left empty (or just not set) 9 | set(${CURRENT_TEST}_CATEGORY misc) 10 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 11 | # Using absolute path relative to this file 12 | set(${CURRENT_TEST}_SRCS 13 | ${CMAKE_CURRENT_LIST_DIR}/equality.cpp 14 | ) 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/gcovr-4.1.1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cellml/libcellml/b3fb67a24e3f5ec4d69eb91544cbd49a6c22af92/tests/gcovr-4.1.1.zip -------------------------------------------------------------------------------- /tests/generator/tests.cmake: -------------------------------------------------------------------------------- 1 | set(CURRENT_TEST generator) 2 | set(${CURRENT_TEST}_CATEGORY io) 3 | 4 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 5 | 6 | set(${CURRENT_TEST}_SRCS 7 | ${CMAKE_CURRENT_LIST_DIR}/generator.cpp 8 | ${CMAKE_CURRENT_LIST_DIR}/generatorprofile.cpp 9 | ) 10 | -------------------------------------------------------------------------------- /tests/import_source/tests.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set the test name, 'test_' will be prepended to the 3 | # name set here 4 | set(CURRENT_TEST import_source) 5 | # Set a category name to enable running commands like: 6 | # ctest -R 7 | # which will run the tests matching this category-label. 8 | # Can be left empty (or just not set) 9 | set(${CURRENT_TEST}_CATEGORY entities) 10 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 11 | # Using absolute path relative to this file 12 | set(${CURRENT_TEST}_SRCS 13 | ${CMAKE_CURRENT_LIST_DIR}/import_source.cpp 14 | ) 15 | set(${CURRENT_TEST}_HDRS 16 | ) 17 | -------------------------------------------------------------------------------- /tests/importer/tests.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set the test name, 'test_' will be prepended to the 3 | # name set here 4 | set(CURRENT_TEST importer) 5 | # Set a category name to enable running commands like: 6 | # ctest -R 7 | # which will run the tests matching this category-label. 8 | # Can be left empty (or just not set) 9 | set(${CURRENT_TEST}_CATEGORY object) 10 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 11 | # Using absolute path relative to this file 12 | set(${CURRENT_TEST}_SRCS 13 | ${CMAKE_CURRENT_LIST_DIR}/cellml_1_1.cpp 14 | ${CMAKE_CURRENT_LIST_DIR}/file_parser.cpp 15 | ${CMAKE_CURRENT_LIST_DIR}/importer.cpp 16 | ${CMAKE_CURRENT_LIST_DIR}/model_flattening.cpp 17 | ) 18 | #set(${CURRENT_TEST}_HDRS 19 | # ${CMAKE_CURRENT_LIST_DIR}/ 20 | #) 21 | -------------------------------------------------------------------------------- /tests/isolated/tests.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set the test name, 'test_' will be prepended to the 3 | # name set here 4 | set(CURRENT_TEST isolated_generator) 5 | # Set a category name to enable running commands like: 6 | # ctest -R 7 | # which will run the tests matching this category-label. 8 | # Can be left empty (or just not set) 9 | set(${CURRENT_TEST}_CATEGORY io) 10 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 11 | # Using absolute path relative to this file 12 | set(${CURRENT_TEST}_SRCS 13 | ${CMAKE_CURRENT_LIST_DIR}/generator.cpp 14 | ) 15 | 16 | -------------------------------------------------------------------------------- /tests/libxml2issues.2.9.10.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "string" 4 | #include "vector" 5 | 6 | // Version 2.9.10 of LibXml2 reports the following errors, 7 | // used on Windows CI machines. 8 | const std::vector expectedLibXml2Issues = { 9 | "LibXml2 error: Opening and ending tag mismatch: ci line 6 and apply.", 10 | "LibXml2 error: Opening and ending tag mismatch: ci line 6 and math.", 11 | "LibXml2 error: Opening and ending tag mismatch: apply line 6 and math_wrap_as_single_root_element.", 12 | "LibXml2 error: EndTag: ' expectedLibXml2Issues = { 9 | "LibXml2 error: Opening and ending tag mismatch: ci line 6 and apply.", 10 | "LibXml2 error: Opening and ending tag mismatch: ci line 6 and math.", 11 | "LibXml2 error: Opening and ending tag mismatch: apply line 3 and math_wrap_as_single_root_element.", 12 | "LibXml2 error: Premature end of data in tag math line 2.", 13 | "LibXml2 error: Premature end of data in tag math_wrap_as_single_root_element line 1.", 14 | }; 15 | -------------------------------------------------------------------------------- /tests/libxml2issues.2.9.13.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "string" 4 | #include "vector" 5 | 6 | // Version 2.9.13 of LibXml2 reports the following errors. 7 | const std::vector expectedLibXml2Issues = { 8 | "LibXml2 error: Opening and ending tag mismatch: ci line 6 and apply.", 9 | "LibXml2 error: Opening and ending tag mismatch: ci line 6 and math.", 10 | "LibXml2 error: Opening and ending tag mismatch: apply line 3 and math_wrap_as_single_root_element.", 11 | "LibXml2 error: Premature end of data in tag math line 2.", 12 | }; 13 | -------------------------------------------------------------------------------- /tests/libxml2issues.2.9.4.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "string" 4 | #include "vector" 5 | 6 | // Version 2.9.4 of LibXml2 reports the following errors, 7 | // used on Windows CI machines. 8 | const std::vector expectedLibXml2Issues = { 9 | "LibXml2 error: Opening and ending tag mismatch: ci line 6 and apply.", 10 | "LibXml2 error: Opening and ending tag mismatch: ci line 6 and math.", 11 | "LibXml2 error: Opening and ending tag mismatch: apply line 3 and math_wrap_as_single_root_element.", 12 | "LibXml2 error: Premature end of data in tag math line 2.", 13 | "LibXml2 error: Premature end of data in tag math_wrap_as_single_root_element line 1.", 14 | }; 15 | -------------------------------------------------------------------------------- /tests/math/tests.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set the test name, 'test_' will be prepended to the 3 | # name set here 4 | set(CURRENT_TEST math) 5 | # Set a category name to enable running commands like: 6 | # ctest -R 7 | # which will run the tests matching this category-label. 8 | # Can be left empty (or just not set) 9 | set(${CURRENT_TEST}_CATEGORY entities) 10 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 11 | # Using absolute path relative to this file 12 | set(${CURRENT_TEST}_SRCS 13 | ${CMAKE_CURRENT_LIST_DIR}/math.cpp 14 | ) 15 | set(${CURRENT_TEST}_HDRS 16 | ) 17 | -------------------------------------------------------------------------------- /tests/model/tests.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set the test name, 'test_' will be prepended to the 3 | # name set here 4 | set(CURRENT_TEST model) 5 | # Set a category name to enable running commands like: 6 | # ctest -R 7 | # which will run the tests matching this category-label. 8 | # Can be left empty (or just not set) 9 | set(${CURRENT_TEST}_CATEGORY entities) 10 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 11 | # Using absolute path relative to this file 12 | set(${CURRENT_TEST}_SRCS 13 | ${CMAKE_CURRENT_LIST_DIR}/component_import.cpp 14 | ${CMAKE_CURRENT_LIST_DIR}/import_requirement.cpp 15 | ${CMAKE_CURRENT_LIST_DIR}/model.cpp 16 | ${CMAKE_CURRENT_LIST_DIR}/units_import.cpp 17 | ) 18 | set(${CURRENT_TEST}_HDRS 19 | ) 20 | -------------------------------------------------------------------------------- /tests/parser/tests.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set the test name, 'test_' will be prepended to the 3 | # name set here 4 | set(CURRENT_TEST parser) 5 | # Set a category name to enable running commands like: 6 | # ctest -R 7 | # which will run the tests matching this category-label. 8 | # Can be left empty (or just not set) 9 | set(${CURRENT_TEST}_CATEGORY io) 10 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 11 | # Using absolute path relative to this file 12 | set(${CURRENT_TEST}_SRCS 13 | ${CMAKE_CURRENT_LIST_DIR}/cellml_1_0.cpp 14 | ${CMAKE_CURRENT_LIST_DIR}/cellml_1_1.cpp 15 | ${CMAKE_CURRENT_LIST_DIR}/file_parser.cpp 16 | ${CMAKE_CURRENT_LIST_DIR}/libxml_user.cpp 17 | ${CMAKE_CURRENT_LIST_DIR}/parser.cpp 18 | ) 19 | #set(${CURRENT_TEST}_HDRS 20 | # ${CMAKE_CURRENT_LIST_DIR}/ 21 | #) 22 | 23 | set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/libxml_user.cpp PROPERTIES 24 | COMPILE_DEFINITIONS XML_ERROR_CALLBACK_ARGUMENT_TYPE=${CONST_ERROR_STRUCTURED_ERROR_CALLBACK_TYPE}) 25 | -------------------------------------------------------------------------------- /tests/printer/tests.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set the test name, 'test_' will be prepended to the 3 | # name set here 4 | set(CURRENT_TEST printer) 5 | # Set a category name to enable running commands like: 6 | # ctest -R 7 | # which will run the tests matching this category-label. 8 | # Can be left empty (or just not set) 9 | set(${CURRENT_TEST}_CATEGORY io) 10 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 11 | # Using absolute path relative to this file 12 | set(${CURRENT_TEST}_SRCS 13 | ${CMAKE_CURRENT_LIST_DIR}/printer.cpp 14 | ) 15 | #set(${CURRENT_TEST}_HDRS 16 | # ${CMAKE_CURRENT_LIST_DIR}/ 17 | #) 18 | 19 | -------------------------------------------------------------------------------- /tests/reset/tests.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set the test name, 'test_' will be prepended to the 3 | # name set here 4 | set(CURRENT_TEST reset) 5 | # Set a category name to enable running commands like: 6 | # ctest -R 7 | # which will run the tests matching this category-label. 8 | # Can be left empty (or just not set) 9 | set(${CURRENT_TEST}_CATEGORY entities) 10 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 11 | # Using absolute path relative to this file 12 | set(${CURRENT_TEST}_SRCS 13 | ${CMAKE_CURRENT_LIST_DIR}/reset.cpp 14 | ) 15 | #set(${CURRENT_TEST}_HDRS 16 | # ${CMAKE_CURRENT_LIST_DIR}/ 17 | #) 18 | 19 | -------------------------------------------------------------------------------- /tests/resources/analyser/initialised_variable_of_integration.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | time 16 | 17 | x 18 | 19 | 1 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /tests/resources/analyser/non_initialised_state.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | time 16 | 17 | x 18 | 19 | 1 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /tests/resources/analyser/not_equality_statement.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | x 13 | y 14 | z 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/resources/analyser/overconstrained.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | x 12 | 1 13 | 14 | 15 | 16 | x 17 | 3 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /tests/resources/analyser/undefined_variables.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | x 10 | a 11 | 12 | 13 | 14 | y 15 | b 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/resources/analyser/underconstrained.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/analyser/units/rhs.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 1 11 | 12 | a 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/resources/analyser/unsuitably_constrained.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | y 10 | 1 11 | 12 | 13 | 14 | y 15 | 3 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/resources/cellml1X/cardiac_constant_simplified.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 9 | 10 | 11 | nK_stim 12 | 0.3 13 | 14 | 15 | 16 | 18 | 19 | 20 | stimPeriod 21 | 42.6 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /tests/resources/cellml1X/cardiac_constant_simplified_alternative.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 9 | 10 | 11 | nK_stim 12 | 0.3 13 | 14 | 15 | 16 | 18 | 19 | 20 | stimPeriod 21 | 42.6 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /tests/resources/complex_encapsulation.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /tests/resources/coverage/cellml1x_import_component.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/resources/coverage/cmeta_id_cellml2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/resources/coverage/generator/model.interface.out: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using a modified C profile of libCellML 0.6.3. */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | double * createStatesArray(); 8 | double * createVariablesArray(); 9 | void deleteArray(double *array); 10 | 11 | void initialiseVariables(double *states, double *rates, double *variables); 12 | void computeComputedConstants(double *variables); 13 | void computeRates(double voi, double *states, double *rates, double *variables); 14 | void computeVariables(double voi, double *states, double *rates, double *variables); 15 | -------------------------------------------------------------------------------- /tests/resources/coverage/invalidxmlids.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /tests/resources/coverage/non_model_root.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/resources/deriv_approx_sin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | x 12 | sin 13 | 14 | 15 | x 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /tests/resources/dirty_encapsulated_model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/resources/dirty_model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_eqn_computed_var_on_rhs/model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | x 13 | a 14 | 15 | 16 | 17 | a 18 | 1 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_eqn_computed_var_on_rhs/model.external.h: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using the C profile of libCellML 0.6.3. */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | extern const char VERSION[]; 8 | extern const char LIBCELLML_VERSION[]; 9 | 10 | extern const size_t VARIABLE_COUNT; 11 | 12 | typedef enum { 13 | CONSTANT, 14 | COMPUTED_CONSTANT, 15 | ALGEBRAIC, 16 | EXTERNAL 17 | } VariableType; 18 | 19 | typedef struct { 20 | char name[2]; 21 | char units[14]; 22 | char component[17]; 23 | VariableType type; 24 | } VariableInfo; 25 | 26 | extern const VariableInfo VARIABLE_INFO[]; 27 | 28 | double * createVariablesArray(); 29 | void deleteArray(double *array); 30 | 31 | typedef double (* ExternalVariable)(double *variables, size_t index); 32 | 33 | void initialiseVariables(double *variables, ExternalVariable externalVariable); 34 | void computeComputedConstants(double *variables); 35 | void computeVariables(double *variables, ExternalVariable externalVariable); 36 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_eqn_computed_var_on_rhs/model.h: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using the C profile of libCellML 0.6.3. */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | extern const char VERSION[]; 8 | extern const char LIBCELLML_VERSION[]; 9 | 10 | extern const size_t VARIABLE_COUNT; 11 | 12 | typedef enum { 13 | CONSTANT, 14 | COMPUTED_CONSTANT, 15 | ALGEBRAIC 16 | } VariableType; 17 | 18 | typedef struct { 19 | char name[2]; 20 | char units[14]; 21 | char component[17]; 22 | VariableType type; 23 | } VariableInfo; 24 | 25 | extern const VariableInfo VARIABLE_INFO[]; 26 | 27 | double * createVariablesArray(); 28 | void deleteArray(double *array); 29 | 30 | void initialiseVariables(double *variables); 31 | void computeComputedConstants(double *variables); 32 | void computeVariables(double *variables); 33 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_eqn_computed_var_on_rhs/model.py: -------------------------------------------------------------------------------- 1 | # The content of this file was generated using the Python profile of libCellML 0.6.3. 2 | 3 | from enum import Enum 4 | from math import * 5 | 6 | 7 | __version__ = "0.4.0" 8 | LIBCELLML_VERSION = "0.6.3" 9 | 10 | VARIABLE_COUNT = 2 11 | 12 | 13 | class VariableType(Enum): 14 | CONSTANT = 0 15 | COMPUTED_CONSTANT = 1 16 | ALGEBRAIC = 2 17 | 18 | 19 | VARIABLE_INFO = [ 20 | {"name": "a", "units": "dimensionless", "component": "my_algebraic_eqn", "type": VariableType.COMPUTED_CONSTANT}, 21 | {"name": "x", "units": "dimensionless", "component": "my_algebraic_eqn", "type": VariableType.COMPUTED_CONSTANT} 22 | ] 23 | 24 | 25 | def create_variables_array(): 26 | return [nan]*VARIABLE_COUNT 27 | 28 | 29 | def initialise_variables(variables): 30 | variables[0] = 1.0 31 | 32 | 33 | def compute_computed_constants(variables): 34 | variables[1] = variables[0] 35 | 36 | 37 | def compute_variables(variables): 38 | pass 39 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_eqn_const_var_on_rhs/model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | x 12 | a 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_eqn_const_var_on_rhs/model.h: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using the C profile of libCellML 0.6.3. */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | extern const char VERSION[]; 8 | extern const char LIBCELLML_VERSION[]; 9 | 10 | extern const size_t VARIABLE_COUNT; 11 | 12 | typedef enum { 13 | CONSTANT, 14 | COMPUTED_CONSTANT, 15 | ALGEBRAIC 16 | } VariableType; 17 | 18 | typedef struct { 19 | char name[2]; 20 | char units[14]; 21 | char component[17]; 22 | VariableType type; 23 | } VariableInfo; 24 | 25 | extern const VariableInfo VARIABLE_INFO[]; 26 | 27 | double * createVariablesArray(); 28 | void deleteArray(double *array); 29 | 30 | void initialiseVariables(double *variables); 31 | void computeComputedConstants(double *variables); 32 | void computeVariables(double *variables); 33 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_eqn_const_var_on_rhs/model.py: -------------------------------------------------------------------------------- 1 | # The content of this file was generated using the Python profile of libCellML 0.6.3. 2 | 3 | from enum import Enum 4 | from math import * 5 | 6 | 7 | __version__ = "0.4.0" 8 | LIBCELLML_VERSION = "0.6.3" 9 | 10 | VARIABLE_COUNT = 2 11 | 12 | 13 | class VariableType(Enum): 14 | CONSTANT = 0 15 | COMPUTED_CONSTANT = 1 16 | ALGEBRAIC = 2 17 | 18 | 19 | VARIABLE_INFO = [ 20 | {"name": "a", "units": "dimensionless", "component": "my_algebraic_eqn", "type": VariableType.CONSTANT}, 21 | {"name": "x", "units": "dimensionless", "component": "my_algebraic_eqn", "type": VariableType.COMPUTED_CONSTANT} 22 | ] 23 | 24 | 25 | def create_variables_array(): 26 | return [nan]*VARIABLE_COUNT 27 | 28 | 29 | def initialise_variables(variables): 30 | variables[0] = 1.0 31 | 32 | 33 | def compute_computed_constants(variables): 34 | variables[1] = variables[0] 35 | 36 | 37 | def compute_variables(variables): 38 | pass 39 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_eqn_constant_on_rhs/model.c: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using the C profile of libCellML 0.6.3. */ 2 | 3 | #include "model.h" 4 | 5 | #include 6 | #include 7 | 8 | const char VERSION[] = "0.5.0"; 9 | const char LIBCELLML_VERSION[] = "0.6.3"; 10 | 11 | const size_t VARIABLE_COUNT = 1; 12 | 13 | const VariableInfo VARIABLE_INFO[] = { 14 | {"x", "dimensionless", "my_component", COMPUTED_CONSTANT} 15 | }; 16 | 17 | double * createVariablesArray() 18 | { 19 | double *res = (double *) malloc(VARIABLE_COUNT*sizeof(double)); 20 | 21 | for (size_t i = 0; i < VARIABLE_COUNT; ++i) { 22 | res[i] = NAN; 23 | } 24 | 25 | return res; 26 | } 27 | 28 | void deleteArray(double *array) 29 | { 30 | free(array); 31 | } 32 | 33 | void initialiseVariables(double *variables) 34 | { 35 | variables[0] = 1.0; 36 | } 37 | 38 | void computeComputedConstants(double *variables) 39 | { 40 | } 41 | 42 | void computeVariables(double *variables) 43 | { 44 | } 45 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_eqn_constant_on_rhs/model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | x 11 | 1 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_eqn_constant_on_rhs/model.h: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using the C profile of libCellML 0.6.3. */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | extern const char VERSION[]; 8 | extern const char LIBCELLML_VERSION[]; 9 | 10 | extern const size_t VARIABLE_COUNT; 11 | 12 | typedef enum { 13 | CONSTANT, 14 | COMPUTED_CONSTANT, 15 | ALGEBRAIC 16 | } VariableType; 17 | 18 | typedef struct { 19 | char name[2]; 20 | char units[14]; 21 | char component[13]; 22 | VariableType type; 23 | } VariableInfo; 24 | 25 | extern const VariableInfo VARIABLE_INFO[]; 26 | 27 | double * createVariablesArray(); 28 | void deleteArray(double *array); 29 | 30 | void initialiseVariables(double *variables); 31 | void computeComputedConstants(double *variables); 32 | void computeVariables(double *variables); 33 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_eqn_constant_on_rhs/model.py: -------------------------------------------------------------------------------- 1 | # The content of this file was generated using the Python profile of libCellML 0.6.3. 2 | 3 | from enum import Enum 4 | from math import * 5 | 6 | 7 | __version__ = "0.4.0" 8 | LIBCELLML_VERSION = "0.6.3" 9 | 10 | VARIABLE_COUNT = 1 11 | 12 | 13 | class VariableType(Enum): 14 | CONSTANT = 0 15 | COMPUTED_CONSTANT = 1 16 | ALGEBRAIC = 2 17 | 18 | 19 | VARIABLE_INFO = [ 20 | {"name": "x", "units": "dimensionless", "component": "my_component", "type": VariableType.COMPUTED_CONSTANT} 21 | ] 22 | 23 | 24 | def create_variables_array(): 25 | return [nan]*VARIABLE_COUNT 26 | 27 | 28 | def initialise_variables(variables): 29 | variables[0] = 1.0 30 | 31 | 32 | def compute_computed_constants(variables): 33 | pass 34 | 35 | 36 | def compute_variables(variables): 37 | pass 38 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_eqn_with_one_non_isolated_unknown/model.external.h: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using the C profile of libCellML 0.6.3. */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | extern const char VERSION[]; 8 | extern const char LIBCELLML_VERSION[]; 9 | 10 | extern const size_t VARIABLE_COUNT; 11 | 12 | typedef enum { 13 | CONSTANT, 14 | COMPUTED_CONSTANT, 15 | ALGEBRAIC, 16 | EXTERNAL 17 | } VariableType; 18 | 19 | typedef struct { 20 | char name[2]; 21 | char units[14]; 22 | char component[17]; 23 | VariableType type; 24 | } VariableInfo; 25 | 26 | extern const VariableInfo VARIABLE_INFO[]; 27 | 28 | double * createVariablesArray(); 29 | void deleteArray(double *array); 30 | 31 | typedef double (* ExternalVariable)(double *variables, size_t index); 32 | 33 | void initialiseVariables(double *variables, ExternalVariable externalVariable); 34 | void computeComputedConstants(double *variables); 35 | void computeVariables(double *variables, ExternalVariable externalVariable); 36 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_eqn_with_one_non_isolated_unknown/model.h: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using the C profile of libCellML 0.6.3. */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | extern const char VERSION[]; 8 | extern const char LIBCELLML_VERSION[]; 9 | 10 | extern const size_t VARIABLE_COUNT; 11 | 12 | typedef enum { 13 | CONSTANT, 14 | COMPUTED_CONSTANT, 15 | ALGEBRAIC 16 | } VariableType; 17 | 18 | typedef struct { 19 | char name[2]; 20 | char units[14]; 21 | char component[17]; 22 | VariableType type; 23 | } VariableInfo; 24 | 25 | extern const VariableInfo VARIABLE_INFO[]; 26 | 27 | double * createVariablesArray(); 28 | void deleteArray(double *array); 29 | 30 | void initialiseVariables(double *variables); 31 | void computeComputedConstants(double *variables); 32 | void computeVariables(double *variables); 33 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_system_with_three_linked_unknowns/model.h: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using the C profile of libCellML 0.6.3. */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | extern const char VERSION[]; 8 | extern const char LIBCELLML_VERSION[]; 9 | 10 | extern const size_t VARIABLE_COUNT; 11 | 12 | typedef enum { 13 | CONSTANT, 14 | COMPUTED_CONSTANT, 15 | ALGEBRAIC 16 | } VariableType; 17 | 18 | typedef struct { 19 | char name[2]; 20 | char units[14]; 21 | char component[20]; 22 | VariableType type; 23 | } VariableInfo; 24 | 25 | extern const VariableInfo VARIABLE_INFO[]; 26 | 27 | double * createVariablesArray(); 28 | void deleteArray(double *array); 29 | 30 | void initialiseVariables(double *variables); 31 | void computeComputedConstants(double *variables); 32 | void computeVariables(double *variables); 33 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_system_with_three_linked_unknowns/model.one.external.h: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using the C profile of libCellML 0.6.3. */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | extern const char VERSION[]; 8 | extern const char LIBCELLML_VERSION[]; 9 | 10 | extern const size_t VARIABLE_COUNT; 11 | 12 | typedef enum { 13 | CONSTANT, 14 | COMPUTED_CONSTANT, 15 | ALGEBRAIC, 16 | EXTERNAL 17 | } VariableType; 18 | 19 | typedef struct { 20 | char name[2]; 21 | char units[14]; 22 | char component[20]; 23 | VariableType type; 24 | } VariableInfo; 25 | 26 | extern const VariableInfo VARIABLE_INFO[]; 27 | 28 | double * createVariablesArray(); 29 | void deleteArray(double *array); 30 | 31 | typedef double (* ExternalVariable)(double *variables, size_t index); 32 | 33 | void initialiseVariables(double *variables, ExternalVariable externalVariable); 34 | void computeComputedConstants(double *variables); 35 | void computeVariables(double *variables, ExternalVariable externalVariable); 36 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_system_with_three_linked_unknowns/model.three.externals.h: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using the C profile of libCellML 0.6.3. */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | extern const char VERSION[]; 8 | extern const char LIBCELLML_VERSION[]; 9 | 10 | extern const size_t VARIABLE_COUNT; 11 | 12 | typedef enum { 13 | CONSTANT, 14 | COMPUTED_CONSTANT, 15 | ALGEBRAIC, 16 | EXTERNAL 17 | } VariableType; 18 | 19 | typedef struct { 20 | char name[2]; 21 | char units[14]; 22 | char component[20]; 23 | VariableType type; 24 | } VariableInfo; 25 | 26 | extern const VariableInfo VARIABLE_INFO[]; 27 | 28 | double * createVariablesArray(); 29 | void deleteArray(double *array); 30 | 31 | typedef double (* ExternalVariable)(double *variables, size_t index); 32 | 33 | void initialiseVariables(double *variables, ExternalVariable externalVariable); 34 | void computeComputedConstants(double *variables); 35 | void computeVariables(double *variables, ExternalVariable externalVariable); 36 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_system_with_three_linked_unknowns/model.two.externals.h: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using the C profile of libCellML 0.6.3. */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | extern const char VERSION[]; 8 | extern const char LIBCELLML_VERSION[]; 9 | 10 | extern const size_t VARIABLE_COUNT; 11 | 12 | typedef enum { 13 | CONSTANT, 14 | COMPUTED_CONSTANT, 15 | ALGEBRAIC, 16 | EXTERNAL 17 | } VariableType; 18 | 19 | typedef struct { 20 | char name[2]; 21 | char units[14]; 22 | char component[20]; 23 | VariableType type; 24 | } VariableInfo; 25 | 26 | extern const VariableInfo VARIABLE_INFO[]; 27 | 28 | double * createVariablesArray(); 29 | void deleteArray(double *array); 30 | 31 | typedef double (* ExternalVariable)(double *variables, size_t index); 32 | 33 | void initialiseVariables(double *variables, ExternalVariable externalVariable); 34 | void computeComputedConstants(double *variables); 35 | void computeVariables(double *variables, ExternalVariable externalVariable); 36 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_system_with_various_dependencies/model.not.ordered.h: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using the C profile of libCellML 0.6.3. */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | extern const char VERSION[]; 8 | extern const char LIBCELLML_VERSION[]; 9 | 10 | extern const size_t VARIABLE_COUNT; 11 | 12 | typedef enum { 13 | CONSTANT, 14 | COMPUTED_CONSTANT, 15 | ALGEBRAIC 16 | } VariableType; 17 | 18 | typedef struct { 19 | char name[2]; 20 | char units[14]; 21 | char component[20]; 22 | VariableType type; 23 | } VariableInfo; 24 | 25 | extern const VariableInfo VARIABLE_INFO[]; 26 | 27 | double * createVariablesArray(); 28 | void deleteArray(double *array); 29 | 30 | void initialiseVariables(double *variables); 31 | void computeComputedConstants(double *variables); 32 | void computeVariables(double *variables); 33 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_system_with_various_dependencies/model.ordered.h: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using the C profile of libCellML 0.6.3. */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | extern const char VERSION[]; 8 | extern const char LIBCELLML_VERSION[]; 9 | 10 | extern const size_t VARIABLE_COUNT; 11 | 12 | typedef enum { 13 | CONSTANT, 14 | COMPUTED_CONSTANT, 15 | ALGEBRAIC 16 | } VariableType; 17 | 18 | typedef struct { 19 | char name[2]; 20 | char units[14]; 21 | char component[20]; 22 | VariableType type; 23 | } VariableInfo; 24 | 25 | extern const VariableInfo VARIABLE_INFO[]; 26 | 27 | double * createVariablesArray(); 28 | void deleteArray(double *array); 29 | 30 | void initialiseVariables(double *variables); 31 | void computeComputedConstants(double *variables); 32 | void computeVariables(double *variables); 33 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_unknown_var_on_rhs/model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 1 13 | x 14 | 15 | 16 | 17 | x 18 | y 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_unknown_var_on_rhs/model.h: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using the C profile of libCellML 0.6.3. */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | extern const char VERSION[]; 8 | extern const char LIBCELLML_VERSION[]; 9 | 10 | extern const size_t VARIABLE_COUNT; 11 | 12 | typedef enum { 13 | CONSTANT, 14 | COMPUTED_CONSTANT, 15 | ALGEBRAIC 16 | } VariableType; 17 | 18 | typedef struct { 19 | char name[2]; 20 | char units[14]; 21 | char component[13]; 22 | VariableType type; 23 | } VariableInfo; 24 | 25 | extern const VariableInfo VARIABLE_INFO[]; 26 | 27 | double * createVariablesArray(); 28 | void deleteArray(double *array); 29 | 30 | void initialiseVariables(double *variables); 31 | void computeComputedConstants(double *variables); 32 | void computeVariables(double *variables); 33 | -------------------------------------------------------------------------------- /tests/resources/generator/algebraic_unknown_var_on_rhs/model.py: -------------------------------------------------------------------------------- 1 | # The content of this file was generated using the Python profile of libCellML 0.6.3. 2 | 3 | from enum import Enum 4 | from math import * 5 | 6 | 7 | __version__ = "0.4.0" 8 | LIBCELLML_VERSION = "0.6.3" 9 | 10 | VARIABLE_COUNT = 2 11 | 12 | 13 | class VariableType(Enum): 14 | CONSTANT = 0 15 | COMPUTED_CONSTANT = 1 16 | ALGEBRAIC = 2 17 | 18 | 19 | VARIABLE_INFO = [ 20 | {"name": "x", "units": "dimensionless", "component": "my_component", "type": VariableType.COMPUTED_CONSTANT}, 21 | {"name": "y", "units": "dimensionless", "component": "my_component", "type": VariableType.COMPUTED_CONSTANT} 22 | ] 23 | 24 | 25 | def create_variables_array(): 26 | return [nan]*VARIABLE_COUNT 27 | 28 | 29 | def initialise_variables(variables): 30 | variables[0] = 1.0 31 | 32 | 33 | def compute_computed_constants(variables): 34 | variables[1] = variables[0] 35 | 36 | 37 | def compute_variables(variables): 38 | pass 39 | -------------------------------------------------------------------------------- /tests/resources/generator/cell_geometry_model/model.external.h: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using the C profile of libCellML 0.6.3. */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | extern const char VERSION[]; 8 | extern const char LIBCELLML_VERSION[]; 9 | 10 | extern const size_t VARIABLE_COUNT; 11 | 12 | typedef enum { 13 | CONSTANT, 14 | COMPUTED_CONSTANT, 15 | ALGEBRAIC, 16 | EXTERNAL 17 | } VariableType; 18 | 19 | typedef struct { 20 | char name[6]; 21 | char units[11]; 22 | char component[14]; 23 | VariableType type; 24 | } VariableInfo; 25 | 26 | extern const VariableInfo VARIABLE_INFO[]; 27 | 28 | double * createVariablesArray(); 29 | void deleteArray(double *array); 30 | 31 | typedef double (* ExternalVariable)(double *variables, size_t index); 32 | 33 | void initialiseVariables(double *variables, ExternalVariable externalVariable); 34 | void computeComputedConstants(double *variables); 35 | void computeVariables(double *variables, ExternalVariable externalVariable); 36 | -------------------------------------------------------------------------------- /tests/resources/generator/cell_geometry_model/model.h: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using the C profile of libCellML 0.6.3. */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | extern const char VERSION[]; 8 | extern const char LIBCELLML_VERSION[]; 9 | 10 | extern const size_t VARIABLE_COUNT; 11 | 12 | typedef enum { 13 | CONSTANT, 14 | COMPUTED_CONSTANT, 15 | ALGEBRAIC 16 | } VariableType; 17 | 18 | typedef struct { 19 | char name[6]; 20 | char units[11]; 21 | char component[14]; 22 | VariableType type; 23 | } VariableInfo; 24 | 25 | extern const VariableInfo VARIABLE_INFO[]; 26 | 27 | double * createVariablesArray(); 28 | void deleteArray(double *array); 29 | 30 | void initialiseVariables(double *variables); 31 | void computeComputedConstants(double *variables); 32 | void computeVariables(double *variables); 33 | -------------------------------------------------------------------------------- /tests/resources/generator/cellml_slc_example/slc_model_units_only.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/resources/generator/cellml_unit_scaling_constant/model.h: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using the C profile of libCellML 0.6.3. */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | extern const char VERSION[]; 8 | extern const char LIBCELLML_VERSION[]; 9 | 10 | extern const size_t VARIABLE_COUNT; 11 | 12 | typedef enum { 13 | CONSTANT, 14 | COMPUTED_CONSTANT, 15 | ALGEBRAIC 16 | } VariableType; 17 | 18 | typedef struct { 19 | char name[2]; 20 | char units[3]; 21 | char component[10]; 22 | VariableType type; 23 | } VariableInfo; 24 | 25 | extern const VariableInfo VARIABLE_INFO[]; 26 | 27 | double * createVariablesArray(); 28 | void deleteArray(double *array); 29 | 30 | void initialiseVariables(double *variables); 31 | void computeComputedConstants(double *variables); 32 | void computeVariables(double *variables); 33 | -------------------------------------------------------------------------------- /tests/resources/generator/ode_const_var_on_rhs_one_component/model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | t 20 | 21 | x 22 | 23 | a 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /tests/resources/generator/ode_constant_on_rhs_one_component/model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | t 19 | 20 | x 21 | 22 | 1 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /tests/resources/generator/unknown_variable_as_external_variable/model.h: -------------------------------------------------------------------------------- 1 | /* The content of this file was generated using the C profile of libCellML 0.6.3. */ 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | extern const char VERSION[]; 8 | extern const char LIBCELLML_VERSION[]; 9 | 10 | extern const size_t VARIABLE_COUNT; 11 | 12 | typedef enum { 13 | CONSTANT, 14 | COMPUTED_CONSTANT, 15 | ALGEBRAIC, 16 | EXTERNAL 17 | } VariableType; 18 | 19 | typedef struct { 20 | char name[5]; 21 | char units[15]; 22 | char component[17]; 23 | VariableType type; 24 | } VariableInfo; 25 | 26 | extern const VariableInfo VARIABLE_INFO[]; 27 | 28 | double * createVariablesArray(); 29 | void deleteArray(double *array); 30 | 31 | typedef double (* ExternalVariable)(double *variables, size_t index); 32 | 33 | void initialiseVariables(double *variables, ExternalVariable externalVariable); 34 | void computeComputedConstants(double *variables); 35 | void computeVariables(double *variables, ExternalVariable externalVariable); 36 | -------------------------------------------------------------------------------- /tests/resources/import-requirements/complicatedExample.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/import-requirements/importExample1.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/resources/import-requirements/importExample2.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/resources/import_units_model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importedModelWithMaps.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /tests/resources/importer/CircularReference.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/CircularReference2.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/ImportCircularReferences.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/NotCircularReference.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/resources/importer/bondgraph/cpp_coupling_parameters.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/resources/importer/circularImport_1.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/circularImport_1_duplicated_name.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/circularImport_2.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/resources/importer/circularImport_3.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/resources/importer/circularUnits_1.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/circularUnits_1_duplicated_name.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/circularUnits_2.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/resources/importer/circularUnits_3.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/resources/importer/common_units_import_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/resources/importer/complexbondgraph/cpp_coupling_parameters.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/resources/importer/complicated.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/resources/importer/component_importer.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/component_importer_unresolved.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/component_library.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/resources/importer/component_that_is_invalid.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/resources/importer/components_concrete.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/resources/importer/components_imported.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/components_missing_children.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/resources/importer/components_missing_units.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | a 12 | 1 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/resources/importer/components_source.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/resources/importer/diamond.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/diamond_left.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/diamond_point.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/resources/importer/diamond_right.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/forkedImport.cellml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/resources/importer/generic.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/resources/importer/generic_no_source.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/resources/importer/import_invalid_component.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/import_invalid_import_url.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/resources/importer/import_invalid_units.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/import_invalid_xml.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/import_units_that_are_invalid.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/resources/importer/import_units_that_are_not_there.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/resources/importer/import_units_that_have_unknown_children.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/resources/importer/importing_a_component_that_is_invalid.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/importing_a_component_that_is_not_there.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/importing_bad_design_c_shape_import_hierarchy.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/resources/importer/importing_bad_design_z_import_hierarchy.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/importing_bad_design_z_offset_import_hierarchy.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/resources/importer/importing_component_with_imported_units_missing_model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/importing_component_with_missing_children.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/importing_component_with_missing_units.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/importing_nonexistent_items.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/importing_units_with_child_units_missing_model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/importing_units_with_missing_children.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/importing_units_with_present_children.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/importing_units_with_unresolved_children.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/invalid_import_url.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/layer1/component_library.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/resources/importer/layer1/import_from_component_library.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/resources/importer/layer1/importing_bad_design_z_import_hierarchy.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/layer1/layer1/importing_bad_design_z_import_hierarchy.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/layer1/layer2/layer3/model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/resources/importer/layer1/layer2/model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/layer1/model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/main_referenced_units_missing.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/resources/importer/master1.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/resources/importer/master2.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/resources/importer/master_units.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/resources/importer/master_units_unresolved.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/resources/importer/mediumbondgraph/cpp_coupling_modules.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | R_v 11 | 12 | 13 | 0.01 14 | C 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/resources/importer/mediumbondgraph/cpp_coupling_parameters.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/missingImport_1.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/model1.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/resources/importer/model2.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/model_cascaded_units.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/resources/importer/model_with_components_1.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/resources/importer/model_with_components_1_unresolved.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/resources/importer/model_with_components_2.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/nested_components.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/resources/importer/nested_units.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/resources/importer/not_even_proper.xml: -------------------------------------------------------------------------------- 1 | This is rubbish xml. 2 | -------------------------------------------------------------------------------- /tests/resources/importer/periodicstimulus/components/INa.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/periodicstimulus/components/units.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/resources/importer/periodicstimulus/experiments/periodic-stimulus.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/prong.cellml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/referenced_units_missing.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/resources/importer/simple_model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/resources/importer/simple_model_2.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/resources/importer/simplebondgraph/cpp_coupling.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/resources/importer/simplebondgraph/cpp_coupling_modules.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | R_v 10 | 11 | 12 | 0.01 13 | C 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/resources/importer/simplebondgraph/cpp_coupling_parameters.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/source.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/resources/importer/source_units.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/resources/importer/thingsThatGrowOnBranches.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/importer/triangle_units_base.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/resources/importer/triangle_units_opposite.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/resources/importer/triangle_units_opposite_I.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/resources/importer/triangle_units_point.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/resources/importer/triangle_units_point_I.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/resources/importer/trunk.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/resources/importer/units/base_model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | P 15 | 3.0 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/resources/importer/units/base_model_illdefined.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | P 16 | 3.0 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/resources/importer/units/left_model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/units/main.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/units/right_model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/resources/importer/units/units_definitions.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/resources/importer/units_children.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/resources/importer/units_concrete.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/resources/importer/units_definition_level_1.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/units_definition_level_1_child.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/units_definition_level_1_unresolved.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/units_imported.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/importer/units_library.cellml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/resources/importer/units_source.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/resources/importingModel.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/resources/importingModelChildComponent.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/resources/importingModelParentComponent.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/resources/invalid_cellml_2.0.xml: -------------------------------------------------------------------------------- 1 | This is not a CellML file. 2 | -------------------------------------------------------------------------------- /tests/resources/level1-3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /tests/resources/level2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | time 11 | cosine 12 | 13 | 14 | 15 | parameter 16 | time 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/basic_membrane_model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/basic_sodium_channel.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/circularImport1.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/circularImport1units.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/circularImport2.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/circularImport2units.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/equivalentimportedvariable.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/importExample2b.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/importExampleUnits.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/import_for_importedcomponentswithnameclashes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/import_for_importedcomponentusingimportedcomponent.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/import_for_importedunitswithnameclashes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/import_for_repeatedimportofsameunitsviadifferentcomponents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/import_for_unitsdefinedinimportedmodel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/imported_hierarchy_model.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/importedcomponentswithnameclashes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/importedcomponentusingimportedcomponent.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/importedunitswithnameclashes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/internalequivalentvariables.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/outsidecomponentequivalentvariables.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/repeatedimportofsameunitsviadifferentcomponents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/unitsdefinedinimportedmodel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/user_ex_01/child.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/resources/modelflattening/user_ex_01/parent.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/resources/multiplecellmlnamespaces.cellml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | a 10 | 10 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/resources/printer/component_with_multiple_math.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | nK_stim 10 | 0.3 11 | 12 | 13 | 14 | 15 | 16 | stimPeriod 17 | 42.6 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /tests/resources/requires_imports.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/resources/sin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | sin 10 | 11 | x 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/resources/sine_approximations_import_simple.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/resources/units_definitions.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/units_in_cn.cellml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | 11 | 12 | a 13 | 1 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/test_resources.cmake: -------------------------------------------------------------------------------- 1 | 2 | set(TESTS_RESOURCE_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/resources) 3 | 4 | set(TEST_RESOURCE_HEADER ${CMAKE_CURRENT_BINARY_DIR}/test_resources.h) 5 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test_resources.in.h ${TEST_RESOURCE_HEADER}) 6 | -------------------------------------------------------------------------------- /tests/test_resources.in.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright libCellML Contributors 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | 21 | const std::string TESTS_RESOURCE_LOCATION = "@TESTS_RESOURCE_LOCATION@"; 22 | -------------------------------------------------------------------------------- /tests/test_template.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set the test name, 'test_' will be prepended to the 3 | # name set here 4 | set(CURRENT_TEST ) 5 | # Set a category name to enable running commands like: 6 | # ctest -R 7 | # which will run the tests matching this category-label. 8 | # Can be left empty (or just not set) 9 | set(${CURRENT_TEST}_CATEGORY ) 10 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 11 | # Using absolute path relative to this file 12 | set(${CURRENT_TEST}_SRCS 13 | ${CMAKE_CURRENT_LIST_DIR}/ 14 | ) 15 | set(${CURRENT_TEST}_HDRS 16 | ${CMAKE_CURRENT_LIST_DIR}/ 17 | ) 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/units/tests.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set the test name, 'test_' will be prepended to the 3 | # name set here 4 | set(CURRENT_TEST units) 5 | # Set a category name to enable running commands like: 6 | # ctest -R 7 | # which will run the tests matching this category-label. 8 | # Can be left empty (or just not set) 9 | set(${CURRENT_TEST}_CATEGORY entities) 10 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 11 | # Using absolute path relative to this file 12 | set(${CURRENT_TEST}_SRCS 13 | ${CMAKE_CURRENT_LIST_DIR}/units.cpp 14 | ) 15 | set(${CURRENT_TEST}_HDRS 16 | ) 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/validator/tests.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set the test name, 'test_' will be prepended to the 3 | # name set here 4 | set(CURRENT_TEST validator) 5 | # Set a category name to enable running commands like: 6 | # ctest -R 7 | # which will run the tests matching this category-label. 8 | # Can be left empty (or just not set) 9 | set(${CURRENT_TEST}_CATEGORY io) 10 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 11 | # Using absolute path relative to this file 12 | set(${CURRENT_TEST}_SRCS 13 | ${CMAKE_CURRENT_LIST_DIR}/validator.cpp 14 | ) 15 | #set(${CURRENT_TEST}_HDRS 16 | # ${CMAKE_CURRENT_LIST_DIR}/ 17 | #) 18 | -------------------------------------------------------------------------------- /tests/variable/tests.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set the test name, 'test_' will be prepended to the 3 | # name set here 4 | set(CURRENT_TEST variable) 5 | # Set a category name to enable running commands like: 6 | # ctest -R 7 | # which will run the tests matching this category-label. 8 | # Can be left empty (or just not set) 9 | set(${CURRENT_TEST}_CATEGORY entities) 10 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 11 | # Using absolute path relative to this file 12 | set(${CURRENT_TEST}_SRCS 13 | ${CMAKE_CURRENT_LIST_DIR}/variable.cpp 14 | ) 15 | set(${CURRENT_TEST}_HDRS 16 | ) 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/version/tests.cmake: -------------------------------------------------------------------------------- 1 | 2 | set(CURRENT_TEST version) 3 | set(${CURRENT_TEST}_CATEGORY api) 4 | list(APPEND LIBCELLML_TESTS ${CURRENT_TEST}) 5 | set(${CURRENT_TEST}_SRCS 6 | ${CMAKE_CURRENT_LIST_DIR}/version.cpp 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /tests/version/version.cpp: -------------------------------------------------------------------------------- 1 | #include "gtest/gtest.h" 2 | 3 | #include 4 | 5 | TEST(Version, versionMatch) 6 | { 7 | unsigned int version = libcellml::version(); 8 | EXPECT_EQ(0x000603U, version); 9 | 10 | std::string versionString = libcellml::versionString(); 11 | EXPECT_EQ("0.6.3", versionString); 12 | } 13 | --------------------------------------------------------------------------------