Ellen,
> I just started with deal.II and am trying out a sample problem similar to the > one I want to solve. I am trying to use step-33 for conservation equations > and > migrate parts of step-40 for the MPI capabilities I need. I seem to be stuck, > however, when I am assembling the system. When I read from the > "current_solution" or "old_solution" variables, I just get zeros, which lead > to nan values in the computation. I'm too new to this software to know > exactly > where I've gone wrong, but I suspect I'm reading from the wrong locations or > need to distribute the vector differently? That's possible. First, are you running in debug mode? Second, are *all* values you get zero? If that's the case, then I suspect that you just didn't initialize the vector correctly: nothing nonzero was ever put into it apparently. If you get zeros for only some entries, then it may be that that only happens on ghost entries of the vector, and that these need to be correctly set. But it's hard to tell for sure without knowing more. > As a concrete example, when I run > in a debugger, the following lines > > | > std::vector<Sacado::Fad::DFad<double>> > independent_local_dof_values(dofs_per_cell); > > for(unsignedinti =0;i <dofs_per_cell;++i) > independent_local_dof_values[i]=current_solution(local_dof_indices[i]); > | > > produce a vector of zero values, even though the initial condition is > certainly not all zeros (based on VTK output and the input deck). So what if you compare the concrete value of independent_local_dof_values[i] and current_solution(local_dof_indices[i])? Are both of them zero? If yes, then current_solution was apparently already wrong. Best W. -- ------------------------------------------------------------------------ Wolfgang Bangerth email: [email protected] www: http://www.math.colostate.edu/~bangerth/ -- 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/26d33fb2-b0e9-fb95-5f8d-988261fb4fdf%40colostate.edu.
