Skip to content

Commit

Permalink
small addition for SymTracelessTensorValue
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoinemarteau committed Aug 8, 2024
1 parent 1543f7e commit 98fbe44
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Fields/AutoDiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function divergence(f::Function,x::Point,fx::TensorValue{3,3})
)
end

function divergence(f::Function,x::Point,fx::SymTensorValue{2})
function divergence(f::Function,x::Point,fx::AbstractSymTensorValue{2})
g(x) = SVector(f(x).data)
a = ForwardDiff.jacobian(g,get_array(x))
VectorValue(
Expand All @@ -103,7 +103,7 @@ function divergence(f::Function,x::Point,fx::SymTensorValue{2})
)
end

function divergence(f::Function,x::Point,fx::SymTensorValue{3})
function divergence(f::Function,x::Point,fx::AbstractSymTensorValue{3})
g(x) = SVector(f(x).data)
a = ForwardDiff.jacobian(g,get_array(x))
VectorValue(
Expand Down
1 change: 1 addition & 0 deletions test/VisualizationTests/VtkTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ writevtk(trian,f,nsubcells=10, cellfields=[
"v2"=>x->VectorValue(1,2),
"v"=>x->VectorValue(1,2,3),
"s"=>x->SymTensorValue(1.0,2.0,3.0),
"q"=>x->SymTracelessTensorValue(1.0,2.0),
"c"=>x->SymFourthOrderTensorValue(1,2,3, 1,2,3, 1,2,3),
"t"=>x->TensorValue(1,2,3,4),])

Expand Down

0 comments on commit 98fbe44

Please sign in to comment.