Example #1
0
    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
Example #2
0
    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
Example #3
0
 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
Example #4
0
 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