I do have a Diffusion coefficient in a convection diffusion PDE which is discontinuous and looks like (concentration on the x-Axis):
For numerical reasons i use the integrated form:
I calculate the functions in beforehand and during my calculations i interpolate the diffusion coefficient depending on the actual concentration value on each grid point. Note that the function is discontinuous at x = 0.1 and x = 0.5
If i could fit an analytical function to the data i could avoid the interpolation at each time step and may speed up the calculation. Is that possible and would it make sense ? Which function would make sense ? something like:
myfun = somefunction*((u>=0.1) && (u<=0.5)