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
# Using the following codes, we can check if we can get the derivatives correctly from the adjoint method by comparing it with the finite difference results.
# Once the `main_ex1` function has been defined, we have to trigger its execution on the different parts. To this end, one calls the `with_mpi` function of [`PartitionedArrays.jl`](https://github.com/fverdugo/PartitionedArrays.jl) right at the beginning of the program.
40
40
41
+
mkpath("output_path")
41
42
rank_partition = (2,2)
42
43
with_mpi() do distribute
43
44
main_ex1(rank_partition,distribute)
@@ -73,7 +74,7 @@ function main_ex2(rank_partition,distribute)
Copy file name to clipboardExpand all lines: src/poisson_unfitted.jl
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -104,8 +104,9 @@ cutgeo = cut(bgmodel,geo3)
104
104
# To illustrate this concept, we can plot both the background and active triangulations to compare them.
105
105
106
106
Ω_bg =Triangulation(bgmodel)
107
-
writevtk(Ω_bg,"bg_trian")
108
-
writevtk(Ω_act,"act_trian")
107
+
mkpath("output_path")
108
+
writevtk(Ω_bg,"output_path/bg_trian")
109
+
writevtk(Ω_act,"output_path/act_trian")
109
110
110
111
# In the picture below of the background grid, white cells are _inactive_, whereas gray cells are _active_.
111
112
#
@@ -116,7 +117,7 @@ writevtk(Ω_act,"act_trian")
116
117
# An `EmbeddedDiscretization` instance (here, `cutgeo`) also generates subtriangulations on each cut cells to represent the portion of the cell which is inside the domain of analysis. We use these subtriangulations to generate the so called _physical_ triangulations. Physical triangulations are nothing other than a body-fitted mesh of our domain $\Omega$, but _we only use them to integrate the weak form_ of the problem in $\Omega$, we won't define FE spaces and assign DoFs on top of them. In [GridapEmbedded](https://github.com/gridap/GridapEmbedded.jl) we build physical triangulations using the `PHYSICAL` keyword.
117
118
118
119
Ω =Triangulation(cutgeo,PHYSICAL)
119
-
writevtk(Ω,"phys_trian")
120
+
writevtk(Ω,"output_path/phys_trian")
120
121
121
122
# Once again, we can combine plots of the physical and active triangulations to illustrate these concepts. In the first plot, we show the physical triangulation within the background one.
0 commit comments