A description of cellular boundary maps in terms of a Morse function I'm writing a paper on classical Morse Theory and I'm interested in applying Morse functions to the computation of homology groups of a compact manifold $M$. The standard way in which this is done is by using Theorem 3.5 in Milnor's textbook, which proves that a Morse function $f: M \to \mathbb{R}$ induces a CW-structure on $M$, up to homotopy equivalence; one can then try to compute homology groups using cellular homology. What I have noticed though is that none of the textbooks I have used provide details regarding the attaching maps used in the construction of this CW-complex, only the number of cells of each dimension is readily available (i.e. the number of critical points with index equal to the dimension). This information is sufficient in the computation of homology groups of manifolds where the Morse function has no critical points with consecutive indices (like $\mathbb{C}P^n$), since in this case all cellular boundary maps (i.e. boundary maps in the cellular chain complex) are necessarily trivial. So here's the question:

Is there a simple description of cellular boundary maps in terms of the function $f$, which could be used to compute the (cellular, integral) homology of a compact manifold using a Morse theory? Or are there reasons to believe such a description would be difficult to find in general?

My guess is that if one does exists, quite a bit of work would be needed to obtain it, since, at least following Milnor's approach, theorem 3.5 is the result of cellular approximation and a couple of lemmas involving CW-complexes, in addition to local Morse-theoretic results regarding sublevel sets. Matsumoto proves the result (4.18) in a more direct fashion, but I still can't see an easy way to obtain what I'm looking for.
Something I noticed when trying to compute the homology of $\mathbb{R}P^n$ using Morse Theory was that, even though a there exists a Morse function $f \colon \mathbb{R}P^n \to \mathbb{R}$ which has exactly one critical point with index $k$, for $k = 0,\ldots, n$ and that critical values are in the same (ascending) order as indices, it isn't evident what the cellular boundary maps might be. My initial reason for thinking otherwise was that cells are attached to sublevel sets in increasing dimension (hence no need for cellular approximation) and by embeddings $S^{k-1} \to M_{c_k - \varepsilon}$ (the sublevel set, with $c_k$ critical value) for $k >0$. However in dimension $0$ the attaching map isn't injective, and this invalidates possible inductive attempts to describe subsequent attaching maps to the $(k-1)$-skeleton of the CW-complex which is homotopy equivalent to $M$. Incidentally, these maps are the $2$-sheeted covering projections $S^k \to \mathbb{R}P^k$, but I know this for a different reason (see Hatcher p.144). So even in this "well behaved" case I wasn't able to come up with anything significant.
I also know there is a more modern, homology-oriented approach to Morse Theory, which uses gradient flow lines to compute homology directly. However I am not familiar with any details and I'm looking mainly for ways to compute the homology of $M$ using Milnor's theorem 3.5.
Thank you for any insight!
 A: Under certain conditions, (Morse-Smale being one, but not sufficient) the  stratification by unstable manifolds of a Morse flow on a compact manifolds gives a cellular decomposition; see the paper On the Space of Trajectories of a Generic Vector Field by Burghelea & co, and the paper On Moduli Spaces and CW Structures Arising from Morse Theory On Hilbert Manifolds of Lizhen Qin.
Having a cellular decomposition, does not make reading the boundary map any easier.    However, the boundary map has a dynamical description, and the complex     with this description is usually referred to as the Floer complex of a Morse-Smale gradient flow.
If you are interested in $\mathbb{Z}$-coefficients things can be tricky due to  various sign issues. Over $\mathbb{Z}/2$ these sign issues are no longer    relevant and the computations are much easier.
For (real) Grassmanians, it is relatively easy to compute their $\mathbb{Z}/2$-Betti numbers using Morse theory.  A  particularly nice paper is Integrable Gradient Flows and Morse Theory by Dynnikov and Veselov.
To see how  a combination of Morse theory and the technques of Harvey-Lawson work,  check my paper Schubert calculus on the Grassmannian of hermitian lagrangian spaces (doi:10.1016/j.aim.2010.02.003) where I  use  Morse theoretic techniques to produce a (real) Schubert calculus on $U(n)$.   In particular, this yields a geometric description of the integral  cohomology ring of $U(n)$   Arguments similar to the ones in this paper can be used to compute the  integral homology of any grassmanian, real or complex, by Morse theoretic means. These include the projective space $\mathbb{RP}^n$.
For more on this subject I would suggest     you have a look at  Sec. 2.5 and Chaper 4 of the 2nd Edition of my book, An Invitation to Morse Theory where I go through these issues in great detail.
