diff --git a/MaterialLib/SolidModels/MFront/TangentOperatorBlocksView.h b/MaterialLib/SolidModels/MFront/TangentOperatorBlocksView.h index fce7b50ba1da636deb8201984f0738c2625887ec..3b1f625ad2bd6e141199bd5f90885b1f229e0661 100644 --- a/MaterialLib/SolidModels/MFront/TangentOperatorBlocksView.h +++ b/MaterialLib/SolidModels/MFront/TangentOperatorBlocksView.h @@ -223,9 +223,22 @@ private: return DisplacementDim; case VT::TENSOR: return MaterialPropertyLib::tensorSize(DisplacementDim); + case VT::VECTOR_1D: + case VT::VECTOR_2D: + case VT::VECTOR_3D: + case VT::STENSOR_1D: + case VT::STENSOR_2D: + case VT::STENSOR_3D: + case VT::TENSOR_1D: + case VT::TENSOR_2D: + case VT::TENSOR_3D: + case VT::HIGHER_ORDER_TENSOR: + case VT::ARRAY: + break; // Unsupported variable types } - OGS_FATAL("Unsupported variable type {}", BaseLib::to_underlying(vt)); + OGS_FATAL("Unsupported MGIS variable type {}.", + BaseLib::to_underlying(vt)); } /// Computes the index of a tangent operator block in the #offsets_ array. diff --git a/MaterialLib/SolidModels/MFront/Variable.h b/MaterialLib/SolidModels/MFront/Variable.h index fb76d42d525a3499c2ea0cb481544eb8c6211f84..2abb67319b6973f9272205d1890ad3f1cdd4142b 100644 --- a/MaterialLib/SolidModels/MFront/Variable.h +++ b/MaterialLib/SolidModels/MFront/Variable.h @@ -12,6 +12,7 @@ #include <MGIS/Behaviour/Variable.hxx> +#include "BaseLib/cpp23.h" #include "MaterialLib/MPL/Utils/Tensor.h" #include "MaterialLib/MPL/VariableType.h" #include "MathLib/KelvinVector.h" @@ -38,6 +39,7 @@ struct Variable static constexpr std::size_t rows() { using T = mgis::behaviour::Variable::Type; + switch (Derived::type) { case T::SCALAR: @@ -49,6 +51,19 @@ struct Variable DisplacementDim); case T::TENSOR: return MaterialPropertyLib::tensorSize(DisplacementDim); + case T::VECTOR_1D: + case T::VECTOR_2D: + case T::VECTOR_3D: + case T::STENSOR_1D: + case T::STENSOR_2D: + case T::STENSOR_3D: + case T::TENSOR_1D: + case T::TENSOR_2D: + case T::TENSOR_3D: + case T::HIGHER_ORDER_TENSOR: + case T::ARRAY: + OGS_FATAL("Unsupported MGIS variable type {}.", + BaseLib::to_underlying(Derived::type)); } } @@ -67,6 +82,19 @@ struct Variable return 1; case T::TENSOR: return 1; + case T::VECTOR_1D: + case T::VECTOR_2D: + case T::VECTOR_3D: + case T::STENSOR_1D: + case T::STENSOR_2D: + case T::STENSOR_3D: + case T::TENSOR_1D: + case T::TENSOR_2D: + case T::TENSOR_3D: + case T::HIGHER_ORDER_TENSOR: + case T::ARRAY: + OGS_FATAL("Unsupported MGIS variable type {}.", + BaseLib::to_underlying(Derived::type)); } } }; diff --git a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.cpp b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.cpp index 75e3a352b23477f8f5522905b4333ead2f671519..73a8545a85d15f8239f7366134c831aa4cf8d4c4 100644 --- a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.cpp +++ b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.cpp @@ -132,7 +132,7 @@ bool TwoPhaseFlowWithPrhoMaterialProperties::computeConstitutiveRelation( // TODO Make the following choice of maximum iterations and convergence // criteria available from the input file configuration. See Ehlers // material model implementation for the example. - const int maximum_iterations(20); + const int maximum_iterations(100); const double residuum_tolerance(1.e-14); const double increment_tolerance(0); diff --git a/Tests/Data/HydroMechanics/Linear/Confined_Compression/square_1e2_quad9.prj b/Tests/Data/HydroMechanics/Linear/Confined_Compression/square_1e2_quad9.prj index a57765a011fd75a4ec4fff3d92f288b2e6a78d5d..29a273d83d2a3f509d90bbfe74087670bf005865 100644 --- a/Tests/Data/HydroMechanics/Linear/Confined_Compression/square_1e2_quad9.prj +++ b/Tests/Data/HydroMechanics/Linear/Confined_Compression/square_1e2_quad9.prj @@ -237,10 +237,8 @@ <name>general_linear_solver</name> <lis>-i bicgstab -p ilu -tol 1e-16 -maxiter 10000</lis> <eigen> - <solver_type>BiCGSTAB</solver_type> - <precon_type>DIAGONAL</precon_type> - <max_iteration_step>10000</max_iteration_step> - <error_tolerance>1e-16</error_tolerance> + <solver_type>SparseLU</solver_type> + <scaling>true</scaling> </eigen> </linear_solver> </linear_solvers> diff --git a/Tests/Data/Mechanics/HoekBrown/HoekBrownYieldCriterion.py b/Tests/Data/Mechanics/HoekBrown/HoekBrownYieldCriterion.py index 718a14adfd0325d5bc729babd6e336a7558b4fdb..a19fc7c97dee3e1d31a9e2e846a6bb242512b3a9 100644 --- a/Tests/Data/Mechanics/HoekBrown/HoekBrownYieldCriterion.py +++ b/Tests/Data/Mechanics/HoekBrown/HoekBrownYieldCriterion.py @@ -125,6 +125,9 @@ import mtest import numpy as np import ogstools as ot import pandas as pd + +# required for tfel::math::vector conversions +import tfel.math # noqa: F401 import vtuIO from IPython.display import Markdown, display from matplotlib.ticker import MultipleLocator diff --git a/scripts/ci/jobs/code-quality.yml b/scripts/ci/jobs/code-quality.yml index eaca24610396fef00abbb5026566ae26418643f2..6c231881f11f8c5536e700a33f5442c6d1623411 100644 --- a/scripts/ci/jobs/code-quality.yml +++ b/scripts/ci/jobs/code-quality.yml @@ -1,7 +1,7 @@ cppcheck: stage: check needs: [meta] - tags: [envinf] + tags: [envinf, shell] before_script: - mkdir -p build - cd build @@ -19,7 +19,7 @@ cppcheck: ruff: stage: check needs: [] - tags: [envinf] + tags: [envinf, shell] script: - pipx run ruff check --exit-zero . - pipx run ruff check --exit-zero --output-format gitlab . > ruff-report.json diff --git a/scripts/cmake/Dependencies.cmake b/scripts/cmake/Dependencies.cmake index 95dec2790a92903f254760aa19ac65ab34d8edd2..5745aee38f33b8e3ec89c546257b60fd8808d143 100644 --- a/scripts/cmake/Dependencies.cmake +++ b/scripts/cmake/Dependencies.cmake @@ -182,7 +182,7 @@ if(OGS_USE_MFRONT) CPMAddPackage( NAME MGIS GITHUB_REPOSITORY thelfer/MFrontGenericInterfaceSupport - GIT_TAG rliv-2.0 + GIT_TAG rliv-2.2 OPTIONS "enable-doxygen-doc OFF" "enable-fortran-bindings OFF" "enable-website OFF" EXCLUDE_FROM_ALL YES SYSTEM TRUE ${_mgis_patch_args} diff --git a/web/data/versions.json b/web/data/versions.json index b69befea1a8df278ec53abfa90cf2f9505470fee..e245ec51160b06fa34af47f3e9195b4094cdb2b3 100644 --- a/web/data/versions.json +++ b/web/data/versions.json @@ -21,7 +21,7 @@ "python": "3.9", "hdf5": "1.10.7", "libxml2": "2.9.12", - "tfel-rliv": "4.0", + "tfel-rliv": "4.2", "tfel-repo": "thelfer", "lis": "1.7.37", "gtest": "1.13.0",