getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Getfem-users] basic_dof_on_region(), qdim = 2 and iterators


From: Konstantinos Poulios
Subject: Re: [Getfem-users] basic_dof_on_region(), qdim = 2 and iterators
Date: Fri, 15 Mar 2013 20:22:23 +0100

the short answer is:
dal::bv_visitor_c
check its documentation.

Kostas


On Wed, Mar 13, 2013 at 5:15 PM, Torquil Macdonald Sørensen
<address@hidden> wrote:
> Hi!
>
> I'm experiencing some problems when using an iterator on
> mf.basic_dof_on_region() where mf has qdim=2. My problem is illustrated by
> the following code:
>
> std::cout << "Part 1" << std::endl;
> std::cout << mf.basic_dof_on_region(0) << std::endl;
>
> std::cout << "Part 2" << std::endl;
> for(dal::bv_visitor i(mf.basic_dof_on_region(0)); !i.finished(); ++i) {
> std::cout << i << " "; }
> std::cout << std::endl;
>
> std::cout << "Part 3" << std::endl;
> dal::bit_vector bdof_boundary = mf.basic_dof_on_region(0);
> for(dal::bv_visitor i(bdof_boundary); !i.finished(); ++i) { std::cout << i
> << " "; }
> std::cout << std::endl;
>
> Region 0 is the boundary of the mesh. Shouldn't each of the three parts
> print essentially the same output? However, the output of part 2 is
> different, while 1 and 3 are consistent. The output is:
>
> Part 1
> [0 1 2 3 4 5 8 9 12 13 18 19 24 25 32 33 34 35 36 37 38 39 40 41 42 43 44 45
> 46 47 48 49]
> Part 2
> 0 1 2 3 4 5 8 9 12 13 18 19 24 25
> Part 3
> 0 1 2 3 4 5 8 9 12 13 18 19 24 25 32 33 34 35 36 37 38 39 40 41 42 43 44 45
> 46 47 48 49
>
> I'm using a square mesh with 5x5 points, QK(2,1) and qdim = 2. So there are
> 5x5x2=50 basic dofs. However, part 2 seems to not print any dof numbers
> above 25 for some reason.
>
> I'm using GetFEM++ 4.2 and gcc 4.7.2 on Linux.
>
> Best regards
> Torquil Sørensen
>
>
> _______________________________________________
> Getfem-users mailing list
> address@hidden
> https://mail.gna.org/listinfo/getfem-users



reply via email to

[Prev in Thread] Current Thread [Next in Thread]