From: Wout R. <wou...@gm...> - 2006-02-28 16:22:38
|
ShengliXu // you forgot the all important line: dof_map.constrain_element_matrix_and_vector(Ke, Fe, dof_indices); before system.matrix->add_matrix (Ke, dof_indices); system.rhs->add_vector (Fe, dof_indices); So all the other explanations I came up with for the program not working are far-fetched or nonsense. You can choose the solver on the command line, for example: time /usr/bin/mpirun -np 1 $(target) -ksp_type gmres -pc_type jacobi >> log= .txt Now, one more time: If you apply a strain in x-direction the bounds are going to move apart, this CONFLICTS with the boundary conditions you just put up (as you're telling them they have the same displacement). As you will see, if you couple all dofs on all opposing sides as you propose you will only get some noise as an answer regardless of the loading. Read my earlier post on how to deal with that (by adding dofs to the system in a dummy element that represent a displacement of a whole side, keeping the sides in the same shape). Secondly, the code you put in to deal with corners does not do anything, as I said, the corners are in the sides and are dealt with automatically (because "couples" is a std::map and keys are unique in those). Cheers W |