Select Page

Finite element method code for modelling biological cells

Dr John Rugis, Department of Mathematics, Dr Chris Scott, NeSI, Professor James Sneyd, Department of Mathematics, University of Auckland

  1. Home
  2.  • 
  3. Project
  4.  • Finite element method code for modelling biological cells

Background

A collaborative consultation project, aimed at optimising the performance of a custom finite element method (FEM) code, has been undertaken. The aim of this work was to enable the researchers to scale their simulations up and make the best use of NeSI’s High Performance Computing (HPC) platforms. The primary goals were to obtain the best possible performance from the code, while ensuring its robustness and ease of use. The main developer of the code was John Rugis, while support for this project was provided by Chris Scott, through NeSI’s Scientific Programming Consultancy Service.

The research

The FEM code is used to model salivary gland acinar cells (shown in Figure 1) by Professor James Sneyd and his research group (Department of Mathematics, University of Auckland). Understanding how salivary glands work to secrete saliva has important applications for oral health, since a lack of saliva can cause a range of medical conditions, such as dry mouth (xerostomia). With the aid of NeSI’s HPC facility the research group have been using mathematical modelling to answer this interesting physiological question.
As part of this project a series of benchmarks and comparisons were performed between libraries for solving sparse linear systems, such as those arising from the FEM method. The ViennaCL library was eventually selected, as it was found to perform very well and supports a variety of parallelisation options (CUDA, OpenCL and OpenMP), allowing the use of accelerators such as GPUs.
Profiling your code is an important step to ensure there are no unexpected bottlenecks. When profiling the serial version of this code it was found that only a small proportion of the run time was spent solving the sparse linear system, with a large amount of time spent doing other operations outside of the solver. After further investigation, an 8x increase in performance was gained by changing the matrix storage type and thus removing this bottleneck. After making these improvements we benchmarked the different versions of the program, with the results displayed in Figure 2, showing that the GPU version performed twice as fast as the serial version.

Maintaining a single Makefile for the code was cumbersome, since there were a number of different options that had to be chosen at compile time and different rules were required for each machine, which resulted in frequent editing of the Makefile. To alleviate these issues the Makefile was replaced with the CMake build system generator, allowing the options to be selected using command line arguments to CMake. Other nice features of CMake include out-of-source builds, allowing multiple versions to be compiled at once, and the ability to automatically locate dependencies.

Continuous Integration (CI) testing was implemented using the Travis-CI service, which is easy to integrate with GitHub and free for open source projects. With CI, every time a commit is pushed to the repository, or a pull request created, the code is compiled and the tests are run. This means we find out immediately if a change has broken the code and works well when multiple developers are collaborating. A weekly test of the code on the NeSI Pan cluster was also implemented. This testing gives the researchers confidence that their simulations are behaving as expected.

Figure 1. Full 3D model of a cluster of parotid acinar cells.
Figure 2. Benchmark results showing the speedup obtained from the ViennaCL OpenMP (8 cores) and CUDA and MKL (8 cores) versions.

This code is typically used to perform parameter sweeps, which can involve large numbers of simulations. For example, varying 2 parameters, with each taking 5 values, for the 7 individual cells in the model, results in 175 simulations. To facilitate the submission of these types of jobs a runtime environment was created, where there is a single config file to be edited, defining the sweep, and a single Python script that launches the set of simulations. Another Python script can be used to generate graphs from the simulations, making it easy to visualise the results.

As a result of this project the researcher’s simulations are now running faster, it is easier for the researchers to submit and analyse large parameter sweeps and robust software development practices are being utilised, giving the researchers confidence in their results and making future development easier. Recent results from this work (see DOI:10.1016/j.jtbi.2016.04.030) have investigated calcium dynamics in individual cells. The next stages of the project are to incorporate fluid flow within the model and also to couple individual cells together to model the full cluster of parotid acinar cells.

Links

https://github.com/jrugis/cellsim_34_vcl (repository for the FEM code)
https://github.com/jrugis/CellSims (repository for the runtime environment)
https://travis-ci.org/jrugis/cellsim_34_vcl (Travis-CI builds page for the FEM code)

See more case study projects

The impact of upzoing on housing construction in Auckland

The impact of upzoing on housing construction in Auckland

Extended reality is turning cancer research into a team sport

Extended reality is turning cancer research into a team sport

Analysis of incidents on New Zealand beaches

Analysis of incidents on New Zealand beaches

Painting the brain: multiplexed tissue labelling of human brain tissue to facilitate discoveries in neuroanatomy

Painting the brain: multiplexed tissue labelling of human brain tissue to facilitate discoveries in neuroanatomy

Decoding the work-from-home phenomenon: insights from location-based service data

Decoding the work-from-home phenomenon: insights from location-based service data

The use of digital footprints in the US mortgage market

The use of digital footprints in the US mortgage market

Detecting anomalous matches in professional sports: a novel approach using advanced anomaly detection techniques

Detecting anomalous matches in professional sports: a novel approach using advanced anomaly detection techniques

Benefits of linking routine medical records to the GUiNZ longitudinal birth cohort: Childhood injury predictors

Benefits of linking routine medical records to the GUiNZ longitudinal birth cohort: Childhood injury predictors

Using a virtual machine-based machine learning algorithm to obtain comprehensive behavioural information in an in vivo Alzheimer’s disease model

Using a virtual machine-based machine learning algorithm to obtain comprehensive behavioural information in an in vivo Alzheimer’s disease model

Mapping livability: the “15-minute city” concept for car-dependent districts in Auckland, New Zealand

Mapping livability: the “15-minute city” concept for car-dependent districts in Auckland, New Zealand

Quantifying gas narcosis in compressed gas diving

Quantifying gas narcosis in compressed gas diving

Estimating quality of life: a spatial microsimulation model of wellbeing in Aotearoa New Zealand

Estimating quality of life: a spatial microsimulation model of wellbeing in Aotearoa New Zealand

Video compression for REACH Lab’s study of  family resilience and wellbeing

Video compression for REACH Lab’s study of family resilience and wellbeing

Listening to equations: a tool for the audification of heteroclinic networks

Listening to equations: a tool for the audification of heteroclinic networks

The Effects of Short-Term Tourist Rentals on Local Residents

The Effects of Short-Term Tourist Rentals on Local Residents

Accounting for Errors in Data Improves Divergence Time Estimates in Single-cell Cancer Evolution

Accounting for Errors in Data Improves Divergence Time Estimates in Single-cell Cancer Evolution

VRhook: A Data Collection Tool for VR Motion Sickness Research

VRhook: A Data Collection Tool for VR Motion Sickness Research

Ahuahu Great Mercury Island Online Database

Ahuahu Great Mercury Island Online Database

Automating Data Collection and Generation for The Rongowai Mission

Automating Data Collection and Generation for The Rongowai Mission

Travelling Heads – Measuring Reproducibility and Repeatability of Magnetic Resonance Imaging in Dementia

Travelling Heads – Measuring Reproducibility and Repeatability of Magnetic Resonance Imaging in Dementia

Novel Subject-Specific Method of Visualising Group Differences from Multiple DTI Metrics without Averaging

Novel Subject-Specific Method of Visualising Group Differences from Multiple DTI Metrics without Averaging

Interpretation of Non-coding Mutations Driving Melanoma Risk and Its Comorbidities

Interpretation of Non-coding Mutations Driving Melanoma Risk and Its Comorbidities

Who Are The 1M and 1X? Police Engagement with Citizens in Mental Distress

Who Are The 1M and 1X? Police Engagement with Citizens in Mental Distress

Representation of Multimodel Data – A Challenging Task

Representation of Multimodel Data – A Challenging Task

Assessing Marine Ecosystems to Improve Management

Assessing Marine Ecosystems to Improve Management

Metadata Catalogue in High Value  Nutrition (National Science Challenge)

Metadata Catalogue in High Value Nutrition (National Science Challenge)

Improving In Vitro Fertilisation (IVF) with Machine and Deep Learning

Improving In Vitro Fertilisation (IVF) with Machine and Deep Learning

Pacific Rheumatic Fever Project

Pacific Rheumatic Fever Project

Developing a genomics-specific Data Management Plan (DMP) using the  Data Stewardship Wizard

Developing a genomics-specific Data Management Plan (DMP) using the Data Stewardship Wizard

Understanding the effects of Airbnb on land use, land value and regulation

Understanding the effects of Airbnb on land use, land value and regulation

Calibrating gravitational wave signal parameters of Extreme Mass Ratio Inspirals (EMRIs)

Calibrating gravitational wave signal parameters of Extreme Mass Ratio Inspirals (EMRIs)

Automated stone artefacts classification using machine learning

Automated stone artefacts classification using machine learning

Hands-on DNA: exploring the impact of virtual reality on teaching DNA structure and function

Hands-on DNA: exploring the impact of virtual reality on teaching DNA structure and function

Re-assess urban spaces under COVID-19 impact: sensing Auckland social ‘hotspots’ with mobile location data

Re-assess urban spaces under COVID-19 impact: sensing Auckland social ‘hotspots’ with mobile location data

Aotearoa New Zealand’s changing coastline – Resilience to Nature’s Challenges (National Science Challenge)

Aotearoa New Zealand’s changing coastline – Resilience to Nature’s Challenges (National Science Challenge)

Auckland housing and land use geo-data

Auckland housing and land use geo-data

Rapid monitoring of infrastructural health using remote sensing

Rapid monitoring of infrastructural health using remote sensing

Enhancing Spontaneous Recovery after Stroke Study (ESPRESSo)

Enhancing Spontaneous Recovery after Stroke Study (ESPRESSo)

Data analytics and visualisation for improving  public health and transport planning

Data analytics and visualisation for improving public health and transport planning

Data maturity project in High Value Nutrition (Phase 2) – National Science Challenge

Data maturity project in High Value Nutrition (Phase 2) – National Science Challenge

Supporting the airborne remote sensing mission – Rongowai

Supporting the airborne remote sensing mission – Rongowai

A collaborative extended reality tool to examine tumour evolution (Phase II)

A collaborative extended reality tool to examine tumour evolution (Phase II)

Data maturity project in High Value Nutrition, National Science Challenge

Data maturity project in High Value Nutrition, National Science Challenge

Haka on the move: sport circuits and cultural performance 

Haka on the move: sport circuits and cultural performance 

Proteins under a computational microscope: designing in-silico strategies to understand and develop molecular functionalities in Life Sciences and Engineering

Proteins under a computational microscope: designing in-silico strategies to understand and develop molecular functionalities in Life Sciences and Engineering

Remote temperature monitoring to reduce the spread of COVID-19

Remote temperature monitoring to reduce the spread of COVID-19

COVID-19 exponential growth visualisation

COVID-19 exponential growth visualisation

Developing virtual capabilities for the Science Payload Operations Centre

Developing virtual capabilities for the Science Payload Operations Centre

Hosting visualisation and analytics tools for COVID-19 studies

Hosting visualisation and analytics tools for COVID-19 studies

Exploring perceptions towards climate change over time on Twitter

Exploring perceptions towards climate change over time on Twitter

Coastal image classification and nalysis based on convolutional neural betworks and pattern recognition

Coastal image classification and nalysis based on convolutional neural betworks and pattern recognition

Calcium signalling in salivary gland acinar cells

Calcium signalling in salivary gland acinar cells

Anti-corruption regulations for promoting socially responsible practices

Anti-corruption regulations for promoting socially responsible practices

Determinants of translation efficiency in the evolutionarily-divergent protist Trichomonas vaginalis

Determinants of translation efficiency in the evolutionarily-divergent protist Trichomonas vaginalis

Analysing text data by time-series feature engineering

Analysing text data by time-series feature engineering

An investigation into Leap Motion device for “gesture-as-sign”

An investigation into Leap Motion device for “gesture-as-sign”

Antibiotic resistance and the “end of modern medicine ”

Antibiotic resistance and the “end of modern medicine ”

Develop short-term eruption warning systems for Whakaari and other volcanoes

Develop short-term eruption warning systems for Whakaari and other volcanoes

Evenly spaced observation fields from irregularly sampled data in the Southern Ocean

Evenly spaced observation fields from irregularly sampled data in the Southern Ocean

Measuring impact of entrepreneurship activities on students’ mindset, capabilities and entrepreneurial intentions

Measuring impact of entrepreneurship activities on students’ mindset, capabilities and entrepreneurial intentions

Using Zebra Finch data and deep learning classification to identify individual bird calls from audio recordings

Using Zebra Finch data and deep learning classification to identify individual bird calls from audio recordings

NETwork! analysis in cancer – managing genomics research data and building a repository workflow

NETwork! analysis in cancer – managing genomics research data and building a repository workflow

The Coronary Atlas – data processing workflow optimisation

The Coronary Atlas – data processing workflow optimisation

3D visualisation of indigenous burial site in Roonka

3D visualisation of indigenous burial site in Roonka

Automated measurement of intracranial cerebrospinal fluid volume and outcome after endovascular thrombectomy for ischemic stroke

Automated measurement of intracranial cerebrospinal fluid volume and outcome after endovascular thrombectomy for ischemic stroke

A new ‘stratigraphy’: interpreting object relationships with 3D point densities

A new ‘stratigraphy’: interpreting object relationships with 3D point densities

Towards the use of deep learning techniques for storm surge prediction

Towards the use of deep learning techniques for storm surge prediction

Using simple models to explore complex dynamics: A case study of macomona liliana (wedge-shell) and nutrient variations

Using simple models to explore complex dynamics: A case study of macomona liliana (wedge-shell) and nutrient variations

Development of Machine Learning methodology for genomic research

Development of Machine Learning methodology for genomic research

An Archaeological database for threatened North Island rock art in New Zealand

An Archaeological database for threatened North Island rock art in New Zealand

Presence: distributed mixed reality learning environment

Presence: distributed mixed reality learning environment

Digital video and the early learning lab

Digital video and the early learning lab

Publishing the Bay of Island Bottlenose dolphin catalogue

Publishing the Bay of Island Bottlenose dolphin catalogue

Modelling the diurnal cycle* of winds and clouds

Modelling the diurnal cycle* of winds and clouds

Presence: distributed mixed reality learning environment

Presence: distributed mixed reality learning environment

Using research virtual machines to analyse fMRI datasets

Using research virtual machines to analyse fMRI datasets

Genomic Virtual Lab (GVL) as a bioinformatics training platform

Genomic Virtual Lab (GVL) as a bioinformatics training platform

SwiftLaTeX- Exploring web-based true WYSIWYG editing for digital publishing

SwiftLaTeX- Exploring web-based true WYSIWYG editing for digital publishing

Climate change impacts on weather-related hazards

Climate change impacts on weather-related hazards

Understanding tumour evolution through augmented reality

Understanding tumour evolution through augmented reality

Myocardial motion tracking and strain calculation using Deep Learning networks

Myocardial motion tracking and strain calculation using Deep Learning networks

OnTask pilot at the Centre for Learning and Research in Higher Education

OnTask pilot at the Centre for Learning and Research in Higher Education

Visualising the University campus in 3D

Visualising the University campus in 3D

Visualising protein interaction

Visualising protein interaction

Biological heritage National Science Challenge eDNA virtual hub

Biological heritage National Science Challenge eDNA virtual hub

Interactive AR art – Project Gordon

Interactive AR art – Project Gordon

1-D numerical models of post-glacial river evolution

1-D numerical models of post-glacial river evolution

Mathematically modelling gastrointestinal electrical activity

Mathematically modelling gastrointestinal electrical activity

3D Cryo-EM reconstructions of macromolecular complexes

3D Cryo-EM reconstructions of macromolecular complexes

Engine knock in a spark-ignition engine with hydrogen supplementation

Engine knock in a spark-ignition engine with hydrogen supplementation

The complex unsteady flow within a fluid-filled annulus and its transition to turbulence

The complex unsteady flow within a fluid-filled annulus and its transition to turbulence

Using data mining for digital ink recognition

Using data mining for digital ink recognition

The landscape costs of brushtail possum dispersal

The landscape costs of brushtail possum dispersal

Accelerating the discovery of natural products made by orphan megasynthases

Accelerating the discovery of natural products made by orphan megasynthases

Improving the short term precipitation forecasts for New Zealand

Improving the short term precipitation forecasts for New Zealand

Finding genetic variants responsible  for human disease hiding in the universe of benign variants

Finding genetic variants responsible for human disease hiding in the universe of benign variants

Revealing key processes in enzyme efficiency through high performance computing

Revealing key processes in enzyme efficiency through high performance computing

3D Electromagnetic modeling and simulation using heterogeneous computing

3D Electromagnetic modeling and simulation using heterogeneous computing

Hemodynamics in the microcirculation

Hemodynamics in the microcirculation

Putting turbulence to work

Putting turbulence to work

Why are some molecules drugs?

Why are some molecules drugs?

Bayesian additive regression trees  vs logistic regression – estimation of propensity scores

Bayesian additive regression trees vs logistic regression – estimation of propensity scores

Fully coupled thermo-hydro-mechanical modelling of permeability enhancement by the finite element method

Fully coupled thermo-hydro-mechanical modelling of permeability enhancement by the finite element method

Modelling dispersal and ecological competition in a statistical phylogeographic framework

Modelling dispersal and ecological competition in a statistical phylogeographic framework

Studying the shape and the size of the universe

Studying the shape and the size of the universe

Planet hunting

Planet hunting

Simulating quantum mechanics on high performance computing cluster

Simulating quantum mechanics on high performance computing cluster

Multiscale modelling of saliva secretion

Multiscale modelling of saliva secretion

Modelling dual reflux pressure swing adsorption (DR-PSA) units for gas separation in natural gas processing

Modelling dual reflux pressure swing adsorption (DR-PSA) units for gas separation in natural gas processing

Improving the treatment of heart disease

Improving the treatment of heart disease

Estimating migration rates in the budding yeast Saccharomyces cerevisiae

Estimating migration rates in the budding yeast Saccharomyces cerevisiae

Number theoretic algorithms in cryptography

Number theoretic algorithms in cryptography

Molecular phylogenetics uses genetic data to reconstruct the evolutionary history of individuals, populations or species

Molecular phylogenetics uses genetic data to reconstruct the evolutionary history of individuals, populations or species

Phylogeny and phylogeography of the family kyphosidae (Perciformes: teleostei)

Phylogeny and phylogeography of the family kyphosidae (Perciformes: teleostei)

Testing what cosmic inflation really predicts

Testing what cosmic inflation really predicts

Multigene environmental DNA data analysis for New Zealand genomic observatory

Multigene environmental DNA data analysis for New Zealand genomic observatory

Finding genetic variants responsible for human disease hiding in universe of benign variants

Finding genetic variants responsible for human disease hiding in universe of benign variants

BEAST, Bayesian evolutionary analysis sampling trees

BEAST, Bayesian evolutionary analysis sampling trees

The formation of surface archaeological deposits in arid Australia

The formation of surface archaeological deposits in arid Australia

Statistical modelling of carryover effects after cessation of treatments

Statistical modelling of carryover effects after cessation of treatments

High-resolution cryo-electron microscopy of protein complexes and machines

High-resolution cryo-electron microscopy of protein complexes and machines

ARCI, archaeology eResearch collaboration initiative

ARCI, archaeology eResearch collaboration initiative

Optimisation of blades on large wind turbines with individual pitch control and trailing edge flaps

Optimisation of blades on large wind turbines with individual pitch control and trailing edge flaps

Quality of care and outcomes in children with cleft lip and/or palate

Quality of care and outcomes in children with cleft lip and/or palate

Geographic and temporal information retrieval on massive document collections

Geographic and temporal information retrieval on massive document collections

Homodynamics in the microcirculation

Homodynamics in the microcirculation

Processing structure-from-motion photogrammetry on the cluster

Processing structure-from-motion photogrammetry on the cluster

Computational investigation of catalysis mechanisms for polyurethane synthesis

Computational investigation of catalysis mechanisms for polyurethane synthesis

Virtual childhood obesity prevention laboratory

Virtual childhood obesity prevention laboratory

Giving Pacific research greater reach

Giving Pacific research greater reach

Development of novel waveguides  in the terahertz (THz) region

Development of novel waveguides in the terahertz (THz) region

Modelling of costs of diets  by INFORMAS

Modelling of costs of diets by INFORMAS

Foodback

Foodback

Finite element method code for  modelling biological cells

Finite element method code for modelling biological cells

The future of memory: Neuroimaging memory and imagination with functional MRI

The future of memory: Neuroimaging memory and imagination with functional MRI

Modelling and visualisation of calcium waves in parotid acinar cells

Modelling and visualisation of calcium waves in parotid acinar cells

Mapping donor contributions in the Pacific

Mapping donor contributions in the Pacific

Visualising humpback whale migration

Visualising humpback whale migration

Visualising the 2010 and 2011  Canterbury earthquakes

Visualising the 2010 and 2011 Canterbury earthquakes

Data management planning for MOA*

Data management planning for MOA*

Research data publishing  and preservation at COMPASS

Research data publishing and preservation at COMPASS

Centre for eResearch machine learning service

Centre for eResearch machine learning service

Building a discrete global  grid gazetteer service

Building a discrete global grid gazetteer service

The new Wanhal catalogue

The new Wanhal catalogue

Passive acoustic modelling

Passive acoustic modelling

Using GPUs to expand our understanding of the Solar System

Using GPUs to expand our understanding of the Solar System

Shedding new light on dark matter

Shedding new light on dark matter

Aerodynamics modelling paves the way for improved yacht designs

Aerodynamics modelling paves the way for improved yacht designs

Modernising models to help diagnose or treat disease and injury

Modernising models to help diagnose or treat disease and injury

Wandering around the molecular landscape: embracing virtual reality as a research showcasing outreach and teaching tool

Wandering around the molecular landscape: embracing virtual reality as a research showcasing outreach and teaching tool

ALTER: Between human and nonhuman – a VR art exhibition

ALTER: Between human and nonhuman – a VR art exhibition

Disposition of Microsoft HoloLenses for a Pop-Up Reality Shop to demonstrate the progress of a research project

Disposition of Microsoft HoloLenses for a Pop-Up Reality Shop to demonstrate the progress of a research project

Improving diagnosis for schistosomiasis by using the ‘metabolic footprint’ of urine samples from an animal model of Schistosoma infection to identify possible biomarkers

Improving diagnosis for schistosomiasis by using the ‘metabolic footprint’ of urine samples from an animal model of Schistosoma infection to identify possible biomarkers

Making stroke recovery prediction tools freely available

Making stroke recovery prediction tools freely available

MFT-ICR mass spectrometry data management and analysis workflow

MFT-ICR mass spectrometry data management and analysis workflow

Taking a ‘Big Data’ approach to find new clinical-omic associations in cancer

Taking a ‘Big Data’ approach to find new clinical-omic associations in cancer

Growing Up in New Zealand

Growing Up in New Zealand

Improving arrival time predictions for vehicles in a public transport network

Improving arrival time predictions for vehicles in a public transport network

Distributed and cloud-based control at field-level for systems interacting with soft bodies

Distributed and cloud-based control at field-level for systems interacting with soft bodies

Mobile Click Fraud Attack (MCFA)

Mobile Click Fraud Attack (MCFA)

Skin-omics: exploring the volatile organic compounds on human skin

Skin-omics: exploring the volatile organic compounds on human skin

New analytics tools for workload planning for the 2018 New Zealand Census

New analytics tools for workload planning for the 2018 New Zealand Census

Visualising the New Zealand Index of Multiple Deprivation

Visualising the New Zealand Index of Multiple Deprivation