for(unsigned int q_index = 0 ; q_index < n_q_points ; ++q_index)
{
double lump = 0.0;
for(unsigned int i = 0; i<dofs_per_cell; ++i)
for(unsigned int j = 0; j<dofs_per_cell; ++j)
lump += fe_values.shape_value(i, q_index) *
fe_values.shape_value(j, q_index) *
fe_values.JxW(q_index);
lump_cell_matrix(i,i) = lump;
}
or another way can be
for(unsigned int q_index = 0 ; q_index < n_q_points ; ++q_index)
{
for(unsigned int i = 0; i<dofs_per_cell; ++i)
for(unsigned int j = 0; j<dofs_per_cell; ++j)
if(i==j)
lump_cell_matrix(i,j) += fe_values.shape_value(i, q_index)*
fe_values.JxW(q_index) ;
else
0;
}
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/c77c7def-c89e-4bdb-8f2d-6cc23fc1eec8n%40googlegroups.com.
for(unsigned int i = 0; i<dofs_per_cell; ++i)
{
double lump = 0.;
for(unsigned int j = 0; j<dofs_per_cell; ++j)
{
for(unsigned int q_index = 0 ; q_index < n_q_points ; ++q_index)
{
lump += fe_values.shape_value(i, q_index) *fe_values.shape_value(j, q_index) * fe_values.JxW(q_index);
}
}
lump_cell_matrix(i,i) = lump;
}
You received this message because you are subscribed to a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/0B1nGC0O1Tc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/CALUbCFwGm8duazCftHqU%2BOUzkOxHxgsm%2B4EgZZk1r9Thf%3DiTQA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/CAGVt9ePyAxprvkxEEwOG4du9_hp7bcQFq%2B2mHBfntA7rY4-p7g%40mail.gmail.com.
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/1b0908b3-e43c-2d6a-b2a0-09a7a51b4636%40colostate.edu.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/CALUbCFwyACZFLqF2ZEXztJ3H4b2iEhcVGYJ90beAMNPnUVz6aQ%40mail.gmail.com.
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/e751f64b-5cc3-d823-0855-5e51d6dd4d46%40colostate.edu.