Interface MeshSequence

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String adaptationStudyFeature()
      Returns path to adaptation study feature.
      void adaptationStudyFeature​(java.lang.String tag)
      Sets adaptation study feature.
      boolean autoBuildNew()
      Gets boolean specifying whether new operations should be built automatically when added from the GUI for nonempty preselections.
      MeshSequence autoBuildNew​(boolean autoBuild)
      Specifies whether new operations should be built automatically when added from the GUI for nonempty preselections.
      void automatic​(boolean automatic)
      Sets the state of the sequence.
      double autoMeshSize()
      Gets the size adjustment number.
      MeshSequence autoMeshSize​(double size)
      Sets the size adjustment number.
      boolean autoRebuild()
      Get the value of the automatic rebuild setting of the mesh sequence.
      MeshSequence autoRebuild​(boolean auto)
      Set the automatic rebuild setting of the mesh sequence.
      void clearMesh()
      Clears the mesh generated by the sequence but keeps the features and settings associated with it.
      MeshSequence contribute​(java.lang.String tag, boolean state)
      Sets contributing status of a physics interface or other contributing feature.
      boolean contributing​(java.lang.String tag)
      Returns contributing status of a physics interface or other contributing feature.
      MeshFeature create​(java.lang.String tag, java.lang.String oper)
      Creates a mesh feature.
      ResultFeature createPlot​(java.lang.String datasetTag, java.lang.String plotGroupTag)
      Creates mesh dataset with tag datasetTag, unless it already exists, and a plot group with plots for the mesh.
      java.lang.String current()
      Returns tag of current mesh feature.
      MeshSequence current​(java.lang.String fname)
      Sets the current feature.
      MeshData data()
      Returns the mesh data.
      MeshExport export()
      Returns the mesh export tool.
      java.lang.String export​(java.lang.String filename)
      Export mesh to file.
      MeshFeatureList feature()
      Returns mesh feature list.
      MeshFeature feature​(java.lang.String fname)
      Returns mesh feature.
      java.lang.String geom()
      Returns the geometry.
      java.lang.String geometricModel()
      Get the geometric model used by this sequence.
      void geometricModel​(boolean defineGeometricModel)
      Specify if the sequence defines its own geometric model.
      int[][] getElem​(java.lang.String type)
      Gets elements from the mesh.
      int[][] getElem​(java.lang.String type, int position, int number)
      Gets blocks of elements from the mesh.
      int[] getElemEntity​(java.lang.String type)
      Gets geometric entity number for the elements of a specific type.
      int[] getElemEntity​(java.lang.String type, int position, int number)
      Gets blocks of geometric entity number for the elements of a specific type.
      int[] getGeomEntities​(java.lang.String type)
      Returns geometric entity indices for a certain mesh type.
      double getMaxGrowthRate()
      Retrieves the maximum growth rate in mesh.
      double getMaxVolume()
      Returns the maximum element volume.
      double getMaxVolume​(java.lang.String type)
      Returns the maximum element volume of a certain element type.
      double getMeanGrowthRate()
      Retrieves the mean growth rate in mesh.
      double getMeanQuality()
      Retrieves the mean quality in mesh.
      double getMeanQuality​(java.lang.String type)
      Retrieves the mean quality in mesh of a certain element type.
      double getMinQuality()
      Retrieves the minimal quality in mesh.
      double getMinQuality​(java.lang.String type)
      Retrieves the minimal quality in mesh of a certain element type.
      double getMinVolume()
      Returns the minimum element volume.
      double getMinVolume​(java.lang.String type)
      Returns the minimum element volume of a certain element type.
      int getNumElem()
      Gets the number of elements in a mesh.
      int getNumElem​(java.lang.String type)
      Gets the number of elements of a certain mesh type.
      int getNumVertex()
      Gets number of mesh vertices.
      int[] getQualityDistr​(int size)
      Retrieves the quality distribution.
      int[] getQualityDistr​(java.lang.String type, int size)
      Retrieves the quality distribution of a certain element type.
      int getSDim()
      Gets space dimension of mesh.
      java.lang.String[] getTypes()
      Returns the types in a mesh.
      double[][] getVertex()
      Gets the coordinates of the mesh vertices.
      double[][] getVertex​(int position, int number)
      Gets block of coordinates of the mesh vertices.
      double getVolume()
      Gets the total mesh volume.
      double getVolume​(java.lang.String type)
      Gets the total mesh volume for a certain element type.
      boolean hasProblems()
      Returns true if sequence has problems.
      boolean hasSecondOrderElements()
      Returns true if the mesh has second order elements.
      GeomInfo info()
      Returns mesh information object.
      GeomInfo infoCurrent()
      Returns mesh information object for the current mesh of a import sequence.
      boolean isAutomatic()
      Checks if the sequence is in an automatic state.
      boolean isComplete()
      Checks if the entire selected geometry has a mesh.
      boolean isEmpty()
      Checks if the mesh is empty.
      java.lang.String[] problems()
      Return features with errors or warnings.
      void run()
      Builds all mesh features.
      void run​(java.lang.String fname)
      Builds named mesh feature.
      void runCurrent()
      Builds the current mesh feature.
      MeshStatistics stat()
      Returns mesh statistics object.
    • Method Detail

      • adaptationStudyFeature

        java.lang.String adaptationStudyFeature()
        Returns path to adaptation study feature.
        Returns:
        Path to adaptation study feature.
      • adaptationStudyFeature

        void adaptationStudyFeature​(java.lang.String tag)
        Sets adaptation study feature.
        Parameters:
        tag - A path of tags to the adaptation study feature.
      • autoBuildNew

        boolean autoBuildNew()
        Gets boolean specifying whether new operations should be built automatically when added from the GUI for nonempty preselections.
        Returns:
        true if new operations are built automatically.
      • autoBuildNew

        MeshSequence autoBuildNew​(boolean autoBuild)
        Specifies whether new operations should be built automatically when added from the GUI for nonempty preselections.
        Parameters:
        autoBuild - Specifies whether new operations should be built automatically.
        Returns:
        Mesh sequence.
      • autoMeshSize

        double autoMeshSize()
        Gets the size adjustment number.
        Returns:
        The size adjustment number.
      • autoMeshSize

        MeshSequence autoMeshSize​(double size)
        Sets the size adjustment number.
        Parameters:
        size - The size adjustment number.
        Returns:
        Mesh sequence.
      • autoRebuild

        boolean autoRebuild()
        Get the value of the automatic rebuild setting of the mesh sequence.
        Returns:
        Autorebuild setting.
      • autoRebuild

        MeshSequence autoRebuild​(boolean auto)
        Set the automatic rebuild setting of the mesh sequence. on means that the mesh is automatically rebuilt when a non-mesh node is selected in the model builder in the COMSOL desktop. off disables the automatic rebuild logic.
        Parameters:
        auto - Automatic rebuild setting.
        Returns:
        Mesh sequence.
      • automatic

        void automatic​(boolean automatic)
        Sets the state of the sequence.
        Parameters:
        automatic - Specifies if the sequence is in an automatic state.
      • clearMesh

        void clearMesh()
        Clears the mesh generated by the sequence but keeps the features and settings associated with it.
      • contribute

        MeshSequence contribute​(java.lang.String tag,
                                boolean state)
        Sets contributing status of a physics interface or other contributing feature.
        Parameters:
        tag - Tag of a physics interface or other contributing feature.
        state - Contributing state.
        Returns:
        Sequence.
      • contributing

        boolean contributing​(java.lang.String tag)
        Returns contributing status of a physics interface or other contributing feature.
        Parameters:
        tag - Tag of a physics interface or other contributing feature.
        Returns:
        true if contributing.
      • create

        MeshFeature create​(java.lang.String tag,
                           java.lang.String oper)
        Creates a mesh feature.
        Parameters:
        tag - Mesh feature tag.
        oper - Mesh feature type.
        Returns:
        Created mesh feature.
      • createPlot

        ResultFeature createPlot​(java.lang.String datasetTag,
                                 java.lang.String plotGroupTag)
        Creates mesh dataset with tag datasetTag, unless it already exists, and a plot group with plots for the mesh.
        Parameters:
        datasetTag - The dataset tag.
        plotGroupTag - The plot group tag.
        Returns:
        The plot group.
      • current

        java.lang.String current()
        Returns tag of current mesh feature.
        Returns:
        Current mesh feature tag.
      • current

        MeshSequence current​(java.lang.String fname)
        Sets the current feature.
        Parameters:
        fname - New current feature tag.
        Returns:
        The sequence itself.
      • data

        MeshData data()
        Returns the mesh data.
        Returns:
        Mesh data.
      • export

        MeshExport export()
        Returns the mesh export tool.
        Returns:
        Mesh export tool.
      • export

        java.lang.String export​(java.lang.String filename)
        Export mesh to file. MPHBIN, MPHTXT, and STL (3D only) formats are supported.
        Parameters:
        filename - File name.
        Returns:
        Full path of exported file.
      • feature

        MeshFeatureList feature()
        Returns mesh feature list.
        Returns:
        Mesh feature list.
      • feature

        MeshFeature feature​(java.lang.String fname)
        Returns mesh feature.
        Parameters:
        fname - Mesh feature tag.
        Returns:
        Mesh feature list.
      • geom

        java.lang.String geom()
        Returns the geometry.
        Returns:
        Geometry sequence tag.
      • geometricModel

        java.lang.String geometricModel()
        Get the geometric model used by this sequence.
        Returns:
        The empty string if the sequence defines its own geometric model and otherwise a string reference to the sequence that defines its geometric model.
      • geometricModel

        void geometricModel​(boolean defineGeometricModel)
        Specify if the sequence defines its own geometric model.
        Parameters:
        defineGeometricModel - Specify true to let the sequence define its own geometric model and false to use the geometric model defined by the associated geometry sequence.
      • getElem

        int[][] getElem​(java.lang.String type)
        Gets elements from the mesh.
        Parameters:
        type - Mesh type.
        Returns:
        Matrix where each column contains the mesh vertex indices of an element's corners.
      • getElem

        int[][] getElem​(java.lang.String type,
                        int position,
                        int number)
        Gets blocks of elements from the mesh.
        Parameters:
        type - Mesh type.
        position - Start index.
        number - Length of block.
        Returns:
        Matrix where each column contains the mesh vertex indices of an element's corners.
      • getElemEntity

        int[] getElemEntity​(java.lang.String type)
        Gets geometric entity number for the elements of a specific type.
        Parameters:
        type - Mesh type.
        Returns:
        Vector of geometric entity numbers.
      • getElemEntity

        int[] getElemEntity​(java.lang.String type,
                            int position,
                            int number)
        Gets blocks of geometric entity number for the elements of a specific type.
        Parameters:
        type - Mesh type.
        position - Start index.
        number - Length of block.
        Returns:
        Vector of geometric entity numbers.
      • getGeomEntities

        int[] getGeomEntities​(java.lang.String type)
        Returns geometric entity indices for a certain mesh type.
        Parameters:
        type - Element type.
        Returns:
        Vector of geometric entity indices.
      • getMaxGrowthRate

        double getMaxGrowthRate()
        Retrieves the maximum growth rate in mesh.
        Returns:
        Maximum growth rate.
      • getMaxVolume

        double getMaxVolume()
        Returns the maximum element volume.
        Returns:
        Maximum element volume.
      • getMaxVolume

        double getMaxVolume​(java.lang.String type)
        Returns the maximum element volume of a certain element type.
        Parameters:
        type - element type.
        Returns:
        Maximum element volume.
      • getMeanGrowthRate

        double getMeanGrowthRate()
        Retrieves the mean growth rate in mesh.
        Returns:
        Mean growth rate.
      • getMeanQuality

        double getMeanQuality()
        Retrieves the mean quality in mesh.
        Returns:
        Mean quality.
      • getMeanQuality

        double getMeanQuality​(java.lang.String type)
        Retrieves the mean quality in mesh of a certain element type.
        Parameters:
        type - Element type.
        Returns:
        Mean quality.
      • getMinQuality

        double getMinQuality()
        Retrieves the minimal quality in mesh.
        Returns:
        Minimal quality.
      • getMinQuality

        double getMinQuality​(java.lang.String type)
        Retrieves the minimal quality in mesh of a certain element type.
        Parameters:
        type - Element type.
        Returns:
        Minimal quality.
      • getMinVolume

        double getMinVolume()
        Returns the minimum element volume.
        Returns:
        Minimum element volume.
      • getMinVolume

        double getMinVolume​(java.lang.String type)
        Returns the minimum element volume of a certain element type.
        Parameters:
        type - Element type.
        Returns:
        Minimum element volume.
      • getNumElem

        int getNumElem()
        Gets the number of elements in a mesh.
        Returns:
        Number of elements.
      • getNumElem

        int getNumElem​(java.lang.String type)
        Gets the number of elements of a certain mesh type.
        Parameters:
        type - Element type.
        Returns:
        Number of elements.
      • getNumVertex

        int getNumVertex()
        Gets number of mesh vertices.
        Returns:
        Number of mesh vertices.
      • getQualityDistr

        int[] getQualityDistr​(int size)
        Retrieves the quality distribution.
        Parameters:
        size - Number of quality distribution slice.
        Returns:
        Number of elements in each quality distribution slices.
      • getQualityDistr

        int[] getQualityDistr​(java.lang.String type,
                              int size)
        Retrieves the quality distribution of a certain element type.
        Parameters:
        type - Element type.
        size - Number of quality distribution slices.
        Returns:
        Number of elements in each quality distribution slices.
      • getSDim

        int getSDim()
        Gets space dimension of mesh.
        Returns:
        Space dimension.
      • getTypes

        java.lang.String[] getTypes()
        Returns the types in a mesh.
        Returns:
        Vector of mesh types.
      • getVertex

        double[][] getVertex()
        Gets the coordinates of the mesh vertices.
        Returns:
        Matrix where each column corresponds to a mesh vertex.
      • getVertex

        double[][] getVertex​(int position,
                             int number)
        Gets block of coordinates of the mesh vertices.
        Parameters:
        position - Start index.
        number - Length of block.
        Returns:
        Matrix where each column corresponds to a mesh vertex.
      • getVolume

        double getVolume()
        Gets the total mesh volume.
        Returns:
        Mesh volume.
      • getVolume

        double getVolume​(java.lang.String type)
        Gets the total mesh volume for a certain element type.
        Parameters:
        type - Element type.
        Returns:
        Mesh volume.
      • hasProblems

        boolean hasProblems()
        Returns true if sequence has problems.
        Returns:
        true if sequence has problems.
      • hasSecondOrderElements

        boolean hasSecondOrderElements()
        Returns true if the mesh has second order elements.
        Returns:
        true if the mesh has second order elements.
      • info

        GeomInfo info()
        Returns mesh information object.
        Returns:
        Mesh information object.
      • infoCurrent

        GeomInfo infoCurrent()
        Returns mesh information object for the current mesh of a import sequence.
        Returns:
        Mesh information object.
      • isAutomatic

        boolean isAutomatic()
        Checks if the sequence is in an automatic state.
        Returns:
        true if the sequence is in an automatic state.
      • isComplete

        boolean isComplete()
        Checks if the entire selected geometry has a mesh.
        Returns:
        true if the entire selected geometry has a mesh.
      • isEmpty

        boolean isEmpty()
        Checks if the mesh is empty.
        Returns:
        true if the mesh is empty.
      • problems

        java.lang.String[] problems()
        Return features with errors or warnings.
        Returns:
        Array with feature tags.
      • run

        void run()
        Builds all mesh features.
      • run

        void run​(java.lang.String fname)
        Builds named mesh feature.
        Parameters:
        fname - Mesh feature tag.
      • runCurrent

        void runCurrent()
        Builds the current mesh feature.
      • stat

        MeshStatistics stat()
        Returns mesh statistics object.
        Returns:
        Mesh statistics object.