I have currently expanded example 13 to include three dimensions and a
temperature variable to solve a free-convection problem. However, in doing
so, PETSC is giving me segmentation violations when trying to solve. I'm
assuming I have somehow managed to create an uneven stiffness
matrix but believe I have followed the repositioning pattern correctly.
Variable Declaration looks like:
system.add_variable ("u", SECOND);
system.add_variable ("v", SECOND);
system.add_variable ("w", SECOND);
system.add_variable ("P", FIRST);
system.add_variable ("T", SECOND);
And DenseSubVector repositioning looks like:
Kuu.reposition (u_var*n_u_dofs, u_var*n_u_dofs, n_u_dofs, n_u_dofs);
Kuv.reposition (u_var*n_u_dofs, v_var*n_u_dofs, n_u_dofs, n_v_dofs);
Kuw.reposition (u_var*n_u_dofs, w_var*n_u_dofs, n_u_dofs, n_w_dofs);
KuP.reposition (u_var*n_u_dofs, P_var*n_u_dofs, n_u_dofs, n_P_dofs);
KuT.reposition (u_var*n_u_dofs, T_var*n_u_dofs, n_u_dofs, n_T_dofs);
Kvu.reposition (v_var*n_v_dofs, u_var*n_v_dofs, n_v_dofs, n_u_dofs);
Kvv.reposition (v_var*n_v_dofs, v_var*n_v_dofs, n_v_dofs, n_v_dofs);
Kvw.reposition (v_var*n_v_dofs, w_var*n_v_dofs, n_v_dofs, n_w_dofs);
KvP.reposition (v_var*n_v_dofs, P_var*n_v_dofs, n_v_dofs, n_P_dofs);
KvT.reposition (v_var*n_v_dofs, T_var*n_v_dofs, n_v_dofs, n_T_dofs);
Kwu.reposition (w_var*n_w_dofs, u_var*n_w_dofs, n_w_dofs, n_u_dofs);
Kwv.reposition (w_var*n_w_dofs, v_var*n_w_dofs, n_w_dofs, n_v_dofs);
Kww.reposition (w_var*n_w_dofs, w_var*n_w_dofs, n_w_dofs, n_w_dofs);
KwP.reposition (w_var*n_w_dofs, P_var*n_w_dofs, n_w_dofs, n_P_dofs);
KwT.reposition (w_var*n_w_dofs, T_var*n_w_dofs, n_w_dofs, n_T_dofs);
KPu.reposition (P_var*n_u_dofs, u_var*n_u_dofs, n_P_dofs, n_u_dofs);
KPv.reposition (P_var*n_u_dofs, v_var*n_u_dofs, n_P_dofs, n_v_dofs);
KPw.reposition (P_var*n_u_dofs, w_var*n_u_dofs, n_P_dofs, n_w_dofs);
KPP.reposition (P_var*n_u_dofs, P_var*n_u_dofs, n_P_dofs, n_P_dofs);
KPT.reposition (P_var*n_u_dofs, T_var*n_u_dofs, n_P_dofs, n_T_dofs);
KTu.reposition (T_var*n_T_dofs, u_var*n_T_dofs, n_T_dofs, n_u_dofs);
KTv.reposition (T_var*n_T_dofs, v_var*n_T_dofs, n_T_dofs, n_v_dofs);
KTw.reposition (T_var*n_T_dofs, w_var*n_T_dofs, n_T_dofs, n_w_dofs);
KTP.reposition (T_var*n_T_dofs, P_var*n_T_dofs, n_T_dofs, n_P_dofs);
KTT.reposition (T_var*n_T_dofs, T_var*n_T_dofs, n_T_dofs, n_T_dofs);
Most of the program is very similar to ex13 as I've said before, only with
the addition of the "w" and "T" variables for the third dimension and
temperature. Of course, the actual element entries for the Ke and Fe matrix
and vector are different due to it being a different problem, but all loop
through i and j using the appropriate dof variable just as in ex13. Where
would be a good place to start looking to find out what is causing this? I'm
using
libmesh 0.6.4
petsc 3.0.0
slepc 3.0.0
Any help is appreciated.
Thanks,
_Andrew_
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users