Hi,

I have the following question which will probably be trivial to most
of you. I am writing a program for involving Stokes flow, for that I
essentially followed mainly step-22 of the tutorial.
As one of the testcases now I want to use the driven cavity which
means Dirichlet everywhere on the whole domain. My issue which is
probably just me being stupid is now how to implement this
efficiently.

My first attempt inspired by step-22 was

    std::vector<bool> component_mask (dim+1, true);
    component_mask[dim] = false;
    VectorTools::interpolate_boundary_values (dof_handler,
                                              1,
                                              BoundaryValues<dim>(),
                                              hanging_node_constraints,
                                              component_mask);

and then later after assembly

hanging_node_constraints.condense (system_matrix, system_rhs); (I know
the local distribution would be better).

This procedure does not give me a consistens right hand side as the
part g in rhs=[b;g]'; does not satisfy
(g,1)=0;

Here is the boundary function

BoundaryValues<dim>::value (const Point<dim>  &p,
                            const unsigned int component) const
{
        if (p[1]==1)
                return 1;
        return 0;
}

If I understand the component_mask properly then the Boundary value
function shouldn't be called for the pressure values.

Where is it that I am going wrong? Any help is greatly appreciated.

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

Reply via email to