Hi John, thank you for your fast answer. Your comment seems reasonable, I should have looked at the declaration of eval... I will try to get access to the mentioned paper to get the correct mapping. Maybe one could map it in ifem_compute_data(), so the user does not need to bother about it and use FEInterface in the same way for both types of elements. Best, Hubert
On 04.08.2016 16:21, John Peterson wrote: > > > On Thu, Aug 4, 2016 at 6:21 AM, Hubert Weissmann <hu.b...@xemail.me > <mailto:hu.b...@xemail.me>> wrote: > > Hi everyone, > I am trying to print the solution of a test-system to a file/stdout. > For this I think it is best to use the compute_data() function which I > do in the following way: > After solving the system, I inserted > > MeshBase::const_element_iterator el = > mesh.active_local_elements_begin(); > const MeshBase::const_element_iterator end_el = > mesh.active_local_elements_end(); > for ( ; el != end_el; ++el) > { > const Elem * elem = *el; > for(unsigned int i=0; i<elem->n_nodes(); i++){ > Point q_point=elem->point(i); // how are points > enumerated?? > FEComputeData data(equation_systems, q_point); > data.init(); > FEInterface::compute_data(3, fe_type, elem, data); > //fe_type > is declared before already > out<<q_point<<" "; > const unsigned int n_dof = data.shape.size(); > for(unsigned int j=0; j<n_dof; j++){ > out<<data.shape[j]<<" "; // how do I make the output in > best case?? > } > out<<std::endl; > } > } > > (Here, I use the example miscellaneous_ex1 as starting point). > However, > as in the example, I want to use infinite elements as well and > than the > calculation ends with the error > > Assertion `-1.-1.e-5 <= v && v < 1.' failed. > > Stack frames: 10 > 0: libMesh::print_trace(std::ostream&) > 1: libMesh::MacroFunctions::report_error(char const*, int, char > const*, > char const*) > 2: > /home/tm162/bin/libmesh/libmesh-1.0/.libs/libmesh_dbg.so.0(+0x135da7d) > [0x2aeffb645a7d] > 3: libMesh::InfFE<3u, (libMesh::FEFamily)11, > (libMesh::InfMapType)0>::eval(double, libMesh::Order, unsigned int) > ........ > > As far as I understand the problem, the function InfFE::compute_data() > (in src/fe/inf_fe_static.C) ist called. > Therein, the parameter v is set (line 249) to the z-coordinate of the > point of evaluation (which is contrary to my understanding of the > parameter v) and than evaluated in InfFE::eval() > (src/fe/inf_fe_map_eval.C) in line 316 which requires v to be in > -1<v<1 > as the assertion says. > > So my main question is: Am I using the function in the way it is > thought > to be used > > > Looks like the eval function is expecting a point in some sort of > "reference" space, but you are handing it elem->point(i), which is a > point in physical space. > /** > * Specialized for \p T_radial=INFINITE_MAP, this function returns > * the value of the \f$ i^{th} \f$ @e mapping shape function > * in radial direction evaluated at \p v. Currently, only one specific > * mapping shape is used. Namely the one by Marques JMMC, Owen DRJ: > * Infinite elements in quasi-static materially nonlinear problems, > * @e Computers @e and @e Structures, 1984. > */ > static Real eval(Real v, > Order o_radial, > unsigned int i); > > Therefore you will need to somehow map q_point into the infinite > element reference space before passing it to FEComputeData. > > -- > John ------------------------------------------------------------------------------ _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users