Re: [sympy] GSoC 2016: Singularity Functions

2016-03-24 Thread SAMPAD SAHA
Yah, It works. Thanks. Regards Sampad Kumar Saha Mathematics and Computing I.I.T. Kharagpur On Fri, Mar 25, 2016 at 2:59 AM, Sartaj Singh wrote: > Sorry, for not being clear the first time. x needs to be real. Symbol('x', > real=True) should also work. > > On 25

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-24 Thread Sartaj Singh
Sorry, for not being clear the first time. x needs to be real. Symbol('x', real=True) should also work. On 25 March 2016 at 02:54, SAMPAD SAHA wrote: > Thank you Sartaj for the explanation. > > But why is it so that only after appling : *x = Symbol('x', >

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-24 Thread SAMPAD SAHA
Thank you Sartaj for the explanation. But why is it so that only after appling : *x = Symbol('x', nonnegative=True) *the above statement works. If we dont use *x = Symbol('x', nonnegative=True) *it gives : In [35]: Heaviside(x).rewrite(Piecewise) Out[35]: Heaviside(x) Regards Sampad Kumar

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-24 Thread Sartaj Singh
In [20]: x = Symbol('x', nonnegative=True) In [21]: Heaviside(x).rewrite(Piecewise) Out[21]: ⎧ 1 for x > 0 ⎪ ⎨1/2 for x = 0 ⎪ ⎩ 0 otherwise On Friday, 25 March 2016 02:15:34 UTC+5:30, SAMPAD SAHA wrote: > > > We have this *_eval_rewrite_as_Piecewise()

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-24 Thread SAMPAD SAHA
We have this *_eval_rewrite_as_Piecewise() *method defined in *Heaviside* Class. But How can we call it or use this implemented functionality from terminal? Regards Sampad Kumar Saha Mathematics and Computing I.I.T. Kharagpur On Fri, Mar 25, 2016 at 2:00 AM, SAMPAD SAHA

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-24 Thread SAMPAD SAHA
Hi Aaron, Pardon Please. I am bit confused. Are you taking about the "*Piecewise Representation*" that I have mentioned in Phase I ? Regards Sampad Kumar Saha Mathematics and Computing I.I.T. Kharagpur On Fri, Mar 25, 2016 at 12:00 AM, Aaron Meurer wrote: > You should

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-24 Thread Aaron Meurer
You should call the method _eval_rewrite_Piecewise. Then you can call it with expr.rewrite(Piecewise). The advantage here is that this will automatically work even if it's a subexpression of some larger expression. Aaron Meurer On Fri, Mar 18, 2016 at 9:37 PM, Jason Moore

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-24 Thread Jason Moore
There shouldn't be any external comments in your final submission. Jason moorepants.info +01 530-601-9791 On Thu, Mar 24, 2016 at 7:30 AM, SAMPAD SAHA wrote: > While submitting the final pdf, are we supposed to remove the comments? > > > > > Regards > Sampad Kumar Saha

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-24 Thread SAMPAD SAHA
Can you please give a final review.. and i didn't get you by this comment "*Comment from Jason: You will need to make sure everything is backwards compatible. See the wiki for our policy.*" Regards Sampad Kumar Saha Mathematics and Computing I.I.T. Kharagpur On Thu, Mar 24, 2016 at 8:16 PM,

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-24 Thread SAMPAD SAHA
While submitting the final pdf, are we supposed to remove the comments? Regards Sampad Kumar Saha Mathematics and Computing I.I.T. Kharagpur On Wed, Mar 23, 2016 at 5:44 PM, SAMPAD SAHA wrote: > Jason , > > I have almost made all the changes that you have suggested.

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-23 Thread SAMPAD SAHA
Jason , I have almost made all the changes that you have suggested. Here is the link https://github.com/sympy/sympy/wiki/GSoC-2016-Application-Sampad-Kumar-Saha:-Singularity-Functions Regards Sampad Kumar Saha Mathematics and Computing I.I.T. Kharagpur On Wed, Mar 23, 2016 at 5:11 PM, SAMPAD

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-23 Thread SAMPAD SAHA
Thanks Sartaj. I went through the Expr class and it cleared all my doubts. I actually forgot that Function class is inheriting Expr class. Regards Sampad Kumar Saha Mathematics and Computing I.I.T. Kharagpur On Wed, Mar 23, 2016 at 4:58 PM, Sartaj Singh wrote: > Hi,

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-23 Thread Sartaj Singh
Hi, This comes from Expr class. On 23 March 2016 at 16:55, SAMPAD SAHA wrote: > I am having a big confusion over this. > > There is no *integrate()* method defined in *DiracDelta* and* Heaviside. *But > still how can this happen. > > In[ ] : DiracDelta(x).integrate()

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-23 Thread SAMPAD SAHA
I am having a big confusion over this. There is no *integrate()* method defined in *DiracDelta* and* Heaviside. *But still how can this happen. In[ ] : DiracDelta(x).integrate() Out [ ] : Heaviside(x) In[ ] : Heaviside(x).integrate() Out [ ] : x*Heaviside(x) I feel like this should

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-22 Thread SAMPAD SAHA
Thanks Jason, I have made some changes. Can you please review those? I have also added some comments along with yours. I didn't get you in this comment. Can you please elaborate it? "*Comment from Jason: You will need to make sure everything is backwards compatible. See the wiki for our policy.*"

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-22 Thread Jason Moore
The example you show doesn't seem to reflect what we may actually see when using this for beams. I'd suggest picking a simple beam problem and showing what all of your code will look like. You did that pretty well for the later examples, but this one with the random polynomials wasn't that clear.

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-22 Thread SAMPAD SAHA
Thank You Jason. I will put it. I have a doubt about this comment in my proposal : *"Comment from Jason: It would be more informative to show what a beam equation would look like in Piecewise form. This is a little abstract." * Can you explain it a little more? I have also added some comment

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-22 Thread Jason Moore
Sounds good, just put it in your proposal. Jason moorepants.info +01 530-601-9791 On Tue, Mar 22, 2016 at 7:32 AM, SAMPAD SAHA wrote: > I will start coding along with community bonding. I will spend 3-4 hours > extra in the last week of the community bonding period in

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-22 Thread SAMPAD SAHA
I will start coding along with community bonding. I will spend 3-4 hours extra in the last week of the community bonding period in order to achieve the proposed target in my proposal. I will have no problem managing with those extra hours since I will be having Summer break at that time and along

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-21 Thread Jason Moore
No need to cancel your vacation. Just give a plan for how you will make up the days. Jason moorepants.info +01 530-601-9791 On Mon, Mar 21, 2016 at 2:52 PM, SAMPAD SAHA wrote: > Thank You Jason for the suggestions in my proposal. I will work on those > and let you know

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-21 Thread SAMPAD SAHA
Thank You Jason for the suggestions in my proposal. I will work on those and let you know as soon as possible. I have mentioned in my proposal about the days of the vacation and how can I compensate the work. If this vacation raises any problem, I can cancel it . That will not be a problem for

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-21 Thread Jason Moore
I've put some comments in your proposal. Jason moorepants.info +01 530-601-9791 On Sat, Mar 19, 2016 at 10:58 AM, SAMPAD SAHA wrote: > Jason, > > Actually I have misunderstood earlier. > > I have updated my proposal here >

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-21 Thread Jason Moore
Looks like a typo. You can use the grep command to search the code base for this word. Jason moorepants.info +01 530-601-9791 On Sun, Mar 20, 2016 at 2:35 PM, SAMPAD SAHA wrote: > Is there any thing called *DirectDelta ?* > > Or here >

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-21 Thread Jason Moore
Sampad, Please explain in you proposal what days you want to miss and how you will make up for them. Something usually can be worked out, but no promises. Jason moorepants.info +01 530-601-9791 On Sun, Mar 20, 2016 at 1:59 PM, SAMPAD SAHA wrote: > Hi, > > I might not

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-20 Thread SAMPAD SAHA
Hi, I might not be able to code for the full time form 25 May - 29 May (max 4 days) as I have to go for a family vacation . I will be compensating the work during the commmunity bonding period as well as in the other weeks, since I will be free for the whole summer break and I will not have any

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-19 Thread SAMPAD SAHA
Thank You Jason for the appreciation. Yah, that *Simplify * method would convert into continous piecewise. Like this :- In[ ] : F = singularityFunc(x, 0, 1) + singularityFunc(x, 3, 2) In[ ] : F Out [ ] : 2 + In [ ] : F.simplify() Out [ ] : 0

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-19 Thread Jason Moore
I think you need to override the operators. I'm not sure if multiplying singularity functions is needed (at least for beam problems), even if it is mathematically correct, you don't have to implement it. If it is easy to implement then, sure, do so. Jason moorepants.info +01 530-601-9791 On

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-19 Thread SAMPAD SAHA
Jason, Actually I have misunderstood earlier. I have updated my proposal here . Can you please review it and suggest me to improve it. Regards Sampad Kumar Saha Mathematics and Computing

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-19 Thread Jason Moore
I don't think we should do "a hack". If we follow the patterns in the integration code, we should leave the constants of integration off. But in the Beam classes you can have them manage the constants of integration. What you show above looks fine. I didn't mean to use dsolve in any way. I just

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-19 Thread SAMPAD SAHA
Jason, I went through the ode package. I felt that it would be difficult to use boundary condition to solve for the constants of integration using the exisiting *dsolve() *method. It seems that it is still under development. So I thought of implementing that functionality explicitly for solving

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-19 Thread SAMPAD SAHA
Yah, you are right multiplication of singularity functions are not needed for solving beam problems. Mathematically, it is also not used that much. So lets leave this multiplication and powers part. I was thinking about the *integrate *and *diff* methods. I feel that we should define instance

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-19 Thread SAMPAD SAHA
Jason, For implementing Additon , Multiplication Do we need to over ride *__mul__ *, *__add__* these methods inside the class *SingularityFunction *or we can just use *simplify *for getting the results. I am really confused. Regards Sampad Kumar Saha Mathematics and Computing I.I.T.

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-19 Thread Jason Moore
Simplification means something very specific in SymPy, see the simplify() function. I think you need to choose a different method name for converting to piecewise continuous. Maybe: .to_piecewise()? You will need to implement some method for dealing with the constants of integration and boundary

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-19 Thread SAMPAD SAHA
Jason, I have thought of implementing Addition, Substraction, Integration, Differentiation, Simplify on Singularity Functions. What are the other functionalities we should implement? Regards Sampad Kumar Saha Mathematics and Computing I.I.T. Kharagpur On Fri, Mar 18, 2016 at 8:16 PM, SAMPAD

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-19 Thread SAMPAD SAHA
I am also confused about implementing the boundary conditions for getting the deflection curve. Any suggestions on how to implement it. Regards Sampad Kumar Saha Mathematics and Computing I.I.T. Kharagpur On Fri, Mar 18, 2016 at 5:36 PM, SAMPAD SAHA wrote: > Yah, you

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-18 Thread SAMPAD SAHA
Yah, you are right . We should not have the name simplify() as a method since it have already created some issues in #7716 and #8798 . So i will keep it as *to_piecewise()* . it would be fine then. As you

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-18 Thread Jason Moore
Sounds like a good start. How about a method to convert to continuous piecewise? Like I said earlier, you should pick some examples that you want the software to be able to solve and then implement methods and functionality based on those examples. It's hard to think of all the needed

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-18 Thread SAMPAD SAHA
I was thinking about multiplication of two singularity functions. It is possible and it is mathematically significant. We can implement this too in Sympy. Similarly with powers. I need your suggestions. Regards Sampad Kumar Saha Mathematics and Computing I.I.T. Kharagpur On Wed, Mar 16, 2016

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-18 Thread SAMPAD SAHA
Thanks TIm, Integration and Differentiation are really very straight forward that is why i am thinking to add diff and integrate method to the Singularity function class itself. For integrate the pseuesocode will be :- if(n<0) return SingularityFunction(x , a, n+1) else return (1/n+1 *

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-15 Thread Jason Moore
Looks good. I think you should have plenty of examples in the docs. People tend to use software more if the docs are top notch. So plenty of examples and tutorials will really help. Jason moorepants.info +01 530-601-9791 On Tue, Mar 15, 2016 at 5:25 PM, SAMPAD SAHA

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-15 Thread SAMPAD SAHA
You are right. *delta_function.py *needs to be improved. I will to be using only* DiracDelta* and *Heaviside *for generating almost all the Singularity Functions. I was also thinking to complete this project in four phases: 1. Improving existiing Functions. 2. Creating Singularity

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-15 Thread Jason Moore
https://www.python.org/dev/peps/pep-0008/ I think you will need a pure singularity function module and then you will need a beam module that utlizes the singularity function module. You will also likely need to improve the discontinuous functions that are already in sympy. There are at least

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-15 Thread SAMPAD SAHA
Jason Pardon please. I couldn't get you by "You will need to follow PEP8 for the method and class names". and yah, i also felt that it would be better if i use the input and output values of the example problem done by hand. So , what do you suggest, Would it be better if we create a different

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-15 Thread Jason Moore
I think it is a good start. You will need to follow PEP8 for the method and class names. But I just want to see desired functionality. The more you can think up, the better. I would suggest doing a beam problem by hand and then translating that to a desired API. You can mock up what you think the

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-15 Thread SAMPAD SAHA
Ok Jason, And what about the API I have posted just before the earlier post? Any suggestions Regards Sampad Kumar Saha Mathematics and Computing I.I.T. Kharagpur On Wed, Mar 16, 2016 at 5:10 AM, Jason Moore wrote: > The file locations and method class names are just

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-15 Thread Jason Moore
The file locations and method class names are just fine details that can be worked out later. They are generally not important for your proposal. Just focus on describing what the future modules should do. Jason moorepants.info +01 530-601-9791 On Tue, Mar 15, 2016 at 4:36 PM, SAMPAD SAHA

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-15 Thread SAMPAD SAHA
Hi Jason, As I am thinking to create a another module for solving especially beam problems (suppose *beambending.py) *, what will be its file location? Similarly for Singularity Functions (suppose singularity_function.py), What will be its location? And what about the names of methods and

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-15 Thread SAMPAD SAHA
Thank You Tim and Jason for your suggestions and clearing my doubts. We can also have an another module for solving beam problems. As Jason Have suggested earlier. Some of its classes would be Beam, DistributedLoad, PointLoad, Moment. We can have the API as:- from sympy import

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-15 Thread Tim Lahey
I agree. One should start directly from the loading function q(x). The general steps are: 1. Start with the loading function q(x) 2. Integrate to get the shear function V(x). 3. Integrate again to get the bending moment function M(x). 4. Integrate to get the slope function E*I*v’(x). 5.

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-15 Thread Jason Moore
Mar 14, 2016 at 12:46 PM, SAMPAD SAHA <sampadsa...@gmail.com> > wrote: > >> >> >> ------ Forwarded message -- >> From: *SAMPAD SAHA* <sampadsa...@gmail.com> >> Date: Monday, March 14, 2016 >> Subject: [sympy] GSoC 2016: Singularity

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-15 Thread Jason Moore
I think you'd want the user to input the loads on the beam as singularity functions or some higher level abstraction. If you require them to manually compute the bending moment then you are defeating the purpose of having a CAS do it for you. Jason moorepants.info +01 530-601-9791 On Sun, Mar

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-15 Thread SAMPAD SAHA
mail.com> wrote: > > > -- Forwarded message -- > From: *SAMPAD SAHA* <sampadsa...@gmail.com> > Date: Monday, March 14, 2016 > Subject: [sympy] GSoC 2016: Singularity Functions > To: sympy@googlegroups.com > > > Hi Jason, > > I have a confusion

Fwd: [sympy] GSoC 2016: Singularity Functions

2016-03-14 Thread SAMPAD SAHA
-- Forwarded message -- From: *SAMPAD SAHA* <sampadsa...@gmail.com> Date: Monday, March 14, 2016 Subject: [sympy] GSoC 2016: Singularity Functions To: sympy@googlegroups.com Hi Jason, I have a confusion regarding the user inputs for the beam problems. I think that we

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-13 Thread SAMPAD SAHA
Hi Jason, I have a confusion regarding the user inputs for the beam problems. I think that we should take only the Bending Moment Function (in the form of singularity functions) and the boundary conditions as inputs. I mean to say that generally in a given beam bending problem, a diagram of a

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-11 Thread Aaron Meurer
It should give (-1)**n*f^(n)(0) (that is, (-1)**n*diff(f(x), x, n).subs(x, 0)), if I remember the formula correctly. Aaron Meurer On Fri, Mar 11, 2016 at 9:00 AM, SAMPAD SAHA wrote: > Hi Aaron, > > I have a doubt . > > Do we want: > > > integrate(f(x)*DiracDelta(x, n),

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-08 Thread Aaron Meurer
DiracDelta(x, k) gives the k-th derivative of DiracDelta(x) (or you can write DiracDelta(x).diff(x, k)). It does look like the delta integrate routines could be improved here, though: In [2]: integrate(f(x)*DiracDelta(x), (x, -oo, oo)) Out[2]: f(0) In [3]: integrate(f(x)*DiracDelta(x, 1), (x,

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-08 Thread SAMPAD SAHA
Thank You Tim and Jason for your suggestions. Yah, I also think that depicting an example of how to use this module to solve a particular beam problem would be a good idea. I would also think about the methods and attributes that I will be creating for this modules. I will let you know after I

Re: [sympy] GSoC 2016: Singularity Functions

2016-03-08 Thread Tim Lahey
For an example, you might want to try a triangular load that ramps up to the middle and then ramps down to the end. That will give you a point loads at the ends of the beam (reaction forces), two ramps and a constant load along with offsets. Cheers, Tim. > On Mar 8, 2016, at 2:17 PM, Jason

Re: [sympy] GSoC 2016: Singularity Functions

2016-02-29 Thread Tim Lahey
Hi, Singularity functions are just Dirac deltas, Heaviside functions, and polynomials multiplying a Heaviside function with an offset. I seriously wrote something to do it in less than an hour. The Maple code to do it is, sFunc := proc(n,a) if (n = -1) then return

Re: [sympy] GSoC 2016: Singularity Functions

2016-02-29 Thread Jason Moore
Tim, I wouldn't say that they are "extremely easy" to implement. If we want a nice thorough package that does this, there will be plenty of work for the summer for a undergraduate GSoC student. If you'd like to share with us your implementation in a form that doesn't require owning Maple to

Re: [sympy] GSoC 2016: Singularity Functions

2016-02-29 Thread Tim Lahey
Hi, Singularity functions are actually extremely easy to implement given that we have a Dirac delta and Heaviside functions. Assuming that the Dirac delta and Heaviside functions properly handle calculus, it’s trivial to wrap them for use as singularity functions. The only thing that will need

[sympy] GSoC 2016: Singularity Functions

2016-02-26 Thread SAMPAD SAHA
Hi, I am Sampad Kumar Saha , an Undergraduate Mathematics and Computing Student at I.I.T. Kharagpur. I have gone through the idea page and I am interested in working on the project named Singularity Function