Thanks for your reply again.
> Yes, of course. Via VectorTools::interpolate_boundary_values and > VectorTools::project_boundary_values. > > Due to your help, I can apply ZeroBoundaryCondition for pressure by adding //test for strong boundary condtion std::map<types::global_dof_index,double> boundary_values_strong; ComponentMask component_mask=fe.component_mask(pressure); VectorTools::interpolate_boundary_values (dof_handler, 0, ZeroFunction<dim>(3), boundary_values_strong, component_mask); MatrixTools::apply_boundary_values (boundary_values_strong, system_matrix, solution, system_rhs); However, when I change " ComponentMask component_mask=fe.component_mask(pressure);" to "ComponentMask component_mask=fe.component_mask(velocities);", the error occured. So, I trying to use "VectorTools::project_boundary_values" as you mentioned. I replace "VectorTools::interpolate_boundary_values" with "VectorTools::project_boundary_values" as follows.. std::map<types::global_dof_index,double> boundary_values_strong; ComponentMask component_mask=fe.component_mask(velocities); VectorTools::project_boundary_values (dof_handler, ZeroFunction<dim>(3), face_quadrature_formula, boundary_values_strong, component_mask); MatrixTools::apply_boundary_values (boundary_values_strong, system_matrix, solution, system_rhs); However, the error occured again. It said that /user2/hanks318/dealii/dealii_pre/examples/step-20/step-20.cc:575: error: no matching function for call to ‘project_boundary_values(dealii::DoFHandler<2, 2>&, dealii::ZeroFunction<2, double>, dealii::QGauss<1>&, std::map<unsigned int, double, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, double> > >&, dealii::ComponentMask&)’ Could you please let me know What I did wrong...? Thank you Kyusik. -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.