Lance:
let me start by saying that you need to learn to debug problems yourself. This forum can help you with questions that are specific to deal.II, but we do not have the resources to help you with general programming questions. Finding the root cause of a segmentation fault is one of these issue: You need to learn to figure this out yourself.


But I got issue when the program was processed at the part of 
compute_gradient();

Here is the code below  about density and gradient.
[...]         gradient[cell->face(face)->index()] = density[neighbor->active_cell_index()] - density[cell->active_cell_index()];

One hint is here: If the index to density is the number of a cell, then the size of that vector clearly needs to be the number of cells. If the index to the gradient vector is the number of a face, then the size of that vector needs to be the number of faces.

I don't actually know how you would get the number of faces of a triangulation. More importantly, perhaps, is that I don't know what you would do with such a vector. But that's a question for you to answer.

Best
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@colostate.edu
                           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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/e4bc407e-9a43-999b-c824-960b7512689f%40colostate.edu.

Reply via email to