Programming Reference for VirtualLab Fusion  2025.1
Loading...
Searching...
No Matches
DataArrayGridLess Class Reference

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Class for objects that store data in C^N which are arbitrarily distributed (i.e. not on a grid) in ℝ^M More...

Inheritance diagram for DataArrayGridLess:
DataArrayBase

Public Member Functions

override object Clone ()
 Deep copy.
 
PhysicalValue[] CoordinatesByDataPointIndex (int index)
 Gets the coordinates for a given list index.
 
 DataArrayGridLess (ComplexField coordinates, MeasuredQuantity[] propertiesOfCoordinates, string[] commentsOfCoordinates, ComplexField1DArray data, MeasuredQuantity[] quantitiesOfData, string[] commentsOfdata, ComplexField meshInformation)
 Constructor that uses arrays of coordinates and data values.
 
 DataArrayGridLess (ComplexField coordinates, MeasuredQuantity[] quantitiesOfCoordinates, string[] commentsOfCoordinates, ComplexField1DArray data, MeasuredQuantity[] quantitiesOfData, string[] commentsOfdata)
 Constructor that uses arrays of coordinates and data values.
 
 DataArrayGridLess (ComplexField coordinates, PhysicalProperty[] propertiesOfCoordinates, string[] commentsOfCoordinates, ComplexField1DArray data, PhysicalProperty[] propertiesOfdata, string[] commentsOfdata)
 Constructor that uses arrays of coordinates and data values.
 
 DataArrayGridLess (ComplexField coordinates, PhysicalProperty[] propertiesOfCoordinates, string[] commentsOfCoordinates, ComplexField1DArray data, PhysicalProperty[] propertiesOfdata, string[] commentsOfdata, ComplexField meshInformation)
 Constructor that uses arrays of coordinates and data values.
 
 DataArrayGridLess (DataArrayGridLess dataArray)
 Copy constructor.
 
 DataArrayGridLess (List< VectorD > coordinates,(PhysicalProperty propX, PhysicalProperty propY) propertiesOfCoordinates,(string descriptionX, string descriptionY) commentsOfCoordinates, ComplexField1DArray data, PhysicalProperty[] propertiesOfdata, string[] commentsOfdata)
 Special constructor for 2D gridless data arrays.
 
override bool Equals (object otherObject, EqualityIntent equalityIntent)
 Determines whether the specified Object is equal to this instance.
 
DataArray1D Extract1DDataAlongLine (Line_forGUI_physicalUnits extractionLine, double relativeEpsilon, double startCoordinate, out string errorMessage, out bool invertedOrder)
 Method which extracts a non-equidistant 1D data array along a given line.
 
List< int >[,] FindGrid2D (out double[] xCellsCoords, out double[] yCellsCoords)
 Finds a 2D grid for gridless 2D data. Two data points get into the same cell only if NumericalChecks.AreEqual(..) gives TRUE for the coordinates of these data points.
 
virtual PhysicalValueRange GetCoordinateRangeForDimension (int dimension)
 support method to get the coordinate range for a specific dimension the user need to specify the dimension which shall be evaluated
 
void GetMinMaxRangeForValues (int indexSubsetToCheck, FieldQuantity quantityToCheck, bool evaluateForTriangles, out double minValue, out double maxValue)
 public support method to get the min max value range for the selected values within the data array
 
override FormDocument GetNewDocumentWindow (Form formMain, string fileName)
 
override string HeaderInformation (int subSetID, ExportImport.TextExportImportSettings exportSettings, FieldQuantity? quantityForInformation=null)
 
void SetDataWithPropertiesAndCommentsAtOnce (ComplexField1DArray data, MeasuredQuantity[] quantities, string[] comments)
 Sets the members Data, MeasuredQuantitiesOfDataEntries and CommentsOfDataEntries at once to ensure consistency.
 
override void SetDataWithPropertiesAndCommentsAtOnce (ComplexField[] data, MeasuredQuantity[] measuredQuantitiesOfDataEntries, string[] commentsOfDataEntries)
 
- Public Member Functions inherited from DataArrayBase
 DataArrayBase ()
 Standard constructor used for manual serialization.
 
 DataArrayBase (DataArrayBase copyDA)
 copy constructor
 

Static Public Member Functions

static DataArrayGridLess CreateDataArrayGridless2D_fromComplexArray (Complex[,] dataMatrix, bool createRealValuedResult, bool dataInColumns, MeasuredQuantity[] quantitiesOfData, string[] commentsOfData, MeasuredQuantity quantityOfXCoordinates, string commentOfXCoordinates, MeasuredQuantity quantityOfYCoordinates, string commentOfYCoordinates)
 Method which converts complex data (double precision, usually read from a text file) into a gridless 2D data array.
 
static DataArrayGridLess Load (string fileName)
 Loads the specified file name. Works independently from whether the document has been saved without view settings (as prior to VL 6.0) or with view settings.
 

Properties

string[] CommentsOfCoordinates [get, set]
 Get and set the comment for each dimension in R^M.
 
override string[] CommentsOfDataEntries [get, set]
 Get and set the comment for each dimension in C^N.
 
ComplexField Coordinates [get, set]
 Get and set the coordinates for the data in R^M. The coordinates for each dimension k (zero based!) are stored in the columns of this ComplexField: [k, *].
 
ComplexField1DArray Data [get, set]
 Get and set the data in C^N. Each 1D complexField holds the data for one dimension.
 
override DataArrayType DataArrayType [get]
 // The graphics add-on data to be drawn. //
 
string DescriptionOfDataPointLabels [get, set]
 Gets and sets the caption of the index / label column.
 
override int DimensionalityOfCoordinates [get]
 Dimensionality M of the space of independent variables R^M.
 
override int DimensionalityOfData [get]
 Dimensionality N of the space of data values C^N.
 
override bool IsComplex [get]
 Are the values defined in C^N (TRUE) or in the subset of real numbers R^N (FALSE)
 
MeasuredQuantity[] MeasuredQuantitiesOfCoordinates [get, set]
 Gets and sets the measured quantity of the y-coordinates.
 
ComplexField MeshInformation [get, set]
 public property to set and get the mesh information of the DataArrayGridLess If no mesh information is given null will be returned. The ComplexField holds the point indices for each triangle's vertices. So [0,i], [1,i], [2,i] hold the indices of the points which represent the vertices of the i'th triangle.
 
bool MeshInformationAvailable [get]
 public support function which can be used to evaluate whether mesh information is available
 
int NoOfDataPoints [get]
 Get the number of data values stored.
 
override bool NoSmoothingInterpolationMethod [get]
 Gets a flag indicating whether or not none of the interpolation methods is smoothing (like nearest neighbor or constant interval) -> TRUE But if one of the methods does (like all other methods) -> the flag is set to FALSE.
 
PhysicalProperty[] PhysicalPropertiesOfCoordinates [get, set]
 Get and set the physical property for each dimension in R^M.
 
override string SuffixForPhysicalMeaning [get]
 Property which gives the suffix which is used in FormPhysicalObjectBase.SetTypeOfPhysicalObject.
 
- Properties inherited from DataArrayBase
Dictionary< string, object > AdditionalInformation [get, set]
 Additional information to be stored at the data array.
 
AdditionalInformationForDataArrays AdditionalInformationObject [get, set]
 Gets and sets the additional information to be stored at the data array.
 
string[] CommentsOfDataEntries [get, set]
 Get and set the comment for each dimension in C^N.
 
int DimensionalityOfCoordinates [get]
 Dimensionality M of the space of independent variables R^M.
 
int DimensionalityOfData [get]
 Dimensionality N of the space of data values C^N.
 
GraphicsAddOnData GraphicsAddons [get, set]
 The graphics add-on data to be drawn.
 
bool IsComplex [get]
 Are the values defined in C^N (TRUE) or in the subset of real numbers R^N (FALSE)
 
MeasuredQuantity[] MeasuredQuantitiesOfDataEntries [get, set]
 Gets and sets the measured quantity for each dimension in C^N. Currently, it is not always used. Thus PhysicalPropertiesOfDataEntries must be set consistently.
 
bool NoSmoothingInterpolationMethod [get]
 Gets a flag indicating whether or not none of the interpolation methods is smoothing (like nearest neighbor or constant interval) -> TRUE But if one of the methods does (like all other methods) -> the flag is set to FALSE.
 
PhysicalMeaning PhysicalMeaning [get, set]
 Gets and sets the physical meaning of the data array object (default: None)
 
PhysicalProperty[] PhysicalPropertiesOfDataEntries [get, set]
 Get and set the physical properties of each data subset.
 
PrecisionMode Precision [get]
 Get the highest occurring precision of the data.
 
string SuffixForPhysicalMeaning [get]
 Property which gives the suffix which is used in FormPhysicalObjectBase.SetTypeOfPhysicalObject.
 

Additional Inherited Members

- Static Public Attributes inherited from DataArrayBase
static string AdditionalInfoName_SingleWavelength
 Key to be used in the additional information list in order to identify a single wavelength which applies to all subsets.
 
static string AdditionalInfoName_WavelengthPerSubset
 Key to be used in the additional information list in order to identify an array of wavelengths where every value applies to one subset.
 

Detailed Description

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Class for objects that store data in C^N which are arbitrarily distributed (i.e. not on a grid) in ℝ^M

Constructor & Destructor Documentation

◆ DataArrayGridLess() [1/6]

DataArrayGridLess ( ComplexField  coordinates,
MeasuredQuantity[]  quantitiesOfCoordinates,
string[]  commentsOfCoordinates,
ComplexField1DArray  data,
MeasuredQuantity[]  quantitiesOfData,
string[]  commentsOfdata 
)

Constructor that uses arrays of coordinates and data values.

Parameters
coordinatesArray of coordinates in ℝ^M
quantitiesOfCoordinatesMeasured quantities for the coordinates
commentsOfCoordinatesComment for the coordinates
dataArray of data in C^N
quantitiesOfDataMeasured quantities of each data subset.
commentsOfdataComments for each data subset.

◆ DataArrayGridLess() [2/6]

DataArrayGridLess ( ComplexField  coordinates,
PhysicalProperty[]  propertiesOfCoordinates,
string[]  commentsOfCoordinates,
ComplexField1DArray  data,
PhysicalProperty[]  propertiesOfdata,
string[]  commentsOfdata 
)

Constructor that uses arrays of coordinates and data values.

Parameters
coordinatesArray of coordinates in ℝ^M
propertiesOfCoordinatesPhysical property for the coordinates
commentsOfCoordinatesComment for the coordinates
dataArray of data in C^N
propertiesOfdataPhysical properties of each data subset.
commentsOfdataComments for each data subset.

◆ DataArrayGridLess() [3/6]

DataArrayGridLess ( List< VectorD coordinates,
(PhysicalProperty propX, PhysicalProperty propY)  propertiesOfCoordinates,
(string descriptionX, string descriptionY)  commentsOfCoordinates,
ComplexField1DArray  data,
PhysicalProperty[]  propertiesOfdata,
string[]  commentsOfdata 
)

Special constructor for 2D gridless data arrays.

Parameters
coordinates2D coordinates.
propertiesOfCoordinatesPhysical property for the coordinates
commentsOfCoordinatesDescriptions for the coordinates
dataArray of data in C^N
propertiesOfdataPhysical properties of each data subset.
commentsOfdataComments for each data subset.

◆ DataArrayGridLess() [4/6]

DataArrayGridLess ( ComplexField  coordinates,
MeasuredQuantity[]  propertiesOfCoordinates,
string[]  commentsOfCoordinates,
ComplexField1DArray  data,
MeasuredQuantity[]  quantitiesOfData,
string[]  commentsOfdata,
ComplexField  meshInformation 
)

Constructor that uses arrays of coordinates and data values.

Parameters
coordinatesArray of coordinates in ℝ²
propertiesOfCoordinatesMeasured quantities for the coordinates
commentsOfCoordinatesComment for the coordinates
dataArray of data in C^N
quantitiesOfDataMeasured quantities of each data subset.
commentsOfdataComments for each data subset.
meshInformationthe mesh information used within the object

◆ DataArrayGridLess() [5/6]

DataArrayGridLess ( ComplexField  coordinates,
PhysicalProperty[]  propertiesOfCoordinates,
string[]  commentsOfCoordinates,
ComplexField1DArray  data,
PhysicalProperty[]  propertiesOfdata,
string[]  commentsOfdata,
ComplexField  meshInformation 
)

Constructor that uses arrays of coordinates and data values.

Parameters
coordinatesArray of coordinates in R^2
propertiesOfCoordinatesPhysical property for the coordinates
commentsOfCoordinatesComment for the coordinates
dataArray of data in C^N
propertiesOfdataPhysical properties of each data subset.
commentsOfdataComments for each data subset.
meshInformationthe mesh information used within the object

◆ DataArrayGridLess() [6/6]

Copy constructor.

Parameters
dataArray

Member Function Documentation

◆ Clone()

override object Clone ( )

Deep copy.

Returns
Copy of data array

◆ CoordinatesByDataPointIndex()

PhysicalValue[] CoordinatesByDataPointIndex ( int  index)

Gets the coordinates for a given list index.

Parameters
indexIndex to get the located data for
Returns
Coordinate vector for the index

◆ CreateDataArrayGridless2D_fromComplexArray()

static DataArrayGridLess CreateDataArrayGridless2D_fromComplexArray ( Complex  dataMatrix[,],
bool  createRealValuedResult,
bool  dataInColumns,
MeasuredQuantity[]  quantitiesOfData,
string[]  commentsOfData,
MeasuredQuantity  quantityOfXCoordinates,
string  commentOfXCoordinates,
MeasuredQuantity  quantityOfYCoordinates,
string  commentOfYCoordinates 
)
static

Method which converts complex data (double precision, usually read from a text file) into a gridless 2D data array.

Parameters
dataMatrixAn array of data which holds the raw values, usually read from a text file.
createRealValuedResultIf true, the result will be real-valued, no matter if there are imaginary parts given or not.
quantitiesOfDataThe measured quantities to be set to the subsets which are read from the file.
commentsOfDataThe comments to be set to the subsets which are read from the file.
quantityOfXCoordinatesThe measured quantity to be set to the x-coordinates.
commentOfXCoordinatesThe comment to be set to the x-coordinates.
quantityOfYCoordinatesThe measured quantity to be set to the y-coordinates.
commentOfYCoordinatesThe comment to be set to the y-coordinates.
dataInColumnsIf true, the first and second column (first running index in dataMatrix) will be read as coordinates while the third (, fourth, fifth, ...) column will be interpreted as subset(s). Otherwise, the rows (second running index in dataMatrix) will be interpreted the same way.
Returns
A gridless 2D data array, imported from text file.

◆ Equals()

override bool Equals ( object  otherObject,
EqualityIntent  equalityIntent 
)

Determines whether the specified Object is equal to this instance.

Parameters
otherObjectThe Object to compare with this instance.
equalityIntentDefines what kind of equality you want to check when comparing two objects, for example all values or just physical equality.
Returns
true if the specified Object is equal to this instance; otherwise, false.

◆ Extract1DDataAlongLine()

DataArray1D Extract1DDataAlongLine ( Line_forGUI_physicalUnits  extractionLine,
double  relativeEpsilon,
double  startCoordinate,
out string  errorMessage,
out bool  invertedOrder 
)

Method which extracts a non-equidistant 1D data array along a given line.

Parameters
extractionLineLine to extract along.
relativeEpsilonEpsilon for identifying coordinates as lying "on" the line.
errorMessageError message string.
startCoordinateThe coordinate the 1D data array shall start with.
invertedOrderIf true, the order of the points in the data array is inverted to the order of the points on the line selection.
Returns
1D data along the given line.

◆ FindGrid2D()

List< int >[,] FindGrid2D ( out double[]  xCellsCoords,
out double[]  yCellsCoords 
)

Finds a 2D grid for gridless 2D data. Two data points get into the same cell only if NumericalChecks.AreEqual(..) gives TRUE for the coordinates of these data points.

Parameters
xCellsCoordssorted array of unique x coordinates for all grid cells
yCellsCoordssorted array of unique y coordinates for all grid cells
Returns
An 2D array of int lists, where the not empty cells hold a list of indices. These indices refer to the indices the data got in this DataArrayGridLess object.

◆ GetCoordinateRangeForDimension()

virtual PhysicalValueRange GetCoordinateRangeForDimension ( int  dimension)
virtual

support method to get the coordinate range for a specific dimension the user need to specify the dimension which shall be evaluated

Parameters
dimensionThe dimension to investigate. Important: It is zero-based.
Returns
the min/max value range

◆ GetMinMaxRangeForValues()

void GetMinMaxRangeForValues ( int  indexSubsetToCheck,
FieldQuantity  quantityToCheck,
bool  evaluateForTriangles,
out double  minValue,
out double  maxValue 
)

public support method to get the min max value range for the selected values within the data array

Parameters
indexSubsetToCheckthe subset index which shall be evaluated
quantityToCheckthe field quantity to evaluate
evaluateForTrianglesflag whether to evaluate for triangles
minValueout parameter for minimum value
maxValueout parameter for maximum value

◆ Load()

static DataArrayGridLess Load ( string  fileName)
static

Loads the specified file name. Works independently from whether the document has been saved without view settings (as prior to VL 6.0) or with view settings.

Parameters
fileNameName of the file.
Returns
The specified document.

◆ SetDataWithPropertiesAndCommentsAtOnce()

void SetDataWithPropertiesAndCommentsAtOnce ( ComplexField1DArray  data,
MeasuredQuantity[]  quantities,
string[]  comments 
)

Sets the members Data, MeasuredQuantitiesOfDataEntries and CommentsOfDataEntries at once to ensure consistency.

Parameters
dataData to set.
quantitiesMeasuredQuantitiesOfDataEntries to set.
commentsCommentsOfDataEntries to set.

Property Documentation

◆ DataArrayType

override DataArrayType DataArrayType
get

// The graphics add-on data to be drawn. //

public property to get the data array type of the current data array

◆ DescriptionOfDataPointLabels

string DescriptionOfDataPointLabels
getset

Gets and sets the caption of the index / label column.


◆ MeasuredQuantitiesOfCoordinates

MeasuredQuantity [] MeasuredQuantitiesOfCoordinates
getset

Gets and sets the measured quantity of the y-coordinates.