Prof. Bangerth,

I agree that one will have to first define "symmetry" for higher-order 
tensors. Perhaps one solution, at least for the 4th-order tensors, could be 
to have a function 'symmetrize()' (or some other name) with additional 
arguments specifying the type of symmetry, i.e. the so-called - minor 
symmetry (A_{ijkl} = A_{ijlk} = A_{jikl} = A_{jilk}) or the major symmetry 
(A_{ijkl} = A_{klij}) or both. I'll try to write a patch.

JP,

Thanks! I decided to change my parameterization for now.

Regards
Vinayak

On Thursday, July 25, 2024 at 2:56:31 AM UTC+5:30 Jean-Paul Pelteret wrote:

> Hi Vinayak,
>
> I wrote a reply a few days ago, but apparently I managed to address it to 
> Wolfgang rather than the mailing list. Oops... I know that you've made some 
> progress since then but since maybe these details could be of some further 
> interest I've copied it verbatim. I think that the last sentence aligns 
> with what you've already done.
>
> -----------------
>
> To answer your earlier question [from 18 July] directly, I think that the 
> feature that you're looking for is called make_symbolic_function() 
> <https://dealii.org/current/doxygen/deal.II/namespaceDifferentiation_1_1SD.html#aca52d0daf28725a318c088ad5af47c8f>
>  
> for scalars, or make_[vector 
> <https://dealii.org/current/doxygen/deal.II/namespaceDifferentiation_1_1SD.html#aab0b7e232cfce4ec2ce1103c9b2355b6>,
>  
> tensor 
> <https://dealii.org/current/doxygen/deal.II/namespaceDifferentiation_1_1SD.html#ae7b8f65f088b8a48270a8f0bd6827bdb>,
>  
> symmetric_tensor 
> <https://dealii.org/current/doxygen/deal.II/namespaceDifferentiation_1_1SD.html#ab1ce6976f2bbd7f477f2f7e5312c2428>]_of_symbolic_functions()
>  
> for higher dimension entities. These allow you to generically express 
> symbolic functions with other functions as arguments, and differentiate 
> correctly.
>
> That said, I don't think that this is what you want to do. There is an 
> example in the tests for step-44, namely 
> tests/symengine/step-44-sd-quadrature_level_0[1,2,3].cc 
> <https://github.com/master/dealii/blob/3473bfcca7d6524a187588d2644998ddc807f082/tests/symengine/step-44-sd-quadrature_level_01.cc>
>  
> that exploits the relationship between det(b) and det(F) = sqrt(det(b)) = 
> sqrt(det(C)) to compute the kinetic variables and their derivatives. I 
> think that you'd be able to solve your problem most easily if you follow 
> suite. Otherwise you'd really have to differentiate with respect to F, 
> which you state as being the true parameterisation of the energy, and then 
> push forward the Piola-Kirchoff stress tensor and its linearisation (e.g. 
> using the functions in the namespace Physics::Transformations 
> <https://dealii.org/current/doxygen/deal.II/namespacePhysics_1_1Transformations.html>
>  
> if any of them seem like good candidates).
>
> -----------------
>
> Best,
> Jean-Paul
>
>
> On Thursday, July 18, 2024 at 8:01:51 PM UTC+2 Wolfgang Bangerth wrote:
>
> On 7/18/24 00:22, Vinayak Vijay wrote: 
> > 
> > But here, it looks like the information about the composition of the 
> functions 
> > is not being stored somehow, maybe because it reduces the expressions to 
> the 
> > independent variables ("x" in this case). What change should I make to 
> obtain 
> > dg_dy? The independent variable remains "x" of course. 
>
> I do not actually know enough about SD to help with this. The way I read 
> the 
> code is that you declare x to be an independent variable, whereas y is 
> not. 
> Intuitively, I would have expected the underlying library to raise an 
> exception when you try to compute the derivative with regard to anything 
> other 
> than an independent variable. 
>
> I think you'll have to find out what underlying SD library your example is 
> using, and then read through the documentation of that library to see how 
> to 
> approach the issue. Alternatively, you can of course define a function 
> g_of_x 
> and another g_of_y, and depending on whether you want to compute the 
> derivative with regard to x or y, you choose one or the other. 
>
> Best 
> W. 
>
> -- 
> ------------------------------------------------------------------------ 
> Wolfgang Bangerth email: [email protected] 
> www: http://www.math.colostate.edu/~bangerth/ 
>
>
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/db967ad3-1002-43ef-b512-b424de744d32n%40googlegroups.com.

Reply via email to