TITLE: Discrete Morse function from smooth one
QUESTION [13 upvotes]: Suppose I have a smooth manifold $M$ and a smooth Morse function $f$ on $M$.  Is there a standard way to replace $M$ with a cell complex and $f$ with a discrete Morse function such the resulting homology (via discrete Morse theory) is the same as that of $M$?
My question is motivated by a situation where I know the critical points of $f$, but not how they are connected by gradient flow lines.  So I am interested in a solution which doesn't depend on that information.  I imagine something like the following: Triangulate so that every critical point of $f$ lies on a simplex of the appropriate dimension, then define a discrete vector field by [some process].  This vector field has no nontrivial closed paths [for some reason].  By [some observation], the resulting homology is isomorphic to that of $M$.  
For an expert in Morse theory, does this even sound plausible?  Are there "well-known" methods or results which would fill in the gaps?  Even better, does such a result exist somewhere already?

UPDATE:  Mainly I am interested in computing the homology of $M$ without having complete information about the gradient flow of $f$.  In particular, I have a specific smooth function on $\mathbb{R}^9$ coming from some data analysis.  I would like to find the homology of the region $M = $ { $ f \le C $ }.  I have a strategy for finding the critical points of $f$, but determining how they are connected by flow lines seems problematic.  Converting to a discrete problem would, I hope, provide a way around this.
I'm also not worried about pathologies: $f$ has finitely many critical points, and $M$ is compact.

UPDATE 2:  Thanks for the comments everyone!  I will now go to think some more.

REPLY [4 votes]: This is a rapidly developing area, and there are many short-cuts if all you want to do is compute the homology of sub-level sets of $f$. To answer your main question, as Liviu has already mentioned: there is no standard way. However, you should be able to compute the homology you desire as follows.
My impression is that you have three jobs, in chronological order:

Construct a simplicial complex $X_M$ homologically faithful to $M$.
Construct a discrete Morse function $\mu:X_M \to \mathbb{R}$ which approximates $f$, and
Compute homology of everything in sight.

First, the easiest way to build a simplicial approximation if you know your $M$ is to embed it in some suitable $\mathbb{R}^n$ and sample the hell out of it. Since you are working on data analysis, this should not be too drastic a step. Given a point sample $P$ coming from a submanifold of Euclidean space, for each radius $\epsilon$ you can construct a Cech complex of radius $\epsilon$ around $P$. Precise bounds on how many points $P$ should have and how large $\epsilon$ can be in order for the Cech complex to recover the homology of $M$ with high confidence are available in the work of Niyogi, Smale and Weinberger here in the case when $P$ is uniformly sampled. These bounds are in terms of the injectivity radius of the embedding of $M$ into Euclidean space, and of course once these bounds are satisfied it doesn't hurt to add your known critical points to $P$. You have your homologically faithful Cech complex $X_M$.
Next, for 2, you can easily infer a discrete Morse function on an entire simplicial complex just from knowing its values on the vertices using the work of King, Knudson and Mramor. You may be required to perturb $f$ slightly so that its restriction to $P$ is injective, but this is easy and generically true. You have $\mu$!
And finally, I have written software to handle 3 if you already have a $\mu:X_M \to \mathbb{R}$: you can input a filtered simplicial complex and compute not just homology at each sub-level set of $\mu$ but the persistent homology across all level-sets in the case of field coefficients. Meaning, instead of just knowing the homology of the subcomplexes $X_M^c$ consisting of all simplices with $\mu$-value less than or equal to $c$, you also recover the morphism on homology groups induced by including $X_M^c$ into $X_M^d$ whenever $c \leq d$.
All the best with your computations.