Comments (4)
Hi @SA8416 , let me investigate it and come back to you. Converting M to a dense matrix is not a memory-efficient fix. I will come back with a better solution.
from jfvm.jl.
I cannot reproduce this error with the master branch of JFVM and julia 1.8
using JFVM #, JFVMvis
function diff()
Nx = 10
Lx = 1.0
m = createMesh1D(Nx, Lx)
BC = createBC(m)
BC.left.a[:].=BC.right.a[:].=0.0
BC.left.b[:].=BC.right.b[:].=1.0
BC.left.c[:].=1.0
BC.right.c[:].=0.0
c_init = 0.0 # initial value of the variable
c_old = createCellVariable(m, 0.0, BC)
D_val = 1.0 # value of the diffusion coefficient
D_cell = createCellVariable(m, D_val) # assigned to cells
# Harmonic average
D_face = harmonicMean(D_cell)
N_steps = 20 # number of time steps
dt= sqrt(Lx^2/D_val)/N_steps # time step
M_diff = diffusionTerm(D_face) # matrix of coefficient for diffusion term
(M_bc, RHS_bc)=boundaryConditionTerm(BC) # matrix of coefficient and RHS for the BC
for i =1:5
(M_t, RHS_t)=transientTerm(c_old, dt, 1.0)
M=M_t-M_diff+M_bc # add all the [sparse] matrices of coefficient
RHS=RHS_bc+RHS_t # add all the RHS's together
c_old = solveLinearPDE(m, M, RHS) # solve the PDE
end
return c_old
#visualizeCells(c_old)
end
diff()
from jfvm.jl.
Strange, even after re-installing julia the error seems to persist- I have found a more memory-efficient workaround by using the LinearSolve.jl package instead of the julia "" solver.
from jfvm.jl.
a more memory-efficient workaround by using the LinearSolve.jl package
Very good idea. Let me know if it is faster too. I saw a talk about this package and it is nice to use it instead of the default Julia backslash solver.
from jfvm.jl.
Related Issues (11)
- Problem with 32 bit processors
- Could please help to solve this problem? HOT 1
- Julia wrapper for SU2 (The Open-Source CFD Code) (Stanford University Unstructured) HOT 1
- Support for 3D spherical coordinate HOT 3
- A bug in source terms
- Run femtocleaner HOT 2
- Info about upcoming removal of packages in the General registry
- Cylindrical1D version of Nonlinear PDE example HOT 4
- Will it be updated to fit Julia v1.5 ? HOT 2
- "full" not defined in reshapeCell and reshapeInternalCell HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jfvm.jl.