-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hide the boundary points #361
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto. |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -530,7 +530,8 @@ def build_grid_figure(self): | |
|
||
:return: FigureCanvas | ||
""" | ||
x = self.st.svr.coord[::2] | ||
pt_mid = np.linspace(2,len(self.st.svr.coord) - 3,num=((len(self.st.svr.coord) - 3) // 2),dtype=int) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code appears many times, would you like to optimize it ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I think I can do it. |
||
x = self.st.svr.coord[pt_mid] | ||
fig = Figure() | ||
canvas = FigureCanvas(fig) | ||
ax = canvas.figure.subplots(3, 2) | ||
|
@@ -574,7 +575,8 @@ def build_single_figure(self): | |
|
||
:return: FigureCanvas | ||
""" | ||
x = self.st.svr.coord[::2] | ||
pt_mid = np.linspace(2,len(self.st.svr.coord) - 3,num=((len(self.st.svr.coord) - 3) // 2),dtype=int) | ||
x = self.st.svr.coord[pt_mid] | ||
fig = Figure() | ||
canvas = FigureCanvas(fig) | ||
ax = canvas.figure.subplots() | ||
|
@@ -739,25 +741,26 @@ def update_lines(self): | |
|
||
:return: None | ||
""" | ||
pt_mid = np.linspace(2,len(self.st.svr.coord) - 3,num=((len(self.st.svr.coord) - 3) // 2),dtype=int) | ||
if self.use_grid_layout: | ||
self.density.update(adata=self.st.density_field, | ||
ndata=self.st.svr.density[::2]) | ||
ndata=self.st.svr.density[pt_mid]) | ||
self.pressure.update(adata=self.st.pressure_field, | ||
ndata=self.st.svr.pressure[::2]) | ||
ndata=self.st.svr.pressure[pt_mid]) | ||
self.velocity.update(adata=self.st.velocity_field, | ||
ndata=self.st.svr.velocity[::2]) | ||
ndata=self.st.svr.velocity[pt_mid]) | ||
self.temperature.update(adata=self.st.temperature_field, | ||
ndata=self.st.svr.temperature[::2]) | ||
ndata=self.st.svr.temperature[pt_mid]) | ||
self.internal_energy.update(adata=(self.st.internal_energy_field), | ||
ndata=(self.st.svr. | ||
internal_energy[::2])) | ||
internal_energy[pt_mid])) | ||
self.entropy.update(adata=self.st.entropy_field, | ||
ndata=self.st.svr.entropy[::2]) | ||
ndata=self.st.svr.entropy[pt_mid]) | ||
else: | ||
for name, is_selected, *_ in self.plot_config.state: | ||
if is_selected: | ||
eval(f'(self.{name}.update(adata=self.st.{name}_field,' | ||
f' ndata=self.st.svr.{name}[::2]))') | ||
f' ndata=self.st.svr.{name}[pt_mid]))') | ||
|
||
|
||
class PlotArea(PuiInQt): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this binary file, we should not include unrelated file in a PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I will remove them.