On 15 December 2010 13:56, Wolfgang Bangerth <[email protected]> wrote:
> > > I apologise if the question's too simplistic, but does this give the > > correct behaviour: > > > > MatrixCreator::create_mass_matrix (dof_handler, QGauss<dim>(3), > > mass_matrix); > > > > MatrixCreator::create_laplace_matrix (dof_handler, QGauss<dim>(3), > > laplace_matrix); > > > > > > system_matrix.copy_from (mass_matrix); > > > > system_matrix.add (theta * time_step * tensor_coefficient, > > laplace_matrix); > > This isn't going to work: you can't multiply a matrix after assembly by a > coefficient unless the coefficient is scalar and constant throughout the > domain. > > The equivalent function to create_*_matrix you are looking for for tensor > coefficients does not currently exist. You can either take the existing > functions and create versions that do what you, or you can simply adjust > the > assembly functions from step-6 to include a tensor valued coefficient. The > latter is probably the simpler avenue, the former would yield a function > that > could be integrated into the library if you wanted. > > Hi Wolfgang, I actually just assembled a Laplace Matrix to include a tensor valued coefficient. I agree that a such function that could be integrated into the library would be beneficial and I'll have a look at implementing it when I complete what I'm working on presently. Many thanks, Ted
_______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
