[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-users] basic_dof_on_region(), qdim = 2 and iterators
From: |
Torquil Macdonald Sørensen |
Subject: |
[Getfem-users] basic_dof_on_region(), qdim = 2 and iterators |
Date: |
Wed, 13 Mar 2013 17:15:07 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130112 Icedove/17.0.2 |
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] basic_dof_on_region(), qdim = 2 and iterators,
Torquil Macdonald Sørensen <=