| | |
| | | |
| | | def single_vtu_ulm2(vesicle): |
| | | R0=ts.getR0(vesicle) |
| | | print(type(R0)) |
| | | print(R0) |
| | | # print(type(R0)) |
| | | # print(R0) |
| | | ts.preparationSh(vesicle, R0) |
| | | ts.calculateUlmComplex(vesicle) |
| | | strng = ts.Ulm2Complex2String(vesicle).decode('ascii') |
| | | print(strng) |
| | | # print(strng) |
| | | retval=strng.split(' ') |
| | | # ts.freeUlm2String(strng) |
| | | return retval |
| | |
| | | """Function reads existing data_tspoststat and checks if there are new VTUs in the directory that were not poststated. If there are, then they are added to the list""" |
| | | try: |
| | | csvdict=read_csv(os.path.join(directory,'data_tspoststat.csv')) |
| | | ulm2dict=read_csv(os.path.join(directory,'ulm2.csv')) |
| | | except FileNotFoundError: |
| | | #print("no file") |
| | | csvdict={'OuterLoop':['OuterLoop', 'Volume', 'Area', 'lamdba1', 'lambda2', 'lambda3', 'Nbw/Nb', 'hbar', 'StretchingE', 'avgFx', 'avgFy', 'avgFz', 'BendingEonlyC0']} |
| | | try: |
| | | os.unlink(os.path.join(directory,'ulm2.csv')) |
| | | except: |
| | | print("No need to delete ulm2.csv") |
| | | ulm2dict={'OuterLoop':['OuterLoop','ulm_0^0^2', 'ulm_1^-1^2', 'ulm_1^0^2', 'ulm_1^1^2', '...']} |
| | | filedict=get_vtu_dict(directory) |
| | | modified=False |
| | |
| | | '{:.17e}'.format(p['avgFy']), |
| | | '{:.17e}'.format(p['avgFz']), |
| | | '{:.17e}'.format(p['BendingEonlyC0'])] |
| | | ulm2dict[f]=[f, *ulm2] |
| | | modified=True |
| | | if modified: |
| | | write_csv(os.path.join(directory,'data_tspoststat.csv'), csvdict) |
| | | write_csv(os.path.join(directory,'ulm2.csv'), ulm2dict) |
| | | |
| | | def clean_poststat_directory(directory): |
| | | """Function deletes data_tspoststat.csv created by tspoststat in given directory, enabling forcing of re-tspostating it""" |