Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CardMech
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KIT
Mpp
CardMech
Commits
af7d2566
Commit
af7d2566
authored
1 year ago
by
Laura Lindner
Browse files
Options
Downloads
Patches
Plain Diff
changed name of activationtime textfile
parent
a416d8ec
No related branches found
No related tags found
1 merge request
!261
Resolve "Fix evaluation on cells"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/electrophysiology/assemble/IElphyAssemble.cpp
+5
-1
5 additions, 1 deletion
src/electrophysiology/assemble/IElphyAssemble.cpp
tools/solving/biventricleThesis.py
+12
-9
12 additions, 9 deletions
tools/solving/biventricleThesis.py
with
17 additions
and
10 deletions
src/electrophysiology/assemble/IElphyAssemble.cpp
+
5
−
1
View file @
af7d2566
...
...
@@ -168,7 +168,11 @@ void IElphyAssemble::PlotActivation() const {
plot
.
PlotFile
(
"ActivationTime"
);
}
void
IElphyAssemble
::
writeActivationTimeFile
()
const
{
string
filename
(
"data/AT.txt"
);
string
lLevel
;
Config
::
Get
(
"ElphyLevel"
,
lLevel
);
string
tLevel
=
"0"
;
Config
::
Get
(
"ElphyTimeLevel"
,
tLevel
);
string
filename
(
"data/AT_l"
+
lLevel
+
"j"
+
tLevel
+
".txt"
);
std
::
fstream
file_out
;
ExchangeBuffer
B
;
for
(
row
r
=
(
*
activationTime
).
rows
();
r
!=
(
*
activationTime
).
rows_end
();
++
r
)
{
...
...
This diff is collapsed.
Click to expand it.
tools/solving/biventricleThesis.py
+
12
−
9
View file @
af7d2566
...
...
@@ -4,31 +4,33 @@ import os
import
shutil
import
mpp.python.mppy
as
mppy
lList
=
[
0
,
1
,
2
,
3
]
tList
=
[
0
,
1
,
2
,
3
]
lList
=
[
0
]
#
,1,2,3]
tList
=
[
0
]
#
,1,2,3]
#start_dt=0.0001
start_dt
=
0.0004
path
=
'
../../../data/biventricleTT/
'
pathToMakeFolders
=
path
#'../'+path
def
moveActivationtime
(
l
,
j
,
expPath
):
shutil
.
move
(
'
../../build/data/vtu/ActivationTime.vtu
'
,
pathToMakeFolders
+
expPath
+
'
AT_l
'
+
str
(
l
)
+
'
j
'
+
str
(
j
)
+
'
.vtu
'
)
def
moveActivationtime
(
l
,
j
,
expPath
,
moveVtu
=
False
):
shutil
.
move
(
'
../../build/data/AT_l
'
+
str
(
l
)
+
'
j
'
+
str
(
j
)
+
'
.txt
'
,
pathToMakeFolders
+
expPath
+
'
AT_l
'
+
str
(
l
)
+
'
j
'
+
str
(
j
)
+
'
.txt
'
)
if
moveVtu
:
shutil
.
move
(
'
../../build/data/vtu/ActivationTime.vtu
'
,
pathToMakeFolders
+
expPath
+
'
AT_l
'
+
str
(
l
)
+
'
j
'
+
str
(
j
)
+
'
.vtu
'
)
def
startExperiment
(
procs
,
startconf
,
pE
,
added
=
None
):
def
startExperiment
(
procs
,
startconf
,
pE
,
added
=
None
,
moveVTU
=
False
):
checkIfFolderExists
(
pE
)
mpp
=
mppy
.
Mpp
(
project_name
=
'
CardMech
'
,
executable
=
'
Elphy-M++
'
,
kernels
=
4
,
mute
=
False
)
for
l
in
lList
:
for
j
in
tList
:
file
=
path
+
pE
+
'
log_l
'
+
str
(
l
)
+
'
j
'
+
str
(
j
)
+
'
m1
'
kwargs
=
{
"
ElphyLevel
"
:
l
,
"
DeltaTime
"
:
start_dt
*
2
**
(
-
j
),
"
logfile
"
:
file
,
"
EndTime
"
:
0.3
,
"
ElphyVTK
"
:
0
}
kwargs
=
{
"
ElphyLevel
"
:
l
,
"
DeltaTime
"
:
start_dt
*
2
**
(
-
j
),
"
logfile
"
:
file
,
"
EndTime
"
:
0.3
,
"
ElphyVTK
"
:
0
,
"
ElphyTimeLevel
"
:
j
}
if
added
!=
None
:
kwargs
.
update
(
added
)
mpp
.
run
(
procs
,
config
=
startconf
,
kwargs
=
kwargs
)
#replace 64 by hosts if necessary
moveActivationtime
(
l
,
j
,
pE
)
moveActivationtime
(
l
,
j
,
pE
,
moveVTU
)
def
checkIfFolderExists
(
path
):
folderPath
=
pathToMakeFolders
+
path
...
...
@@ -36,7 +38,7 @@ def checkIfFolderExists(path):
os
.
makedirs
(
folderPath
)
if
__name__
==
"
__main__
"
:
procs
=
6
4
procs
=
4
startconf
=
"
electrophysiology/BiVentricleTest/biventricelTest
"
...
...
@@ -44,7 +46,8 @@ if __name__=="__main__":
#startExperiment(procs,startconf,pathExperiment,{"ElphyModelName": "TenTusscher"})
pathExperiment
=
"
OnCells/SI0004/
"
startExperiment
(
procs
,
startconf
,
pathExperiment
,{
"
ElphyModelName
"
:
"
TenTusscher
"
,
"
ElphyModel
"
:
"
SemiImplicitOnCells
"
,
"
ParallelPlotting
"
:
0
,
"
Compression
"
:
"
ascii
"
})
moveVTU
=
False
startExperiment
(
procs
,
startconf
,
pathExperiment
,{
"
ElphyModelName
"
:
"
TenTusscher
"
,
"
ElphyModel
"
:
"
SemiImplicitOnCells
"
,
"
ParallelPlotting
"
:
False
,
"
Compression
"
:
"
ascii
"
},
moveVTU
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment