Class PbRegularCartesianGrid2D

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class PbRegularCartesianGrid2D
    extends PbGrid2D
    implements java.lang.Cloneable
    Defines a regular cartesian grid surface mesh. Class to define a surface mesh represented by a grid, with cartesian coordinates, of which the lines are parallel to X-axis or Y-axis. This mesh is said regular because the gap between 2 consecutive parallel lines is constant.

    The geometry of such a mesh is defined by the 2 dimensions of its grid (num_x,num_y), by its bounding box (x_min,y_min,x_max,y_max) and for a 3D mesh by its z altitudes on each nodes. z is an array of num_x * num_y floats.

    The values on the mesh nodes are defined by the PbMesh.addValuesSet(set_index,val) method, where val argument is an array of num_x * num_y floats.

    • Constructor Detail

      • PbRegularCartesianGrid2D

        public PbRegularCartesianGrid2D()
        Calls PbRegularCartesianGrid2D(true).
      • PbRegularCartesianGrid2D

        public PbRegularCartesianGrid2D​(int num_x,
                                        int num_y,
                                        float x_min,
                                        float y_min,
                                        float x_max,
                                        float y_max,
                                        float[] z)
        Calls PbRegularCartesianGrid2D(num_x, num_y, x_min, y_min, x_max, y_max, z, true).
      • PbRegularCartesianGrid2D

        public PbRegularCartesianGrid2D​(int num_x,
                                        int num_y,
                                        float x_min,
                                        float y_min,
                                        float x_max,
                                        float y_max)
        Calls PbRegularCartesianGrid2D(num_x, num_y, x_min, y_min, x_max, y_max, true).
      • PbRegularCartesianGrid2D

        public PbRegularCartesianGrid2D​(int num_x,
                                        int num_y,
                                        float x_min,
                                        float y_min,
                                        float x_max,
                                        float y_max,
                                        boolean isDataDuplicate)
        Constructor of a 2D regular grid mesh. See also PbMesh for more explanations about data duplication.
      • PbRegularCartesianGrid2D

        public PbRegularCartesianGrid2D​(boolean isDataDuplicate)
        Constructor of a default simple mesh. See also PbMesh for more explanations about data duplication.
      • PbRegularCartesianGrid2D

        public PbRegularCartesianGrid2D​(int num_x,
                                        int num_y,
                                        float x_min,
                                        float y_min,
                                        float x_max,
                                        float y_max,
                                        float[] z,
                                        boolean isDataDuplicate)
        Constructor of a 3D regular grid mesh. See also PbMesh for more explanations about data duplication.
      • PbRegularCartesianGrid2D

        public PbRegularCartesianGrid2D​(int num_x,
                                        int num_y,
                                        PbRegularCartesianGrid2D other_mesh)
        Constructor of a regular grid mesh, by refining the given other_mesh.
    • Method Detail

      • clone

        public java.lang.Object clone()
      • setGeometry

        public void setGeometry​(int num_x,
                                int num_y,
                                float x_min,
                                float y_min,
                                float x_max,
                                float y_max,
                                float[] z)
        Defines a new 3D geometry.
      • setGeometry

        public void setGeometry​(int num_x,
                                int num_y,
                                float x_min,
                                float y_min,
                                float x_max,
                                float y_max)
        Defines a new 2D geometry.