Constraining a specific element(s) in P0 space

Hi all,

Is it possible to constrain a specific elements (or elements) as a Dirichlet reference value using P0 space? I am planning on using the iterative solvers within the PETSc library, so this doesn’t give me the option to search for the required element and set a tgv(=1e30).

Thanks,
Greg

so this doesn’t give me the option to search for the required element and set a tgv

What are you saying? Also, best to avoid tgv=1e30.

I am trying to constraint a specific element using P0 space. How would I go about doing this?

Could I set the tgv=-1 for the corresponding degree of freedom associated with that element in the system?

Thanks

What do you mean by “constraint a specific element using P0 space”? What constraint? You don’t constraint elements, you constraint degrees of freedom.

Apologies for poor phrasing of the question…

Yes exactly! How does one constrain a degree of freedom in a system when using P0 space? When using P1 space, one simply able to use the on function to apply a Dirichlet bc on a specific face etc. Clearly this approach is not feasible for P0 space since the dofs are no longer located on the boundary face. So with the P0 space I would like to constrain a specific dof (or set of), where this dof is identified as the specified element centre.

Thanks again

What’s the issue with using on() and tgv ?