Class TPhastScreenObject

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TPhastScreenObject = class(TScreenObject)

Description

TPhastScreenObject is a TScreenObject that is specialized for use with PHAST. It has properties that define boundary conditions in PHAST and it has methods to deal with PHAST-style interpolation. (See TPhastInterpolationValues.)

Hierarchy

Overview

Fields

Private FDataSetMixtureSubscriptions: TObjectList;
Private FFluxBoundary: TFluxBoundary;
Private FInterpValues: TInterpValuesCollection;
Private FLeakyBoundary: TLeakyBoundary;
Private FMixtureCompiler: TRbwParser;
Private FMixtureExpression: TExpression;
Private FMixtureVariables: TStringList;
Private FRiverBoundary: TRiverBoundary;
Private FSpecifiedHeadBoundary: TSpecifiedHeadBoundary;
Private FSpecifiedSolutionBoundary: TSpecifiedSolutionBoundary;
Private FWellBoundary: TWellBoundary;

Methods

Private procedure AssignIntegerDataWithPhastInterpolation(const DataSet: TDataArray; const LayerIndex, RowIndex, ColIndex: integer; const Comment: string; const InterpValue: TInterpValuesItem);
Private procedure AssignRealDataWithPhastInterpolation(const DataSet: TDataArray; const LayerIndex, RowIndex, ColIndex: integer; const Comment: string; const InterpValue: TInterpValuesItem);
Private function GetMixtureDataSetFormula(const Index: integer): string;
Private procedure InitializeMixtureExpression(out Compiler: TRbwParser; out MixtureFormula: string; out Expression: TExpression; const DataSet: TDataArray; const OtherData: TObject);
Private procedure ResetBoundaryMixtureSubscriptions;
Private procedure SetFluxBoundary(const Value: TFluxBoundary);
Private procedure SetInterpValues(const Value: TInterpValuesCollection);
Private procedure SetLeakyBoundary(const Value: TLeakyBoundary);
Private procedure SetMixtureDataSetFormula(const Index: integer; const Value: string);
Private procedure SetRiverBoundary(const Value: TRiverBoundary);
Private procedure SetSpecifiedHeadBoundary( const Value: TSpecifiedHeadBoundary);
Private procedure SetSpecifiedSolutionBoundary( const Value: TSpecifiedSolutionBoundary);
Private procedure SetWellBoundary(const Value: TWellBoundary);
Private function StoreFlux: boolean;
Private function StoreLeaky: boolean;
Private function StoreRiver: boolean;
Private function StoreSpecifiedHead: boolean;
Private function StoreWell: boolean;
Private function ThreeDBoundaryFormula: string;
Private function TwoDBoundaryFormula: string;
Protected procedure AssignCellValue(const UsedVariables: TStringList; const DataSet: TDataArray; const LayerIndex, RowIndex, ColIndex: integer; const Compiler: TRbwParser; const Annotation: string; const Expression: TExpression; const OtherData: TObject); override;
Protected function BoundaryType: integer; override;
Protected function DataSetUsed(const DataSet: TDataArray; var OtherData: TObject): boolean; override;
Protected function EncloseAnnotation(const DataSetFormula: string; const OtherData: TObject): string; override;
Protected procedure InitializeExpression(out Compiler: TRbwParser; out DataSetFormula: string; out Expression: TExpression; const DataSet: TDataArray; const OtherData: TObject); override;
Protected function IntersectAnnotation(const DataSetFormula: string; const OtherData: TObject): string; override;
Protected function IsBoundaryTimeDataSetUsed(const DataSet: TDataArray; out OtherData: TObject): boolean; override;
Protected procedure OtherIndex(const LayerOrRow, RowOrColumn: integer; out First, Last: integer; const DataSet: TDataArray); override;
Protected function PhastBoundaryType: TBoundaryTypes;
Protected procedure ResetMixtureSubscriptions;
Protected procedure SetUpToDate(const Value: boolean); override;
Protected procedure SetViewDirection(const Value: TViewDirection); override;
Protected procedure UpdateMixtureExpression;
Public function AddDataSet(const DataSet: TDataArray): Integer; override;
Public procedure Assign(Source: TPersistent); override;
Public procedure AssignValuesToDataSet(const Grid: TPhastGrid; const DataSet: TDataArray); override;
Public procedure ClearDataSets; override;
Public procedure DeleteDataSet(const Index: Integer); override;
Public constructor Create(AnOwner: TComponent); override;
Public destructor Destroy; override;
Public procedure InsertDataSet(const Index: Integer; const DataSet: TDataArray); override;
Public function GetBoundaryCollection(const TimeList: TTimeList): TCustomPhastBoundaryCollection;
Public procedure Invalidate; override;
Public procedure ResetSubscriptions; override;
Public function BoundaryTypeUsed: TBoundaryTypes;

Properties

Protected property MixtureDataSetFormula[const Index: integer]: string read GetMixtureDataSetFormula write SetMixtureDataSetFormula;
Published property FluxBoundary: TFluxBoundary read FFluxBoundary write SetFluxBoundary stored StoreFlux;
Published property LeakyBoundary: TLeakyBoundary read FLeakyBoundary write SetLeakyBoundary stored StoreLeaky;
Published property RiverBoundary: TRiverBoundary read FRiverBoundary write SetRiverBoundary stored StoreRiver;
Published property SpecifiedHeadBoundary: TSpecifiedHeadBoundary read FSpecifiedHeadBoundary write SetSpecifiedHeadBoundary stored StoreSpecifiedHead;
Published property SpecifiedSolutionBoundary: TSpecifiedSolutionBoundary read FSpecifiedSolutionBoundary write SetSpecifiedSolutionBoundary stored False;
Published property WellBoundary: TWellBoundary read FWellBoundary write SetWellBoundary stored StoreWell;
Published property InterpValues: TInterpValuesCollection read FInterpValues write SetInterpValues;

Description

Fields

Private FDataSetMixtureSubscriptions: TObjectList;

FDataSetMixtureSubscriptions: TObjectList;

Private FFluxBoundary: TFluxBoundary;

FFluxBoundary: TFluxBoundary; See FluxBoundary.

Private FInterpValues: TInterpValuesCollection;

FInterpValues: TInterpValuesCollection; See InterpValues.

Private FLeakyBoundary: TLeakyBoundary;

FLeakyBoundary: TLeakyBoundary; See LeakyBoundary.

Private FMixtureCompiler: TRbwParser;

FMixtureCompiler: TRbwParser; FMixtureCompiler is assigned in AssignValuesToDataSet.

Private FMixtureExpression: TExpression;

FMixtureExpression: TExpression; FMixtureExpression is assigned in AssignValuesToDataSet.

Private FMixtureVariables: TStringList;

FMixtureVariables: TStringList; FMixtureVariables is assigned and Freed in AssignValuesToDataSet.

Private FRiverBoundary: TRiverBoundary;

FRiverBoundary: TRiverBoundary; See RiverBoundary.

Private FSpecifiedHeadBoundary: TSpecifiedHeadBoundary;

FSpecifiedHeadBoundary: TSpecifiedHeadBoundary; See SpecifiedHeadBoundary.

Private FSpecifiedSolutionBoundary: TSpecifiedSolutionBoundary;

FSpecifiedSolutionBoundary: TSpecifiedSolutionBoundary; See SpecifiedSolutionBoundary.

Private FWellBoundary: TWellBoundary;

FWellBoundary: TWellBoundary; See WellBoundary.

Methods

Private procedure AssignIntegerDataWithPhastInterpolation(const DataSet: TDataArray; const LayerIndex, RowIndex, ColIndex: integer; const Comment: string; const InterpValue: TInterpValuesItem);

AssignIntegerDataWithPhastInterpolation is used to assign data to a particular cell when PHAST-style interpolation is used and the data is integer data. See TPhastInterpolationValues.

Private procedure AssignRealDataWithPhastInterpolation(const DataSet: TDataArray; const LayerIndex, RowIndex, ColIndex: integer; const Comment: string; const InterpValue: TInterpValuesItem);

AssignRealDataWithPhastInterpolation is used to assign data to a particular cell when PHAST-style interpolation is used and the data is real-number data. See TPhastInterpolationValues.

Private function GetMixtureDataSetFormula(const Index: integer): string;

See MixtureDataSetFormula.

Private procedure InitializeMixtureExpression(out Compiler: TRbwParser; out MixtureFormula: string; out Expression: TExpression; const DataSet: TDataArray; const OtherData: TObject);

The purpose of InitializeMixtureExpression is to (1) determine the formula for a mixture to use with using PHAST-style interpolation, (2) determine the TRbwParser to use with that formula, and (3) compile that formula into a TExpression. See TPhastInterpolationValues.

Parameters
Compiler
is set in InitializeMixtureExpression to the correct TRbwParser to use with the mixture formula.
MixtureFormula
is set in InitializeMixtureExpression to the formula for the mixture.
Expression
is set in InitializeMixtureExpression to the TExpression that results from compiling MixtureFormula.
DataSet
is the TDataArray to which the mixture formula applies.
OtherData
if DataSet is a normal data set, OtherData is a TInterpValuesItem. if DataSet represents a boundary condition, OtherData is a TCustomPhastBoundaryCondition.
Private procedure ResetBoundaryMixtureSubscriptions;

ResetBoundaryMixtureSubscriptions calls TCustomPhastBoundaryCondition.ResetMixtureSubscription for each solution boundary condition.

Private procedure SetFluxBoundary(const Value: TFluxBoundary);

See FluxBoundary.

Private procedure SetInterpValues(const Value: TInterpValuesCollection);

See InterpValues.

Private procedure SetLeakyBoundary(const Value: TLeakyBoundary);

See LeakyBoundary.

Private procedure SetMixtureDataSetFormula(const Index: integer; const Value: string);

See MixtureDataSetFormula.

Private procedure SetRiverBoundary(const Value: TRiverBoundary);

See RiverBoundary.

Private procedure SetSpecifiedHeadBoundary( const Value: TSpecifiedHeadBoundary);

See SpecifiedHeadBoundary.

Private procedure SetSpecifiedSolutionBoundary( const Value: TSpecifiedSolutionBoundary);

See SpecifiedSolutionBoundary.

Private procedure SetWellBoundary(const Value: TWellBoundary);

See WellBoundary.

Private function StoreFlux: boolean;

StoreFlux determines whether FluxBoundary is stored.

Private function StoreLeaky: boolean;

StoreLeaky determines whether LeakyBoundary is stored.

Private function StoreRiver: boolean;

StoreRiver determines whether RiverBoundary is stored.

Private function StoreSpecifiedHead: boolean;

StoreSpecifiedHead determines whether SpecifiedHeadBoundary is stored.

Private function StoreWell: boolean;

StoreWell determines whether WellBoundary is stored.

Private function ThreeDBoundaryFormula: string;

ThreeDBoundaryFormula returns a formula that can be used to identify the type of 3D boundary condition (if any) that is assigned with this TPhastScreenObject.

Private function TwoDBoundaryFormula: string;

TwoDBoundaryFormula returns a formula that can be used to identify the type of 2D boundary condition (if any) that is assigned with this TPhastScreenObject.

Protected procedure AssignCellValue(const UsedVariables: TStringList; const DataSet: TDataArray; const LayerIndex, RowIndex, ColIndex: integer; const Compiler: TRbwParser; const Annotation: string; const Expression: TExpression; const OtherData: TObject); override;

AssignCellValue assigns a value to a particular cell in DataSet.

In AssignCellValue:

(1) If OtherData = nil or not TInterpValuesItem(OtherData).Values.UsePHAST_Interpolation, the inherited AssignCellValue is called.

(2) Otherwise, values are assigned to DataSet at the location LayerIndex, RowIndex, ColIndex using PHAST-style interpolation. (See TPhastInterpolationValues.) Expression and Compiler are not used in this case and the variables listed in UsedVariables are not updated.

OtherData is set in IsBoundaryTimeDataSetUsed.

Protected function BoundaryType: integer; override;

BoundaryType returns an integer that indicates what type of boundary condition, if any, are specified by this TPhastScreenObject.

Protected function DataSetUsed(const DataSet: TDataArray; var OtherData: TObject): boolean; override;

DataSetUsed returns True if DataSet is a TSparseArrayPhastDataSet DataSetUsed also returns True if DataSet is a TCustomPhastDataSet and DataSet is specified by this TPhastScreenObject. OtherData may be changed DataSet is a TCustomPhastDataSet.

Protected function EncloseAnnotation(const DataSetFormula: string; const OtherData: TObject): string; override;

EncloseAnnotation returns a string that indicates that a location was specified by being enclosed in this TPhastScreenObject and how the value at that location was determined.

Protected procedure InitializeExpression(out Compiler: TRbwParser; out DataSetFormula: string; out Expression: TExpression; const DataSet: TDataArray; const OtherData: TObject); override;

InitializeExpression (1) gets the proper DataSetFormula to apply to DataSet, (2) gets the proper TRbwParser for DataSet, and (3) compiles DataSetFormula to get Expression. However, it doesn't need to do any of that is PHAST-style interpolation is used. See TPhastInterpolationValues.

Protected function IntersectAnnotation(const DataSetFormula: string; const OtherData: TObject): string; override;

IntersectAnnotation returns a string that indicates that a location was specified by being intersected by this TPhastScreenObject and how the value at that location was determined.

Protected function IsBoundaryTimeDataSetUsed(const DataSet: TDataArray; out OtherData: TObject): boolean; override;

IsBoundaryTimeDataSetUsed returns True and, if so, sets OtherData to the relevant TCustomPhastBoundaryCondition.

Protected procedure OtherIndex(const LayerOrRow, RowOrColumn: integer; out First, Last: integer; const DataSet: TDataArray); override;

The purpose of OtherIndex is to get First and Last. They are the indices of the first and last layer, row, or column perpendicular to the plain of TViewDirection that are enclosed or intersected by the TPhastScreenObject.

In commented-out code, First and Last and changed to frmGoPhast.PhastGrid.LayerCount for river data sets. It has been commented-out because it messes up the display of the river data on the status bar.

It would be good to find a way around this problem. As it is, all OtherIndex really does is call the inherited OtherIndex.

Protected function PhastBoundaryType: TBoundaryTypes;
 
Protected procedure ResetMixtureSubscriptions;

ResetMixtureSubscriptions sets UpToDate to True for all members of FDataSetMixtureSubscriptions

Protected procedure SetUpToDate(const Value: boolean); override;

SetUpToDate calls inherited. Then if Value is True, SetUpToDate sets all the TObserver.UpToDate to True for all TObservers in FDataSetMixtureSubscriptions.

Protected procedure SetViewDirection(const Value: TViewDirection); override;

SetViewDirection calls inherited SetViewDirection and then sets the Orientation of FluxBoundary and LeakyBoundary.

Protected procedure UpdateMixtureExpression;

UpdateMixtureExpression calls TCustomPhastBoundary.UpdateMixtureExpression for FluxBoundary, LeakyBoundary, RiverBoundary, SpecifiedHeadBoundary, SpecifiedSolutionBoundary, and WellBoundary.

Public function AddDataSet(const DataSet: TDataArray): Integer; override;

AddDataSet adds Data set to the list of TDataArray whose values are specified by this TPhastScreenObject. AddDataSet also does what it takes to ensure that DataSet will be notified when there is a change to this TPhastScreenObject.

Public procedure Assign(Source: TPersistent); override;

Assign copies InterpValues and the boundary conditions from source and calls inherited Assign.

Public procedure AssignValuesToDataSet(const Grid: TPhastGrid; const DataSet: TDataArray); override;

AssignValuesToDataSet checks to make sure that it should affect DataSet. If so, assigns values to locations within DataSet that it should affect.

Public procedure ClearDataSets; override;

ClearDataSets calls inherited ClearDataSets and clears InterpValues. ClearDataSets also unsubscribes to everything in FDataSetMixtureSubscriptions and clears FDataSetMixtureSubscriptions.

Public procedure DeleteDataSet(const Index: Integer); override;

DeleteDataSet deletes the TDataArray specified by Index from the list of TDataArrays affected by this TPhastScreenObject.

Public constructor Create(AnOwner: TComponent); override;

Create creates an instance of TPhastScreenObject.

Public destructor Destroy; override;

Destroy destroys the current instance of TPhastScreenObject. Do not call Destroy directly. Call Free instead.

Public procedure InsertDataSet(const Index: Integer; const DataSet: TDataArray); override;

InsertDataSet inserts DataSet into the list of data sets specified by this TPhastScreenObject at the position specified by Index.

Public function GetBoundaryCollection(const TimeList: TTimeList): TCustomPhastBoundaryCollection;

GetBoundaryCollection returns the TCustomPhastBoundaryCollection one of whose TTimeLists is TimeList.

Public procedure Invalidate; override;

Invalidate notifies the things that depend on this TPhastScreenObject that is has changed.

Public procedure ResetSubscriptions; override;

ResetSubscriptions calls ResetMixtureSubscriptions and ResetBoundaryMixtureSubscriptions as well as inherited ResetSubscriptions

Public function BoundaryTypeUsed: TBoundaryTypes;

BoundaryTypeUsed returns True if this TPhastScreenObject affects a boundary condition.

Properties

Protected property MixtureDataSetFormula[const Index: integer]: string read GetMixtureDataSetFormula write SetMixtureDataSetFormula;

MixtureDataSetFormula is used to access the formula for the Mixture specified by Index when PHAST style interpolation is used with a mixture. See TPhastInterpolationValues.

Published property FluxBoundary: TFluxBoundary read FFluxBoundary write SetFluxBoundary stored StoreFlux;

FluxBoundary represents the flux boundary (if any) in this TPhastScreenObject.

Published property LeakyBoundary: TLeakyBoundary read FLeakyBoundary write SetLeakyBoundary stored StoreLeaky;

LeakyBoundary represents the leaky boundary (if any) in this TPhastScreenObject.

Published property RiverBoundary: TRiverBoundary read FRiverBoundary write SetRiverBoundary stored StoreRiver;

RiverBoundary represents the river boundary (if any) in this TPhastScreenObject.

Published property SpecifiedHeadBoundary: TSpecifiedHeadBoundary read FSpecifiedHeadBoundary write SetSpecifiedHeadBoundary stored StoreSpecifiedHead;

SpecifiedHeadBoundary represents the specified head boundary (if any) in this TPhastScreenObject.

Published property SpecifiedSolutionBoundary: TSpecifiedSolutionBoundary read FSpecifiedSolutionBoundary write SetSpecifiedSolutionBoundary stored False;

SpecifiedSolutionBoundary is retained only for backwards compatibility.

Published property WellBoundary: TWellBoundary read FWellBoundary write SetWellBoundary stored StoreWell;

WellBoundary represents the well boundary (if any) in this TPhastScreenObject.

Published property InterpValues: TInterpValuesCollection read FInterpValues write SetInterpValues;

InterpValues represents the PHAST style interpolation parameters for the data sets affected by this TPhastScreenObject. See TPhastInterpolationValues.


Generated by PasDoc 0.10.0 on 2006-10-31 09:56:42