views:

49

answers:

1

Hello all,

I have a sparse matrix that represents a 3D rectangular space. Along some of the boundaries, I know what the value is going to be (it's a constant). The other boundaries may be reflective, differential, etc.

Should I just set the problem up as if all the boundaries were say, differential, and then go back and set the nodes in the solution vector b to be the constants?

Thanks!

+1  A: 

In the finite element method you treat Dirchelet (value constraints) and Neumann (derivative constraints) differently. Usually you assemble the matrix without consideration for boundary conditions first, then apply boundary conditions, then do LU decomposition to solve.

You apply boundary conditions by modifying both the assembled matrix and the RHS vector. I'd have to know more details to tell you exactly what you need to do.

duffymo