> It's highly unlikely you'd create an Indexed that did an operation with a
> Matrix, but a Matrix with Indexed elements, yes as this is what would
> happen in a finite difference model.
>

Would you write it as Matrix([indexed_thing, indexed_thing_2, ...]), or
just use the indexed object support for the outer Matrix as is already
shown in the docs?


On Mon, Aug 4, 2014 at 11:34 PM, Tim Lahey <tim.la...@gmail.com> wrote:

>
>
> On 5 Aug 2014, at 0:14, James Crist wrote:
>
>  @Tim:
>>
>> They're for representing tensors. Of course, the can be used for a number
>>
>>> of things, including calculating finite difference formulas. In my case,
>>> tensors are useful for stress analysis, especially in changing reference
>>> frames. Other uses I know about relate to various physics topics.
>>>
>>>
>> Oh neat! I took a class on finite elements, but we never referred to them
>> as tensors. I'll have to look into that.
>>
>
> Not really, finite differences are a different approach to solving PDEs.
> With finite differences you have nodes at i-1, i, and i+1 (and possibly in
> time or in multiple dimensions). You approximate the derivative with
> differences in the values at those points. You can use Indexed to represent
> these. As the mesh gets more fine, it's a closer representation of the
> derivative as the formulas come from Taylor series. I guess you could think
> of them as tensors, but it's not a common thing. It's just that Indexed
> provides a useful way you can do the representation.
>
> The tensors are from continuum mechanics. The more sophisticated analysis
> of material deformation all comes down to this, and tensors are the usual
> way to represent things.
>
>
>
>> Have you used code generation with them? If you have and have some example
>> code with them you could send my way that'd be great. It'd be really
>> useful
>> for me to understand exactly what the scope of support for them is, as I
>> work around the implementation trying to get other things to work.
>>
>>
> No, I haven't. Sorry.
>
>
>  For example, would you ever create an Indexed that did an operation with a
>> Matrix?  Or a Matrix with Indexed's as elements? What I'm trying to see is
>> if there is any reason for them ever to coexist, or can the
>> implementations
>> assume that they're never used together? The tensor code makes everything
>> really complicated as the loops introduce a scope  of sorts (symbol y[i]
>> isn't the same value at each point in a loop).
>>
>
> It's highly unlikely you'd create an Indexed that did an operation with a
> Matrix, but a Matrix with Indexed elements, yes as this is what would
> happen in a finite difference model.
>
> Cheers,
>
> Tim.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sympy" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/sympy/zRytRaEH5R8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/sympy/B68EFEFD-3CCC-4D2F-93F9-A326BE280EA1%40gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAJ2L7mdSk_RSWJ9FvU3iERO9c%3DWTP7y3ZaENFpJZXGdn3s5U7w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to