-----Ursprüngliche Nachricht----- Von: firedrake-bounces@imperial.ac.uk [mailto:firedrake- bounces@imperial.ac.uk] Im Auftrag von Lawrence Mitchell Gesendet: 28 October 2015 15:27 An: firedrake@imperial.ac.uk Betreff: Re: [firedrake] Inverse of .dat.data
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 28/10/15 14:21, Buesing, Henrik wrote:
[Buesing, Henrik] Not sure that we are on the same page here. I attached the code of calc_temp(p,h). DATA_temp is an array with 146,888 (602*244) entries.
Of course, when doing
gradtemp = (temp('+') - temp('-'))/Delta_h_facet
Ah, I think I see. What space does this resulting temp field live in, is it just DG0. In which case, you could do:
temp_coeff = Function(DG0)
temp_coeff.dat.data[:] = calc_temp(p, h)
then use temp_coeff later in gradtemp.
[Buesing, Henrik] Function(DG0) worked fine, but now I get an ufl.log.UFLException: Discontinuous type Coefficient must be restricted. error when assembling my form. I'm actually solving a multiphysics problem here. Do I have to use Function(W) (W being the mixed space) then and index [0] or [1]? Does it matter whether I take 0 or 1? Henrik