Class TModflowGrid

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TModflowGrid = class(TCustomModelGrid)

Description

included to allow inlining or "Point" function. TBitmap32 and TFloatRect are declared in GR32.

Hierarchy

Overview

Fields

Private FLayerElevations: TThreeDRealArray;
Private CellPoints: T3DRealPointArray3;
Private FCellElevationsNeedUpdating: boolean;
Private FCellPointsNeedUpdating: boolean;

Methods

Private procedure SetLayerElevations(const Value: TThreeDRealArray);
Private procedure UpdateCellPoints;
Private procedure IdentifyDividedUnitBoundaries( out LayerBoundaries: TOneDIntegerArray; out DividedUnits: Boolean);
Private procedure SetLayerLineWidth(var LineWidth: single; LayerIndex: Integer; var UnitIndex: Integer; DividedUnits: Boolean; LayerBoundaries: TOneDIntegerArray);
Private function GetLayerElevations: TThreeDRealArray;
Private procedure Write1DArray(const Comment: string; const AnArray: TOneDRealArray; const DiscretizationWriter: TObject; const Reverse: boolean);
Private procedure WriteALayerArray(const DiscretizationWriter: TObject; const LayerIndex: integer; const Comment: string);
Private function IsLayerUniform(const LayerIndex: integer): boolean;
Private procedure CheckSizeRatios(const AnArray: TOneDRealArray; const WarningRoot: string);
Private procedure GetMinAndMax(const AnArray: TOneDRealArray; out MinValue, MaxValue: double; out MinIndex, MaxIndex: integer);
Private procedure DrawOrdinaryFrontColumns(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2; FrontPoints: T2DRealPointArray);
Private procedure DrawOrdinaryFrontLayers(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2; FrontPoints: T2DRealPointArray);
Private procedure DrawOrdinarySideRows(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2; SidePoints: T2DRealPointArray);
Private procedure DrawOrdinarySideLayers(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2; SidePoints: T2DRealPointArray);
Protected procedure RecordColoredGrid; override;
Protected procedure RecordFront; override;
Protected procedure RecordShell; override;
Protected procedure RecordSide; override;
Protected procedure RecordTop; override;
Protected procedure DrawFront(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2); override;
Protected procedure DrawSide(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2); override;
Protected procedure DrawTop(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2); override;
Protected procedure GetCellCornerElevations(const EvalAt: TEvaluatedAt; out Elevations: TThreeDRealArray); override;
Protected function GetCellElevation(const Column, Row, Layer: integer): real; override;
Protected function GetCellThickness(const Column, Row, Layer: integer): real; override;
Protected procedure SetCellElevation(const Column, Row, Layer: integer; const Value: real); override;
Protected procedure SetCellThickness(const Column, Row, Layer: integer; const Value: real); override;
Protected function GetTwoDCellElevations(const Col, Row: integer): TOneDRealArray; override;
Protected procedure SetFrontContourDataSet(const Value: TDataArray); override;
Protected procedure SetSideContourDataSet(const Value: TDataArray); override;
Protected procedure SetThreeDContourDataSet(const Value: TDataArray); override;
Protected procedure SetTopContourDataSet(const Value: TDataArray); override;
Protected procedure SetSideDataSet(const Value: TDataArray); override;
Protected procedure SetThreeDDataSet(const Value: TDataArray); override;
Protected procedure SetTopDataSet(const Value: TDataArray); override;
Protected procedure SetFrontDataSet(const Value: TDataArray); override;
Public procedure UpdateCellElevations;
Public procedure NotifyGridChanged(Sender: TObject);
Public procedure Assign(Source: TPersistent); override;
Public constructor Create(Model: TBaseModel);
Public function ThreeDElementCorner(const Column, Row, Layer: integer): T3DRealPoint; override;
Public function FrontCellPoints(Row: integer): T2DRealPointArray;
Public function SideCellPoints(Col: integer): T2DRealPointArray;
Public function HighestElevation: real; override;
Public function LowestElevation: real; override;
Public function GetContainingLayer(ACol, ARow: integer; const AZPosition: real): integer; override;
Public function NearestLayerPosition(ACol, ARow: integer; const AZPosition: real; const First: integer = -1; const Last: integer = -1): integer;
Public procedure WriteDELR(const DiscretizationWriter: TObject);
Public procedure WriteDELC(const DiscretizationWriter: TObject);
Public procedure WriteTOP(const DiscretizationWriter: TObject);
Public procedure WriteBOTM(const DiscretizationWriter: TObject; const Model: TBaseModel);
Public procedure CheckColumnWidths;
Public procedure CheckRowHeights;
Public procedure CheckRowToColumnRatios;
Public Procedure CheckElevations;

Properties

Public property LayerElevations: TThreeDRealArray read GetLayerElevations write SetLayerElevations;

Description

Fields

Private FLayerElevations: TThreeDRealArray;
 
Private CellPoints: T3DRealPointArray3;

CellPoints contains the locations of the cell corners, cell centers on the top and bottom surfaces, and the centers of the edges of the top and bottom surfaces. It does not contain the location of the center of the cell. It is used for drawing the cell in front, side and 3D Views. The points are in the grid coordinate system not the model coordinate system.

Dimensions: 2*ColCount+1, 2*RowCount+1, LayerCount+1.

Private FCellElevationsNeedUpdating: boolean;
 
Private FCellPointsNeedUpdating: boolean;
 

Methods

Private procedure SetLayerElevations(const Value: TThreeDRealArray);
 
Private procedure UpdateCellPoints;

UpdateCellPoints calculates CellPoints.

Private procedure IdentifyDividedUnitBoundaries( out LayerBoundaries: TOneDIntegerArray; out DividedUnits: Boolean);
 
Private procedure SetLayerLineWidth(var LineWidth: single; LayerIndex: Integer; var UnitIndex: Integer; DividedUnits: Boolean; LayerBoundaries: TOneDIntegerArray);
 
Private function GetLayerElevations: TThreeDRealArray;
 
Private procedure Write1DArray(const Comment: string; const AnArray: TOneDRealArray; const DiscretizationWriter: TObject; const Reverse: boolean);
 
Private procedure WriteALayerArray(const DiscretizationWriter: TObject; const LayerIndex: integer; const Comment: string);
 
Private function IsLayerUniform(const LayerIndex: integer): boolean;
 
Private procedure CheckSizeRatios(const AnArray: TOneDRealArray; const WarningRoot: string);
 
Private procedure GetMinAndMax(const AnArray: TOneDRealArray; out MinValue, MaxValue: double; out MinIndex, MaxIndex: integer);
 
Private procedure DrawOrdinaryFrontColumns(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2; FrontPoints: T2DRealPointArray);
 
Private procedure DrawOrdinaryFrontLayers(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2; FrontPoints: T2DRealPointArray);
 
Private procedure DrawOrdinarySideRows(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2; SidePoints: T2DRealPointArray);
 
Private procedure DrawOrdinarySideLayers(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2; SidePoints: T2DRealPointArray);
 
Protected procedure RecordColoredGrid; override;

RecordColoredGrid creates an OpenGL display list using FCellsGLIndex to show colored grid cells or elements.

Protected procedure RecordFront; override;

RecordFront creates an OpenGL display list using FrontGridGLIndex to show the grid on the front view of the model.

Protected procedure RecordShell; override;

RecordShell creates an OpenGL display list using GridShellGLIndex to show the grid shell.

Protected procedure RecordSide; override;

RecordSide creates an OpenGL display list using SideGridGLIndex to show the grid on the side view of the model.

Protected procedure RecordTop; override;

RecordTop creates an OpenGL display list using TopGridGLIndex to show the grid on the top view of the model.

Protected procedure DrawFront(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2); override;

DrawFront draws a front view of the grid on TBitmap32.

Protected procedure DrawSide(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2); override;

DrawSide draws a side view of the grid on TBitmap32.

Protected procedure DrawTop(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2); override;
 
Protected procedure GetCellCornerElevations(const EvalAt: TEvaluatedAt; out Elevations: TThreeDRealArray); override;

GetCellCornerElevations sets Elevations to a 3D array of real numbers. Each number in the array is the elevation of one corner of a cell or element.

This procedure would probably have to be modified or replaced for grids such as that in MODFLOW in which elevations can vary within a layer.

Protected function GetCellElevation(const Column, Row, Layer: integer): real; override;

See CellElevation.

Protected function GetCellThickness(const Column, Row, Layer: integer): real; override;

See CellThickness.

Protected procedure SetCellElevation(const Column, Row, Layer: integer; const Value: real); override;

See CellElevation.

Protected procedure SetCellThickness(const Column, Row, Layer: integer; const Value: real); override;

See CellThickness.

Protected function GetTwoDCellElevations(const Col, Row: integer): TOneDRealArray; override;
 
Protected procedure SetFrontContourDataSet(const Value: TDataArray); override;
 
Protected procedure SetSideContourDataSet(const Value: TDataArray); override;
 
Protected procedure SetThreeDContourDataSet(const Value: TDataArray); override;
 
Protected procedure SetTopContourDataSet(const Value: TDataArray); override;
 
Protected procedure SetSideDataSet(const Value: TDataArray); override;

See SideDataSet.

Protected procedure SetThreeDDataSet(const Value: TDataArray); override;

See ThreeDDataSet.

Protected procedure SetTopDataSet(const Value: TDataArray); override;

See TopDataSet.

Protected procedure SetFrontDataSet(const Value: TDataArray); override;

See FrontDataSet.

Public procedure UpdateCellElevations;
 
Public procedure NotifyGridChanged(Sender: TObject);
 
Public procedure Assign(Source: TPersistent); override;

Copies the properties of Source into self. Only those properties that normally would be saved to file are copied.

Public constructor Create(Model: TBaseModel);
 
Public function ThreeDElementCorner(const Column, Row, Layer: integer): T3DRealPoint; override;
 
Public function FrontCellPoints(Row: integer): T2DRealPointArray;

FrontCellPoints has the cell outlines for the MODFLOW cells as viewed from the front. The dimensions of the result will be ColumnCount*2+1, LayerCount+1 The outline for a cell will be the points at

  1. [Column*2, Layer]

  2. [Column*2+1, Layer]

  3. [Column*2+2, Layer]

  4. [Column*2, Layer+1]

  5. [Column*2+1, Layer+1]

  6. [Column*2+2, Layer+1]

Public function SideCellPoints(Col: integer): T2DRealPointArray;

SideCellPoints has the cell outlines for the MODFLOW cells as viewed from the side. The dimensions of the result will be RowCount*2+1, LayerCount+1 The outline for a cell will be the points at

  1. [Row*2, Layer]

  2. [Row*2+1, Layer]

  3. [Row*2+2, Layer]

  4. [Row*2, Layer+1]

  5. [Row*2+1, Layer+1]

  6. [Row*2+2, Layer+1]

Public function HighestElevation: real; override;
 
Public function LowestElevation: real; override;
 
Public function GetContainingLayer(ACol, ARow: integer; const AZPosition: real): integer; override;
 
Public function NearestLayerPosition(ACol, ARow: integer; const AZPosition: real; const First: integer = -1; const Last: integer = -1): integer;
 
Public procedure WriteDELR(const DiscretizationWriter: TObject);
 
Public procedure WriteDELC(const DiscretizationWriter: TObject);
 
Public procedure WriteTOP(const DiscretizationWriter: TObject);
 
Public procedure WriteBOTM(const DiscretizationWriter: TObject; const Model: TBaseModel);
 
Public procedure CheckColumnWidths;
 
Public procedure CheckRowHeights;
 
Public procedure CheckRowToColumnRatios;
 
Public Procedure CheckElevations;
 

Properties

Public property LayerElevations: TThreeDRealArray read GetLayerElevations write SetLayerElevations;

LayerElevations is the elevations of the top and bottom of the model layers LayerElevations is accessed as LayerElevations[Col, Row, Layer].


Generated by PasDoc 0.12.1 on 2013-05-13 15:41:46