[aspect-devel] The problem of setting up initial composition
Wolfgang Bangerth
bangerth at tamu.edu
Mon Jan 25 07:35:46 PST 2016
Nan,
the real problem is that you have two compositional fields, but you only
provided one initial condition. You need to provide two expressions in this
line, separated by a semi-colon.
The error message is of course completely unhelpful. I'm writing a patch to
make this clearer.
Best
Wolfgang
On 01/24/2016 11:23 PM, Nan Zhang wrote:
> Hi Wolfgang,
>
> Thanks for your fast reply. While, when I changed to sqrt, I still got error like:
> *************************************************************************
> ERROR: FunctionParser failed to parse
> 'Compositional initial conditions.Function'
> with expression
> 'if(sqrt(x*x+y*y+z*z)<3731000, 1, 0)'ERROR: FunctionParser failed to
> parse
> ERROR: FunctionParser failed to parse
> ERROR: FunctionParser failed to parse
> ERROR: FunctionParser failed to parse
> ERROR: FunctionParser failed to parse
> 'Compositional initial conditions.Function'
> 'Compositional initial conditions.Function'
> 'Compositional initial conditions.Function'
> 'Compositional initial conditions.Function'
> ...
> *************************************************************************
>
> I attached my input file below.
>
> Nan
>
> On Mon, Jan 25, 2016 at 11:38 AM, Wolfgang Bangerth <bangerth at tamu.edu
> <mailto:bangerth at tamu.edu>> wrote:
>
> On 01/24/2016 09:19 PM, Nan Zhang wrote:
>
>
> set Function expression = if(std::sqrt(x*x+y*y+z*z)<3731000, 1, 0)
>
>
> You need to use std::sqrt in C++ code, but for the function parser, it is
> simply 'sqrt'.
>
> Best
> W.
>
> --
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: bangerth at math.tamu.edu
> <mailto:bangerth at math.tamu.edu>
> www: http://www.math.tamu.edu/~bangerth/
>
>
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth at math.tamu.edu
www: http://www.math.tamu.edu/~bangerth/
More information about the Aspect-devel
mailing list