def store_solution(self,U,t): """Store the current solution in a dictionary with the time as the key""" Usave = {"U_F":mf.extract_subfunction(U.split()[0]), "P_F":mf.extract_subfunction(U.split()[1]), "L_U":mf.extract_subfunction(U.split()[2]), "D_S":mf.extract_subfunction(U.split()[3]), "U_S":mf.extract_subfunction(U.split()[4]), "D_F":mf.extract_subfunction(U.split()[5]), "L_D":mf.extract_subfunction(U.split()[6])} #loop over every FSI Function and save a timeseries and VTK file for k in self.timeseries.keys(): self.timeseries[k].store(Usave[k].vector(),t) self.vtkfiles[k] << Usave[k],t
def store_solution(self, U, t): """Store the current solution in a dictionary with the time as the key""" Usave = { "U_F": mf.extract_subfunction(U.split()[0]), "P_F": mf.extract_subfunction(U.split()[1]), "L_U": mf.extract_subfunction(U.split()[2]), "D_S": mf.extract_subfunction(U.split()[3]), "U_S": mf.extract_subfunction(U.split()[4]), "D_F": mf.extract_subfunction(U.split()[5]), "L_D": mf.extract_subfunction(U.split()[6]) } #loop over every FSI Function and save a timeseries and VTK file for k in self.timeseries.keys(): self.timeseries[k].store(Usave[k].vector(), t) self.vtkfiles[k] << Usave[k], t
def __init__(self, functions, titles, modes): """Copy the functions locally and store the parameters""" self.localfunctions = [mf.extract_subfunction(f) for f in functions] self.title = titles self.modes = modes
def __init__(self,functions,titles,modes): """Copy the functions locally and store the parameters""" self.localfunctions = [mf.extract_subfunction(f) for f in functions] self.title = titles self.modes = modes