← Back to team overview

dolfin team mailing list archive

Re: [Question #152914]: onedimensional derivatives

 

On 15 April 2011 10:53, Martin Sandve Alnæs <martinal@xxxxxxxxx> wrote:
> Change grad(T) to T.dx(0), i.e. derivative in a single direction.
> Maybe we should make grad work like .dx(0) in 1D.

I think that would be a good idea.
When testing stuff in 1D (which is intended for 2D and 3D) I find it
annoying to change back and forth between grad() and .dx(0).

Kristian

> Martin
>
> On 15 April 2011 10:46, Bento <question152914@xxxxxxxxxxxxxxxxxxxxx> wrote:
>>
>> New question #152914 on DOLFIN:
>> https://answers.launchpad.net/dolfin/+question/152914
>>
>> Hi,
>>
>> I want to solve a PDE on a one-dimensional domain. The equation involves a
>> first derivative. How do I express this in 1D? Here is (basically) my
>> equation:
>>
>> dT/dx + d^2T/dx^2 = 0
>>
>> and weak form
>>
>> a = (grad(T)*v - inner(grad(T), grad(v)))*dx
>>
>> with testfunction v and trialfunction T. When I use grad(T), I get a
>> "shape mismatch in sum" error. The mesh is Interval(100, 0, 10)
>>
>> --
>> You received this question notification because you are a member of
>> DOLFIN Team, which is an answer contact for DOLFIN.
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dolfin
>> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dolfin
>> More help   : https://help.launchpad.net/ListHelp
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help   : https://help.launchpad.net/ListHelp
>
>



Follow ups

References