Franco, If you forget about the static_cast in the error message just above >> you can actually see what happens: >> The violated condition was: >> global_matrix.m() == global_vector.size() >> >> > > I am lost in this, I have made some stupid error here but I don't see how. > I am posting the code here: > > https://gist.github.com/fmilicchio/2dac430d7c071f98b4f66d79d2101b04 > > As far as I can tell, I've initialized every sparsity pattern, matrix, and > vector as they were with Trilinos, but I am surely seeing the code I > intended to write, not the code I have actually written. >
You are not initializing the stokes vectors appropriately. Running in a debugger should have told you that there was a problem with the size of stokes_rhs. In fact, stokes_solution.reinit(n_u+n_p) creates a vector with n_u+n_p empty blocks. You want to do something like std::vector<types::global_dof_index> block_sizes(2); block_sizes[0] = n_u; block_sizes[1] = n_p; stokes_solution.reinit(block_sizes); instead. Then, you also need to have a look how to initialize the sparsity pattern for the stokes_preconditioner correctly (if you want to use that matrix at all). Best, Daniel -- 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/de31075a-c077-4ca5-b95e-84c0b5dfebd3%40googlegroups.com.
