MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Redundant numerical input

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67902] Re: [mg67881] Re: Redundant numerical input
  • From: gregorc <gregor.cernivec at fe.uni-lj.si>
  • Date: Wed, 12 Jul 2006 05:05:57 -0400 (EDT)
  • References: <e8nsji$k46$1@smc.vnet.net> <200607110959.FAA28992@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Ray, your suggestion is similar to one James Gilmore sent. Some 
further explanation may give better insight to what I am trying to do.

Yes this is true, but I want to go with this idea further. The 
discretization values change in space, but only few of them (iteration 
variables) change during the iteration loop. The numerical function is 
Threaded over the spatial discretization points where groups of these 
points have same but different material parameters than other groups. I 
am not sure how to initilize the values in the numerical function unles 
I compile the whole vector with all discretization points. But I do not 
want to do that. My compiled function takes as the argument the material 
data and calculation variables of the central and two adjacent 
discretization points. To get the numerical vector it is Threaded over 
the discretization area.

Your suggestion would work if I compiled coresponding numerical 
functions for the groups of points with same material data and then 
switch between the functions during Thread operation.

best regards, gregor

Ray Koopman wrote:

>gregorc wrote:
>  
>
>>I am using manually defined (compiled) function which takes for input
>>over 50 arguments of length 3. Most of these are just material
>>parameters which are constant during numerical simulation and only 3 of
>>them are calculation variables. When the function is threaded over many
>>discretization points, the calculation becomes rather time consuming. I
>>was wondering if it is somehow posible to "tell" the numerical function
>>not to parse the redundant parameters every time, since they are already
>>in the memory, i.e. use the same form of numerical function, but only 3
>>calculation varibles are evaluated each time used. I think this would
>>greatly speed up my calculations!?
>>    
>>
>
>Do you mean you have something like
>func = Compile[{p1, ..., p53}, whatever]
>where the values assigned to p1,...,p50 are usually constant?
>If so then why not make a function-generator
>genfunk[p1_, ..., p50_] := Compile[{p51, p52, p53}, whatever]]
>which you call to create a function with the values of p1,...,p50
>fixed at x1,...x50:  funk = genfunk[x1,...,x50].
>Then  funk[x51,x52,x53]  will waste no time.
>
>
>__________ NOD32 1.1653 (20060711) Information __________
>
>This message was checked by NOD32 antivirus system.
>http://www.eset.com
>
>
>
>  
>


  • Prev by Date: Re: Q Legendre orthogonal polynomials mistake
  • Next by Date: Re: Queueing Theory - Series and Recursive Functions
  • Previous by thread: Re: Redundant numerical input
  • Next by thread: Re: Redundant numerical input