Maybe as an edit: what I currently do looks the following way:

```
// Get gradient in reference frame
const Tensor<2, dim, VectorizedArrayType> grad_u = phi.get_gradient(q_point
); 
// Compute deformation gradient
const Tensor<2, dim, VectorizedArrayType> F = Physics::Elasticity::
Kinematics::F(grad_u); 
const SymmetricTensor<2, dim, VectorizedArrayType> b = Physics::Elasticity::
Kinematics::b(F); 

const VectorizedArrayType det_F = determinant(F); 
// Invert F
const Tensor<2, dim, VectorizedArrayType> F_inv = invert(F); 
const SymmetricTensor<2, dim, VectorizedArrayType> b_bar = Physics::
Elasticity::Kinematics::b( Physics::Elasticity::Kinematics::F_iso(F)); 
// Get tau from material description 
SymmetricTensor<2, dim, VectorizedArrayType> tau; material->get_tau(tau, 
det_F, b_bar, b);

// Gradient itslef is included in the integrate call, apply push forward 
with F^{-1}
const Tensor<2, dim, VectorizedArrayType> symm_grad_Nx = symmetrize(F_inv);
// Compute the result
const Tensor<2, dim, VectorizedArrayType> result = symm_grad_Nx * Tensor<2, 
dim, VectorizedArrayType>(tau);
// Apply an additional push forward with F^{-T}
phi.submit_gradient(-result * transpose(F_inv), q_point);  // end loop over 
quadrature points 

// For each element
phi.integrate(false, true); 
```

It works, but I don't get the quadratic convergence order of the Newton 
scheme anymore. Hence, I assume this is not sufficient.
David schrieb am Dienstag, 29. Dezember 2020 um 12:41:35 UTC+1:

>
> Hi all,
>
> I'm currently trying to implement a vectorized variant of the residual 
> assembly as it is done in step-44/one of the corresponding code-gallery 
> examples using FEEvaluation objects in combination with matrix-free. 
>
> I was not able to find an appropriate solution for the given code line 
> <https://github.com/dealii/dealii/blob/57ca3f894d1bb31f6a6dd448864f4386dc6692ad/examples/step-44/step-44.cc#L2040>and
>  
> the subsequent application for the assembly process: the major problem is 
> that the shape function gradients are defined with regard to the current 
> configuration, whereas my matrix-free object holds a mapping, which refers 
> to the initial configuration. The reference configuration mapping  of my 
> matrix-free object is desired as the final integration is actually 
> performed in the reference frame.
> A valid option is probably (I have not tried it) to use a matrix-free 
> object with a different mapping (MappingQEulerian) which directly evaluates 
> the shape gradients in the deformed configuration and use another 
> referential matrix-free object for the integration part. 
> The main reason to avoid this approach is that it would require a 
> reinitialization of the 'deformed' matrix-free object in each nonlinear 
> step and the mapping needs to be recomputed in each reinizialization. On 
> the other hand, the expensive reinitialization is not really required as 
> the mapping between the referential and the current configuration is known 
> due to the (inverse) deformation gradient. 
> Therefore, I'm looking for an opportunity to access the shape gradients 
> and perform a push forward similarly to the approach in step-44 in order to 
> evaluate the desired quantities. 
>
> Until now I was not able to find an obvious solution for this computations 
> using the FEEvaluation class. Maybe anyone else has a better idea for the 
> described problem.
>
> Thanks in advance,
> David
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/7b3c1488-cf75-4526-8442-d1045dc73398n%40googlegroups.com.

Reply via email to