Possible issue with superfluous vertices
Hello SfePy!
I am solving the Poisson problem and during my solution I got the warning:
Warning: /usr/local/lib/python2.7/dist-packages/sfepy/fem/fields_base.py:1258: RuntimeWarning: invalid value encountered in divide data_vertex /= nod_vol[:,nm.newaxis]
The code for this warning:
def post_process(out, pb, state, extend = False):
# evaluate gradient in nodes
grad_data = pb.evaluate('ev_grad.i1.Omega(u)', mode = 'qp')
grad_field = H1NodalVolumeField('grad', np.float64, (3, ),
pb.domain.regions['Omega'])
grad_var = FieldVariable('grad', 'parameter', grad_field, 3,
primary_var_name='(set-to-None)')
*grad_var.data_from_qp(grad_data, pb.integrals['i1']) *
This warning is appeared only for the meshes with superfluous vertices. The code and the meshes is in the attachment. I think this warning my be related to the issue with superfluous vertices. See early discussion [1] and git commit [2]
[1] https://groups.google.com/forum/?fromgroups=#!topic/sfepy-devel/3Qae2M5bBps [2] https://github.com/sfepy/sfepy/commit/4ef0f5dbc7fac15942ba2031debf1296a35eb4...
Sincerely, Alec
On 10/18/2012 02:04 PM, Alec Kalinin wrote:
Hello SfePy!
I am solving the Poisson problem and during my solution I got the warning:
Warning: /usr/local/lib/python2.7/dist-packages/sfepy/fem/fields_base.py:1258: RuntimeWarning: invalid value encountered in divide data_vertex /= nod_vol[:,nm.newaxis]
The code for this warning: def post_process(out, pb, state, extend = False): # evaluate gradient in nodes grad_data = pb.evaluate('ev_grad.i1.Omega(u)', mode = 'qp')
grad_field = H1NodalVolumeField('grad', np.float64, (3, ), pb.domain.regions['Omega']) grad_var = FieldVariable('grad', 'parameter', grad_field, 3, primary_var_name='(set-to-None)') *grad_var.data_from_qp(grad_data, pb.integrals['i1']) *This warning is appeared only for the meshes with superfluous vertices. The code and the meshes is in the attachment. I think this warning my be related to the issue with superfluous vertices. See early discussion [1] and git commit [2]
Good catch, thanks for reporting this! It is now fixed in the master repository
- both your meshes work without causing any warnings.
Cheers, r.
[1] https://groups.google.com/forum/?fromgroups=#!topic/sfepy-devel/3Qae2M5bBps [2] https://github.com/sfepy/sfepy/commit/4ef0f5dbc7fac15942ba2031debf1296a35eb4...
Sincerely, Alec
participants (2)
-
Alec Kalinin -
Robert Cimrman