I currently have a run function in my main .cc file that calls functions from different header files. Each header file specifies the variable that I want to solve for. for example, to solve for variable x, I have a x.hh file. I do this sequentially, so I first solve for unknown x, then y, then z. For each variable I do the following:
1. call constructor of variable 2. assemble the matrix ( this function calls the setup system function) 3. call the solve function for example, here is how I solve for the last variable. VaporSaturation::VaporSaturationProblem<dim> Sv_problem( /* appropriate arguments for constructor. */ ); timer.reset(); timer.start(); Sv_problem.assemble_system_matrix_vapor_saturation(); timer.stop(); assemble_time[index_time] += timer.cpu_time(); pcout << std::endl; pcout << "Elapsed CPU time for Sv assemble: " << timer.cpu_time() << " seconds." << std::endl; timer.reset(); timer.start(); Sv_problem.solve_vapor_saturation(); timer.stop(); solver_time[index_time] += timer.cpu_time(); pcout << "Elapsed CPU time for Sv solve: " << timer.cpu_time() << " seconds." << std::endl; Sv_solution = Sv_problem.Sv_solution; each variable is solved for implicitly, so each system matrix is getting recomputed at each time step so the above code is in a for loop in my run function. my question is: Is there a way that for the second variable y, that I only assemble the system matrix once on the first time step and then use this matrix in subsequent calculations? I have a proof that shows stability of this new method but I am not sure how my matrix is being calculated. Thanks for any help, Mark -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/fcd9000a-fc32-46b9-88de-02ef9ff69447n%40googlegroups.com.
