Skip to content
Snippets Groups Projects
Commit af7d2566 authored by Laura Lindner's avatar Laura Lindner
Browse files

changed name of activationtime textfile

parent a416d8ec
No related branches found
No related tags found
1 merge request!261Resolve "Fix evaluation on cells"
......@@ -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) {
......
......@@ -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=64
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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment