Hello Huan,

I tested using constraints.is_constrained but the results doesn't
improve. It only works if I comment out the whole IF statement, i.e.
assemble the dummy matrix on every DOF.
I will check your code, which was attached to your first mail, and send you an mail later on.
The main reason I want to separate the matrix and rhs assembly is I want
to do sth. similar to tutorial 34, computing some 3 dimenional
hydrodynamic system in parallel. The the stiffness matrix does not need
to be assembled at every time step. I guess in this case
MatrixTools::apply_boundary_values() does not work in this case. (please
correct me if I'm wrong.)
I do not see a way to use MatrixTools::apply_boundary_values() here, too.
Also when I used VectorTools:project() for inhomogeneous boundary
condition, I got some exception message as follows, not sure what's
going on.


--------------------------------------------------------
An error occurred in line<162>  of file
</gpfs/home/hus126/work/download/deal.II/lac/include/lac/constraint_matrix.templates.h>
  in function
     void dealii::ConstraintMatrix::condense(VectorType&) const [with
VectorType = dealii::Vector<double>]
The violated condition was:
     constraint_line->inhomogeneity == 0.
The name and call sequence of the exception was:
     ExcMessage ("Inhomogeneous constraint cannot be condensed " "without
any matrix specified.")
Additional Information:
Inhomogeneous constraint cannot be condensed without any matrix
specified.

Stacktrace:
-----------
#0  /gpfs/home/hus126/work/download/deal.II/lib/liblac.g.so.6.2.1: void
dealii::ConstraintMatrix::condense<dealii::Vector<double>
(dealii::Vector<double>&) const
#1  /gpfs/home/hus126/work/download/deal.II/lib/libdeal_II_2d.g.so.6.2.1: void dealii::VectorTools::project<2, 
dealii::TrilinosWrappers::Vector, 2>(dealii::Mapping<2, 2>  const&, dealii::DoFHandler<2, 2>  const&, 
dealii::ConstraintMatrix const&, dealii::Quadrature<2>  const&, dealii::Function<2>  const&, 
dealii::TrilinosWrappers::Vector&, bool, dealii::Quadrature<(2)-(1)>  const&, bool)
#2  /gpfs/home/hus126/work/download/deal.II/lib/libdeal_II_2d.g.so.6.2.1: void dealii::VectorTools::project<2, 
dealii::TrilinosWrappers::Vector, 2>(dealii::DoFHandler<2, 2>  const&, dealii::ConstraintMatrix const&, 
dealii::Quadrature<2>  const&, dealii::Function<2>  const&, dealii::TrilinosWrappers::Vector&, bool, 
dealii::Quadrature<(2)-(1)>  const&, bool)
#3  ./angle_newton: MultiPhaseProblem<2>::run()
#4  ./angle_newton: main
If you want to have nonhomogeneous boundary of your projected function you must not impose boundary conditions in the constraint matrix. Then the boundary values of the function are approximated.

Best Regards,
Markus
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to