Skip to content

dealii code associated with the manuscript "A comparison of brain retraction mechanisms using finite element analysis and the effects of regionally heterogeneous material properties"

Notifications You must be signed in to change notification settings

BRAINIACS-Group/efiSim1F_Brain_Retraction

Repository files navigation

efiSim1F_Brain_retraction

This code is associated with the publication

A comparison of brain retraction mechanisms using finite element analysis and the effects of regionally heterogeneous material properties

by Emma Griffiths, Jayaratnam Jayamohan and Silvia Budday.

The following code was run using dealii@9.3.1, boost@1.77.0 and openmpi@4.1.1.

Three examplar input parameter files (.prm files) and their associated meshed human brain models (.inp files) used in the above study have been provided.

Installation

The efi library requires deal.II 9.1.1 to be installed with trilinos enabled. It is recommended to install dealii via spack. Further, the boost libraries filesystem, tti, and any are required.

  1. Make project directory, e.g. myproject.
  2. Enter the directory.
  3. Copy the src folder and simulation folders (i.e. Brain_incision_L12mm_W4mm_30mm_12p5mm_Loc1_4R_med) to the project directory.
  4. Enter the simulation directory.
  5. Run cmake (out-of-source-build).

To do so, run the following comands in a terminal:


spack load dealii@...
spack load boost@...
spack load openmpi@...
mkdir myproject
cd myproject
cp -a /path/to/src .
cp -r /path/to/simulation .
cd /simulation 
cmake ../src
make debug

or alternatively


make release

Runnig the executable

The executable can be run form the terminal via


mpirun -np 1 --bind-to socket efi_vlab 3 Brain_incision_L12mm_W4mm_30mm_12p5mm_Loc1_4R_med/Brain_incision_L12mm_W4mm_30mm_12p5mm_Loc1_4R_med.prm

where the number after -np specifies the number of processors, the argument after --bind-to specifies the binding pattern, efi_vlab is the application we want to run (short for emerging fields initiative virtual laboratory). The following two arguments specify the number of threads per process and the input paramter file, here 3 and myparams, respectively.

Eclipse support

Instead of running


cmake ../src

use the command


cmake -D_ECLIPSE_VERSION=4.8 -G"Eclipse CDT4 - Unix Makefiles" ../src/

instead. Now, open eclipse and import the folder myproject choosing "Existing Code as Makefile Project". Note that if you add header files to src/include everything is fine, but if you add new source files you have to run $cmake ../src from the build folder, otherwise the makefile won't be updated and the new source file will be ignored. Make sure that you are not using the flags -D_ECLIPSE_VERSION=4.8 -G"Eclipse CDT4 - Unix Makefiles" this time.

Adding bulid targets

In the build tasks tab in the eclipse editor, klick on your project, choose the build folder and create the targets "debug", "release", and "clean". These targets do exactly what their names say, building in debug/release mode, or cleaning the make-output.

About

dealii code associated with the manuscript "A comparison of brain retraction mechanisms using finite element analysis and the effects of regionally heterogeneous material properties"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published