Dear developer, For solving a Navier-Stokes equation by a P2P1 FEM, I want to impose specific pressure values on the outflow boundary condition. The following treatment may cause error since the degrees of freedom of pressure is that using first order, which is smaller than the second order DOF for velocity. Can I loop over only vertices of an element so that the P1 DOFs are accessed? Using elem->n_vertices() rather than elem->n_nodes()? Thank you!
for (unsigned int s=0; s<elem->n_sides(); s++) if (elem->neighbor(s) == NULL) { AutoPtr<Elem> side (elem->build_side(s)); for (unsigned int ns=0; ns<side->n_nodes(); ns++) { ... ... for (unsigned int n=0; n<elem->n_nodes(); n++) if (elem->node(n) == side->node(ns)) { Kpp(n,n) += penalty; } } // end face node loop } // end if (elem->neighbor(side) == NULL) Regards, Luo Li ------------------------------------------------------------------------------ _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users