# SPDX-License-Identifier: AGPL-3.0-or-later
# Copyright 2024-2025 Max-Planck-Institut für Nachhaltige Materialien GmbH
# Copyright 2011-2024 Max-Planck-Institut für Eisenforschung GmbH
#
# DAMASK is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
"""
Pre- and Post-Processing of DAMASK Simulations.

References
----------
D. Otto de Mentock et al., Journal of Open Source Software, 10(105):7164, 2025
https://doi.org/10.21105/joss.07164
"""

import logging as _logging
from pathlib import Path as _Path

_logging.basicConfig(level=_logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')

name = 'damask'
with open(_Path(__file__).parent/'VERSION') as _f:
    version = _f.readline().strip().removeprefix('v')
    __version__ = version

from .                 import _typehints       # noqa
from .                 import util             # noqa
from .                 import seeds            # noqa
from .                 import tensor           # noqa
from .                 import mechanics        # noqa
from .                 import solver           # noqa
from .                 import grid_filters     # noqa
# Modules that contain only one class (of the same name), are prefixed by a '_'.
# For example, '_colormap' contains a class called 'Colormap' which is imported as 'damask.Colormap'.
from ._rotation        import Rotation         # noqa
from ._crystal         import Crystal          # noqa
from ._orientation     import Orientation      # noqa
from ._table           import Table            # noqa
from ._colormap        import Colormap         # noqa
from ._vtk             import VTK              # noqa
from ._yaml            import YAML             # noqa
from ._configmaterial  import ConfigMaterial   # noqa
from ._loadcasegrid    import LoadcaseGrid     # noqa
from ._loadcasemesh    import LoadcaseMesh     # noqa
from ._geomgrid        import GeomGrid         # noqa
from ._result          import Result           # noqa
