Hi all

The question I have concerns the use of the VectorTools::project function when 
I only wish to set a certain block of a BlockVector to a prescribed initial 
value. I have only a single DoFHandler.

The BlockVector I wish to set is named X.
Assume my (scalar but could be vector) nodal unknowns are the set u,v,w. I want 
to set all nodal w using the class InitialWValues (derives from Function 
class). It does not seem possible to do the following:
    VectorTools::project (dof_handler,
                          constraints,
                          
QGauss<deal_II_dimension>(quadrature_formula.n_quadrature_points + 2),
                          InitialWValues(1),
                          X.block(2));                  // send in only the W 
block

as I get an error:
The violated condition was:
dof.get_fe().n_components() == function.n_components

I have setup the function InitialWValues to expect only the number of 
components in w (1 in this case)
InitialWValues:: InitialWValues ( :
        Function<deal_II_dimension>(1)
{}

It's obvious how to set all the blocks of X to a value as done in the example 
problems, but not just for one block  (using a single DoFHandler).

It seems I should somehow be telling dof to only consider the block I want to 
set.
Any ideas if this can be done using VectorTools::project? 

Many thanks
Andrew

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

Reply via email to