Views
Cm New User Notes
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:
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
groupsin linux terminal. - Replace the command
cvs checkout cm/Makefile cm/make cm/source/fe11.f cm/source/fe20.fwith
cvs checkout cm/Makefile cm/make cm/source/fe11 cm/source/fe20or the split up command appropriately.
- Must be added to cmiss group before you can download the
code. To check, type
- Once you have the code you can type
gmakein 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_EXAMPLESin your terminal. If not set, then in linux typesetenv 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-linuxby 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 Exampleswebsite goCardiac Electro-mechanics modeling-> Coupled electromechanics-> Coupled bidomain-mechanics exampleand 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 viewerfound on the frontpage webpage. - To define a parameter file for a problem, you run
cmand then typefem define para;p;ex-fileand 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
minimalwhich 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-ipparafile 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-ipparafile.) If you want a structured mesh then you must setdot-ipbaseanddot-ipmesh. However, if you desire a less structured mesh, then you must set in sequence adot-ipnode,dot-ipbase, anddot-ipelem.