DfsuFile Class |
Use the DfsFileFactory to open an existing dfsu file.
Use the DfsuBuilder to create a new dfsu file.
You can read, write and append item-timesteps to the file.
The geometry can be altered, by moving the nodes, but the element connectivity can not be changed.
Namespace: DHI.Generic.MikeZero.DFS.dfsu
The DfsuFile type exposes the following members.
Name | Description | |
---|---|---|
![]() | DfsuFile |
Wrap a dfs file in the DfsuFile object.
It will throw an exception if file is not a dfsu file. |
Name | Description | |
---|---|---|
![]() | ApplicationTitle |
Title of application creating the file
|
![]() | ApplicationVersion |
Version number of appliation creating the file.
|
![]() | Code |
Boundary code of node. 0 means not a boundary node.
|
![]() | DeleteValueFloat |
Delete (undefined/missing) value
|
![]() | DfsuFileType |
Type of dfsu file.
|
![]() | ElementIds |
Id for each element. Usually starts from 1 and increases, but needs not to.
|
![]() | ElementTable |
The ElementTable defines for each element which
nodes that defines the element.
The numbers in the ElementTable are node numbers, not indices! Each value in the table are between 1 and number-of-nodes. |
![]() | ElementType |
Type of element.
|
![]() | FileName |
Name of file
|
![]() | FileTitle |
Title of file
|
![]() | ItemInfo |
List of dynamic item info.
|
![]() | NodeIds |
Id for each node. Usually starts from 1 and increases, but needs not to.
|
![]() | NumberOfElements |
Number of elements in the mesh.
|
![]() | NumberOfLayers |
For files with a vertical dimension, returns the maximum number of layers.
|
![]() | NumberOfNodes |
Number of nodes in the mesh.
|
![]() | NumberOfSigmaLayers |
For files with a vertical dimension, returns the number of sigma layers.
|
![]() | NumberOfTimeSteps |
Number of time steps in the file
|
![]() | Projection |
Geographical projection.
|
![]() | StartDateTime |
Start date time of the file
|
![]() | TimeStepInSeconds |
time step in seconds.
|
![]() | X |
X coordinates of nodes
|
![]() | Y |
Y coordinates of nodes
|
![]() | Z |
Z coordinates of nodes
|
![]() | ZUnit |
Unit of the z coordinate. The unit
must be a length unit (convertable to meters).
|
Name | Description | |
---|---|---|
![]() | Close |
See Close for details
|
![]() | Dispose |
Close file and release ressources on the unmanaged side.
|
![]() | Equals | (Inherited from Object.) |
![]() | FindItem |
Positions the file pointer at the location in the file where the
specified dynamic item at the specified time step starts.
|
![]() | FindTimeStep |
Positions the file pointer at the location in the file where the
specified time step starts.
|
![]() | Flush |
See Flush for details
|
![]() | FlushTimeStep |
See FlushTimeStep |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() | Open |
Open a dfsu file for reading
|
![]() ![]() | OpenAppend |
Open a dfsu file for appending/editing. File pointer is pointing to the end of the file data.
|
![]() ![]() | OpenEdit |
Open a dfsu file for editing. File pointer is pointing to the start of the file data.
|
![]() | ReadItemTimeStep(Int32, Int32) |
See ReadItemTimeStep(Int32, Int32) for details
|
![]() | ReadItemTimeStep(IDfsItemData, Int32) |
See ReadItemTimeStep(IDfsItemData, Int32) for details
|
![]() | ReadItemTimeStepNext |
See ReadItemTimeStepNext for details
|
![]() | Reset |
Resets the file pointer to point on the first dynamic item time step in the file.
Can also be used if it is required to restart reading the static items. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | WriteItemTimeStep |
Writes data to the specified item and timestep in the file.
If the item-timestep exists already, data is updated. If it does not exist, the item number and timestep index must match exactly the next item-timestep after the last one in the file. The size of the data must match the data size of the item that is to be written. The time value is only relevant for files with non-equidistant time axis. For files with an equidistant time axis, the time value is ignored, and a zero can be used. |
![]() | WriteItemTimeStepNext | Writes the next dynamic item-timestep. If the file pointer points to the end of the file, this will append a new item-timestep to the file. If the file pointer points to an existing item-timestep, the data of that item-timestep is updated. Remember that the file pointer position depends on the mode that the file was opened: In edit mode the file pointer points at the first item-timestep. In append mode the file pointer points initially at the end of file. It iterates over the item-timesteps as the ReadItemTimeStepNext, see there for more details. This is the most efficient way to iterate through and update/append the items and timesteps in a file, since it iterates exactly as the data is stored on the disk. The size of the data must match the data size of the item that is to be written. The time value is only relevant for files with non-equidistant time axis. For files with an equidistant time axis, the time value is ignored, and a zero can be used. |
Name | Description | |
---|---|---|
![]() | CalculateElementCenterCoordinates |
For each element, calculates the element center coordinate
as the average of all node coordinates of the nodes in
each element.
(Defined by DfsuUtil.) |
![]() | FindTopLayerElements |
Find element indices (zero-based) of the elements being the upper-most element
in its column.
(Defined by DfsuUtil.)Each column is identified by matching node id numbers. For 3D elements the last half of the node numbers of the bottom element must match the first half of the node numbers in the top element. For 2D vertical elements the order of the node numbers in the bottom element (last half number of nodes) are reversed compared to those in the top element (first half number of nodes). |
![]() | GetDateTimes |
Return an array of DateTimes which are the times for each timestep
(Defined by DfsuUtil.) |