Re: [deal.II] Re: Recommendation: BCs in config

2017-02-15 Thread Franco Milicchio
> > Take a look here > > http://stackoverflow.com/questions/236129/split-a-string-in-c for some > > ideas how to split a string. > > Yes, this is the way to go. In fact, we have a function that splits > strings: > > > https://www.dealii.org/8.4.0/doxygen/deal.II/namespaceUtilities.html#a8d79

Re: [deal.II] Re: Recommendation: BCs in config

2017-02-14 Thread Wolfgang Bangerth
On 02/13/2017 07:09 AM, Bruno Turcksin wrote: you could write everything into one string and then split it. So it would like this: subsection bc set value = 0.5*x+y; x*y^2 end Take a look here http://stackoverflow.com/questions/236129/split-a-string-in-c for some ideas how to split a string

Re: [deal.II] Re: Recommendation: BCs in config

2017-02-13 Thread Bruno Turcksin
2017-02-13 10:34 GMT-05:00 Franco Milicchio : > Because I can imagine that having several BCs with some magic char there is > simply a recipe for disaster :) > > Just think about this example: > > set dirichlet = x^2+y^2 : if(x < 0, 1, 3) : 0; 0 : 0 : 0 > > Since I am working with people not wel

Re: [deal.II] Re: Recommendation: BCs in config

2017-02-13 Thread Franco Milicchio
On Monday, February 13, 2017 at 3:52:23 PM UTC+1, Bruno Turcksin wrote: > > Why not? You can split the string several times using different > separators: > > set value = 0.5*x+y, x, y; x*y^2 > > You first split value in 0.5*x+y, x, y and x*y^2 and then you can > split 0.5*x+y, x, y in three c

Re: [deal.II] Re: Recommendation: BCs in config

2017-02-13 Thread Bruno Turcksin
2017-02-13 9:46 GMT-05:00 Franco Milicchio : > Yes, I have thought of that but I cannot see right now how I could express > vector functions. Using a custom separator isn't really nice here... Why not? You can split the string several times using different separators: set value = 0.5*x+y, x, y; x*

[deal.II] Re: Recommendation: BCs in config

2017-02-13 Thread Franco Milicchio
On Monday, February 13, 2017 at 3:09:20 PM UTC+1, Bruno Turcksin wrote: > > Franco, > > you could write everything into one string and then split it. So it would > like this: > > subsection bc > set value = 0.5*x+y; x*y^2 > end > > Take a look here > http://stackoverflow.com/questions/236129/

[deal.II] Re: Recommendation: BCs in config

2017-02-13 Thread Bruno Turcksin
Franco, you could write everything into one string and then split it. So it would like this: subsection bc set value = 0.5*x+y; x*y^2 end Take a look here http://stackoverflow.com/questions/236129/split-a-string-in-c for some ideas how to split a string. Best, Bruno On Monday, February 1