Class TCustomParameterTransientWriter

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TCustomParameterTransientWriter = class(TCustomTransientWriter)

Description

no description available, TCustomTransientWriter description follows

TCustomTransientWriter is used to export input files for MODFLOW for packages with time-varying data.

Hierarchy

Overview

Fields

Protected FParameterNames: TStringList;
Protected FUsedInstanceNames: TStringList;
Protected FParamValues: TStringList;

Methods

Protected function CellType: TValueCellType; virtual; abstract;
Protected procedure GetNumCellsAndNumInstances(ParamValues: TList; var NUMINST, NLST: Integer);
Protected function GetBoundary(ScreenObject: TScreenObject): TModflowBoundary; virtual; abstract;
Protected procedure WriteStressPeriods(const VariableIdentifiers, DataSetIdentifier, DS5, D7PNameIname, D7PName: string); virtual; abstract;
Protected procedure GetInstanceName(var InstanceName: string; TimeIndex: Integer; InstanceRoot: string);
Protected procedure GetInstanceRoot(const PARNAM: string; ParamValues: TList; var InstanceRoot: string);
Protected procedure Evaluate; override;
Protected procedure RetrieveParametersForStressPeriod(const D7PNameIname, D7PName: string; TimeIndex: Integer; ParametersUsed: TStringList; ParameterValues: TList; IncludePrintCode: boolean);
Protected function ParameterCount: integer; virtual;
Protected function ParameterType: TParameterType; virtual; abstract;
Protected procedure WriteParameterCells(CellList: TValueCellList; NLST: Integer; const VariableIdentifiers, DataSetIdentifier: string; AssignmentMethod: TUpdateMethod; MultiplierArrayNames: TTransientMultCollection; ZoneArrayNames: TTransientZoneCollection); virtual; abstract;
Protected procedure WriteParameterDefinitions(const DS3, DS3Instances, DS4A, DataSetIdentifier, VariableIdentifiers, ErrorRoot: string; AssignmentMethod: TUpdateMethod; MultiplierArrayNames: TTransientMultCollection; ZoneArrayNames: TTransientZoneCollection); virtual; abstract;
Protected procedure ClearTimeLists(AModel: TBaseModel);
Public Constructor Create(Model: TCustomModel; EvaluationType: TEvaluationType); override;
Public Destructor Destroy; override;

Properties

Public property ParamValues: TStringList read FParamValues;

Description

Fields

Protected FParameterNames: TStringList;
 
Protected FUsedInstanceNames: TStringList;

FUsedInstanceNames is used to maintain a list of parameter instance names so that duplicate instance names are not generated. FUsedInstanceNames is filled once when exporting the parameters and again when exporting the stress periods. Thus it must be cleared at the beginning of the process of exporting the stress periods.

Protected FParamValues: TStringList;

See ParamValues.

Methods

Protected function CellType: TValueCellType; virtual; abstract;

CellType is used to create a TValueCellList for a particular type of TValueCell.

Protected procedure GetNumCellsAndNumInstances(ParamValues: TList; var NUMINST, NLST: Integer);

GetNumCellsAndNumInstances returns the number of cells defined by parameters and the number of parameters instances for the parameter.

Protected function GetBoundary(ScreenObject: TScreenObject): TModflowBoundary; virtual; abstract;

GetBoundary is an abstract function used to return the proper TModflowBoundary for the package that is being exported.

Protected procedure WriteStressPeriods(const VariableIdentifiers, DataSetIdentifier, DS5, D7PNameIname, D7PName: string); virtual; abstract;

WriteStressPeriods writes the non-parameter cells and the names of the parameter instance for each stress period.

Parameters
DataSetIdentifier
DataSetIdentifier is passed to WriteCell.
VariableIdentifiers
VariableIdentifiers is passed to WriteCell.
Protected procedure GetInstanceName(var InstanceName: string; TimeIndex: Integer; InstanceRoot: string);

GetInstanceName returns the proper name for an instance of a parameter in InstanceName. InstanceRoot should have been obtained from GetInstanceRoot. GetInstanceName needs to return the same value of the instance name for each unique combination of TimeIndex and InstanceRoot;

Protected procedure GetInstanceRoot(const PARNAM: string; ParamValues: TList; var InstanceRoot: string);

GetInstanceRoot uses PARNAM to determine InstanceRoot which is then used in GetInstanceName. InstanceRoot will be short enough that the name of the parameter instance will always be less than or equal to 10 characters.

Protected procedure Evaluate; override;

Evaluate determines the appropriate value or values to assign to each cell for each stress period.

Protected procedure RetrieveParametersForStressPeriod(const D7PNameIname, D7PName: string; TimeIndex: Integer; ParametersUsed: TStringList; ParameterValues: TList; IncludePrintCode: boolean);

RetrieveParametersForStressPeriod adds lines to ParametersUsed that specify the parameters that are used in the current stress period. RetrieveParametersForStressPeriod fills ParameterValues with lists of TValueCellLists.

Protected function ParameterCount: integer; virtual;

ParameterCount is the number of parameters used by the package.

Protected function ParameterType: TParameterType; virtual; abstract;

ParameterType is an abstract method that returns the package being exported.

Protected procedure WriteParameterCells(CellList: TValueCellList; NLST: Integer; const VariableIdentifiers, DataSetIdentifier: string; AssignmentMethod: TUpdateMethod; MultiplierArrayNames: TTransientMultCollection; ZoneArrayNames: TTransientZoneCollection); virtual; abstract;

WriteParameterCells is an abstract method used to write the cells for a parameter. If CellList.Count < NLST, dummy, inactive cells should be written so that all instances of the parameter have the same number of cells.

Parameters
CellList
CellList contains a list of TValueCells to be exported.
NLST
NLST is the required number of cells in each parameter instance.
DataSetIdentifier
DataSetIdentifier is passed to WriteCell.
VariableIdentifiers
VariableIdentifiers is passed to WriteCell.
Protected procedure WriteParameterDefinitions(const DS3, DS3Instances, DS4A, DataSetIdentifier, VariableIdentifiers, ErrorRoot: string; AssignmentMethod: TUpdateMethod; MultiplierArrayNames: TTransientMultCollection; ZoneArrayNames: TTransientZoneCollection); virtual; abstract;

WriteParameterDefinitions writes the definitions of parameters including the lists of cells.

Parameters
DS3
DS3 identifies the data set containing PARNAM PARTYP Parval NLST and those variable names.
DS3Instances
DS3Instances identifies the variables associated with parameters instances.
DS4A
DS4A identifies the data set containing INSTNAM. when parameter instances are being defined.
DataSetIdentifier
DataSetIdentifier is passed to WriteCell.
VariableIdentifiers
VariableIdentifiers is passed to WriteCell.
ErrorRoot
ErrorRoot is used in a format statement to create an error message when a parameter has no associated cells. It should have %s in it somewhere which will be filled in with the type of parameter being exported.
ParameterType
ParameterType is the type of parameter associated with the package being exported.
Protected procedure ClearTimeLists(AModel: TBaseModel);
 
Public Constructor Create(Model: TCustomModel; EvaluationType: TEvaluationType); override;

Create creates and instance of TCustomParameterTransientWriter.

Public Destructor Destroy; override;
 

Properties

Public property ParamValues: TStringList read FParamValues;

After Evaluate is called, ParamValues contains a series of parameter names. Associated with each parameter name in the Objects property is a TList. Each TList contains a series of TValueCellLists; one for each stress period. Each such list contains series of TValueCells. Each TValueCell defines one boundary cell for one stress period.


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