-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathINSTRUCTIONS.txt
50 lines (39 loc) · 2.47 KB
/
INSTRUCTIONS.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Once the solver is installed on your Linux workstation/cluster, the
following steps show you how to use the solver for making the most out
of your time as a researcher!
1) Use the function "matlab/dune_exporter.m" to save the required .dgf
file of your mesh. This function needs the nodes, tetrahedra, approximate
electrode positions and approximate ground position as arguments. You
further specify the name of your mesh and the path where you want to save
it (tip: use "<solverpath>/data/" as your path to save the files directly
to the directory where you have to put them anyways).
2) In "data/parameter" you have to add another line with your newly created
Mesh and uncomment all other meshes. This file is your main interaction
point with the solver. Here you specify what you want it to do. Should it
compute the jacobian matrix or not? Do you need the electrode voltages or
only the jacobian matrix? If you have run the solver already once on the
same number of parallel processes, then you should set the parameter
"fem.io.loadPartitions" to true - this saves you a lot of time!
The current pattern you would like the solver to run is also specified
here. Normally you shouldn't be required to change the preconditioner and
solver nor the precision and iterations.
3) Once your parameters are set the way you want, simply run the solver:
>> mpirun -np 10 ./dune_peits
where the option -np specifies how many parallel processes you want.
During the execution you will be kept up to date what the solver is
currently computing. Finally, it writes the requested results to
binary files in the output/ directory.
4) Those binary files you can now easily load back to matlab:
With "matlab/load_sigma_vector_binary.m" you should first load the
sigma vector, which also contains the element IDs. These are required
to sort your sigma vector and the columns of the jacobian. We need to
do this, because the solver rearranges the elements when loading the
mesh - so they are not in the same order anymore than what you had
in Matlab when writing the dgf file.
You can do the sorting by:
>> sorted_sigma = zeros(size(elementIDs));
>> sorted_sigma(elementIDs) = unsorted_sigma;
and similarly for the jacobian columns.
For loading of the jacobian matrix you use "matlab/load_jacobian_binary.m"
and for loading the electrode voltages "matlab/load_electrode_voltages_binary.m".
5) This is it! If something is unclear, contact me: markus.jehl.11@ucl.ac.uk