You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/elasticity.jl
+14-2Lines changed: 14 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -177,9 +177,9 @@ end
177
177
178
178
a(u,v) =∫( ε(v) ⊙ (σ_bimat∘(ε(u),tags)) )*dΩ
179
179
180
-
# In previous line, pay attention in the usage of the new constitutive law `σ_bimat`. Note that we have passed the vector `tags` containing the material identifiers in the last argument of the function`.
180
+
# In previous line, pay attention in the usage of the new constitutive law `σ_bimat`. Note that we have passed the vector `tags` containing the material identifiers in the last argument of the function.
181
181
#
182
-
# At this point, we can build the FE problem again and solve it
182
+
# At this point, we can build the FE problem again and solve it:
# A material law depending on the model tags but not on the fields can be defined as follow:
195
+
196
+
tags_field =CellField(tags, Ω)
197
+
σ_from_tag(tag) = tag==alu_tag ?1.:0.
198
+
σ_bimat_cst = σ_from_tag ∘ tags_field
199
+
200
+
# `tags_field` is a field which value at $x$ is the tag of the cell containing $x$. `σ_bimat_cst` is used like a constant in (bi)linear form definition and solution export:
0 commit comments