|
From: | Yves Renard |
Subject: | Re: [Getfem-users] [Getfem-commits] What is the best way to add parameter for each direction in term? |
Date: | Mon, 11 Feb 2019 17:08:29 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
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 ---------
[Prev in Thread] | Current Thread | [Next in Thread] |