# coding: utf-8

"""
    SimScale API

    The version of the OpenAPI document: 0.0.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from simscale_sdk.configuration import Configuration


class LDLTSolverV33(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'type': 'str',
        'force_symmetric': 'bool',
        'precision_singularity_detection': 'int',
        'stop_if_singular': 'bool'
    }

    attribute_map = {
        'type': 'type',
        'force_symmetric': 'forceSymmetric',
        'precision_singularity_detection': 'precisionSingularityDetection',
        'stop_if_singular': 'stopIfSingular'
    }

    def __init__(self, type='LDLT_V33', force_symmetric=None, precision_singularity_detection=None, stop_if_singular=None, local_vars_configuration=None):  # noqa: E501
        """LDLTSolverV33 - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._type = None
        self._force_symmetric = None
        self._precision_singularity_detection = None
        self._stop_if_singular = None
        self.discriminator = None

        self.type = type
        if force_symmetric is not None:
            self.force_symmetric = force_symmetric
        if precision_singularity_detection is not None:
            self.precision_singularity_detection = precision_singularity_detection
        if stop_if_singular is not None:
            self.stop_if_singular = stop_if_singular

    @property
    def type(self):
        """Gets the type of this LDLTSolverV33.  # noqa: E501

        <p>Choose a linear equation system solver for your calculation:</p><ul><li><p><b>Multfront</b> is a direct solver of the multifrontal type. It is easy to set up and behaves well for most problems.</p></ul><ul><li><p><b>MUMPS</b> is a general purpose direct solver of the multifrontal type. It provides a lot of parameter settings to allow the best fitting to your problems needs.</p></ul><ul><li><p><b>LDLT</b> is a direct solver which uses a Gaussian Algortihm. It is comparatively slow for big problems.</p></ul><ul><li><p><b>PETSC</b> is an iterative solver specially designed to deal with large systems. It scales very effectively in parallel and is the best choice for large problems.</p></ul><ul><li><p><b>GCPC</b> is an iterative solver of the pre-conditioned conjugate gradient type. It scales well in parallel and is also usable for large problems.</p></ul>  Schema name: LDLTSolverV33  # noqa: E501

        :return: The type of this LDLTSolverV33.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this LDLTSolverV33.

        <p>Choose a linear equation system solver for your calculation:</p><ul><li><p><b>Multfront</b> is a direct solver of the multifrontal type. It is easy to set up and behaves well for most problems.</p></ul><ul><li><p><b>MUMPS</b> is a general purpose direct solver of the multifrontal type. It provides a lot of parameter settings to allow the best fitting to your problems needs.</p></ul><ul><li><p><b>LDLT</b> is a direct solver which uses a Gaussian Algortihm. It is comparatively slow for big problems.</p></ul><ul><li><p><b>PETSC</b> is an iterative solver specially designed to deal with large systems. It scales very effectively in parallel and is the best choice for large problems.</p></ul><ul><li><p><b>GCPC</b> is an iterative solver of the pre-conditioned conjugate gradient type. It scales well in parallel and is also usable for large problems.</p></ul>  Schema name: LDLTSolverV33  # noqa: E501

        :param type: The type of this LDLTSolverV33.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and type is None:  # noqa: E501
            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501

        self._type = type

    @property
    def force_symmetric(self):
        """Gets the force_symmetric of this LDLTSolverV33.  # noqa: E501

        Choose if you want to enforce a symmetric matrix.  # noqa: E501

        :return: The force_symmetric of this LDLTSolverV33.  # noqa: E501
        :rtype: bool
        """
        return self._force_symmetric

    @force_symmetric.setter
    def force_symmetric(self, force_symmetric):
        """Sets the force_symmetric of this LDLTSolverV33.

        Choose if you want to enforce a symmetric matrix.  # noqa: E501

        :param force_symmetric: The force_symmetric of this LDLTSolverV33.  # noqa: E501
        :type: bool
        """

        self._force_symmetric = force_symmetric

    @property
    def precision_singularity_detection(self):
        """Gets the precision_singularity_detection of this LDLTSolverV33.  # noqa: E501

        Define the precision value for the detection of a singular matrix.  # noqa: E501

        :return: The precision_singularity_detection of this LDLTSolverV33.  # noqa: E501
        :rtype: int
        """
        return self._precision_singularity_detection

    @precision_singularity_detection.setter
    def precision_singularity_detection(self, precision_singularity_detection):
        """Sets the precision_singularity_detection of this LDLTSolverV33.

        Define the precision value for the detection of a singular matrix.  # noqa: E501

        :param precision_singularity_detection: The precision_singularity_detection of this LDLTSolverV33.  # noqa: E501
        :type: int
        """

        self._precision_singularity_detection = precision_singularity_detection

    @property
    def stop_if_singular(self):
        """Gets the stop_if_singular of this LDLTSolverV33.  # noqa: E501

        Choose if the calculation should be stopped if the problem turns out to be singular.  # noqa: E501

        :return: The stop_if_singular of this LDLTSolverV33.  # noqa: E501
        :rtype: bool
        """
        return self._stop_if_singular

    @stop_if_singular.setter
    def stop_if_singular(self, stop_if_singular):
        """Sets the stop_if_singular of this LDLTSolverV33.

        Choose if the calculation should be stopped if the problem turns out to be singular.  # noqa: E501

        :param stop_if_singular: The stop_if_singular of this LDLTSolverV33.  # noqa: E501
        :type: bool
        """

        self._stop_if_singular = stop_if_singular

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, LDLTSolverV33):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, LDLTSolverV33):
            return True

        return self.to_dict() != other.to_dict()

# coding: utf-8

"""
    SimScale API

    The version of the OpenAPI document: 0.0.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from simscale_sdk.configuration import Configuration


class LDLTSolverV33(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'type': 'str',
        'force_symmetric': 'bool',
        'precision_singularity_detection': 'int',
        'stop_if_singular': 'bool'
    }

    attribute_map = {
        'type': 'type',
        'force_symmetric': 'forceSymmetric',
        'precision_singularity_detection': 'precisionSingularityDetection',
        'stop_if_singular': 'stopIfSingular'
    }

    def __init__(self, type='LDLT_V33', force_symmetric=None, precision_singularity_detection=None, stop_if_singular=None, local_vars_configuration=None):  # noqa: E501
        """LDLTSolverV33 - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._type = None
        self._force_symmetric = None
        self._precision_singularity_detection = None
        self._stop_if_singular = None
        self.discriminator = None

        self.type = type
        if force_symmetric is not None:
            self.force_symmetric = force_symmetric
        if precision_singularity_detection is not None:
            self.precision_singularity_detection = precision_singularity_detection
        if stop_if_singular is not None:
            self.stop_if_singular = stop_if_singular

    @property
    def type(self):
        """Gets the type of this LDLTSolverV33.  # noqa: E501

        <p>Choose a linear equation system solver for your calculation:</p><ul><li><p><b>Multfront</b> is a direct solver of the multifrontal type. It is easy to set up and behaves well for most problems.</p></ul><ul><li><p><b>MUMPS</b> is a general purpose direct solver of the multifrontal type. It provides a lot of parameter settings to allow the best fitting to your problems needs.</p></ul><ul><li><p><b>LDLT</b> is a direct solver which uses a Gaussian Algortihm. It is comparatively slow for big problems.</p></ul><ul><li><p><b>PETSC</b> is an iterative solver specially designed to deal with large systems. It scales very effectively in parallel and is the best choice for large problems.</p></ul><ul><li><p><b>GCPC</b> is an iterative solver of the pre-conditioned conjugate gradient type. It scales well in parallel and is also usable for large problems.</p></ul>  Schema name: LDLTSolverV33  # noqa: E501

        :return: The type of this LDLTSolverV33.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this LDLTSolverV33.

        <p>Choose a linear equation system solver for your calculation:</p><ul><li><p><b>Multfront</b> is a direct solver of the multifrontal type. It is easy to set up and behaves well for most problems.</p></ul><ul><li><p><b>MUMPS</b> is a general purpose direct solver of the multifrontal type. It provides a lot of parameter settings to allow the best fitting to your problems needs.</p></ul><ul><li><p><b>LDLT</b> is a direct solver which uses a Gaussian Algortihm. It is comparatively slow for big problems.</p></ul><ul><li><p><b>PETSC</b> is an iterative solver specially designed to deal with large systems. It scales very effectively in parallel and is the best choice for large problems.</p></ul><ul><li><p><b>GCPC</b> is an iterative solver of the pre-conditioned conjugate gradient type. It scales well in parallel and is also usable for large problems.</p></ul>  Schema name: LDLTSolverV33  # noqa: E501

        :param type: The type of this LDLTSolverV33.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and type is None:  # noqa: E501
            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501

        self._type = type

    @property
    def force_symmetric(self):
        """Gets the force_symmetric of this LDLTSolverV33.  # noqa: E501

        Choose if you want to enforce a symmetric matrix.  # noqa: E501

        :return: The force_symmetric of this LDLTSolverV33.  # noqa: E501
        :rtype: bool
        """
        return self._force_symmetric

    @force_symmetric.setter
    def force_symmetric(self, force_symmetric):
        """Sets the force_symmetric of this LDLTSolverV33.

        Choose if you want to enforce a symmetric matrix.  # noqa: E501

        :param force_symmetric: The force_symmetric of this LDLTSolverV33.  # noqa: E501
        :type: bool
        """

        self._force_symmetric = force_symmetric

    @property
    def precision_singularity_detection(self):
        """Gets the precision_singularity_detection of this LDLTSolverV33.  # noqa: E501

        Define the precision value for the detection of a singular matrix.  # noqa: E501

        :return: The precision_singularity_detection of this LDLTSolverV33.  # noqa: E501
        :rtype: int
        """
        return self._precision_singularity_detection

    @precision_singularity_detection.setter
    def precision_singularity_detection(self, precision_singularity_detection):
        """Sets the precision_singularity_detection of this LDLTSolverV33.

        Define the precision value for the detection of a singular matrix.  # noqa: E501

        :param precision_singularity_detection: The precision_singularity_detection of this LDLTSolverV33.  # noqa: E501
        :type: int
        """

        self._precision_singularity_detection = precision_singularity_detection

    @property
    def stop_if_singular(self):
        """Gets the stop_if_singular of this LDLTSolverV33.  # noqa: E501

        Choose if the calculation should be stopped if the problem turns out to be singular.  # noqa: E501

        :return: The stop_if_singular of this LDLTSolverV33.  # noqa: E501
        :rtype: bool
        """
        return self._stop_if_singular

    @stop_if_singular.setter
    def stop_if_singular(self, stop_if_singular):
        """Sets the stop_if_singular of this LDLTSolverV33.

        Choose if the calculation should be stopped if the problem turns out to be singular.  # noqa: E501

        :param stop_if_singular: The stop_if_singular of this LDLTSolverV33.  # noqa: E501
        :type: bool
        """

        self._stop_if_singular = stop_if_singular

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, LDLTSolverV33):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, LDLTSolverV33):
            return True

        return self.to_dict() != other.to_dict()

# coding: utf-8 SimScale API      The version of the OpenAPI document: 0.0.0     Generated by: https://openapi-generator.tech # noqa: F401 NOTE: This class is auto generated by OpenAPI Generator.     Ref: https://openapi-generator.tech      Do not edit the class manually. Attributes:       openapi_types (dict): The key is attribute name                             and the value is attribute type.       attribute_map (dict): The key is attribute name                             and the value is json key in definition. # noqa: E501 LDLTSolverV33 - a model defined in OpenAPI # noqa: E501 Gets the type of this LDLTSolverV33.  # noqa: E501          <p>Choose a linear equation system solver for your calculation:</p><ul><li><p><b>Multfront</b> is a direct solver of the multifrontal type. It is easy to set up and behaves well for most problems.</p></ul><ul><li><p><b>MUMPS</b> is a general purpose direct solver of the multifrontal type. It provides a lot of parameter settings to allow the best fitting to your problems needs.</p></ul><ul><li><p><b>LDLT</b> is a direct solver which uses a Gaussian Algortihm. It is comparatively slow for big problems.</p></ul><ul><li><p><b>PETSC</b> is an iterative solver specially designed to deal with large systems. It scales very effectively in parallel and is the best choice for large problems.</p></ul><ul><li><p><b>GCPC</b> is an iterative solver of the pre-conditioned conjugate gradient type. It scales well in parallel and is also usable for large problems.</p></ul>  Schema name: LDLTSolverV33  # noqa: E501          :return: The type of this LDLTSolverV33.  # noqa: E501         :rtype: str Sets the type of this LDLTSolverV33.          <p>Choose a linear equation system solver for your calculation:</p><ul><li><p><b>Multfront</b> is a direct solver of the multifrontal type. It is easy to set up and behaves well for most problems.</p></ul><ul><li><p><b>MUMPS</b> is a general purpose direct solver of the multifrontal type. It provides a lot of parameter settings to allow the best fitting to your problems needs.</p></ul><ul><li><p><b>LDLT</b> is a direct solver which uses a Gaussian Algortihm. It is comparatively slow for big problems.</p></ul><ul><li><p><b>PETSC</b> is an iterative solver specially designed to deal with large systems. It scales very effectively in parallel and is the best choice for large problems.</p></ul><ul><li><p><b>GCPC</b> is an iterative solver of the pre-conditioned conjugate gradient type. It scales well in parallel and is also usable for large problems.</p></ul>  Schema name: LDLTSolverV33  # noqa: E501          :param type: The type of this LDLTSolverV33.  # noqa: E501         :type: str # noqa: E501 # noqa: E501 Gets the force_symmetric of this LDLTSolverV33.  # noqa: E501          Choose if you want to enforce a symmetric matrix.  # noqa: E501          :return: The force_symmetric of this LDLTSolverV33.  # noqa: E501         :rtype: bool Sets the force_symmetric of this LDLTSolverV33.          Choose if you want to enforce a symmetric matrix.  # noqa: E501          :param force_symmetric: The force_symmetric of this LDLTSolverV33.  # noqa: E501         :type: bool Gets the precision_singularity_detection of this LDLTSolverV33.  # noqa: E501          Define the precision value for the detection of a singular matrix.  # noqa: E501          :return: The precision_singularity_detection of this LDLTSolverV33.  # noqa: E501         :rtype: int Sets the precision_singularity_detection of this LDLTSolverV33.          Define the precision value for the detection of a singular matrix.  # noqa: E501          :param precision_singularity_detection: The precision_singularity_detection of this LDLTSolverV33.  # noqa: E501         :type: int Gets the stop_if_singular of this LDLTSolverV33.  # noqa: E501          Choose if the calculation should be stopped if the problem turns out to be singular.  # noqa: E501          :return: The stop_if_singular of this LDLTSolverV33.  # noqa: E501         :rtype: bool Sets the stop_if_singular of this LDLTSolverV33.          Choose if the calculation should be stopped if the problem turns out to be singular.  # noqa: E501          :param stop_if_singular: The stop_if_singular of this LDLTSolverV33.  # noqa: E501         :type: bool Returns the model properties as a dict Returns the string representation of the model For `print` and `pprint` Returns true if both objects are equal Returns true if both objects are not equal