getfem-users
[Top][All Lists]
Advanced

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

[Getfem-users] Introduction of a constant into the assembly process


From: Véronique Pham
Subject: [Getfem-users] Introduction of a constant into the assembly process
Date: Thu, 23 Jul 2009 10:10:19 +0200

Hi everyone,

I would like to ask an other question about the assembling using the getfem generic_assembly procedure.
I'm trying to solve
that kind of equation : eta*u \delta u = f, where eta is a real type constant.

What is the best way to introduce this constant into the assembly process?
Im thinking of using the generic mass matrix assembly with an additional parameter of the library. The code should be :

{
getfem::generic_assembly assem;
assem.push_mi(mim);
assem.push_mf(mf_u);
assem.push_data(std::vector<T>(mf_u.nb_dof(),eta));
assem.push_mat(A);
assem.set("F=data(#1);"
"M(#1,#1)+=sym(comp(Base(#1).Base(#1).Base(#1))(:,:,i).F(i));");
assem.assembly();
}

Instead of using assem.push_data(std::vector<T>(mf_u.nb_dof(),eta)) part, which is ineficient, should I create a mesh with a big quad element and a P0 shape function?

Thanks for your help.

Veronique.



reply via email to

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