From: walter k. <wal...@gm...> - 2014-04-29 15:54:50
|
Hi, I want to obtain information of dphi/dxi on the elements at the boundary, using fe_face_ptr->get_dphidxi(); but this returns a null vector. However, fe_face_ptr->get_phi() can give me values fe_face_ptr = fe_face.get(); fe_face is one element on the boundary, as shown below: // define fe_face AutoPtr<FEBase> fe_face (FEBase::build(dim, fe_type)); QGauss qface(dim-1, fe_type.default_quadrature_order()); fe_face->attach_quadrature_rule (&qface); // at the boundary if (elem->neighbor(side) == NULL) { fe_face->reinit(elem, side); fe_face_ptr = fe_face.get(); // some functions define the argument as a normal pointer fe_face_ptr->get_phi(); // OK gives the number const vector <vector <Real > >& dphi_i_q = fe_face_ptr->get_dphidxi(); /// not OK, dphi_i_q.size() =0 ?? Thanks, Walter |
From: walter k. <wal...@gm...> - 2014-04-29 17:24:26
|
By the way, I used libmesh 0.8.0, and the element type for the body is Hex8, thus the boundary element type should be quad4. Does anyone have any idea for the issue? Thanks, Walter On Tue, Apr 29, 2014 at 10:54 AM, walter kou <wal...@gm...> wrote: > Hi, > > I want to obtain information of dphi/dxi on the elements at the boundary, > using > fe_face_ptr->get_dphidxi(); but this returns a null vector. > However, fe_face_ptr->get_phi() can give me values > > > fe_face_ptr = fe_face.get(); fe_face is one element on the boundary, as > shown below: > > // define fe_face > AutoPtr<FEBase> fe_face (FEBase::build(dim, fe_type)); > QGauss qface(dim-1, fe_type.default_quadrature_order()); > fe_face->attach_quadrature_rule (&qface); > > // at the boundary > if (elem->neighbor(side) == NULL) > { fe_face->reinit(elem, side); > fe_face_ptr = fe_face.get(); // some functions define the argument as > a normal pointer > fe_face_ptr->get_phi(); // OK gives the number > > const vector <vector <Real > >& dphi_i_q = fe_face_ptr->get_dphidxi(); > /// not OK, dphi_i_q.size() =0 ?? > > > Thanks, > > Walter > > |
From: John P. <jwp...@gm...> - 2014-04-29 17:31:43
|
On Tue, Apr 29, 2014 at 11:24 AM, walter kou <wal...@gm...> wrote: > By the way, I used libmesh 0.8.0, and the element type for the body is > Hex8, thus the boundary element type should be quad4. > > Does anyone have any idea for the issue? > I think you need to do this: const vector <vector <Real > >& dphi_i_q = fe_face_ptr->get_dphidxi(); before you do this: fe_face->reinit(elem, side); so that the FE object knows that it needs to compute that? Just a guess... -- John |