On Wed, Jun 12, 2019 at 4:38 PM Nathan Andrew Miller < nathan.a.mil...@colorado.edu> wrote:
> I'm trying to compute the xyz, JxW, and other values at arbitrary points > for a FEBase object during the evaluation of a MOOSE UserObject. I > implemented the following in code: > > ``` > //Create a vector of points > std::vector< Point > cell_points; > > ...things to fill cell_points... > > //Create a vector of ones (the weights) > ones = std::vector< double > (cell_points.size(), 1); > > std::unique_ptr< libMesh::FEBase > fe( > libMesh::FEBase::build(_mesh.dimension(), > libMesh::FEType(_current_elem->default_order()))); > > fe->reinit(_current_elem, &cell_points, &ones); > > You have to pre-request that the xyz values be computed before you call fe->reinit. So put the following line: > std::vector< Point > xyz = fe->get_xyz(); > before the reinit() call and it should work. -- John _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users