Please ignore my question as I realized my mistake. FiPy does allow field dependent parameters for the various probability distributions.
Thanks and apologies for my confusion. On Tue, Oct 19, 2010 at 11:31 AM, Akhil Shah <[email protected]> wrote: > Hello, > I am very new to FiPy and trying to solve a 2D diffusion problem with a > random source using a method that requires sampling from a conditional > distribution (derived from the associated Fokker-Plank equation) at each > time step then evolving the deterministic part of the PDE. > > The conditional distribution (it's a combination of Beta/Gamma but doesn't > matter for my question) would require field-dependent parameters (for the > mean/variance/etc.). For example, the following does NOT work (1D example): > > mesh=Grid1D(nx=50,dx=1.) > phi=CellVariable(name="my field at time 0",mesh=mesh) > x=mesh.getCellCenters()[0] > from scipy.special import erf > phi.setValue(1-erf(x)) > noise=ExponentialNoiseVariable(mesh=mesh,mean=phi) #mean depends on phi > > Do I just have to create a "for" loop across the mesh, extract phi at the > cell center, generate the corresponding noise at that cell center (using the > phi at that cell center as the parameter for whatever distribution) and > somehow re-assemble the noise field? > > Thanks in advance for any suggestions. > > -akhil >
