
Optimizing LIBCELLML for CellML Software Support
"Explore the features and advancements of LIBCELLML, an open-source C++ library supporting CellML 2.0. Engage with the community, streamline development processes, and learn about key aspects such as test-driven development. See code comparisons and efficient component and variable mapping techniques."
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
LIBCELLML Hugh Sorby 07/06/2016
libCellML Tool for supporting CellML in software Supporting CellML 2.0 Open Source C++ library + bindings Apache 2.0 Licence Re-write of the CellML-API Available in Windows, OS X, and GNU/Linux
Advances from CellML-API Working with the community more closely Model the domain rather than the serialisation format C++ library + bindings Make use of C++-11 features
Key Aspects Community involvement Focused development Test Driven Write a test first to submit for review to the community Coverage Automated testing
Comparison iface::cellml_api::CellMLBootstrap* bootstrap = CreateCellMLBootstrap(); iface::cellml_api::Model* model = bootstrap->createModel(L"1.1"); bootstrap->release_ref(); iface::cellml_api::CellMLComponent* component = model->createComponent(); component->name(L component_name ); model->addElement(component); // note, don t do this or it crashes: component->release_ref(); model->release_ref(); libcellml::Model model; libcellml::ComponentPtr component = std::make_shared<libcellml::Component>(); component->setName( component_name ); model.addComponent(component);
Comparison ObjRef<iface::cellml_api::Connection> connection = model->createConnection()); model->addElement(connection); ObjRef<iface::cellml_api::MapComponents> mapComponents = connection- >componentMapping(); mapComponents->firstComponentName(L Component1_name ); mapComponents->secondComponentName(L Component2_name ); for ( ... each variable to be connected ...) { ObjRef<iface::cellml_api::MapVariables> mapVariables = model- >createMapVariables(); mapVariables->firstVariableName(L Variable1_name ); mapVariables->secondVariableName(L Variable2_name ); connection->addElement(mapVariables); }
Comparison libcellml::Model model; libcellml::ComponentPtr comp1 = std::make_shared<libcellml::Component>(); libcellml::ComponentPtr comp2 = std::make_shared<libcellml::Component>(); libcellml::VariablePtr variable1 = std::make_shared<libcellml::Variable>(); libcellml::VariablePtr variable2 = std::make_shared<libcellml::Variable>(); comp1->addVariable(variable1); comp2->addVariable(variable2); model.addComponent(comp1); model.addComponent(comp2); libcellml::Variable::addEquivalence(variable1, variable2);
Robustness Continuous integration
Robustness Continuous integration
Robustness Continuous integration
Robustness Continuous integration Tests Currently eight modules 122 individual tests
Robustness Continuous integration Memory Checking
Robustness Continuous integration Coverage
Documentation All of the above gets tied together by the documentation Documentation on how the community is developing the library Documentation on libraries API Documentation on how to build the library
Resources libCellML software repository https://github.com/cellml/libcellml libCellML documentation http://libcellml.readthedocs.io
Acknowledgements This project would not be possible without the support of the following agencies