## Continuity 6.4 Overview

### Introduction

- What is Continuity?
- Continuity is a problem-solving environment for modeling in bioengineering and physiology. It is especially useful for solving problems in biomechanics, biotransport and electrophysiology. It also has tools to facilitate symbolic model authoring and compilation, and mesh generation including simple image processing, mesh fitting, and mesh refinement.
- Continuity is composed of two major components known as the Continuity Client and the Continuity Server.
- The client serves as the graphical user interface, and includes a viewer framework with dynamically loadable menus and commands, command and data file editing and I/O, viewers, including 3-D visualization and animation, rendering controls, graphical plotting and image analysis, a scripting shell, and a message area.
- The server has dynamically compilable and loadable numerical analysis functions for finite element modeling, mesh creation, model and data rendering and image analysis, data fitting and anatomic modeling, linear and nonlinear elasticity and biomechanics, reaction-diffusion systems and electrophysiology, transport processes and biophysics, and cell systems modeling.

- Continuity runs on Microsoft Windows (XP and Vista), Linux (tested with Red Hat), Linux64, Rocks clusters, PowerPC MacOS X, and Intel Mac OS X 10.4.

- Implementation
- 98845 lines of high level scripting language Python.
- 76508 lines of Fortran, 7017 of which are f2py wrappers (necessary for interfacing with python)
- Compatible with Intel Fortran compiler and free g95 compiler (Mac/Linux)
- Fortran syntax checker (similar to LINT for C) to catch bugs
- Its use of python and autoconf based Makefile system allows it to be ported to new systems with relative ease.

### Website and Statistics

Available at http://continuity.ucsd.edu

- This website is a Moin Moin based Wiki.
- The Wiki based website makes it very easy to add new content and documentation. The custom theme makes the site look like a conventional website.
- Python based engine, easy to create new themes, python macros, and easy to modify engine for our custom purposes.
- Downloads page, statistics (maintained by python macros)
- Downloaded over 37,000 times since 26-Sep-2005
- 1120 registered users
- Release notes for each release
- 6 public releases in the past 12 months

- Also supports acl’s (access Control Lists)

Continuity Developer's Trac (https://summit.ucsd.edu/cmrg/wiki)

- View source code on web
- Bug tracking (community can submit bugs)

### Installation

- Windows XP / Linux / MacOS X
- Install shield installer on Windows which automatically downloads python if its not available
- MacOS X dmg installer
- Compressed tar ball on Linux (TGZ)

### Automatic testing

- Over 100 test cases (Unit / Integration / System)

### Revision Control (Subversion)

- Tortoise SVN for Windows is very convenient
- Revision numbers -- up to revision 2780+ each with its own log indicating changes

## Continuity 6.4 Tour

### Splash Screen

- Provides registration opportunity
- Registration is encouraged by disabling file saves and webservices in unregistered clients.

- Choose client-only or standalone mode
- Select modules to load

### Viewer Framework

- The GUI and associated visualization environment are implemented within a general purpose “framework” designed for scientific applications developed in Python.
- Viewer Framework and the associated visualization engine, Déjà Vu, were developed by Michel Sanner and colleagues at The Scripps Research Institute.
- Built-in toolbar to quickly access most common features.

### File menu

- This menu includes commands for loading and saving python scripts and data files (including .cont6, xml, xml_pickle, Continuity 5 ipfiles, xls, csv, and image files)
- Includes commands for connecting to, retrieving from, searching, and depositing to a database (such as our public database) that stores continuity objects.
- It also includes commands for specifying and connecting to the server and controlling the characteristics of the GUI such as font types and sizes.

### Edit menu

- This menu includes preferences for screen settings of the Continuity client, and local text editing commands, including cut and paste and changing font size.

### View menu

This menu contains commands for setting and adjusting visualization parameters, using either the Déjà Vu or OpenMesh rendering packages. There are commands for editing and saving the camera view, lighting and dimensions of arrays. It is also used for saving bitmap files and geometric factors. It is used to create and save animations.

### Help menu

- Documentation (takes user to Continuity website)
- Unit test cases
- Demos
- In the future, help will take users to locations on website by subject

### Mesh module

- What is it used for?
- Finite element modeling: A wide variety of one- two- and three-dimensional (hexahedral) Lagrange and Hermite isoparametric basis functions used for finite element interpolation as well as support for conventional tetrahedral simplex elements. Numerical functions associated with elements, Gauss points and quadrature integration. Numerical and graphical functions associated with nodes. General finite element operations and mathematical functions associated with the mesh and dependent variables including interpolation, global-element mapping, coordinate transformations, and computations of metric tensors and related quantities such as arc lengths, and areas. Interfaces between problem definitions and numerical solutions and include algorithms for solution of nonlinear equations, element and global equation assembly, residual calculations, least squares, eigenvalue and time-stepping algorithms. General utility operations, basic numerical algorithms and coordinate transformations.
- Mesh creation: Numerical functions for mesh computation (lines, faces, volumes, connectivity), refinement and subdivision, generation and representation.
- Mesh visualization: Numerical functions and transformation associated with rendering solutions and meshes, data, fibers and text. Rendering routines. Numerical computations and transformations associated with visualizing meshes, data and solutions.
- Model authoring and dynamic compilation and loading of strain energy functions, ionic models, contractile models, biochemical network models, material coordinate transformations and boundary condition models is supported or under development.

- How is it used?
- Via the "mesh" menu, the user can specify, edit, view, refine and list the finite element mesh including geometric and field variables and anatomic properties such as muscle fiber and sheet orientations.
- The menu has cascading “edit”, “list”, and “render” commands for mesh properties such as coordinates, basis functions, nodes, elements, lines, fibers and surfaces.

### Imaging Module

- What is it used for?
- Image analysis including heart wall marker, tracking methods, and image registration and segmentation methods.

- How is it used?
- Via the "Imaging" menu, user can edit images, segment fibers, place markers or "points", orient / register images.
- The user can also output points specified on images as transformed 3D points to "fit" a mesh.
- In the future, we plan to use ITK to make this automatic.

### Fitting Module

- What is it used for?
- Finite element operations and numerical functions for linear and nonlinear data field and anatomical fitting. Computes cavity volumes for heart and other models.

- How is it used?
- Via the "Fitting" menu, the user can edit data, specify smoothing weights and constraints, calculate projections, geometric and field data fitting, and update mesh parameters.
- It is also used for rendering data, points, projections, fibers and images. Data point smoothing weights and fitting constraints are adjusted from this menu. Data editing includes coordinates (number, type), fiber angles, and field variables. Rendering methods include: Translation, rotation, scaling, registration, zooming, landmark selection tools for ventricular images: plane, edge, base contour, apex contour.

### Biomechanics Module

- What does it used for?
- This menu is used for setting up, specifying and executing biomechanical models.
- Soft tissue deformations as a function of boundary conditions, active stress, and nonlinear tissue properties.
- Numerical libraries used for problem definition, assembly, fitting and solving nonlinear hyperelasticity and large displacement elastica problems. Biomechanics problem class definitions including material properties, equations and solution control, strain energy computation used for solving problems in finite deformation elasticity and biomechanics including active properties such as muscle contraction and growth.

- How is it used?
- Properties that can be specified for biomechanics problems include:
- equation type
- solution methods
- material laws and parameters (which can be defined by nodal fields)
- active stress formulation and parameters
- cellular (myofilament activation and crossbridge) model selection
- tissue parameters (such as reference sarcomere length)
- activation time distribution

- pressure, force
- displacement boundary conditions
- initial conditions
- boundary forces
- boundary displacements
- internal pressure
- external pressure
- hydrostatic pressure

- circulatory model used to compute pressure boundary conditions.

- Nonlinear solver variables: steps, iterations, increment, initial time, final time, time step, error tolerances
- Text listing of solutions includes
- stress, strain, nodal and mesh solution values.
- Listing can be done at elements, gauss points, grid, from file

- Rendering (stress or strains)
- Parallelized Solve solve can run on a cluster (with up to 10X speed up.)

- Properties that can be specified for biomechanics problems include:

### Electrophysiology Module

- What is it used for?
- Propagation of action potentials in three-dimensional anisotropic tissues.
- It does this by solving PDEs that describe spatial gradients in voltage and ODEs that describe the active changes in membrane potential.

- Cellular properties, monodomain equations, and solution control
- Collocation-Galerkin solution methods for impulse propagation in excitable cells and heterogeneous anisotropic tissues.
- Includes general purpose linear and ODE solvers, including modifications of third party public domain codes, with an interface for the use of parallel solvers.
- Cell systems modeling (cardiac myocyte cellular ionic models)
- Beeler-Reuter
- Luo-Rudy
- Puglisi-Bers
FitzHugh-Nagumo

Modified FitzHugh-Nagumo

Flaim-Giles-McCulloch

- Support for interfacing general cellular models (See Equation Editor below)

- Propagation of action potentials in three-dimensional anisotropic tissues.
- How is it used?
- Used for initializing, specifying, editing and solving electrophysiology and reaction-diffusion models.
- Settings include parameters for the electrical stimuli, ionic model assembly and time integration schemes.
- Commands also provide for setting the solver type, ECG calculation point, animation and rendering settings.
- Forms accessed from these menus include options for
- Model schematic viewing
- Stimulus settings: ionic model, membrane capacitance, surface to volume ratio, electrode position, field number for diffusion, initial conditions, fields for stimulus
- Integration solution variables: start time, duration, step size, output solution
- Solver types: ODE integration, linear system solvers
- Ionic model settings: start time, impulse length, voltage clamp, number of impulses, prestimulus interval, step voltage-clamp potential, holding voltage-clamp potential, resting membrane voltage

### Equation Editor

- Currently only used for Electrophysiology cellular models (using Radau ODE solver), but will soon be expanded for specifying Biomechanics properties as well.
- Dynamic Fortran generation
- Dynamic compiling
- Dynamic linking
- Use of webservice (currently only available on Windows servers) to dynamically compile cell models in proper environment.

### Biotransport Module

- What is it used for?
- Interfaces and equations for the finite element solution of reaction-diffusion equations with one or more mobile species. Used for solving problems in intracellular and tissue transport such as intracellular calcium diffusion and buffering.

- How is it used?
- At the moment, it is used in a very similar manner to electrophysiology but support for multiple species and Galerkin solutions is under development.