Hello all, I am going to solve a generalized plane stain problem based on step 44. I have three displacement components (3 dofs per node) on a 2D geometry (dim =2) and mesh (compressible material hence no pressure). All displacements are function of x and y coordinates only, i, e u = u(x,y), v=v(x,y), and w = w(x,y). Hence solution_grads_u_total tensor and F tensor (deformation gradient) are 3x3 tensors with the following forms (u, v, and w are displacements, suffixes denote derivative; and semicolon denotes end of a row):
solution_grads_u_total = [u_x, u_y, 0; v_x, v_y, 0; w_x, w_y, 0] F = [F_11, F_12, 0; F_21, F_22, 0; F_31, F_32, 1] I just wanted to confirm the following things. Please correct me if there is a problem my approach: Since my deformation grad, strain, stress tensors are 2nd rank and having 3x3 elements, here I define the tensors (say F_inv) as (note that *dim = 2*) Tensor<2, *dim+1*> F_inv; Now in the function assemble_system_tangent_one_cell I need to compute the grad_Nx and symm_grad_Nx tensors which, as I understand, should also be of type Tensor<2, *dim+1*> Thus my point is when we compute the gradient of the shape functions using the piece of command in the below (taken from function assemble_system_tangent_one_cell) we should expect to get first two columns with non-zero entries and last column with all zero entry as we not have derivatives of shape functions w.r.t. x and y only (note that the tensor has already been initialized with 0 in scratch as done in step 44). A part of the structure ScratchData_K is also given in the below. I shall be thankful if someone tells me if my approach about solving the problem is correct and if there is issue somewhere. Thanks and regards, Anup. for (unsigned int q_point = 0; q_point < n_q_points; ++q_point) { const Tensor<2, *dim+1*> F_inv = lqph[q_point].get_F_inv(); for (unsigned int k = 0; k < dofs_per_cell; ++k) { scratch.grad_Nx[q_point][k] = scratch.fe_values_ref[u_fe].gradient(k, q_point) * F_inv; scratch.symm_grad_Nx[q_point][k] = symmetrize(scratch.grad_Nx[q_point][k]); } } ////////////////////////////////////// part of the structure Scratchdata_K //////////////////////////////////////////////// template <int dim> struct Solid<dim>::ScratchData_K { FEValues<dim> fe_values_ref; std::vector<std::vector<double> > Nx; std::vector<std::vector<Tensor<2, *dim+1*> > > grad_Nx; std::vector<std::vector<SymmetricTensor<2, *dim+1*> > > symm_grad_Nx; ScratchData_K(const FiniteElement<dim> &fe_cell, const QGauss<dim> &qf_cell, const UpdateFlags uf_cell) : fe_values_ref(fe_cell, qf_cell, uf_cell), Nx(qf_cell.size(), std::vector<double>(fe_cell.dofs_per_cell)), grad_Nx(qf_cell.size(), std::vector<Tensor<2, *dim+1*> >(fe_cell.dofs_per_cell)), symm_grad_Nx(qf_cell.size(), std::vector<SymmetricTensor<2, *dim+1*> > (fe_cell.dofs_per_cell)) {} -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.