> Am 06.10.2017 um 22:23 schrieb Ed Scott Wilson Garcia <[email protected]>:
> 
> Hello,
> 
>   I hope someone on this list can help me with this, which apparently should 
> have a simple solution.
>  I have added a loop indexed from zero to this->numDofs() in the 
> 2pnc/implicit/model.hh, but I need to obtain a GlobalPosition from the index. 
> I see that the GlobalPosition can be obtained from the element and the 
> subcontrol volume indexes (scvIdx), but I am looking for a simpler solution 
> with a plain loop on the degrees of freedom,  numDofs.
>   Is this possible? If so, could someone point me to an example code?

Hi Edscott,

this is not possible. Unless you want to store a vector of ElementSeeds or a 
vector of all global dof positions first. There is no random index access for 
grid entities in Dune. 

Why would you want to have a raw index loop instead of an iterator loop / 
range-based for loop over elements in your case?

Best wishes
Timo
> Thanks in advance,
> 
> Edscott Wilson Garcia
> IMP
> _______________________________________________
> Dumux mailing list
> [email protected]
> https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

Reply via email to