Hello Marc,
of course you can reuse the factorization. Therefore we have two
functions - factorize and solve.
Best Regards,
Markus
Am 25.11.2011 06:06, schrieb Marc Secanell Gallart:
Hello Markus and Luca,
Thank you very much for your suggestions and explanation.
It seems to me that both approaches are similar, however, Luca's
approach will allow me to reuse the factorization with different RHSs
which, please correct me if I am mistaken, I might not be able to do
using Markus' approach.
Luca, you mention "Apply boundary values to the matrix, with a fake
boundary_values map, in which all entries which you want to later
apply are set to one, a zero rhs" So, do you mean something like this
BlockVector<double> rhs;
rhs.reinit(solution);
std::map<unsigned int, double> boundary_values;
VectorTools::interpolate_boundary_values (dof,
grid.get_boundary_id("c_CL/Membrane"),
ConstantFunction<dim> PEM(1),
boundary_values,
comp_mask);
MatrixTools::apply_boundary_values(boundary_values,
matrix,
solution,
rhs,
false);
Then you mention "Factorize the matrix, then when you want to apply it
to different bondary conditions, scale the values of the rhs
corresponding to the dirichlet conditions with the previously stored
rhs values" What do you mean by "scale the values of the rhs (...)"?
Thank you,
Marc
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii