# Specific Domains

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

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

**Page:** 158

---

## [MTK: PDEs & Collocation/weighted residual method](https://discourse.julialang.org/t/mtk-pdes-collocation-weighted-residual-method/105241)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 6\
**Last updated:** [October 28, 2023, 4:29pm UTC](https://discourse.julialang.org/t/mtk-pdes-collocation-weighted-residual-method/105241 "2023-10-28T16:29:33Z")

</div>

I’m trying to dig up some past knowledge on the “weighted residual method” – it seems to be quite similar to PINN. How can I make the following more elegant? To exemplify, I consider a co-current heat exchanger: \\frac…

---

## [Divergence loss term Partial Derivative Flux Zygote](https://discourse.julialang.org/t/divergence-loss-term-partial-derivative-flux-zygote/105513)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 0\
**Last updated:** [October 28, 2023, 4:09pm UTC](https://discourse.julialang.org/t/divergence-loss-term-partial-derivative-flux-zygote/105513 "2023-10-28T16:09:54Z")

</div>

Hello, I would like to train a neural network s\_\\theta : \\mathbb{R}^{n\_x} \\times \\mathbb{R}^{n\_y} \\to \\mathbb{R}^{n\_x} parameterized by the parameters \\theta defined on a space of joint variables (x,y) \\in \\mathbb{R}^{n…

---

## [Degenerate Multivariate Normal Sampling](https://discourse.julialang.org/t/degenerate-multivariate-normal-sampling/103825)

<div class="topic-metadata">

**Author:** [@Jad\_Zeitouni](https://discourse.julialang.org/u/Jad_Zeitouni)\
**Replies:** 1\
**Last updated:** [October 28, 2023, 2:22pm UTC](https://discourse.julialang.org/t/degenerate-multivariate-normal-sampling/103825 "2023-10-28T14:22:01Z")

</div>

It seems this topic keeps coming up over and over again (see here and here), with a lot of efforts to resolve it but it gets stuck. My code is reliant on using MvNormal for sampling. I could write my own code that check…

---

## [MethodError: no method matching Plot(::Vector{Any}, ::Layout{Dict{Symbol, Any}})](https://discourse.julialang.org/t/methoderror-no-method-matching-plot-vector-any-layout-dict-symbol-any/105501)

<div class="topic-metadata">

**Author:** [@Stephen](https://discourse.julialang.org/u/Stephen)\
**Replies:** 1\
**Last updated:** [October 28, 2023, 1:15pm UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-plot-vector-any-layout-dict-symbol-any/105501 "2023-10-28T13:15:52Z")

</div>

scatter\_data = \[\]; for col in names(国家财政收入)\[2:3\] 国家财政收入\[!, col\] .= (国家财政收入\[!, col\] ./ 财政收入合计) push!(scatter\_data, scatter(国家财政收入, x = :年份, y = :col, name = col)) end scatter\_data returns 2-element Vector{Any} …

---

## [Unexpectedly Large Compile Time Using MethodOfLines.jl](https://discourse.julialang.org/t/unexpectedly-large-compile-time-using-methodoflines-jl/105212)

<div class="topic-metadata">

**Author:** [@aharbick](https://discourse.julialang.org/u/aharbick)\
**Replies:** 3\
**Last updated:** [October 28, 2023, 11:07am UTC](https://discourse.julialang.org/t/unexpectedly-large-compile-time-using-methodoflines-jl/105212 "2023-10-28T11:07:10Z")

</div>

So I am trying to use the MethodOfLines package to solve some equations which are somewhat similar to 2D diffusion equations. As a starting point, I have modified the heat equation example from the documentation to work …

---

## [DifferentialEquations 2nd order ODE interpolation for position](https://discourse.julialang.org/t/differentialequations-2nd-order-ode-interpolation-for-position/105409)

<div class="topic-metadata">

**Author:** [@rwalters31](https://discourse.julialang.org/u/rwalters31)\
**Replies:** 2\
**Last updated:** [October 28, 2023, 9:38am UTC](https://discourse.julialang.org/t/differentialequations-2nd-order-ode-interpolation-for-position/105409 "2023-10-28T09:38:28Z")

</div>

I am modeling simple projectile motion using the DifferentialEquations.jl package. I have read in the documentation that you can interpolate based on time to get an answer for an exact time. Instead of time I have been…

---

## [ApproxFun.jl for Helmholtz equation on cylinder](https://discourse.julialang.org/t/approxfun-jl-for-helmholtz-equation-on-cylinder/14864)

<div class="topic-metadata">

**Author:** [@mitkoge](https://discourse.julialang.org/u/mitkoge)\
**Replies:** 3\
**Last updated:** [October 27, 2023, 4:05pm UTC](https://discourse.julialang.org/t/approxfun-jl-for-helmholtz-equation-on-cylinder/14864 "2023-10-27T16:05:30Z")

</div>

I am trying to figure out if ApproxFun can be used for solving Helmholtz equation on cylindrical domain. Naively i hoped for something like Bessel spaces readily available. May be i have to construct cylinder domain us…

---

## [Julia can be better at doing web: A benchmark](https://discourse.julialang.org/t/julia-can-be-better-at-doing-web-a-benchmark/103300)

<div class="topic-metadata">

**Author:** [@pankgeorg](https://discourse.julialang.org/u/pankgeorg)\
**Replies:** 27\
**Last updated:** [October 27, 2023, 2:23pm UTC](https://discourse.julialang.org/t/julia-can-be-better-at-doing-web-a-benchmark/103300 "2023-10-27T14:23:35Z")

</div>

Disclaimer: that is, iff I haven’t written anything bad while authoring the benchmark below, (which is likely because I’m not sure what this means Server · HTTP.jl, and whether it’s “recommended” to do this another way).…

---

## [How to define a TT-cross implementation using ITensors without usage of for loops](https://discourse.julialang.org/t/how-to-define-a-tt-cross-implementation-using-itensors-without-usage-of-for-loops/105472)

<div class="topic-metadata">

**Author:** [@matinator](https://discourse.julialang.org/u/matinator)\
**Replies:** 0\
**Last updated:** [October 27, 2023, 8:58am UTC](https://discourse.julialang.org/t/how-to-define-a-tt-cross-implementation-using-itensors-without-usage-of-for-loops/105472 "2023-10-27T08:58:03Z")

</div>

Hello everyone I was trying to define the following ket state from a paper which has the following equation: where \\varphi is a complex valued function, the only way I was able to produce this is by the usage of the …

---

## [Remove whitespace between Axis3 and Label](https://discourse.julialang.org/t/remove-whitespace-between-axis3-and-label/105461)

<div class="topic-metadata">

**Author:** [@AshtonSBradley](https://discourse.julialang.org/u/AshtonSBradley)\
**Replies:** 4\
**Last updated:** [October 27, 2023, 8:19am UTC](https://discourse.julialang.org/t/remove-whitespace-between-axis3-and-label/105461 "2023-10-27T08:19:28Z")

</div>

I want to get my label closer to the axis. I have tried every combination of Axis3 and label options I can think of, and resizing the figure, but I haven’t improved on this. Is there a version of rowgap that could be use…

---

## [Julia's deployment in a production environment (100k~200k QPS)](https://discourse.julialang.org/t/julias-deployment-in-a-production-environment-100k-200k-qps/105458)

<div class="topic-metadata">

**Author:** [@perchouli](https://discourse.julialang.org/u/perchouli)\
**Replies:** 1\
**Last updated:** [October 27, 2023, 2:44am UTC](https://discourse.julialang.org/t/julias-deployment-in-a-production-environment-100k-200k-qps/105458 "2023-10-27T02:44:04Z")

</div>

Two years ago we rewrote our original Java service with Julia and got no less performance than before, but we ran into some problems. Our system has Nginx as load balancing, which forwards requests to Julia (HTTP.jl) fo…

---

## [Model parameters not updating when using Flux.update with differential equation](https://discourse.julialang.org/t/model-parameters-not-updating-when-using-flux-update-with-differential-equation/105392)

<div class="topic-metadata">

**Author:** [@arvindmohan](https://discourse.julialang.org/u/arvindmohan)\
**Replies:** 2\
**Last updated:** [October 26, 2023, 4:12pm UTC](https://discourse.julialang.org/t/model-parameters-not-updating-when-using-flux-update-with-differential-equation/105392 "2023-10-26T16:12:16Z")

</div>

Here is a MWE, where I am learning a missing term in an equation by representing it with a neural network model. I can compute the gradients with Flux, but the model does not update after each epoch. using DifferentialE…

---

## [Required methods to sample a multivariate distribution](https://discourse.julialang.org/t/required-methods-to-sample-a-multivariate-distribution/105443)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 1\
**Last updated:** [October 26, 2023, 2:37pm UTC](https://discourse.julialang.org/t/required-methods-to-sample-a-multivariate-distribution/105443 "2023-10-26T14:37:29Z")

</div>

Hey, I have a question, maybe you can answer me. Following this Distributions.jl documentation, when I define a multivariate distribution, I implement the two functions : function Distributions.\_rand!(rng::Distributio…

---

## [Updating an XLSX file simultaneously by more than one Julia script](https://discourse.julialang.org/t/updating-an-xlsx-file-simultaneously-by-more-than-one-julia-script/105397)

<div class="topic-metadata">

**Author:** [@math\_opt](https://discourse.julialang.org/u/math_opt)\
**Replies:** 5\
**Last updated:** [October 26, 2023, 12:05pm UTC](https://discourse.julialang.org/t/updating-an-xlsx-file-simultaneously-by-more-than-one-julia-script/105397 "2023-10-26T12:05:13Z")

</div>

I have a Julia script which does some calculations and in the end, the output is written to an Excel file using the following function: function populate\_spreadsheet(sol, instance\_number, sheet\_number, stat::Symbol) …

---

## [Interface for a distribution defined by its cdf](https://discourse.julialang.org/t/interface-for-a-distribution-defined-by-its-cdf/105394)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 16\
**Last updated:** [October 26, 2023, 8:48am UTC](https://discourse.julialang.org/t/interface-for-a-distribution-defined-by-its-cdf/105394 "2023-10-26T08:48:31Z")

</div>

Hi, I do have an issue where I need to sample from a distribution that is defined by its cumulative distribution function: function unknown\_cdf(x) if x \< 0 return 0 else # do stuff... end en…

---

## [Input data for main simulation with ParallelStencil.jl](https://discourse.julialang.org/t/input-data-for-main-simulation-with-parallelstencil-jl/105385)

<div class="topic-metadata">

**Author:** [@chloisu](https://discourse.julialang.org/u/chloisu)\
**Replies:** 3\
**Last updated:** [October 25, 2023, 7:38pm UTC](https://discourse.julialang.org/t/input-data-for-main-simulation-with-parallelstencil-jl/105385 "2023-10-25T19:38:16Z")

</div>

Hello, I have a question regarding the use of ParallelStencil.jl. I would like to initialize a simulation or load a previous solution and assign these input fields like temperature or so to the ParallelStencil Arrays be…

---

## [How to write equations less redundant](https://discourse.julialang.org/t/how-to-write-equations-less-redundant/105320)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [October 25, 2023, 6:39pm UTC](https://discourse.julialang.org/t/how-to-write-equations-less-redundant/105320 "2023-10-25T18:39:57Z")

</div>

How can this code be written less redundant? if lin @parameters a=eq.a\_bar b=eq.b\_bar eqs = \[D(ω) ~ (Pr - Pg) / (J \* ω), D(Uest) ~ Ku \* e\_p, r\_ω ~ Uest \* λnom / R, …

---

## [Issue MethodOfLines.jl Burger equation with periodic BCs](https://discourse.julialang.org/t/issue-methodoflines-jl-burger-equation-with-periodic-bcs/104277)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 5\
**Last updated:** [October 25, 2023, 5:55pm UTC](https://discourse.julialang.org/t/issue-methodoflines-jl-burger-equation-with-periodic-bcs/104277 "2023-10-25T17:55:13Z")

</div>

Hello, I would like to solve the 1D inviscid Burgers equation \\frac{\\partial u(x,t)}{\\partial t} + \\frac{1}{2} \\frac{\\partial u(x,t)^2}{\\partial x} = 0 with periodic BCs on \[0,1\], i.e. u(0, t) = u(1,t), using MethodOfLi…

---

## [Makie: Isosurface colored by values from another array](https://discourse.julialang.org/t/makie-isosurface-colored-by-values-from-another-array/105318)

<div class="topic-metadata">

**Author:** [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Replies:** 26\
**Last updated:** [October 25, 2023, 10:59am UTC](https://discourse.julialang.org/t/makie-isosurface-colored-by-values-from-another-array/105318 "2023-10-25T10:59:00Z")

</div>

I have two 3D arrays. I would like to make an isosurface from the first one and color it using the values of the second array. As far as I understand, a possible solution would be to construct a mesh for the isosurface (…

---

## [ExtraVariablesSystemException when using structural\_simplify in Modelingtoolkit](https://discourse.julialang.org/t/extravariablessystemexception-when-using-structural-simplify-in-modelingtoolkit/105351)

<div class="topic-metadata">

**Author:** [@aoifehealy](https://discourse.julialang.org/u/aoifehealy)\
**Replies:** 2\
**Last updated:** [October 25, 2023, 10:50am UTC](https://discourse.julialang.org/t/extravariablessystemexception-when-using-structural-simplify-in-modelingtoolkit/105351 "2023-10-25T10:50:42Z")

</div>

Hi there, I’m new to julia (and Modelingtoolkit), and am trying to replicate a simple 2 element Windkessel model (capacitor and resistor in parallel). my code is as follows: using ModelingToolkit using Plots using Diffe…

---

## [Variant of an "elseif" loop with binary values](https://discourse.julialang.org/t/variant-of-an-elseif-loop-with-binary-values/105348)

<div class="topic-metadata">

**Author:** [@Fabian1](https://discourse.julialang.org/u/Fabian1)\
**Replies:** 3\
**Last updated:** [October 25, 2023, 6:53am UTC](https://discourse.julialang.org/t/variant-of-an-elseif-loop-with-binary-values/105348 "2023-10-25T06:53:19Z")

</div>

Hi ! I’m looking for another possibility to implement my elseif loop for my linear program. The goal is to implement the following: if q\_out \>= 9 eff == 0.75 elseif 7 \<= q\_out \< 9 eff == 1 else eff == 0.5 …

---

## [User defined function inside JuMP Objective resulting in MethodError](https://discourse.julialang.org/t/user-defined-function-inside-jump-objective-resulting-in-methoderror/105332)

<div class="topic-metadata">

**Author:** [@philds](https://discourse.julialang.org/u/philds)\
**Replies:** 6\
**Last updated:** [October 25, 2023, 1:32am UTC](https://discourse.julialang.org/t/user-defined-function-inside-jump-objective-resulting-in-methoderror/105332 "2023-10-25T01:32:25Z")

</div>

Hi there, I’m trying to formulate an optimization model that maximizes profit while dealing with the transportation of raw supplies and production of goods. The profit calculation is lengthy and depends upon both decisi…

---

## [JuMP whit PATHSolver](https://discourse.julialang.org/t/jump-whit-pathsolver/105347)

<div class="topic-metadata">

**Author:** [@sjhon](https://discourse.julialang.org/u/sjhon)\
**Replies:** 1\
**Last updated:** [October 24, 2023, 8:59pm UTC](https://discourse.julialang.org/t/jump-whit-pathsolver/105347 "2023-10-24T20:59:01Z")

</div>

I am trying to define this variable T: using JuMP import PATHSolver @variable(modelo, 0 \<= T\[ω = 1:5\] \<= (ω-1)\*0.25, start = 1) Defined with this restriction: @constraint(modelo, \[ω = 1:5\], (c\[ω\]\*(1-α)-s)Y\[ω\] -(BQ\[ω…

---

## [QuadGK returns NaNs](https://discourse.julialang.org/t/quadgk-returns-nans/105308)

<div class="topic-metadata">

**Author:** [@aner-sanchez](https://discourse.julialang.org/u/aner-sanchez)\
**Replies:** 4\
**Last updated:** [October 24, 2023, 1:24pm UTC](https://discourse.julialang.org/t/quadgk-returns-nans/105308 "2023-10-24T13:24:46Z")

</div>

Hello everyone :slight\_smile: Would someone know why using QuadGK n = 538 \_, w, \_ = kronrod(n,1e-11,40); @show w returns a vector of NaN weights at n=538 and not before?

---

## [Change value of parameter and u0 after init ODEProblem DifferentialEquations.jl](https://discourse.julialang.org/t/change-value-of-parameter-and-u0-after-init-odeproblem-differentialequations-jl/105120)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 8\
**Last updated:** [October 24, 2023, 1:01pm UTC](https://discourse.julialang.org/t/change-value-of-parameter-and-u0-after-init-odeproblem-differentialequations-jl/105120 "2023-10-24T13:01:14Z")

</div>

Hello! How can I change the parameter value and initial conditions after initialization ODEProblem? I tried to change u0 using prob.u0 = newu0 But I got a warning Warning: Mutation of ODEProblem detected. SciMLBase v…

---

## [Resize plot with PlotlyJS](https://discourse.julialang.org/t/resize-plot-with-plotlyjs/105346)

<div class="topic-metadata">

**Author:** [@Alseidon](https://discourse.julialang.org/u/Alseidon)\
**Replies:** 0\
**Last updated:** [October 24, 2023, 12:35pm UTC](https://discourse.julialang.org/t/resize-plot-with-plotlyjs/105346 "2023-10-24T12:35:26Z")

</div>

I usually work with the default GR backend in Plots.jl, but I needed interactivity for some 3D plots. The issue is, the default window size is too small, but if I rescale the window the plot stays the same size. Is there…

---

## [Makie: Put text at arbitrary position outside the frame](https://discourse.julialang.org/t/makie-put-text-at-arbitrary-position-outside-the-frame/105322)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 4\
**Last updated:** [October 24, 2023, 9:44am UTC](https://discourse.julialang.org/t/makie-put-text-at-arbitrary-position-outside-the-frame/105322 "2023-10-24T09:44:54Z")

</div>

From a past thread (see below), I learned how to put arbitrary text outside the frame. But, am I right that it’s impossible or extremely tedious to put text at an arbitrary position? I’ve plotted the following figure, w…

---

## [AoG "range step cannot be zero"](https://discourse.julialang.org/t/aog-range-step-cannot-be-zero/87624)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 14\
**Last updated:** [October 24, 2023, 9:27am UTC](https://discourse.julialang.org/t/aog-range-step-cannot-be-zero/87624 "2023-10-24T09:27:13Z")

</div>

I don’t have an MWE but maybe someone has a guess what this means? ERROR: ArgumentError: range step cannot be zero Stacktrace: \[1\] (::Colon)(start::Float32, step::Float32, stop::Float32) @ Base ./twiceprecision.jl…

---

## [\`MLJ.Stack\` performance issues](https://discourse.julialang.org/t/mlj-stack-performance-issues/105085)

<div class="topic-metadata">

**Author:** [@ParadaCarleton](https://discourse.julialang.org/u/ParadaCarleton)\
**Replies:** 4\
**Last updated:** [October 23, 2023, 9:48pm UTC](https://discourse.julialang.org/t/mlj-stack-performance-issues/105085 "2023-10-23T21:48:45Z")

</div>

I’m trying to use a stacked model to predict an outcome, but I’m having an unusual performance issue. I’m not sure whether the problems are related to my own code having a mistake somewhere, or if it’s just to be expecte…

---

## [Symbols and variables](https://discourse.julialang.org/t/symbols-and-variables/105306)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 6\
**Last updated:** [October 23, 2023, 6:03pm UTC](https://discourse.julialang.org/t/symbols-and-variables/105306 "2023-10-23T18:03:35Z")

</div>

The following code fails: using ModelingToolkit @variables t @syms ω(t) Pgc(t) @variables R a b ρ U J A s struct Equilibrium a\_bar b\_bar pg\_bar # generator power ω\_bar # rotor speed end mutable…

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

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