# Specific Domains

**URL:** https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=330

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 331

---

## [Spherical version of \`volume\`](https://discourse.julialang.org/t/spherical-version-of-volume/69557)

<div class="topic-metadata">

**Author:** [@wujinq](https://discourse.julialang.org/u/wujinq)\
**Replies:** 0\
**Last updated:** [October 11, 2021, 11:25am UTC](https://discourse.julialang.org/t/spherical-version-of-volume/69557 "2021-10-11T11:25:05Z")

</div>

In Makie.jl the volume function can be used to visualize a 3D scalar field defined on a square lattice. If I have a scalar field in spherical coordinates, what can be used to visualize it?

---

## [Finding the value of a field at a spatial location in JuAFEM](https://discourse.julialang.org/t/finding-the-value-of-a-field-at-a-spatial-location-in-juafem/38975)

<div class="topic-metadata">

**Author:** [@jbmuir](https://discourse.julialang.org/u/jbmuir)\
**Replies:** 7\
**Last updated:** [October 11, 2021, 9:48am UTC](https://discourse.julialang.org/t/finding-the-value-of-a-field-at-a-spatial-location-in-juafem/38975 "2021-10-11T09:48:12Z")

</div>

Is there a relatively simple way to extract the value of a field in JuAFEM at a point in space within the grid? Use cases are - visualisation within Julia (not using ParaView); doing inverse problems with point observati…

---

## [DifferentialEquations.jl - how to calculate an 'assignment' and pass back to an ODE?](https://discourse.julialang.org/t/differentialequations-jl-how-to-calculate-an-assignment-and-pass-back-to-an-ode/69390)

<div class="topic-metadata">

**Author:** [@bgsmall](https://discourse.julialang.org/u/bgsmall)\
**Replies:** 10\
**Last updated:** [October 11, 2021, 9:29am UTC](https://discourse.julialang.org/t/differentialequations-jl-how-to-calculate-an-assignment-and-pass-back-to-an-ode/69390 "2021-10-11T09:29:22Z")

</div>

Hi. I have hit a snag in that I wish to calculate a quantity u\[3\] as an ‘assignment’ (not sure that is the correct terminology) within the ODE function and pass back to one of my ODE’s du\[3\] My code is below: # Package…

---

## [GraphRecipes graphplot discrepancy nodeshape and nodecolor](https://discourse.julialang.org/t/graphrecipes-graphplot-discrepancy-nodeshape-and-nodecolor/69549)

<div class="topic-metadata">

**Author:** [@moesphere](https://discourse.julialang.org/u/moesphere)\
**Replies:** 0\
**Last updated:** [October 11, 2021, 9:09am UTC](https://discourse.julialang.org/t/graphrecipes-graphplot-discrepancy-nodeshape-and-nodecolor/69549 "2021-10-11T09:09:07Z")

</div>

The following MWE gives incorrect colours for specified node shapes: using GraphRecipes using Plots M = \[0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 …

---

## [Printing non linear expression in model](https://discourse.julialang.org/t/printing-non-linear-expression-in-model/69505)

<div class="topic-metadata">

**Author:** [@manoj.centura](https://discourse.julialang.org/u/manoj.centura)\
**Replies:** 5\
**Last updated:** [October 11, 2021, 7:10am UTC](https://discourse.julialang.org/t/printing-non-linear-expression-in-model/69505 "2021-10-11T07:10:59Z")

</div>

Hi All, is there a way to print non linear expression model=Model() @variable(model,x) exp1 =@NLexpression(model,x\*x) @NLconstraint(model,exp1\<=10) println("exp1",exp1) output exp1"Reference to nonlinear expression …

---

## [How to use one color for a surface?](https://discourse.julialang.org/t/how-to-use-one-color-for-a-surface/69483)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 4\
**Last updated:** [October 10, 2021, 2:51pm UTC](https://discourse.julialang.org/t/how-to-use-one-color-for-a-surface/69483 "2021-10-10T14:51:15Z")

</div>

Hello I am trying to use only one color for a surface, but unfortunately I cannot find any example doing this. The command to generate the surface is simply: surface(rand(5),rand(5),rand(5)) But I cannot find the inp…

---

## [Dimension problem for variable multiplication in ModelingToolkit.jl](https://discourse.julialang.org/t/dimension-problem-for-variable-multiplication-in-modelingtoolkit-jl/69479)

<div class="topic-metadata">

**Author:** [@PikaPei](https://discourse.julialang.org/u/PikaPei)\
**Replies:** 2\
**Last updated:** [October 10, 2021, 12:11pm UTC](https://discourse.julialang.org/t/dimension-problem-for-variable-multiplication-in-modelingtoolkit-jl/69479 "2021-10-10T12:11:21Z")

</div>

This is what I did: using ModelingToolkit @parameters t @variables a(t) b(t) c\[1:2\](t) # then calculate: (c' \* \[a, b\]) \* c I think (c' \* \[a, b\]) can be a scalar, so the dimension is correct. julia\> size(c' \* \[a, b\]) …

---

## [Cannot add DiffEqFlux (Julia v1.6) due to Enzyme failure](https://discourse.julialang.org/t/cannot-add-diffeqflux-julia-v1-6-due-to-enzyme-failure/69495)

<div class="topic-metadata">

**Author:** [@GregCoyle](https://discourse.julialang.org/u/GregCoyle)\
**Replies:** 1\
**Last updated:** [October 10, 2021, 4:26am UTC](https://discourse.julialang.org/t/cannot-add-diffeqflux-julia-v1-6-due-to-enzyme-failure/69495 "2021-10-10T04:26:50Z")

</div>

I am trying to follow the doc examples for DiffEqFlux and adding the package to a fresh project returns: (UDEs) pkg\> up Updating registry at \`C:\\Users\\...\\.julia\\registries\\General\` Updating git-repo \`https://gi…

---

## [Necessary Second-Order Optimality Condition of Iterate within a Specified Tolerance](https://discourse.julialang.org/t/necessary-second-order-optimality-condition-of-iterate-within-a-specified-tolerance/69334)

<div class="topic-metadata">

**Author:** [@danphenderson](https://discourse.julialang.org/u/danphenderson)\
**Replies:** 5\
**Last updated:** [October 9, 2021, 1:21pm UTC](https://discourse.julialang.org/t/necessary-second-order-optimality-condition-of-iterate-within-a-specified-tolerance/69334 "2021-10-09T13:21:29Z")

</div>

Hello, I am working with a scheme that seeks an unconstrained local minimizer of some C^2 function f. The scheme terminates when the necessary first-order optimality condition for the iterate x has been met, up to a pr…

---

## [Traversing a directional graph](https://discourse.julialang.org/t/traversing-a-directional-graph/69470)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 0\
**Last updated:** [October 9, 2021, 10:50am UTC](https://discourse.julialang.org/t/traversing-a-directional-graph/69470 "2021-10-09T10:50:11Z")

</div>

How to traverse a directional graph in LightGraphs package in a unidirectional sense? Meaning I do want to omit the reverse edges if any in the DiGraph !

---

## [Flux callback using accuracy not found](https://discourse.julialang.org/t/flux-callback-using-accuracy-not-found/69429)

<div class="topic-metadata">

**Author:** [@FrootLoops](https://discourse.julialang.org/u/FrootLoops)\
**Replies:** 2\
**Last updated:** [October 9, 2021, 5:47am UTC](https://discourse.julialang.org/t/flux-callback-using-accuracy-not-found/69429 "2021-10-09T05:47:47Z")

</div>

Hi, I start to work with the Flux.jl to create neural networks. Using the documentation Flux\_Callback I wanted touse a callback for a train model. Using the suggested callback cb = function () accuracy() \> 0.9 && Fl…

---

## [Video about Mapping Data to Color Using Array Attributes in Makie](https://discourse.julialang.org/t/video-about-mapping-data-to-color-using-array-attributes-in-makie/69374)

<div class="topic-metadata">

**Author:** [@Adam\_Fleischhacker](https://discourse.julialang.org/u/Adam_Fleischhacker)\
**Replies:** 3\
**Last updated:** [October 8, 2021, 11:34pm UTC](https://discourse.julialang.org/t/video-about-mapping-data-to-color-using-array-attributes-in-makie/69374 "2021-10-08T23:34:55Z")

</div>

Hi All: This community has helped me to learn Makie and I am trying to give back. I made a video about mapping data to color using array attributes. See here: Mapping Data to Colors in Makie.jl Using Array Attribute…

---

## [Problem defining a Neural Network with gradient as Loss function](https://discourse.julialang.org/t/problem-defining-a-neural-network-with-gradient-as-loss-function/69164)

<div class="topic-metadata">

**Author:** [@munozariasjm](https://discourse.julialang.org/u/munozariasjm)\
**Replies:** 1\
**Last updated:** [October 8, 2021, 9:26pm UTC](https://discourse.julialang.org/t/problem-defining-a-neural-network-with-gradient-as-loss-function/69164 "2021-10-08T21:26:52Z")

</div>

Hi, I’m trying to setup a simple network who’s Loss Function is the Laplacian of the NN with respect to the gradient. Then, the loss function is: function 𝕃1(x) f(j) = NNsolver(j) #Output of the NN ∇²(n) = Zygo…

---

## [GPU Error in Julia 1.6 but not in Julia 1.5](https://discourse.julialang.org/t/gpu-error-in-julia-1-6-but-not-in-julia-1-5/69440)

<div class="topic-metadata">

**Author:** [@PGJulia](https://discourse.julialang.org/u/PGJulia)\
**Replies:** 3\
**Last updated:** [October 8, 2021, 8:53pm UTC](https://discourse.julialang.org/t/gpu-error-in-julia-1-6-but-not-in-julia-1-5/69440 "2021-10-08T20:53:34Z")

</div>

Hi, The following kernel works in Julia 1.5.3 but not in Julia 1.6.3. I believe it is related to CUDA.exp but I tried directly with exp() w/o success. function vr(Nb,Ny,α,β,τ,Vr,V0,Y,B,Price0,P) ib = (blockIdx().x-1)\*…

---

## [Parameter estimation and model inadequacy](https://discourse.julialang.org/t/parameter-estimation-and-model-inadequacy/69407)

<div class="topic-metadata">

**Author:** [@GregCoyle](https://discourse.julialang.org/u/GregCoyle)\
**Replies:** 2\
**Last updated:** [October 8, 2021, 3:51pm UTC](https://discourse.julialang.org/t/parameter-estimation-and-model-inadequacy/69407 "2021-10-08T15:51:46Z")

</div>

Are there any packages associated with Bayesian inference that provide methods to take on model inadequacy, AKA structural error, model bias, etc.? I’m particularly interested in applications to Bayesian parameter estima…

---

## [ChargedParticles Example Seems Too Boring as an Example of NBodySimulator - Am I doing something wrong?](https://discourse.julialang.org/t/chargedparticles-example-seems-too-boring-as-an-example-of-nbodysimulator-am-i-doing-something-wrong/69439)

<div class="topic-metadata">

**Author:** [@Adam\_Fleischhacker](https://discourse.julialang.org/u/Adam_Fleischhacker)\
**Replies:** 1\
**Last updated:** [October 8, 2021, 3:43pm UTC](https://discourse.julialang.org/t/chargedparticles-example-seems-too-boring-as-an-example-of-nbodysimulator-am-i-doing-something-wrong/69439 "2021-10-08T15:43:29Z")

</div>

I am using the NBodySimulator.jl package and trying to understand it to model “blue-noise sampling” (see here if interested: Blue noise sampling using an N-body simulation-based method | SpringerLink). I am swimming ou…

---

## [Bug in StatsModels.modelmatrix()](https://discourse.julialang.org/t/bug-in-statsmodels-modelmatrix/69428)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 3\
**Last updated:** [October 8, 2021, 1:56pm UTC](https://discourse.julialang.org/t/bug-in-statsmodels-modelmatrix/69428 "2021-10-08T13:56:15Z")

</div>

as per below, modelmatrix() (also modelcols()) fails when the formula is “quadratic” rather than “linear”: using DataFrames using GLM df = DataFrame(a = 1.0:3.0, b = 2.0:4.0, y = 5.0:7.0) fml1 = @formula(y ~ 1 + a + b);…

---

## [What is the uknown rate, how to resolve it?](https://discourse.julialang.org/t/what-is-the-uknown-rate-how-to-resolve-it/68839)

<div class="topic-metadata">

**Author:** [@Lessvn](https://discourse.julialang.org/u/Lessvn)\
**Replies:** 4\
**Last updated:** [October 8, 2021, 1:28pm UTC](https://discourse.julialang.org/t/what-is-the-uknown-rate-how-to-resolve-it/68839 "2021-10-08T13:28:17Z")

</div>

Hello, I am trying to solve an optimzation problem using SCIP, it looks like every thing is fine, unless I get this warning at the onset where the solution starts. WARNING: ignore partial solution (0) because unknown …

---

## [DifferentialEquations.jl -- store intermediate variables?](https://discourse.julialang.org/t/differentialequations-jl-store-intermediate-variables/68928)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 3\
**Last updated:** [October 8, 2021, 10:15am UTC](https://discourse.julialang.org/t/differentialequations-jl-store-intermediate-variables/68928 "2021-10-08T10:15:49Z")

</div>

Is there a way to store intermediate variables in ODEs using the DifferentialEquations package? MWE: using DifferentialEquations # function sys!(dx,x,p,t) r = 1 u = 5\*(r-x\[1\]) dx\[1\] = 0.1\*(u-x\[1\]) end # x0 …

---

## [Quantum optics - expansion of functions to composite bases](https://discourse.julialang.org/t/quantum-optics-expansion-of-functions-to-composite-bases/69413)

<div class="topic-metadata">

**Author:** [@natan.granit](https://discourse.julialang.org/u/natan.granit)\
**Replies:** 0\
**Last updated:** [October 8, 2021, 6:29am UTC](https://discourse.julialang.org/t/quantum-optics-expansion-of-functions-to-composite-bases/69413 "2021-10-08T06:29:00Z")

</div>

I’m using a composite fock basis in the Quantum optics pkg and I wanted to use the following functions: \[ QuantumOpticsBase.transform \] API · QuantumOptics.jl \[ QuantumOpticsBase.qfunc \] API · QuantumOptics.jl \[ Quan…

---

## [ModelingToolkit: Index reduction and linear algebraic loops](https://discourse.julialang.org/t/modelingtoolkit-index-reduction-and-linear-algebraic-loops/69312)

<div class="topic-metadata">

**Author:** [@AnHeuermann](https://discourse.julialang.org/u/AnHeuermann)\
**Replies:** 6\
**Last updated:** [October 7, 2021, 9:57pm UTC](https://discourse.julialang.org/t/modelingtoolkit-index-reduction-and-linear-algebraic-loops/69312 "2021-10-07T21:57:02Z")

</div>

Hey all, I’m trying out ModelingToolkit.jl and want to investigate what is currently possible and what not and compare it to the OpenModelica Compiler Backend. Let’s say we have the following DAE: der(x) = y + a y = 3…

---

## [What is the equivalent of vmin and vmax in Makie?](https://discourse.julialang.org/t/what-is-the-equivalent-of-vmin-and-vmax-in-makie/69387)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 1\
**Last updated:** [October 7, 2021, 7:50pm UTC](https://discourse.julialang.org/t/what-is-the-equivalent-of-vmin-and-vmax-in-makie/69387 "2021-10-07T19:50:23Z")

</div>

In Plots.jl we can pass the keyword arguments vmin=0.0, vmax=1.0 in plot commands like heatmap to set the range of the colormap. Is there an equivalent in Makie?

---

## [Newbie: Variables are missing from the variable map: PMSM model](https://discourse.julialang.org/t/newbie-variables-are-missing-from-the-variable-map-pmsm-model/69314)

<div class="topic-metadata">

**Author:** [@gruemelmonster](https://discourse.julialang.org/u/gruemelmonster)\
**Replies:** 3\
**Last updated:** [October 7, 2021, 7:41pm UTC](https://discourse.julialang.org/t/newbie-variables-are-missing-from-the-variable-map-pmsm-model/69314 "2021-10-07T19:41:14Z")

</div>

Based from the RC example I am trying to build something different to learn more about ModelingToolkit.jl. But I am struggling with an error message about “\[Ψd(t), Ψq(t), ω(t)\] are missing from the variable map” and I am…

---

## [Makie - Camera position](https://discourse.julialang.org/t/makie-camera-position/69243)

<div class="topic-metadata">

**Author:** [@Kang\_Pyo\_So](https://discourse.julialang.org/u/Kang_Pyo_So)\
**Replies:** 6\
**Last updated:** [October 7, 2021, 2:34pm UTC](https://discourse.julialang.org/t/makie-camera-position/69243 "2021-10-07T14:34:24Z")

</div>

Hi Everyone, i have been using the Makie for a while. particularly, I like the 3D reconstruction function. the 3D reconstructive function allow me create the color code 3D plot from the 3D electron microscopy. however…

---

## [Predator\_prey\_multiagent vs predator\_prey\_fast.jl example](https://discourse.julialang.org/t/predator-prey-multiagent-vs-predator-prey-fast-jl-example/69359)

<div class="topic-metadata">

**Author:** [@Edu\_P](https://discourse.julialang.org/u/Edu_P)\
**Replies:** 4\
**Last updated:** [October 7, 2021, 1:34pm UTC](https://discourse.julialang.org/t/predator-prey-multiagent-vs-predator-prey-fast-jl-example/69359 "2021-10-07T13:34:00Z")

</div>

Hello, in the predator\_prey\_multiagent.jl example I read the following comment: “This approach is less performant than the version in \[Predator-prey dynamics\]”. Has someone more details on what makes it a less performan…

---

## [Projected coordinate system and multi-agents](https://discourse.julialang.org/t/projected-coordinate-system-and-multi-agents/69289)

<div class="topic-metadata">

**Author:** [@Edu\_P](https://discourse.julialang.org/u/Edu_P)\
**Replies:** 2\
**Last updated:** [October 7, 2021, 11:21am UTC](https://discourse.julialang.org/t/projected-coordinate-system-and-multi-agents/69289 "2021-10-07T11:21:43Z")

</div>

I’m a newbie to Julia agents.jl. How hard is to develop models in agents.jl requiring shape files and multi-agents using locations in a projected coordinate system? any experiences that can be compared to Gama Thanks

---

## [DifferentialEquations -- transform time for all variables?](https://discourse.julialang.org/t/differentialequations-transform-time-for-all-variables/69356)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 1\
**Last updated:** [October 7, 2021, 11:12am UTC](https://discourse.julialang.org/t/differentialequations-transform-time-for-all-variables/69356 "2021-10-07T11:12:43Z")

</div>

I have solved a matrix ODE with state u, and want to plot the solution sol. But I want to scale the time axis from second to year. Can I do this for all variables, something like: y2s = 365\*24\*60\*60 plot(sol,vars=((t,u)…

---

## [Structural\_simplify fails if differential term is on the Right Hand Side of an equation](https://discourse.julialang.org/t/structural-simplify-fails-if-differential-term-is-on-the-right-hand-side-of-an-equation/69302)

<div class="topic-metadata">

**Author:** [@SCher](https://discourse.julialang.org/u/SCher)\
**Replies:** 2\
**Last updated:** [October 7, 2021, 8:58am UTC](https://discourse.julialang.org/t/structural-simplify-fails-if-differential-term-is-on-the-right-hand-side-of-an-equation/69302 "2021-10-07T08:58:07Z")

</div>

I am working on ModelingToolkit.jl using the RC circuit example at https://mtk.sciml.ai/stable/tutorials/acausal\_components/. It appears that as long as the Differential(t) terms in the equations are on the Left Hand Sid…

---

## [DifferentialEquations: enforcing realistic solution?](https://discourse.julialang.org/t/differentialequations-enforcing-realistic-solution/69332)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 7\
**Last updated:** [October 7, 2021, 8:36am UTC](https://discourse.julialang.org/t/differentialequations-enforcing-realistic-solution/69332 "2021-10-07T08:36:03Z")

</div>

I have a (large) ODE where each state x must lie in the range \[0,1\]. Due to numeric inaccuracies, the solution does drift outside of this range. I have tried to map x into the allowed range at the start of the function d…

---

## [Ipopt and JuMP - Invalid number in NLP function or derivative](https://discourse.julialang.org/t/ipopt-and-jump-invalid-number-in-nlp-function-or-derivative/69342)

<div class="topic-metadata">

**Author:** [@jaberdeen](https://discourse.julialang.org/u/jaberdeen)\
**Replies:** 4\
**Last updated:** [October 7, 2021, 6:50am UTC](https://discourse.julialang.org/t/ipopt-and-jump-invalid-number-in-nlp-function-or-derivative/69342 "2021-10-07T06:50:38Z")

</div>

We are generalising the following julia code to two or more dimensional grids. The following is the output (for each grid point): "Number of Iterations…: 0 Number of objective function evaluations = 0 N…

[Previous page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=329)

[Next page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=331)
