Personal tools
You are here: Home cm Wiki Cm New User Notes
Views
Cm New User Notes copied.

Cm New User Notes

last edited 1 year ago by cantell

Note: Paths apply to the Bioengineering Institute file system.

Home Directory for CMISS code:

  • /hpc/cmiss
    • Main repository for lots of stuff related to CMISS, in particular, you'll find cmgui and cm in this directory.

Important Sub-directories:

  • /hpc/cmiss/cm/source
    • Contains all fortran files and include files that together constitutes back-end part of CMISS (called cm).
  • /hpc/cmiss/examples
    • Contains the examples which are best seen online.

Environment Variables:

To set up your environment to work with CMISS at the Bioengineering Institute there are three environment variables that should be configured so that CMISS executes correctly.

  • CMISS_ROOT /hpc/cmiss
  • CMISS_EXAMPLES $CMISS_ROOT/examples
  • PATH Include the $CMISS_ROOT/bin/ directory for your operating system and the general one.

A script to do just this is available here:

for tcsh or csh add sourcing of /hpc/cmiss/bin/user.csh into your .cshrc in your home directory,

for ksh or bash add sourcing of /hpc/cmiss/bin/user.sh into your .profile in your home directory.

CMISS Website:

http://www.cmiss.org

CMISS Examples Website:

http://cmiss.bioeng.auckland.ac.nz/development/examples/

A Strategy for Getting Started:

  • From CMISS website, go to frontpage for all of your beginner questions. (Very Useful!)
  • On this web page click on editingcmsource in order to download all or part of cm. To get your hands dirty, follow directions under Initial Setup and Local cm. Go no further than Debugging for now.
    • Must be added to cmiss group before you can download the code. To check, type groups in linux terminal.
    • Replace the command

      cvs checkout cm/Makefile cm/make cm/source/fe11.f cm/source/fe20.f

      with

      cvs checkout cm/Makefile cm/make cm/source/fe11 cm/source/fe20

      or the split up command appropriately.

  • Once you have the code you can type gmake in the cm/ directory and this will create an executable. The executable will be located in bin/i686-linux/ as cm-debug.
  • Now you are ready to run some examples so got to CMISS Examples
  • Make sure your environment is set for CMISS_EXAMPLES by typing echo $CMISS_EXAMPLES in your terminal. If not set, then in linux type setenv CMISS_EXAMPLES /product/cmiss/examples.
  • Then go _Defining a finite element of boundary element mesh-> Creating simple 2D meshes->Defining a simple 2D FEM mesh_ and look at this example.
  • Run this example inside of cm/bin/i686-linux by issuing the command ./cm-debug -example 111. Note that all examples are run in the same fashion by typing ./cm-debug -example xxxx.
  • Go through the long list of examples in the same way as described above.

General Beginner's Advice:

  • Go to cm Lookup Frontend and search for solve and see what you get. Note that there exists a button to view the routines. You can also use this if you are unsure of any parameters or variables.
  • One of the key input files is the parameter file. To see an example, from the CMISS Examples website go Cardiac Electro-mechanics modeling-> Coupled electromechanics-> Coupled bidomain-mechanics example and look at the emech.ippara file that is linked to at the bottom. Understanding these parameter is essential to run 3D problems.

    Note: You can search for these parameters with cm source viewer found on the frontpage webpage.

  • To define a parameter file for a problem, you run cm and then type fem define para;p;ex-file and then fill in the appropriate numbers.
  • It appears that creating a parameter file is a bit of voodoo plus experience. There is currently no way to run setup, however there exists the use of minimal which I have yet to understand.
  • To see an example (with some comments) of an ippara file for a Bidomain problem go to Bidomain Example .

Advice on Creating/Understanding Dot-Com Files:

  • A dot-ippara file is not necessary for small simple problems.
  • There are two ways to define the finite element mesh depending on whether the mesh is relatively structured or not. (This all takes place after defining your dot-ippara file.) If you want a structured mesh then you must set dot-ipbase and dot-ipmesh. However, if you desire a less structured mesh, then you must set in sequence a dot-ipnode, dot-ipbase, and dot-ipelem.