Is an alternative to check the components, and set the conditions 
accordingly? I wrote it like
   
 template <int dim>
    double InitialValues<dim>::value(const Point<dim> &p, const unsigned int 
component) const
    {
        (void) p;
        Assert(component < this->n_components, ExcIndexRange(component, 0, 
this->n_components));
        if(component < dim)
            return equations.initial_carrier_density;
        else
            if(component < 2*dim && component >= dim)
                return equations.ambient_temperature;
            else
                return equations.ambient_temperature;
    }



Am Freitag, 4. August 2017 12:34:30 UTC+2 schrieb Wolfgang Bangerth:
>
> On 08/04/2017 04:23 AM, 'Maxi Miller' via deal.II User Group wrote: 
> > When creating boundary conditions, I can use the parameter 
> component_mask in 
> > order to set boundary conditions only for a part of my system. Now I 
> want to 
> > set initial conditions for the same system. One approach is using 
> > | 
> > VectorTools::project 
> > | 
> > 
> > but there I can not see an option for component_mask in the files. Is 
> there 
> > another way to project initial conditions only on a part of the system? 
>
> No, but you can always project all components and then just ignore those 
> parts 
> of the projected vector that you don't care about. 
>
> Best 
>   W. 
>
> -- 
> ------------------------------------------------------------------------ 
> Wolfgang Bangerth          email:                 [email protected] 
> <javascript:> 
>                             www: http://www.math.colostate.edu/~bangerth/ 
>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to