Closed damar-wicaksono closed 2 weeks ago
Currently, there is no section in the documentation regarding the contribution guidelines. As this is one of the review criteria, I would ask the authors to consider adding them following the common best-practices. Per the reviewer guideline, it should include:
Thank you very much for the useful comments and suggestions. Here are listed the response and the changes made to the docs, refer to #15.
For the landing page, it always brings to the intro page, instead of the index to directly connect the user to the main contents of the docs.
A new page related to theorical aspects of ROM/DDROM techniques has been added.
Minor fixes to the text have been provided as suggested.
Minor fixes to the text have been provided as suggested.
This section has been revised following the suggestion in #10, being it very similar to the paper description of the figure.
Other minor fixes to the text have been provided as suggested.
A new section has been added, presenting the package structure: how the classes are connected.
As reported in issue #9, the versions of the different python packages are the one required by dolfinx v0.6.0: the least recent version used have been listed in pyforce/requirements.txt; moreover, the pyforce/environment.yml has been modified listing the only necessary version for dolfinx and setuptools.
The community guidelines have been added in the README.md file.
"in the tutorials, alternatevely the data can be download from Zenodo.": typo "alternatevely": fixed.
In the tutorial, the authors repeatedly use the idiom "at first" which may be inappropriate as it is used more in the context of contrasting something later on ("at first it's A, but in the end it's B"). They appear numerous times, so please double check them.: double checked in each tutorial.
This section includes also some comments reported in issue #9.
trame
, ipywidgets
, openpyxl
and trame-vtk
are actually required to execute the tutorial, but are not necessary for pyforce
, they are used to to produce contour plots and import benchmark data.
pv.start_xvfb()
is necessary when using noteboks on ssh connection
trame
and trame-vuetify
, I tried on my MacOS 15.0 and no issue arises. See here for the updated section on optional packages for tutorial.dolfinx
, the others comes are a consequence of this.
environment.yml
and the requirements.txt
files have been updated to leave as constraint only the dolfinx version.I find that the tutorials are a bit cluttered with complicated plotting routines and they often get in the way of presenting the (expected) results. One straightforward way to declutter the tutorials is by extracting these routines into local modules that are only relevant for the tutorials. Alternatively, if some of the plotting routines are general in nature, they can be implemented as a high-level plotting functions directly in the code base (but only if they are general).
Following this comment, the code to generate the contour plots using pyvista
has been moved in a separate file called contour_plotting.py
in the tutorial folder, composed by different functions; on the other hand, for simpler plots using matplotlib
, the code has been left in the tutorial files (making it a bit more essential).
Moreover, a generic function plot_function
has been added to pyforce.tools.plotting
to simplify the plotting of the results for a single snapshot: this function serves as template for more complex plots regarding the comparison with DDROM and FOM.
I think this page should include explicitly the purpose of this tutorial, what is the expected outcome of carrying out this exercise. Currently it contains only the description: thank you very much for the comment, a paragraph Aim of this tutorial has been added to this page and in each notebook.
ns.py
provided by the authors (I may guess that it's to solve NS equation but because it's coming in a single file it should be explained): a brief description has been added.ns.py
file, comment added.ns.py
to avoid the repetition of the mesh generation.The code has been splitted and the in-code comments removed.
Why u in var_names is different from U in stored_var_names?: it was due to a bad saving, the Zenodo snapshots have been updated to accomodate this issue.
I might have done something wrong, but if I used the snapshots stored in Zenodo I obtained the following exception for this tutorial: I have found the same bug, the issue may be related to the different operating system. A disclaimer and some additional comments have been added to the notebook, addressing this bug, when creating the mesh.
var_names
.OfflinePhase
.contour_plotting.py
and imported with the function plot_modes
. More comments about the plots have been added.pv.start_xvfb()
is required when executing the code on a remote server. I have removed it to avoid confusion.ns.py
to avoid the repetition of the mesh generation.The matplotlib plots have been moved to the helper functions within the cells.
Thank you again for the comments. In the same development branch I plan to revise the other tutorials, trying to be consistent with the comments provided to tutorial 01.
Hi!
Thank you very much for going through my comments and made the necessary and applicable revisions.
I went through the revised documentation and confirmed that most major points I raised above have been resolved. I really appreciate the addition of the new section on the "Theory and package structure" and with the extra figures, it provides a helpful bridge between the theory of DDROM and how things are implemented in pyforce along with its convention (adopted terms, etc.). Having this new section and the revisions made, I find following the tutorial again becomes easier and feels more consistent.
I would raise a couple of additional minor points that you might want to double check:
\autoref{fig:darom}
is not resolved.ns.py
file within the drag_lift
class..._": Still drag_lift
although in the code it's already DragLift
.POD
class...": It sounds rather awkward to me different than the rest of the tutorial... maybe "Below we use offline POD class..." or something like that.verbose
can be actived to either show or not the progress bar.`: "activated" instead of "actived".verbose
.compute_modes
(in the text) or compute_basis
(in the codes).normalize
(in the textor
normalise` (in the codes).Thank you very much!
The documentation has been reviewed following your comments in #16. Here's the response letter.
Fixed the minor issues.
Fixed the minor issues. Only $\psi$ is now used to indicate the basis functions for consistency.
Fixed the minor issues.
Fixed the minor issue.
Fixed the minor issue.
Please make sure that the other two tutorials are consistent with the revisions.: updates are expected to be pushed in the coming days.
Hello, Tutorials 2 and 3 have been updated in #17, following the suggestions for Tutorial 1.
Hi @Steriva,
I went through the latest changes and can confirm that the updated tutorials are consistent with the previous comments. Thank you!
Out of curiosity, what's the relation between pyforce and ROM4FOAM (I see there are many similar implemented methods albeit in a different programming language)?
Hi @damar-wicaksono, thank you for all the valuable comments and feedbacks about the package :)
ROM4FOAM was the "original" code, developed during my master's thesis and before by other colleagues. It was not easy to implement everything in C++ (OpenFOAM-like) and make it able to communicate with ML libraries available for Python. Then, we switched to a Python version able to read OpenFOAM cases and interact with scikit-learn or torch. Nowadays, we use pyforce most of the time for our works.
Understood and thank you for the explanation!
I consider this issue resolved.
This issue is related to the JOSS submission review.
I'm currently reviewing the documentation and below are some remarks, questions, and suggestions that the authors may want to consider regarding the documentation (and testing); please let me know if clarifications are needed. What listed below are partial as I haven't gone through to the whole documentation. I will put additional remarks/suggestions if/when they are needed.
Landing page
intro.md
insideindex.rst
(i.e., description and how to cite); the table of contents may appear here. The introduction section may then contain the description on what is ROM? and the Data-Driven ROM techniques.PS: Clicking the
docs
badge in the GitHub repository actually brings us to the intro page anyway and notindex.html
.Welcome to pyforce's documentation
Description
What is actually "ROSE", is it a project? a software framework? or something else? Perhaps there is a link to the project site?
How to cite pyforce
What is ROM
Reduced Basis Methods
Data-Driven ROM techniques
Installation notes
yaml
file used to set up a conda environment just like the instruction in the README.Tutorials
The tutorials are provided in great detail and appreciated. I would propose to pick one of the tutorials to serve as a "Getting Started" part of the documentation that serves as an entry point in using the package. This "Getting Started" would provide more details regarding the features of the package gradually with enough detail. I assume the DFG2 benchmark may serve as that entry point and my remarks below reflect that.
Unsteady Laminar Navier Stokes - DFG2 benchmark — pyforce 0.1.0 documentation
Generation of Snapshots
Assembling variational forms
ns.py
provided by the authors (I may guess that it's to solve NS equation but because it's coming in a single file it should be explained).*
to import everything fromns
as it obscures what functions coming from which package/module.time_adv = 'BDF2'
but the series of plots below show the results of the three methods.Setting up the tools to compute drag and lift coefficient:
UFL
to create the relevant integrals...": What is "UFL" in this context? I assume it's a Fenics-related term so a link would be useful.params['rhoLU2'] = 0.1
?drag_lift()
is coming fromns.py
(which upon inspection is actually a class not a function; In Python, the standard practice is to name a class with a camel case instead of with underscores). It needs to be explained briefly what is this class doing as well as the important parameters for construction.Solving the time-dependent problem
store_snap = False
which must beTrue
if the users want to follow this tutorial and move on to the next steps (offline phase)Snapshots/
./../BenchmarkData/
./../BenchmarkData/LaminarNS_DFG2/
Comparison with benchmark data:
# time_adv_schemes = ['BDF2', 'CN', 'EI']
is commented out but the plot actually shows the results from the three methods.fig.savefig('./../BenchmarkData/LaminarNS_DFG2/FOM_bench_comparison.pdf', format='pdf', dpi=300, bbox_inches='tight')
Offline Phase
gmsh
module?domain
is needed in the subsequent codes, but would it be possible to hide the repetition of this process so the users can just pickup from where before?Importing Snapshots:
u
invar_names
is different fromU
instored_var_names
?The snapshots I generated locally work just fine, though.
POD algorithm:
POD()
; explain it's interface especially the important inputs and expected outcome output as it is currently used here. Establish a bridge between the "theoretical" ROM and the specific constructs provided by pyforce to carry out the tasks.Definition of the modes:
compute_basis
actually do, which important inputs it takes and what outcome is expected once executed. Explain why particular arguments are used, i.e., why the particularNmax
or whynormalise=True
?path+'/BasisFunctions'
andpath+'/BasisFunctions/basisPOD_
; and why they might be important to be able to follow the tutorialComputing the training error:
of an instance of
POD` including expected inputs and expected output.Generation of the maps:
Post Process: plotting the POD modes:
plotModes()
to understand what is going on.pv.start_xvfb()
everything seems to be fine after installing additional packages:pip install trame ipywidgets
(are these listed in the dependencies?)Online Phase: POD-I
gmsh
module?domain
is needed in the subsequent codes, but would it be possible to hide the repetition of this process so the users can just pickup from where before?Importing Snapshots and offline results:
Test error:
Nmax
is now25
instead of30
, is there any reason for that?POD_project
and its role within pyforce, how can it be constructed and what the instances can do; briefly explain the corresponding methodsynt_test_error()
(these are package features that should be highlighted)PODI
synt_test_error
is?Consider the following:
Without looking deep into the documentation, for an introductory tutorial it should be explained what are the contents of
test_errors[key][field_i]
, what does the index2
signify, and what does the key"CoeffEstimation"
mean?Post Process
Nmax
changes again herepv.start_xvfb()
(is this an important line?)path='./Online_results/'
make_video = False
and what would happen if it'sTrue
; it may be obvious, but it's better be explicit (e.g., "To create a video of...change the flag below toTrue
")There might be more comments to follow once I go through the whole documentation