Version 12 (modified by 14 years ago) ( diff ) | ,
---|
Scrambler Objects
Scrambler uses an object type interface to simplify problem setups. Objects can be classified as one of three types:
- Initial Condition / Instantaneous sources: These objects create geometric features
- Boundary Condition
- Sources
- Point Gravity Sources
- Jet/Outflow sources
- Sink Particles
Additionally, sources that in general would apply everywhere, but might want to be applied in a region are also embedded in objects…
Many of these objects use geometric Sub-Objects that handle object shape and orientation
- Shapes - Contains routines for orienting various physical objects
- [InterfaceObjects Interfaces - Useful for dividing a region into two pieces based on a perturbed interface
Using Objects
Using these objects within a problem module is as simple as calling the createobject subroutine during the ProblemInitializeModule routine - and then modifying the objects properties. For instance MyClump%radius, MyClump%density, or MyWind%dir, MyWind%edge, MyPointGravity%mass, etc… All of the difficult coding and loops that deal with properly updating the grids is already taken care of. Of course you might find that an object does not have all of the features you need. In that case you can manually modify grids as in AstroBear in the routines ProblemGridInit, ProblemBeforeStep, ProblemAfterStep, and ProblemSetErrFlags. You could also add the needed feature to an existing object - or consider creating a new object. Adding features to existing objects is fairly straightforward - and will not break other people's problem modules as long as the new default values effectively turn the new feature off.