> template <int dim>
> class Traction:public Function<dim>
> {
> public:
> Traction():Function<dim>(dim+1){}
>
> [...]
>
> template<int dim>
> void Traction<dim>::vector_value(const Point<dim>& p,Vector<double>&
> values)const {
>
> Assert(values.size()==dim,ExcDimensionMismatch(values.size(),dim));This is contradictory: you say the function has dim+1 components, but you assert that it has dim. On the other hand, later on you access all dim+1 components: > traction_values[q_point] (component_i)* Are you running this in debug mode? > The rest boundary conditions are u1=u2=0 on the upper and lower parts of > the channel and at the most left and right I set u2=0 and leave the u1 > component unspecified by doing the following > > std::vector<bool> component_mask_1 (dim+1,true); > > //exclude u1 velocity and pressure > component_mask_1[0]=false; > component_mask_1[dim]=false; Can you specify what exactly your boundary conditions and the corresponding bilinear form is if you only impose Dirichlet boundary conditions for part of the velocity vector? Best W. ------------------------------------------------------------------------- Wolfgang Bangerth email: [email protected] www: http://www.math.tamu.edu/~bangerth/ _______________________________________________
