Re: [deal.II] Matrix-free: Computing coefficient involving material ID

2017-10-08 Thread Martin Kronbichler
Dear Michal, > for(unsigned int element=0; > element::n_array_elements ; ++element) Please use this->data->n_components_filled(cell) instead. It returns how many of the SIMD lanes are actually filled with real data. Best, Martin -- The deal.II project is located at http://www.dealii.org/ For

[deal.II] Matrix-free: Computing coefficient involving material ID

2017-10-08 Thread Michał Wichrowski
Dear all, How can I compute coefficient based on material ID? I tried: template template inline void SymGradMass ::evaluate_coefficient( std::map& rho_map, std::map& miu_map) { return; const unsigned int n_cells = this->data->n_macro_cells(); rho.resize (n_cells); mu.resize (n_cells); fo

Re: [deal.II] Matrix-Free framework for vector problems: no assertion for components

2017-10-08 Thread Michał Wichrowski
W dniu niedziela, 8 października 2017 12:55:02 UTC+2 użytkownik Martin Kronbichler napisał: > > Dear Michal, > > Could you please be a bit more specific? What was the error that you > obtained? What vector did you pass into > FEEvaluation::read_dof_values/distribute_local_to_global? I guess th

Re: [deal.II] Bug in FEEvaluationAccess::get_symmetric_gradient with Number =float

2017-10-08 Thread Martin Kronbichler
Dear Michal, You are right, this is a bug and your fix is indeed correct. Would you like to create a pull request fixing it? Here are some basic instructions: http://dealii.org/participate.html including a video lecture. This way you get the proper credit for it. Best, Martin On 08.10.2017

Re: [deal.II] Matrix-Free framework for vector problems: no assertion for components

2017-10-08 Thread Martin Kronbichler
Dear Michal, Could you please be a bit more specific? What was the error that you obtained? What vector did you pass into FEEvaluation::read_dof_values/distribute_local_to_global? I guess that you handed in a simple vector, e.g. LinearAlgebra::distributed::Vector and got a segmentation fault.

[deal.II] Bug in FEEvaluationAccess::get_symmetric_gradient with Number =float

2017-10-08 Thread Michał Wichrowski
Dear all, In following line: line 4545 of /include/deal.II/matrix_free/fe_evaluation.h: VectorizedArray half = make_vectorized_array (0.5); 0.5 is interpreted as double and it leads to using make_vectorized_array. That is OK if Number=double but for any other type (eg. float) it results is com