[aspect-devel] Aspect logical operators
Wolfgang Bangerth
bangerth at tamu.edu
Wed Jan 4 05:29:25 PST 2017
On 01/04/2017 12:06 AM, FELIPE ORELLANA ROVIROSA wrote:
>
> Now that you specify your point of view, I realize that this is a broad
> problem concerning logic and physics.
>
> What you wrote is essentially true, but I think you are missing some
> possible cases.
>
> As a note: Several codes use simple IF statements without ELSE (just to
> do something in a weird case, or so..), but this all depends on how one builds
> the program.
>
> I am trying to use a conditional statement to specify the value of a
> variable (using an IF over the coordinates to specify a Boundary Condition,
> say x<=0), but otherwise, when the condition is not true (for example inside
> the domain) not to specify anything (cause there Stokes' fluid equations are
> solved).
>
> What should I do in that case for the ELSE? -1,..Nan..?
If I need to specify a value that I know should not be used, I try to use
something that is *so wrong* that I will immediately know if it happens to be
used anywhere (although I *believed* that it would not be used).
NaN is a good candidate in those cases, but I'm not sure that you can specify
it in the formula parser. -1e100 is also a good candidate.
> I have tried and tested, but I am not getting physically reasonable outcomes.
But that must not have anything to do with the other problem above since you
say that whatever happens in the ELSE branch should not matter.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth at colostate.edu
www: http://www.math.colostate.edu/~bangerth/
More information about the Aspect-devel
mailing list