Thank you both! It works well now.

Yes, Robert. I cut out every extraneous feature of my problem.

Ben

On Tuesday, March 12, 2013 9:20:48 PM UTC, Robert Cimrman wrote:
On 03/12/2013 04:40 PM, Ben Derrett wrote:
> Hello,
>
> I've been using SfePy for about a week - it's a great piece of work.
>
> I'm working on a 2D problem involving a dw_diffusion_coupling term<http://sfepy.org/doc-devel/src/sfepy/terms/termsLaplace.html#sfepy.terms.termsLaplace.DiffusionCoupling>.
> For a homogenous material everything works as expected using the material
> definition
>
> 'mat_diffusion_coupling': ({'f': np.array([[0], [0]])},),
>>
>
> For an inhomogenous material, since the shape of this local parameter is
> (2, 1), I defined a function which takes the array of coordinates - coors -
> and returns an array of shape (coors.shape[0], 2, 1) like so
>
> def diffusion_coupling_coefficient(ts, coors, mode=None, **kwargs):
>>      return {'f': np.zeros((coors.shape[0], 2, 1))}
>>

Another thing: the attached code is just a minimal example without realistic
BCs etc., right? If I run the attached file (with the mode correction posted by
Vladimir), it does nothing because the loads as well as material parameters are
zero.

r.