Re: [DuMuX] gravity dependency on global postion

2019-01-07 Thread Felix Feldmann
Dear Georg, Thank you very much for the suggestion. Unfortunately, I do get a segmentation fault (core dumped). The error occurs independently from the used gravity values (I tried gravity values of 0, -9.81 or 100). Best regards, Felix From: Dumux

Re: [DuMuX] gravity dependency on global postion

2019-01-07 Thread Georg.Futter
Hi Felix, You should try the following: const GravityVector (const GlobalPosition ) const { // initialize a gravity vector with zeros GravityVector gravity(0.0); // modify the entry for the x (???) direction according to your needs if (onLeftArea_( pos)) gravity[0]=100; else // don’t use else

Re: [DuMuX] gravity dependency on global postion

2019-01-07 Thread Felix Feldmann
Hello Kilian & Timo, Thanks for your quick reply. 1) I initially added following line to my problem: typedef Dune::FieldVector GravityVector; 2) The gravity values are then defined inside the preTimeStep() function: void preTimeStep() { if (GET_PARAM_FROM_GROUP(TypeTag, bool,

Re: [DuMuX] gravity dependency on global postion

2019-01-07 Thread Kilian Weishaupt
Hi Felix, are you sure you correctly overloaded the gravityAtPos method in your problem? Maybe there is a typo and your code actually still uses the base class's method which returns a constant value. Kilian On 01/07/2019 11:58 AM, Timo Koch wrote: Hi Felix, how did you verify this? We

Re: [DuMuX] gravity dependency on global postion

2019-01-07 Thread Timo Koch
Hi Felix, how did you verify this? We would need some more information to see what the issue is. You get a position inside the gravity member function so if you use that to determine your gravity vector it should also use these different gravity vectors... Timo > Am 07.01.2019 um 10:12

Re: [DuMuX] gravity dependency on global postion

2019-01-07 Thread Felix Feldmann
Dear Martin, Thank you very much for your answer. As suggested, I implemented the GravityVector method inside my problem file. Although I defined different gravity values for each global position, the resulting gravity still appears to be just one constant value. I am using DuMux 2.12.0 Kind