# Verifying ability to run for repository

**URL:** <https://discourse.julialang.org/t/verifying-ability-to-run-for-repository/56153>\
**Category:** New to Julia\
**Created:** [February 27, 2021, 7:44pm UTC](https://discourse.julialang.org/t/verifying-ability-to-run-for-repository/56153 "2021-02-27T19:44:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![meck](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@meck](https://discourse.julialang.org/u/meck)\
**Post date:** [February 27, 2021, 7:44pm UTC](https://discourse.julialang.org/t/verifying-ability-to-run-for-repository/56153/1 "2021-02-27T19:44:46Z")

</div>

Hello, so I am trying to run my first cloned [Julia-repository](https://github.com/weymouth/WaterLily) for two days. Constantly I am running into problems to the point where I dont even know anymore, if those scripts in the examples folder are runnable at all. Can someone with more experience please verify this? I dont know for how much time I am asking but I imagine it to be quite simple if you know your way around the module, function and file structure in Julia. I think thats where I am hitting bedrock. Thank you.

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [February 27, 2021, 8:14pm UTC](https://discourse.julialang.org/t/verifying-ability-to-run-for-repository/56153/2 "2021-02-27T20:14:24Z")

</div>

How are you adding the repository? Are you making sure to `instantiate` the package?

Here is what I just did

```julia
$ git clone WaterLily
$ cd WaterLily
$ julia --project
(WaterLily) pkg> instantiate
julia> using WaterLily

```

Next I copied and pasted the example

```julia
julia> using LinearAlgebra: norm2

julia> function circle(p=7;Re=250)
           # Set physical parameters
           n,m = 2^p,2^(p-1)
           U,R,center = 1., m/8., [m/2,m/2]
           ν=U*R/Re
           @show R,ν

           # Immerse a circle (change for other shapes)
           c = BDIM_coef(n+2,m+2,2) do xy
               norm2(xy .- center) - R # signed distance function
           end

           # Initialize Simulation object
           u = zeros(n+2,m+2,2)
           a = Flow(u,c,[U,0.],ν=ν)
           b = MultiLevelPoisson(c)
           Simulation(U,R,a,b)
       end

circle (generic function with 2 methods)

julia> sim = circle();
(R, ν) = (8.0, 0.032)

```

I think it works for me!

---

<div class="post-metadata">

**Author:** ![meck](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@meck](https://discourse.julialang.org/u/meck)\
**Post date:** [February 27, 2021, 9:53pm UTC](https://discourse.julialang.org/t/verifying-ability-to-run-for-repository/56153/3 "2021-02-27T21:53:35Z")

</div>

> [@pdeffebach](#):
>
> ```julia
> function circle(p=7;Re=250)
> # Set physical parameters
> n,m = 2^p,2^(p-1)
> U,R,center = 1., m/8., [m/2,m/2]
> ν=U*R/Re
> @show R,ν
> 
> # Immerse a circle (change for other shapes)
> c = BDIM_coef(n+2,m+2,2) do xy
> norm2(xy .- center) - R # signed distance function
> end
> 
> # Initialize Simulation object
> u = zeros(n+2,m+2,2)
> a = Flow(u,c,[U,0.],ν=ν)
> b = MultiLevelPoisson(c)
> Simulation(U,R,a,b)
> end
> 
> ```

(R, ν) = (8.0, 0.032)  
ERROR: UndefVarError: BDIM\_coef not defined  
Stacktrace:  
[1] circle(::Int64; Re::Int64) at ./REPL[17]:9  
[2] circle at ./REPL[17]:3 [inlined] (repeats 2 times)  
[3] top-level scope at REPL[18]:1  
[4] run\_repl(::REPL.AbstractREPL, ::Any) at /build/julia/src/julia-1.5.3/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:288

Thank you for trying and documenting this!  
Although I get the same result, additionally I get that Error as well. How do I define BDIM\_coef here?  
My mistake was to assume I could run the example scripts through marking them and pushing “run”. I haven`t realized you had to copy the function into the REPL.

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [February 27, 2021, 10:00pm UTC](https://discourse.julialang.org/t/verifying-ability-to-run-for-repository/56153/4 "2021-02-27T22:00:58Z")

</div>

Sorry, I think I need more information in order to help you.

If you “get the same result”, then how does the error come about?

---

<div class="post-metadata">

**Author:** ![meck](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@meck](https://discourse.julialang.org/u/meck)\
**Post date:** [March 3, 2021, 8:00am UTC](https://discourse.julialang.org/t/verifying-ability-to-run-for-repository/56153/5 "2021-03-03T08:00:56Z")

</div>

I had been playing around with the code the last days and have managed to remove the errors. Thank you.
