getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] Structured mesh coordinate values


From: Torquil Macdonald Sørensen
Subject: Re: [Getfem-users] Structured mesh coordinate values
Date: Fri, 24 Sep 2010 10:17:55 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100917 Icedove/3.0.8

Hi! I'm not using a mesh.transformation(M), this is a complete test program that reproduces it (copied from the documentation):

************************
getfem::mesh mymesh;

bgeot::base_node org(0.0, 0.0, 0.0);

std::vector<bgeot::base_small_vector> vect(3);
vect[0] = bgeot::base_small_vector(1.0, 0.0, 0.0);
vect[1] = bgeot::base_small_vector(0.0, 1.0, 0.0);
vect[2] = bgeot::base_small_vector(0.0, 0.0, 1.0);

std::vector<int> ref(3); ref[0] = ref[1] = ref[2] = 10;

getfem::parallelepiped_regular_simplex_mesh(mymesh, 3, org, vect.begin(), ref.begin());

const int numPoints = mymesh.points_index().size();

std::cout << mymesh.points()[numPoints-1] << std::endl;
*************************

At the end it prints the coordinates of the last point, which I expected to be [1, 1, 1] since those are the limits set in 'vect', but I get:

[10, 10, 10]

I compile it with g++ 4.4.4 (no compilation warnings):

g++ Test.cpp -o Test.elf -Wall -Wextra -O3  -lgetfem

and use GetFEM++ 4.1 in the current Debian Sid OS, and a 64bit computer with a Intel T4400 dual core processor.

- Torquil

On 24/09/10 09:14, Yves Renard wrote:

Dear Torquil,

No, this really generates a mesh on the cube [0,1]^3. Are you sure you do not
have an instruction

mesh.transformation(M);

after the mesh generation  (like in tests/laplacian.cc) ?

On jeudi 23 septembre 2010, Torquil Macdonald Sørensen wrote:
Hi!

In the "Short User Documentation" it is written that to generate a 10x10x10
mesh on the unit cube [0,1]^3, the following code would work:

getfem::mesh mymesh;
bgeot::base_node org(0.0, 0.0, 0.0);
std::vector<bgeot::base_small_vector>  vect(3);
vect[0] = bgeot::base_small_vector(1.0, 0.0, 0.0);
vect[1] = bgeot::base_small_vector(0.0, 1.0, 0.0);
vect[2] = bgeot::base_small_vector(0.0, 0.0, 1.0);
std::vector<int>  ref(3);
ref[0] = ref[1] = ref[2] = 10;
getfem::parallelepiped_regular_simplex_mesh(mymesh, 3, org, vect.begin(),
ref.begin());

But when I print the coordinates of the points in this mesh, i.e.
mymesh.points(), I get component values not within [0,1], but in [0,10].

Is this a mistake in the documentation, or do these values not represent
the coordinates of the points (but instead "scaled coordinates")?

Thanks!
Torquil

_______________________________________________
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]