Skip to contents

Constructor for the `OGS6_vtu` base class

Active bindings

vtu_path

Getter for private parameter `.vtu_path`

number_of_points

Getter for NumberOfPoints parameter of `.vtkUnstructuredGrid`

number_of_cells

Getter for NumberOfCells parameter of `.vtkUnstructuredGrid`

points

Getter for Points parameter of `.dsa_vtkUnstructuredGrid`

cells

Getter for Cells parameter of `.dsa_vtkUnstructuredGrid`

field_data

Getter for FieldData parameter of `.dsa_vtkUnstructuredGrid`

point_data

Getter for PointData parameter of `.dsa_vtkUnstructuredGrid`

cell_data

Getter for CellData parameter of `.dsa_vtkUnstructuredGrid`

vtkPointLocator

Getter for private parameter `.vtkPointLocator`

vtkUnstructuredGrid

Access to private parameter `.vtkUnstructuredGrid`

dsa_vtkUnstructuredGrid

Getter for private parameter `.dsa_vtkUnstructuredGrid`

Methods


Method new()

Creates new OGS6_vtu object.

Usage

OGS6_vtu$new(vtu_path)

Arguments

vtu_path

string: Path to .vtu file


Method print()

Overrides default printing behaviour.

Usage

OGS6_vtu$print()


Method get_field_data()

Gets FieldData.

Usage

OGS6_vtu$get_field_data(keys)

Arguments

keys

character: Optional: `Name` attributes of `DataArray` elements, defaults to all in `FieldData`.

Returns

A list of format list(value_a = 1, value_b = 2), where the names reference the `Name` attributes of the `DataArray` elements.


Method get_point_coords()

Gets coordinates of specific points by their IDs.

Usage

OGS6_vtu$get_point_coords(point_ids)

Arguments

point_ids

numeric: Point IDs

Returns

If `point_ids` is a number, a coordinate array. If point_ids` is a numeric vector with length > 1, a list of coordinate arrays.


Method get_point_data_at()

Gets PointData at specified coordinates.

Usage

OGS6_vtu$get_point_data_at(coordinates, keys)

Arguments

coordinates

list(numeric): List of coordinates (a coordinate is a numeric vector of length 3)

keys

character: Optional: `Name` attributes of `DataArray` elements, defaults to all in `PointData`


Method get_point_data()

Gets PointData for points with IDs in `point_ids`.

Usage

OGS6_vtu$get_point_data(point_ids, keys)

Arguments

point_ids

numeric: Optional: Point IDs, defaults to all

keys

character: Optional: `Name` attributes of `DataArray` elements, defaults to all in `PointData`

Returns

A tibble::tibble where each row represents a point.


Method get_cell_data()

Gets CellData for cells with IDs in `cell_ids`.

Usage

OGS6_vtu$get_cell_data(cell_ids, keys)

Arguments

cell_ids

numeric: Optional: Cell IDs, defaults to all

keys

character: Optional: `Name` attributes of `DataArray` elements, defaults to all in `CellData`

Returns

A tibble::tibble where each row represents a cell.


Method clone()

The objects of this class are cloneable with this method.

Usage

OGS6_vtu$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.