https://github.com/chaste/introtochastecpp
An introduction to using Chaste from C++
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.0%) to scientific vocabulary
Repository
An introduction to using Chaste from C++
Basic Info
- Host: GitHub
- Owner: Chaste
- Language: C++
- Default Branch: main
- Size: 29.3 KB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
- Releases: 0
Metadata Files
README.md
Introduction to the Chaste C++ interface
This repository was created for the 2023 Chaste workshop in Oxford. It introduces some simple examples of vertex model simulations, and then examples of how simulations can be customised by writing new C++ classes.
Structure
The simulations are found in the following test suite: - test/TestCustomVertexSimulations.hpp
The custom Chaste classes are defined in the following files: - src/SillyVertexBasedDivisionRule.hpp - src/SillyForce.hpp - src/SillySimulationModifier.hpp
Chaste user projects
There are a few ways to use Chaste's source code. Professional C++ developers may wish to link to Chaste as an external C++ library rather than use the User Project framework described below. People new to C++ may be tempted to directly alter code in the Chaste source folders; this should generally be avoided as we won't know whether any problems you may run into are down to Chaste or your changes to it!
Instead of these options, 'User Projects' allow you to use Chaste source code and have the benefit of using the Chaste build/testing framework, by putting User Projects under the projects folder. User Projects work exactly like new Chaste modules (
global,heart,cell_based, etc.) and can depend on any of the Chaste modules (or indeed other User Projects). We tend to supply User Projects to accompany and reproduce research articles.Instructions on how to create your own User Project from a 'template' project can also be found here. Alternatively, if you're using Chaste via Docker, you can run the provided script
new_project.sh(in thescriptsdirectory) and pass the name that you want to call your project e.g.new_project.sh my_chaste_proj.⚠️ When you create a new user project, make sure you run the setup_project.py script to ensure it relies on the correct Chaste libraries.
Once you have created the repository on GitHub (with the same name) and committed some changes, use the following commands to push your project to GitHub:
git remote add origin https://github.com/<username>/my_chaste_proj.git git push -u origin mainIf the above command gives you the error
fatal: remote origin already exists, then instead use the commands:git remote set-url origin https://github.com/<username>/my_chaste_proj.git git push -u origin mainYour project and its revision history is now safely stored on GitHub.
Practical session
1. User project structure
- Look through the structure of the user project and make sure you understand what all the files are there for.
- Go through the steps to create a new user project, making sure you have run the setup_project.py script.
2. Run the test suite
- Read through the code in test/TestCustomVertexSimulations.hpp and make sure you undersand what it is doing.
- Compile and run the test suite in test/TestCustomVertexSimulations.hpp.
- Open the output in ParaView and see what each simulation has produced.
3. Read though the custom classes
- Look at the code in the src directory and make sure you understand it.
- Make some modifications to one or more of those classes, and see how that modification affects the output of the relevant test.
4. Make a custom class
- Create a custom class. This might be a division rule, force, or simulation modifier similar to the existing custom classes, or, it could be something different such as a new cell writer.
5. Write a node based simulation with a custom class
- Take one of the simulations in the test suite in test/TestCustomVertexSimulations.hpp, and re-write it as a node based simulation. You may find one of the tutorials useful: https://chaste.cs.ox.ac.uk/trac/wiki/UserTutorials#Cell-basedChaste
- Write a custom class that would make sense for a node based simulation, and add it to your new simulation.
Owner
- Name: Chaste - Cancer Heart and Soft Tissue Environment
- Login: Chaste
- Kind: organization
- Email: chaste-users@maillist.ox.ac.uk
- Location: United Kingdom
- Website: https://chaste.github.io/
- Twitter: Chaste_Project
- Repositories: 24
- Profile: https://github.com/Chaste
C++ library for computational biology and physiology simulations
GitHub Events
Total
- Fork event: 1
Last Year
- Fork event: 1