Hi is there any one who knows how can i define non zero dirichlet boundary condition in gridap? not using affine space just introducing bc in weak form and solve linear Au=b

i know that it should make rows and columns of related bc zero in A but i dont know is there any other way in gridap to make this?

There’s an example of this in the Gridap Poisson tutorial (which is the first hit on a google search for “gridap dirichlet”), which shows how to supply an arbitrary function that indicates the value of the solutions on the Dirichlet boundaries.

yes i have read that tutorial but they applied the displacement bc in trial space and they use traction bc in weak form, in my case i don’t have body force (f) and traction (h) . i just have g on a specified boundary. i want to set both my test and trial space the same and implement g in weak form which i couldn’t find any example of this in tutorials. in all of them they use affine or change the U

Dirichlet boundary conditions aren’t implemented in the weak form — they are an “essential” boundary condition that is implemented in the function space (which are effectively turned into a source term on the rhs during the assembly).

as i understand there are some methods to do that like lagrange multipliers, nitsche and penalty method. am i wrong?

Are you thinking of embedded boundaries? GitHub - gridap/GridapEmbedded.jl: Embedded finite element methods in Julia has an example implementing a Nitsche method. (Not much documentation yet for this package, sadly.)