[FLASH-USERS] Setup script precedence

John ZuHone jzuhone at milkyway.gsfc.nasa.gov
Wed Mar 21 20:21:08 EDT 2012


Sorry, I think what I meant to say was that you should make a subunit of physics/Gravity/GravityMain/Poisson/Multigrid and put the files there, and include this unit in your Config, to be more specific.

Sent from John ZuHone's iPad

On Mar 21, 2012, at 8:17 PM, John ZuHone <jzuhone at milkyway.gsfc.nasa.gov> wrote:

> Hi Nathan,
> 
> I don't know the answer to your specific question, but I can say that having units have access to data structures and methods of other units is generally frowned upon in FLASH.
> 
> It depends on what you've done exactly, but providing accessor functions for your particles sink unit that Gravity routines can call directly would be better. Then I would recommend creating a "poisson with sink particles" gravity subunit that you would use along with the Multigrid subunit. This would be a less error-prone way of achieving the same result as putting the routines in the simulation unit and conceptually cleaner.
> 
> How exactly are you modifying the two routines?
> 
> Best,
> 
> John
> 
> Sent from John ZuHone's iPad
> 
> On Mar 21, 2012, at 8:06 PM, Nathan Goldbaum <goldbaum at ucolick.org> wrote:
> 
>> Hi all,
>> 
>> I'm working on a sink particles unit for FLASH4-beta.  This unit overrides two of the files in the Poisson gravity unit - Gravity_accelOneRow and Gravity_potentialListOfBlocks.  Unfortunately, the setup script does not seem to notice the two Gravity unit files in the sink particles unit.  This means that the links in the object directory point to the files in the Gravity unit rather than the sink particle unit.  I can put the two modified Gravity files in the Simulation unit rather than the SinkParticles unit, but this a messy, error-prone solution.
>> 
>> I've tried manually editing the Units file to REQUEST flashUtilities/sinkparticles both before and after physics/Gravity/GravityMain/Poisson/Multigrid, but in both cases the setup script produces symbolic links that point to the Gravity unit rather than the sinkparticles unit.  Is there some way I can manually reorder the units in the Units file such that the files in the sinkparticles unit take precedence?  In general, is there any way to directly control the unit precedence in the setup script?
>> 
>> Thanks for your help with this,
>> 
>> Nathan Goldbaum
>> Graduate Student
>> Astronomy & Astrophysics, UCSC
>> goldbaum at ucolick.org
>> http://www.ucolick.org/~goldbaum
>> 



More information about the flash-users mailing list