[Hedge] initialisation, angles, interpolation

Andreas Kloeckner lists at informa.tiker.net
Wed Apr 6 11:10:38 PDT 2011


On Wed, 06 Apr 2011 16:45:37 +0200, "Islam El Salawi" <islamelsalawi at gmx.de> wrote:
> -------- Original-Nachricht --------
> Datum: Wed, 06 Apr 2011 16:44:09 +0200
> Von: "Islam El Salawi" <islamelsalawi at gmx.de>
> An: Andreas Kloeckner <lists at informa.tiker.net>
> Betreff: Re: [Hedge] initialisation, angles, interpolation
> 
>         Hi Andreas,
> 
> thanks for your fast response. I have assigned three different 
> UniformMachFlow classes with different data for direction and mach number:
> 
> var1=UniformMachFlow(data1)
> var2=UniformMachFlow(data2)
> var3=UniformMachFlow(data3)
> 
> But how can I feed the variable "fields" with these three initial datasets. 
> This "fields" variable appears in the shearflow.py script, for example, and 
> it is assigned as follows:
> 
> fields=var.volume_interpolant(0, discr) 
> 
> with "var" being of class UniformMachFlow. I can set "fields" for one 
> "var", but how about two or more?

I thought you had said you just wanted one BC (say the inflow) to be
different? Now you seem to be talking about different fields within the
volume.

In any case, to realize something like that, see for example this here:

http://git.tiker.net/hedge.git/blob/refs/heads/staging:/examples/gas_dynamics/lbm-simple.py#l62

The key point is 'from pymbolic.primitives import IfPositive'. This
allows you to do if/then-style conditionals.

HTH,
Andreas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.tiker.net/pipermail/hedge/attachments/20110406/364c9608/attachment.pgp>


More information about the Hedge mailing list