Changes between Version 21 and Version 22 of ModulesOnAstroBear
- Timestamp:
- 07/13/11 15:40:01 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ModulesOnAstroBear
v21 v22 85 85 }}} 86 86 87 Note that {{{i, j, k, x, y, z, xlower, ylower, zlower, and dx}}} are user defined variables and are explained in further detail below. The variable {{{half}}} is used since the data is in the center of the cell, and {{{xPrec}}} is a type of precision.{{{half}}} and {{{xPrec}}} are already defined elsewhere and can be used if the following statement is at the beginning of {{{problem.f90}}}:87 Note that {{{i, j, k, x, y, z, xlower, ylower, zlower,}}} and {{{dx}}} are user defined variables and are explained in further detail below. The variable {{{half}}} is used since the data is in the center of the cell, and {{{xPrec}}} is a type of precision. {{{half}}} and {{{xPrec}}} are already defined elsewhere and can be used if the following statement is at the beginning of {{{problem.f90}}}: 88 88 {{{ 89 89 USE GlobalDeclarations … … 218 218 219 219 [[BR]] 220 221 ==== Summary ==== 222 223 Writing a problem module can be extremely complicated, but for first time users writing relatively simple modules, here are a few helpful tips: 224 * Understand what the five main subroutines are for, especially {{{ProblemModuleInit}}} and {{{ProblemGridInit}}} 225 * Know which variables come with {{{DataDeclarations}}}, {{{GlobalDeclarations}}}, and {{{PhysicsDeclarations}}} and which variables have to be defined by the user 226 * Understand the form of the {{{q}}} array 227 * Make sure data is scaled so that only computational units are stored in the data arrays 228 * It is often helpful to write a module that can run in 2D or 3D so pay close attention to how {{{nDim}}} affects variables 220 229 221 230 === Additional Physics ===