[Getdp] function of a discrete value defined piecewise

Ruth V. Sabariego r.sabariego at ulg.ac.be
Sun Jan 8 09:28:04 CET 2012


Hi Max,
Try to use a register for storing the quantity before doing the comparison. That way the types will be correct.

E.g. register 22:
Function {
 ...
 mu[] = $1#22 > T_c ? mu_1 : mu_2;
}

This is indeed an old bug!
Regards,
Ruth


--
Dr. Ir. Ruth V. Sabariego
University of Liege, Electrical Engineering & Computer Science, 
Applied & Computational Electromagnetics (ACE),
phone: +32-4-3663737 - fax: +32-4-3662910 - http://ace.montefiore.ulg.ac.be/



On 06 Jan 2012, at 13:57, meyer at itwm.fraunhofer.de wrote:

> Hi All,
> 
> I'm trying to define a function that can take two different values
> depending on whether my discrete function {T} is greater or less than a
> certain constant T_c.
> 
> What I've done so far is:
> 
> Function {
>  ...
>  mu[] = $1 > T_c ? mu_1 : mu_2;
> }
> 
> and in the Formulation I tried mu[{T}] and mu[Dof{T}], but I get the
> following error:
> 
> Comparison of non scalar quantities: Form0 > Scalar
> 
> Thanks,
> Max Meyer
> 
> 
> _______________________________________________
> getdp mailing list
> getdp at geuz.org
> http://www.geuz.org/mailman/listinfo/getdp

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/getdp/attachments/20120108/461c1715/attachment.html>