Thank you Wolfgang.

Basically if I interpolate a step function (which can be exactly presented 
in for example DGQ1 space if the discontinuity is at the node) I get a 
1-element wide transition.  In ASCII pictures, I expect  ___----  but I get 
___/---  instead :)

So if I understand you correctly, one would need to (1) obtain 
ConstraintMatrix from project_boundary_values; (2) go over each row of the 
constraint matrix and check which component it is; (3) if it is the "right" 
component  then copy the row.  Could I ask how does one figure out the 
component number from the row number in the ConstraintMatrix - I cannot 
immediately figure this out from DoFHandler interface?

/Anton

On Saturday, April 6, 2019 at 5:11:09 PM UTC+2, Wolfgang Bangerth wrote:
>
> On 4/5/19 11:25 AM, Anton wrote: 
> > I need to apply a boundary condition (discontinuous function) to a few 
> > components of a dof_handler only.  I am currently using 
> > 
> > | 
> > voidVectorTools::interpolate_boundary_values 
> > <
> https://dealii.org/current/doxygen/deal.II/group__constraints.html#ga2376b9a282a2b62be5c55ab62a11a132>(constDoFHandlerType<dim,spacedim
>  
>
> >  >&dof,consttypes::boundary_id 
> > <
> https://dealii.org/current/doxygen/deal.II/namespacetypes.html#aaf4eb6ec214fa642dfd956f11a9cd2d7>boundary_component,constFunction
>  
>
> > <https://dealii.org/current/doxygen/deal.II/classFunction.html><spacedim,number
> >  
> >&boundary_function,ConstraintMatrix 
> > <https://dealii.org/current/doxygen/deal.II/classConstraintMatrix.html>&constraints,constComponentMask
> >  
>
> > <https://dealii.org/current/doxygen/deal.II/classComponentMask.html>&component_mask=ComponentMask
> >  
>
> > <https://dealii.org/current/doxygen/deal.II/classComponentMask.html>()) 
> > | 
> > 
> > for this purpose, but because of the discontinuity I get unwanted 
> effects near 
> > the discontinuity - that is even when the discontinuity is aligned with 
> the 
> > mesh, and even though I am using discontinuous elements (FE_FaceQ), I 
> get 
> > unwanted effects because the interpolation point falls exactly between 
> the 
> > elements.  Is there a way of applying project_boundary_values instead to 
> fix 
> > this issue?  Basically I cannot seem to find support for component 
> selection 
> > in connection with project_boundary_values. 
>
> Can you explain what these unwanted effects are, for example in a picture? 
>
> You're right that the project_b_v() function (currently) doesn't support 
> selecting individual components. But you can just project onto all 
> components 
> into a separate object, and then you only transfer those elements that 
> correspond to the components you care about. 
>
> Best 
>   Wolfgang 
>
> -- 
> ------------------------------------------------------------------------ 
> Wolfgang Bangerth          email:                 bang...@colostate.edu 
> <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 dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to