-----Ursprüngliche Nachricht----- Von: firedrake-bounces@imperial.ac.uk [mailto:firedrake- bounces@imperial.ac.uk] Im Auftrag von Buesing, Henrik Gesendet: 30 October 2015 16:18 An: 'firedrake@imperial.ac.uk' Betreff: Re: [firedrake] Inverse of .dat.data
-----Ursprüngliche Nachricht----- Von: firedrake-bounces@imperial.ac.uk [mailto:firedrake- bounces@imperial.ac.uk] Im Auftrag von Homolya, Miklós Gesendet: 30 October 2015 16:02 An: firedrake Betreff: Re: [firedrake] Inverse of .dat.data
ufl.log.UFLException: Discontinuous type Coefficient must be restricted.
This error usually happens when you try to use facet integrals on a discontinuous field, and of course, it's not obvious from which side of the facet shall the values be taken from. f('+') and f('-') are restrictions of the field f onto the positive or negative sides of the facets.
[Buesing, Henrik] But I could also just use the avg(f), right?
This works! Thank you! Henrik
I don't think it's related to having a mixed space.
Miklos ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake- bounces@imperial.ac.uk] on behalf of Buesing, Henrik [HBuesing@eonerc.rwth-aachen.de] Sent: 30 October 2015 14:56 To: firedrake Subject: Re: [firedrake] Inverse of .dat.data
-----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
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake