Hi Markus,

The index variable is now completely initialised in the global function like
so:

index = 0;
iterate();

Yet, it's still not giving the correct solution. What could be wrong?

Ted

On 17 December 2010 16:39, Markus Bürg <[email protected]> wrote:

>  Hello Ted,
>
> obviously this code does not fix the issue. You have to pull out the
> initialization of the index variable into the global function.
>
> Best Regards,
> Markus
>
>
>
> Am 17.12.10 17:31, schrieb Ted Kord:
>
>
> Hi Markus,
>
>
> On 17 December 2010 16:01, Markus Bürg <[email protected]> wrote:
>
>> Hello Ted,
>>
>> the variable index contains other values now. In the sequential version
>> you set it to zero before you loop over the intervals, but in the parallel
>> version you set it to zero at the beginning of every chunk of intervals.
>>
>> Best Regards,
>> Markus
>>
>>
>>
> Even when I rewrite it as:
>
> template <int dim>
> void TestEquation<dim>::test_
> iteration_interval(double time, TestIterator &begin, TestIterator &end) {
>     int index = 0;
>     TestIterator p;
>     for(int step = 0; iteration_time <= 0.5*time; ++step) {
>         iteration_time += some_step;
>         for (p = begin; p != end; ++p) {
>             do some stuff
>
>
>             write_lock.acquire();
>
>             old_solution_u(index) = do_some_calculation();
>             ++index;
>             write_lock.release();
>         }
>     }
> }
>
> The results are still incorrect.
>
>  Many thanks,
>
>  Ted
>
>
>
> _______________________________________________
> dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
>
>
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to