From: Nasser Mohieddin Abukhdeir <nasser.abukhdeir@mc...>  20080812 22:04:06

Hi: I'm trying to implement Dirichlet boundary conditions in a 1D problem using DiffSystem. There isn't really an example to cover this, so I just want to verify what I came up with makes sense, where two variables "B" and "lB" should be zero at the domain boundaries x=0,1 (note, using numerical jacobians for now): const Real penalty = 1.e10; if (elem>contains_point(Point(0.,0.))elem>contains_point(Point(1.,0.))) { for(unsigned int s=0; s<elem>n_sides(); s++) { if(elem>neighbor(s) == NULL) { Number B = side_value(B_var, s), lB = side_value(lB_var, s); Real B_value = 0.; Real lB_value = 0.; for (unsigned int i=0; i != n_B_dofs; i++) { F1(i) += JxW_side[s] * penalty * (B  B_value) * phi_side[i][s]; F2(i) += JxW_side[s] * penalty * (lB  lB_value) * phi_side[i][s]; } } } }  Nasser Mohieddin Abukhdeir Graduate Student (Materials Modeling Research Group) McGill University  Department of Chemical Engineering http://webpages.mcgill.ca/students/nabukh/web/ http://mmrg.chemeng.mcgill.ca/ 