MDAL
|
ASCII Dat format is used by various solvers and the output from various solvers can have slightly different header. More...
#include <mdal_ascii_dat.hpp>
Public Member Functions | |
DriverAsciiDat * | create () override |
bool | canReadDatasets (const std::string &uri) override |
void | load (const std::string &datFile, Mesh *mesh) override |
The DAT format contains "datasets" and each dataset has N-outputs. More... | |
bool | persist (DatasetGroup *group) override |
std::string | writeDatasetOnFileSuffix () const override |
![]() | |
Driver (const std::string &name, const std::string &longName, const std::string &filters, int capabilityFlags) | |
std::string | name () const |
std::string | longName () const |
std::string | filters () const |
bool | hasCapability (Capability capability) const |
bool | hasWriteDatasetCapability (MDAL_DataLocation location) const |
virtual std::string | saveMeshOnFileSuffix () const |
virtual bool | canReadMesh (const std::string &uri) |
virtual int | faceVerticesMaximumCount () const |
returns the maximum vertices per face | |
virtual std::string | buildUri (const std::string &meshFile) |
virtual std::unique_ptr< Mesh > | load (const std::string &uri, const std::string &meshName="") |
virtual void | save (const std::string &fileName, const std::string &meshName, Mesh *mesh) |
virtual void | createDatasetGroup (Mesh *mesh, const std::string &groupName, MDAL_DataLocation dataLocation, bool hasScalarData, const std::string &datasetGroupFile) |
virtual void | createDataset (DatasetGroup *group, RelativeTimestamp time, const double *values, const int *active) |
virtual void | createDataset (DatasetGroup *group, RelativeTimestamp time, const double *values, const int *verticalLevelCount, const double *verticalExtrusion) |
ASCII Dat format is used by various solvers and the output from various solvers can have slightly different header.
The format is used by TUFLOW, BASEMENT and HYDRO_AS-2D solvers.
The most frequent form is based on official SMS documentation https://www.xmswiki.com/wiki/SMS:ASCII_Dataset_Files_*.dat The official format only supports data defined on vertices, both scalar vector. The new format is recognized by keyword "DATASET" on the first line of the file.
BASEMENT solver also stores data defined on elements. Element is either face or edge. To recognize such dataset, the dataset name contains "_els_" substring (e.g. depth_els_1.dat). We do not support reading element data for meshes with combined 2D (faces) and 1D elements (edges)
HYDRO_AS-2D solver can have mesh that has numbering gaps, but speficies values for even missing indexes in dataset file
In one file, there is always one dataset group stored.
Sometime the "older" datasets may have some part of the header missing, e.g. the file starts with SCALAR or VECTOR or TS keyword. The older format does not have "active" flags for faces and does not recognize most of the keywords. Old format data are always defined on vertices
|
overridevirtual |
The DAT format contains "datasets" and each dataset has N-outputs.
One output represents data for all vertices/faces for one timestep
In MDAL we convert one output to one MDAL dataset;
Reimplemented from MDAL::Driver.