├── .clang-format ├── .clang-tidy ├── .codechecker ├── .gitattributes ├── .github └── workflows │ ├── build_docs.yml │ ├── close_pr.yml │ ├── cmake_integration.yml │ ├── copyright.yml │ ├── cpp.yml │ └── python.yml ├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── CMakePresets.json ├── LICENSE ├── README.md ├── cmake ├── .gitignore ├── Modules │ ├── DetectTorchCXXABI.cxx │ ├── DownloadArgparse.cmake │ ├── DownloadCatch2.cmake │ ├── DownloadDoxygen.cmake │ ├── DownloadGperftools.cmake │ ├── DownloadHIT.cmake │ ├── DownloadTIMPI.cmake │ ├── DownloadTorch.cmake │ ├── DownloadWASP.cmake │ ├── FindCatch2.cmake │ ├── FindGperftools.cmake │ ├── FindHIT.cmake │ ├── FindTIMPI.cmake │ ├── FindTorch.cmake │ ├── FindWASP.cmake │ ├── InstallGperftools.sh.in │ ├── InstallHIT.cmake.in │ ├── InstallTIMPI.sh.in │ └── InstallWASP.sh.in └── subproject │ ├── CMakeLists.txt │ └── main.cxx ├── doc ├── .gitignore ├── CMakeLists.txt ├── config │ ├── Doxyfile.in │ ├── DoxygenLayout.xml │ ├── DoxygenLayoutPython.xml │ ├── HTML.in │ ├── Python.in │ ├── custom.css │ ├── header.html │ └── mathjax.js ├── content │ ├── asset │ │ ├── cover_min.png │ │ ├── graph_basic.svg │ │ ├── graph_composed.svg │ │ ├── graph_custom.svg │ │ ├── graph_highlight.svg │ │ ├── lsi_rve_simplify.svg │ │ └── perfetto.png │ ├── installation │ │ ├── customization.md │ │ ├── deps.md │ │ ├── install.md │ │ └── integration.md │ ├── physics │ │ ├── reactive_infiltration.md │ │ └── solid_mechanics.md │ └── system │ │ ├── data.md │ │ ├── driver.md │ │ ├── model.md │ │ ├── scheduler.md │ │ ├── settings.md │ │ ├── solver.md │ │ └── tensor.md ├── js │ ├── .gitignore │ ├── components │ │ ├── simple-scheduler-demo.js │ │ ├── static-hybrid-scheduler-demo.js │ │ ├── static-hybrid-scheduler.js │ │ └── work-dispatcher.js │ └── package.json ├── requirements.txt ├── syntax.cxx └── tutorials │ ├── contributing.md │ ├── extension │ ├── argument_declaration │ │ ├── input.i │ │ ├── main.md │ │ └── src1.cxx │ ├── connection_to_input_files │ │ ├── input.i │ │ └── main.md │ ├── extension.md │ ├── model_composition │ │ ├── input.i │ │ ├── main.md │ │ └── src1.cxx │ ├── model_visualization │ │ └── main.md │ └── the_forward_operator │ │ ├── input.i │ │ ├── main.md │ │ └── src1.cxx │ ├── getting_started.md │ ├── models │ ├── evaluation_device │ │ ├── input.i │ │ └── main.md │ ├── implicit_model │ │ ├── input1.i │ │ ├── input2.i │ │ └── main.md │ ├── input_file.md │ ├── just_in_time_compilation │ │ ├── input.i │ │ └── main.md │ ├── model_composition │ │ ├── input.i │ │ ├── input_composed.i │ │ └── main.md │ ├── model_parameters │ │ ├── input.i │ │ └── main.md │ ├── model_parameters_revisited │ │ ├── input1.i │ │ ├── input2.i │ │ ├── input3.i │ │ ├── input4.i │ │ └── main.md │ ├── models.md │ ├── running_your_first_model │ │ ├── input.i │ │ └── main.md │ ├── transient_driver │ │ ├── input.i │ │ └── main.md │ └── vectorization │ │ ├── input.i │ │ └── main.md │ ├── next_steps.md │ ├── optimization │ ├── automatic_differentiation │ │ ├── input.i │ │ └── main.md │ ├── optimization.md │ └── parameter_calibration │ │ ├── input.i │ │ └── main.md │ ├── tensors │ ├── broadcasting │ │ └── main.md │ ├── indexing │ │ └── main.md │ ├── tensor_creation │ │ └── main.md │ ├── tensor_types │ │ └── main.md │ ├── tensor_view │ │ └── main.md │ └── tensors.md │ └── tutorials.md ├── include └── neml2 │ ├── base │ ├── DiagnosticsInterface.h │ ├── EnumSelection.h │ ├── EnumSelectionBase.h │ ├── Factory.h │ ├── HITParser.h │ ├── LabeledAxis.h │ ├── LabeledAxisAccessor.h │ ├── MultiEnumSelection.h │ ├── NEML2Object.h │ ├── Option.h │ ├── OptionBase.h │ ├── OptionCollection.h │ ├── OptionSet.h │ ├── Parser.h │ ├── Registry.h │ ├── Settings.h │ ├── TensorName.h │ ├── TracingInterface.h │ └── guards.h │ ├── dispatchers │ ├── FixedSizeWorkGenerator.h │ ├── SimpleMPIScheduler.h │ ├── SimpleScheduler.h │ ├── SliceGenerator.h │ ├── StaticHybridScheduler.h │ ├── TensorLoader.h │ ├── ValueMapLoader.h │ ├── WorkDispatcher.h │ ├── WorkGenerator.h │ ├── WorkScheduler.h │ ├── derivmap_helpers.h │ └── valuemap_helpers.h │ ├── drivers │ ├── Driver.h │ ├── ModelDriver.h │ ├── TransientDriver.h │ └── solid_mechanics │ │ ├── LDISolidMechanicsDriver.h │ │ ├── SDTSolidMechanicsDriver.h │ │ └── SolidMechanicsDriver.h │ ├── jit │ ├── TraceableSize.h │ ├── TraceableTensorShape.h │ ├── types.h │ └── utils.h │ ├── misc │ ├── assertions.h │ ├── defaults.h │ ├── errors.h │ ├── string_utils.h │ └── types.h │ ├── models │ ├── ArrheniusParameter.h │ ├── Assembler.h │ ├── BackwardEulerTimeIntegration.h │ ├── BufferStore.h │ ├── ComposedModel.h │ ├── ConstantParameter.h │ ├── CopyVariable.h │ ├── Data.h │ ├── DependencyDefinition.h │ ├── DependencyResolver.h │ ├── FischerBurmeister.h │ ├── ForwardEulerTimeIntegration.h │ ├── HermiteSmoothStep.h │ ├── ImplicitUpdate.h │ ├── IncrementToRate.h │ ├── InputParameter.h │ ├── Interpolation.h │ ├── LinearCombination.h │ ├── LinearInterpolation.h │ ├── Model.h │ ├── NonlinearParameter.h │ ├── ParameterStore.h │ ├── R2Multiplication.h │ ├── R2toSR2.h │ ├── R2toWR2.h │ ├── RotationMatrix.h │ ├── SR2Invariant.h │ ├── SR2toR2.h │ ├── ScalarMultiplication.h │ ├── Variable.h │ ├── VariableRate.h │ ├── VariableStore.h │ ├── WR2ExplicitExponentialTimeIntegration.h │ ├── WR2ImplicitExponentialTimeIntegration.h │ ├── crystallography │ │ ├── CrystalGeometry.h │ │ └── CubicCrystal.h │ ├── map_types.h │ ├── map_types_fwd.h │ ├── phase_field_fracture │ │ ├── CrackGeometricFunction.h │ │ ├── CrackGeometricFunctionAT1.h │ │ ├── CrackGeometricFunctionAT2.h │ │ ├── DegradationFunction.h │ │ ├── LinearIsotropicStrainEnergyDensity.h │ │ ├── PowerDegradationFunction.h │ │ └── StrainEnergyDensity.h │ ├── pyrolysis │ │ ├── AvramiErofeevNucleation.h │ │ ├── ChemicalReactionMechanism.h │ │ ├── PyrolysisConversionAmount.h │ │ ├── PyrolysisKinetics.h │ │ └── ReactionMechanism.h │ ├── reactive_infiltration │ │ ├── DiffusionLimitedReaction.h │ │ └── ProductGeometry.h │ └── solid_mechanics │ │ ├── AssociativeIsotropicPlasticHardening.h │ │ ├── AssociativeJ2FlowDirection.h │ │ ├── AssociativeKinematicPlasticHardening.h │ │ ├── AssociativePlasticFlow.h │ │ ├── ChabochePlasticHardening.h │ │ ├── Eigenstrain.h │ │ ├── FlowRule.h │ │ ├── FredrickArmstrongPlasticHardening.h │ │ ├── GTNYieldFunction.h │ │ ├── GursonCavitation.h │ │ ├── IsotropicHardening.h │ │ ├── IsotropicHardeningStaticRecovery.h │ │ ├── IsotropicMandelStress.h │ │ ├── KinematicHardening.h │ │ ├── KinematicHardeningStaticRecovery.h │ │ ├── KocksMeckingActivationEnergy.h │ │ ├── KocksMeckingFlowSwitch.h │ │ ├── KocksMeckingFlowViscosity.h │ │ ├── KocksMeckingIntercept.h │ │ ├── KocksMeckingRateSensitivity.h │ │ ├── KocksMeckingYieldStress.h │ │ ├── LinearIsotropicElasticJ2TrialStressUpdate.h │ │ ├── LinearIsotropicHardening.h │ │ ├── LinearKinematicHardening.h │ │ ├── MandelStress.h │ │ ├── MixedControlSetup.h │ │ ├── Normality.h │ │ ├── OlevskySinteringStress.h │ │ ├── PerzynaPlasticFlowRate.h │ │ ├── PhaseTransformationEigenstrain.h │ │ ├── PlasticFlowRate.h │ │ ├── PowerLawIsotropicHardeningStaticRecovery.h │ │ ├── PowerLawKinematicHardeningStaticRecovery.h │ │ ├── RateIndependentPlasticFlowConstraint.h │ │ ├── SlopeSaturationVoceIsotropicHardening.h │ │ ├── ThermalEigenstrain.h │ │ ├── TwoStageThermalAnnealing.h │ │ ├── VoceIsotropicHardening.h │ │ ├── VolumeChangeEigenstrain.h │ │ ├── YieldFunction.h │ │ ├── crystal_plasticity │ │ ├── CrystalMean.h │ │ ├── ElasticStrainRate.h │ │ ├── FixOrientation.h │ │ ├── LinearSingleSlipHardeningRule.h │ │ ├── OrientationRate.h │ │ ├── PlasticDeformationRate.h │ │ ├── PlasticSpatialVelocityGradient.h │ │ ├── PlasticVorticity.h │ │ ├── PowerLawSlipRule.h │ │ ├── ResolvedShear.h │ │ ├── SingleSlipHardeningRule.h │ │ ├── SingleSlipStrengthMap.h │ │ ├── SlipRule.h │ │ ├── SlipStrengthMap.h │ │ ├── SumSlipRates.h │ │ └── VoceSingleSlipHardeningRule.h │ │ └── elasticity │ │ ├── AnisotropicElasticity.h │ │ ├── CubicElasticityConverter.h │ │ ├── CubicElasticityTensor.h │ │ ├── Elasticity.h │ │ ├── ElasticityConverter.h │ │ ├── ElasticityInterface.h │ │ ├── GeneralElasticity.h │ │ ├── GreenLagrangeStrain.h │ │ ├── IsotropicElasticityConverter.h │ │ ├── IsotropicElasticityTensor.h │ │ └── LinearIsotropicElasticity.h │ ├── solvers │ ├── Newton.h │ ├── NewtonWithLineSearch.h │ ├── NewtonWithTrustRegion.h │ ├── NonlinearSolver.h │ ├── NonlinearSystem.h │ ├── Solver.h │ └── TrustRegionSubProblem.h │ ├── tensors │ ├── MillerIndex.h │ ├── PrimitiveTensor.h │ ├── Quaternion.h │ ├── R2.h │ ├── R2Base.h │ ├── R3.h │ ├── R4.h │ ├── R5.h │ ├── R8.h │ ├── Rot.h │ ├── SFFR4.h │ ├── SFR3.h │ ├── SFR4.h │ ├── SR2.h │ ├── SSFR5.h │ ├── SSR4.h │ ├── SSSSR8.h │ ├── SWR4.h │ ├── Scalar.h │ ├── Tensor.h │ ├── TensorBase.h │ ├── TensorBaseImpl.h │ ├── TensorCache.h │ ├── TensorValue.h │ ├── Transformable.h │ ├── Vec.h │ ├── VecBase.h │ ├── WFR4.h │ ├── WR2.h │ ├── WSR4.h │ ├── WWR4.h │ ├── assertions.h │ ├── crystallography.h │ ├── functions │ │ ├── abs.h │ │ ├── acos.h │ │ ├── asin.h │ │ ├── atan.h │ │ ├── bmm.h │ │ ├── bmv.h │ │ ├── bvv.h │ │ ├── cat.h │ │ ├── cbrt.h │ │ ├── clamp.h │ │ ├── clip.h │ │ ├── cos.h │ │ ├── cosh.h │ │ ├── deg2rad.h │ │ ├── diag_embed.h │ │ ├── diff.h │ │ ├── discretization │ │ │ ├── assemble.h │ │ │ ├── interpolate.h │ │ │ └── scatter.h │ │ ├── exp.h │ │ ├── fmod.h │ │ ├── gcd.h │ │ ├── heaviside.h │ │ ├── jacrev.h │ │ ├── linalg │ │ │ ├── cross.h │ │ │ ├── inv.h │ │ │ ├── lu_factor.h │ │ │ ├── lu_solve.h │ │ │ ├── outer.h │ │ │ ├── solve.h │ │ │ ├── vecdot.h │ │ │ └── vector_norm.h │ │ ├── log.h │ │ ├── log10.h │ │ ├── macaulay.h │ │ ├── mean.h │ │ ├── minimum.h │ │ ├── operators.h │ │ ├── pow.h │ │ ├── sign.h │ │ ├── sin.h │ │ ├── sinh.h │ │ ├── sqrt.h │ │ ├── stack.h │ │ ├── sum.h │ │ ├── tan.h │ │ ├── tanh.h │ │ └── where.h │ ├── indexing.h │ ├── list_tensors.h │ ├── macros.h │ ├── mandel_notation.h │ ├── shape_utils.h │ ├── tensors.h │ └── tensors_fwd.h │ └── user_tensors │ ├── EmptyPrimitiveTensor.h │ ├── EmptyTensor.h │ ├── FillMillerIndex.h │ ├── FillR2.h │ ├── FillRot.h │ ├── FillSR2.h │ ├── FillWR2.h │ ├── FromTorchScript.h │ ├── FullPrimitiveTensor.h │ ├── FullTensor.h │ ├── IdentityTensor.h │ ├── LinspacePrimitiveTensor.h │ ├── LinspaceTensor.h │ ├── LogspacePrimitiveTensor.h │ ├── LogspaceTensor.h │ ├── OnesPrimitiveTensor.h │ ├── OnesTensor.h │ ├── Orientation.h │ ├── PrimitiveTensorFromTorchScript.h │ ├── SymmetryFromOrbifold.h │ ├── TensorFromTorchScript.h │ ├── UserPrimitiveTensor.h │ ├── UserTensor.h │ ├── UserTensorBase.h │ ├── ZerosPrimitiveTensor.h │ └── ZerosTensor.h ├── pyproject.toml ├── python ├── CMakeLists.txt ├── examples │ ├── README.md │ ├── crystal_plasticity │ │ ├── compare_formulations.ipynb │ │ ├── crystal.i │ │ ├── crystal_integrated.i │ │ └── polefigures.ipynb │ ├── demo_model.i │ ├── deterministic.ipynb │ ├── requirements.txt │ └── statistical.ipynb ├── neml2 │ ├── __init__.py │ ├── core.cxx │ ├── crystallography.cxx │ ├── indexing.h │ ├── math.cxx │ ├── postprocessing │ │ ├── __init__.py │ │ ├── odf.py │ │ └── polefigure.py │ ├── pyzag │ │ ├── __init__.py │ │ └── interface.py │ ├── requirements.txt │ ├── reserved.cxx │ ├── tensors.cxx │ ├── tensors │ │ ├── MillerIndex.cxx │ │ ├── PrimitiveTensor.h │ │ ├── Quaternion.cxx │ │ ├── R2.cxx │ │ ├── R2Base.h │ │ ├── R3.cxx │ │ ├── R4.cxx │ │ ├── R5.cxx │ │ ├── R8.cxx │ │ ├── Rot.cxx │ │ ├── SFFR4.cxx │ │ ├── SFR3.cxx │ │ ├── SFR4.cxx │ │ ├── SR2.cxx │ │ ├── SSFR5.cxx │ │ ├── SSR4.cxx │ │ ├── SSSSR8.cxx │ │ ├── SWR4.cxx │ │ ├── Scalar.cxx │ │ ├── Tensor.cxx │ │ ├── TensorBase.h │ │ ├── Vec.cxx │ │ ├── VecBase.h │ │ ├── WFR4.cxx │ │ ├── WR2.cxx │ │ ├── WSR4.cxx │ │ └── WWR4.cxx │ ├── types.h │ └── visualization.py ├── requirements.txt └── tests │ ├── CMakeLists.txt │ ├── conftest.py │ ├── pyzag │ ├── gold │ │ ├── elastic_model.pt │ │ ├── km_mixed_model.pt │ │ └── viscoplastic_model.pt │ ├── models │ │ ├── correct_model.i │ │ ├── elastic_model.i │ │ ├── km_mixed_model.i │ │ └── viscoplastic_model.i │ ├── test_NEML2PyzagModel.py │ └── test_adjoint.py │ ├── requirements.txt │ ├── tensors │ ├── common.py │ ├── test_PrimitiveTensor.py │ ├── test_Scalar.py │ ├── test_Tensor.py │ └── test_TensorBase.py │ ├── test_LabeledAxis.i │ ├── test_LabeledAxis.py │ ├── test_LabeledAxisAccessor.py │ ├── test_MatrixAssembler.py │ ├── test_Model.i │ ├── test_Model.py │ ├── test_Model_diagnose.i │ ├── test_ParameterStore.i │ ├── test_ParameterStore.py │ ├── test_VectorAssembler.py │ ├── test_training.i │ ├── test_training.py │ └── test_visualization.py ├── requirements.txt ├── runner ├── CMakeLists.txt ├── benchmark │ ├── .gitignore │ ├── analyze.py │ ├── chaboche2 │ │ └── model.i │ ├── chaboche4 │ │ └── model.i │ ├── chaboche6 │ │ └── model.i │ ├── elasticity │ │ └── model.i │ ├── gtntheig │ │ └── model.i │ ├── isoharden │ │ └── model.i │ ├── radret │ │ └── model.i │ ├── requirements.txt │ ├── run.py │ ├── scpcoup │ │ └── model.i │ ├── scpdecoup │ │ └── model.i │ ├── scpdecoupexp │ │ └── model.i │ ├── tcprandom │ │ └── model.i │ └── tcpsingle │ │ └── model.i └── src │ └── main.cxx ├── scripts ├── apply_layout.py ├── check_copyright.py ├── check_python_dep.py ├── clobber.sh ├── coverage.sh.in ├── extract_tutorial_sources.py ├── filter_cc.py ├── fixup_pystub.py ├── gcov_clang_wrapper.sh ├── requirements.txt ├── substitute_tutorial_output.py └── syntax_to_md.py ├── setup.py ├── src └── neml2 │ ├── CMakeLists.txt │ ├── base │ ├── DiagnosticsInterface.cxx │ ├── EnumSelection.cxx │ ├── EnumSelectionBase.cxx │ ├── Factory.cxx │ ├── HITParser.cxx │ ├── LabeledAxis.cxx │ ├── LabeledAxisAccessor.cxx │ ├── MultiEnumSelection.cxx │ ├── NEML2Object.cxx │ ├── Option.cxx │ ├── OptionBase.cxx │ ├── OptionCollection.cxx │ ├── OptionSet.cxx │ ├── Parser.cxx │ ├── Registry.cxx │ ├── Settings.cxx │ ├── TensorName.cxx │ ├── TracingInterface.cxx │ └── guards.cxx │ ├── dispatchers │ ├── SimpleMPIScheduler.cxx │ ├── SimpleScheduler.cxx │ ├── SliceGenerator.cxx │ ├── StaticHybridScheduler.cxx │ ├── TensorLoader.cxx │ ├── ValueMapLoader.cxx │ ├── WorkScheduler.cxx │ ├── derivmap_helpers.cxx │ └── valuemap_helpers.cxx │ ├── drivers │ ├── Driver.cxx │ ├── ModelDriver.cxx │ ├── TransientDriver.cxx │ └── solid_mechanics │ │ ├── LDISolidMechanicsDriver.cxx │ │ ├── SDTSolidMechanicsDriver.cxx │ │ └── SolidMechanicsDriver.cxx │ ├── jit │ ├── TraceableSize.cxx │ ├── TraceableTensorShape.cxx │ └── utils.cxx │ ├── misc │ ├── defaults.cxx │ ├── errors.cxx │ ├── string_utils.cxx │ └── types.cxx │ ├── models │ ├── ArrheniusParameter.cxx │ ├── Assembler.cxx │ ├── BackwardEulerTimeIntegration.cxx │ ├── BufferStore.cxx │ ├── ComposedModel.cxx │ ├── ConstantParameter.cxx │ ├── CopyVariable.cxx │ ├── Data.cxx │ ├── FischerBurmeister.cxx │ ├── ForwardEulerTimeIntegration.cxx │ ├── HermiteSmoothStep.cxx │ ├── ImplicitUpdate.cxx │ ├── IncrementToRate.cxx │ ├── InputParameter.cxx │ ├── Interpolation.cxx │ ├── LinearCombination.cxx │ ├── LinearInterpolation.cxx │ ├── Model.cxx │ ├── ParameterStore.cxx │ ├── R2Multiplication.cxx │ ├── R2toSR2.cxx │ ├── R2toWR2.cxx │ ├── RotationMatrix.cxx │ ├── SR2Invariant.cxx │ ├── SR2toR2.cxx │ ├── ScalarMultiplication.cxx │ ├── Variable.cxx │ ├── VariableRate.cxx │ ├── VariableStore.cxx │ ├── WR2ExplicitExponentialTimeIntegration.cxx │ ├── WR2ImplicitExponentialTimeIntegration.cxx │ ├── crystallography │ │ ├── CrystalGeometry.cxx │ │ └── CubicCrystal.cxx │ ├── phase_field_fracture │ │ ├── CrackGeometricFunction.cxx │ │ ├── CrackGeometricFunctionAT1.cxx │ │ ├── CrackGeometricFunctionAT2.cxx │ │ ├── DegradationFunction.cxx │ │ ├── LinearIsotropicStrainEnergyDensity.cxx │ │ ├── PowerDegradationFunction.cxx │ │ └── StrainEnergyDensity.cxx │ ├── pyrolysis │ │ ├── AvramiErofeevNucleation.cxx │ │ ├── ChemicalReactionMechanism.cxx │ │ ├── PyrolysisConversionAmount.cxx │ │ ├── PyrolysisKinetics.cxx │ │ └── ReactionMechanism.cxx │ ├── reactive_infiltration │ │ ├── DiffusionLimitedReaction.cxx │ │ └── ProductGeometry.cxx │ └── solid_mechanics │ │ ├── AssociativeIsotropicPlasticHardening.cxx │ │ ├── AssociativeJ2FlowDirection.cxx │ │ ├── AssociativeKinematicPlasticHardening.cxx │ │ ├── AssociativePlasticFlow.cxx │ │ ├── ChabochePlasticHardening.cxx │ │ ├── Eigenstrain.cxx │ │ ├── FlowRule.cxx │ │ ├── FredrickArmstrongPlasticHardening.cxx │ │ ├── GTNYieldFunction.cxx │ │ ├── GursonCavitation.cxx │ │ ├── IsotropicHardening.cxx │ │ ├── IsotropicHardeningStaticRecovery.cxx │ │ ├── IsotropicMandelStress.cxx │ │ ├── KinematicHardening.cxx │ │ ├── KinematicHardeningStaticRecovery.cxx │ │ ├── KocksMeckingActivationEnergy.cxx │ │ ├── KocksMeckingFlowSwitch.cxx │ │ ├── KocksMeckingFlowViscosity.cxx │ │ ├── KocksMeckingIntercept.cxx │ │ ├── KocksMeckingRateSensitivity.cxx │ │ ├── KocksMeckingYieldStress.cxx │ │ ├── LinearIsotropicElasticJ2TrialStressUpdate.cxx │ │ ├── LinearIsotropicHardening.cxx │ │ ├── LinearKinematicHardening.cxx │ │ ├── MandelStress.cxx │ │ ├── MixedControlSetup.cxx │ │ ├── Normality.cxx │ │ ├── OlevskySinteringStress.cxx │ │ ├── PerzynaPlasticFlowRate.cxx │ │ ├── PhaseTransformationEigenstrain.cxx │ │ ├── PlasticFlowRate.cxx │ │ ├── PowerLawIsotropicHardeningStaticRecovery.cxx │ │ ├── PowerLawKinematicHardeningStaticRecovery.cxx │ │ ├── RateIndependentPlasticFlowConstraint.cxx │ │ ├── SlopeSaturationVoceIsotropicHardening.cxx │ │ ├── ThermalEigenstrain.cxx │ │ ├── TwoStageThermalAnnealing.cxx │ │ ├── VoceIsotropicHardening.cxx │ │ ├── VolumeChangeEigenstrain.cxx │ │ ├── YieldFunction.cxx │ │ ├── crystal_plasticity │ │ ├── CrystalMean.cxx │ │ ├── ElasticStrainRate.cxx │ │ ├── FixOrientation.cxx │ │ ├── LinearSingleSlipHardeningRule.cxx │ │ ├── OrientationRate.cxx │ │ ├── PlasticDeformationRate.cxx │ │ ├── PlasticSpatialVelocityGradient.cxx │ │ ├── PlasticVorticity.cxx │ │ ├── PowerLawSlipRule.cxx │ │ ├── ResolvedShear.cxx │ │ ├── SingleSlipHardeningRule.cxx │ │ ├── SingleSlipStrengthMap.cxx │ │ ├── SlipRule.cxx │ │ ├── SlipStrengthMap.cxx │ │ ├── SumSlipRates.cxx │ │ └── VoceSingleSlipHardeningRule.cxx │ │ └── elasticity │ │ ├── AnisotropicElasticity.cxx │ │ ├── CubicElasticityConverter.cxx │ │ ├── CubicElasticityTensor.cxx │ │ ├── Elasticity.cxx │ │ ├── ElasticityConverter.cxx │ │ ├── GeneralElasticity.cxx │ │ ├── GreenLagrangeStrain.cxx │ │ ├── IsotropicElasticityConverter.cxx │ │ ├── IsotropicElasticityTensor.cxx │ │ └── LinearIsotropicElasticity.cxx │ ├── solvers │ ├── Newton.cxx │ ├── NewtonWithLineSearch.cxx │ ├── NewtonWithTrustRegion.cxx │ ├── NonlinearSolver.cxx │ ├── NonlinearSystem.cxx │ ├── Solver.cxx │ └── TrustRegionSubProblem.cxx │ ├── tensors │ ├── MillerIndex.cxx │ ├── Quaternion.cxx │ ├── R2.cxx │ ├── R2Base.cxx │ ├── R3.cxx │ ├── R4.cxx │ ├── R5.cxx │ ├── R8.cxx │ ├── Rot.cxx │ ├── SFFR4.cxx │ ├── SFR3.cxx │ ├── SFR4.cxx │ ├── SR2.cxx │ ├── SSFR5.cxx │ ├── SSR4.cxx │ ├── SSSSR8.cxx │ ├── SWR4.cxx │ ├── Scalar.cxx │ ├── Tensor.cxx │ ├── TensorCache.cxx │ ├── TensorValue.cxx │ ├── Transformable.cxx │ ├── Vec.cxx │ ├── VecBase.cxx │ ├── WFR4.cxx │ ├── WR2.cxx │ ├── WSR4.cxx │ ├── WWR4.cxx │ ├── crystallography.cxx │ ├── functions │ │ ├── abs.cxx │ │ ├── acos.cxx │ │ ├── asin.cxx │ │ ├── atan.cxx │ │ ├── bmm.cxx │ │ ├── bmv.cxx │ │ ├── bvv.cxx │ │ ├── cat.cxx │ │ ├── cbrt.cxx │ │ ├── clamp.cxx │ │ ├── clip.cxx │ │ ├── cos.cxx │ │ ├── cosh.cxx │ │ ├── deg2rad.cxx │ │ ├── diag_embed.cxx │ │ ├── diff.cxx │ │ ├── discretization │ │ │ ├── assemble.cxx │ │ │ ├── interpolate.cxx │ │ │ └── scatter.cxx │ │ ├── exp.cxx │ │ ├── fmod.cxx │ │ ├── gcd.cxx │ │ ├── heaviside.cxx │ │ ├── jacrev.cxx │ │ ├── linalg │ │ │ ├── cross.cxx │ │ │ ├── inv.cxx │ │ │ ├── lu_factor.cxx │ │ │ ├── lu_solve.cxx │ │ │ ├── outer.cxx │ │ │ ├── solve.cxx │ │ │ ├── vecdot.cxx │ │ │ └── vector_norm.cxx │ │ ├── log.cxx │ │ ├── log10.cxx │ │ ├── macaulay.cxx │ │ ├── mean.cxx │ │ ├── minimum.cxx │ │ ├── operators.cxx │ │ ├── pow.cxx │ │ ├── sign.cxx │ │ ├── sin.cxx │ │ ├── sinh.cxx │ │ ├── sqrt.cxx │ │ ├── stack.cxx │ │ ├── sum.cxx │ │ ├── tan.cxx │ │ ├── tanh.cxx │ │ └── where.cxx │ ├── mandel_notation.cxx │ ├── shape_utils.cxx │ └── tensors.cxx │ └── user_tensors │ ├── EmptyPrimitiveTensor.cxx │ ├── EmptyTensor.cxx │ ├── FillMillerIndex.cxx │ ├── FillR2.cxx │ ├── FillRot.cxx │ ├── FillSR2.cxx │ ├── FillWR2.cxx │ ├── FromTorchScript.cxx │ ├── FullPrimitiveTensor.cxx │ ├── FullTensor.cxx │ ├── IdentityTensor.cxx │ ├── LinspacePrimitiveTensor.cxx │ ├── LinspaceTensor.cxx │ ├── LogspacePrimitiveTensor.cxx │ ├── LogspaceTensor.cxx │ ├── OnesPrimitiveTensor.cxx │ ├── OnesTensor.cxx │ ├── Orientation.cxx │ ├── PrimitiveTensorFromTorchScript.cxx │ ├── SymmetryFromOrbifold.cxx │ ├── TensorFromTorchScript.cxx │ ├── UserPrimitiveTensor.cxx │ ├── UserTensor.cxx │ ├── UserTensorBase.cxx │ ├── ZerosPrimitiveTensor.cxx │ └── ZerosTensor.cxx └── tests ├── CMakeLists.txt ├── dispatchers ├── CMakeLists.txt ├── main.cxx ├── model.i ├── test_SliceGenerator.cxx ├── test_StaticHybridScheduler.cxx ├── test_TensorLoader.cxx ├── test_ValueMapLoader.cxx ├── test_WorkDispatcher_SliceGenerator_SimpleScheduler.cxx ├── test_WorkDispatcher_ValueMapLoader_SimpleScheduler.cxx ├── test_WorkDispatcher_ValueMapLoader_StaticHybridScheduler.cxx ├── test_derivmap_helpers.cxx └── test_valuemap_helpers.cxx ├── extension ├── .gitignore ├── CMakeLists.txt ├── FooModel.cxx ├── FooModel.h └── FooModel.i.in ├── include ├── ModelUnitTest.h ├── SampleEventTracer.h ├── SampleNonlinearSystems.h ├── SampleParserTestingModel.h ├── SampleRateModel.h ├── SpatialVelocityDriver.h ├── TabulatedPolynomialModel.h ├── TorchScriptFlowRate.h ├── TransientRegression.h ├── VTestParser.h ├── VTestTimeSeries.h ├── VTestVerification.h └── utils.h ├── regression ├── CMakeLists.txt ├── main.cxx ├── phase_field_fracture │ ├── elastic_brittle_fracture │ │ ├── gold │ │ │ └── pff_result.pt │ │ └── small_deformation.i │ └── regression_phase_field_fracture.cxx ├── pyrolysis │ ├── TGA │ │ ├── PR_pyrolysis.i │ │ └── gold │ │ │ └── result.pt │ └── regression_pyrolysis.cxx ├── reactive_infiltration │ ├── constant_liquid_concentration │ │ ├── gold │ │ │ └── result.pt │ │ └── model.i │ └── regression_reactive_infiltration.cxx ├── regression_training.cxx ├── regression_training.i └── solid_mechanics │ ├── crystal_plasticity │ ├── single_crystal_coupled │ │ ├── gold │ │ │ └── result.pt │ │ ├── model.i │ │ └── model_with_simple_scheduler.i │ ├── single_crystal_coupled_multiplicative │ │ ├── gold │ │ │ └── result.pt │ │ ├── model.i │ │ └── model_with_simple_scheduler.i │ ├── single_crystal_coupled_triclinic │ │ ├── gold │ │ │ └── result.pt │ │ ├── model.i │ │ └── model_with_simple_scheduler.i │ ├── single_crystal_decoupled │ │ ├── gold │ │ │ └── result.pt │ │ ├── model.i │ │ └── model_with_simple_scheduler.i │ ├── single_crystal_decoupled_explicit_orientation │ │ ├── gold │ │ │ └── result.pt │ │ ├── model.i │ │ └── model_with_simple_scheduler.i │ └── single_crystal_spatial_velocity_gradient │ │ ├── gold │ │ └── result.pt │ │ ├── model.i │ │ └── model_with_simple_scheduler.i │ ├── km_flow │ ├── full_model │ │ ├── gold │ │ │ └── result.pt │ │ ├── model.i │ │ └── model_with_simple_scheduler.i │ ├── mixed_control │ │ ├── gold │ │ │ └── result.pt │ │ ├── model.i │ │ ├── model_with_simple_scheduler.i │ │ └── model_with_simple_scheduler_async.i │ └── simple_mix │ │ ├── gold │ │ └── result.pt │ │ ├── model.i │ │ └── model_with_simple_scheduler.i │ ├── mixed_control │ ├── gold │ │ └── result.pt │ ├── model.i │ └── model_with_simple_scheduler.i │ ├── rate_independent_plasticity │ ├── gurson │ │ ├── gold │ │ │ └── result.pt │ │ └── model.i │ ├── isoharden │ │ ├── gold │ │ │ └── result.pt │ │ ├── model.i │ │ └── model_with_simple_scheduler.i │ ├── isokinharden │ │ ├── gold │ │ │ └── result.pt │ │ ├── model.i │ │ └── model_with_simple_scheduler.i │ ├── kinharden │ │ ├── gold │ │ │ └── result.pt │ │ ├── model.i │ │ └── model_with_simple_scheduler.i │ ├── perfect │ │ ├── gold │ │ │ └── result.pt │ │ ├── model.i │ │ └── model_with_simple_scheduler.i │ ├── perfect_temperature │ │ ├── gold │ │ │ └── result.pt │ │ ├── model.i │ │ └── model_with_simple_scheduler.i │ └── radial_return │ │ ├── gold │ │ └── result.pt │ │ ├── model.i │ │ └── model_with_simple_scheduler.i │ ├── recovery │ ├── nonassociative_isotropic_kinematic │ │ ├── gold │ │ │ └── result.pt │ │ ├── model.i │ │ └── model_with_simple_scheduler.i │ ├── static_recovery │ │ ├── gold │ │ │ └── result.pt │ │ ├── model.i │ │ └── model_with_simple_scheduler.i │ └── thermal_annealing │ │ ├── gold │ │ └── result.pt │ │ ├── model.i │ │ └── model_with_simple_scheduler.i │ ├── regression_solid_mechanics.cxx │ └── viscoplasticity │ ├── alt_composition │ ├── gold │ │ └── result.pt │ ├── model.i │ └── model_with_simple_scheduler.i │ ├── chaboche │ ├── gold │ │ └── result.pt │ ├── model.i │ └── model_with_simple_scheduler.i │ ├── drucker_prager │ ├── gold │ │ └── result.pt │ ├── model.i │ └── model_with_simple_scheduler.i │ ├── free_sintering │ ├── gold │ │ └── result.pt │ └── model.i │ ├── isoharden │ ├── gold │ │ └── result.pt │ ├── model.i │ └── model_with_simple_scheduler.i │ ├── isokinharden │ ├── gold │ │ └── result.pt │ ├── model.i │ └── model_with_simple_scheduler.i │ ├── kinharden │ ├── gold │ │ └── result.pt │ ├── model.i │ └── model_with_simple_scheduler.i │ ├── misc │ ├── polynomial │ │ ├── gold │ │ │ └── result.pt │ │ └── model.i │ └── torch_script │ │ ├── gold │ │ ├── result.pt │ │ └── surrogate.pt │ │ ├── model.i │ │ ├── model_scalar.i │ │ └── surrogate.py │ ├── perfect │ ├── gold │ │ └── result.pt │ ├── model.i │ └── model_with_simple_scheduler.i │ ├── radial_return │ ├── gold │ │ └── result.pt │ ├── model.i │ └── model_with_simple_scheduler.i │ └── stress_control │ ├── gold │ └── result.pt │ ├── model.i │ └── model_with_simple_scheduler.i ├── src ├── CMakeLists.txt ├── ModelUnitTest.cxx ├── SampleEventTracer.cxx ├── SampleNonlinearSystems.cxx ├── SampleParserTestingModel.cxx ├── SampleRateModel.cxx ├── SpatialVelocityDriver.cxx ├── TabulatedPolynomialModel.cxx ├── TorchScriptFlowRate.cxx ├── TransientRegression.cxx ├── VTestParser.cxx ├── VTestTimeSeries.cxx ├── VTestVerification.cxx └── utils.cxx ├── unit ├── CMakeLists.txt ├── README.md ├── base │ ├── test_EnumSelection.cxx │ ├── test_Factory.cxx │ ├── test_HITParser.cxx │ ├── test_HITParser1.i │ ├── test_HITParser2.i │ ├── test_MultiEnumSelection.cxx │ ├── test_OptionSet.cxx │ ├── test_Registry.cxx │ ├── test_Settings.cxx │ └── test_TracingInterface.cxx ├── drivers │ ├── solid_mechanics │ │ ├── test_LargeDeformationIncrementalSolidMechanicsDriver.i │ │ ├── test_SolidMechanicsDriver.cxx │ │ ├── test_SolidMechanicsDriver_mixed.i │ │ ├── test_SolidMechanicsDriver_strain.i │ │ ├── test_SolidMechanicsDriver_stress.i │ │ └── test_SolidMechanicsDriver_temperature.i │ ├── test_TransientDriver.cxx │ └── test_TransientDriver.i ├── main.cxx ├── misc │ └── test_string_utils.cxx ├── models │ ├── ADSampleRateModel.i │ ├── ArrheniusParameter.i │ ├── ComposedModel1.i │ ├── ComposedModel2.i │ ├── ComposedModel3.i │ ├── ComposedModel4.i │ ├── ComposedModel5.i │ ├── FischerBurmeister1.i │ ├── FischerBurmeister2.i │ ├── FischerBurmeister3.i │ ├── HermiteSmoothStep.i │ ├── HermiteSmoothStep_COMPLEMENT.i │ ├── ImplicitUpdate.i │ ├── R2IncrementToRate.i │ ├── R2Multiplication1.i │ ├── R2Multiplication2.i │ ├── R2Multiplication3.i │ ├── R2Multiplication4.i │ ├── R2toSR2.i │ ├── R2toWR2.i │ ├── SR2ConstantParameter.i │ ├── SR2IncrementToRate.i │ ├── SR2Invariant_EFFECTIVE_STRAIN.i │ ├── SR2Invariant_I1.i │ ├── SR2Invariant_I2.i │ ├── SR2Invariant_VONMISES.i │ ├── SR2LinearCombination.i │ ├── SR2LinearCombination_nl_params.i │ ├── SR2LinearInterpolation1.i │ ├── SR2LinearInterpolation2.i │ ├── SR2LinearInterpolation3.i │ ├── SR2LinearInterpolation4.i │ ├── SR2toR2.i │ ├── SampleRateModel.i │ ├── ScalarBackwardEulerTimeIntegration.i │ ├── ScalarConstantParameter.i │ ├── ScalarForceRate.i │ ├── ScalarForwardEulerTimeIntegration.i │ ├── ScalarIncrementToRate.i │ ├── ScalarLinearCombination.i │ ├── ScalarLinearCombination_nl_params.i │ ├── ScalarLinearInterpolation1.i │ ├── ScalarLinearInterpolation2.i │ ├── ScalarLinearInterpolation3.i │ ├── ScalarLinearInterpolation4.i │ ├── ScalarMultiplication1.i │ ├── ScalarMultiplication2.i │ ├── ScalarMultiplication3.i │ ├── ScalarMultiplication4.i │ ├── ScalarMultiplication5.i │ ├── ScalarMultiplication6.i │ ├── ScalarStateRate.i │ ├── TorchScriptFlowRate.i │ ├── TorchScriptFlowRate.pt │ ├── VecIncrementToRate.i │ ├── WR2ExplicitExponentialTimeIntegration.i │ ├── WR2ImplicitExponentialTimeIntegration.i │ ├── crystallography │ │ ├── test_CrystalGeometry.cxx │ │ ├── test_CrystalGeometry.i │ │ ├── test_CubicCrystal.cxx │ │ └── test_CubicCrystal.i │ ├── phase_field_fracture │ │ ├── CrackGeometricFunctionAT1.i │ │ ├── CrackGeometricFunctionAT2.i │ │ ├── LinearIsotropicStrainEnergyDensity.i │ │ └── PowerDegradationFunction.i │ ├── pyrolysis │ │ ├── AvramiErofeevNucleation.i │ │ ├── ChemicalReactionMechanism.i │ │ ├── PyrolysisConversionAmount.i │ │ └── PyrolysisKinetics.i │ ├── reactive_infiltration │ │ ├── DiffusionLimitedReaction.i │ │ └── ProductGeometry.i │ ├── solid_mechanics │ │ ├── AssociativeIsotropicPlasticHardening.i │ │ ├── AssociativeJ2FlowDirection.i │ │ ├── AssociativeKinematicPlasticHardening.i │ │ ├── AssociativePlasticFlow.i │ │ ├── ChabochePlasticHardening.i │ │ ├── ChabochePlasticHardening_nl_params.i │ │ ├── FredrickArmstrongPlasticHardening.i │ │ ├── FredrickArmstrongPlasticHardening_nl_params.i │ │ ├── GTNYieldFunction.i │ │ ├── GTNYieldFunctionStress.i │ │ ├── GTNYieldFunction_nl_params.i │ │ ├── GursonCavitation.i │ │ ├── IsotropicMandelStress.i │ │ ├── KocksMeckingActivationEnergy.i │ │ ├── KocksMeckingActivationEnergy_nl_params.i │ │ ├── KocksMeckingFlowSwitch.i │ │ ├── KocksMeckingFlowSwitch_nl_params.i │ │ ├── KocksMeckingFlowViscosity.i │ │ ├── KocksMeckingFlowViscosity_nl_params.i │ │ ├── KocksMeckingIntercept.i │ │ ├── KocksMeckingIntercept_nl_params.i │ │ ├── KocksMeckingRateSensitivity.i │ │ ├── KocksMeckingRateSensitivity_nl_params.i │ │ ├── KocksMeckingYieldStress.i │ │ ├── KocksMeckingYieldStress_nl_params.i │ │ ├── LinearIsotropicElasticJ2TrialStressUpdate.i │ │ ├── LinearIsotropicHardening.i │ │ ├── LinearKinematicHardening.i │ │ ├── NonlinearParameter.i │ │ ├── Normality.i │ │ ├── OlevskySinteringStress.i │ │ ├── PerzynaPlasticFlowRate.i │ │ ├── PerzynaPlasticFlowRate_nl_params.i │ │ ├── PhaseTransformationEigenstrain.i │ │ ├── PowerLawIsotropicHardeningStaticRecovery.i │ │ ├── PowerLawKinematicHardeningStaticRecovery.i │ │ ├── RateIndependentPlasticFlowConstraint.i │ │ ├── SR2TwoStageThermalAnnealing.i │ │ ├── ScalarTwoStageThermalAnnealing.i │ │ ├── SlopeSaturationVoceIsotropicHardening.i │ │ ├── SlopeSaturationVoceIsotropicHardening_negative.i │ │ ├── SlopeSaturationVoceIsotropicHardening_nl_params.i │ │ ├── SlopeSaturationVoceIsotropicHardening_nl_params_negative.i │ │ ├── ThermalEigenstrain.i │ │ ├── ThermalEigenstrain_nl_params.i │ │ ├── VoceIsotropicHardening.i │ │ ├── VoceIsotropicHardening_nl_params.i │ │ ├── VolumeChangeEigenstrain.i │ │ ├── YieldFunction_isoharden.i │ │ ├── YieldFunction_isokinharden.i │ │ ├── YieldFunction_kinharden.i │ │ ├── YieldFunction_nl_params.i │ │ ├── YieldFunction_perfect.i │ │ ├── crystal_plasticity │ │ │ ├── ElasticStrainRate.i │ │ │ ├── FixOrientation.i │ │ │ ├── LinearSingleSlipHardeningRule.i │ │ │ ├── OrientationRate.i │ │ │ ├── PlasticDeformationRate.i │ │ │ ├── PlasticSpatialVelocityGradient.i │ │ │ ├── PlasticVorticity.i │ │ │ ├── PowerLawSlipRule.i │ │ │ ├── ResolvedShear.i │ │ │ ├── SR2CrystalMean.i │ │ │ ├── SingleSlipStrengthMap.i │ │ │ ├── SumSlipRates.i │ │ │ └── VoceSingleSlipHardeningRule.i │ │ ├── elasticity │ │ │ ├── CubicElasticityTensor_E_nu_mu.i │ │ │ ├── CubicElasticityTensor_nu_mu_E.i │ │ │ ├── GeneralElasticity.i │ │ │ ├── GeneralElasticity_compliance.i │ │ │ ├── GeneralElasticity_compliance_nl_params.i │ │ │ ├── GeneralElasticity_nl_params.i │ │ │ ├── GeneralElasticity_rate.i │ │ │ ├── GreenLagrangeStrain.i │ │ │ ├── IsotropicElasticityTensor_E_nu.i │ │ │ ├── IsotropicElasticityTensor_nu_E.i │ │ │ ├── LinearIsotropicElasticity.i │ │ │ ├── LinearIsotropicElasticity_compliance.i │ │ │ ├── LinearIsotropicElasticity_compliance_nl_params.i │ │ │ ├── LinearIsotropicElasticity_compliance_rate.i │ │ │ ├── LinearIsotropicElasticity_nl_params.i │ │ │ └── LinearIsotropicElasticity_rate.i │ │ └── mixed_control │ │ │ └── MixedControlSetup.i │ ├── test_Assembler.cxx │ ├── test_LabeledAxis.cxx │ ├── test_LabeledAxisAccesor.cxx │ ├── test_Model.cxx │ ├── test_Model_diagnose1.i │ ├── test_Model_diagnose2.i │ ├── test_Model_diagnose3.i │ ├── test_ParameterStore.cxx │ ├── test_ParameterStore.i │ └── test_models.cxx ├── solvers │ ├── test_NonlinearSolvers.cxx │ └── test_NonlinearSystem.cxx ├── tensors │ ├── functions │ │ └── test_discretization.cxx │ ├── test_MillerIndex.cxx │ ├── test_PrimitiveTensor.cxx │ ├── test_Quaternion.cxx │ ├── test_R2.cxx │ ├── test_R3.cxx │ ├── test_R4.cxx │ ├── test_Rot.cxx │ ├── test_SR2.cxx │ ├── test_SSR4.cxx │ ├── test_Scalar.cxx │ ├── test_Tensor.cxx │ ├── test_TensorBase.cxx │ ├── test_TensorName.cxx │ ├── test_TensorName_Scalar.i │ ├── test_TensorName_empty_Scalar.i │ ├── test_TensorName_empty_Tensor.i │ ├── test_Vec.cxx │ ├── test_VecBase.cxx │ ├── test_WR2.cxx │ ├── test_WWR4.cxx │ ├── test_list_tensors.cxx │ ├── test_shape_utils.cxx │ ├── test_symmetry_operator_definitions.cxx │ └── test_vector_transform.cxx └── user_tensors │ ├── test_EmptyPrimitiveTensor.cxx │ ├── test_EmptyPrimitiveTensor.i │ ├── test_EmptyTensor.cxx │ ├── test_EmptyTensor.i │ ├── test_FillMillerIndex.cxx │ ├── test_FillMillerIndex.i │ ├── test_FillR2.cxx │ ├── test_FillR2.i │ ├── test_FillSR2.cxx │ ├── test_FillSR2.i │ ├── test_FullPrimitiveTensor.cxx │ ├── test_FullPrimitiveTensor.i │ ├── test_FullTensor.cxx │ ├── test_FullTensor.i │ ├── test_IdentityTensor.cxx │ ├── test_IdentityTensor.i │ ├── test_LinspacePrimitiveTensor.cxx │ ├── test_LinspacePrimitiveTensor.i │ ├── test_LinspaceTensor.cxx │ ├── test_LinspaceTensor.i │ ├── test_LogspacePrimitiveTensor.cxx │ ├── test_LogspacePrimitiveTensor.i │ ├── test_LogspaceTensor.cxx │ ├── test_LogspaceTensor.i │ ├── test_OnesPrimitiveTensor.cxx │ ├── test_OnesPrimitiveTensor.i │ ├── test_OnesTensor.cxx │ ├── test_OnesTensor.i │ ├── test_Orientation.cxx │ ├── test_Orientation.i │ ├── test_SymmetryFromOrbifold.cxx │ ├── test_SymmetryFromOrbifold.i │ ├── test_UserPrimitiveTensor.cxx │ ├── test_UserPrimitiveTensor.i │ ├── test_UserTensor.cxx │ ├── test_UserTensor.i │ ├── test_UserTensor_error.i │ ├── test_ZerosPrimitiveTensor.cxx │ ├── test_ZerosPrimitiveTensor.i │ ├── test_ZerosTensor.cxx │ └── test_ZerosTensor.i └── verification ├── CMakeLists.txt ├── main.cxx └── solid_mechanics ├── chaboche ├── chaboche.i ├── chaboche.vtest └── chaboche.xml ├── cp_basic ├── cp_basic.i ├── cp_basic.vtest └── cp_basic.xml ├── cp_basic_tensor ├── cp_basic.i └── cp_basic.vtest ├── cp_taylor ├── cp_taylor.i ├── cp_taylor.vtest └── cp_taylor.xml ├── gurson ├── gurson.i └── gurson.vtest ├── kocks_mecking ├── kocks_mecking.i ├── kocks_mecking.vtest └── kocks_mecking.xml ├── mixed_control ├── mixed_control.i ├── mixed_control.vtest └── mixed_control.xml ├── perzyna ├── combined.i ├── combined.vtest ├── isolinear_multiaxial.i ├── isolinear_multiaxial.vtest ├── isolinear_uniaxial.i ├── isolinear_uniaxial.vtest ├── perzyna.xml ├── voce.i └── voce.vtest ├── rate_independent ├── perfect.i ├── perfect.vtest ├── ri.xml ├── voceiso.i ├── voceiso.vtest ├── voceisolinkin.i └── voceisolinkin.vtest └── verification_solid_mechanics.cxx /.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM 2 | 3 | TabWidth: 2 4 | ColumnLimit: 100 5 | UseTab: Never 6 | 7 | CommentPragmas: "^/" 8 | ReflowComments: true 9 | AlignTrailingComments: true 10 | SpacesBeforeTrailingComments: 1 11 | 12 | SpaceBeforeParens: ControlStatements 13 | SpacesInSquareBrackets: false 14 | BreakBeforeBraces: Allman 15 | PointerAlignment: Middle 16 | 17 | BinPackParameters: false 18 | BinPackArguments: false 19 | PackConstructorInitializers: Never 20 | AllowShortBlocksOnASingleLine: false 21 | AllowShortFunctionsOnASingleLine: true 22 | AllowShortIfStatementsOnASingleLine: false 23 | AllowShortLoopsOnASingleLine: false 24 | 25 | SortIncludes: false 26 | IndentCaseLabels: true 27 | ConstructorInitializerIndentWidth: 2 28 | AlwaysBreakAfterDefinitionReturnType: TopLevel 29 | AlwaysBreakTemplateDeclarations: true 30 | 31 | FixNamespaceComments: false 32 | -------------------------------------------------------------------------------- /.codechecker: -------------------------------------------------------------------------------- 1 | -*/_deps/* 2 | -*/tests/* 3 | -*/torch/* 4 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | 2 | *.ipynb diff=jupyternotebook 3 | 4 | *.ipynb merge=jupyternotebook 5 | -------------------------------------------------------------------------------- /.github/workflows/close_pr.yml: -------------------------------------------------------------------------------- 1 | name: Clean up after pull request 2 | 3 | on: 4 | pull_request_target: 5 | branches: [main] 6 | types: [closed] 7 | 8 | jobs: 9 | delete-preview: 10 | runs-on: ubuntu-latest 11 | permissions: 12 | contents: write 13 | pull-requests: write 14 | steps: 15 | - uses: actions/checkout@v4 16 | with: 17 | ref: gh-pages 18 | - name: Delete preview 19 | run: | 20 | git rm -r --cached pr-preview/pr-${{ github.event.number }} 21 | git config --global user.name 'github-actions[bot]' 22 | git config --global user.email 'github-actions[bot]@users.noreply.github.com' 23 | git commit -m 'Remove preview for PR #${{ github.event.number }}' 24 | git push origin gh-pages 25 | - name: Comment on the pull request 26 | uses: marocchino/sticky-pull-request-comment@v2 27 | with: 28 | header: preview-link 29 | message: | 30 | Documentation preview removed. 31 | To view the documentation, please visit the [main documentation page](https://applied-material-modeling.github.io/neml2). 32 | -------------------------------------------------------------------------------- /.github/workflows/cmake_integration.yml: -------------------------------------------------------------------------------- 1 | name: CMake integration 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | pull_request: 7 | branches: [main] 8 | 9 | # Newer commits should cancel old runs 10 | concurrency: 11 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 12 | cancel-in-progress: true 13 | 14 | jobs: 15 | test: 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: applied-material-modeling/neml2-ci@main 19 | with: 20 | path: neml2 21 | python-version: 3.9 22 | cmake-version: 3.26 23 | torch-version: 2.5.1 24 | - name: Create a source file for testing purposes 25 | run: cp neml2/cmake/subproject/main.cxx . 26 | - name: Create a CMakeLists.txt file for testing purposes 27 | run: cp neml2/cmake/subproject/CMakeLists.txt . 28 | - name: Configure with CMake 29 | run: cmake -DNEML2_TESTS=OFF -GNinja -B build . 30 | - name: Compile 31 | run: cmake --build build --target all 32 | - run: ./build/foo 33 | -------------------------------------------------------------------------------- /.github/workflows/copyright.yml: -------------------------------------------------------------------------------- 1 | name: Copyright 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | pull_request: 7 | branches: [main] 8 | 9 | jobs: 10 | check: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v4 14 | - uses: actions/setup-python@v5 15 | with: 16 | python-version: "3.9" 17 | - name: Check to see if source files have the correct copyright header 18 | run: ./scripts/check_copyright.py 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # CMake 2 | *.cmake 3 | !cmake/Modules/* 4 | CMakeCache.txt 5 | CMakeFiles 6 | CMakeUserPresets.json 7 | CMakeDoxyfile.in 8 | compile_commands.json 9 | detect_cuda* 10 | Makefile 11 | build 12 | _deps 13 | install 14 | installed 15 | 16 | # Editor cache 17 | *.swp 18 | DartConfiguration.tcl 19 | .cache 20 | .vscode 21 | *.log 22 | .env 23 | .clangd 24 | .DS_Store 25 | 26 | # Python 27 | __pycache__ 28 | *.pyi 29 | neml2.egg-info 30 | 31 | # Tests 32 | Testing 33 | *.pt 34 | !**/gold/*.pt 35 | .pytest_cache 36 | 37 | # Objects and libraries 38 | *.a 39 | .libs 40 | *.la 41 | *.so* 42 | *.lo 43 | *.lo.d 44 | *.dylib 45 | 46 | # Miscellaneous 47 | *.pdf 48 | *.gv 49 | *.json 50 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/.gitmodules -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2024, UChicago Argonne, LLC 2 | All Rights Reserved 3 | Software Name: NEML2 -- the New Engineering material Model Library, version 2 4 | By: Argonne National Laboratory 5 | OPEN SOURCE LICENSE (MIT) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /cmake/.gitignore: -------------------------------------------------------------------------------- 1 | !*.cmake 2 | -------------------------------------------------------------------------------- /cmake/Modules/DownloadArgparse.cmake: -------------------------------------------------------------------------------- 1 | # Download Argparse 2 | # 3 | # Influential variables: 4 | # - ARGPARSE_VERSION 5 | # 6 | # Output variables are those defined by FetchContent such as: 7 | # - argparse_POPULATED 8 | # - argparse_SOURCE_DIR 9 | # 10 | # as well as other variables defined by the argparse project. 11 | 12 | include(FetchContent) 13 | FetchContent_Declare( 14 | argparse 15 | GIT_REPOSITORY https://github.com/p-ranav/argparse.git 16 | GIT_TAG v${ARGPARSE_VERSION} 17 | ) 18 | 19 | message(STATUS "Downloading/updating Argparse") 20 | FetchContent_MakeAvailable(argparse) 21 | -------------------------------------------------------------------------------- /cmake/Modules/DownloadDoxygen.cmake: -------------------------------------------------------------------------------- 1 | # Download Doxygen 2 | # 3 | # Right now this only downloads the Doxygen binary for Linux. 4 | # 5 | # Influential variables: 6 | # - DOXYGEN_VERSION 7 | # 8 | # Output variables are those defined by FetchContent such as: 9 | # - doxygen_POPULATED 10 | # - doxygen_SOURCE_DIR 11 | 12 | if(UNIX AND NOT APPLE) 13 | string(REPLACE "." "_" DOXYGEN_RELEASE ${DOXYGEN_VERSION}) 14 | include(FetchContent) 15 | FetchContent_Declare( 16 | doxygen 17 | URL https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_RELEASE}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz 18 | ) 19 | 20 | message(STATUS "Downloading/updating Doxygen") 21 | FetchContent_MakeAvailable(doxygen) 22 | endif() 23 | -------------------------------------------------------------------------------- /cmake/Modules/DownloadTorch.cmake: -------------------------------------------------------------------------------- 1 | # Download a precompiled cpu-only libtorch. 2 | # 3 | # This method only works on Unix systems. The version of the downloaded libtorch 4 | # is controlled by the TORCH_VERSION cache entry. 5 | # 6 | # Influential variables: 7 | # - TORCH_VERSION 8 | # 9 | # Output variables are those defined by FetchContent such as: 10 | # - torch_POPULATED 11 | # - torch_SOURCE_DIR 12 | 13 | if(UNIX) 14 | if(NOT APPLE) 15 | set(Torch_URL https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-${TORCH_VERSION}%2Bcpu.zip) 16 | else() 17 | if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm64") 18 | set(Torch_URL https://download.pytorch.org/libtorch/cpu/libtorch-macos-arm64-${TORCH_VERSION}.zip) 19 | else() 20 | set(Torch_URL https://download.pytorch.org/libtorch/cpu/libtorch-macos-x86_64-${TORCH_VERSION}.zip) 21 | endif() 22 | endif() 23 | endif() 24 | 25 | if(DEFINED Torch_URL) 26 | include(FetchContent) 27 | FetchContent_Declare( 28 | torch 29 | URL ${Torch_URL} 30 | ) 31 | 32 | message(STATUS "Downloading/updating Torch") 33 | FetchContent_MakeAvailable(torch) 34 | endif() 35 | -------------------------------------------------------------------------------- /cmake/Modules/InstallGperftools.sh.in: -------------------------------------------------------------------------------- 1 | ./autogen.sh 2 | export CXXFLAGS="${GPERFTOOLS_CXX_FLAGS}" 3 | ./configure \ 4 | --prefix=${GPERFTOOLS_INSTALL_DIR} \ 5 | --disable-heap-profiler \ 6 | --disable-debugalloc \ 7 | --enable-shared=yes 8 | make -j ${NPROCS} 9 | make install 10 | -------------------------------------------------------------------------------- /cmake/Modules/InstallHIT.cmake.in: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.26) 2 | project(HIT LANGUAGES CXX) 3 | 4 | set(CMAKE_CXX_STANDARD 17) 5 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 6 | 7 | add_library(hit STATIC 8 | src/hit/parse.cc 9 | src/hit/lex.cc 10 | src/hit/braceexpr.cc 11 | ) 12 | target_sources(hit 13 | PUBLIC 14 | FILE_SET HEADERS 15 | BASE_DIRS include 16 | FILES 17 | include/hit/braceexpr.h 18 | include/hit/hit.h 19 | include/hit/lex.h 20 | include/hit/parse.h 21 | ) 22 | target_include_directories(hit PUBLIC ${WASP_INCLUDE_DIR}) 23 | target_link_directories(hit PUBLIC ${WASP_LINK_DIR}) 24 | target_link_libraries(hit PUBLIC waspcore wasphit) 25 | set_target_properties(hit PROPERTIES UNITY_BUILD OFF POSITION_INDEPENDENT_CODE ON) 26 | 27 | install(TARGETS hit LIBRARY) 28 | install(TARGETS hit FILE_SET HEADERS) 29 | -------------------------------------------------------------------------------- /cmake/Modules/InstallTIMPI.sh.in: -------------------------------------------------------------------------------- 1 | export CC=${MPI_C_COMPILER} 2 | export CXX=${MPI_CXX_COMPILER} 3 | export CXXFLAGS="${TIMPI_CXX_FLAGS}" 4 | export METHODS=${TIMPI_BUILD_TYPE} 5 | 6 | ${timpi_SOURCE_DIR}/configure \ 7 | --prefix=${TIMPI_INSTALL_DIR} --enable-shared 8 | 9 | make -j ${NPROCS} 10 | make install 11 | -------------------------------------------------------------------------------- /cmake/Modules/InstallWASP.sh.in: -------------------------------------------------------------------------------- 1 | ${CMAKE_COMMAND} \ 2 | -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ 3 | -DCMAKE_GENERATOR="${CMAKE_GENERATOR}" \ 4 | -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} \ 5 | -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} \ 6 | -DCMAKE_CXX_FLAGS=${WASP_CXX_FLAGS} \ 7 | -DCMAKE_BUILD_TYPE=Release \ 8 | -DCMAKE_INSTALL_PREFIX=${WASP_INSTALL_DIR} \ 9 | -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ 10 | -Dwasp_ENABLE_ALL_PACKAGES=OFF \ 11 | -Dwasp_ENABLE_wasphit=ON \ 12 | -Dwasp_ENABLE_testframework=OFF \ 13 | -Dwasp_ENABLE_TESTS=OFF \ 14 | -DBUILD_SHARED_LIBS=OFF \ 15 | -S${WASP_SOURCE_DIR} \ 16 | 17 | ${CMAKE_COMMAND} --build ${WASP_WORKING_DIR} 18 | ${CMAKE_COMMAND} --install ${WASP_WORKING_DIR} 19 | -------------------------------------------------------------------------------- /cmake/subproject/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.26) 2 | project(FOO) 3 | add_subdirectory(neml2) 4 | add_executable(foo main.cxx) 5 | target_link_libraries(foo PRIVATE neml2) 6 | -------------------------------------------------------------------------------- /cmake/subproject/main.cxx: -------------------------------------------------------------------------------- 1 | #include "neml2/base/Registry.h" 2 | 3 | int 4 | main() 5 | { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | *.yml 2 | Doxyfile*.sh 3 | -------------------------------------------------------------------------------- /doc/config/Python.in: -------------------------------------------------------------------------------- 1 | #--------------------------------------------------------------------------- 2 | # Configuration options related to the HTML output for Python bindings 3 | #--------------------------------------------------------------------------- 4 | HTML_OUTPUT = html/python 5 | FILE_PATTERNS = *.pyi 6 | EXTENSION_MAPPING = pyi=Python 7 | WARN_LOGFILE = ${NEML2_BINARY_DIR}/doc/doxygen.python.log 8 | LAYOUT_FILE = ${NEML2_SOURCE_DIR}/doc/config/DoxygenLayoutPython.xml 9 | -------------------------------------------------------------------------------- /doc/config/mathjax.js: -------------------------------------------------------------------------------- 1 | window.MathJax = { 2 | loader: {load: ['[tex]/ams', '[tex]/physics', '[tex]/boldsymbol']}, 3 | tex: {packages: {'[+]': ['ams', 'physics', 'boldsymbol']}, 4 | tags: 'ams'} 5 | }; 6 | -------------------------------------------------------------------------------- /doc/content/asset/cover_min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/doc/content/asset/cover_min.png -------------------------------------------------------------------------------- /doc/content/asset/perfetto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/doc/content/asset/perfetto.png -------------------------------------------------------------------------------- /doc/content/system/driver.md: -------------------------------------------------------------------------------- 1 | # Driver {#system-drivers} 2 | 3 | [TOC] 4 | 5 | Refer to [Syntax Documentation](@ref syntax-drivers) for the list of available objects. 6 | 7 | Drivers are objects that "drive" the update and evolution of one or more material models and their internal data. Especially for non-autonomous material models, a driver is mandatory to evolve the mateiral model. 8 | 9 | Drivers must derive from the base class `Driver` and override the pure virtual method `run` which returns a boolean indicating whether the model execution was successful. 10 | -------------------------------------------------------------------------------- /doc/content/system/settings.md: -------------------------------------------------------------------------------- 1 | # Settings {#system-settings} 2 | 3 | Refer to [Syntax Documentation](@ref syntax-settings) for the list of available options. 4 | 5 | The settings section allows users to specify global settings such as default tensor options, default device on which to evaluate the material model, verbosity, etc. 6 | -------------------------------------------------------------------------------- /doc/js/.gitignore: -------------------------------------------------------------------------------- 1 | package-lock.json 2 | node_modules 3 | !*.html 4 | -------------------------------------------------------------------------------- /doc/js/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "animejs": "^3.2.2" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /doc/requirements.txt: -------------------------------------------------------------------------------- 1 | PyYAML 2 | -------------------------------------------------------------------------------- /doc/tutorials/extension/argument_declaration/input.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [g] 3 | type = Vec 4 | values = '0 -9.81 0' 5 | [] 6 | [mu] 7 | type = Scalar 8 | values = 0.001 9 | [] 10 | [] 11 | 12 | [Models] 13 | [accel] 14 | type = ProjectileAcceleration 15 | velocity = 'state/v' 16 | acceleration = 'state/a' 17 | gravitational_acceleration = 'g' 18 | dynamic_viscosity = 'mu' 19 | [] 20 | [] 21 | -------------------------------------------------------------------------------- /doc/tutorials/extension/argument_declaration/src1.cxx: -------------------------------------------------------------------------------- 1 | #include "neml2/models/Model.h" 2 | #include "neml2/tensors/Vec.h" 3 | 4 | namespace neml2 5 | { 6 | class ProjectileAcceleration : public Model 7 | { 8 | public: 9 | static OptionSet expected_options(); 10 | ProjectileAcceleration(const OptionSet & options); 11 | 12 | protected: 13 | void set_value(bool, bool, bool) override {} 14 | 15 | /// Velocity of the projectile (input variable) 16 | const Variable & _v; 17 | 18 | /// Acceleration of the projectile (output variable) 19 | Variable & _a; 20 | 21 | /// Gravitational acceleration (parameter) 22 | const Vec & _g; 23 | 24 | /// Dynamic viscosity of the medium (parameter) 25 | const Scalar & _mu; 26 | }; 27 | 28 | register_NEML2_object(ProjectileAcceleration); 29 | } 30 | 31 | namespace neml2 32 | { 33 | OptionSet 34 | ProjectileAcceleration::expected_options() 35 | { 36 | OptionSet options = Model::expected_options(); 37 | options.set("velocity"); 38 | options.set("acceleration"); 39 | options.set>("gravitational_acceleration"); 40 | options.set>("dynamic_viscosity"); 41 | return options; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /doc/tutorials/extension/connection_to_input_files/input.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [g] 3 | type = Vec 4 | values = '0 -9.81 0' 5 | [] 6 | [mu] 7 | type = Scalar 8 | values = 0.001 9 | [] 10 | [] 11 | 12 | [Models] 13 | [accel] 14 | type = ProjectileAcceleration 15 | velocity = 'state/v' 16 | acceleration = 'state/a' 17 | gravitational_acceleration = 'g' 18 | dynamic_viscosity = 'mu' 19 | [] 20 | [] 21 | -------------------------------------------------------------------------------- /doc/tutorials/extension/the_forward_operator/input.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [g] 3 | type = Vec 4 | values = '0 -9.81 0' 5 | [] 6 | [mu] 7 | type = Scalar 8 | values = 0.001 9 | [] 10 | [] 11 | 12 | [Models] 13 | [accel] 14 | type = ProjectileAcceleration 15 | velocity = 'state/v' 16 | acceleration = 'state/a' 17 | gravitational_acceleration = 'g' 18 | dynamic_viscosity = 'mu' 19 | [] 20 | [] 21 | -------------------------------------------------------------------------------- /doc/tutorials/models/evaluation_device/input.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [my_model] 3 | type = LinearIsotropicElasticity 4 | strain = 'forces/E' 5 | stress = 'state/S' 6 | coefficient_types = 'BULK_MODULUS SHEAR_MODULUS' 7 | coefficients = '1.4e5 7.8e4' 8 | [] 9 | [] 10 | -------------------------------------------------------------------------------- /doc/tutorials/models/just_in_time_compilation/input.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [eq1] 3 | type = ScalarVariableRate 4 | variable = 'state/a' 5 | [] 6 | [eq2] 7 | type = ScalarVariableRate 8 | variable = 'state/b' 9 | [] 10 | [eq3] 11 | type = ScalarVariableRate 12 | variable = 'state/c' 13 | [] 14 | [eq] 15 | type = ComposedModel 16 | models = 'eq1 eq2 eq3' 17 | [] 18 | [] 19 | -------------------------------------------------------------------------------- /doc/tutorials/models/model_composition/input.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [eq1] 3 | type = SR2Invariant 4 | tensor = 'forces/a' 5 | invariant = 'state/a_bar' 6 | invariant_type = I1 7 | [] 8 | [eq2] 9 | type = SR2Invariant 10 | tensor = 'state/b' 11 | invariant = 'state/b_bar' 12 | invariant_type = VONMISES 13 | [] 14 | [eq3] 15 | type = SR2LinearCombination 16 | from_var = 'forces/a state/b' 17 | to_var = 'state/b_rate' 18 | coefficients = '1 1' 19 | coefficient_as_parameter = true 20 | [] 21 | [] 22 | -------------------------------------------------------------------------------- /doc/tutorials/models/model_composition/input_composed.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [eq1] 3 | type = SR2Invariant 4 | tensor = 'forces/a' 5 | invariant = 'state/a_bar' 6 | invariant_type = I1 7 | [] 8 | [eq2] 9 | type = SR2Invariant 10 | tensor = 'state/b' 11 | invariant = 'state/b_bar' 12 | invariant_type = VONMISES 13 | [] 14 | [eq3] 15 | type = SR2LinearCombination 16 | from_var = 'forces/a state/b' 17 | to_var = 'state/b_rate' 18 | coefficients = 'eq2 eq1' 19 | coefficient_as_parameter = true 20 | [] 21 | [eq] 22 | type = ComposedModel 23 | models = 'eq1 eq2 eq3' 24 | [] 25 | [] 26 | -------------------------------------------------------------------------------- /doc/tutorials/models/model_parameters/input.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [my_model] 3 | type = LinearIsotropicElasticity 4 | strain = 'forces/E' 5 | stress = 'state/S' 6 | coefficient_types = 'BULK_MODULUS SHEAR_MODULUS' 7 | coefficients = '1.4e5 7.8e4' 8 | [] 9 | [] 10 | -------------------------------------------------------------------------------- /doc/tutorials/models/model_parameters_revisited/input1.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [eq1] 3 | type = ThermalEigenstrain 4 | reference_temperature = '300' 5 | CTE = '1e-6' 6 | eigenstrain = 'forces/Eg' 7 | [] 8 | [eq2] 9 | type = SR2LinearCombination 10 | from_var = 'forces/E forces/Eg' 11 | to_var = 'forces/Ee' 12 | coefficients = '1 -1' 13 | [] 14 | [eq3] 15 | type = LinearIsotropicElasticity 16 | strain = 'forces/Ee' 17 | stress = 'state/S' 18 | coefficient_types = 'BULK_MODULUS SHEAR_MODULUS' 19 | coefficients = '1.4e5 7.8e4' 20 | [] 21 | [eq] 22 | type = ComposedModel 23 | models = 'eq1 eq2 eq3' 24 | [] 25 | [] 26 | -------------------------------------------------------------------------------- /doc/tutorials/models/model_parameters_revisited/input2.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [alpha] 3 | type = Scalar 4 | values = '1e-6 2e-6 1e-5 5e-7' 5 | batch_shape = (2,2) 6 | [] 7 | [] 8 | 9 | [Models] 10 | [eq1] 11 | type = ThermalEigenstrain 12 | reference_temperature = '300' 13 | CTE = 'alpha' 14 | eigenstrain = 'forces/Eg' 15 | [] 16 | [eq2] 17 | type = SR2LinearCombination 18 | from_var = 'forces/E forces/Eg' 19 | to_var = 'forces/Ee' 20 | coefficients = '1 -1' 21 | [] 22 | [eq3] 23 | type = LinearIsotropicElasticity 24 | strain = 'forces/Ee' 25 | stress = 'state/S' 26 | coefficient_types = 'BULK_MODULUS SHEAR_MODULUS' 27 | coefficients = '1.4e5 7.8e4' 28 | [] 29 | [eq] 30 | type = ComposedModel 31 | models = 'eq1 eq2 eq3' 32 | [] 33 | [] 34 | -------------------------------------------------------------------------------- /doc/tutorials/models/model_parameters_revisited/input3.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [alpha] 3 | type = ScalarLinearInterpolation 4 | argument = 'forces/T' 5 | abscissa = '300 400 500' 6 | ordinate = '1e-5 1.5e-5 1.8e-5' 7 | [] 8 | [K] 9 | type = ScalarLinearInterpolation 10 | argument = 'forces/T' 11 | abscissa = '300 350 400 450' 12 | ordinate = '1.4e5 1.35e5 1.32e5 1.25e5' 13 | [] 14 | [G] 15 | type = ScalarLinearInterpolation 16 | argument = 'forces/T' 17 | abscissa = '300 500' 18 | ordinate = '7.8e4 7e4' 19 | [] 20 | [eq1] 21 | type = ThermalEigenstrain 22 | reference_temperature = '300' 23 | CTE = 'alpha' 24 | eigenstrain = 'forces/Eg' 25 | [] 26 | [eq2] 27 | type = SR2LinearCombination 28 | from_var = 'forces/E forces/Eg' 29 | to_var = 'forces/Ee' 30 | coefficients = '1 -1' 31 | [] 32 | [eq3] 33 | type = LinearIsotropicElasticity 34 | strain = 'forces/Ee' 35 | stress = 'state/S' 36 | coefficient_types = 'BULK_MODULUS SHEAR_MODULUS' 37 | coefficients = 'K G' 38 | [] 39 | [eq] 40 | type = ComposedModel 41 | models = 'eq1 eq2 eq3' 42 | [] 43 | [] 44 | -------------------------------------------------------------------------------- /doc/tutorials/models/model_parameters_revisited/input4.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [K] 3 | type = ScalarLinearInterpolation 4 | argument = 'forces/T' 5 | abscissa = '300 350 400 450' 6 | ordinate = '1.4e5 1.35e5 1.32e5 1.25e5' 7 | [] 8 | [G] 9 | type = ScalarLinearInterpolation 10 | argument = 'forces/T' 11 | abscissa = '300 500' 12 | ordinate = '7.8e4 7e4' 13 | [] 14 | [eq1] 15 | type = ThermalEigenstrain 16 | reference_temperature = '300' 17 | CTE = 'forces/alpha' 18 | eigenstrain = 'forces/Eg' 19 | [] 20 | [eq2] 21 | type = SR2LinearCombination 22 | from_var = 'forces/E forces/Eg' 23 | to_var = 'forces/Ee' 24 | coefficients = '1 -1' 25 | [] 26 | [eq3] 27 | type = LinearIsotropicElasticity 28 | strain = 'forces/Ee' 29 | stress = 'state/S' 30 | coefficient_types = 'BULK_MODULUS SHEAR_MODULUS' 31 | coefficients = 'K G' 32 | [] 33 | [eq] 34 | type = ComposedModel 35 | models = 'eq1 eq2 eq3' 36 | [] 37 | [] 38 | -------------------------------------------------------------------------------- /doc/tutorials/models/models.md: -------------------------------------------------------------------------------- 1 | @insert-title:tutorials-models 2 | 3 | NEML2 comes with a large collection of material models. These material models can be either used on their own or serve as building blocks for more complicated material models. 4 | 5 | Once NEML2 is [installed](@ref install), there is no need to write additional C++ code to define the material model of interest -- NEML2 can read from text-based [input files](@ref tutorials-models-input-file) to dynamically construct material models. 6 | 7 | This set of tutorials walk through typical use cases for interacting with existing NEML2 material models. 8 | 9 | @insert-subsection-list 10 | -------------------------------------------------------------------------------- /doc/tutorials/models/running_your_first_model/input.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [my_model] 3 | type = LinearIsotropicElasticity 4 | strain = 'forces/E' 5 | stress = 'state/S' 6 | coefficient_types = 'BULK_MODULUS SHEAR_MODULUS' 7 | coefficients = '1.4e5 7.8e4' 8 | [] 9 | [] 10 | -------------------------------------------------------------------------------- /doc/tutorials/models/vectorization/input.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [my_model] 3 | type = LinearIsotropicElasticity 4 | strain = 'forces/E' 5 | stress = 'state/S' 6 | coefficient_types = 'BULK_MODULUS SHEAR_MODULUS' 7 | coefficients = '1.4e5 7.8e4' 8 | [] 9 | [] 10 | -------------------------------------------------------------------------------- /doc/tutorials/optimization/automatic_differentiation/input.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [model] 3 | type = LinearIsotropicElasticity 4 | strain = 'forces/E' 5 | stress = 'state/S' 6 | coefficient_types = 'BULK_MODULUS SHEAR_MODULUS' 7 | coefficients = '1.4e5 7.8e4' 8 | [] 9 | [] 10 | -------------------------------------------------------------------------------- /doc/tutorials/optimization/optimization.md: -------------------------------------------------------------------------------- 1 | @insert-title:tutorials-optimization 2 | 3 | The previous tutorials illustrated the use of NEML2 constitutive models in the "feed-forward" setting, i.e., the model maps from input variables to output variables with a given parametrization, i.e. 4 | \f[ 5 | y = f(x; p, b). 6 | \f] 7 | Recall that \f$p\f$ and \f$b\f$ are respectively the parameters and the buffers of the model. 8 | 9 | Another interesting use of NEML2 constitutive models is *parameter calibration*: With given input variables \f$x\f$, find the optimal parameter set \f$p^*\f$ such that 10 | \f[ 11 | p^* = \mathop{\mathrm{argmin}}\limits_{p} l(f(x; p, b)), 12 | \f] 13 | where \f$l\f$ is oftentimes referred to as the loss (or objective) function defining optimality. 14 | 15 | This set of tutorials demonstrate the use of PyTorch [Autograd](https://pytorch.org/tutorials/beginner/blitz/autograd_tutorial.html) to calculate parameter derivatives (\f$\pdv{l}{p}\f$), which is a necessary ingredient in all gradient-based optimizers. 16 | 17 | @insert-subsection-list 18 | -------------------------------------------------------------------------------- /doc/tutorials/optimization/parameter_calibration/input.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [model] 3 | type = LinearIsotropicElasticity 4 | strain = 'forces/E' 5 | stress = 'state/S' 6 | coefficient_types = 'BULK_MODULUS SHEAR_MODULUS' 7 | coefficients = '10 7' 8 | [] 9 | [] 10 | -------------------------------------------------------------------------------- /doc/tutorials/tensors/tensors.md: -------------------------------------------------------------------------------- 1 | @insert-title:tutorials-tensors 2 | 3 | NEML2 is equipped with its own tensor library. Currently, PyTorch (more specifically, ATen) is the only supported tensor backend in NEML2. Therefore, all tensor types in NEML2 directly inherit from `torch::Tensor`. In the future, support for other tensor backends may be added, but the public-facing interfaces will remain largely the same. 4 | 5 | This set of tutorials introduce the basic API of NEML2's tensor library: 6 | 7 | @insert-subsection-list 8 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = [ 3 | "setuptools>=42", 4 | "cmake>=3.26,<4.0", 5 | "ninja", 6 | "pybind11", 7 | "pybind11-stubgen", 8 | "packaging", 9 | ] 10 | build-backend = "setuptools.build_meta" 11 | 12 | [project] 13 | name = "neml2" 14 | version = "2.0.0" 15 | authors = [ 16 | { name = "Mark Messner", email = "messner@anl.gov" }, 17 | { name = "Gary Hu", email = "thu@anl.gov" }, 18 | ] 19 | description = "GPU-enabled vectorized material modeling library" 20 | readme = "README.md" 21 | requires-python = ">=3.9" 22 | dependencies = ["torch"] 23 | 24 | [tool.black] 25 | line-length = 100 26 | 27 | [tool.cibuildwheel] 28 | build = "cp38-* cp39-* cp310-* cp311-* cp312-* cp313-*" 29 | skip = "*win* *manylinux_i686 *manylinux_aarch64 *manylinux_ppc64le *manylinux_s390x *manylinux_armv7l *musllinux*" 30 | 31 | environment = { CMAKE_GENERATOR = "Ninja" } 32 | build-verbosity = 1 33 | 34 | before-all = "" 35 | before-build = "python -m pip install -r requirements.txt cmake ninja torch" 36 | 37 | test-requires = "pytest torch pyzag==1.1.1 graphviz" 38 | test-command = "pytest -v {project}/python/tests" 39 | 40 | [tool.cibuildwheel.linux] 41 | repair-wheel-command = "" 42 | 43 | [tool.cibuildwheel.macos] 44 | repair-wheel-command = "" 45 | -------------------------------------------------------------------------------- /python/examples/README.md: -------------------------------------------------------------------------------- 1 | # Jupyter notebook examples of the NEML2/pyzag interface 2 | 3 | ## Setup 4 | 5 | To run these notebooks install the packages given in `python/examples/requirements.txt` 6 | 7 | ``` 8 | pip install -r python/examples/requirements.txt 9 | ``` 10 | 11 | after building the NEML2 python package and installing the main set of python requirements in `requirements.txt` in the root directory. 12 | 13 | ## Version control for Jupyter notebook examples 14 | 15 | We track these notebooks with the `nbdime` python tool, installed as part of the package requirements. The first time you install this for use in a new repository you need to run 16 | 17 | ``` 18 | git-nbdiffdriver config --enable 19 | ``` 20 | 21 | to enable the hooks. -------------------------------------------------------------------------------- /python/examples/requirements.txt: -------------------------------------------------------------------------------- 1 | nbdime 2 | pyro-ppl 3 | tqdm 4 | matplotlib 5 | ipykernel 6 | ipywidgets -------------------------------------------------------------------------------- /python/neml2/postprocessing/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2024, UChicago Argonne, LLC 2 | # All Rights Reserved 3 | # Software Name: NEML2 -- the New Engineering material Model Library, version 2 4 | # By: Argonne National Laboratory 5 | # OPEN SOURCE LICENSE (MIT) 6 | # 7 | # Permission is hereby granted, free of charge, to any person obtaining a copy 8 | # of this software and associated documentation files (the "Software"), to deal 9 | # in the Software without restriction, including without limitation the rights 10 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | # copies of the Software, and to permit persons to whom the Software is 12 | # furnished to do so, subject to the following conditions: 13 | # 14 | # The above copyright notice and this permission notice shall be included in 15 | # all copies or substantial portions of the Software. 16 | # 17 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | # THE SOFTWARE. 24 | 25 | from .odf import * 26 | from .polefigure import * 27 | -------------------------------------------------------------------------------- /python/neml2/pyzag/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2024, UChicago Argonne, LLC 2 | # All Rights Reserved 3 | # Software Name: NEML2 -- the New Engineering material Model Library, version 2 4 | # By: Argonne National Laboratory 5 | # OPEN SOURCE LICENSE (MIT) 6 | # 7 | # Permission is hereby granted, free of charge, to any person obtaining a copy 8 | # of this software and associated documentation files (the "Software"), to deal 9 | # in the Software without restriction, including without limitation the rights 10 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | # copies of the Software, and to permit persons to whom the Software is 12 | # furnished to do so, subject to the following conditions: 13 | # 14 | # The above copyright notice and this permission notice shall be included in 15 | # all copies or substantial portions of the Software. 16 | # 17 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | # THE SOFTWARE. 24 | 25 | from .interface import * 26 | -------------------------------------------------------------------------------- /python/neml2/requirements.txt: -------------------------------------------------------------------------------- 1 | pybind11 2 | pybind11-stubgen 3 | -------------------------------------------------------------------------------- /python/requirements.txt: -------------------------------------------------------------------------------- 1 | -r neml2/requirements.txt 2 | -r tests/requirements.txt 3 | -------------------------------------------------------------------------------- /python/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- 2 | # Dependencies and 3rd party packages 3 | # ---------------------------------------------------------------------------- 4 | find_package(Python3 REQUIRED) 5 | execute_process( 6 | COMMAND_ERROR_IS_FATAL ANY 7 | COMMAND ${Python3_EXECUTABLE} ${NEML2_SOURCE_DIR}/scripts/check_python_dep.py ${CMAKE_CURRENT_SOURCE_DIR}/requirements.txt 8 | ) 9 | 10 | # ---------------------------------------------------------------------------- 11 | # Install test resources 12 | # ---------------------------------------------------------------------------- 13 | install(DIRECTORY . 14 | DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/neml2/python 15 | COMPONENT libneml2-python 16 | FILES_MATCHING 17 | PATTERN "*.py" 18 | PATTERN "*.i" 19 | PATTERN "*.pt" 20 | PATTERN "__pycache__" EXCLUDE 21 | ) 22 | -------------------------------------------------------------------------------- /python/tests/pyzag/gold/elastic_model.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/python/tests/pyzag/gold/elastic_model.pt -------------------------------------------------------------------------------- /python/tests/pyzag/gold/km_mixed_model.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/python/tests/pyzag/gold/km_mixed_model.pt -------------------------------------------------------------------------------- /python/tests/pyzag/gold/viscoplastic_model.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/python/tests/pyzag/gold/viscoplastic_model.pt -------------------------------------------------------------------------------- /python/tests/requirements.txt: -------------------------------------------------------------------------------- 1 | pyzag>=1.1.1 2 | pytest 3 | graphviz 4 | -------------------------------------------------------------------------------- /python/tests/test_LabeledAxis.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [foo] 3 | type = ScalarBackwardEulerTimeIntegration 4 | variable = 'state/foo' 5 | [] 6 | [bar] 7 | type = ScalarBackwardEulerTimeIntegration 8 | variable = 'state/bar' 9 | [] 10 | [baz] 11 | type = ScalarLinearCombination 12 | from_var = 'residual/foo residual/bar' 13 | to_var = 'residual/foo_bar' 14 | [] 15 | [model] 16 | type = ComposedModel 17 | models = 'foo bar baz' 18 | [] 19 | [] 20 | -------------------------------------------------------------------------------- /python/tests/test_Model.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [foo] 3 | type = ScalarBackwardEulerTimeIntegration 4 | variable = 'state/foo' 5 | [] 6 | [bar] 7 | type = ScalarBackwardEulerTimeIntegration 8 | variable = 'state/bar' 9 | [] 10 | [baz] 11 | type = ScalarLinearCombination 12 | from_var = 'residual/foo residual/bar' 13 | to_var = 'residual/foo_bar' 14 | [] 15 | [model] 16 | type = ComposedModel 17 | models = 'foo bar baz' 18 | [] 19 | [] 20 | -------------------------------------------------------------------------------- /python/tests/test_Model_diagnose.i: -------------------------------------------------------------------------------- 1 | [Solvers] 2 | [newton] 3 | type = Newton 4 | abs_tol = 1e-10 5 | rel_tol = 1e-08 6 | max_its = 20 7 | [] 8 | [] 9 | 10 | [Models] 11 | [copy1] 12 | type = CopyScalar 13 | from = 'state/foo' 14 | to = 'forces/foo' 15 | [] 16 | [copy2] 17 | type = CopyScalar 18 | from = 'forces/foo' 19 | to = 'residual/foo' 20 | [] 21 | [implicit] 22 | type = ComposedModel 23 | models = 'copy1 copy2' 24 | [] 25 | [model] 26 | type = ImplicitUpdate 27 | implicit_model = 'implicit' 28 | solver = 'newton' 29 | [] 30 | [] 31 | -------------------------------------------------------------------------------- /python/tests/test_ParameterStore.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [model] 3 | type = LinearIsotropicElasticity 4 | coefficients = '100 0.3' 5 | coefficient_types = 'YOUNGS_MODULUS POISSONS_RATIO' 6 | [] 7 | [] 8 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | numpy<2 2 | -r doc/requirements.txt 3 | -r scripts/requirements.txt 4 | -r python/requirements.txt 5 | -------------------------------------------------------------------------------- /runner/benchmark/.gitignore: -------------------------------------------------------------------------------- 1 | results 2 | -------------------------------------------------------------------------------- /runner/benchmark/elasticity/model.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [end_time] 3 | type = LogspaceScalar 4 | start = 5 5 | end = 5 6 | nstep = ${nbatch} 7 | [] 8 | [times] 9 | type = LinspaceScalar 10 | start = 0 11 | end = end_time 12 | nstep = 100 13 | [] 14 | [exx] 15 | type = FullScalar 16 | batch_shape = '(${nbatch})' 17 | value = 0.1 18 | [] 19 | [eyy] 20 | type = FullScalar 21 | batch_shape = '(${nbatch})' 22 | value = -0.05 23 | [] 24 | [ezz] 25 | type = FullScalar 26 | batch_shape = '(${nbatch})' 27 | value = -0.05 28 | [] 29 | [max_strain] 30 | type = FillSR2 31 | values = 'exx eyy ezz' 32 | [] 33 | [strains] 34 | type = LinspaceSR2 35 | start = 0 36 | end = max_strain 37 | nstep = 100 38 | [] 39 | [] 40 | 41 | [Drivers] 42 | [driver] 43 | type = SDTSolidMechanicsDriver 44 | model = 'model' 45 | prescribed_time = 'times' 46 | prescribed_strain = 'strains' 47 | device = ${device} 48 | [] 49 | [] 50 | 51 | [Models] 52 | [model] 53 | type = LinearIsotropicElasticity 54 | coefficients = '1e3 0.3' 55 | coefficient_types = 'YOUNGS_MODULUS POISSONS_RATIO' 56 | strain = 'forces/E' 57 | stress = 'state/S' 58 | [] 59 | [] 60 | -------------------------------------------------------------------------------- /runner/benchmark/requirements.txt: -------------------------------------------------------------------------------- 1 | numpy 2 | scipy 3 | pandas 4 | matplotlib 5 | -------------------------------------------------------------------------------- /scripts/gcov_clang_wrapper.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | # Copyright 2024, UChicago Argonne, LLC 4 | # All Rights Reserved 5 | # Software Name: NEML2 -- the New Engineering material Model Library, version 2 6 | # By: Argonne National Laboratory 7 | # OPEN SOURCE LICENSE (MIT) 8 | # 9 | # Permission is hereby granted, free of charge, to any person obtaining a copy 10 | # of this software and associated documentation files (the "Software"), to deal 11 | # in the Software without restriction, including without limitation the rights 12 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | # copies of the Software, and to permit persons to whom the Software is 14 | # furnished to do so, subject to the following conditions: 15 | # 16 | # The above copyright notice and this permission notice shall be included in 17 | # all copies or substantial portions of the Software. 18 | # 19 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | # THE SOFTWARE. 26 | 27 | exec llvm-cov gcov "$@" 28 | -------------------------------------------------------------------------------- /scripts/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/scripts/requirements.txt -------------------------------------------------------------------------------- /tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- 2 | # Subdirectories 3 | # ---------------------------------------------------------------------------- 4 | # Test utilities 5 | add_subdirectory(src) 6 | 7 | # Example extension library for testing dynamic registration 8 | add_subdirectory(extension) 9 | 10 | # Unit tests 11 | add_subdirectory(unit) 12 | 13 | # Regression tests 14 | add_subdirectory(regression) 15 | 16 | # Verification tests 17 | add_subdirectory(verification) 18 | 19 | # Work dispatcher tests 20 | if(NEML2_WORK_DISPATCHER) 21 | add_subdirectory(dispatchers) 22 | endif() 23 | -------------------------------------------------------------------------------- /tests/dispatchers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE srcs CONFIGURE_DEPENDS *.cxx) 2 | add_executable(dispatcher_tests ${srcs}) 3 | target_link_libraries(dispatcher_tests PRIVATE testutils) 4 | target_compile_options(dispatcher_tests PRIVATE -Wall -Wextra -pedantic) 5 | set_target_properties(dispatcher_tests PROPERTIES INSTALL_RPATH_USE_LINK_PATH ON) 6 | -------------------------------------------------------------------------------- /tests/dispatchers/model.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [integrate_foo] 3 | type = ScalarBackwardEulerTimeIntegration 4 | variable = 'state/foo' 5 | [] 6 | [integrate_bar] 7 | type = ScalarBackwardEulerTimeIntegration 8 | variable = 'state/bar' 9 | [] 10 | [residual_sum] 11 | type = ScalarLinearCombination 12 | from_var = 'residual/foo residual/bar' 13 | to_var = 'residual/foo_bar' 14 | [] 15 | [model] 16 | type = ComposedModel 17 | models = 'integrate_foo integrate_bar residual_sum' 18 | [] 19 | [] 20 | -------------------------------------------------------------------------------- /tests/extension/.gitignore: -------------------------------------------------------------------------------- 1 | FooModel.i 2 | -------------------------------------------------------------------------------- /tests/extension/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(extension SHARED FooModel.cxx) 2 | target_include_directories(extension PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) 3 | target_link_libraries(extension PRIVATE neml2) 4 | target_compile_options(extension PRIVATE -Wall -Wextra -pedantic) 5 | set_target_properties(extension 6 | PROPERTIES 7 | INSTALL_RPATH_USE_LINK_PATH ON 8 | LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 9 | ) 10 | 11 | set(EXTENSION_LIB ${CMAKE_CURRENT_SOURCE_DIR}/libextension${CMAKE_SHARED_LIBRARY_SUFFIX}) 12 | configure_file(FooModel.i.in ${CMAKE_CURRENT_SOURCE_DIR}/FooModel.i) 13 | -------------------------------------------------------------------------------- /tests/extension/FooModel.i.in: -------------------------------------------------------------------------------- 1 | [Settings] 2 | additional_libraries = '${EXTENSION_LIB}' 3 | [] 4 | 5 | [Models] 6 | [foo] 7 | type = FooModel 8 | x = 'forces/x' 9 | y = 'state/y' 10 | c = 1.1 11 | [] 12 | [] 13 | -------------------------------------------------------------------------------- /tests/regression/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE srcs CONFIGURE_DEPENDS *.cxx) 2 | add_executable(regression_tests ${srcs}) 3 | target_link_libraries(regression_tests PRIVATE testutils) 4 | target_compile_options(regression_tests PRIVATE -Wall -Wextra -pedantic) 5 | set_target_properties(regression_tests PROPERTIES INSTALL_RPATH_USE_LINK_PATH ON) 6 | -------------------------------------------------------------------------------- /tests/regression/phase_field_fracture/elastic_brittle_fracture/gold/pff_result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/phase_field_fracture/elastic_brittle_fracture/gold/pff_result.pt -------------------------------------------------------------------------------- /tests/regression/pyrolysis/TGA/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/pyrolysis/TGA/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/reactive_infiltration/constant_liquid_concentration/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/reactive_infiltration/constant_liquid_concentration/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/crystal_plasticity/single_crystal_coupled/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/crystal_plasticity/single_crystal_coupled/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/crystal_plasticity/single_crystal_coupled/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/crystal_plasticity/single_crystal_coupled_multiplicative/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/crystal_plasticity/single_crystal_coupled_multiplicative/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/crystal_plasticity/single_crystal_coupled_multiplicative/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/crystal_plasticity/single_crystal_coupled_triclinic/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/crystal_plasticity/single_crystal_coupled_triclinic/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/crystal_plasticity/single_crystal_coupled_triclinic/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/crystal_plasticity/single_crystal_decoupled/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/crystal_plasticity/single_crystal_decoupled/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/crystal_plasticity/single_crystal_decoupled/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/crystal_plasticity/single_crystal_decoupled_explicit_orientation/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/crystal_plasticity/single_crystal_decoupled_explicit_orientation/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/crystal_plasticity/single_crystal_decoupled_explicit_orientation/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/crystal_plasticity/single_crystal_spatial_velocity_gradient/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/crystal_plasticity/single_crystal_spatial_velocity_gradient/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/crystal_plasticity/single_crystal_spatial_velocity_gradient/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/km_flow/full_model/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/km_flow/full_model/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/km_flow/full_model/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/km_flow/mixed_control/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/km_flow/mixed_control/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/km_flow/mixed_control/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/km_flow/mixed_control/model_with_simple_scheduler_async.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = true 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/km_flow/simple_mix/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/km_flow/simple_mix/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/km_flow/simple_mix/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/mixed_control/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/mixed_control/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/mixed_control/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/rate_independent_plasticity/gurson/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/rate_independent_plasticity/gurson/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/rate_independent_plasticity/isoharden/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/rate_independent_plasticity/isoharden/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/rate_independent_plasticity/isoharden/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/rate_independent_plasticity/isokinharden/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/rate_independent_plasticity/isokinharden/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/rate_independent_plasticity/isokinharden/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/rate_independent_plasticity/kinharden/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/rate_independent_plasticity/kinharden/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/rate_independent_plasticity/kinharden/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/rate_independent_plasticity/perfect/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/rate_independent_plasticity/perfect/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/rate_independent_plasticity/perfect/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/rate_independent_plasticity/perfect_temperature/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/rate_independent_plasticity/perfect_temperature/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/rate_independent_plasticity/perfect_temperature/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/rate_independent_plasticity/radial_return/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/rate_independent_plasticity/radial_return/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/rate_independent_plasticity/radial_return/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/recovery/nonassociative_isotropic_kinematic/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/recovery/nonassociative_isotropic_kinematic/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/recovery/nonassociative_isotropic_kinematic/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/recovery/static_recovery/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/recovery/static_recovery/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/recovery/static_recovery/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/recovery/thermal_annealing/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/recovery/thermal_annealing/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/recovery/thermal_annealing/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/alt_composition/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/viscoplasticity/alt_composition/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/alt_composition/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/chaboche/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/viscoplasticity/chaboche/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/chaboche/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/drucker_prager/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/viscoplasticity/drucker_prager/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/drucker_prager/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/free_sintering/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/viscoplasticity/free_sintering/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/isoharden/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/viscoplasticity/isoharden/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/isoharden/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/isokinharden/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/viscoplasticity/isokinharden/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/isokinharden/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/kinharden/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/viscoplasticity/kinharden/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/kinharden/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/misc/polynomial/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/viscoplasticity/misc/polynomial/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/misc/torch_script/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/viscoplasticity/misc/torch_script/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/misc/torch_script/gold/surrogate.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/viscoplasticity/misc/torch_script/gold/surrogate.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/perfect/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/viscoplasticity/perfect/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/perfect/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/radial_return/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/viscoplasticity/radial_return/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/radial_return/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/stress_control/gold/result.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/regression/solid_mechanics/viscoplasticity/stress_control/gold/result.pt -------------------------------------------------------------------------------- /tests/regression/solid_mechanics/viscoplasticity/stress_control/model_with_simple_scheduler.i: -------------------------------------------------------------------------------- 1 | !include model.i 2 | 3 | [Schedulers] 4 | [scheduler] 5 | type = SimpleScheduler 6 | device = cpu 7 | batch_size = 8 8 | [] 9 | [] 10 | 11 | [Drivers] 12 | [driver] 13 | scheduler = scheduler 14 | async_dispatch = false 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE srcs CONFIGURE_DEPENDS *.cxx) 2 | add_library(testutils OBJECT ${srcs}) 3 | target_include_directories(testutils PUBLIC ${NEML2_SOURCE_DIR}/tests/include) 4 | target_link_libraries(testutils PUBLIC neml2 Catch2::Catch2) 5 | target_compile_options(testutils PRIVATE -Wall -Wextra -pedantic) 6 | -------------------------------------------------------------------------------- /tests/unit/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE srcs CONFIGURE_DEPENDS *.cxx) 2 | add_executable(unit_tests ${srcs}) 3 | target_link_libraries(unit_tests PRIVATE testutils) 4 | target_compile_options(unit_tests PRIVATE -Wall -Wextra -pedantic) 5 | set_target_properties(unit_tests PROPERTIES INSTALL_RPATH_USE_LINK_PATH ON) 6 | -------------------------------------------------------------------------------- /tests/unit/base/test_HITParser1.i: -------------------------------------------------------------------------------- 1 | x = 5 2 | pi = 3.14159 3 | day = 'day' 4 | 5 | [Settings] 6 | default_integer_type = 'Int32' 7 | machine_precision = 0.5 8 | tolerance = 0.1 9 | tighter_tolerance = 0.01 10 | buffer_name_separator = '::' 11 | parameter_name_separator = '::' 12 | require_double_precision = false 13 | [] 14 | 15 | [Models] 16 | [foo] 17 | type = SampleParserTestingModel 18 | bool = true 19 | bool_vec = 'true false false' 20 | bool_vec_vec = 'true false; false true true; false false false' 21 | int = ${x} 22 | int_vec = '5 6 7' 23 | int_vec_vec = '-1 3 -2; -5' 24 | uint = 30 25 | uint_vec = '1 2 3' 26 | uint_vec_vec = '555; 123; 1 5 9' 27 | Real = ${pi} 28 | Real_vec = '-111 12 1.1' 29 | Real_vec_vec = '1 3 5; 2 4 6; -3 -5 -7' 30 | string = 'today' 31 | string_vec = 'is a good ${day}' 32 | string_vec_vec = 'neml2 is very; useful' 33 | shape = '(1,2,3,5)' 34 | shape_vec = '(1,2,3) (2,3) (5)' 35 | shape_vec_vec = '(2,5) () (3,3); (2,2) (1) (22)' 36 | device = 'cpu' 37 | device_vec = 'cpu cuda:0 cuda:1' 38 | device_vec_vec = 'cpu cuda:0; cuda; cuda:2 cpu' 39 | [] 40 | [] 41 | -------------------------------------------------------------------------------- /tests/unit/base/test_HITParser2.i: -------------------------------------------------------------------------------- 1 | x = 5 2 | pi = 3.14159 3 | day = 'day' 4 | 5 | [Models] 6 | [foo] 7 | type = SampleParserTestingModel 8 | bool = true 9 | bool_vec = 'true false false' 10 | bool_vec_vec = 'true false; false true true; false false false' 11 | int = ${x} 12 | int_vec = '5 6 7' 13 | int_vec_vec = '-1 3 -2; -5' 14 | uint = 30 15 | uint_vec = '1 2 3' 16 | uint_vec_vec = '555; 123; 1 5 9' 17 | Real = ${pi} 18 | Real_vec = '-111 12 1.1' 19 | Real_vec_vec = '1 3 5; 2 4 6; -3 -5 -7' 20 | string = 'today' 21 | string_vec = 'is a good ${day}' 22 | string_vec_vec = 'neml2 is very; useful' 23 | shape = '(1,2,3,5)' 24 | shape_vec = '(1,2,3) (2,3) (5)' 25 | shape_vec_vec = '(2,5) () (3,3); (2,2) (1) (22)' 26 | suppressed_option = 'this should not work' 27 | [] 28 | [] 29 | -------------------------------------------------------------------------------- /tests/unit/models/ADSampleRateModel.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/foo state/bar forces/temperature' 6 | input_Scalar_values = '1 2 100' 7 | input_SR2_names = 'state/baz' 8 | input_SR2_values = '0.5' 9 | output_Scalar_names = 'state/foo_rate state/bar_rate' 10 | output_Scalar_values = '301.5 -89.02' 11 | output_SR2_names = 'state/baz_rate' 12 | output_SR2_values = '145.5' 13 | check_values = true 14 | check_derivatives = true 15 | check_second_derivatives = false 16 | [] 17 | [] 18 | 19 | [Models] 20 | [model] 21 | type = ADSampleRateModel 22 | [] 23 | [] 24 | -------------------------------------------------------------------------------- /tests/unit/models/ArrheniusParameter.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'p' 5 | input_Scalar_names = 'forces/T' 6 | input_Scalar_values = '1000' 7 | output_Scalar_names = 'parameters/p' 8 | output_Scalar_values = 'p_correct' 9 | check_second_derivatives = true 10 | [] 11 | [] 12 | 13 | [Models] 14 | [p] 15 | type = ArrheniusParameter 16 | temperature = 'forces/T' 17 | reference_value = 'p0' 18 | activation_energy = 'Q' 19 | ideal_gas_constant = 8.314 20 | [] 21 | [] 22 | 23 | [Tensors] 24 | [p0] 25 | type = LinspaceScalar 26 | start = 1 27 | end = 10 28 | nstep = 5 29 | [] 30 | [Q] 31 | type = LinspaceScalar 32 | start = 1e3 33 | end = 2e4 34 | nstep = 5 35 | [] 36 | [p_correct] 37 | type = Scalar 38 | values = "0.8866729736328125 39 | 1.6275087594985962 40 | 1.5555329322814941 41 | 1.2379260063171387 42 | 0.9021309018135071" 43 | batch_shape = '(5)' 44 | [] 45 | [] 46 | -------------------------------------------------------------------------------- /tests/unit/models/ComposedModel1.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/foo state/bar state/foo_rate state/bar_rate old_state/foo old_state/bar forces/t old_forces/t' 6 | input_Scalar_values = '2 -1 5 -3 0 0 1.3 1.1' 7 | output_Scalar_names = 'residual/foo_bar' 8 | output_Scalar_values = '0.6' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [integrate_foo] 14 | type = ScalarBackwardEulerTimeIntegration 15 | variable = 'state/foo' 16 | [] 17 | [integrate_bar] 18 | type = ScalarBackwardEulerTimeIntegration 19 | variable = 'state/bar' 20 | [] 21 | [residual_sum] 22 | type = ScalarLinearCombination 23 | from_var = 'residual/foo residual/bar' 24 | to_var = 'residual/foo_bar' 25 | [] 26 | [model] 27 | type = ComposedModel 28 | models = 'integrate_foo integrate_bar residual_sum' 29 | [] 30 | [] 31 | -------------------------------------------------------------------------------- /tests/unit/models/ComposedModel4.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [foo] 3 | type = Scalar 4 | values = '1.0' 5 | batch_shape = '(5,2)' 6 | [] 7 | [] 8 | 9 | [Drivers] 10 | [unit] 11 | type = ModelUnitTest 12 | model = 'model' 13 | input_Scalar_names = 'old_state/foo state/foo forces/t old_forces/t' 14 | input_Scalar_values = '0 foo 1.3 1.1' 15 | output_Scalar_names = 'state/foo' 16 | output_Scalar_values = '0' 17 | [] 18 | [] 19 | 20 | [Solvers] 21 | [newton] 22 | type = Newton 23 | abs_tol = 1e-10 24 | rel_tol = 1e-08 25 | max_its = 100 26 | [] 27 | [] 28 | 29 | [Models] 30 | [foo_rate] 31 | type = CopyScalar 32 | from = 'state/foo' 33 | to = 'state/foo_rate' 34 | [] 35 | [integrate_foo] 36 | type = ScalarBackwardEulerTimeIntegration 37 | variable = 'state/foo' 38 | [] 39 | [implicit_model] 40 | type = ComposedModel 41 | models = 'foo_rate integrate_foo' 42 | [] 43 | [model] 44 | type = ImplicitUpdate 45 | implicit_model = 'implicit_model' 46 | solver = 'newton' 47 | [] 48 | [] 49 | -------------------------------------------------------------------------------- /tests/unit/models/ComposedModel5.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [T_vals] 3 | type = Scalar 4 | values = '0 100 200' 5 | batch_shape = '(3)' 6 | [] 7 | [c_A_vals] 8 | type = Scalar 9 | values = '1 2 3' 10 | batch_shape = '(3)' 11 | [] 12 | [] 13 | 14 | [Drivers] 15 | [unit] 16 | type = ModelUnitTest 17 | model = 'model' 18 | input_Scalar_names = 'forces/T state/A state/B' 19 | input_Scalar_values = '100 0.5 1.5' 20 | output_Scalar_names = 'state/C' 21 | output_Scalar_values = '9.25' 22 | check_AD_parameter_derivatives = false 23 | [] 24 | [] 25 | 26 | [Models] 27 | [c_A] 28 | type = ScalarLinearInterpolation 29 | argument = 'forces/T' 30 | abscissa = 'T_vals' 31 | ordinate = 'c_A_vals' 32 | [] 33 | [model0] 34 | type = ScalarLinearCombination 35 | from_var = 'state/A state/B' 36 | to_var = 'state/C' 37 | coefficients = 'c_A 5.5' 38 | coefficient_as_parameter = 'true true' 39 | [] 40 | [model] 41 | type = ComposedModel 42 | models = 'model0' 43 | [] 44 | [] 45 | -------------------------------------------------------------------------------- /tests/unit/models/FischerBurmeister1.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/a state/b' 6 | input_Scalar_values = '3.1 2.5' 7 | output_Scalar_names = 'state/fb' 8 | output_Scalar_values = '1.61753845' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model] 14 | type = FischerBurmeister 15 | first_var = 'state/a' 16 | second_var = 'state/b' 17 | fischer_burmeister = 'state/fb' 18 | [] 19 | [] -------------------------------------------------------------------------------- /tests/unit/models/FischerBurmeister2.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/a state/b' 6 | input_Scalar_values = '3.1 2.5' 7 | output_Scalar_names = 'state/fb' 8 | output_Scalar_values = '-4.58246155' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model] 14 | type = FischerBurmeister 15 | first_var = 'state/a' 16 | second_var = 'state/b' 17 | fischer_burmeister = 'state/fb' 18 | first_inequality = 'LE' 19 | [] 20 | [] -------------------------------------------------------------------------------- /tests/unit/models/FischerBurmeister3.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/a state/b' 6 | input_Scalar_values = '3.1 2.5' 7 | output_Scalar_names = 'state/fb' 8 | output_Scalar_values = '-9.58246155' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model] 14 | type = FischerBurmeister 15 | first_var = 'state/a' 16 | second_var = 'state/b' 17 | fischer_burmeister = 'state/fb' 18 | first_inequality = 'LE' 19 | second_inequality = 'LE' 20 | [] 21 | [] -------------------------------------------------------------------------------- /tests/unit/models/HermiteSmoothStep.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [foo] 3 | type = Scalar 4 | values = '-0.5 0.01 0.02 0.5 0.95 1.01 2' 5 | batch_shape = '(7)' 6 | [] 7 | [bar] 8 | type = Scalar 9 | values = '0 0.104 0.352 1 1 1 1' 10 | batch_shape = '(7)' 11 | [] 12 | [] 13 | 14 | [Drivers] 15 | [unit] 16 | type = ModelUnitTest 17 | model = 'model' 18 | input_Scalar_names = 'state/foo' 19 | input_Scalar_values = 'foo' 20 | output_Scalar_names = 'state/bar' 21 | output_Scalar_values = 'bar' 22 | derivative_rel_tol = 0 23 | derivative_abs_tol = 1e-3 24 | [] 25 | [] 26 | 27 | [Models] 28 | [model] 29 | type = HermiteSmoothStep 30 | argument = 'state/foo' 31 | value = 'state/bar' 32 | lower_bound = '0' 33 | upper_bound = '0.05' 34 | [] 35 | [] 36 | -------------------------------------------------------------------------------- /tests/unit/models/HermiteSmoothStep_COMPLEMENT.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [foo] 3 | type = Scalar 4 | values = '-0.5 0.01 0.02 0.5 0.95 1.01 2' 5 | batch_shape = '(7)' 6 | [] 7 | [bar] 8 | type = Scalar 9 | values = '1.0 0.896 0.648 0 0 0 0' 10 | batch_shape = '(7)' 11 | [] 12 | [] 13 | 14 | [Drivers] 15 | [unit] 16 | type = ModelUnitTest 17 | model = 'model' 18 | input_Scalar_names = 'state/foo' 19 | input_Scalar_values = 'foo' 20 | output_Scalar_names = 'state/bar' 21 | output_Scalar_values = 'bar' 22 | derivative_rel_tol = 0 23 | derivative_abs_tol = 1e-3 24 | [] 25 | [] 26 | 27 | [Models] 28 | [model] 29 | type = HermiteSmoothStep 30 | argument = 'state/foo' 31 | value = 'state/bar' 32 | lower_bound = '0' 33 | upper_bound = '0.05' 34 | complement_condition = true 35 | [] 36 | [] 37 | -------------------------------------------------------------------------------- /tests/unit/models/ImplicitUpdate.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'old_state/foo old_state/bar forces/temperature forces/t old_forces/t' 6 | input_Scalar_values = '0 0 15 1.3 1.1' 7 | input_SR2_names = 'old_state/baz' 8 | input_SR2_values = '0' 9 | output_Scalar_names = 'state/foo state/bar' 10 | output_Scalar_values = '-1.43918 -2.55098' 11 | output_SR2_names = 'state/baz' 12 | output_SR2_values = '0' 13 | [] 14 | [] 15 | 16 | [Solvers] 17 | [newton] 18 | type = Newton 19 | abs_tol = 1e-10 20 | rel_tol = 1e-08 21 | max_its = 20 22 | [] 23 | [] 24 | 25 | [Models] 26 | [rate] 27 | type = SampleRateModel 28 | [] 29 | [integrate_foo] 30 | type = ScalarBackwardEulerTimeIntegration 31 | variable = 'state/foo' 32 | [] 33 | [integrate_bar] 34 | type = ScalarBackwardEulerTimeIntegration 35 | variable = 'state/bar' 36 | [] 37 | [integrate_baz] 38 | type = SR2BackwardEulerTimeIntegration 39 | variable = 'state/baz' 40 | [] 41 | [implicit_rate] 42 | type = ComposedModel 43 | models = 'rate integrate_foo integrate_bar integrate_baz' 44 | [] 45 | [model] 46 | type = ImplicitUpdate 47 | implicit_model = 'implicit_rate' 48 | solver = 'newton' 49 | [] 50 | [] 51 | -------------------------------------------------------------------------------- /tests/unit/models/R2IncrementToRate.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [foo] 3 | type = FillR2 4 | values = '1 2 3 4 5 6 7 8 9' 5 | [] 6 | [bar] 7 | type = FillR2 8 | values = '5 10 15 20 25 30 35 40 45' 9 | [] 10 | [] 11 | 12 | [Drivers] 13 | [unit] 14 | type = ModelUnitTest 15 | model = 'model' 16 | input_Scalar_names = 'forces/t old_forces/t' 17 | input_Scalar_values = '1.3 1.1' 18 | input_R2_names = 'forces/foo' 19 | input_R2_values = 'foo' 20 | output_R2_names = 'forces/foo_rate' 21 | output_R2_values = 'bar' 22 | [] 23 | [] 24 | 25 | [Models] 26 | [model] 27 | type = R2IncrementToRate 28 | variable = 'forces/foo' 29 | rate = 'forces/foo_rate' 30 | [] 31 | [] 32 | -------------------------------------------------------------------------------- /tests/unit/models/R2Multiplication1.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [A] 3 | type = FillR2 4 | values = '1 3 5 3 5 7 5 7 9' 5 | [] 6 | [B] 7 | type = FillR2 8 | values = '-1 -2 -3 2 5 6 1 3 2' 9 | [] 10 | [C] 11 | type = FillR2 12 | values = '10 28 25 14 40 35 18 52 45' 13 | [] 14 | [] 15 | 16 | [Drivers] 17 | [unit] 18 | type = ModelUnitTest 19 | model = 'model' 20 | input_R2_names = 'state/A state/B' 21 | input_R2_values = 'A B' 22 | output_R2_names = 'state/C' 23 | output_R2_values = 'C' 24 | [] 25 | [] 26 | 27 | [Models] 28 | [model] 29 | type = R2Multiplication 30 | A = 'state/A' 31 | B = 'state/B' 32 | to = 'state/C' 33 | [] 34 | [] 35 | -------------------------------------------------------------------------------- /tests/unit/models/R2Multiplication2.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [A] 3 | type = FillR2 4 | values = '40 53 71 53 88 113 71 113 160' 5 | [] 6 | [B] 7 | type = FillR2 8 | values = '-1 -2 -3 2 5 6 1 3 2' 9 | [] 10 | [C] 11 | type = FillR2 12 | values = '-0.25269583 -0.57822991 -0.73173957 0.24598169 0.55320448 0.81495422 -0.05534079 -0.11536114 -0.23835198' 13 | [] 14 | [] 15 | 16 | [Drivers] 17 | [unit] 18 | type = ModelUnitTest 19 | model = 'model' 20 | input_R2_names = 'state/A state/B' 21 | input_R2_values = 'A B' 22 | output_R2_names = 'state/C' 23 | output_R2_values = 'C' 24 | derivative_abs_tol = 1e-5 25 | derivative_rel_tol = 0 26 | [] 27 | [] 28 | 29 | [Models] 30 | [model] 31 | type = R2Multiplication 32 | A = 'state/A' 33 | B = 'state/B' 34 | to = 'state/C' 35 | invert_A = true 36 | [] 37 | [] 38 | -------------------------------------------------------------------------------- /tests/unit/models/R2Multiplication3.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [A] 3 | type = FillR2 4 | values = '-1 -2 -3 2 5 6 1 3 2' 5 | [] 6 | [B] 7 | type = FillR2 8 | values = '40 53 71 53 88 113 71 113 160' 9 | [] 10 | [C] 11 | type = FillR2 12 | values = '0.03865717 0.00101729 -0.03662258 -0.12380468 0.13621567 -0.00376399 -0.05879959 0.21424212 -0.11271617' 13 | [] 14 | [] 15 | 16 | [Drivers] 17 | [unit] 18 | type = ModelUnitTest 19 | model = 'model' 20 | input_R2_names = 'state/A state/B' 21 | input_R2_values = 'A B' 22 | output_R2_names = 'state/C' 23 | output_R2_values = 'C' 24 | derivative_abs_tol = 1e-5 25 | derivative_rel_tol = 0 26 | [] 27 | [] 28 | 29 | [Models] 30 | [model] 31 | type = R2Multiplication 32 | A = 'state/A' 33 | B = 'state/B' 34 | to = 'state/C' 35 | invert_B = true 36 | [] 37 | [] 38 | -------------------------------------------------------------------------------- /tests/unit/models/R2Multiplication4.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [A] 3 | type = FillR2 4 | values = '-1 -2 -3 2 5 6 1 3 2' 5 | [] 6 | [B] 7 | type = FillR2 8 | values = '40 53 71 53 88 113 71 113 160' 9 | [] 10 | [C] 11 | type = FillR2 12 | values = '-0.91353001 -0.55035605 0.8128179 0.22024415 0.04526958 -0.12970498 0.11322482 0.16876907 -0.17568667' 13 | [] 14 | [] 15 | 16 | [Drivers] 17 | [unit] 18 | type = ModelUnitTest 19 | model = 'model' 20 | input_R2_names = 'state/A state/B' 21 | input_R2_values = 'A B' 22 | output_R2_names = 'state/C' 23 | output_R2_values = 'C' 24 | derivative_abs_tol = 1e-4 25 | derivative_rel_tol = 0 26 | [] 27 | [] 28 | 29 | [Models] 30 | [model] 31 | type = R2Multiplication 32 | A = 'state/A' 33 | B = 'state/B' 34 | to = 'state/C' 35 | invert_A = true 36 | invert_B = true 37 | [] 38 | [] 39 | -------------------------------------------------------------------------------- /tests/unit/models/R2toSR2.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [foo] 3 | type = FillR2 4 | values = '1 2 3 4 5 6 7 8 9' 5 | [] 6 | [bar] 7 | type = FillSR2 8 | values = '1 5 9 7 5 3' 9 | [] 10 | [] 11 | 12 | [Drivers] 13 | [unit] 14 | type = ModelUnitTest 15 | model = 'model' 16 | input_R2_names = 'state/full' 17 | input_R2_values = 'foo' 18 | output_SR2_names = 'state/notfull' 19 | output_SR2_values = 'bar' 20 | check_second_derivatives = true 21 | [] 22 | [] 23 | 24 | [Models] 25 | [model] 26 | type = R2toSR2 27 | input = 'state/full' 28 | output = 'state/notfull' 29 | [] 30 | [] 31 | -------------------------------------------------------------------------------- /tests/unit/models/R2toWR2.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [foo] 3 | type = FillR2 4 | values = '1 2 3 4 5 6 7 8 9' 5 | [] 6 | [bar] 7 | type = FillWR2 8 | values = '1 -2 1' 9 | [] 10 | [] 11 | 12 | [Drivers] 13 | [unit] 14 | type = ModelUnitTest 15 | model = 'model' 16 | input_R2_names = 'state/full' 17 | input_R2_values = 'foo' 18 | output_WR2_names = 'state/notfull' 19 | output_WR2_values = 'bar' 20 | check_second_derivatives = true 21 | [] 22 | [] 23 | 24 | [Models] 25 | [model] 26 | type = R2toWR2 27 | input = 'state/full' 28 | output = 'state/notfull' 29 | [] 30 | [] 31 | -------------------------------------------------------------------------------- /tests/unit/models/SR2ConstantParameter.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'E' 5 | output_SR2_names = 'parameters/E' 6 | output_SR2_values = 'T' 7 | [] 8 | [] 9 | 10 | [Models] 11 | [E] 12 | type = SR2ConstantParameter 13 | value = 'T' 14 | [] 15 | [] 16 | 17 | [Tensors] 18 | [T] 19 | type = FillSR2 20 | values = '-1 -4 7 -1 9 1' 21 | [] 22 | [] 23 | -------------------------------------------------------------------------------- /tests/unit/models/SR2IncrementToRate.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [foo] 3 | type = FillSR2 4 | values = '1 2 3' 5 | [] 6 | [bar] 7 | type = FillSR2 8 | values = '5 10 15' 9 | [] 10 | [] 11 | 12 | [Drivers] 13 | [unit] 14 | type = ModelUnitTest 15 | model = 'model' 16 | input_Scalar_names = 'forces/t old_forces/t' 17 | input_Scalar_values = '1.3 1.1' 18 | input_SR2_names = 'forces/foo' 19 | input_SR2_values = 'foo' 20 | output_SR2_names = 'forces/foo_rate' 21 | output_SR2_values = 'bar' 22 | [] 23 | [] 24 | 25 | [Models] 26 | [model] 27 | type = SR2IncrementToRate 28 | variable = 'forces/foo' 29 | rate = 'forces/foo_rate' 30 | [] 31 | [] 32 | -------------------------------------------------------------------------------- /tests/unit/models/SR2Invariant_EFFECTIVE_STRAIN.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [foo] 3 | type = FillSR2 4 | values = '1 2 3 4 5 6' 5 | # This tensor reads 6 | # A = [ 1 6 5 7 | # 6 2 4 8 | # 5 4 3 ] 9 | # EFFECTIVE_STRAIN(A) = 10.583005 10 | [] 11 | [] 12 | 13 | [Drivers] 14 | [unit] 15 | type = ModelUnitTest 16 | model = 'model' 17 | input_SR2_names = 'state/internal/O' 18 | input_SR2_values = 'foo' 19 | output_Scalar_names = 'state/internal/I2' 20 | output_Scalar_values = '10.5830052' 21 | check_second_derivatives = true 22 | [] 23 | [] 24 | 25 | [Models] 26 | [model] 27 | type = SR2Invariant 28 | invariant_type = 'EFFECTIVE_STRAIN' 29 | tensor = 'state/internal/O' 30 | invariant = 'state/internal/I2' 31 | [] 32 | [] 33 | -------------------------------------------------------------------------------- /tests/unit/models/SR2Invariant_I1.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [foo] 3 | type = FillSR2 4 | values = '1 2 3 4 5 6' 5 | # This tensor reads 6 | # A = [ 1 6 5 7 | # 6 2 4 8 | # 5 4 3 ] 9 | # I1(A) = 6 10 | [] 11 | [] 12 | 13 | [Drivers] 14 | [unit] 15 | type = ModelUnitTest 16 | model = 'model' 17 | input_SR2_names = 'state/internal/O' 18 | input_SR2_values = 'foo' 19 | output_Scalar_names = 'state/internal/I1' 20 | output_Scalar_values = '6' 21 | check_second_derivatives = true 22 | [] 23 | [] 24 | 25 | [Models] 26 | [model] 27 | type = SR2Invariant 28 | invariant_type = 'I1' 29 | tensor = 'state/internal/O' 30 | invariant = 'state/internal/I1' 31 | [] 32 | [] 33 | -------------------------------------------------------------------------------- /tests/unit/models/SR2Invariant_I2.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [foo] 3 | type = FillSR2 4 | values = '1 2 3 4 5 6' 5 | # This tensor reads 6 | # A = [ 1 6 5 7 | # 6 2 4 8 | # 5 4 3 ] 9 | # I2(A) = 0.5*(36-168) = -66 10 | [] 11 | [] 12 | 13 | [Drivers] 14 | [unit] 15 | type = ModelUnitTest 16 | model = 'model' 17 | input_SR2_names = 'state/internal/O' 18 | input_SR2_values = 'foo' 19 | output_Scalar_names = 'state/internal/I2' 20 | output_Scalar_values = '-66' 21 | check_second_derivatives = true 22 | [] 23 | [] 24 | 25 | [Models] 26 | [model] 27 | type = SR2Invariant 28 | invariant_type = 'I2' 29 | tensor = 'state/internal/O' 30 | invariant = 'state/internal/I2' 31 | [] 32 | [] 33 | -------------------------------------------------------------------------------- /tests/unit/models/SR2Invariant_VONMISES.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [foo] 3 | type = FillSR2 4 | values = '1 2 3 4 5 6' 5 | # This tensor reads 6 | # A = [ 1 6 5 7 | # 6 2 4 8 | # 5 4 3 ] 9 | # VONMISES(A) = sqrt(234) ~= 15.2970585408 10 | [] 11 | [] 12 | 13 | [Drivers] 14 | [unit] 15 | type = ModelUnitTest 16 | model = 'model' 17 | input_SR2_names = 'state/internal/O' 18 | input_SR2_values = 'foo' 19 | output_Scalar_names = 'state/internal/VM' 20 | output_Scalar_values = '15.2970585408' 21 | derivative_abs_tol = 1e-6 22 | check_second_derivatives = true 23 | [] 24 | [] 25 | 26 | [Models] 27 | [model] 28 | type = SR2Invariant 29 | invariant_type = 'VONMISES' 30 | tensor = 'state/internal/O' 31 | invariant = 'state/internal/VM' 32 | [] 33 | [] 34 | -------------------------------------------------------------------------------- /tests/unit/models/SR2LinearCombination.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [foo] 3 | type = FillSR2 4 | values = '1 2 3 4 5 6' 5 | [] 6 | [bar] 7 | type = FillSR2 8 | values = '-1 -4 7 -1 9 1' 9 | [] 10 | [baz] 11 | type = FillSR2 12 | values = '0 -2 10 3 14 7' 13 | [] 14 | [] 15 | 16 | [Drivers] 17 | [unit] 18 | type = ModelUnitTest 19 | model = 'model' 20 | input_SR2_names = 'state/A state/substate/B' 21 | input_SR2_values = 'foo bar' 22 | output_SR2_names = 'state/outsub/C' 23 | output_SR2_values = 'baz' 24 | [] 25 | [] 26 | 27 | [Models] 28 | [model] 29 | type = SR2LinearCombination 30 | from_var = 'state/A state/substate/B' 31 | to_var = 'state/outsub/C' 32 | [] 33 | [] 34 | -------------------------------------------------------------------------------- /tests/unit/models/SR2LinearCombination_nl_params.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [foo] 3 | type = FillSR2 4 | values = '1 2 3 4 5 6' 5 | [] 6 | [bar] 7 | type = FillSR2 8 | values = '-1 -4 7 -1 9 1' 9 | [] 10 | [baz] 11 | type = FillSR2 12 | values = '3 10 -11 6 -13 4' 13 | [] 14 | [] 15 | 16 | [Drivers] 17 | [unit] 18 | type = ModelUnitTest 19 | model = 'model' 20 | input_Scalar_names = 'state/c_A state/c_B' 21 | input_Scalar_values = '1.0 -2.0' 22 | input_SR2_names = 'state/A state/substate/B' 23 | input_SR2_values = 'foo bar' 24 | output_SR2_names = 'state/outsub/C' 25 | output_SR2_values = 'baz' 26 | [] 27 | [] 28 | 29 | [Models] 30 | [model0] 31 | type = SR2LinearCombination 32 | from_var = 'state/A state/substate/B' 33 | to_var = 'state/outsub/C' 34 | coefficients = 'state/c_A state/c_B' 35 | coefficient_as_parameter = 'true true' 36 | [] 37 | [model] 38 | type = ComposedModel 39 | models = 'model0' 40 | [] 41 | [] 42 | -------------------------------------------------------------------------------- /tests/unit/models/SR2LinearInterpolation1.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'D' 5 | input_Scalar_names = 'forces/T' 6 | input_Scalar_values = '300' 7 | output_SR2_names = 'parameters/D' 8 | output_SR2_values = 'DT' 9 | check_second_derivatives = true 10 | check_AD_parameter_derivatives = false 11 | [] 12 | [] 13 | 14 | [Models] 15 | [D] 16 | type = SR2LinearInterpolation 17 | argument = 'forces/T' 18 | abscissa = 'T' 19 | ordinate = 'D' 20 | [] 21 | [] 22 | 23 | [Tensors] 24 | [T] 25 | type = LinspaceScalar 26 | start = 273.15 27 | end = 2000 28 | nstep = 100 29 | dim = 0 30 | [] 31 | [d0] 32 | type = FullScalar 33 | value = 1 34 | [] 35 | [D0] 36 | type = FillSR2 37 | values = 'd0' 38 | [] 39 | [d1] 40 | type = FullScalar 41 | value = 30 42 | [] 43 | [D1] 44 | type = FillSR2 45 | values = 'd1' 46 | [] 47 | [D] 48 | type = LinspaceSR2 49 | start = 'D0' 50 | end = 'D1' 51 | nstep = 100 52 | dim = 0 53 | [] 54 | [dT] 55 | type = FullScalar 56 | value = 1.4509077221530537 57 | [] 58 | [DT] 59 | type = FillSR2 60 | values = 'dT' 61 | [] 62 | [] 63 | -------------------------------------------------------------------------------- /tests/unit/models/SR2LinearInterpolation2.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'D' 5 | input_Scalar_names = 'forces/T' 6 | input_Scalar_values = '300' 7 | output_SR2_names = 'parameters/D' 8 | output_SR2_values = 'DT' 9 | check_second_derivatives = true 10 | check_AD_parameter_derivatives = false 11 | [] 12 | [] 13 | 14 | [Models] 15 | [D] 16 | type = SR2LinearInterpolation 17 | argument = 'forces/T' 18 | abscissa = 'T' 19 | ordinate = 'D' 20 | [] 21 | [] 22 | 23 | [Tensors] 24 | [T] 25 | type = LinspaceScalar 26 | start = 273.15 27 | end = 2000 28 | nstep = 100 29 | dim = 0 30 | [] 31 | [d0] 32 | type = FullScalar 33 | value = 1 34 | [] 35 | [D0] 36 | type = FillSR2 37 | values = 'd0' 38 | [] 39 | [d1] 40 | type = FullScalar 41 | value = 30 42 | [] 43 | [D1] 44 | type = FillSR2 45 | values = 'd1' 46 | [] 47 | [D] 48 | type = LinspaceSR2 49 | start = 'D0' 50 | end = 'D1' 51 | nstep = 100 52 | dim = 0 53 | [] 54 | [dT] 55 | type = FullScalar 56 | value = 1.4509077221530537 57 | [] 58 | [DT] 59 | type = FillSR2 60 | values = 'dT' 61 | [] 62 | [] 63 | -------------------------------------------------------------------------------- /tests/unit/models/SR2LinearInterpolation3.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'D' 5 | input_Scalar_names = 'forces/T' 6 | input_Scalar_values = '300' 7 | output_SR2_names = 'parameters/D' 8 | output_SR2_values = 'DT' 9 | check_second_derivatives = true 10 | check_AD_parameter_derivatives = false 11 | [] 12 | [] 13 | 14 | [Models] 15 | [D] 16 | type = SR2LinearInterpolation 17 | argument = 'forces/T' 18 | abscissa = 'T' 19 | ordinate = 'D' 20 | [] 21 | [] 22 | 23 | [Tensors] 24 | [T] 25 | type = LinspaceScalar 26 | start = 273.15 27 | end = 2000 28 | nstep = 100 29 | dim = 0 30 | [] 31 | [d0] 32 | type = FullScalar 33 | batch_shape = '(5,1)' 34 | value = 1 35 | [] 36 | [D0] 37 | type = FillSR2 38 | values = 'd0' 39 | [] 40 | [d1] 41 | type = FullScalar 42 | batch_shape = '(5,1)' 43 | value = 30 44 | [] 45 | [D1] 46 | type = FillSR2 47 | values = 'd1' 48 | [] 49 | [D] 50 | type = LinspaceSR2 51 | start = 'D0' 52 | end = 'D1' 53 | nstep = 100 54 | dim = 2 55 | [] 56 | [dT] 57 | type = FullScalar 58 | value = 1.4509077221530537 59 | [] 60 | [DT] 61 | type = FillSR2 62 | values = 'dT' 63 | [] 64 | [] 65 | -------------------------------------------------------------------------------- /tests/unit/models/SR2toR2.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [bar] 3 | type = FillR2 4 | values = '1 3 5 3 5 7 5 7 9' 5 | [] 6 | [foo] 7 | type = FillSR2 8 | values = '1 5 9 7 5 3' 9 | [] 10 | [] 11 | 12 | [Drivers] 13 | [unit] 14 | type = ModelUnitTest 15 | model = 'model' 16 | input_SR2_names = 'state/sym' 17 | input_SR2_values = 'foo' 18 | output_R2_names = 'state/full' 19 | output_R2_values = 'bar' 20 | check_second_derivatives = true 21 | [] 22 | [] 23 | 24 | [Models] 25 | [model] 26 | type = SR2toR2 27 | input = 'state/sym' 28 | output = 'state/full' 29 | [] 30 | [] 31 | -------------------------------------------------------------------------------- /tests/unit/models/SampleRateModel.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/foo state/bar forces/temperature' 6 | input_Scalar_values = '1 2 100' 7 | input_SR2_names = 'state/baz' 8 | input_SR2_values = '0.5' 9 | output_Scalar_names = 'state/foo_rate state/bar_rate' 10 | output_Scalar_values = '301.5 -89.02' 11 | output_SR2_names = 'state/baz_rate' 12 | output_SR2_values = '145.5' 13 | [] 14 | [] 15 | 16 | [Models] 17 | [model] 18 | type = SampleRateModel 19 | [] 20 | [] 21 | -------------------------------------------------------------------------------- /tests/unit/models/ScalarBackwardEulerTimeIntegration.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/foo_rate state/foo old_state/foo forces/t old_forces/t' 6 | input_Scalar_values = '-0.3 1.1 0 1.3 1.1' 7 | output_Scalar_names = 'residual/foo' 8 | output_Scalar_values = '1.16' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model] 14 | type = ScalarBackwardEulerTimeIntegration 15 | variable = 'state/foo' 16 | [] 17 | [] 18 | -------------------------------------------------------------------------------- /tests/unit/models/ScalarConstantParameter.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'E' 5 | output_Scalar_names = 'parameters/E' 6 | output_Scalar_values = 'T' 7 | [] 8 | [] 9 | 10 | [Models] 11 | [E] 12 | type = ScalarConstantParameter 13 | value = 'T' 14 | [] 15 | [] 16 | 17 | [Tensors] 18 | [T] 19 | type = FullScalar 20 | value = 20.0 21 | [] 22 | [] 23 | -------------------------------------------------------------------------------- /tests/unit/models/ScalarForceRate.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'forces/foo old_forces/foo forces/t old_forces/t' 6 | input_Scalar_values = '-0.3 0 1.3 1.1' 7 | output_Scalar_names = 'forces/foo_rate' 8 | output_Scalar_values = '-1.5' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model] 14 | type = ScalarVariableRate 15 | variable = 'forces/foo' 16 | rate = 'forces/foo_rate' 17 | [] 18 | [] 19 | -------------------------------------------------------------------------------- /tests/unit/models/ScalarForwardEulerTimeIntegration.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/foo_rate old_state/foo forces/t old_forces/t' 6 | input_Scalar_values = '-0.3 0 1.3 1.1' 7 | output_Scalar_names = 'state/foo' 8 | output_Scalar_values = '-0.06' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model] 14 | type = ScalarForwardEulerTimeIntegration 15 | variable = 'state/foo' 16 | [] 17 | [] 18 | -------------------------------------------------------------------------------- /tests/unit/models/ScalarIncrementToRate.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'forces/t old_forces/t forces/foo' 6 | input_Scalar_values = '1.3 1.1 1.2' 7 | output_Scalar_names = 'forces/foo_rate' 8 | output_Scalar_values = '6.0' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model] 14 | type = ScalarIncrementToRate 15 | variable = 'forces/foo' 16 | rate = 'forces/foo_rate' 17 | [] 18 | [] 19 | -------------------------------------------------------------------------------- /tests/unit/models/ScalarLinearCombination.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/A state/substate/B' 6 | input_Scalar_values = '3 2' 7 | output_Scalar_names = 'state/outsub/C' 8 | output_Scalar_values = '5' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model] 14 | type = ScalarLinearCombination 15 | from_var = 'state/A state/substate/B' 16 | to_var = 'state/outsub/C' 17 | [] 18 | [] 19 | -------------------------------------------------------------------------------- /tests/unit/models/ScalarLinearCombination_nl_params.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/A state/substate/B state/c_A state/c_B' 6 | input_Scalar_values = '3 2 1 2' 7 | output_Scalar_names = 'state/outsub/C' 8 | output_Scalar_values = '7' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model0] 14 | type = ScalarLinearCombination 15 | from_var = 'state/A state/substate/B' 16 | to_var = 'state/outsub/C' 17 | coefficients = 'state/c_A state/c_B' 18 | coefficient_as_parameter = 'true true' 19 | [] 20 | [model] 21 | type = ComposedModel 22 | models = 'model0' 23 | [] 24 | [] 25 | -------------------------------------------------------------------------------- /tests/unit/models/ScalarLinearInterpolation1.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'E' 5 | input_Scalar_names = 'forces/T' 6 | input_Scalar_values = '300' 7 | output_Scalar_names = 'parameters/E' 8 | output_Scalar_values = '188911.6020499754' 9 | check_second_derivatives = true 10 | check_AD_parameter_derivatives = false 11 | [] 12 | [] 13 | 14 | [Models] 15 | [E] 16 | type = ScalarLinearInterpolation 17 | argument = 'forces/T' 18 | abscissa = 'T' 19 | ordinate = 'E' 20 | [] 21 | [] 22 | 23 | [Tensors] 24 | [T] 25 | type = LinspaceScalar 26 | start = 273.15 27 | end = 2000 28 | nstep = 100 29 | dim = 0 30 | [] 31 | [E] 32 | type = LinspaceScalar 33 | start = 1.9e5 34 | end = 1.2e5 35 | nstep = 100 36 | dim = 0 37 | [] 38 | [] 39 | -------------------------------------------------------------------------------- /tests/unit/models/ScalarLinearInterpolation2.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'E' 5 | input_Scalar_names = 'forces/T' 6 | input_Scalar_values = '300' 7 | output_Scalar_names = 'parameters/E' 8 | output_Scalar_values = '188911.6020499754' 9 | check_second_derivatives = true 10 | check_AD_parameter_derivatives = false 11 | [] 12 | [] 13 | 14 | [Models] 15 | [E] 16 | type = ScalarLinearInterpolation 17 | argument = 'forces/T' 18 | abscissa = 'T' 19 | ordinate = 'E' 20 | [] 21 | [] 22 | 23 | [Tensors] 24 | [T] 25 | type = LinspaceScalar 26 | start = 273.15 27 | end = 2000 28 | nstep = 100 29 | dim = 0 30 | [] 31 | [E] 32 | type = LinspaceScalar 33 | start = 1.9e5 34 | end = 1.2e5 35 | nstep = 100 36 | dim = 0 37 | [] 38 | [] 39 | -------------------------------------------------------------------------------- /tests/unit/models/ScalarLinearInterpolation3.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'E' 5 | input_Scalar_names = 'forces/T' 6 | input_Scalar_values = '300' 7 | output_Scalar_names = 'parameters/E' 8 | output_Scalar_values = '188911.6020499754' 9 | check_second_derivatives = true 10 | check_AD_parameter_derivatives = false 11 | [] 12 | [] 13 | 14 | [Models] 15 | [E] 16 | type = ScalarLinearInterpolation 17 | argument = 'forces/T' 18 | abscissa = 'T' 19 | ordinate = 'E' 20 | [] 21 | [] 22 | 23 | [Tensors] 24 | [T] 25 | type = LinspaceScalar 26 | start = 273.15 27 | end = 2000 28 | nstep = 100 29 | dim = 0 30 | [] 31 | [E0] 32 | type = FullScalar 33 | batch_shape = '(5,1)' 34 | value = 1.9e5 35 | [] 36 | [E1] 37 | type = FullScalar 38 | batch_shape = '(5,1)' 39 | value = 1.2e5 40 | [] 41 | [E] 42 | type = LinspaceScalar 43 | start = 'E0' 44 | end = 'E1' 45 | nstep = 100 46 | dim = 2 47 | [] 48 | [] 49 | -------------------------------------------------------------------------------- /tests/unit/models/ScalarLinearInterpolation4.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'E' 5 | input_Scalar_names = 'forces/T' 6 | input_Scalar_values = '300' 7 | output_Scalar_names = 'parameters/E' 8 | output_Scalar_values = '188911.6020499754' 9 | check_second_derivatives = true 10 | check_AD_parameter_derivatives = false 11 | [] 12 | [] 13 | 14 | [Models] 15 | [E] 16 | type = ScalarLinearInterpolation 17 | argument = 'forces/T' 18 | abscissa = 'T' 19 | ordinate = 'E' 20 | [] 21 | [] 22 | 23 | [Tensors] 24 | [T0] 25 | type = FullScalar 26 | batch_shape = '(7,8,1)' 27 | value = 273.15 28 | [] 29 | [T1] 30 | type = FullScalar 31 | batch_shape = '(7,8,1)' 32 | value = 2000 33 | [] 34 | [T] 35 | type = LinspaceScalar 36 | start = 'T0' 37 | end = 'T1' 38 | nstep = 100 39 | dim = 3 40 | [] 41 | [E] 42 | type = LinspaceScalar 43 | start = 1.9e5 44 | end = 1.2e5 45 | nstep = 100 46 | dim = 0 47 | [] 48 | [] 49 | -------------------------------------------------------------------------------- /tests/unit/models/ScalarMultiplication1.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/A state/B state/C state/D' 6 | input_Scalar_values = '3.1 2.5 4.6 7.8' 7 | output_Scalar_names = 'state/E' 8 | output_Scalar_values = '417.105' 9 | check_second_derivatives = true 10 | second_derivative_abs_tol = 2e-8 11 | [] 12 | [] 13 | 14 | [Models] 15 | [model] 16 | type = ScalarMultiplication 17 | from_var = 'state/A state/B state/C state/D' 18 | to_var = 'state/E' 19 | coefficient = 1.5 20 | [] 21 | [] 22 | -------------------------------------------------------------------------------- /tests/unit/models/ScalarMultiplication2.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/A state/B state/C state/D' 6 | input_Scalar_values = '3.1 2.5 4.6 7.8' 7 | output_Scalar_names = 'state/E' 8 | output_Scalar_values = '2.051192146' 9 | check_second_derivatives = true 10 | second_derivative_abs_tol = 2e-8 11 | [] 12 | [] 13 | 14 | [Models] 15 | [model] 16 | type = ScalarMultiplication 17 | from_var = 'state/A state/B state/C state/D' 18 | to_var = 'state/E' 19 | coefficient = 1.5 20 | reciprocal = 'true false true false' 21 | [] 22 | [] 23 | -------------------------------------------------------------------------------- /tests/unit/models/ScalarMultiplication3.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/A state/B state/C state/D' 6 | input_Scalar_values = '3.1 2.5 4.6 7.8' 7 | output_Scalar_names = 'state/E' 8 | output_Scalar_values = '0.00539432517' 9 | check_second_derivatives = true 10 | second_derivative_abs_tol = 2e-8 11 | [] 12 | [] 13 | 14 | [Models] 15 | [model] 16 | type = ScalarMultiplication 17 | from_var = 'state/A state/B state/C state/D' 18 | to_var = 'state/E' 19 | coefficient = 1.5 20 | reciprocal = 'true' 21 | [] 22 | [] 23 | -------------------------------------------------------------------------------- /tests/unit/models/ScalarMultiplication4.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/A state/B state/C state/D' 6 | input_Scalar_values = '4.8 9.2 56.8 0.8' 7 | output_Scalar_names = 'state/E' 8 | output_Scalar_values = '0.040493' 9 | check_second_derivatives = true 10 | second_derivative_abs_tol = 2e-8 11 | [] 12 | [] 13 | 14 | [Models] 15 | [model] 16 | type = ScalarMultiplication 17 | from_var = 'state/A state/B state/C state/D' 18 | reciprocal = 'true false true false' 19 | to_var = 'state/E' 20 | coefficient = 1.5 21 | [] 22 | [] 23 | -------------------------------------------------------------------------------- /tests/unit/models/ScalarMultiplication5.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/A state/B state/C state/D' 6 | input_Scalar_values = '0 5 1 7.8' 7 | output_Scalar_names = 'state/E' 8 | output_Scalar_values = '0' 9 | check_second_derivatives = true 10 | derivative_abs_tol = 4e-2 11 | second_derivative_abs_tol = 2e-8 12 | [] 13 | [] 14 | 15 | [Models] 16 | [model] 17 | type = ScalarMultiplication 18 | from_var = 'state/A state/B state/C state/D' 19 | to_var = 'state/E' 20 | coefficient = 1.5 21 | reciprocal = 'false true true true' 22 | [] 23 | [] 24 | -------------------------------------------------------------------------------- /tests/unit/models/ScalarMultiplication6.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/A state/B state/C state/D' 6 | input_Scalar_values = '0 0 0.0 0.8' 7 | output_Scalar_names = 'state/E' 8 | output_Scalar_values = '0' 9 | check_second_derivatives = true 10 | second_derivative_abs_tol = 2e-8 11 | [] 12 | [] 13 | 14 | [Models] 15 | [model] 16 | type = ScalarMultiplication 17 | from_var = 'state/A state/B state/C state/D' 18 | reciprocal = 'false false false true' 19 | to_var = 'state/E' 20 | coefficient = 1.5 21 | [] 22 | [] 23 | -------------------------------------------------------------------------------- /tests/unit/models/ScalarStateRate.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/foo old_state/foo forces/t old_forces/t' 6 | input_Scalar_values = '-0.3 0 1.3 1.1' 7 | output_Scalar_names = 'state/foo_rate' 8 | output_Scalar_values = '-1.5' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model] 14 | type = ScalarVariableRate 15 | variable = 'state/foo' 16 | rate = 'state/foo_rate' 17 | [] 18 | [] 19 | -------------------------------------------------------------------------------- /tests/unit/models/TorchScriptFlowRate.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/s forces/T' 6 | input_Scalar_values = '1e6 300' 7 | output_Scalar_names = 'state/ep_rate' 8 | output_Scalar_values = '6.55616e-09' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model] 14 | type = TorchScriptFlowRate 15 | torch_script = 'TorchScriptFlowRate.pt' 16 | [] 17 | [] 18 | -------------------------------------------------------------------------------- /tests/unit/models/TorchScriptFlowRate.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/applied-material-modeling/neml2/d28354e6b6fda03aa534265d80ffc0be30a59eef/tests/unit/models/TorchScriptFlowRate.pt -------------------------------------------------------------------------------- /tests/unit/models/VecIncrementToRate.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [foo] 3 | type = Vec 4 | values = '1 2 3' 5 | [] 6 | [bar] 7 | type = Vec 8 | values = '5 10 15' 9 | [] 10 | [] 11 | 12 | [Drivers] 13 | [unit] 14 | type = ModelUnitTest 15 | model = 'model' 16 | input_Scalar_names = 'forces/t old_forces/t' 17 | input_Scalar_values = '1.3 1.1' 18 | input_Vec_names = 'forces/foo' 19 | input_Vec_values = 'foo' 20 | output_Vec_names = 'forces/foo_rate' 21 | output_Vec_values = 'bar' 22 | [] 23 | [] 24 | 25 | [Models] 26 | [model] 27 | type = VecIncrementToRate 28 | variable = 'forces/foo' 29 | rate = 'forces/foo_rate' 30 | [] 31 | [] 32 | -------------------------------------------------------------------------------- /tests/unit/models/WR2ExplicitExponentialTimeIntegration.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_WR2_names = 'state/foo_rate' 6 | input_WR2_values = 'w' 7 | input_Rot_names = 'old_state/foo' 8 | input_Rot_values = 'old_foo' 9 | input_Scalar_names = 'forces/t old_forces/t' 10 | input_Scalar_values = '1.3 1.1' 11 | output_Rot_names = 'state/foo' 12 | output_Rot_values = 'foo' 13 | [] 14 | [] 15 | 16 | [Models] 17 | [model] 18 | type = WR2ExplicitExponentialTimeIntegration 19 | variable = 'state/foo' 20 | [] 21 | [] 22 | 23 | [Tensors] 24 | [foo] 25 | type = FillRot 26 | values = '0.03789409 -0.01908914 0.02832582' 27 | [] 28 | [old_foo] 29 | type = FillRot 30 | values = '0.03739906 -0.01994617 0.02991925' 31 | [] 32 | [w] 33 | type = FillWR2 34 | values = '0.01 0.02 -0.03' 35 | [] 36 | [] 37 | -------------------------------------------------------------------------------- /tests/unit/models/WR2ImplicitExponentialTimeIntegration.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_WR2_names = 'state/foo_rate' 6 | input_WR2_values = 'w' 7 | input_Rot_names = 'state/foo old_state/foo' 8 | input_Rot_values = 'foo old_foo' 9 | input_Scalar_names = 'forces/t old_forces/t' 10 | input_Scalar_values = '1.3 1.1' 11 | output_Rot_names = 'residual/foo' 12 | output_Rot_values = 'res' 13 | value_rel_tol = 1e-4 14 | [] 15 | [] 16 | 17 | [Models] 18 | [model] 19 | type = WR2ImplicitExponentialTimeIntegration 20 | variable = 'state/foo' 21 | [] 22 | [] 23 | 24 | [Tensors] 25 | [res] 26 | type = FillRot 27 | values = '-0.032903 -0.005864 0.006609' 28 | [] 29 | [foo] 30 | type = FillRot 31 | values = '0.00499066 -0.0249533 0.03493462' 32 | [] 33 | [old_foo] 34 | type = FillRot 35 | values = '0.03739906 -0.01994617 0.02991925' 36 | [] 37 | [w] 38 | type = FillWR2 39 | values = '0.01 0.02 -0.03' 40 | [] 41 | [] 42 | -------------------------------------------------------------------------------- /tests/unit/models/crystallography/test_CrystalGeometry.i: -------------------------------------------------------------------------------- 1 | [Data] 2 | [scgeom] 3 | type = CrystalGeometry 4 | crystal_class = 'class_432' 5 | lattice_vectors = 'lvecs' 6 | slip_directions = 'sdirs' 7 | slip_planes = 'splanes' 8 | [] 9 | [] 10 | 11 | [Tensors] 12 | [sdirs] 13 | type = FillMillerIndex 14 | values = '1 1 0' 15 | [] 16 | [splanes] 17 | type = FillMillerIndex 18 | values = '1 1 1' 19 | [] 20 | [lvecs] 21 | type = Vec 22 | batch_shape = '(3)' 23 | values = "1.2 0.0 0.0 24 | 0.0 1.2 0.0 25 | 0.0 0.0 1.2" 26 | [] 27 | [class_432] 28 | type = SymmetryFromOrbifold 29 | orbifold = 432 30 | [] 31 | [] 32 | -------------------------------------------------------------------------------- /tests/unit/models/crystallography/test_CubicCrystal.i: -------------------------------------------------------------------------------- 1 | [Data] 2 | [cube] 3 | type = CubicCrystal 4 | lattice_parameter = "a" 5 | slip_directions = "sdirs" 6 | slip_planes = "splanes" 7 | [] 8 | [] 9 | 10 | [Tensors] 11 | [a] 12 | type = Scalar 13 | values = '1.2' 14 | [] 15 | [sdirs] 16 | type = FillMillerIndex 17 | values = '1 1 0' 18 | [] 19 | [splanes] 20 | type = FillMillerIndex 21 | values = '1 1 1' 22 | [] 23 | [] -------------------------------------------------------------------------------- /tests/unit/models/phase_field_fracture/CrackGeometricFunctionAT1.i: -------------------------------------------------------------------------------- 1 | 2 | [Drivers] 3 | [unit] 4 | type = ModelUnitTest 5 | model = 'cracked' 6 | input_Scalar_names = 'state/d' 7 | input_Scalar_values = '0.787' 8 | output_Scalar_names = 'state/alpha' 9 | output_Scalar_values = '0.787' 10 | derivative_abs_tol = 1e-06 11 | check_second_derivatives = true 12 | [] 13 | [] 14 | 15 | 16 | [Models] 17 | [cracked] 18 | type = CrackGeometricFunctionAT1 19 | phase = 'state/d' 20 | crack = 'state/alpha' 21 | [] 22 | [] -------------------------------------------------------------------------------- /tests/unit/models/phase_field_fracture/CrackGeometricFunctionAT2.i: -------------------------------------------------------------------------------- 1 | 2 | [Drivers] 3 | [unit] 4 | type = ModelUnitTest 5 | model = 'cracked' 6 | input_Scalar_names = 'state/d' 7 | input_Scalar_values = '0.787' 8 | output_Scalar_names = 'state/alpha' 9 | output_Scalar_values = '0.619369' 10 | derivative_abs_tol = 1e-06 11 | check_second_derivatives = true 12 | [] 13 | [] 14 | 15 | 16 | [Models] 17 | [cracked] 18 | type = CrackGeometricFunctionAT2 19 | phase = 'state/d' 20 | crack = 'state/alpha' 21 | [] 22 | [] -------------------------------------------------------------------------------- /tests/unit/models/phase_field_fracture/LinearIsotropicStrainEnergyDensity.i: -------------------------------------------------------------------------------- 1 | 2 | [Drivers] 3 | [unit] 4 | type = ModelUnitTest 5 | model = 'energy' 6 | input_SR2_names = 'state/internal/Ee' 7 | input_SR2_values = 'Ee' 8 | output_Scalar_names = 'state/psie' 9 | output_Scalar_values = '2443.2' 10 | derivative_abs_tol = 0 11 | derivative_rel_tol = 1e-3 12 | check_second_derivatives = true 13 | [] 14 | [] 15 | 16 | [Tensors] 17 | [Ee] 18 | type = FillSR2 19 | values = '0.1 0.05 -0.03 0.02 0.06 0.03' 20 | [] 21 | [] 22 | 23 | [Models] 24 | [energy] 25 | type = LinearIsotropicStrainEnergyDensity 26 | strain = 'state/internal/Ee' 27 | strain_energy_density = 'state/psie' 28 | coefficient_types = 'BULK_MODULUS SHEAR_MODULUS' 29 | coefficients = '1.4e5 7.8e4' 30 | [] 31 | [] -------------------------------------------------------------------------------- /tests/unit/models/phase_field_fracture/PowerDegradationFunction.i: -------------------------------------------------------------------------------- 1 | 2 | [Drivers] 3 | [unit] 4 | type = ModelUnitTest 5 | model = 'degrade' 6 | input_Scalar_names = 'state/d' 7 | input_Scalar_values = '0.787' 8 | output_Scalar_names = 'state/g' 9 | output_Scalar_values = '0.000438428' 10 | derivative_abs_tol = 1e-06 11 | check_second_derivatives = true 12 | [] 13 | [] 14 | 15 | [Tensors] 16 | [p] 17 | type = Scalar 18 | values = 5 19 | [] 20 | [] 21 | 22 | [Models] 23 | [degrade] 24 | type = PowerDegradationFunction 25 | phase = 'state/d' 26 | degradation = 'state/g' 27 | power = 'p' 28 | [] 29 | [] -------------------------------------------------------------------------------- /tests/unit/models/pyrolysis/AvramiErofeevNucleation.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/alpha' 6 | input_Scalar_values = 'alpha' 7 | output_Scalar_names = 'state/out' 8 | output_Scalar_values = 'out' 9 | check_AD_parameter_derivatives = false 10 | derivative_abs_tol = 1e-7 11 | [] 12 | [] 13 | 14 | [Tensors] 15 | [alpha] 16 | type = Scalar 17 | values = "0.03 0.75 0.9" 18 | batch_shape = '(3)' 19 | [] 20 | [out] 21 | type = Scalar 22 | values = "4.592994468e-5 0.429675464 0.69373113" 23 | batch_shape = '(3)' 24 | [] 25 | [] 26 | 27 | [Models] 28 | [model] 29 | type = AvramiErofeevNucleation 30 | scaling_constant = 0.7 31 | reaction_order = 2.75 32 | reaction_amount = 'state/alpha' 33 | reaction_out = 'state/out' 34 | [] 35 | [] -------------------------------------------------------------------------------- /tests/unit/models/pyrolysis/ChemicalReactionMechanism.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/alpha' 6 | input_Scalar_values = 'alpha' 7 | output_Scalar_names = 'state/out' 8 | output_Scalar_values = 'out' 9 | check_AD_parameter_derivatives = false 10 | [] 11 | [] 12 | 13 | [Tensors] 14 | [alpha] 15 | type = Scalar 16 | values = "0.03 0.75 0.9" 17 | batch_shape = '(3)' 18 | [] 19 | [out] 20 | type = Scalar 21 | values = "0.6437545 0.01546796 1.244795587e-3" 22 | batch_shape = '(3)' 23 | [] 24 | [] 25 | 26 | [Models] 27 | [model] 28 | type = ChemicalReactionMechanism 29 | scaling_constant = 0.7 30 | reaction_order = 2.75 31 | reaction_amount = 'state/alpha' 32 | reaction_out = 'state/out' 33 | [] 34 | [] -------------------------------------------------------------------------------- /tests/unit/models/pyrolysis/PyrolysisConversionAmount.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/ms' 6 | input_Scalar_values = 'ms' 7 | output_Scalar_names = 'state/alpha' 8 | output_Scalar_values = 'alpha' 9 | check_AD_parameter_derivatives = false 10 | [] 11 | [] 12 | 13 | [Tensors] 14 | [ms] 15 | type = Scalar 16 | values = "0.03 0.75 0.22" 17 | batch_shape = '(3)' 18 | [] 19 | [alpha] 20 | type = Scalar 21 | values = "4.75 -1.25 3.166666" 22 | batch_shape = '(3)' 23 | [] 24 | [] 25 | 26 | [Models] 27 | [model] 28 | type = PyrolysisConversionAmount 29 | initial_mass_solid = 0.2 30 | initial_mass_binder = 0.4 31 | reaction_yield = 0.7 32 | 33 | mass_solid = 'state/ms' 34 | reaction_amount = 'state/alpha' 35 | [] 36 | [] -------------------------------------------------------------------------------- /tests/unit/models/pyrolysis/PyrolysisKinetics.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/T state/f' 6 | input_Scalar_values = 'T f' 7 | output_Scalar_names = 'state/out' 8 | output_Scalar_values = 'out' 9 | check_AD_parameter_derivatives = false 10 | [] 11 | [] 12 | 13 | [Tensors] 14 | [T] 15 | type = Scalar 16 | values = "100 52300 -7" 17 | batch_shape = '(3)' 18 | [] 19 | [f] 20 | type = Scalar 21 | values = "0.1 123 44" 22 | batch_shape = '(3)' 23 | [] 24 | [out] 25 | type = Scalar 26 | values = "2.0999218e-4 0.2583 0.092449" 27 | batch_shape = '(3)' 28 | [] 29 | [] 30 | 31 | [Models] 32 | [model] 33 | type = PyrolysisKinetics 34 | kinetic_constant = 2.1e-3 35 | activation_energy = 6.7e-5 36 | ideal_gas_constant = 1.8e-2 37 | temperature = 'state/T' 38 | reaction = 'state/f' 39 | out = 'state/out' 40 | [] 41 | [] -------------------------------------------------------------------------------- /tests/unit/models/reactive_infiltration/DiffusionLimitedReaction.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/ri state/ro state/R_l state/R_s' 6 | input_Scalar_values = '0.5 0.8 0.2 0.3' 7 | output_Scalar_names = 'state/alpha_rate' 8 | output_Scalar_values = '0.000503226' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model] 14 | type = DiffusionLimitedReaction 15 | diffusion_coefficient = 1e-3 16 | molar_volume = 1 17 | product_inner_radius = 'state/ri' 18 | solid_inner_radius = 'state/ro' 19 | liquid_reactivity = 'state/R_l' 20 | solid_reactivity = 'state/R_s' 21 | reaction_rate = 'state/alpha_rate' 22 | [] 23 | [] 24 | -------------------------------------------------------------------------------- /tests/unit/models/reactive_infiltration/ProductGeometry.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/phi_s state/phi_p' 6 | input_Scalar_values = '0.1 0.2' 7 | output_Scalar_names = 'state/ri state/ro' 8 | output_Scalar_values = '0.83666 0.948683' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model] 14 | type = ProductGeometry 15 | solid_fraction = 'state/phi_s' 16 | product_fraction = 'state/phi_p' 17 | inner_radius = 'state/ri' 18 | outer_radius = 'state/ro' 19 | [] 20 | [] 21 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/AssociativeIsotropicPlasticHardening.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/gamma_rate state/internal/Nk' 6 | input_Scalar_values = '0.0015 -1' 7 | output_Scalar_names = 'state/internal/ep_rate' 8 | output_Scalar_values = '0.0015' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model] 14 | type = AssociativeIsotropicPlasticHardening 15 | [] 16 | [] 17 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/AssociativeJ2FlowDirection.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [M] 3 | type = FillSR2 4 | values = '1 2 3 4 5 6' 5 | [] 6 | [NM] 7 | type = FillSR2 8 | values = '-0.09805807 0 0.09805807 0.39223227 0.49029034 0.58834841' 9 | [] 10 | [] 11 | 12 | [Drivers] 13 | [unit] 14 | type = ModelUnitTest 15 | model = 'model' 16 | input_SR2_names = 'state/M' 17 | input_SR2_values = 'M' 18 | output_SR2_names = 'state/NM' 19 | output_SR2_values = 'NM' 20 | derivative_abs_tol = 1e-6 21 | [] 22 | [] 23 | 24 | [Models] 25 | [model] 26 | type = AssociativeJ2FlowDirection 27 | mandel_stress = 'state/M' 28 | flow_direction = 'state/NM' 29 | [] 30 | [] 31 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/AssociativeKinematicPlasticHardening.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/gamma_rate' 6 | input_Scalar_values = '0.0015' 7 | input_SR2_names = 'state/internal/NX' 8 | input_SR2_values = 'NX' 9 | output_SR2_names = 'state/internal/Kp_rate' 10 | output_SR2_values = 'Kp_rate' 11 | [] 12 | [] 13 | 14 | [Tensors] 15 | [NX] 16 | type = FillSR2 17 | values = '0.3482 -0.3482 0 -0.087045 -0.087045 -0.78333' 18 | [] 19 | [Kp_rate] 20 | type = FillSR2 21 | values = '-0.0005223 0.0005223 0 0.0001305675 0.0001305675 0.001174995' 22 | [] 23 | [] 24 | 25 | [Models] 26 | [model] 27 | type = AssociativeKinematicPlasticHardening 28 | [] 29 | [] 30 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/AssociativePlasticFlow.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/gamma_rate' 6 | input_Scalar_values = '0.0015' 7 | input_SR2_names = 'state/internal/NM' 8 | input_SR2_values = 'NX' 9 | output_SR2_names = 'state/internal/Ep_rate' 10 | output_SR2_values = 'Ep_rate' 11 | [] 12 | [] 13 | 14 | [Tensors] 15 | [NX] 16 | type = FillSR2 17 | values = '-0.3482 0.3482 0 0.087045 0.087045 0.78333' 18 | [] 19 | [Ep_rate] 20 | type = FillSR2 21 | values = '-0.0005223 0.0005223 0 0.0001305675 0.0001305675 0.001174995' 22 | [] 23 | [] 24 | 25 | [Models] 26 | [model] 27 | type = AssociativePlasticFlow 28 | [] 29 | [] 30 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/ChabochePlasticHardening.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/gamma_rate' 6 | input_Scalar_values = '0.01' 7 | input_SR2_names = 'state/internal/NM state/internal/X' 8 | input_SR2_values = 'NM X' 9 | output_SR2_names = 'state/internal/X_rate' 10 | output_SR2_values = 'X_rate' 11 | value_abs_tol = 1e-4 12 | [] 13 | [] 14 | 15 | [Tensors] 16 | [NM] 17 | type = FillSR2 18 | values = '-0.3482 0.3482 0 0.087045 0.087045 0.78333' 19 | [] 20 | [X] 21 | type = FillSR2 22 | values = '-10 15 5 -7 15 20' 23 | [] 24 | [X_rate] 25 | type = FillSR2 26 | values = '-1.3207 0.8204 -0.5003 1.2807 -0.9206 3.2210' 27 | [] 28 | [] 29 | 30 | [Models] 31 | [model] 32 | type = ChabochePlasticHardening 33 | C = 1000 34 | g = 10 35 | A = 1e-6 36 | a = 2.1 37 | [] 38 | [] 39 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/ChabochePlasticHardening_nl_params.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/gamma_rate state/C state/g state/A state/a' 6 | input_Scalar_values = '0.01 1000.0 10.0 1.0e-6 2.1' 7 | input_SR2_names = 'state/internal/NM state/internal/X' 8 | input_SR2_values = 'NM X' 9 | output_SR2_names = 'state/internal/X_rate' 10 | output_SR2_values = 'X_rate' 11 | value_abs_tol = 1.0e-4 12 | [] 13 | [] 14 | 15 | [Tensors] 16 | [NM] 17 | type = FillSR2 18 | values = '-0.3482 0.3482 0 0.087045 0.087045 0.78333' 19 | [] 20 | [X] 21 | type = FillSR2 22 | values = '-10 15 5 -7 15 20' 23 | [] 24 | [X_rate] 25 | type = FillSR2 26 | values = '-1.3207 0.8204 -0.5003 1.2807 -0.9206 3.2210' 27 | [] 28 | [] 29 | 30 | [Models] 31 | [model0] 32 | type = ChabochePlasticHardening 33 | C = 'state/C' 34 | g = 'state/g' 35 | A = 'state/A' 36 | a = 'state/a' 37 | [] 38 | [model] 39 | type = ComposedModel 40 | models = 'model0' 41 | [] 42 | [] 43 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/FredrickArmstrongPlasticHardening.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/gamma_rate' 6 | input_Scalar_values = '0.01' 7 | input_SR2_names = 'state/internal/NM state/internal/X' 8 | input_SR2_values = 'NM X' 9 | output_SR2_names = 'state/internal/X_rate' 10 | output_SR2_values = 'X_rate' 11 | value_abs_tol = 1e-4 12 | [] 13 | [] 14 | 15 | [Tensors] 16 | [NM] 17 | type = FillSR2 18 | values = '-0.3482 0.3482 0 0.087045 0.087045 0.78333' 19 | [] 20 | [X] 21 | type = FillSR2 22 | values = '-10 15 5 -7 15 20' 23 | [] 24 | [X_rate] 25 | type = FillSR2 26 | values = '-1.3213 0.8213 -0.5000 1.2803 -0.9197 3.2222' 27 | [] 28 | [] 29 | 30 | [Models] 31 | [model] 32 | type = FredrickArmstrongPlasticHardening 33 | C = 1000 34 | g = 10 35 | [] 36 | [] 37 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/FredrickArmstrongPlasticHardening_nl_params.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/gamma_rate state/C state/g' 6 | input_Scalar_values = '0.01 1000.0 10.0' 7 | input_SR2_names = 'state/internal/NM state/internal/X' 8 | input_SR2_values = 'NM X' 9 | output_SR2_names = 'state/internal/X_rate' 10 | output_SR2_values = 'X_rate' 11 | value_abs_tol = 1.0e-4 12 | [] 13 | [] 14 | 15 | [Tensors] 16 | [NM] 17 | type = FillSR2 18 | values = '-0.3482 0.3482 0 0.087045 0.087045 0.78333' 19 | [] 20 | [X] 21 | type = FillSR2 22 | values = '-10 15 5 -7 15 20' 23 | [] 24 | [X_rate] 25 | type = FillSR2 26 | values = '-1.3213 0.8213 -0.5000 1.2803 -0.9197 3.2222' 27 | [] 28 | [] 29 | 30 | [Models] 31 | [model0] 32 | type = FredrickArmstrongPlasticHardening 33 | C = 'state/C' 34 | g = 'state/g' 35 | [] 36 | [model] 37 | type = ComposedModel 38 | models = 'model0' 39 | [] 40 | [] 41 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/GTNYieldFunction.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/se state/internal/sp state/internal/f state/internal/k' 6 | input_Scalar_values = '70 30 0.1 20' 7 | output_Scalar_names = 'state/internal/fp' 8 | output_Scalar_values = '0.28441415168201506' 9 | check_second_derivatives = true 10 | derivative_abs_tol = 1e-06 11 | [] 12 | [] 13 | 14 | [Models] 15 | [model] 16 | type = GTNYieldFunction 17 | yield_stress = 50 18 | q1 = 1.5 19 | q2 = 1.0 20 | q3 = 2.25 21 | isotropic_hardening = 'state/internal/k' 22 | [] 23 | [] 24 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/GTNYieldFunctionStress.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/f state/internal/k' 6 | input_Scalar_values = '0.1 20' 7 | input_SR2_names = 'state/internal/M' 8 | input_SR2_values = 'M' 9 | output_Scalar_names = 'state/internal/fp' 10 | output_Scalar_values = '5.898644517958986' 11 | derivative_abs_tol = 1e-06 12 | check_second_derivatives = true 13 | [] 14 | [] 15 | 16 | [Tensors] 17 | [M] 18 | type = FillSR2 19 | values = '40 120 80 10 10 90' 20 | [] 21 | [] 22 | 23 | [Models] 24 | [j2] 25 | type = SR2Invariant 26 | invariant_type = 'VONMISES' 27 | tensor = 'state/internal/M' 28 | invariant = 'state/internal/se' 29 | [] 30 | [i1] 31 | type = SR2Invariant 32 | invariant_type = 'I1' 33 | tensor = 'state/internal/M' 34 | invariant = 'state/internal/sp' 35 | [] 36 | [yield] 37 | type = GTNYieldFunction 38 | yield_stress = 50 39 | q1 = 1.5 40 | q2 = 1.0 41 | q3 = 2.25 42 | isotropic_hardening = 'state/internal/k' 43 | [] 44 | [model] 45 | type = ComposedModel 46 | models = 'j2 i1 yield' 47 | [] 48 | [] 49 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/GTNYieldFunction_nl_params.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/se state/internal/sp state/internal/f state/internal/k state/sy state/q1 state/q2 state/q3' 6 | input_Scalar_values = '70 30 0.1 20 50 1.5 1.0 2.25' 7 | output_Scalar_names = 'state/internal/fp' 8 | output_Scalar_values = '0.28441415168201506' 9 | check_second_derivatives = true 10 | second_derivative_abs_tol = 1e-3 11 | [] 12 | [] 13 | 14 | [Models] 15 | [model0] 16 | type = GTNYieldFunction 17 | yield_stress = 'state/sy' 18 | q1 = 'state/q1' 19 | q2 = 'state/q2' 20 | q3 = 'state/q3' 21 | isotropic_hardening = 'state/internal/k' 22 | [] 23 | [model] 24 | type = ComposedModel 25 | models = 'model0' 26 | [] 27 | [] 28 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/GursonCavitation.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/f' 6 | input_Scalar_values = '0.1' 7 | input_SR2_names = 'state/internal/Ep_rate' 8 | input_SR2_values = 'Epr' 9 | output_Scalar_names = 'state/internal/f_rate' 10 | output_Scalar_values = '0.1125' 11 | [] 12 | [] 13 | 14 | [Tensors] 15 | [Epr] 16 | type = FillSR2 17 | values = '0.1 0.05 -0.025 0.15 -0.2 0.5' 18 | [] 19 | [] 20 | 21 | [Models] 22 | [model] 23 | type = GursonCavitation 24 | [] 25 | [] 26 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/IsotropicMandelStress.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_SR2_names = 'state/S' 6 | input_SR2_values = 'S' 7 | output_SR2_names = 'state/internal/M' 8 | output_SR2_values = 'M' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [S] 14 | type = FillSR2 15 | values = '50 -10 20 40 30 -60' 16 | [] 17 | [M] 18 | type = FillSR2 19 | values = '50 -10 20 40 30 -60' 20 | [] 21 | [] 22 | 23 | [Models] 24 | [model] 25 | type = IsotropicMandelStress 26 | [] 27 | [] 28 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/KocksMeckingActivationEnergy.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'forces/T forces/effective_strain_rate' 6 | input_Scalar_values = 'T 1.1' 7 | output_Scalar_names = 'forces/g' 8 | output_Scalar_values = 'g_correct' 9 | check_AD_parameter_derivatives = false 10 | [] 11 | [] 12 | 13 | [Models] 14 | [model] 15 | type = KocksMeckingActivationEnergy 16 | eps0 = 1e10 17 | k = 1.38064e-20 18 | b = 2.019e-7 19 | shear_modulus = 75000.0 20 | [] 21 | [] 22 | 23 | [Tensors] 24 | [T] 25 | type = LinspaceScalar 26 | start = 500 27 | end = 1000 28 | nstep = 5 29 | [] 30 | [g_correct] 31 | type = Scalar 32 | values = "0.25644517 0.32055647 0.38466776 0.44877906 0.51289035" 33 | batch_shape = '(5)' 34 | [] 35 | [] 36 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/KocksMeckingActivationEnergy_nl_params.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'forces/T forces/effective_strain_rate state/mu' 6 | input_Scalar_values = 'T 1.1 75000' 7 | output_Scalar_names = 'forces/g' 8 | output_Scalar_values = 'g_correct' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model0] 14 | type = KocksMeckingActivationEnergy 15 | eps0 = 1e10 16 | k = 1.38064e-20 17 | b = 2.019e-7 18 | shear_modulus = 'state/mu' 19 | [] 20 | [model] 21 | type = ComposedModel 22 | models = 'model0' 23 | [] 24 | [] 25 | 26 | [Tensors] 27 | [T] 28 | type = LinspaceScalar 29 | start = 500 30 | end = 1000 31 | nstep = 5 32 | [] 33 | [g_correct] 34 | type = Scalar 35 | values = "0.25644517 0.32055647 0.38466776 0.44877906 0.51289035" 36 | batch_shape = '(5)' 37 | [] 38 | [] 39 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/KocksMeckingFlowSwitch.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'forces/g state/internal/ri_rate state/internal/rd_rate' 6 | input_Scalar_values = 'g 0.5 0.75' 7 | output_Scalar_names = 'state/internal/gamma_rate' 8 | output_Scalar_values = 'fr_correct' 9 | check_AD_parameter_derivatives = false 10 | [] 11 | [] 12 | 13 | [Models] 14 | [model] 15 | type = KocksMeckingFlowSwitch 16 | g0 = 0.5 17 | sharpness = 2.1 18 | [] 19 | [] 20 | 21 | [Tensors] 22 | [g] 23 | type = LinspaceScalar 24 | start = 0.1 25 | end = 0.9 26 | nstep = 5 27 | [] 28 | [fr_correct] 29 | type = Scalar 30 | values = "0.53927387 0.5753837 0.625 0.6746163 0.71072613" 31 | batch_shape = '(5)' 32 | [] 33 | [] 34 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/KocksMeckingFlowSwitch_nl_params.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'forces/g state/internal/ri_rate state/internal/rd_rate state/g0' 6 | input_Scalar_values = 'g 0.5 0.75 0.5' 7 | output_Scalar_names = 'state/internal/gamma_rate' 8 | output_Scalar_values = 'fr_correct' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model0] 14 | type = KocksMeckingFlowSwitch 15 | g0 = 'state/g0' 16 | sharpness = 2.1 17 | [] 18 | [model] 19 | type = ComposedModel 20 | models = 'model0' 21 | [] 22 | [] 23 | 24 | [Tensors] 25 | [g] 26 | type = LinspaceScalar 27 | start = 0.1 28 | end = 0.9 29 | nstep = 5 30 | [] 31 | [fr_correct] 32 | type = Scalar 33 | values = "0.53927387 0.5753837 0.625 0.6746163 0.71072613" 34 | batch_shape = '(5)' 35 | [] 36 | [] 37 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/KocksMeckingFlowViscosity.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'p' 5 | input_Scalar_names = 'forces/T' 6 | input_Scalar_values = '1000' 7 | output_Scalar_names = 'parameters/p' 8 | output_Scalar_values = 'p_correct' 9 | check_second_derivatives = true 10 | [] 11 | [] 12 | 13 | [Models] 14 | [p] 15 | type = KocksMeckingFlowViscosity 16 | shear_modulus = 'mu' 17 | A = 'A' 18 | B = 'B' 19 | eps0 = 1e10 20 | k = 1.38064e-20 21 | b = 2.019e-7 22 | temperature = 'forces/T' 23 | [] 24 | [] 25 | 26 | [Tensors] 27 | [mu] 28 | type = LinspaceScalar 29 | start = 50000 30 | end = 100000 31 | nstep = 5 32 | [] 33 | [A] 34 | type = LinspaceScalar 35 | start = -3.5 36 | end = -5.5 37 | nstep = 5 38 | [] 39 | [B] 40 | type = LinspaceScalar 41 | start = -1.5 42 | end = -3.0 43 | nstep = 5 44 | [] 45 | [p_correct] 46 | type = Scalar 47 | values = "746.88551856 809.01337039 778.71385139 697.25850376 594.93909239" 48 | batch_shape = '(5)' 49 | [] 50 | [] 51 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/KocksMeckingFlowViscosity_nl_params.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'forces/T state/A state/B state/mu' 6 | input_Scalar_values = '1000 A_in B_in mu_in' 7 | output_Scalar_names = 'parameters/p' 8 | output_Scalar_values = 'p_correct' 9 | check_second_derivatives = true 10 | derivative_abs_tol = 0.01 11 | second_derivative_abs_tol = 1e-3 12 | [] 13 | [] 14 | 15 | [Models] 16 | [p] 17 | type = KocksMeckingFlowViscosity 18 | shear_modulus = 'state/mu' 19 | A = 'state/A' 20 | B = 'state/B' 21 | eps0 = 1e10 22 | k = 1.38064e-20 23 | b = 2.019e-7 24 | temperature = 'forces/T' 25 | [] 26 | [model] 27 | type = ComposedModel 28 | models = 'p' 29 | [] 30 | [] 31 | 32 | [Tensors] 33 | [mu_in] 34 | type = LinspaceScalar 35 | start = 50000 36 | end = 100000 37 | nstep = 5 38 | [] 39 | [A_in] 40 | type = LinspaceScalar 41 | start = -3.5 42 | end = -5.5 43 | nstep = 5 44 | [] 45 | [B_in] 46 | type = LinspaceScalar 47 | start = -1.5 48 | end = -3.0 49 | nstep = 5 50 | [] 51 | [p_correct] 52 | type = Scalar 53 | values = "746.88551856 809.01337039 778.71385139 697.25850376 594.93909239" 54 | batch_shape = '(5)' 55 | [] 56 | [] 57 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/KocksMeckingIntercept.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'p' 5 | output_Scalar_names = 'parameters/p' 6 | output_Scalar_values = 'p_correct' 7 | check_second_derivatives = true 8 | [] 9 | [] 10 | 11 | [Models] 12 | [p] 13 | type = KocksMeckingIntercept 14 | A = 'A' 15 | B = 'B' 16 | C = 'C' 17 | [] 18 | [] 19 | 20 | [Tensors] 21 | [A] 22 | type = LinspaceScalar 23 | start = -2.0 24 | end = -3.0 25 | nstep = 5 26 | [] 27 | [B] 28 | type = LinspaceScalar 29 | start = -4.0 30 | end = -7.0 31 | nstep = 5 32 | [] 33 | [C] 34 | type = LinspaceScalar 35 | start = -5.0 36 | end = -8.0 37 | nstep = 5 38 | [] 39 | [p_correct] 40 | type = Scalar 41 | values = "0.5 0.44444444 0.4 0.36363636 0.33333333" 42 | batch_shape = '(5)' 43 | [] 44 | [] 45 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/KocksMeckingIntercept_nl_params.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/A state/B state/C' 6 | input_Scalar_values = 'A_in B_in C_in' 7 | output_Scalar_names = 'parameters/p' 8 | output_Scalar_values = 'p_correct' 9 | check_second_derivatives = true 10 | [] 11 | [] 12 | 13 | [Models] 14 | [p] 15 | type = KocksMeckingIntercept 16 | A = 'state/A' 17 | B = 'state/B' 18 | C = 'state/C' 19 | [] 20 | [model] 21 | type = ComposedModel 22 | models = 'p' 23 | [] 24 | [] 25 | 26 | [Tensors] 27 | [A_in] 28 | type = LinspaceScalar 29 | start = -2.0 30 | end = -3.0 31 | nstep = 5 32 | [] 33 | [B_in] 34 | type = LinspaceScalar 35 | start = -4.0 36 | end = -7.0 37 | nstep = 5 38 | [] 39 | [C_in] 40 | type = LinspaceScalar 41 | start = -5.0 42 | end = -8.0 43 | nstep = 5 44 | [] 45 | [p_correct] 46 | type = Scalar 47 | values = "0.5 0.44444444 0.4 0.36363636 0.33333333" 48 | batch_shape = '(5)' 49 | [] 50 | [] 51 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/KocksMeckingRateSensitivity.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'p' 5 | input_Scalar_names = 'forces/T' 6 | input_Scalar_values = '1000' 7 | output_Scalar_names = 'parameters/p' 8 | output_Scalar_values = 'p_correct' 9 | check_second_derivatives = true 10 | [] 11 | [] 12 | 13 | [Models] 14 | [p] 15 | type = KocksMeckingRateSensitivity 16 | shear_modulus = 'mu' 17 | A = 'A' 18 | k = 1.38064e-20 19 | b = 2.019e-7 20 | temperature = 'forces/T' 21 | [] 22 | [] 23 | 24 | [Tensors] 25 | [mu] 26 | type = LinspaceScalar 27 | start = 50000 28 | end = 100000 29 | nstep = 5 30 | [] 31 | [A] 32 | type = LinspaceScalar 33 | start = -3.5 34 | end = -5.5 35 | nstep = 5 36 | [] 37 | [p_correct] 38 | type = Scalar 39 | values = "8.51589828 9.31426374 9.93521466 10.43197539 10.83841599" 40 | batch_shape = '(5)' 41 | [] 42 | [] 43 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/KocksMeckingRateSensitivity_nl_params.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'forces/T state/mu state/A' 6 | input_Scalar_values = '1000 mu_in A_in' 7 | output_Scalar_names = 'parameters/p' 8 | output_Scalar_values = 'p_correct' 9 | check_second_derivatives = true 10 | [] 11 | [] 12 | 13 | [Models] 14 | [p] 15 | type = KocksMeckingRateSensitivity 16 | shear_modulus = 'state/mu' 17 | A = 'state/A' 18 | k = 1.38064e-20 19 | b = 2.019e-7 20 | temperature = 'forces/T' 21 | [] 22 | [model] 23 | type = ComposedModel 24 | models = 'p' 25 | [] 26 | [] 27 | 28 | [Tensors] 29 | [mu_in] 30 | type = LinspaceScalar 31 | start = 50000 32 | end = 100000 33 | nstep = 5 34 | [] 35 | [A_in] 36 | type = LinspaceScalar 37 | start = -3.5 38 | end = -5.5 39 | nstep = 5 40 | [] 41 | [p_correct] 42 | type = Scalar 43 | values = "8.51589828 9.31426374 9.93521466 10.43197539 10.83841599" 44 | batch_shape = '(5)' 45 | [] 46 | [] 47 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/KocksMeckingYieldStress.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'p' 5 | output_Scalar_names = 'parameters/p' 6 | output_Scalar_values = 'p_correct' 7 | [] 8 | [] 9 | 10 | [Models] 11 | [p] 12 | type = KocksMeckingYieldStress 13 | C = 'C' 14 | shear_modulus = 'mu' 15 | [] 16 | [] 17 | 18 | [Tensors] 19 | [mu] 20 | type = LinspaceScalar 21 | start = 50000 22 | end = 100000 23 | nstep = 5 24 | [] 25 | [C] 26 | type = LinspaceScalar 27 | start = -3.5 28 | end = -5.5 29 | nstep = 5 30 | [] 31 | [p_correct] 32 | type = Scalar 33 | values = "1509.86917112 1144.72743055 833.17474037 589.57036242 408.67714385" 34 | batch_shape = '(5)' 35 | [] 36 | [] 37 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/KocksMeckingYieldStress_nl_params.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/mu state/C' 6 | input_Scalar_values = 'mu_in C_in' 7 | output_Scalar_names = 'parameters/p' 8 | output_Scalar_values = 'p_correct' 9 | check_second_derivatives = true 10 | [] 11 | [] 12 | 13 | [Models] 14 | [p] 15 | type = KocksMeckingYieldStress 16 | C = 'state/C' 17 | shear_modulus = 'state/mu' 18 | [] 19 | [model] 20 | type = ComposedModel 21 | models = 'p' 22 | [] 23 | [] 24 | 25 | [Tensors] 26 | [mu_in] 27 | type = LinspaceScalar 28 | start = 50000 29 | end = 100000 30 | nstep = 5 31 | [] 32 | [C_in] 33 | type = LinspaceScalar 34 | start = -3.5 35 | end = -5.5 36 | nstep = 5 37 | [] 38 | [p_correct] 39 | type = Scalar 40 | values = "1509.86917112 1144.72743055 833.17474037 589.57036242 408.67714385" 41 | batch_shape = '(5)' 42 | [] 43 | [] 44 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/LinearIsotropicElasticJ2TrialStressUpdate.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'forces/s state/ep old_state/ep' 6 | input_Scalar_values = '1.5 0.1 0.05' 7 | output_Scalar_names = 'state/s' 8 | output_Scalar_values = '1.38461538462' 9 | derivative_abs_tol = 1e-6 10 | [] 11 | [] 12 | 13 | [Models] 14 | [model] 15 | type = LinearIsotropicElasticJ2TrialStressUpdate 16 | coefficients = '2 0.3' 17 | coefficient_types = 'YOUNGS_MODULUS POISSONS_RATIO' 18 | [] 19 | [] 20 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/LinearIsotropicHardening.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/ep' 6 | input_Scalar_values = '0.1' 7 | output_Scalar_names = 'state/internal/k' 8 | output_Scalar_values = '100' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model] 14 | type = LinearIsotropicHardening 15 | hardening_modulus = 1000 16 | [] 17 | [] 18 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/LinearKinematicHardening.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_SR2_names = 'state/internal/Kp' 6 | input_SR2_values = 'Kp' 7 | output_SR2_names = 'state/internal/X' 8 | output_SR2_values = 'X' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [Kp] 14 | type = FillSR2 15 | values = '0.05 -0.01 0.02 0.04 0.03 -0.06' 16 | [] 17 | [X] 18 | type = FillSR2 19 | values = '50 -10 20 40 30 -60' 20 | [] 21 | [] 22 | 23 | [Models] 24 | [model] 25 | type = LinearKinematicHardening 26 | hardening_modulus = 1000 27 | [] 28 | [] 29 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/NonlinearParameter.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_SR2_names = 'state/internal/M' 6 | input_SR2_values = 'M' 7 | input_Scalar_names = 'forces/T' 8 | input_Scalar_values = '550' 9 | output_Scalar_names = 'state/internal/fp' 10 | output_Scalar_values = '102.5057' 11 | derivative_abs_tol = 1e-06 12 | check_second_derivatives = true 13 | check_AD_parameter_derivatives = false 14 | [] 15 | [] 16 | 17 | [Tensors] 18 | [M] 19 | type = FillSR2 20 | values = '40 120 80 10 10 90' 21 | [] 22 | [T_data] 23 | type = LinspaceScalar 24 | start = 273.15 25 | end = 2000 26 | nstep = 10 27 | dim = 0 28 | [] 29 | [s0_data] 30 | type = LinspaceScalar 31 | start = 50 32 | end = 30 33 | nstep = 10 34 | dim = 0 35 | [] 36 | [] 37 | 38 | [Models] 39 | [vonmises] 40 | type = SR2Invariant 41 | invariant_type = 'VONMISES' 42 | tensor = 'state/internal/M' 43 | invariant = 'state/internal/s' 44 | [] 45 | [s0] 46 | type = ScalarLinearInterpolation 47 | argument = 'forces/T' 48 | abscissa = 'T_data' 49 | ordinate = 's0_data' 50 | [] 51 | [yield] 52 | type = YieldFunction 53 | yield_stress = 's0' 54 | [] 55 | [model] 56 | type = ComposedModel 57 | models = 'vonmises yield' 58 | [] 59 | [] 60 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/OlevskySinteringStress.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/f' 6 | input_Scalar_values = '0.3' 7 | output_Scalar_names = 'state/internal/ss' 8 | output_Scalar_values = '0.27' 9 | check_second_derivatives = true 10 | derivative_abs_tol = 1e-06 11 | parameter_derivative_rel_tol = 1e-3 12 | [] 13 | [] 14 | 15 | [Models] 16 | [model] 17 | type = OlevskySinteringStress 18 | surface_tension = 1e-3 19 | particle_radius = 1e-3 20 | [] 21 | [] 22 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/PerzynaPlasticFlowRate.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/fp' 6 | input_Scalar_values = '50' 7 | output_Scalar_names = 'state/internal/gamma_rate' 8 | output_Scalar_values = '0.0013717421124828527' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model] 14 | type = PerzynaPlasticFlowRate 15 | reference_stress = 150 16 | exponent = 6 17 | [] 18 | [] 19 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/PerzynaPlasticFlowRate_nl_params.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/fp state/eta state/n' 6 | input_Scalar_values = '50 150 6' 7 | output_Scalar_names = 'state/internal/gamma_rate' 8 | output_Scalar_values = '0.0013717421124828527' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model0] 14 | type = PerzynaPlasticFlowRate 15 | reference_stress = 'state/eta' 16 | exponent = 'state/n' 17 | [] 18 | [model] 19 | type = ComposedModel 20 | models = 'model0' 21 | [] 22 | [] 23 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/PhaseTransformationEigenstrain.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/f state/dv' 6 | input_Scalar_values = '0.7 0.3' 7 | output_SR2_names = 'forces/Eg' 8 | output_SR2_values = 'EV_correct' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [EV_correct] 14 | type = FillSR2 15 | values = '0.21 0.21 0.21 0 0 0' 16 | [] 17 | [] 18 | 19 | [Models] 20 | [model] 21 | type = PhaseTransformationEigenstrain 22 | volume_fraction_change = 'state/dv' 23 | phase_fraction = 'state/f' 24 | [] 25 | [] 26 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/PowerLawIsotropicHardeningStaticRecovery.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/n state/tau state/internal/k' 6 | input_Scalar_values = '2.0 75.0 125.0' 7 | output_Scalar_names = 'state/internal/k_recovery_rate' 8 | output_Scalar_values = '-2.7777777778' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model0] 14 | type = PowerLawIsotropicHardeningStaticRecovery 15 | tau = 'state/tau' 16 | n = 'state/n' 17 | [] 18 | [model] 19 | type = ComposedModel 20 | models = 'model0' 21 | [] 22 | [] 23 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/PowerLawKinematicHardeningStaticRecovery.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/tau state/n' 6 | input_Scalar_values = '120.0 2.0' 7 | input_SR2_names = 'state/internal/X' 8 | input_SR2_values = 'X' 9 | output_SR2_names = 'state/internal/X_recovery_rate' 10 | output_SR2_values = 'X_rate' 11 | value_abs_tol = 1.0e-4 12 | [] 13 | [] 14 | 15 | [Tensors] 16 | [X] 17 | type = FillSR2 18 | values = '-10 15 5 -7 15 20' 19 | [] 20 | [X_rate] 21 | type = FillSR2 22 | values = '0.02861583 -0.04292375 -0.01430792 0.02003108 -0.04292375 -0.05723166' 23 | [] 24 | [] 25 | 26 | [Models] 27 | [model0] 28 | type = PowerLawKinematicHardeningStaticRecovery 29 | tau = 'state/tau' 30 | n = 'state/n' 31 | [] 32 | [model] 33 | type = ComposedModel 34 | models = 'model0' 35 | [] 36 | [] 37 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/RateIndependentPlasticFlowConstraint.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [fp] 3 | type = Scalar 4 | values = '-2 -1 0.5 1 2' 5 | batch_shape = '(5)' 6 | [] 7 | [gamma_rate] 8 | type = Scalar 9 | values = '5 4 3 2 1' 10 | batch_shape = '(5)' 11 | [] 12 | [rp] 13 | type = Scalar 14 | values = '1.61483519 0.87689437 -0.54138127 -1.23606798 -3.23606798' 15 | batch_shape = '(5)' 16 | [] 17 | [] 18 | 19 | [Drivers] 20 | [unit] 21 | type = ModelUnitTest 22 | model = 'model' 23 | input_Scalar_names = 'state/internal/fp state/internal/gamma_rate' 24 | input_Scalar_values = 'fp gamma_rate' 25 | output_Scalar_names = 'residual/internal/gamma_rate' 26 | output_Scalar_values = 'rp' 27 | [] 28 | [] 29 | 30 | [Models] 31 | [model] 32 | type = RateIndependentPlasticFlowConstraint 33 | [] 34 | [] 35 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/ScalarTwoStageThermalAnnealing.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'forces/T state/internal/k_rate_unmodified state/internal/k' 6 | input_Scalar_values = 'temperature_in 20.0 100.0' 7 | output_Scalar_names = 'state/internal/k_rate' 8 | output_Scalar_values = 'correct_values' 9 | check_second_derivatives = false 10 | check_AD_parameter_derivatives = false 11 | [] 12 | [] 13 | 14 | [Models] 15 | [model] 16 | type = ScalarTwoStageThermalAnnealing 17 | base_rate = 'state/internal/k_rate_unmodified' 18 | base = 'state/internal/k' 19 | modified_rate = 'state/internal/k_rate' 20 | temperature = 'forces/T' 21 | 22 | T1 = 1000.0 23 | T2 = 1200.0 24 | 25 | tau = 20.0 26 | [] 27 | [] 28 | 29 | [Tensors] 30 | [temperature_in] 31 | type = Scalar 32 | values = "800.0 999 1001 1100 1199 1201 1250" 33 | batch_shape = '(7)' 34 | [] 35 | 36 | [correct_values] 37 | type = Scalar 38 | values = "20.0 20.0 0.0 0.0 0.0 -5.0 -5.0" 39 | batch_shape = '(7)' 40 | [] 41 | [] 42 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/SlopeSaturationVoceIsotropicHardening.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/gamma_rate state/internal/k' 6 | input_Scalar_values = '0.1 50.0' 7 | output_Scalar_names = 'state/internal/k_rate' 8 | output_Scalar_values = '5.5' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model] 14 | type = SlopeSaturationVoceIsotropicHardening 15 | saturated_hardening = 100 16 | initial_hardening_rate = 110.0 17 | [] 18 | [] 19 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/SlopeSaturationVoceIsotropicHardening_negative.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/gamma_rate state/internal/k' 6 | input_Scalar_values = '0.1 50.0' 7 | output_Scalar_names = 'state/internal/k_rate' 8 | output_Scalar_values = '-16.5' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model] 14 | type = SlopeSaturationVoceIsotropicHardening 15 | saturated_hardening = -100 16 | initial_hardening_rate = 110.0 17 | [] 18 | [] 19 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/SlopeSaturationVoceIsotropicHardening_nl_params.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/gamma_rate state/R state/theta0 state/internal/k' 6 | input_Scalar_values = '0.1 100.0 110 50.0' 7 | output_Scalar_names = 'state/internal/k_rate' 8 | output_Scalar_values = '5.5' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model0] 14 | type = SlopeSaturationVoceIsotropicHardening 15 | saturated_hardening = 'state/R' 16 | initial_hardening_rate = 'state/theta0' 17 | [] 18 | [model] 19 | type = ComposedModel 20 | models = 'model0' 21 | [] 22 | [] 23 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/SlopeSaturationVoceIsotropicHardening_nl_params_negative.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/gamma_rate state/R state/theta0 state/internal/k' 6 | input_Scalar_values = '0.1 -100.0 110 50.0' 7 | output_Scalar_names = 'state/internal/k_rate' 8 | output_Scalar_values = '-16.5' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model0] 14 | type = SlopeSaturationVoceIsotropicHardening 15 | saturated_hardening = 'state/R' 16 | initial_hardening_rate = 'state/theta0' 17 | [] 18 | [model] 19 | type = ComposedModel 20 | models = 'model0' 21 | [] 22 | [] 23 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/ThermalEigenstrain.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'forces/T' 6 | input_Scalar_values = '400' 7 | output_SR2_names = 'forces/Eg' 8 | output_SR2_values = 'Eg_correct' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [Eg_correct] 14 | type = FillSR2 15 | values = '1e-3 1e-3 1e-3 0 0 0' 16 | [] 17 | [] 18 | 19 | [Models] 20 | [model] 21 | type = ThermalEigenstrain 22 | reference_temperature = 300 23 | CTE = 1e-5 24 | [] 25 | [] 26 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/ThermalEigenstrain_nl_params.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'forces/T state/alpha' 6 | input_Scalar_values = '400 1.0e-5' 7 | output_SR2_names = 'forces/Eg' 8 | output_SR2_values = 'Eg_correct' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [Eg_correct] 14 | type = FillSR2 15 | values = '1e-3 1e-3 1e-3 0 0 0' 16 | [] 17 | [] 18 | 19 | [Models] 20 | [model0] 21 | type = ThermalEigenstrain 22 | reference_temperature = 300 23 | CTE = 'state/alpha' 24 | [] 25 | [model] 26 | type = ComposedModel 27 | models = 'model0' 28 | [] 29 | [] 30 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/VoceIsotropicHardening.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/ep' 6 | input_Scalar_values = '0.1' 7 | output_Scalar_names = 'state/internal/k' 8 | output_Scalar_values = '10.416586470347177' 9 | check_second_derivatives = true 10 | [] 11 | [] 12 | 13 | [Models] 14 | [model] 15 | type = VoceIsotropicHardening 16 | saturated_hardening = 100 17 | saturation_rate = 1.1 18 | [] 19 | [] 20 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/VoceIsotropicHardening_nl_params.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/ep state/R state/d' 6 | input_Scalar_values = '0.1 100.0 1.1' 7 | output_Scalar_names = 'state/internal/k' 8 | output_Scalar_values = '10.416586470347177' 9 | [] 10 | [] 11 | 12 | [Models] 13 | [model0] 14 | type = VoceIsotropicHardening 15 | saturated_hardening = 'state/R' 16 | saturation_rate = 'state/d' 17 | [] 18 | [model] 19 | type = ComposedModel 20 | models = 'model0' 21 | [] 22 | [] 23 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/VolumeChangeEigenstrain.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/V' 6 | input_Scalar_values = '412' 7 | output_SR2_names = 'forces/Eg' 8 | output_SR2_values = 'EV_correct' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [EV_correct] 14 | type = FillSR2 15 | values = '0.2498894057 0.2498894057 0.2498894057 0 0 0' 16 | [] 17 | [] 18 | 19 | [Models] 20 | [model] 21 | type = VolumeChangeEigenstrain 22 | reference_volume = 211 23 | volume = 'state/V' 24 | eigenstrain = 'forces/Eg' 25 | [] 26 | [] 27 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/YieldFunction_isoharden.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/h' 6 | input_Scalar_values = '20' 7 | input_SR2_names = 'state/internal/M' 8 | input_SR2_values = 'M' 9 | output_Scalar_names = 'state/internal/fp' 10 | output_Scalar_values = '83.5577' 11 | derivative_abs_tol = 1e-06 12 | check_second_derivatives = true 13 | [] 14 | [] 15 | 16 | [Tensors] 17 | [M] 18 | type = FillSR2 19 | values = '40 120 80 10 10 90' 20 | [] 21 | [] 22 | 23 | [Models] 24 | [vonmises] 25 | type = SR2Invariant 26 | invariant_type = 'VONMISES' 27 | tensor = 'state/internal/M' 28 | invariant = 'state/internal/s' 29 | [] 30 | [yield] 31 | type = YieldFunction 32 | yield_stress = 50 33 | isotropic_hardening = 'state/internal/h' 34 | [] 35 | [model] 36 | type = ComposedModel 37 | models = 'vonmises yield' 38 | [] 39 | [] 40 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/YieldFunction_isokinharden.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/internal/h' 6 | input_Scalar_values = '20' 7 | input_SR2_names = 'state/internal/M state/internal/X' 8 | input_SR2_values = 'M X' 9 | output_Scalar_names = 'state/internal/fp' 10 | output_Scalar_values = '83.5577' 11 | derivative_abs_tol = 1e-06 12 | check_second_derivatives = true 13 | [] 14 | [] 15 | 16 | [Tensors] 17 | [M] 18 | type = FillSR2 19 | values = '100 110 100 50 40 30' 20 | [] 21 | [X] 22 | type = FillSR2 23 | values = '60 -10 20 40 30 -60' 24 | [] 25 | [] 26 | 27 | [Models] 28 | [overstress] 29 | type = SR2LinearCombination 30 | to_var = 'state/internal/O' 31 | from_var = 'state/internal/M state/internal/X' 32 | coefficients = '1 -1' 33 | [] 34 | [vonmises] 35 | type = SR2Invariant 36 | invariant_type = 'VONMISES' 37 | tensor = 'state/internal/O' 38 | invariant = 'state/internal/s' 39 | [] 40 | [yield] 41 | type = YieldFunction 42 | yield_stress = 50 43 | isotropic_hardening = 'state/internal/h' 44 | [] 45 | [model] 46 | type = ComposedModel 47 | models = 'overstress vonmises yield' 48 | [] 49 | [] 50 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/YieldFunction_kinharden.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_SR2_names = 'state/internal/M state/internal/X' 6 | input_SR2_values = 'M X' 7 | output_Scalar_names = 'state/internal/fp' 8 | output_Scalar_values = '99.8876' 9 | derivative_abs_tol = 1e-06 10 | check_second_derivatives = true 11 | [] 12 | [] 13 | 14 | [Tensors] 15 | [M] 16 | type = FillSR2 17 | values = '100 110 100 50 40 30' 18 | [] 19 | [X] 20 | type = FillSR2 21 | values = '60 -10 20 40 30 -60' 22 | [] 23 | [] 24 | 25 | [Models] 26 | [overstress] 27 | type = SR2LinearCombination 28 | to_var = 'state/internal/O' 29 | from_var = 'state/internal/M state/internal/X' 30 | coefficients = '1 -1' 31 | [] 32 | [vonmises] 33 | type = SR2Invariant 34 | invariant_type = 'VONMISES' 35 | tensor = 'state/internal/O' 36 | invariant = 'state/internal/s' 37 | [] 38 | [yield] 39 | type = YieldFunction 40 | yield_stress = 50 41 | [] 42 | [model] 43 | type = ComposedModel 44 | models = 'overstress vonmises yield' 45 | [] 46 | [] 47 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/YieldFunction_nl_params.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/sy' 6 | input_Scalar_values = '50' 7 | input_SR2_names = 'state/internal/M' 8 | input_SR2_values = 'M' 9 | output_Scalar_names = 'state/internal/fp' 10 | output_Scalar_values = '99.8876' 11 | check_second_derivatives = true 12 | derivative_abs_tol = 1e-06 13 | [] 14 | [] 15 | 16 | [Tensors] 17 | [M] 18 | type = FillSR2 19 | values = '40 120 80 10 10 90' 20 | [] 21 | [] 22 | 23 | [Models] 24 | [vonmises] 25 | type = SR2Invariant 26 | invariant_type = 'VONMISES' 27 | tensor = 'state/internal/M' 28 | invariant = 'state/internal/s' 29 | [] 30 | [yield] 31 | type = YieldFunction 32 | yield_stress = 'state/sy' 33 | [] 34 | [model] 35 | type = ComposedModel 36 | models = 'vonmises yield' 37 | [] 38 | [] 39 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/YieldFunction_perfect.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_SR2_names = 'state/internal/M' 6 | input_SR2_values = 'M' 7 | output_Scalar_names = 'state/internal/fp' 8 | output_Scalar_values = '99.8876' 9 | check_second_derivatives = true 10 | derivative_abs_tol = 1e-06 11 | [] 12 | [] 13 | 14 | [Tensors] 15 | [M] 16 | type = FillSR2 17 | values = '40 120 80 10 10 90' 18 | [] 19 | [] 20 | 21 | [Models] 22 | [vonmises] 23 | type = SR2Invariant 24 | invariant_type = 'VONMISES' 25 | tensor = 'state/internal/M' 26 | invariant = 'state/internal/s' 27 | [] 28 | [yield] 29 | type = YieldFunction 30 | yield_stress = 50 31 | [] 32 | [model] 33 | type = ComposedModel 34 | models = 'vonmises yield' 35 | [] 36 | [] 37 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/crystal_plasticity/ElasticStrainRate.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_SR2_names = 'state/elastic_strain forces/deformation_rate state/internal/plastic_deformation_rate' 6 | input_SR2_values = 'e d dp' 7 | input_WR2_names = 'forces/vorticity' 8 | input_WR2_values = 'w' 9 | output_SR2_names = 'state/elastic_strain_rate' 10 | output_SR2_values = 'e_rate' 11 | [] 12 | [] 13 | 14 | [Tensors] 15 | [e] 16 | type = FillSR2 17 | values = '0.100 0.110 0.100 0.050 0.040 0.030' 18 | [] 19 | [d] 20 | type = FillSR2 21 | values = '0.050 -0.010 0.020 0.040 0.030 -0.060' 22 | [] 23 | [dp] 24 | type = FillSR2 25 | values = '0.050 0.120 0.080 0.010 0.010 0.090' 26 | [] 27 | [w] 28 | type = FillWR2 29 | values = '0.01 -0.02 0.03' 30 | [] 31 | [e_rate] 32 | type = FillSR2 33 | values = '-0.0034 -0.1292 -0.0574 0.0319 0.0188 -0.1517' 34 | [] 35 | [] 36 | 37 | [Models] 38 | [model] 39 | type = ElasticStrainRate 40 | [] 41 | [] 42 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/crystal_plasticity/FixOrientation.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Rot_names = 'state/orientation' 6 | input_Rot_values = 'R_in' 7 | output_Rot_names = 'state/output_orientation' 8 | output_Rot_values = 'R_out' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [R_in] 14 | type = FillRot 15 | values = '1.0 -0.1 -0.05' 16 | [] 17 | [R_out] 18 | type = FillRot 19 | values = '-0.98765432 0.09876543 0.04938272' 20 | [] 21 | [] 22 | 23 | [Models] 24 | [model] 25 | type = FixOrientation 26 | input_orientation = 'state/orientation' 27 | output_orientation = 'state/output_orientation' 28 | [] 29 | [] 30 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/crystal_plasticity/LinearSingleSlipHardeningRule.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | output_Scalar_names = 'state/internal/slip_hardening_rate' 6 | output_Scalar_values = 'rate' 7 | input_Scalar_names = 'state/internal/slip_hardening state/internal/sum_slip_rates' 8 | input_Scalar_values = 'tau_bar sum_slip' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [tau_bar] 14 | type = Scalar 15 | values = '40.0' 16 | [] 17 | [sum_slip] 18 | type = Scalar 19 | values = '0.1' 20 | [] 21 | [rate] 22 | type = Scalar 23 | values = '20.0' 24 | [] 25 | [] 26 | 27 | [Models] 28 | [model] 29 | type = LinearSingleSlipHardeningRule 30 | hardening_slope = 200.0 31 | [] 32 | [] 33 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/crystal_plasticity/OrientationRate.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_SR2_names = 'state/elastic_strain state/internal/plastic_deformation_rate' 6 | input_SR2_values = 'e dp' 7 | input_WR2_names = 'forces/vorticity state/internal/plastic_vorticity' 8 | input_WR2_values = 'w wp' 9 | output_WR2_names = 'state/orientation_rate' 10 | output_WR2_values = 'r_rate' 11 | [] 12 | [] 13 | 14 | [Tensors] 15 | [e] 16 | type = FillSR2 17 | values = '0.100 0.110 0.100 0.050 0.040 0.030' 18 | [] 19 | [dp] 20 | type = FillSR2 21 | values = '0.050 0.120 0.080 0.010 0.010 0.090' 22 | [] 23 | [w] 24 | type = FillWR2 25 | values = '0.01 -0.02 0.03' 26 | [] 27 | [wp] 28 | type = FillWR2 29 | values = '0.03 0.02 -0.01' 30 | [] 31 | [r_rate] 32 | type = FillWR2 33 | values = '-0.0252 -0.037 0.0411' 34 | [] 35 | [] 36 | 37 | [Models] 38 | [model] 39 | type = OrientationRate 40 | [] 41 | [] 42 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/crystal_plasticity/SingleSlipStrengthMap.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | output_Tensor_names = 'state/internal/slip_strengths' 6 | output_Tensor_values = 'strengths' 7 | input_Scalar_names = 'state/internal/slip_hardening' 8 | input_Scalar_values = 'hardening' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [a] 14 | type = Scalar 15 | values = '1.2' 16 | [] 17 | [sdirs] 18 | type = FillMillerIndex 19 | values = '1 1 0' 20 | [] 21 | [splanes] 22 | type = FillMillerIndex 23 | values = '1 1 1' 24 | [] 25 | [hardening] 26 | type = Scalar 27 | values = '100.0' 28 | [] 29 | [strengths] 30 | type = Tensor 31 | values = '150 150 150 150 150 150 150 150 150 150 150 150' 32 | base_shape = '(12)' 33 | [] 34 | [] 35 | 36 | [Data] 37 | [crystal_geometry] 38 | type = CubicCrystal 39 | lattice_parameter = "a" 40 | slip_directions = "sdirs" 41 | slip_planes = "splanes" 42 | [] 43 | [] 44 | 45 | [Models] 46 | [model] 47 | type = SingleSlipStrengthMap 48 | constant_strength = 50.0 49 | [] 50 | [] 51 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/crystal_plasticity/SumSlipRates.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Tensor_names = 'state/internal/slip_rates' 6 | input_Tensor_values = 'rates' 7 | output_Scalar_names = 'state/internal/sum_slip_rates' 8 | output_Scalar_values = 'sum' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [a] 14 | type = Scalar 15 | values = '1.2' 16 | [] 17 | [sdirs] 18 | type = FillMillerIndex 19 | values = '1 1 0' 20 | [] 21 | [splanes] 22 | type = FillMillerIndex 23 | values = '1 1 1' 24 | [] 25 | [sum] 26 | type = Scalar 27 | values = '1.91' 28 | [] 29 | [rates] 30 | type = Tensor 31 | values = '-0.2 -0.15 -0.1 -0.05 0.01 0.05 0.1 0.15 0.2 0.25 0.30 0.35' 32 | base_shape = '(12)' 33 | [] 34 | [] 35 | 36 | [Data] 37 | [crystal_geometry] 38 | type = CubicCrystal 39 | lattice_parameter = "a" 40 | slip_directions = "sdirs" 41 | slip_planes = "splanes" 42 | [] 43 | [] 44 | 45 | [Models] 46 | [model] 47 | type = SumSlipRates 48 | [] 49 | [] 50 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/crystal_plasticity/VoceSingleSlipHardeningRule.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | output_Scalar_names = 'state/internal/slip_hardening_rate' 6 | output_Scalar_values = 'rate' 7 | input_Scalar_names = 'state/internal/slip_hardening state/internal/sum_slip_rates' 8 | input_Scalar_values = 'tau_bar sum_slip' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [tau_bar] 14 | type = Scalar 15 | values = '40.0' 16 | [] 17 | [sum_slip] 18 | type = Scalar 19 | values = '0.1' 20 | [] 21 | [rate] 22 | type = Scalar 23 | values = '6.666666666666667' 24 | [] 25 | [] 26 | 27 | [Models] 28 | [model] 29 | type = VoceSingleSlipHardeningRule 30 | initial_slope = 200.0 31 | saturated_hardening = 60.0 32 | [] 33 | [] 34 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/elasticity/CubicElasticityTensor_E_nu_mu.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/E state/nu state/mu' 6 | input_Scalar_values = '100000.0 0.3 60000.0' 7 | output_SSR4_names = 'parameters/p' 8 | output_SSR4_values = 'p_correct' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [p_correct] 14 | type = SSR4 15 | values = "134615.38461538462 57692.307692307695 57692.307692307695 0.0 0.0 0.0 " 16 | "57692.307692307695 134615.38461538462 57692.307692307695 0.0 0.0 0.0 " 17 | "57692.307692307695 57692.307692307695 134615.38461538462 0.0 0.0 0.0 0.0 0.0 0.0 " 18 | "120000.0 0.0 0.0 0.0 0.0 0.0 0.0 120000.0 0.0 0.0 0.0 0.0 0.0 0.0 120000.0" 19 | [] 20 | [] 21 | 22 | [Models] 23 | [p] 24 | type = CubicElasticityTensor 25 | coefficient_types = 'YOUNGS_MODULUS POISSONS_RATIO SHEAR_MODULUS' 26 | coefficients = 'state/E state/nu state/mu' 27 | [] 28 | [model] 29 | type = ComposedModel 30 | models = 'p' 31 | [] 32 | [] 33 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/elasticity/CubicElasticityTensor_nu_mu_E.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/E state/nu state/mu' 6 | input_Scalar_values = '100000.0 0.3 60000.0' 7 | output_SSR4_names = 'parameters/p' 8 | output_SSR4_values = 'p_correct' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [p_correct] 14 | type = SSR4 15 | values = "134615.38461538462 57692.307692307695 57692.307692307695 0.0 0.0 0.0 " 16 | "57692.307692307695 134615.38461538462 57692.307692307695 0.0 0.0 0.0 " 17 | "57692.307692307695 57692.307692307695 134615.38461538462 0.0 0.0 0.0 0.0 0.0 0.0 " 18 | "120000.0 0.0 0.0 0.0 0.0 0.0 0.0 120000.0 0.0 0.0 0.0 0.0 0.0 0.0 120000.0" 19 | [] 20 | [] 21 | 22 | [Models] 23 | [p] 24 | type = CubicElasticityTensor 25 | coefficient_types = 'POISSONS_RATIO SHEAR_MODULUS YOUNGS_MODULUS' 26 | coefficients = 'state/nu state/mu state/E' 27 | [] 28 | [model] 29 | type = ComposedModel 30 | models = 'p' 31 | [] 32 | [] 33 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/elasticity/GeneralElasticity.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_SR2_names = 'state/internal/Ee' 6 | input_SR2_values = 'Ee' 7 | input_Rot_names = 'state/orientation' 8 | input_Rot_values = 'R' 9 | output_SR2_names = 'state/S' 10 | output_SR2_values = 'S' 11 | derivative_abs_tol = 1e-6 12 | derivative_rel_tol = 1e-4 13 | [] 14 | [] 15 | 16 | [Tensors] 17 | [Ee] 18 | type = FillSR2 19 | values = '0.09 0.04 -0.02' 20 | [] 21 | [R] 22 | type = FillRot 23 | values = '0.13991834 0.18234513 0.85043991' 24 | [] 25 | [S] 26 | type = FillSR2 27 | values = '10.14791738 4.65043712 -2.33254551 -0.74329637 1.01251401 1.25050411' 28 | [] 29 | [C] 30 | type = SSR4 31 | values = " 100 2 3 4 5 6 32 | 7 150 9 10 11 12 33 | 13 14 300 16 17 18 34 | 19 20 21 150 23 24 35 | 25 26 27 28 200 30 36 | 31 32 33 34 35 100" 37 | batch_shape = '(10)' 38 | [] 39 | [] 40 | 41 | [Models] 42 | [model] 43 | type = GeneralElasticity 44 | elastic_stiffness_tensor = 'C' 45 | [] 46 | [] 47 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/elasticity/GeneralElasticity_compliance.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_SR2_names = 'state/S' 6 | input_SR2_values = 'S' 7 | input_Rot_names = 'state/orientation' 8 | input_Rot_values = 'R' 9 | output_SR2_names = 'state/internal/Ee' 10 | output_SR2_values = 'Ee' 11 | derivative_abs_tol = 1e-6 12 | derivative_rel_tol = 1e-4 13 | [] 14 | [] 15 | 16 | [Tensors] 17 | [Ee] 18 | type = FillSR2 19 | values = '0.09 0.04 -0.02' 20 | [] 21 | [R] 22 | type = FillRot 23 | values = '0.13991834 0.18234513 0.85043991' 24 | [] 25 | [S] 26 | type = FillSR2 27 | values = '10.14791738 4.65043712 -2.33254551 -0.74329637 1.01251401 1.25050411' 28 | [] 29 | [C] 30 | type = SSR4 31 | values = " 100 2 3 4 5 6 32 | 7 150 9 10 11 12 33 | 13 14 300 16 17 18 34 | 19 20 21 150 23 24 35 | 25 26 27 28 200 30 36 | 31 32 33 34 35 100" 37 | batch_shape = '()' 38 | [] 39 | [] 40 | 41 | [Models] 42 | [model] 43 | type = GeneralElasticity 44 | elastic_stiffness_tensor = 'C' 45 | compliance = true 46 | [] 47 | [] 48 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/elasticity/GeneralElasticity_nl_params.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_SR2_names = 'state/internal/Ee' 6 | input_SR2_values = 'Ee' 7 | input_Rot_names = 'state/orientation' 8 | input_Rot_values = 'R' 9 | output_SR2_names = 'state/S' 10 | output_SR2_values = 'S' 11 | input_SSR4_names = 'params/C' 12 | input_SSR4_values = 'C_values' 13 | derivative_abs_tol = 1e-6 14 | derivative_rel_tol = 1e-4 15 | [] 16 | [] 17 | 18 | [Tensors] 19 | [Ee] 20 | type = FillSR2 21 | values = '0.09 0.04 -0.02' 22 | [] 23 | [R] 24 | type = FillRot 25 | values = '0.13991834 0.18234513 0.85043991' 26 | [] 27 | [S] 28 | type = FillSR2 29 | values = '10.14791738 4.65043712 -2.33254551 -0.74329637 1.01251401 1.25050411' 30 | [] 31 | [C_values] 32 | type = SSR4 33 | values = " 100 2 3 4 5 6 34 | 7 150 9 10 11 12 35 | 13 14 300 16 17 18 36 | 19 20 21 150 23 24 37 | 25 26 27 28 200 30 38 | 31 32 33 34 35 100" 39 | [] 40 | [] 41 | 42 | [Models] 43 | [C] 44 | type = SSR4InputParameter 45 | from = 'params/C' 46 | [] 47 | [model0] 48 | type = GeneralElasticity 49 | elastic_stiffness_tensor = 'C' 50 | [] 51 | [model] 52 | type = ComposedModel 53 | models = 'model0' 54 | [] 55 | [] 56 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/elasticity/GeneralElasticity_rate.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_SR2_names = 'state/internal/Ee_rate' 6 | input_SR2_values = 'Ee' 7 | input_Rot_names = 'state/orientation' 8 | input_Rot_values = 'R' 9 | output_SR2_names = 'state/S_rate' 10 | output_SR2_values = 'S' 11 | derivative_abs_tol = 1e-6 12 | derivative_rel_tol = 1e-4 13 | [] 14 | [] 15 | 16 | [Tensors] 17 | [Ee] 18 | type = FillSR2 19 | values = '0.09 0.04 -0.02' 20 | [] 21 | [R] 22 | type = FillRot 23 | values = '0.13991834 0.18234513 0.85043991' 24 | [] 25 | [S] 26 | type = FillSR2 27 | values = '10.14791738 4.65043712 -2.33254551 -0.74329637 1.01251401 1.25050411' 28 | [] 29 | [C] 30 | type = SSR4 31 | values = " 100 2 3 4 5 6 32 | 7 150 9 10 11 12 33 | 13 14 300 16 17 18 34 | 19 20 21 150 23 24 35 | 25 26 27 28 200 30 36 | 31 32 33 34 35 100" 37 | batch_shape = '(10)' 38 | [] 39 | [] 40 | 41 | [Models] 42 | [model] 43 | type = GeneralElasticity 44 | elastic_stiffness_tensor = 'C' 45 | rate_form = true 46 | [] 47 | [] 48 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/elasticity/GreenLagrangeStrain.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_R2_names = 'forces/F' 6 | input_R2_values = 'F' 7 | output_SR2_names = 'state/E' 8 | output_SR2_values = 'E' 9 | derivative_abs_tol = 1e-5 10 | derivative_rel_tol = 0 11 | [] 12 | [] 13 | 14 | [Tensors] 15 | [F] 16 | type = FillR2 17 | values = '1.01 0.01 0.02 0.002 0.93 0.009 0.05 -0.02 1.1' 18 | [] 19 | [E] 20 | type = FillSR2 21 | values = '0.011302 -0.0673 0.1052405 -0.006715 0.037609 0.00548' 22 | [] 23 | [] 24 | 25 | [Models] 26 | [model] 27 | type = GreenLagrangeStrain 28 | deformation_gradient = 'forces/F' 29 | strain = 'state/E' 30 | [] 31 | [] 32 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/elasticity/IsotropicElasticityTensor_E_nu.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/E state/nu' 6 | input_Scalar_values = '100000.0 0.3' 7 | output_SSR4_names = 'parameters/C' 8 | output_SSR4_values = 'C_correct' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [C_correct] 14 | type = SSR4 15 | values = "134615.3846153846 57692.30769230767 57692.30769230767 0.0 0.0 0.0 57692.30769230767 " 16 | "134615.3846153846 57692.30769230767 0.0 0.0 0.0 57692.30769230767 57692.30769230767 " 17 | "134615.3846153846 0.0 0.0 0.0 0.0 0.0 0.0 76923.07692307692 0.0 0.0 0.0 0.0 0.0 0.0 " 18 | "76923.07692307692 0.0 0.0 0.0 0.0 0.0 0.0 76923.07692307692" 19 | [] 20 | [] 21 | 22 | [Models] 23 | [C] 24 | type = IsotropicElasticityTensor 25 | coefficient_types = 'YOUNGS_MODULUS POISSONS_RATIO' 26 | coefficients = 'state/E state/nu' 27 | [] 28 | [model] 29 | type = ComposedModel 30 | models = 'C' 31 | [] 32 | [] 33 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/elasticity/IsotropicElasticityTensor_nu_E.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/E state/nu' 6 | input_Scalar_values = '100000.0 0.3' 7 | output_SSR4_names = 'parameters/p' 8 | output_SSR4_values = 'p_correct' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [p_correct] 14 | type = SSR4 15 | values = "134615.3846153846 57692.30769230767 57692.30769230767 0.0 0.0 0.0 57692.30769230767 " 16 | "134615.3846153846 57692.30769230767 0.0 0.0 0.0 57692.30769230767 57692.30769230767 " 17 | "134615.3846153846 0.0 0.0 0.0 0.0 0.0 0.0 76923.07692307692 0.0 0.0 0.0 0.0 0.0 0.0 " 18 | "76923.07692307692 0.0 0.0 0.0 0.0 0.0 0.0 76923.07692307692" 19 | [] 20 | [] 21 | 22 | [Models] 23 | [p] 24 | type = IsotropicElasticityTensor 25 | coefficient_types = 'POISSONS_RATIO YOUNGS_MODULUS' 26 | coefficients = 'state/nu state/E' 27 | [] 28 | [model] 29 | type = ComposedModel 30 | models = 'p' 31 | [] 32 | [] 33 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/elasticity/LinearIsotropicElasticity.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_SR2_names = 'state/internal/Ee' 6 | input_SR2_values = 'Ee' 7 | output_SR2_names = 'state/S' 8 | output_SR2_values = 'S' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [Ee] 14 | type = FillSR2 15 | values = '0.09 0.04 -0.02' 16 | [] 17 | [S] 18 | type = FillSR2 19 | values = '13.2692 9.4231 4.8077' 20 | [] 21 | [] 22 | 23 | [Models] 24 | [model] 25 | type = LinearIsotropicElasticity 26 | coefficients = '100 0.3' 27 | coefficient_types = 'YOUNGS_MODULUS POISSONS_RATIO' 28 | [] 29 | [] 30 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/elasticity/LinearIsotropicElasticity_compliance.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_SR2_names = 'state/S' 6 | input_SR2_values = 'S' 7 | output_SR2_names = 'state/internal/Ee' 8 | output_SR2_values = 'Ee' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [Ee] 14 | type = FillSR2 15 | values = '0.09 0.04 -0.02' 16 | [] 17 | [S] 18 | type = FillSR2 19 | values = '13.2692 9.4231 4.8077' 20 | [] 21 | [] 22 | 23 | [Models] 24 | [model] 25 | type = LinearIsotropicElasticity 26 | coefficients = '100 0.3' 27 | coefficient_types = 'YOUNGS_MODULUS POISSONS_RATIO' 28 | compliance = true 29 | [] 30 | [] 31 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/elasticity/LinearIsotropicElasticity_compliance_nl_params.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/E state/nu' 6 | input_Scalar_values = '100 0.3' 7 | input_SR2_names = 'state/S' 8 | input_SR2_values = 'S' 9 | output_SR2_names = 'state/internal/Ee' 10 | output_SR2_values = 'Ee' 11 | [] 12 | [] 13 | 14 | [Tensors] 15 | [Ee] 16 | type = FillSR2 17 | values = '0.09 0.04 -0.02' 18 | [] 19 | [S] 20 | type = FillSR2 21 | values = '13.2692 9.4231 4.8077' 22 | [] 23 | [] 24 | 25 | [Models] 26 | [model0] 27 | type = LinearIsotropicElasticity 28 | coefficients = 'state/E state/nu' 29 | coefficient_types = 'YOUNGS_MODULUS POISSONS_RATIO' 30 | compliance = true 31 | [] 32 | [model] 33 | type = ComposedModel 34 | models = 'model0' 35 | [] 36 | [] 37 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/elasticity/LinearIsotropicElasticity_compliance_rate.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_SR2_names = 'state/S_rate' 6 | input_SR2_values = 'S_rate' 7 | output_SR2_names = 'state/internal/Ee_rate' 8 | output_SR2_values = 'Ee_rate' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [Ee_rate] 14 | type = FillSR2 15 | values = '0.09 0.04 -0.02' 16 | [] 17 | [S_rate] 18 | type = FillSR2 19 | values = '13.2692 9.4231 4.8077' 20 | [] 21 | [] 22 | 23 | [Models] 24 | [model] 25 | type = LinearIsotropicElasticity 26 | coefficients = '100 0.3' 27 | coefficient_types = 'YOUNGS_MODULUS POISSONS_RATIO' 28 | rate_form = true 29 | compliance = true 30 | [] 31 | [] 32 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/elasticity/LinearIsotropicElasticity_nl_params.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_Scalar_names = 'state/E state/nu' 6 | input_Scalar_values = '100 0.3' 7 | input_SR2_names = 'state/internal/Ee' 8 | input_SR2_values = 'Ee' 9 | output_SR2_names = 'state/S' 10 | output_SR2_values = 'S' 11 | [] 12 | [] 13 | 14 | [Tensors] 15 | [Ee] 16 | type = FillSR2 17 | values = '0.09 0.04 -0.02' 18 | [] 19 | [S] 20 | type = FillSR2 21 | values = '13.2692 9.4231 4.8077' 22 | [] 23 | [] 24 | 25 | [Models] 26 | [model0] 27 | type = LinearIsotropicElasticity 28 | coefficients = 'state/E state/nu' 29 | coefficient_types = 'YOUNGS_MODULUS POISSONS_RATIO' 30 | [] 31 | [model] 32 | type = ComposedModel 33 | models = 'model0' 34 | [] 35 | [] 36 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/elasticity/LinearIsotropicElasticity_rate.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_SR2_names = 'state/internal/Ee_rate' 6 | input_SR2_values = 'Ee_rate' 7 | output_SR2_names = 'state/S_rate' 8 | output_SR2_values = 'S_rate' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [Ee_rate] 14 | type = FillSR2 15 | values = '0.09 0.04 -0.02' 16 | [] 17 | [S_rate] 18 | type = FillSR2 19 | values = '13.2692 9.4231 4.8077' 20 | [] 21 | [] 22 | 23 | [Models] 24 | [model] 25 | type = LinearIsotropicElasticity 26 | coefficients = '100 0.3' 27 | coefficient_types = 'YOUNGS_MODULUS POISSONS_RATIO' 28 | rate_form = true 29 | [] 30 | [] 31 | -------------------------------------------------------------------------------- /tests/unit/models/solid_mechanics/mixed_control/MixedControlSetup.i: -------------------------------------------------------------------------------- 1 | [Drivers] 2 | [unit] 3 | type = ModelUnitTest 4 | model = 'model' 5 | input_SR2_names = 'state/mixed_state forces/fixed_values forces/control' 6 | input_SR2_values = 'mvals vals control' 7 | output_SR2_names = 'state/S state/E' 8 | output_SR2_values = 'stress strain' 9 | [] 10 | [] 11 | 12 | [Tensors] 13 | [control] 14 | type = FillSR2 15 | values = '1.0 0.0 0.0 1.0 1.0 0.0' 16 | [] 17 | [vals] 18 | type = FillSR2 19 | values = '-50.0 0.1 0.15 -25.0 30.0 -0.05' 20 | [] 21 | [mvals] 22 | type = FillSR2 23 | values = '0.1 100.0 20.0 -0.05 -0.025 50.0' 24 | [] 25 | [stress] 26 | type = FillSR2 27 | values = '-50.0 100.0 20.0 -25.0 30.0 50.0' 28 | [] 29 | [strain] 30 | type = FillSR2 31 | values = '0.1 0.1 0.15 -0.05 -0.025 -0.05' 32 | [] 33 | [] 34 | 35 | [Models] 36 | [model] 37 | type = MixedControlSetup 38 | [] 39 | [] 40 | -------------------------------------------------------------------------------- /tests/unit/models/test_Model_diagnose1.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [model] 3 | type = ScalarBackwardEulerTimeIntegration 4 | variable = 'state/foo' 5 | rate = 'whatever/foo_rate' 6 | [] 7 | [] 8 | -------------------------------------------------------------------------------- /tests/unit/models/test_Model_diagnose2.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [model] 3 | type = CopyScalar 4 | from = 'state/foo' 5 | to = 'whatever/foo' 6 | [] 7 | [] 8 | -------------------------------------------------------------------------------- /tests/unit/models/test_Model_diagnose3.i: -------------------------------------------------------------------------------- 1 | [Solvers] 2 | [newton] 3 | type = Newton 4 | abs_tol = 1e-10 5 | rel_tol = 1e-08 6 | max_its = 20 7 | [] 8 | [] 9 | 10 | [Models] 11 | [copy1] 12 | type = CopyScalar 13 | from = 'state/foo' 14 | to = 'forces/foo' 15 | [] 16 | [copy2] 17 | type = CopyScalar 18 | from = 'forces/foo' 19 | to = 'residual/foo' 20 | [] 21 | [implicit] 22 | type = ComposedModel 23 | models = 'copy1 copy2' 24 | [] 25 | [model] 26 | type = ImplicitUpdate 27 | implicit_model = 'implicit' 28 | solver = 'newton' 29 | [] 30 | [] 31 | -------------------------------------------------------------------------------- /tests/unit/tensors/test_TensorName_Scalar.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [scalar1] 3 | type = Scalar 4 | values = '1 2 3 4 5' 5 | batch_shape = '(5)' 6 | [] 7 | [scalar2] 8 | type = Scalar 9 | values = '5 6 7 8 9' 10 | batch_shape = '(5)' 11 | [] 12 | [scalar3] 13 | type = Scalar 14 | values = '-1 -2 -3 -4 -5' 15 | batch_shape = '(5)' 16 | [] 17 | [auto_3_crossref] 18 | type = FillSR2 19 | values = 'scalar1 scalar2 scalar3' 20 | [] 21 | [] 22 | -------------------------------------------------------------------------------- /tests/unit/tensors/test_TensorName_empty_Scalar.i: -------------------------------------------------------------------------------- 1 | [Models] 2 | [model] 3 | type = LinearIsotropicHardening 4 | hardening_modulus = '' 5 | [] 6 | [] 7 | -------------------------------------------------------------------------------- /tests/unit/tensors/test_TensorName_empty_Tensor.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [end_time] 3 | type = LogspaceScalar 4 | start = -1 5 | end = '' 6 | nstep = 20 7 | [] 8 | [] 9 | -------------------------------------------------------------------------------- /tests/unit/user_tensors/test_EmptyPrimitiveTensor.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [a] 3 | type = EmptyScalar 4 | batch_shape = '(2,1)' 5 | [] 6 | [b] 7 | type = EmptyVec 8 | batch_shape = '(2,1)' 9 | [] 10 | [c] 11 | type = EmptyRot 12 | batch_shape = '(2,1)' 13 | [] 14 | [d] 15 | type = EmptyR2 16 | batch_shape = '(2,1)' 17 | [] 18 | [e] 19 | type = EmptySR2 20 | batch_shape = '(2,1)' 21 | [] 22 | [f] 23 | type = EmptyR3 24 | batch_shape = '(2,1)' 25 | [] 26 | [g] 27 | type = EmptySFR3 28 | batch_shape = '(2,1)' 29 | [] 30 | [h] 31 | type = EmptyR4 32 | batch_shape = '(2,1)' 33 | [] 34 | [i] 35 | type = EmptySFR4 36 | batch_shape = '(2,1)' 37 | [] 38 | [j] 39 | type = EmptyWFR4 40 | batch_shape = '(2,1)' 41 | [] 42 | [k] 43 | type = EmptySSR4 44 | batch_shape = '(2,1)' 45 | [] 46 | [l] 47 | type = EmptyR5 48 | batch_shape = '(2,1)' 49 | [] 50 | [m] 51 | type = EmptySSFR5 52 | batch_shape = '(2,1)' 53 | [] 54 | [] 55 | -------------------------------------------------------------------------------- /tests/unit/user_tensors/test_EmptyTensor.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [a] 3 | type = EmptyTensor 4 | batch_shape = '(2,1)' 5 | base_shape = '(2,3)' 6 | [] 7 | [] 8 | -------------------------------------------------------------------------------- /tests/unit/user_tensors/test_FillMillerIndex.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [v1] 3 | type = FillMillerIndex 4 | values = '1 2 3' 5 | [] 6 | [v4] 7 | type = FillMillerIndex 8 | values = ' 9 | 1 2 3 10 | 4 5 6 11 | 7 8 9 12 | 10 11 12' 13 | [] 14 | [invalid] 15 | type = FillMillerIndex 16 | values = '1 2 3 4 5 6 7 8 9 10 11' 17 | [] 18 | [] -------------------------------------------------------------------------------- /tests/unit/user_tensors/test_FillR2.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [1] 3 | type = FillR2 4 | values = '1' 5 | [] 6 | [3] 7 | type = FillR2 8 | values = '1 2 3' 9 | [] 10 | [6] 11 | type = FillR2 12 | values = '1 2 3 4 5 6' 13 | [] 14 | [9] 15 | type = FillR2 16 | values = '1 2 3 4 5 6 7 8 9' 17 | [] 18 | [] 19 | -------------------------------------------------------------------------------- /tests/unit/user_tensors/test_FillSR2.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [1] 3 | type = FillSR2 4 | values = '1' 5 | [] 6 | [3] 7 | type = FillSR2 8 | values = '1 2 3' 9 | [] 10 | [6] 11 | type = FillSR2 12 | values = '1 2 3 4 5 6' 13 | [] 14 | [] 15 | -------------------------------------------------------------------------------- /tests/unit/user_tensors/test_FullPrimitiveTensor.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [a] 3 | type = FullScalar 4 | batch_shape = '(2,1)' 5 | value = 1.3 6 | [] 7 | [b] 8 | type = FullVec 9 | batch_shape = '(2,1)' 10 | value = 1.3 11 | [] 12 | [c] 13 | type = FullRot 14 | batch_shape = '(2,1)' 15 | value = 1.3 16 | [] 17 | [d] 18 | type = FullR2 19 | batch_shape = '(2,1)' 20 | value = 1.3 21 | [] 22 | [e] 23 | type = FullSR2 24 | batch_shape = '(2,1)' 25 | value = 1.3 26 | [] 27 | [f] 28 | type = FullR3 29 | batch_shape = '(2,1)' 30 | value = 1.3 31 | [] 32 | [g] 33 | type = FullSFR3 34 | batch_shape = '(2,1)' 35 | value = 1.3 36 | [] 37 | [h] 38 | type = FullR4 39 | batch_shape = '(2,1)' 40 | value = 1.3 41 | [] 42 | [i] 43 | type = FullSFR4 44 | batch_shape = '(2,1)' 45 | value = 1.3 46 | [] 47 | [j] 48 | type = FullWFR4 49 | batch_shape = '(2,1)' 50 | value = 1.3 51 | [] 52 | [k] 53 | type = FullSSR4 54 | batch_shape = '(2,1)' 55 | value = 1.3 56 | [] 57 | [l] 58 | type = FullR5 59 | batch_shape = '(2,1)' 60 | value = 1.3 61 | [] 62 | [m] 63 | type = FullSSFR5 64 | batch_shape = '(2,1)' 65 | value = 1.3 66 | [] 67 | [] 68 | -------------------------------------------------------------------------------- /tests/unit/user_tensors/test_FullTensor.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [a] 3 | type = FullTensor 4 | batch_shape = '(2,1)' 5 | base_shape = '(2,3)' 6 | value = '3.9' 7 | [] 8 | [] 9 | -------------------------------------------------------------------------------- /tests/unit/user_tensors/test_IdentityTensor.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [a] 3 | type = IdentityTensor 4 | batch_shape = '(2,1)' 5 | n = 12 6 | [] 7 | [] 8 | -------------------------------------------------------------------------------- /tests/unit/user_tensors/test_LinspaceTensor.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [a0] 3 | type = FullTensor 4 | batch_shape = '(2,1)' 5 | base_shape = '(2,3)' 6 | value = 1.2 7 | [] 8 | [a1] 9 | type = FullTensor 10 | batch_shape = '(2,1)' 11 | base_shape = '(2,3)' 12 | value = 300.5 13 | [] 14 | [a] 15 | type = LinspaceTensor 16 | start = 'a0' 17 | end = 'a1' 18 | nstep = 100 19 | dim = 0 20 | [] 21 | [] 22 | -------------------------------------------------------------------------------- /tests/unit/user_tensors/test_LogspaceTensor.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [a0] 3 | type = FullTensor 4 | batch_shape = '(2,1)' 5 | base_shape = '(2,3)' 6 | value = 1.2 7 | [] 8 | [a1] 9 | type = FullTensor 10 | batch_shape = '(2,1)' 11 | base_shape = '(2,3)' 12 | value = 300.5 13 | [] 14 | [a] 15 | type = LogspaceTensor 16 | start = 'a0' 17 | end = 'a1' 18 | nstep = 100 19 | dim = 0 20 | [] 21 | [] 22 | -------------------------------------------------------------------------------- /tests/unit/user_tensors/test_OnesPrimitiveTensor.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [a] 3 | type = OnesScalar 4 | batch_shape = '(2,1)' 5 | [] 6 | [b] 7 | type = OnesVec 8 | batch_shape = '(2,1)' 9 | [] 10 | [c] 11 | type = OnesRot 12 | batch_shape = '(2,1)' 13 | [] 14 | [d] 15 | type = OnesR2 16 | batch_shape = '(2,1)' 17 | [] 18 | [e] 19 | type = OnesSR2 20 | batch_shape = '(2,1)' 21 | [] 22 | [f] 23 | type = OnesR3 24 | batch_shape = '(2,1)' 25 | [] 26 | [g] 27 | type = OnesSFR3 28 | batch_shape = '(2,1)' 29 | [] 30 | [h] 31 | type = OnesR4 32 | batch_shape = '(2,1)' 33 | [] 34 | [i] 35 | type = OnesSSR4 36 | batch_shape = '(2,1)' 37 | [] 38 | [j] 39 | type = OnesR5 40 | batch_shape = '(2,1)' 41 | [] 42 | [k] 43 | type = OnesSSFR5 44 | batch_shape = '(2,1)' 45 | [] 46 | [] 47 | -------------------------------------------------------------------------------- /tests/unit/user_tensors/test_OnesTensor.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [a] 3 | type = OnesTensor 4 | batch_shape = '(2,1)' 5 | base_shape = '(2,3)' 6 | [] 7 | [] 8 | -------------------------------------------------------------------------------- /tests/unit/user_tensors/test_SymmetryFromOrbifold.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [class_1] 3 | type = SymmetryFromOrbifold 4 | orbifold = "1" 5 | [] 6 | [class_2] 7 | type = SymmetryFromOrbifold 8 | orbifold = "2" 9 | [] 10 | [class_222] 11 | type = SymmetryFromOrbifold 12 | orbifold = "222" 13 | [] 14 | [class_42] 15 | type = SymmetryFromOrbifold 16 | orbifold = "42" 17 | [] 18 | [class_4] 19 | type = SymmetryFromOrbifold 20 | orbifold = "4" 21 | [] 22 | [class_3] 23 | type = SymmetryFromOrbifold 24 | orbifold = "3" 25 | [] 26 | [class_6] 27 | type = SymmetryFromOrbifold 28 | orbifold = "6" 29 | [] 30 | [class_32] 31 | type = SymmetryFromOrbifold 32 | orbifold = "32" 33 | [] 34 | [class_622] 35 | type = SymmetryFromOrbifold 36 | orbifold = "622" 37 | [] 38 | [class_23] 39 | type = SymmetryFromOrbifold 40 | orbifold = "23" 41 | [] 42 | [class_432] 43 | type = SymmetryFromOrbifold 44 | orbifold = "432" 45 | [] 46 | [class_invalid] 47 | type = SymmetryFromOrbifold 48 | orbifold = "idk" 49 | [] 50 | [] -------------------------------------------------------------------------------- /tests/unit/user_tensors/test_UserTensor.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [a] 3 | type = Tensor 4 | values = '1 2 3 4 5 6 7 8 9 10 11 12' 5 | batch_shape = '(2)' 6 | base_shape = '(2,3)' 7 | [] 8 | [b] 9 | type = Tensor 10 | values = '1 2 3 4 5 6 7 8 9 10 11 12' 11 | batch_shape = '()' 12 | base_shape = '(2,2,3)' 13 | [] 14 | [c] 15 | type = Tensor 16 | values = '1 2 3 4 5 6 7 8 9 10 11 12' 17 | batch_shape = '(2,2,3)' 18 | base_shape = '()' 19 | [] 20 | [d] 21 | type = Tensor 22 | values = '1 2 3 4 5 6' 23 | batch_shape = '(2)' 24 | base_shape = '(2,3)' 25 | [] 26 | [] 27 | -------------------------------------------------------------------------------- /tests/unit/user_tensors/test_UserTensor_error.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [a] 3 | type = Tensor 4 | values = '1' 5 | batch_shape = '(2)' 6 | base_shape = '(2,3)' 7 | [] 8 | [] 9 | -------------------------------------------------------------------------------- /tests/unit/user_tensors/test_ZerosPrimitiveTensor.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [a] 3 | type = ZerosScalar 4 | batch_shape = '(2,1)' 5 | [] 6 | [b] 7 | type = ZerosVec 8 | batch_shape = '(2,1)' 9 | [] 10 | [c] 11 | type = ZerosRot 12 | batch_shape = '(2,1)' 13 | [] 14 | [d] 15 | type = ZerosR2 16 | batch_shape = '(2,1)' 17 | [] 18 | [e] 19 | type = ZerosSR2 20 | batch_shape = '(2,1)' 21 | [] 22 | [f] 23 | type = ZerosR3 24 | batch_shape = '(2,1)' 25 | [] 26 | [g] 27 | type = ZerosSFR3 28 | batch_shape = '(2,1)' 29 | [] 30 | [h] 31 | type = ZerosR4 32 | batch_shape = '(2,1)' 33 | [] 34 | [i] 35 | type = ZerosSFR4 36 | batch_shape = '(2,1)' 37 | [] 38 | [j] 39 | type = ZerosWFR4 40 | batch_shape = '(2,1)' 41 | [] 42 | [k] 43 | type = ZerosSSR4 44 | batch_shape = '(2,1)' 45 | [] 46 | [l] 47 | type = ZerosR5 48 | batch_shape = '(2,1)' 49 | [] 50 | [m] 51 | type = ZerosSSFR5 52 | batch_shape = '(2,1)' 53 | [] 54 | [] 55 | -------------------------------------------------------------------------------- /tests/unit/user_tensors/test_ZerosTensor.i: -------------------------------------------------------------------------------- 1 | [Tensors] 2 | [a] 3 | type = ZerosTensor 4 | batch_shape = '(2,1)' 5 | base_shape = '(2,3)' 6 | [] 7 | [] 8 | -------------------------------------------------------------------------------- /tests/verification/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE srcs CONFIGURE_DEPENDS *.cxx) 2 | add_executable(verification_tests ${srcs}) 3 | target_link_libraries(verification_tests PRIVATE testutils) 4 | target_compile_options(verification_tests PRIVATE -Wall -Wextra -pedantic) 5 | set_target_properties(verification_tests PROPERTIES INSTALL_RPATH_USE_LINK_PATH ON) 6 | -------------------------------------------------------------------------------- /tests/verification/solid_mechanics/cp_basic/cp_basic.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -81.3 128.8 146.7 5 | degrees 6 | 7 | 8 | 9 | youngs 10 | 100000.0 11 | poissons 12 | 0.25 13 | 14 | 15 | 16 | 17 | 50.0 18 | 10.0 19 | 50.0 20 | 21 | 2.0e-1 22 | 8.0 23 | 24 | 25 | 26 | 27 | 1.0 28 | 29 | 1 1 0 ; 1 1 1 30 | 31 | 32 | 33 | 34 | --------------------------------------------------------------------------------