Comments (3)
In the latest version of the restart example, I fixed the order for imports. If you check that it imports utils first. I also run the example again and it is working fine.
from sopht.
Hi @ilianasiriziba .
You are right. At the moment most case files should be working. However, a simple way to recreate the issue is to have a new file with the following lines
import sopht.simulator as sps
import sopht.utils as spu
This will cause a circular import error because spu
is imported within some sps
files, while restart_sim also imports some of the sps
objects.
I think a easy fix is to remove all references to flow simulator related types (or anything related to sps
for that matter) within restart_sim.py
, and return the current time from the function
def restart_simulation(
# No flow_sim here
...
):
...
curr_time = io.load(...)
...
return curr_time
then in case files (restart_example.py
, for example) correct the flow simulator time
time = restart_simulation(...)
flow_sim.time = time
This avoid import sps
members inside an spu
file. @ilianasiriziba do you want to try this an confirm if it works?
from sopht.
Hi @sy-cui
Sure, I'll try this and let you know.
from sopht.
Related Issues (20)
- Adding gif to README HOT 2
- Option for capped rod surface forcing grid
- Installing SOPHT for M1 Macs
- ValueError not informative
- Redundant psutils dependency
- Restart functionality
- Update examples for removing internal nu from all SophT examples HOT 2
- Create a callback method for SophT
- Virtual boundary method for scalar fields
- Update Poetry file for PyElastica version 0.3.1
- Alternative methods for computing the immersed boundary forces to circumvent uses of stiffness and damping constants
- Redundant 'enable_eul_grid_forcing_reset' flag in virtual boundary forcing
- Variable flow density option for Sopht
- Variable start positions for flow domain in SophT HOT 3
- Abstraction for plotting functionality
- Elastica++ Interface
- install SophT on windows
- any userguid for use
- if there are userguid 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 sopht.