Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic crystal plasticity model #119

Merged
merged 1 commit into from
Dec 20, 2023
Merged

Basic crystal plasticity model #119

merged 1 commit into from
Dec 20, 2023

Conversation

reverendbedford
Copy link
Collaborator

@reverendbedford reverendbedford commented Dec 18, 2023

Adds basic crystal plasticity capabilities, including:

  1. Rotations, represented as Rodrigues parameters, and the ability to rotate many of the tensor types.
  2. A whole bunch of new tensor types representing derivatives of rotated tensors with respect to the rotation.
  3. A linear transformation tensor type, represented with a quaternion. The big list of crystal symmetry operations represented with these linear transformations.
  4. The logic required to generate crystal geometry, especially slip systems, from Miller indices and the correct crystal symmetry.
  5. All the crystal plasticity kinematics.
  6. A basic power law flow rule
  7. A couple of basic slip hardening models.
  8. Implicit and explicit exponential time integration.
  9. Taylor simulations as an option to TransientDriver.
  10. A specialized driver for large deformation incremental simulations.
  11. Verification tests for single crystal and Taylor models, comparing to NEML1.
  12. Regression tests on the new models.
  13. A couple of benchmarking studies to compare the performance of CPU/GPU and NEML2 versus NEML1.

Closes #118
Closes #86

Copy link
Collaborator

@hugary1995 hugary1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments.

include/neml2/drivers/TransientDriver.h Outdated Show resolved Hide resolved
include/neml2/drivers/TransientDriver.h Outdated Show resolved Hide resolved
include/neml2/tensors/SR2.h Outdated Show resolved Hide resolved
include/neml2/tensors/Scalar.h Outdated Show resolved Hide resolved
include/neml2/tensors/WR2.h Outdated Show resolved Hide resolved
include/neml2/tensors/WSR4.h Outdated Show resolved Hide resolved
src/neml2/tensors/Scalar.cxx Show resolved Hide resolved
@hugary1995
Copy link
Collaborator

FYI, I force-pushed to include changes from main.

@reverendbedford
Copy link
Collaborator Author

Coverage after merging basic_cp_model into main

89.41%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
include/neml2/base
   CrossRef.h100%80%100%
   Factory.h100%15.25%100%
   NEML2Object.h100%33.33%50%50
   OptionCollection.h100%0%0%40, 49
   OptionSet.h100%39.59%79.49%124, 127, 130, 142, 66, 81, 85, 89
   Registry.h100%94.08%100%
   UniqueVector.h100%16.48%77.78%117, 169, 171–172
include/neml2/drivers
   Driver.h100%0%0%56
   TransientDriver.h100%100%75%139
include/neml2/misc
   error.h100%36.67%82.35%35–36, 38
   math.h100%100%100%
   parser_utils.h100%56.72%88%37–38, 40
   utils.h100%56.77%76.27%173, 239, 241–246, 267, 302, 304–307
include/neml2/models
   BufferStore.h100%47.06%58.62%106, 108, 110–111, 113–114, 128, 130–132, 157, 161
   Data.h100%100%100%
   ImplicitUpdate.h100%100%100%
   LabeledAxisInterface.h100%23.08%40%50, 52–53
   LinearInterpolation.h100%13.04%100%
   Model.h100%39.47%78.95%182, 190, 207, 215, 225, 72, 78, 83
   NonlinearParameter.h100%8.33%100%
   ParameterStore.h100%29.41%80.77%119, 133, 135–137
include/neml2/models/crystallography
   CrystalGeometry.h100%0%0%89, 91
include/neml2/tensors
   BatchTensorBase.h100%52.17%95.65%287, 289
   BatchTensorValue.h100%14.93%50%40, 67, 69, 71
   FixedDimTensor.h100%16.67%100%
   LabeledAxis.h100%0%0%107, 110, 113, 139, 67, 72–74
   LabeledAxisAccessor.h100%50%50%59
   LabeledTensor.h100%42.74%89.74%112, 47, 93, 97
   Scalar.h100%50%100%
   Transformable.h100%0%0%44
   VecBase.h100%75%100%
   list_tensors.h100%100%100%
src/neml2/base
   CrossRef.cxx100%60%100%
   Factory.cxx100%80%68.18%45, 47–51, 62
   HITParser.cxx100%100%100%
   NEML2Object.cxx100%100%100%
   OptionCollection.cxx100%100%100%
   OptionSet.cxx100%81.82%84.38%118, 120, 130, 132, 35
   Registry.cxx100%100%100%
src/neml2/drivers
   Driver.cxx100%100%87.50%35
   TransientDriver.cxx100%93.33%77.62%129, 165, 167–169, 171–172, 175–177, 180–181, 185–189, 191–196, 199, 201, 203–208, 53
src/neml2/drivers/solid_mechanics
   LargeDeformationIncrementalSolidMechanicsDriver.cxx100%25%20.37%102, 104, 106, 110, 112–113, 115–116, 118–119, 122, 124–128, 48, 50–51, 53–54, 56, 58–59, 61, 63–64, 71–72, 74, 76–77, 79–80, 83, 85–87, 89–90, 94, 96, 98
   SolidMechanicsDriver.cxx100%100%97.37%43
src/neml2/misc
   error.cxx100%100%100%
   math.cxx100%87.50%64.71%113, 115–116, 119, 121, 125–126, 128, 131, 133, 135–137, 140, 142–145, 149–150, 153, 155–156, 163
   parser_utils.cxx100%100%98.18%73
   utils.cxx100%100%86.67%44, 52
src/neml2/models
   BackwardEulerTimeIntegration.cxx100%100%97.78%40
   ComposedModel.cxx100%100%97.85%116, 295, 308, 37
   Data.cxx100%80%59.09%48, 52, 54, 56–59, 61–62
   ForceRate.cxx100%100%98%41
   ForwardEulerTimeIntegration.cxx100%100%97.62%41
   IdentityMap.cxx100%100%94.74%41
   ImplicitUpdate.cxx100%100%97.78%38
   Interpolation.cxx100%44.44%96%38
   LabeledAxisInterface.cxx100%100%100%
   LinearInterpolation.cxx100%44.44%100%
   Model.cxx100%100%93.29%167–169, 250, 288–290, 40, 53, 72, 89
   NonlinearParameter.cxx100%58.33%90.91%36
   ParameterStore.cxx100%16.67%70.59%37, 60, 62–63, 68
   SR2Invariant.cxx100%100%96.23%110, 40
   StateRate.cxx100%66.67%98%41
   SumModel.cxx100%100%95.83%41
   WR2ExplicitExponentialTimeIntegration.cxx100%100%97.30%39
   WR2ImplicitExponentialTimeIntegration.cxx100%100%97.44%43
src/neml2/models/crystallography
   CrystalGeometry.cxx100%100%98.13%187, 50
   CubicCrystal.cxx100%100%90.91%48
   MillerIndex.cxx100%100%100%
   crystallography.cxx100%100%98.33%107
src/neml2/models/crystallography/user_tensors
   FillMillerIndex.cxx100%100%91.67%40
   SymmetryFromOrbifold.cxx100%100%87.50%41
src/neml2/models/solid_mechanics
   AssociativeIsotropicPlasticHardening.cxx100%100%96.43%39
   AssociativeKinematicPlasticHardening.cxx100%100%96.67%40
   AssociativePlasticFlow.cxx100%100%96.43%39
   ChabochePlasticHardening.cxx100%100%97.62%43
   ElasticStrain.cxx100%100%96.67%43
   Elasticity.cxx100%100%94.12%40
   FlowRule.cxx100%100%88.89%35
   IsotropicHardening.cxx100%100%91.67%36
   IsotropicMandelStress.cxx100%100%100%
   KinematicHardening.cxx100%100%90.91%36
   LinearIsotropicElasticity.cxx100%100%96.15%39
   LinearIsotropicHardening.cxx100%100%92.86%37
   LinearKinematicHardening.cxx100%100%93.75%38
   MandelStress.cxx100%100%90.91%38
   Normality.cxx100%100%97.67%41
   OverStress.cxx100%100%96%40
   PerzynaPlasticFlowRate.cxx100%100%92.31%38, 71
   PlasticFlowRate.cxx100%100%90.91%36
   RateIndependentPlasticFlowConstraint.cxx100%100%97.22%40
   TotalStrain.cxx100%100%96.30%43
   VoceIsotropicHardening.cxx100%100%95.45%38
   YieldFunction.cxx100%100%97.06%40
src/neml2/models/solid_mechanics/crystal_plasticity
   ElasticStrainRate.cxx100%100%97.14%48
   LinearSingleSlipHardeningRule.cxx100%100%94.44%41
   OrientationRate.cxx100%100%97.22%49
   PlasticDeformationRate.cxx100%100%96.88%52
   PlasticVorticity.cxx100%100%96.88%52
   PowerLawSlipRule.cxx100%100%96.30%41
   ResolvedShear.cxx100%100%97.22%50
   SingleSlipHardeningRule.cxx100%100%94.12%47
   SingleSlipStrengthMap.cxx100%100%96.15%43
   SlipRule.cxx100%100%95.24%50
   SlipStrengthMap.cxx100%100%92.86%45
   SumSlipRates.cxx100%100%96.30%50
   VoceSingleSlipHardeningRule.cxx100%100%95.24%42
src/neml2/solvers
   NewtonNonlinearSolver.cxx100%85.71%64.06%135, 139–140, 142–144, 146, 148, 150–151, 153–158, 160–161, 41, 62, 67, 85, 91
   NonlinearSolver.cxx100%100%91.67%37
   NonlinearSystem.cxx100%100%90.80%100–101, 38, 55, 71–72, 80–81
   Solver.cxx100%100%87.50%35
src/neml2/tensors
   BatchTensor.cxx100%100%100%
   BatchTensorBase.cxx100%26.36%92.81%264, 266, 278, 280, 387, 418, 420, 62, 64, 66
   FixedDimTensor.cxx100%50.27%100%
   LabeledAxis.cxx100%92.86%82.17%104, 107, 109, 129, 188, 195, 205, 209–210, 212, 235, 323, 325–329, 337, 387, 392, 394, 400, 402–404, 406–407, 410, 412–413, 415, 417–422, 424–426, 92
   LabeledAxisAccessor.cxx100%100%100%
   LabeledMatrix.cxx100%60%56%42, 44–49, 77, 79, 82–83
   LabeledTensor.cxx100%55.56%83.10%116, 118, 178, 180, 206, 208, 59–61, 63, 94, 96
   LabeledTensor3D.cxx100%66.67%66.67%33, 35–43
   LabeledVector.cxx100%60%59.09%37, 39–42, 53, 55–56, 65
   Quaternion.cxx100%100%100%
   R2.cxx100%100%100%
   R2Base.cxx100%100%100%
   R3.cxx100%100%100%
   R4.cxx100%85.71%89.66%42–43, 45
   Rot.cxx100%88.89%90.91%36–37, 39
   SR2.cxx100%100%100%
   SSR4.cxx100%81.25%89.47%124, 126, 130, 132, 136, 138
   SWR4.cxx100%100%100%
   Scalar.cxx100%100%100%
   Transformable.cxx100%83.33%83.33%57, 59
   Vec.cxx100%100%100%
   VecBase.cxx100%62.50%95.65%95
   WR2.cxx100%100%100%
   WSR4.cxx100%100%100%
   WWR4.cxx100%100%100%
src/neml2/tensors/user_tensors
   EmptyBatchTensor.cxx100%100%88.89%38
   EmptyFixedDimTensor.cxx100%95.83%87.50%38
   Fill3DVec.cxx100%100%91.67%37
   FillR2.cxx100%100%85.71%37, 65, 67, 70
   FillRot.cxx100%100%76.92%37, 51, 53
   FillSR2.cxx100%100%77.78%37, 55–56, 58
   FillWR2.cxx100%100%76.92%37, 51, 53
   FullBatchTensor.cxx100%100%90.91%39
   FullFixedDimTensor.cxx100%95.83%90%39
   IdentityBatchTensor.cxx100%100%90%38
   LinspaceBatchTensor.cxx100%100%95.24%43
   LinspaceFixedDimTensor.cxx100%95.83%94.12%42
   LogspaceBatchTensor.cxx100%100%94.74%43
   LogspaceFixedDimTensor.cxx100%95.83%94.74%43
   OnesBatchTensor.cxx100%100%88.89%38
   OnesFixedDimTensor.cxx100%95.83%87.50%38
   Orientation.cxx100%85.71%76.83%153, 155–159, 161–164, 166, 168–169, 175, 48, 69, 71–72, 75
   UserBatchTensor.cxx100%100%95%39
   UserFixedDimTensor.cxx100%95.83%73.68%39, 53, 55, 57, 59
   ZerosBatchTensor.cxx100%100%88.89%38
   ZerosFixedDimTensor.cxx100%95.83%87.50%38

Copy link
Contributor

github-actions bot commented Dec 19, 2023

Test Results (ubuntu-latest-Release-ON)

       3 files         3 suites   27s ⏱️
   448 tests    448 ✔️ 0 💤 0
3 006 runs  3 006 ✔️ 0 💤 0

Results for commit 005d2a2.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Dec 19, 2023

Test Results (ubuntu-latest-Debug-ON)

       3 files         3 suites   1m 27s ⏱️
   448 tests    448 ✔️ 0 💤 0
3 008 runs  3 008 ✔️ 0 💤 0

Results for commit 005d2a2.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Dec 19, 2023

Test Results (macos-latest-Debug-ON)

       3 files         3 suites   2m 35s ⏱️
   448 tests    448 ✔️ 0 💤 0
3 008 runs  3 008 ✔️ 0 💤 0

Results for commit 005d2a2.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Dec 19, 2023

Test Results (macos-latest-Release-ON)

       3 files         3 suites   37s ⏱️
   448 tests    448 ✔️ 0 💤 0
3 006 runs  3 006 ✔️ 0 💤 0

Results for commit 005d2a2.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Dec 19, 2023

Test Results (macos-latest-Release-OFF)

       3 files         3 suites   37s ⏱️
   448 tests    448 ✔️ 0 💤 0
3 006 runs  3 006 ✔️ 0 💤 0

Results for commit 005d2a2.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Dec 19, 2023

Test Results (ubuntu-latest-Release-OFF)

       3 files         3 suites   26s ⏱️
   448 tests    448 ✔️ 0 💤 0
3 006 runs  3 006 ✔️ 0 💤 0

Results for commit 005d2a2.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Dec 19, 2023

Test Results (macos-latest-Debug-OFF)

       3 files         3 suites   2m 9s ⏱️
   448 tests    448 ✔️ 0 💤 0
3 008 runs  3 008 ✔️ 0 💤 0

Results for commit 005d2a2.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Dec 19, 2023

Test Results (ubuntu-latest-Debug-OFF)

       3 files         3 suites   1m 28s ⏱️
   448 tests    448 ✔️ 0 💤 0
3 008 runs  3 008 ✔️ 0 💤 0

Results for commit 005d2a2.

♻️ This comment has been updated with latest results.

@reverendbedford
Copy link
Collaborator Author

Coverage after merging basic_cp_model into main

89.33%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
include/neml2/base
   CrossRef.h100%80%100%
   Factory.h100%15.25%100%
   NEML2Object.h100%33.33%50%50
   OptionCollection.h100%0%0%40, 49
   OptionSet.h100%39.59%79.49%124, 127, 130, 142, 66, 81, 85, 89
   Registry.h100%94.08%100%
   UniqueVector.h100%16.48%77.78%117, 169, 171–172
include/neml2/drivers
   Driver.h100%0%0%56
   TransientDriver.h100%100%75%139
include/neml2/misc
   error.h100%36.67%82.35%35–36, 38
   math.h100%100%100%
   parser_utils.h100%56.72%88%37–38, 40
   utils.h100%56.77%76.27%173, 239, 241–246, 267, 302, 304–307
include/neml2/models
   BufferStore.h100%47.06%58.62%106, 108, 110–111, 113–114, 128, 130–132, 157, 161
   Data.h100%100%100%
   ImplicitUpdate.h100%100%100%
   LabeledAxisInterface.h100%23.08%40%50, 52–53
   LinearInterpolation.h100%13.04%100%
   Model.h100%39.47%78.95%182, 190, 207, 215, 225, 72, 78, 83
   NonlinearParameter.h100%8.33%100%
   ParameterStore.h100%29.41%80.77%119, 133, 135–137
include/neml2/models/crystallography
   CrystalGeometry.h100%0%0%89, 91
include/neml2/tensors
   BatchTensorBase.h100%52.17%95.65%287, 289
   BatchTensorValue.h100%14.93%50%40, 67, 69, 71
   FixedDimTensor.h100%16.67%100%
   LabeledAxis.h100%0%0%107, 110, 113, 139, 67, 72–74
   LabeledAxisAccessor.h100%50%50%59
   LabeledTensor.h100%42.74%89.74%112, 47, 93, 97
   Scalar.h100%50%100%
   Transformable.h100%0%0%44
   VecBase.h100%75%100%
   list_tensors.h100%100%100%
src/neml2/base
   CrossRef.cxx100%60%100%
   Factory.cxx100%80%68.18%45, 47–51, 62
   HITParser.cxx100%100%100%
   NEML2Object.cxx100%100%100%
   OptionCollection.cxx100%100%100%
   OptionSet.cxx100%81.82%84.38%118, 120, 130, 132, 35
   Registry.cxx100%100%100%
src/neml2/drivers
   Driver.cxx100%100%87.50%35
   TransientDriver.cxx100%93.33%77.62%129, 165, 167–169, 171–172, 175–177, 180–181, 185–189, 191–196, 199, 201, 203–208, 53
src/neml2/drivers/solid_mechanics
   LargeDeformationIncrementalSolidMechanicsDriver.cxx100%25%20.37%102, 104, 106, 110, 112–113, 115–116, 118–119, 122, 124–128, 48, 50–51, 53–54, 56, 58–59, 61, 63–64, 71–72, 74, 76–77, 79–80, 83, 85–87, 89–90, 94, 96, 98
   SolidMechanicsDriver.cxx100%100%97.37%43
src/neml2/misc
   error.cxx100%100%100%
   math.cxx100%87.50%64.71%113, 115–116, 119, 121, 125–126, 128, 131, 133, 135–137, 140, 142–145, 149–150, 153, 155–156, 163
   parser_utils.cxx100%100%98.18%73
   utils.cxx100%100%86.67%44, 52
src/neml2/models
   BackwardEulerTimeIntegration.cxx100%100%97.78%40
   ComposedModel.cxx100%100%97.85%116, 295, 308, 37
   Data.cxx100%80%59.09%48, 52, 54, 56–59, 61–62
   ForceRate.cxx100%100%98%41
   ForwardEulerTimeIntegration.cxx100%100%97.62%41
   IdentityMap.cxx100%100%94.74%41
   ImplicitUpdate.cxx100%100%97.78%38
   Interpolation.cxx100%44.44%96%38
   LabeledAxisInterface.cxx100%100%100%
   LinearInterpolation.cxx100%44.44%100%
   Model.cxx100%100%93.29%167–169, 250, 288–290, 40, 53, 72, 89
   NonlinearParameter.cxx100%58.33%90.91%36
   ParameterStore.cxx100%16.67%70.59%37, 60, 62–63, 68
   SR2Invariant.cxx100%100%96.23%110, 40
   StateRate.cxx100%66.67%98%41
   SumModel.cxx100%100%95.83%41
   WR2ExplicitExponentialTimeIntegration.cxx100%100%97.30%39
   WR2ImplicitExponentialTimeIntegration.cxx100%100%97.50%43
src/neml2/models/crystallography
   CrystalGeometry.cxx100%100%98.13%187, 50
   CubicCrystal.cxx100%100%90.91%48
   MillerIndex.cxx100%100%100%
   crystallography.cxx100%100%98.33%107
src/neml2/models/crystallography/user_tensors
   FillMillerIndex.cxx100%100%91.67%40
   SymmetryFromOrbifold.cxx100%100%87.50%41
src/neml2/models/solid_mechanics
   AssociativeIsotropicPlasticHardening.cxx100%100%96.43%39
   AssociativeKinematicPlasticHardening.cxx100%100%96.67%40
   AssociativePlasticFlow.cxx100%100%96.43%39
   ChabochePlasticHardening.cxx100%100%97.62%43
   ElasticStrain.cxx100%100%96.67%43
   Elasticity.cxx100%100%94.12%40
   FlowRule.cxx100%100%88.89%35
   IsotropicHardening.cxx100%100%91.67%36
   IsotropicMandelStress.cxx100%100%100%
   KinematicHardening.cxx100%100%90.91%36
   LinearIsotropicElasticity.cxx100%100%96.15%39
   LinearIsotropicHardening.cxx100%100%92.86%37
   LinearKinematicHardening.cxx100%100%93.75%38
   MandelStress.cxx100%100%90.91%38
   Normality.cxx100%100%97.67%41
   OverStress.cxx100%100%96%40
   PerzynaPlasticFlowRate.cxx100%100%92.31%38, 71
   PlasticFlowRate.cxx100%100%90.91%36
   RateIndependentPlasticFlowConstraint.cxx100%100%97.22%40
   TotalStrain.cxx100%100%96.30%43
   VoceIsotropicHardening.cxx100%100%95.45%38
   YieldFunction.cxx100%100%97.06%40
src/neml2/models/solid_mechanics/crystal_plasticity
   ElasticStrainRate.cxx100%100%97.14%48
   LinearSingleSlipHardeningRule.cxx100%100%94.44%41
   OrientationRate.cxx100%100%97.22%49
   PlasticDeformationRate.cxx100%100%96.88%52
   PlasticVorticity.cxx100%100%96.88%52
   PowerLawSlipRule.cxx100%100%96.30%41
   ResolvedShear.cxx100%100%97.22%50
   SingleSlipHardeningRule.cxx100%100%94.12%47
   SingleSlipStrengthMap.cxx100%100%96.15%43
   SlipRule.cxx100%100%95.24%50
   SlipStrengthMap.cxx100%100%92.86%45
   SumSlipRates.cxx100%100%96.30%50
   VoceSingleSlipHardeningRule.cxx100%100%95.24%42
src/neml2/solvers
   NewtonNonlinearSolver.cxx100%85.71%60.29%136, 140–141, 143–145, 147, 149, 151–152, 154–158, 160–164, 166–167, 42, 63, 68, 86, 92
   NonlinearSolver.cxx100%100%91.67%37
   NonlinearSystem.cxx100%100%90.80%100–101, 38, 55, 71–72, 80–81
   Solver.cxx100%100%87.50%35
src/neml2/tensors
   BatchTensor.cxx100%100%100%
   BatchTensorBase.cxx100%26.36%92.81%264, 266, 278, 280, 387, 418, 420, 62, 64, 66
   FixedDimTensor.cxx100%50.27%100%
   LabeledAxis.cxx100%92.86%82.17%104, 107, 109, 129, 188, 195, 205, 209–210, 212, 235, 323, 325–329, 337, 387, 392, 394, 400, 402–404, 406–407, 410, 412–413, 415, 417–422, 424–426, 92
   LabeledAxisAccessor.cxx100%100%100%
   LabeledMatrix.cxx100%60%56%42, 44–49, 77, 79, 82–83
   LabeledTensor.cxx100%55.56%83.10%116, 118, 178, 180, 206, 208, 59–61, 63, 94, 96
   LabeledTensor3D.cxx100%66.67%66.67%33, 35–43
   LabeledVector.cxx100%60%59.09%37, 39–42, 53, 55–56, 65
   Quaternion.cxx100%100%100%
   R2.cxx100%100%100%
   R2Base.cxx100%100%100%
   R3.cxx100%100%100%
   R4.cxx100%85.71%89.66%42–43, 45
   Rot.cxx100%88.89%90.91%36–37, 39
   SR2.cxx100%100%100%
   SSR4.cxx100%81.25%89.47%124, 126, 130, 132, 136, 138
   SWR4.cxx100%100%100%
   Scalar.cxx100%100%100%
   Transformable.cxx100%83.33%83.33%57, 59
   Vec.cxx100%100%100%
   VecBase.cxx100%62.50%95.65%95
   WR2.cxx100%100%100%
   WSR4.cxx100%100%100%
   WWR4.cxx100%100%100%
src/neml2/tensors/user_tensors
   EmptyBatchTensor.cxx100%100%88.89%38
   EmptyFixedDimTensor.cxx100%95.83%87.50%38
   Fill3DVec.cxx100%100%91.67%37
   FillR2.cxx100%100%85.71%37, 65, 67, 70
   FillRot.cxx100%100%76.92%37, 51, 53
   FillSR2.cxx100%100%77.78%37, 55–56, 58
   FillWR2.cxx100%100%76.92%37, 51, 53
   FullBatchTensor.cxx100%100%90.91%39
   FullFixedDimTensor.cxx100%95.83%90%39
   IdentityBatchTensor.cxx100%100%90%38
   LinspaceBatchTensor.cxx100%100%95.24%43
   LinspaceFixedDimTensor.cxx100%95.83%94.12%42
   LogspaceBatchTensor.cxx100%100%94.74%43
   LogspaceFixedDimTensor.cxx100%95.83%94.74%43
   OnesBatchTensor.cxx100%100%88.89%38
   OnesFixedDimTensor.cxx100%95.83%87.50%38
   Orientation.cxx100%85.71%76.83%153, 155–159, 161–164, 166, 168–169, 175, 48, 69, 71–72, 75
   UserBatchTensor.cxx100%100%95%39
   UserFixedDimTensor.cxx100%95.83%73.68%39, 53, 55, 57, 59
   ZerosBatchTensor.cxx100%100%88.89%38
   ZerosFixedDimTensor.cxx100%95.83%87.50%38

@reverendbedford
Copy link
Collaborator Author

Coverage after merging basic_cp_model into main

89.33%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
include/neml2/base
   CrossRef.h100%80%100%
   Factory.h100%15.25%100%
   NEML2Object.h100%33.33%50%50
   OptionCollection.h100%0%0%40, 49
   OptionSet.h100%39.59%79.49%124, 127, 130, 142, 66, 81, 85, 89
   Registry.h100%94.08%100%
   UniqueVector.h100%16.48%77.78%117, 169, 171–172
include/neml2/drivers
   Driver.h100%0%0%56
   TransientDriver.h100%100%75%139
include/neml2/misc
   error.h100%36.67%82.35%35–36, 38
   math.h100%100%100%
   parser_utils.h100%56.72%88%37–38, 40
   utils.h100%56.77%76.27%173, 239, 241–246, 267, 302, 304–307
include/neml2/models
   BufferStore.h100%47.06%58.62%106, 108, 110–111, 113–114, 128, 130–132, 157, 161
   Data.h100%100%100%
   ImplicitUpdate.h100%100%100%
   LabeledAxisInterface.h100%23.08%40%50, 52–53
   LinearInterpolation.h100%13.04%100%
   Model.h100%39.47%78.95%182, 190, 207, 215, 225, 72, 78, 83
   NonlinearParameter.h100%8.33%100%
   ParameterStore.h100%29.41%80.77%119, 133, 135–137
include/neml2/models/crystallography
   CrystalGeometry.h100%0%0%89, 91
include/neml2/tensors
   BatchTensorBase.h100%52.17%95.65%287, 289
   BatchTensorValue.h100%14.93%50%40, 67, 69, 71
   FixedDimTensor.h100%16.67%100%
   LabeledAxis.h100%0%0%107, 110, 113, 139, 67, 72–74
   LabeledAxisAccessor.h100%50%50%59
   LabeledTensor.h100%42.74%89.74%112, 47, 93, 97
   Scalar.h100%50%100%
   Transformable.h100%0%0%44
   VecBase.h100%75%100%
   list_tensors.h100%100%100%
src/neml2/base
   CrossRef.cxx100%60%100%
   Factory.cxx100%80%68.18%45, 47–51, 62
   HITParser.cxx100%100%100%
   NEML2Object.cxx100%100%100%
   OptionCollection.cxx100%100%100%
   OptionSet.cxx100%81.82%84.38%118, 120, 130, 132, 35
   Registry.cxx100%100%100%
src/neml2/drivers
   Driver.cxx100%100%87.50%35
   TransientDriver.cxx100%93.33%77.62%134, 170, 172–174, 176–177, 180–182, 185–186, 190–194, 196–201, 204, 206, 208–213, 53
src/neml2/drivers/solid_mechanics
   LargeDeformationIncrementalSolidMechanicsDriver.cxx100%25%20.37%102, 104, 106, 110, 112–113, 115–116, 118–119, 122, 124–128, 48, 50–51, 53–54, 56, 58–59, 61, 63–64, 71–72, 74, 76–77, 79–80, 83, 85–87, 89–90, 94, 96, 98
   SolidMechanicsDriver.cxx100%100%97.37%43
src/neml2/misc
   error.cxx100%100%100%
   math.cxx100%87.50%64.71%113, 115–116, 119, 121, 125–126, 128, 131, 133, 135–137, 140, 142–145, 149–150, 153, 155–156, 163
   parser_utils.cxx100%100%98.18%73
   utils.cxx100%100%86.67%44, 52
src/neml2/models
   BackwardEulerTimeIntegration.cxx100%100%97.78%40
   ComposedModel.cxx100%100%97.85%116, 295, 308, 37
   Data.cxx100%80%59.09%48, 52, 54, 56–59, 61–62
   ForceRate.cxx100%100%98%41
   ForwardEulerTimeIntegration.cxx100%100%97.62%41
   IdentityMap.cxx100%100%94.74%41
   ImplicitUpdate.cxx100%100%97.78%38
   Interpolation.cxx100%44.44%96%38
   LabeledAxisInterface.cxx100%100%100%
   LinearInterpolation.cxx100%44.44%100%
   Model.cxx100%100%93.29%167–169, 250, 288–290, 40, 53, 72, 89
   NonlinearParameter.cxx100%58.33%90.91%36
   ParameterStore.cxx100%16.67%70.59%37, 60, 62–63, 68
   SR2Invariant.cxx100%100%96.23%110, 40
   StateRate.cxx100%66.67%98%41
   SumModel.cxx100%100%95.83%41
   WR2ExplicitExponentialTimeIntegration.cxx100%100%97.30%39
   WR2ImplicitExponentialTimeIntegration.cxx100%100%97.44%43
src/neml2/models/crystallography
   CrystalGeometry.cxx100%100%98.13%187, 50
   CubicCrystal.cxx100%100%90.91%48
   MillerIndex.cxx100%100%100%
   crystallography.cxx100%100%98.33%107
src/neml2/models/crystallography/user_tensors
   FillMillerIndex.cxx100%100%91.67%40
   SymmetryFromOrbifold.cxx100%100%87.50%41
src/neml2/models/solid_mechanics
   AssociativeIsotropicPlasticHardening.cxx100%100%96.43%39
   AssociativeKinematicPlasticHardening.cxx100%100%96.67%40
   AssociativePlasticFlow.cxx100%100%96.43%39
   ChabochePlasticHardening.cxx100%100%97.62%43
   ElasticStrain.cxx100%100%96.67%43
   Elasticity.cxx100%100%94.12%40
   FlowRule.cxx100%100%88.89%35
   IsotropicHardening.cxx100%100%91.67%36
   IsotropicMandelStress.cxx100%100%100%
   KinematicHardening.cxx100%100%90.91%36
   LinearIsotropicElasticity.cxx100%100%96.15%39
   LinearIsotropicHardening.cxx100%100%92.86%37
   LinearKinematicHardening.cxx100%100%93.75%38
   MandelStress.cxx100%100%90.91%38
   Normality.cxx100%100%97.67%41
   OverStress.cxx100%100%96%40
   PerzynaPlasticFlowRate.cxx100%100%92.31%38, 71
   PlasticFlowRate.cxx100%100%90.91%36
   RateIndependentPlasticFlowConstraint.cxx100%100%97.22%40
   TotalStrain.cxx100%100%96.30%43
   VoceIsotropicHardening.cxx100%100%95.45%38
   YieldFunction.cxx100%100%97.06%40
src/neml2/models/solid_mechanics/crystal_plasticity
   ElasticStrainRate.cxx100%100%97.14%48
   LinearSingleSlipHardeningRule.cxx100%100%94.44%41
   OrientationRate.cxx100%100%97.22%49
   PlasticDeformationRate.cxx100%100%96.88%52
   PlasticVorticity.cxx100%100%96.88%52
   PowerLawSlipRule.cxx100%100%96.30%41
   ResolvedShear.cxx100%100%97.22%50
   SingleSlipHardeningRule.cxx100%100%94.12%47
   SingleSlipStrengthMap.cxx100%100%96.15%43
   SlipRule.cxx100%100%95.24%50
   SlipStrengthMap.cxx100%100%92.86%45
   SumSlipRates.cxx100%100%96.30%50
   VoceSingleSlipHardeningRule.cxx100%100%95.24%42
src/neml2/solvers
   NewtonNonlinearSolver.cxx100%85.71%60.29%136, 140–141, 143–145, 147, 149, 151–152, 154–158, 160–164, 166–167, 42, 63, 68, 86, 92
   NonlinearSolver.cxx100%100%91.67%37
   NonlinearSystem.cxx100%100%90.80%100–101, 38, 55, 71–72, 80–81
   Solver.cxx100%100%87.50%35
src/neml2/tensors
   BatchTensor.cxx100%100%100%
   BatchTensorBase.cxx100%26.36%92.81%264, 266, 278, 280, 387, 418, 420, 62, 64, 66
   FixedDimTensor.cxx100%50.27%100%
   LabeledAxis.cxx100%92.86%82.17%104, 107, 109, 129, 188, 195, 205, 209–210, 212, 235, 323, 325–329, 337, 387, 392, 394, 400, 402–404, 406–407, 410, 412–413, 415, 417–422, 424–426, 92
   LabeledAxisAccessor.cxx100%100%100%
   LabeledMatrix.cxx100%60%56%42, 44–49, 77, 79, 82–83
   LabeledTensor.cxx100%55.56%83.10%116, 118, 178, 180, 206, 208, 59–61, 63, 94, 96
   LabeledTensor3D.cxx100%66.67%66.67%33, 35–43
   LabeledVector.cxx100%60%59.09%37, 39–42, 53, 55–56, 65
   Quaternion.cxx100%100%100%
   R2.cxx100%100%100%
   R2Base.cxx100%100%100%
   R3.cxx100%100%100%
   R4.cxx100%85.71%89.66%42–43, 45
   Rot.cxx100%88.89%90.91%36–37, 39
   SR2.cxx100%100%100%
   SSR4.cxx100%81.25%89.47%124, 126, 130, 132, 136, 138
   SWR4.cxx100%100%100%
   Scalar.cxx100%100%100%
   Transformable.cxx100%83.33%83.33%57, 59
   Vec.cxx100%100%100%
   VecBase.cxx100%62.50%95.65%95
   WR2.cxx100%100%100%
   WSR4.cxx100%100%100%
   WWR4.cxx100%100%100%
src/neml2/tensors/user_tensors
   EmptyBatchTensor.cxx100%100%88.89%38
   EmptyFixedDimTensor.cxx100%95.83%87.50%38
   Fill3DVec.cxx100%100%91.67%37
   FillR2.cxx100%100%85.71%37, 65, 67, 70
   FillRot.cxx100%100%76.92%37, 51, 53
   FillSR2.cxx100%100%77.78%37, 55–56, 58
   FillWR2.cxx100%100%76.92%37, 51, 53
   FullBatchTensor.cxx100%100%90.91%39
   FullFixedDimTensor.cxx100%95.83%90%39
   IdentityBatchTensor.cxx100%100%90%38
   LinspaceBatchTensor.cxx100%100%95.24%43
   LinspaceFixedDimTensor.cxx100%95.83%94.12%42
   LogspaceBatchTensor.cxx100%100%94.74%43
   LogspaceFixedDimTensor.cxx100%95.83%94.74%43
   OnesBatchTensor.cxx100%100%88.89%38
   OnesFixedDimTensor.cxx100%95.83%87.50%38
   Orientation.cxx100%85.71%76.83%153, 155–159, 161–164, 166, 168–169, 175, 48, 69, 71–72, 75
   UserBatchTensor.cxx100%100%95%39
   UserFixedDimTensor.cxx100%95.83%73.68%39, 53, 55, 57, 59
   ZerosBatchTensor.cxx100%100%88.89%38
   ZerosFixedDimTensor.cxx100%95.83%87.50%38

@reverendbedford
Copy link
Collaborator Author

Coverage after merging basic_cp_model into main

89.42%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
include/neml2/base
   CrossRef.h100%80%100%
   Factory.h100%15.25%100%
   NEML2Object.h100%33.33%50%50
   OptionCollection.h100%0%0%40, 49
   OptionSet.h100%39.59%79.49%124, 127, 130, 142, 66, 81, 85, 89
   Registry.h100%94.08%100%
   UniqueVector.h100%16.48%77.78%117, 169, 171–172
include/neml2/drivers
   Driver.h100%0%0%56
   TransientDriver.h100%100%75%139
include/neml2/misc
   error.h100%36.67%82.35%35–36, 38
   math.h100%100%100%
   parser_utils.h100%56.72%88%37–38, 40
   utils.h100%56.49%76.27%173, 239, 241–246, 267, 302, 304–307
include/neml2/models
   BufferStore.h100%47.06%58.62%106, 108, 110–111, 113–114, 128, 130–132, 157, 161
   Data.h100%100%100%
   ImplicitUpdate.h100%100%100%
   LabeledAxisInterface.h100%23.08%40%50, 52–53
   LinearInterpolation.h100%13.04%100%
   Model.h100%39.47%78.95%182, 190, 207, 215, 225, 72, 78, 83
   NonlinearParameter.h100%8.33%100%
   ParameterStore.h100%29.41%80.77%119, 133, 135–137
include/neml2/models/crystallography
   CrystalGeometry.h100%0%0%89, 91
   MillerIndex.h100%100%100%
   crystallography.h100%100%100%
include/neml2/tensors
   BatchTensorBase.h100%52.17%93.62%292, 294, 61
   BatchTensorValue.h100%14.93%50%40, 67, 69, 71
   FixedDimTensor.h100%16.67%100%
   LabeledAxis.h100%0%0%107, 110, 113, 139, 67, 72–74
   LabeledAxisAccessor.h100%50%50%59
   LabeledTensor.h100%42.74%90%114, 47, 95, 99
   Scalar.h100%50%100%
   Transformable.h100%0%0%44
   VecBase.h100%75%100%
   list_tensors.h100%100%100%
src/neml2/base
   CrossRef.cxx100%60%100%
   Factory.cxx100%80%68.18%45, 47–51, 62
   HITParser.cxx100%100%100%
   NEML2Object.cxx100%100%100%
   OptionCollection.cxx100%100%100%
   OptionSet.cxx100%81.82%84.38%118, 120, 130, 132, 35
   Registry.cxx100%100%100%
src/neml2/drivers
   Driver.cxx100%100%87.50%35
   TransientDriver.cxx100%93.33%77.62%129, 165, 167–169, 171–172, 175–177, 180–181, 185–189, 191–196, 199, 201, 203–208, 53
src/neml2/drivers/solid_mechanics
   LargeDeformationIncrementalSolidMechanicsDriver.cxx100%25%20.37%102, 104, 106, 110, 112–113, 115–116, 118–119, 122, 124–128, 48, 50–51, 53–54, 56, 58–59, 61, 63–64, 71–72, 74, 76–77, 79–80, 83, 85–87, 89–90, 94, 96, 98
   SolidMechanicsDriver.cxx100%100%97.37%43
src/neml2/misc
   error.cxx100%100%100%
   math.cxx100%93.75%73.03%165, 167–168, 171, 173, 177–178, 180, 183, 185, 187–189, 192, 194–197, 201–202, 205, 207–208, 215
   parser_utils.cxx100%100%98.18%73
   types.cxx100%100%100%
   utils.cxx100%100%86.67%44, 52
src/neml2/models
   BackwardEulerTimeIntegration.cxx100%100%97.78%40
   ComposedModel.cxx100%100%97.85%116, 295, 308, 37
   Data.cxx100%80%59.09%48, 52, 54, 56–59, 61–62
   ForceRate.cxx100%100%98%41
   ForwardEulerTimeIntegration.cxx100%100%97.62%41
   IdentityMap.cxx100%100%94.74%41
   ImplicitUpdate.cxx100%100%97.78%38
   Interpolation.cxx100%44.44%96%38
   LabeledAxisInterface.cxx100%100%100%
   LinearInterpolation.cxx100%44.44%100%
   Model.cxx100%100%93.29%167–169, 250, 288–290, 40, 53, 72, 89
   NonlinearParameter.cxx100%58.33%90.91%36
   ParameterStore.cxx100%16.67%70.59%37, 60, 62–63, 68
   SR2Invariant.cxx100%100%96.23%110, 40
   StateRate.cxx100%66.67%98%41
   SumModel.cxx100%100%95.83%41
   WR2ExplicitExponentialTimeIntegration.cxx100%100%97.30%39
   WR2ImplicitExponentialTimeIntegration.cxx100%100%97.44%43
src/neml2/models/crystallography
   CrystalGeometry.cxx100%100%98.13%187, 50
   CubicCrystal.cxx100%100%90.91%48
   MillerIndex.cxx100%100%100%
   crystallography.cxx100%100%98.08%142
src/neml2/models/crystallography/user_tensors
   FillMillerIndex.cxx100%100%91.67%40
   SymmetryFromOrbifold.cxx100%100%88.89%41
src/neml2/models/solid_mechanics
   AssociativeIsotropicPlasticHardening.cxx100%100%96.43%39
   AssociativeKinematicPlasticHardening.cxx100%100%96.67%40
   AssociativePlasticFlow.cxx100%100%96.43%39
   ChabochePlasticHardening.cxx100%100%97.62%43
   ElasticStrain.cxx100%100%96.67%43
   Elasticity.cxx100%100%94.12%40
   FlowRule.cxx100%100%88.89%35
   IsotropicHardening.cxx100%100%91.67%36
   IsotropicMandelStress.cxx100%100%100%
   KinematicHardening.cxx100%100%90.91%36
   LinearIsotropicElasticity.cxx100%100%96.15%39
   LinearIsotropicHardening.cxx100%100%92.86%37
   LinearKinematicHardening.cxx100%100%93.75%38
   MandelStress.cxx100%100%90.91%38
   Normality.cxx100%100%97.67%41
   OverStress.cxx100%100%96%40
   PerzynaPlasticFlowRate.cxx100%100%92.31%38, 71
   PlasticFlowRate.cxx100%100%90.91%36
   RateIndependentPlasticFlowConstraint.cxx100%100%97.22%40
   TotalStrain.cxx100%100%96.30%43
   VoceIsotropicHardening.cxx100%100%95.45%38
   YieldFunction.cxx100%100%97.06%40
src/neml2/models/solid_mechanics/crystal_plasticity
   ElasticStrainRate.cxx100%100%97.14%48
   LinearSingleSlipHardeningRule.cxx100%100%94.44%41
   OrientationRate.cxx100%100%97.22%49
   PlasticDeformationRate.cxx100%100%96.88%52
   PlasticVorticity.cxx100%100%96.88%52
   PowerLawSlipRule.cxx100%100%96.30%41
   ResolvedShear.cxx100%100%97.22%50
   SingleSlipHardeningRule.cxx100%100%94.12%47
   SingleSlipStrengthMap.cxx100%100%96.15%43
   SlipRule.cxx100%100%95.24%50
   SlipStrengthMap.cxx100%100%92.86%45
   SumSlipRates.cxx100%100%96.30%50
   VoceSingleSlipHardeningRule.cxx100%100%95.24%42
src/neml2/solvers
   NewtonNonlinearSolver.cxx100%85.71%60.29%136, 140–141, 143–145, 147, 149, 151–152, 154–158, 160–164, 166–167, 42, 63, 68, 86, 92
   NonlinearSolver.cxx100%100%91.67%37
   NonlinearSystem.cxx100%100%90.80%100–101, 38, 55, 71–72, 80–81
   Solver.cxx100%100%87.50%35
src/neml2/tensors
   BatchTensor.cxx100%100%100%
   BatchTensorBase.cxx100%26.24%92.81%261, 263, 275, 277, 384, 415, 417, 62, 64, 66
   FixedDimTensor.cxx100%50.27%100%
   LabeledAxis.cxx100%92.86%82.17%104, 107, 109, 129, 188, 195, 205, 209–210, 212, 235, 323, 325–329, 337, 387, 392, 394, 400, 402–404, 406–407, 410, 412–413, 415, 417–422, 424–426, 92
   LabeledAxisAccessor.cxx100%100%100%
   LabeledMatrix.cxx100%60%56%42, 44–49, 77, 79, 82–83
   LabeledTensor.cxx100%55.56%83.10%116, 118, 178, 180, 206, 208, 59–61, 63, 94, 96
   LabeledTensor3D.cxx100%66.67%66.67%33, 35–43
   LabeledVector.cxx100%60%59.09%37, 39–42, 53, 55–56, 65
   Quaternion.cxx100%100%100%
   R2.cxx100%100%100%
   R2Base.cxx100%100%100%
   R3.cxx100%100%100%
   R4.cxx100%85.71%89.66%42–43, 45
   Rot.cxx100%88.89%90.91%36–37, 39
   SR2.cxx100%100%100%
   SSR4.cxx100%81.25%89.47%124, 126, 130, 132, 136, 138
   SWR4.cxx100%100%100%
   Scalar.cxx100%100%100%
   Transformable.cxx100%83.33%83.33%57, 59
   Vec.cxx100%100%100%
   VecBase.cxx100%62.50%95.65%95
   WR2.cxx100%100%100%
   WSR4.cxx100%100%100%
   WWR4.cxx100%100%100%
src/neml2/tensors/user_tensors
   EmptyBatchTensor.cxx100%100%90%38
   EmptyFixedDimTensor.cxx100%95.83%88.89%38
   Fill3DVec.cxx100%100%91.67%37
   FillR2.cxx100%100%85.71%37, 65, 67, 70
   FillRot.cxx100%100%76.92%37, 51, 53
   FillSR2.cxx100%100%77.78%37, 55–56, 58
   FillWR2.cxx100%100%76.92%37, 51, 53
   FullBatchTensor.cxx100%100%91.67%39
   FullFixedDimTensor.cxx100%95.83%90.91%39
   IdentityBatchTensor.cxx100%100%90.91%38
   LinspaceBatchTensor.cxx100%100%95.24%43
   LinspaceFixedDimTensor.cxx100%95.83%94.12%42
   LogspaceBatchTensor.cxx100%100%94.74%43
   LogspaceFixedDimTensor.cxx100%95.83%94.74%43
   OnesBatchTensor.cxx100%100%90%38
   OnesFixedDimTensor.cxx100%95.83%88.89%38
   Orientation.cxx100%85.71%76.83%153, 155–159, 161–164, 166, 168–169, 175, 48, 69, 71–72, 75
   UserBatchTensor.cxx100%100%95.24%39
   UserFixedDimTensor.cxx100%95.83%75%39, 53, 55, 57, 59
   ZerosBatchTensor.cxx100%100%90%38
   ZerosFixedDimTensor.cxx100%95.83%88.89%38

@hugary1995
Copy link
Collaborator

Everything passes. I also fixed some typos so I just have that final function renaming comment. Once you are done, just squash and I'll merge.

@reverendbedford
Copy link
Collaborator Author

Coverage after merging basic_cp_model into main

89.42%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
include/neml2/base
   CrossRef.h100%80%100%
   Factory.h100%15.25%100%
   NEML2Object.h100%33.33%50%50
   OptionCollection.h100%0%0%40, 49
   OptionSet.h100%39.59%79.49%124, 127, 130, 142, 66, 81, 85, 89
   Registry.h100%94.08%100%
   UniqueVector.h100%16.48%77.78%117, 169, 171–172
include/neml2/drivers
   Driver.h100%0%0%56
   TransientDriver.h100%100%75%139
include/neml2/misc
   error.h100%36.67%82.35%35–36, 38
   math.h100%100%100%
   parser_utils.h100%56.72%88%37–38, 40
   utils.h100%56.49%76.27%173, 239, 241–246, 267, 302, 304–307
include/neml2/models
   BufferStore.h100%47.06%58.62%106, 108, 110–111, 113–114, 128, 130–132, 157, 161
   Data.h100%100%100%
   ImplicitUpdate.h100%100%100%
   LabeledAxisInterface.h100%23.08%40%50, 52–53
   LinearInterpolation.h100%13.04%100%
   Model.h100%39.47%78.95%182, 190, 207, 215, 225, 72, 78, 83
   NonlinearParameter.h100%8.33%100%
   ParameterStore.h100%29.41%80.77%119, 133, 135–137
include/neml2/models/crystallography
   CrystalGeometry.h100%0%0%89, 91
   MillerIndex.h100%100%100%
   crystallography.h100%100%100%
include/neml2/tensors
   BatchTensorBase.h100%52.17%93.62%292, 294, 61
   BatchTensorValue.h100%14.93%50%40, 67, 69, 71
   FixedDimTensor.h100%16.67%100%
   LabeledAxis.h100%0%0%107, 110, 113, 139, 67, 72–74
   LabeledAxisAccessor.h100%50%50%59
   LabeledTensor.h100%42.74%90%114, 47, 95, 99
   Scalar.h100%50%100%
   Transformable.h100%0%0%44
   VecBase.h100%75%100%
   list_tensors.h100%100%100%
src/neml2/base
   CrossRef.cxx100%60%100%
   Factory.cxx100%80%68.18%45, 47–51, 62
   HITParser.cxx100%100%100%
   NEML2Object.cxx100%100%100%
   OptionCollection.cxx100%100%100%
   OptionSet.cxx100%81.82%84.38%118, 120, 130, 132, 35
   Registry.cxx100%100%100%
src/neml2/drivers
   Driver.cxx100%100%87.50%35
   TransientDriver.cxx100%93.33%77.62%129, 165, 167–169, 171–172, 175–177, 180–181, 185–189, 191–196, 199, 201, 203–208, 53
src/neml2/drivers/solid_mechanics
   LargeDeformationIncrementalSolidMechanicsDriver.cxx100%25%20.37%102, 104, 106, 110, 112–113, 115–116, 118–119, 122, 124–128, 48, 50–51, 53–54, 56, 58–59, 61, 63–64, 71–72, 74, 76–77, 79–80, 83, 85–87, 89–90, 94, 96, 98
   SolidMechanicsDriver.cxx100%100%97.37%43
src/neml2/misc
   error.cxx100%100%100%
   math.cxx100%93.75%73.03%165, 167–168, 171, 173, 177–178, 180, 183, 185, 187–189, 192, 194–197, 201–202, 205, 207–208, 215
   parser_utils.cxx100%100%98.18%73
   types.cxx100%100%100%
   utils.cxx100%100%86.67%44, 52
src/neml2/models
   BackwardEulerTimeIntegration.cxx100%100%97.78%40
   ComposedModel.cxx100%100%97.85%116, 295, 308, 37
   Data.cxx100%80%59.09%48, 52, 54, 56–59, 61–62
   ForceRate.cxx100%100%98%41
   ForwardEulerTimeIntegration.cxx100%100%97.62%41
   IdentityMap.cxx100%100%94.74%41
   ImplicitUpdate.cxx100%100%97.78%38
   Interpolation.cxx100%44.44%96%38
   LabeledAxisInterface.cxx100%100%100%
   LinearInterpolation.cxx100%44.44%100%
   Model.cxx100%100%93.29%167–169, 250, 288–290, 40, 53, 72, 89
   NonlinearParameter.cxx100%58.33%90.91%36
   ParameterStore.cxx100%16.67%70.59%37, 60, 62–63, 68
   SR2Invariant.cxx100%100%96.23%110, 40
   StateRate.cxx100%66.67%98%41
   SumModel.cxx100%100%95.83%41
   WR2ExplicitExponentialTimeIntegration.cxx100%100%97.30%39
   WR2ImplicitExponentialTimeIntegration.cxx100%100%97.44%43
src/neml2/models/crystallography
   CrystalGeometry.cxx100%100%98.13%187, 50
   CubicCrystal.cxx100%100%90.91%48
   MillerIndex.cxx100%100%100%
   crystallography.cxx100%100%98.08%142
src/neml2/models/crystallography/user_tensors
   FillMillerIndex.cxx100%100%91.67%40
   SymmetryFromOrbifold.cxx100%100%88.89%41
src/neml2/models/solid_mechanics
   AssociativeIsotropicPlasticHardening.cxx100%100%96.43%39
   AssociativeKinematicPlasticHardening.cxx100%100%96.67%40
   AssociativePlasticFlow.cxx100%100%96.43%39
   ChabochePlasticHardening.cxx100%100%97.62%43
   ElasticStrain.cxx100%100%96.67%43
   Elasticity.cxx100%100%94.12%40
   FlowRule.cxx100%100%88.89%35
   IsotropicHardening.cxx100%100%91.67%36
   IsotropicMandelStress.cxx100%100%100%
   KinematicHardening.cxx100%100%90.91%36
   LinearIsotropicElasticity.cxx100%100%96.15%39
   LinearIsotropicHardening.cxx100%100%92.86%37
   LinearKinematicHardening.cxx100%100%93.75%38
   MandelStress.cxx100%100%90.91%38
   Normality.cxx100%100%97.67%41
   OverStress.cxx100%100%96%40
   PerzynaPlasticFlowRate.cxx100%100%92.31%38, 71
   PlasticFlowRate.cxx100%100%90.91%36
   RateIndependentPlasticFlowConstraint.cxx100%100%97.22%40
   TotalStrain.cxx100%100%96.30%43
   VoceIsotropicHardening.cxx100%100%95.45%38
   YieldFunction.cxx100%100%97.06%40
src/neml2/models/solid_mechanics/crystal_plasticity
   ElasticStrainRate.cxx100%100%97.14%48
   LinearSingleSlipHardeningRule.cxx100%100%94.44%41
   OrientationRate.cxx100%100%97.22%49
   PlasticDeformationRate.cxx100%100%96.88%52
   PlasticVorticity.cxx100%100%96.88%52
   PowerLawSlipRule.cxx100%100%96.30%41
   ResolvedShear.cxx100%100%97.22%50
   SingleSlipHardeningRule.cxx100%100%94.12%47
   SingleSlipStrengthMap.cxx100%100%96.15%43
   SlipRule.cxx100%100%95.24%50
   SlipStrengthMap.cxx100%100%92.86%45
   SumSlipRates.cxx100%100%96.30%50
   VoceSingleSlipHardeningRule.cxx100%100%95.24%42
src/neml2/solvers
   NewtonNonlinearSolver.cxx100%85.71%60.29%136, 140–141, 143–145, 147, 149, 151–157, 159–163, 165–166, 42, 63, 68, 86, 92
   NonlinearSolver.cxx100%100%91.67%37
   NonlinearSystem.cxx100%100%90.80%100–101, 38, 55, 71–72, 80–81
   Solver.cxx100%100%87.50%35
src/neml2/tensors
   BatchTensor.cxx100%100%100%
   BatchTensorBase.cxx100%26.24%92.81%261, 263, 275, 277, 384, 415, 417, 62, 64, 66
   FixedDimTensor.cxx100%50.27%100%
   LabeledAxis.cxx100%92.86%82.17%104, 107, 109, 129, 188, 195, 205, 209–210, 212, 235, 323, 325–329, 337, 387, 392, 394, 400, 402–404, 406–407, 410, 412–413, 415, 417–422, 424–426, 92
   LabeledAxisAccessor.cxx100%100%100%
   LabeledMatrix.cxx100%60%56%42, 44–49, 77, 79, 82–83
   LabeledTensor.cxx100%55.56%83.10%116, 118, 178, 180, 206, 208, 59–61, 63, 94, 96
   LabeledTensor3D.cxx100%66.67%66.67%33, 35–43
   LabeledVector.cxx100%60%59.09%37, 39–42, 53, 55–56, 65
   Quaternion.cxx100%100%100%
   R2.cxx100%100%100%
   R2Base.cxx100%100%100%
   R3.cxx100%100%100%
   R4.cxx100%85.71%89.66%42–43, 45
   Rot.cxx100%88.89%90.91%36–37, 39
   SR2.cxx100%100%100%
   SSR4.cxx100%81.25%89.47%124, 126, 130, 132, 136, 138
   SWR4.cxx100%100%100%
   Scalar.cxx100%100%100%
   Transformable.cxx100%83.33%83.33%57, 59
   Vec.cxx100%100%100%
   VecBase.cxx100%62.50%95.65%95
   WR2.cxx100%100%100%
   WSR4.cxx100%100%100%
   WWR4.cxx100%100%100%
src/neml2/tensors/user_tensors
   EmptyBatchTensor.cxx100%100%90%38
   EmptyFixedDimTensor.cxx100%95.83%88.89%38
   Fill3DVec.cxx100%100%91.67%37
   FillR2.cxx100%100%85.71%37, 65, 67, 70
   FillRot.cxx100%100%76.92%37, 51, 53
   FillSR2.cxx100%100%77.78%37, 55–56, 58
   FillWR2.cxx100%100%76.92%37, 51, 53
   FullBatchTensor.cxx100%100%91.67%39
   FullFixedDimTensor.cxx100%95.83%90.91%39
   IdentityBatchTensor.cxx100%100%90.91%38
   LinspaceBatchTensor.cxx100%100%95.24%43
   LinspaceFixedDimTensor.cxx100%95.83%94.12%42
   LogspaceBatchTensor.cxx100%100%94.74%43
   LogspaceFixedDimTensor.cxx100%95.83%94.74%43
   OnesBatchTensor.cxx100%100%90%38
   OnesFixedDimTensor.cxx100%95.83%88.89%38
   Orientation.cxx100%85.71%76.83%153, 155–159, 161–164, 166, 168–169, 175, 48, 69, 71–72, 75
   UserBatchTensor.cxx100%100%95.24%39
   UserFixedDimTensor.cxx100%95.83%75%39, 53, 55, 57, 59
   ZerosBatchTensor.cxx100%100%90%38
   ZerosFixedDimTensor.cxx100%95.83%88.89%38

This includes:
1. Basic crystallography, including generating slip systems from Miller
   indices.
2. A few more tensor types to fill out the derivatives of other tensors
   with respect to rotations.
3. Crystal plasticity kinematics, following Asaro's incremental
   formulation.
4. A few basic slip rules and hardening models.
5. Implicit and explicit exponential time integration for rotations.
6. Taylor simulations as an option in `TransientDriver`.
7. Drivers for incremental large deformations.
8. Verification tests versus NEML for single and polycrystal models.
9. Regression tests on the new models
10. A benchmark study to assess the performance of the crystal models.
@reverendbedford
Copy link
Collaborator Author

Coverage after merging basic_cp_model into main

89.42%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
include/neml2/base
   CrossRef.h100%80%100%
   Factory.h100%15.25%100%
   NEML2Object.h100%33.33%50%50
   OptionCollection.h100%0%0%40, 49
   OptionSet.h100%39.59%79.49%124, 127, 130, 142, 66, 81, 85, 89
   Registry.h100%94.08%100%
   UniqueVector.h100%16.48%77.78%117, 169, 171–172
include/neml2/drivers
   Driver.h100%0%0%56
   TransientDriver.h100%100%75%139
include/neml2/misc
   error.h100%36.67%82.35%35–36, 38
   math.h100%100%100%
   parser_utils.h100%56.72%88%37–38, 40
   utils.h100%56.49%76.27%173, 239, 241–246, 267, 302, 304–307
include/neml2/models
   BufferStore.h100%47.06%58.62%106, 108, 110–111, 113–114, 128, 130–132, 157, 161
   Data.h100%100%100%
   ImplicitUpdate.h100%100%100%
   LabeledAxisInterface.h100%23.08%40%50, 52–53
   LinearInterpolation.h100%13.04%100%
   Model.h100%39.47%78.95%182, 190, 207, 215, 225, 72, 78, 83
   NonlinearParameter.h100%8.33%100%
   ParameterStore.h100%29.41%80.77%119, 133, 135–137
include/neml2/models/crystallography
   CrystalGeometry.h100%0%0%89, 91
   MillerIndex.h100%100%100%
   crystallography.h100%100%100%
include/neml2/tensors
   BatchTensorBase.h100%52.17%93.62%292, 294, 61
   BatchTensorValue.h100%14.93%50%40, 67, 69, 71
   FixedDimTensor.h100%16.67%100%
   LabeledAxis.h100%0%0%107, 110, 113, 139, 67, 72–74
   LabeledAxisAccessor.h100%50%50%59
   LabeledTensor.h100%42.74%90%114, 47, 95, 99
   Scalar.h100%50%100%
   Transformable.h100%0%0%44
   VecBase.h100%75%100%
   list_tensors.h100%100%100%
src/neml2/base
   CrossRef.cxx100%60%100%
   Factory.cxx100%80%68.18%45, 47–51, 62
   HITParser.cxx100%100%100%
   NEML2Object.cxx100%100%100%
   OptionCollection.cxx100%100%100%
   OptionSet.cxx100%81.82%84.38%118, 120, 130, 132, 35
   Registry.cxx100%100%100%
src/neml2/drivers
   Driver.cxx100%100%87.50%35
   TransientDriver.cxx100%93.33%77.62%129, 165, 167–169, 171–172, 175–177, 180–181, 185–189, 191–196, 199, 201, 203–208, 53
src/neml2/drivers/solid_mechanics
   LargeDeformationIncrementalSolidMechanicsDriver.cxx100%25%20.37%102, 104, 106, 110, 112–113, 115–116, 118–119, 122, 124–128, 48, 50–51, 53–54, 56, 58–59, 61, 63–64, 71–72, 74, 76–77, 79–80, 83, 85–87, 89–90, 94, 96, 98
   SolidMechanicsDriver.cxx100%100%97.37%43
src/neml2/misc
   error.cxx100%100%100%
   math.cxx100%95.45%80.49%166, 168–169, 172, 174, 178–179, 181, 184, 186, 188–190, 193, 195–198, 202–203, 206, 208–209, 216
   parser_utils.cxx100%100%98.18%73
   types.cxx100%100%100%
   utils.cxx100%100%86.67%44, 52
src/neml2/models
   BackwardEulerTimeIntegration.cxx100%100%97.78%40
   ComposedModel.cxx100%100%97.85%116, 295, 308, 37
   Data.cxx100%80%59.09%48, 52, 54, 56–59, 61–62
   ForceRate.cxx100%100%98%41
   ForwardEulerTimeIntegration.cxx100%100%97.62%41
   IdentityMap.cxx100%100%94.74%41
   ImplicitUpdate.cxx100%100%97.78%38
   Interpolation.cxx100%44.44%96%38
   LabeledAxisInterface.cxx100%100%100%
   LinearInterpolation.cxx100%44.44%100%
   Model.cxx100%100%93.29%167–169, 250, 288–290, 40, 53, 72, 89
   NonlinearParameter.cxx100%58.33%90.91%36
   ParameterStore.cxx100%16.67%70.59%37, 60, 62–63, 68
   SR2Invariant.cxx100%100%96.23%110, 40
   StateRate.cxx100%66.67%98%41
   SumModel.cxx100%100%95.83%41
   WR2ExplicitExponentialTimeIntegration.cxx100%100%97.30%39
   WR2ImplicitExponentialTimeIntegration.cxx100%100%97.44%43
src/neml2/models/crystallography
   CrystalGeometry.cxx100%100%98.13%187, 50
   CubicCrystal.cxx100%100%90.91%48
   MillerIndex.cxx100%100%100%
   crystallography.cxx100%100%98.08%142
src/neml2/models/crystallography/user_tensors
   FillMillerIndex.cxx100%100%91.67%40
   SymmetryFromOrbifold.cxx100%100%88.89%41
src/neml2/models/solid_mechanics
   AssociativeIsotropicPlasticHardening.cxx100%100%96.43%39
   AssociativeKinematicPlasticHardening.cxx100%100%96.67%40
   AssociativePlasticFlow.cxx100%100%96.43%39
   ChabochePlasticHardening.cxx100%100%97.62%43
   ElasticStrain.cxx100%100%96.67%43
   Elasticity.cxx100%100%94.12%40
   FlowRule.cxx100%100%88.89%35
   IsotropicHardening.cxx100%100%91.67%36
   IsotropicMandelStress.cxx100%100%100%
   KinematicHardening.cxx100%100%90.91%36
   LinearIsotropicElasticity.cxx100%100%96.15%39
   LinearIsotropicHardening.cxx100%100%92.86%37
   LinearKinematicHardening.cxx100%100%93.75%38
   MandelStress.cxx100%100%90.91%38
   Normality.cxx100%100%97.67%41
   OverStress.cxx100%100%96%40
   PerzynaPlasticFlowRate.cxx100%100%92.31%38, 71
   PlasticFlowRate.cxx100%100%90.91%36
   RateIndependentPlasticFlowConstraint.cxx100%100%97.22%40
   TotalStrain.cxx100%100%96.30%43
   VoceIsotropicHardening.cxx100%100%95.45%38
   YieldFunction.cxx100%100%97.06%40
src/neml2/models/solid_mechanics/crystal_plasticity
   ElasticStrainRate.cxx100%100%97.14%49
   LinearSingleSlipHardeningRule.cxx100%100%94.44%41
   OrientationRate.cxx100%100%97.30%50
   PlasticDeformationRate.cxx100%100%96.88%52
   PlasticVorticity.cxx100%100%96.88%52
   PowerLawSlipRule.cxx100%100%96.30%41
   ResolvedShear.cxx100%100%97.22%50
   SingleSlipHardeningRule.cxx100%100%94.12%47
   SingleSlipStrengthMap.cxx100%100%96.15%43
   SlipRule.cxx100%100%95.24%50
   SlipStrengthMap.cxx100%100%92.86%45
   SumSlipRates.cxx100%100%96.30%50
   VoceSingleSlipHardeningRule.cxx100%100%95.24%42
src/neml2/solvers
   NewtonNonlinearSolver.cxx100%85.71%60.29%136, 140–141, 143–145, 147, 149, 151–157, 159–163, 165–166, 42, 63, 68, 86, 92
   NonlinearSolver.cxx100%100%91.67%37
   NonlinearSystem.cxx100%100%90.80%100–101, 38, 55, 71–72, 80–81
   Solver.cxx100%100%87.50%35
src/neml2/tensors
   BatchTensor.cxx100%100%100%
   BatchTensorBase.cxx100%26.24%92.81%261, 263, 275, 277, 384, 415, 417, 62, 64, 66
   FixedDimTensor.cxx100%50.27%100%
   LabeledAxis.cxx100%92.86%82.17%104, 107, 109, 129, 188, 195, 205, 209–210, 212, 235, 323, 325–329, 337, 387, 392, 394, 400, 402–404, 406–407, 410, 412–413, 415, 417–422, 424–426, 92
   LabeledAxisAccessor.cxx100%100%100%
   LabeledMatrix.cxx100%60%56%42, 44–49, 77, 79, 82–83
   LabeledTensor.cxx100%55.56%83.10%116, 118, 178, 180, 206, 208, 59–61, 63, 94, 96
   LabeledTensor3D.cxx100%66.67%66.67%33, 35–43
   LabeledVector.cxx100%60%59.09%37, 39–42, 53, 55–56, 65
   Quaternion.cxx100%100%100%
   R2.cxx100%100%100%
   R2Base.cxx100%100%100%
   R3.cxx100%100%100%
   R4.cxx100%85.71%89.66%42–43, 45
   Rot.cxx100%88.89%90.91%36–37, 39
   SR2.cxx100%100%100%
   SSR4.cxx100%81.25%89.47%124, 126, 130, 132, 136, 138
   SWR4.cxx100%100%100%
   Scalar.cxx100%100%100%
   Transformable.cxx100%83.33%83.33%57, 59
   Vec.cxx100%100%100%
   VecBase.cxx100%62.50%95.65%95
   WR2.cxx100%100%100%
   WSR4.cxx100%100%100%
   WWR4.cxx100%100%100%
src/neml2/tensors/user_tensors
   EmptyBatchTensor.cxx100%100%90%38
   EmptyFixedDimTensor.cxx100%95.83%88.89%38
   Fill3DVec.cxx100%100%91.67%37
   FillR2.cxx100%100%85.71%37, 65, 67, 70
   FillRot.cxx100%100%76.92%37, 51, 53
   FillSR2.cxx100%100%77.78%37, 55–56, 58
   FillWR2.cxx100%100%76.92%37, 51, 53
   FullBatchTensor.cxx100%100%91.67%39
   FullFixedDimTensor.cxx100%95.83%90.91%39
   IdentityBatchTensor.cxx100%100%90.91%38
   LinspaceBatchTensor.cxx100%100%95.24%43
   LinspaceFixedDimTensor.cxx100%95.83%94.12%42
   LogspaceBatchTensor.cxx100%100%94.74%43
   LogspaceFixedDimTensor.cxx100%95.83%94.74%43
   OnesBatchTensor.cxx100%100%90%38
   OnesFixedDimTensor.cxx100%95.83%88.89%38
   Orientation.cxx100%85.71%76.83%153, 155–159, 161–164, 166, 168–169, 175, 48, 69, 71–72, 75
   UserBatchTensor.cxx100%100%95.24%39
   UserFixedDimTensor.cxx100%95.83%75%39, 53, 55, 57, 59
   ZerosBatchTensor.cxx100%100%90%38
   ZerosFixedDimTensor.cxx100%95.83%88.89%38

@hugary1995 hugary1995 merged commit 206076f into main Dec 20, 2023
27 checks passed
@hugary1995 hugary1995 deleted the basic_cp_model branch April 29, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Basic crystal plasticity skew symmetric tensors and crystal plasticity
2 participants