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 <[email protected]>:
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 ([email protected]) tel : (33) 04.72.43.87.08
INSA-Lyon
20, rue Albert Einstein
69621 Villeurbanne Cedex, FRANCE
http://math.univ-lyon1.fr/~renard
---------