<commit_before>import numpy as np
from openpnm.io import GenericIO


class COMSOL(GenericIO):
    r"""
    Writes files containing pores and throats of the considered network in a
    COMSOL object format.

    Notes
    -----
    The exported files contain COMSOL geometry objects, not meshes.
    This class exports in 2D only.

    """
    @classmethod
    def save(cls, network, phases=[], filename=''):
        r"""
        Saves the network and geometry data from the given objects into the
        specified file. This exports in 2D only where throats and pores have
        rectangular and circular shapes, respectively.

        Parameters
        ----------
        network : OpenPNM Network Object
            The network containing the desired data

        phases : list of OpenPNM Phase Objects (optional, default is none)

        Notes
        -----
        This method only saves the network and geometry data, not any of the
        pore-scale models or other attributes.  To save an actual OpenPNM
        Project use the ``Workspace`` object.

        """
        project, network, phases = cls._parse_args(network=network,
                                                   phases=phases)<commit_msg>updating comsol class<commit_after>import numpy as np
from openpnm.io import GenericIO


class COMSOL(GenericIO):
    r"""
    Writes a file containing pores and throats of the network in a format that
    can be opened in COMSOL.

    Notes
    -----
    - The exported files contain COMSOL geometry objects, not meshes.
    - This class exports in 2D only.

    """
    @classmethod
    def save(cls, *args, **kwargs):
        r"""
        This method is being deprecated.  Use ``export`` instead.
        """
        cls.export(*args, **kwargs)

    @classmethod
    def export(cls, network, phases=[], filename=''):
        r"""
        Saves the network and geometry data from the given objects into the
        specified file. This exports in 2D only where throats and pores have
        rectangular and circular shapes, respectively.

        Parameters
        ----------
        network : OpenPNM Network Object
            The network containing the desired data

        phases : list of OpenPNM Phase Objects (optional, default is none)

        Notes
        -----
        This method only saves the network and geometry data, not any of the
        pore-scale models or other attributes.  To save an actual OpenPNM
        Project use the ``Workspace`` object.

        """
        project, network, phases = cls._parse_args(network=network,
                                                   phases=phases)
{'fraction_non_alphanumeric': 0.07267221801665405, 'fraction_numerical': 0.001514004542013626, 'mean_word_length': 2.0136830102622576, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6160097', 'n_tokens_mistral': 650, 'n_tokens_neox': 620, 'n_words': 287}