August 12th, 2010, 1:09 pm
QuoteOriginally posted by: MJPLThanks Vandervolt and Antiser!I haven't tried the finite element method before and will try and get Matlab from someone in the department to give it a shot. @ Vandervolt: In my application (which is actually a population genetics problem so I left out the details in this forum!) I have a(x) = c x(1-x) and b(x) = x(1-x), where c is a finite (positive or negative) constant. Is there a general rule as to when the values of a(x) and b(x) would produce bad boundary behaviour?I have tried finer uniform grids and non-uniform grids which are finer near the boundaries but that doesn't seem to help. I am aware of the problems with CN when the IC is a delta function which is why I swapped to exponential fitting. Let me have a go with Matlab and see it that works...Your boundaries are singular. If the particle starts there, it cannot escape. On the other hand, if it starts in the interior, the boundaries may be unreachable.A zero-flux condition may be illegal (i.e. flat out wrong) or simply not the best choice.You may or may not need to truncate your boundaries to (eps,1-eps), where eps is a small number.Also, the backwards Kolmogorov eqn may be a better choice, as most problemscan be approached from either.My suggestions:-First, categorize the boundary behavior usingthe Feller criteria as explained in Karlin & Taylor or other standard sources. -Second, develop the exact soln behavior as the boundaries are approachedfor both the backwards and forward (FP) eqn. This may suggest otherboundaries conditions, such as simple absorption, or simply"no boundary condition" (i.e. just apply the pde there like a reg. mesh pt)-Try this mesh with p small: 2-sided uniform with (approximately) the same number of meshpts to the right of p as to the left. Try it on both the forward and backward problems., perhapswith boundary truncation. A somewhat similar (and really cleaner) alternative to this is to map to a new variable y = y(x) = y(x;p). Here y ranges from 0 to c, where c is close to 1, but the "hotspot" x=p is mapped to y=0.5. Then, just use a uniform mesh in y, andyour favorite differencing scheme. For example, try y = x/(x+p) whichhas very nice properties.
Last edited by
Alan on August 11th, 2010, 10:00 pm, edited 1 time in total.