@Jean-Paul Pelteret: Simple, but effective. Why to make it easy if you can
make it complicated. Thank you.
I checked everything. Very nice design of deal.II.
If any newbie searches for similar things like me, maybe this could help:
std::vector<DerivativeForm<1,dim,dim> > invJ =
fe_values.get_inverse_jacobians ();
FullMatrix<double> B_origin (dim, vertices_per_cell);
FullMatrix<double> B (3, dofs_per_cell);
for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
{
std::cout << "\n - in GAUSS point " << q_point + 1 << " - \n" << std::endl;
for (unsigned int i = 0; i < dofs_per_cell; i = i + dim)
{
unsigned int index = i / dim;
B_origin[0][index] = invJ[q_point][0][0] * fe_values.shape_grad (i,
q_point)[0] + invJ[q_point][0][1] * fe_values.shape_grad (i, q_point)[1];
B_origin[1][index] = invJ[q_point][1][0] * fe_values.shape_grad (i,
q_point)[0] + invJ[q_point][1][1] * fe_values.shape_grad (i, q_point)[1];
B[0][2 * index] = B_origin[0][index];
B[1][2 * index + 1] = B_origin[1][index];
B[2][2 * index] = B_origin[1][index];
B[2][2 * index + 1] = B_origin[0][index];
}
std::cout << "\nB-OPERATOR (ORIGIN)\n" << std::endl;
B_origin.print_formatted (std::cout, 4, false, 8, "0", 1., 0.);
std::cout << "" << std::endl;
std::cout << "\nB-OPERATOR\n" << std::endl;
B.print_formatted (std::cout, 4, false, 8, "0", 1., 0.);
std::cout << "" << std::endl;
}
Thank you very much everyone.
Have a nice christmas holiday time.
Kind regards,
S. A. Mohseni
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.