Skip to content

Commit c9a0ad6

Browse files
authored
Add reset_derivatives (#18)
* Add reset_derivatives * Bump version
1 parent 506c96b commit c9a0ad6

7 files changed

Lines changed: 160 additions & 49 deletions

File tree

Project.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MaterialModelsBase"
22
uuid = "af893363-701d-44dc-8b1e-d9a2c129bfc9"
33
authors = ["Knut Andreas Meyer and contributors"]
4-
version = "0.3"
4+
version = "0.3.1"
55

66
[deps]
77
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
@@ -15,10 +15,11 @@ julia = "1.11"
1515
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1616
FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41"
1717
MaterialModelsTesting = "882b014b-b96c-4115-8629-e17fb35110d2"
18+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1819

1920
[sources]
2021
MaterialModelsTesting = {url = "https://github.com/KnutAM/MaterialModelsTesting.jl"}
2122
#MaterialModelsTesting = {path = "/Users/knutan/.julia/dev/MaterialModelsTesting"}
2223

2324
[targets]
24-
test = ["Test", "FiniteDiff", "MaterialModelsTesting"]
25+
test = ["Test", "FiniteDiff", "MaterialModelsTesting", "Random"]

docs/Manifest.toml

Lines changed: 57 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ version = "1.1.1"
123123

124124
[[deps.CairoMakie]]
125125
deps = ["CRC32c", "Cairo", "Cairo_jll", "Colors", "FileIO", "FreeType", "GeometryBasics", "LinearAlgebra", "Makie", "PrecompileTools"]
126-
git-tree-sha1 = "f8caabc5a1c1fb88bcbf9bc4078e5656a477afd0"
126+
git-tree-sha1 = "1778fd03576b0b6f88d0eafe89c54a3fb8df96a3"
127127
uuid = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
128-
version = "0.15.6"
128+
version = "0.15.7"
129129

130130
[[deps.Cairo_jll]]
131131
deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"]
@@ -210,9 +210,9 @@ version = "1.3.0+1"
210210

211211
[[deps.ComputePipeline]]
212212
deps = ["Observables", "Preferences"]
213-
git-tree-sha1 = "cb1299fee09da21e65ec88c1ff3a259f8d0b5802"
213+
git-tree-sha1 = "21f3ae106d1dcc20a66e96366012f7289ebba498"
214214
uuid = "95dc2771-c249-4cd0-9c9f-1f3b4330693c"
215-
version = "0.1.4"
215+
version = "0.1.5"
216216

217217
[[deps.ConstructionBase]]
218218
git-tree-sha1 = "b4b092499347b18a015186eae3042f72267106cb"
@@ -237,9 +237,9 @@ version = "1.16.0"
237237

238238
[[deps.DataStructures]]
239239
deps = ["OrderedCollections"]
240-
git-tree-sha1 = "6c72198e6a101cccdd4c9731d3985e904ba26037"
240+
git-tree-sha1 = "e357641bb3e0638d353c4b29ea0e40ea644066a6"
241241
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
242-
version = "0.19.1"
242+
version = "0.19.3"
243243

244244
[[deps.DataValueInterfaces]]
245245
git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6"
@@ -253,9 +253,9 @@ version = "1.11.0"
253253

254254
[[deps.DelaunayTriangulation]]
255255
deps = ["AdaptivePredicates", "EnumX", "ExactPredicates", "Random"]
256-
git-tree-sha1 = "5620ff4ee0084a6ab7097a27ba0c19290200b037"
256+
git-tree-sha1 = "783b21581a051ac91a3921ee37e26a23ed7f57a6"
257257
uuid = "927a84f5-c5f4-47a5-9785-b46e178433df"
258-
version = "1.6.4"
258+
version = "1.6.5"
259259

260260
[[deps.DiffResults]]
261261
deps = ["StaticArraysCore"]
@@ -297,9 +297,9 @@ version = "0.9.5"
297297

298298
[[deps.Documenter]]
299299
deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "CodecZlib", "Dates", "DocStringExtensions", "Downloads", "Git", "IOCapture", "InteractiveUtils", "JSON", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "TOML", "Test", "Unicode"]
300-
git-tree-sha1 = "352b9a04e74edd16429aec79f033620cf8e780d4"
300+
git-tree-sha1 = "b37458ae37d8bdb643d763451585cd8d0e5b4a9e"
301301
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
302-
version = "1.15.0"
302+
version = "1.16.1"
303303

304304
[[deps.Downloads]]
305305
deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"]
@@ -336,9 +336,9 @@ version = "0.1.6"
336336

337337
[[deps.FFMPEG_jll]]
338338
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"]
339-
git-tree-sha1 = "eaa040768ea663ca695d442be1bc97edfe6824f2"
339+
git-tree-sha1 = "3a948313e7a41eb1db7a1e733e6335f17b4ab3c4"
340340
uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5"
341-
version = "6.1.3+0"
341+
version = "7.1.1+0"
342342

343343
[[deps.FFTW]]
344344
deps = ["AbstractFFTs", "FFTW_jll", "Libdl", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"]
@@ -365,10 +365,20 @@ version = "1.17.1"
365365
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
366366

367367
[[deps.FilePaths]]
368-
deps = ["FilePathsBase", "MacroTools", "Reexport", "Requires"]
369-
git-tree-sha1 = "919d9412dbf53a2e6fe74af62a73ceed0bce0629"
368+
deps = ["FilePathsBase", "MacroTools", "Reexport"]
369+
git-tree-sha1 = "a1b2fbfe98503f15b665ed45b3d149e5d8895e4c"
370370
uuid = "8fc22ac5-c921-52a6-82fd-178b2807b824"
371-
version = "0.8.3"
371+
version = "0.9.0"
372+
373+
[deps.FilePaths.extensions]
374+
FilePathsGlobExt = "Glob"
375+
FilePathsURIParserExt = "URIParser"
376+
FilePathsURIsExt = "URIs"
377+
378+
[deps.FilePaths.weakdeps]
379+
Glob = "c27321d9-0574-5035-807b-f59d2c89b15c"
380+
URIParser = "30578b45-9adc-5946-b283-645ec420af67"
381+
URIs = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
372382

373383
[[deps.FilePathsBase]]
374384
deps = ["Compat", "Dates"]
@@ -387,9 +397,9 @@ version = "1.11.0"
387397

388398
[[deps.FillArrays]]
389399
deps = ["LinearAlgebra"]
390-
git-tree-sha1 = "173e4d8f14230a7523ae11b9a3fa9edb3e0efd78"
400+
git-tree-sha1 = "5bfcd42851cf2f1b303f51525a54dc5e98d408a3"
391401
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
392-
version = "1.14.0"
402+
version = "1.15.0"
393403
weakdeps = ["PDMats", "SparseArrays", "Statistics"]
394404

395405
[deps.FillArrays.extensions]
@@ -416,9 +426,9 @@ version = "1.3.7"
416426

417427
[[deps.ForwardDiff]]
418428
deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"]
419-
git-tree-sha1 = "ba6ce081425d0afb2bedd00d9884464f764a9225"
429+
git-tree-sha1 = "cd33c7538e68650bd0ddbb3f5bd50a4a0fa95b50"
420430
uuid = "f6369f11-7733-5829-9624-2563aa707210"
421-
version = "1.2.2"
431+
version = "1.3.0"
422432
weakdeps = ["StaticArrays"]
423433

424434
[deps.ForwardDiff.extensions]
@@ -533,9 +543,9 @@ version = "0.3.28"
533543

534544
[[deps.IOCapture]]
535545
deps = ["Logging", "Random"]
536-
git-tree-sha1 = "b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770"
546+
git-tree-sha1 = "0ee181ec08df7d7c911901ea38baf16f755114dc"
537547
uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89"
538-
version = "0.2.5"
548+
version = "1.0.0"
539549

540550
[[deps.ImageAxes]]
541551
deps = ["AxisArrays", "ImageBase", "ImageCore", "Reexport", "SimpleTraits"]
@@ -607,9 +617,9 @@ weakdeps = ["ForwardDiff", "Unitful"]
607617

608618
[[deps.IntervalArithmetic]]
609619
deps = ["CRlibm", "MacroTools", "OpenBLASConsistentFPCSR_jll", "Printf", "Random", "RoundingEmulator"]
610-
git-tree-sha1 = "bf0210c01fb7d67c31fed97d7c1d1716b98ea689"
620+
git-tree-sha1 = "02b61501dbe6da3b927cc25dacd7ce32390ee970"
611621
uuid = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253"
612-
version = "1.0.1"
622+
version = "1.0.2"
613623

614624
[deps.IntervalArithmetic.extensions]
615625
IntervalArithmeticArblibExt = "Arblib"
@@ -630,9 +640,9 @@ version = "1.0.1"
630640
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
631641

632642
[[deps.IntervalSets]]
633-
git-tree-sha1 = "5fbb102dcb8b1a858111ae81d56682376130517d"
643+
git-tree-sha1 = "d966f85b3b7a8e49d034d27a189e9a4874b4391a"
634644
uuid = "8197267c-284f-5f27-9208-e0e47529a953"
635-
version = "0.7.11"
645+
version = "0.7.13"
636646

637647
[deps.IntervalSets.extensions]
638648
IntervalSetsRandomExt = "Random"
@@ -683,9 +693,9 @@ version = "1.7.1"
683693

684694
[[deps.JSON]]
685695
deps = ["Dates", "Logging", "Parsers", "PrecompileTools", "StructUtils", "UUIDs", "Unicode"]
686-
git-tree-sha1 = "06ea418d0c95878c8f3031023951edcf25b9e0ef"
696+
git-tree-sha1 = "5b6bb73f555bc753a6153deec3717b8904f5551c"
687697
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
688-
version = "1.2.0"
698+
version = "1.3.0"
689699

690700
[deps.JSON.extensions]
691701
JSONArrowExt = ["ArrowTypes"]
@@ -863,9 +873,15 @@ version = "0.5.16"
863873

864874
[[deps.Makie]]
865875
deps = ["Animations", "Base64", "CRC32c", "ColorBrewer", "ColorSchemes", "ColorTypes", "Colors", "ComputePipeline", "Contour", "Dates", "DelaunayTriangulation", "Distributions", "DocStringExtensions", "Downloads", "FFMPEG_jll", "FileIO", "FilePaths", "FixedPointNumbers", "Format", "FreeType", "FreeTypeAbstraction", "GeometryBasics", "GridLayoutBase", "ImageBase", "ImageIO", "InteractiveUtils", "Interpolations", "IntervalSets", "InverseFunctions", "Isoband", "KernelDensity", "LaTeXStrings", "LinearAlgebra", "MacroTools", "Markdown", "MathTeXEngine", "Observables", "OffsetArrays", "PNGFiles", "Packing", "Pkg", "PlotUtils", "PolygonOps", "PrecompileTools", "Printf", "REPL", "Random", "RelocatableFolders", "Scratch", "ShaderAbstractions", "Showoff", "SignedDistanceFields", "SparseArrays", "Statistics", "StatsBase", "StatsFuns", "StructArrays", "TriplotBase", "UnicodeFun", "Unitful"]
866-
git-tree-sha1 = "368542cde25d381e44d84c3c4209764f05f4ef19"
876+
git-tree-sha1 = "7e6151c8432b91e76d9f9bc3adc6bbaecd00ec0a"
867877
uuid = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
868-
version = "0.24.6"
878+
version = "0.24.7"
879+
880+
[deps.Makie.extensions]
881+
MakieDynamicQuantitiesExt = "DynamicQuantities"
882+
883+
[deps.Makie.weakdeps]
884+
DynamicQuantities = "06fc5a27-2a28-4c7c-a15d-362465fb6821"
869885

870886
[[deps.MappedArrays]]
871887
git-tree-sha1 = "2dab0221fe2b0f2cb6754eaa743cc266339f527e"
@@ -884,10 +900,10 @@ uuid = "d0879d2d-cac2-40c8-9cee-1863dc0c7391"
884900
version = "0.1.2"
885901

886902
[[deps.MaterialModelsBase]]
887-
deps = ["StaticArrays", "Tensors"]
903+
deps = ["ForwardDiff", "StaticArrays", "Tensors"]
888904
path = ".."
889905
uuid = "af893363-701d-44dc-8b1e-d9a2c129bfc9"
890-
version = "0.2.3"
906+
version = "0.3.1"
891907

892908
[[deps.MathTeXEngine]]
893909
deps = ["AbstractTrees", "Automa", "DataStructures", "FreeTypeAbstraction", "GeometryBasics", "LaTeXStrings", "REPL", "RelocatableFolders", "UnicodeFun"]
@@ -1042,9 +1058,9 @@ version = "0.5.12"
10421058

10431059
[[deps.Pango_jll]]
10441060
deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl"]
1045-
git-tree-sha1 = "1f7f9bbd5f7a2e5a9f7d96e51c9754454ea7f60b"
1061+
git-tree-sha1 = "0662b083e11420952f2e62e17eddae7fc07d5997"
10461062
uuid = "36c8627f-9965-5494-a995-c6b170f724f3"
1047-
version = "1.56.4+0"
1063+
version = "1.57.0+0"
10481064

10491065
[[deps.Parsers]]
10501066
deps = ["Dates", "PrecompileTools", "UUIDs"]
@@ -1075,9 +1091,9 @@ version = "0.3.3"
10751091

10761092
[[deps.PlotUtils]]
10771093
deps = ["ColorSchemes", "Colors", "Dates", "PrecompileTools", "Printf", "Random", "Reexport", "StableRNGs", "Statistics"]
1078-
git-tree-sha1 = "3ca9a356cd2e113c420f2c13bea19f8d3fb1cb18"
1094+
git-tree-sha1 = "26ca162858917496748aad52bb5d3be4d26a228a"
10791095
uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043"
1080-
version = "1.4.3"
1096+
version = "1.4.4"
10811097

10821098
[[deps.PolygonOps]]
10831099
git-tree-sha1 = "77b3d3605fc1cd0b42d95eba87dfcd2bf67d5ff6"
@@ -1277,9 +1293,9 @@ weakdeps = ["ChainRulesCore"]
12771293

12781294
[[deps.StableRNGs]]
12791295
deps = ["Random"]
1280-
git-tree-sha1 = "95af145932c2ed859b63329952ce8d633719f091"
1296+
git-tree-sha1 = "4f96c596b8c8258cc7d3b19797854d368f243ddc"
12811297
uuid = "860ef19b-820b-49d6-a774-d7a799459cd3"
1282-
version = "1.0.3"
1298+
version = "1.0.4"
12831299

12841300
[[deps.StackViews]]
12851301
deps = ["OffsetArrays"]
@@ -1321,9 +1337,9 @@ version = "1.7.1"
13211337

13221338
[[deps.StatsBase]]
13231339
deps = ["AliasTables", "DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"]
1324-
git-tree-sha1 = "a136f98cefaf3e2924a66bd75173d1c891ab7453"
1340+
git-tree-sha1 = "064b532283c97daae49e544bb9cb413c26511f8c"
13251341
uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
1326-
version = "0.34.7"
1342+
version = "0.34.8"
13271343

13281344
[[deps.StatsFuns]]
13291345
deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"]
@@ -1359,9 +1375,9 @@ version = "0.7.2"
13591375

13601376
[[deps.StructUtils]]
13611377
deps = ["Dates", "UUIDs"]
1362-
git-tree-sha1 = "cd47aa083c9c7bdeb7b92de26deb46d6a33163c9"
1378+
git-tree-sha1 = "79529b493a44927dd5b13dde1c7ce957c2d049e4"
13631379
uuid = "ec057cc2-7a8d-4b58-b3b3-92acb9f63b42"
1364-
version = "2.5.1"
1380+
version = "2.6.0"
13651381

13661382
[deps.StructUtils.extensions]
13671383
StructUtilsMeasurementsExt = ["Measurements"]

docs/src/differentiation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Differentation of a material
22
```@docs
33
MaterialDerivatives
4+
StressStateDerivatives
45
allocate_differentiation_output
56
differentiate_material!
7+
reset_derivatives!
68
```

src/MaterialModelsBase.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export tovector, tovector!, fromvector # Convert to/from `A
2727
export get_num_tensorcomponents, get_num_statevars # Information about the specific material
2828
export get_vector_length, get_vector_eltype # Get the length and type when converting objects to vectors
2929
export MaterialDerivatives, StressStateDerivatives # Derivative collections
30-
export differentiate_material! # Differentiation routines
30+
export differentiate_material!, reset_derivatives! # Differentiation routines
3131
export allocate_differentiation_output #
3232

3333
abstract type AbstractMaterial end

0 commit comments

Comments
 (0)