getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] low-level generic assembly procedures for surface in


From: Yves Renard
Subject: Re: [Getfem-users] low-level generic assembly procedures for surface in 3D
Date: Sun, 14 May 2017 14:56:07 +0200 (CEST)

Dear CC,

The main problem in your program is that you forgot the assembly operation :

assem.assembly(getfem::mesh_region::all_convexes());

Additionally, I made some verifications between the low-level and high level
assembly with the following (matlab interface) program and verified that the
sum of the vector corresponds to the (aproximation of) the surface of the
cylinder. All is ok. High level assembly is now really faster than the
low-level one on the current git version (future 5.2 version).



clear all;
m = gfMesh('import', 'gmshv2', 'cylinder0_1.msh');
% gf_plot_mesh(m);
mim=gfMeshIm(m); 
mfu=gfMeshFem(m); 
set(mim, 'integ',gfInteg('IM_TRIANGLE(6)'));
set(mfu, 'fem',gfFem('FEM_PK(2,1)'));
nbdof = gf_mesh_fem_get(mfu, 'nbdof');

V = gf_asm('volumic' , 'V(#1) += comp(Base(#1))', mim, mfu);

W = gf_asm('generic', mim, 1, 'Test_u', -1, 'u', 1, mfu, zeros(nbdof));

norm(V-W)
sum(V)
2*pi*0.05



----- Original Message -----
From: "CC Tsai" <address@hidden>
To: "yves renard" <address@hidden>
Sent: Sunday, May 14, 2017 11:47:32 AM
Subject: Re: low-level generic assembly procedures for surface in 3D

Dear Yves,

Many thanks for your reply. A minimal code with the mesh file is attached.
Please give me some comments, and

best regard
CC


On Sun, May 14, 2017 at 4:00 AM, Yves Renard <address@hidden>
wrote:

>
>
> Dear CC,
>
> There is no reasons for these result to be zero of course. It should
> return the integral on the cylinder of each shape function. Can you attach
> a sample of mesh and the simpler program that produce this result ?
>
> Best regards,
>
> Yves.
>
>
> ----- Original Message -----
> From: "CC Tsai" <address@hidden>
> To: address@hidden, "yves renard" <address@hidden>
> Sent: Friday, May 12, 2017 6:15:08 PM
> Subject: low-level generic assembly procedures for surface in 3D
>
> Dear Yves and getfem++ friends,
>
> I use the gmsh to create a surface mesh of triangles (the surface of a
> cylinder) in 3D and import it into the getfem++. Then mesh_im
> (IM_TRIANGLE(6)) and mesh_fem (FEM_PK(2,1)) are initialized by the mesh.
> Lastly, I perform the low-level generic assembly procedure. The results are
> strangely all zeros. Please give me some comments.
>
> codes:
>  getfem::generic_assembly assem;
>  assem.push_mi(mim);
>  assem.push_mf(mf);
>  assem.push_vec(v);
>  assem.set("V(#1) += comp(Base(#1))(:)");
>
> best regard
> CC
>
> --
>
> Dr. Chia-Cheng Tsai (*http://cctsai.wixsite.com/mhlab
> <http://cctsai.wixsite.com/mhlab>*)
>
> Professor
> Department of Marine Environmental Engineering
> National Kaohsiung Marine University, Kaohsiung, Taiwan
>



-- 
Dr. Chia-Cheng Tsai (*http://cctsai.wixsite.com/mhlab
<http://cctsai.wixsite.com/mhlab>*)

Professor

Department of Marine Environmental Engineering
National Kaohsiung Marine University, Kaohsiung, Taiwan

Department of Marine Environment and Engineering, National Sun Yat-Sen
University, Kaohsiung, Taiwan



reply via email to

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