getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] [Getfem-commits] What is the best way to add paramete


From: Tetsuo Koyama
Subject: Re: [Getfem-users] [Getfem-commits] What is the best way to add parameter for each direction in term?
Date: Thu, 14 Feb 2019 10:20:09 +0900

Dear Yves, Konstantinos and GetFEM++ Project

Thank you very much for answering the question and supporting.
I'm now solve the boundary FEM and trying to calculate the main FEM.
But, the problem is the boundary FEM is calculated for each direction
(for "ux1" in x   variable and "uy1" in y).
So, I have to add source_term_brick to each direction to variable "u2"
in main 2D FEM.
The source code I thought is following.

model.add_source_term_brick(model, mim, "u2", "[a*Grad_ux1,
b*Grad_uz1]", NAME_OF_BOUNDARY);

"a" and "b" is the coefficient which I want to add and I think that
the area covered can be further multiplied.
I also want to compute the explicit grad to ux1 and uz1.
I couldn't have a confidence that I use the library correctly. Could
you comment about this?

Thank you for reading.

Best Regard Tetsuo

2019年2月12日(火) 11:47 Tetsuo Koyama <address@hidden>:
>
> Dear Yves and Konstantinos
>
> Than you for your comment. I'll try it and comment later.
> (Sorry, I mistook the sending mail address.)
>
> Best Regards,
>
> Tetsuo
>
> 2019年2月12日(火) 2:56 Konstantinos Poulios <address@hidden>:
> >
> > I guess componentwise multiplication
> >
> > getfem::add_linear_term(model, mim, "(rho.*u).Test_u", TOP);
> >
> > with rho as a vector should work as well.
> >
> > BR
> > Kostas
> >
> > On Mon, Feb 11, 2019 at 5:27 PM Yves Renard <address@hidden> wrote:
> >>
> >>
> >> Dear Tetsuo,
> >>
> >> If I understand well, you need probably a matrix, not a vector
> >>
> >> model.add_fixed_size_data("rho", bgeot::multi_index(2, 2));
> >> model.set_real_variable("rho")[0] = rho_for_x;
> >> model.set_real_variable("rho")[2] = rho_for_y;
> >>
> >> getfem::add_linear_term(model, mim, "(rho*u).Test_u", TOP);
> >>
> >>
> >> Best Regards,
> >>
> >> Yves
> >>
> >>
> >>
> >>
> >> Le 11/02/2019 à 09:15, Tetsuo Koyama a écrit :
> >> > Dear GetFEM++ Project
> >> >
> >> > I'm sorry, code was wrong.
> >> >
> >> > model.add_fixed_size_data("rho", 2);
> >> > model.set_real_variable("rho")[0] = rho_for_x;
> >> > model.set_real_variable("rho")[1] = rho_for_y;
> >> >
> >> > getfem::add_linear_term(model, mim, "rho*u.Test_u", TOP);
> >> >
> >> > Could you anser it? Thank you.
> >> >
> >> > Best Regard Tetsuo
> >> >
> >> > 2019年2月11日(月) 17:03 Tetsuo Koyama <address@hidden>:
> >> >> Dear GetFEM++
> >> >>
> >> >> What is the best way to add parameter for each space direction in term?
> >> >> I want to use fixed_size_data as a coefficient of the weak form
> >> >> language, because parameter of each direction is different.
> >> >> Is it work if the dimension of rho is equal to the dimension of mesh
> >> >> in following code?
> >> >>
> >> >> Code of C++:
> >> >> model.add_fixed_size_data("rho", rho);
> >> >> getfem::add_linear_term(model, mim, "rho*u.Test_u", TOP);
> >> >>
> >> >> Best Regard Tetsuo
> >>
> >>
> >> --
> >>
> >>    Yves Renard (address@hidden)       tel : (33) 04.72.43.87.08
> >>    INSA-Lyon
> >>    20, rue Albert Einstein
> >>    69621 Villeurbanne Cedex, FRANCE
> >>    http://math.univ-lyon1.fr/~renard
> >>
> >> ---------
> >>
> >>



reply via email to

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