Skip to content
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

"Hello, I encountered an error while attempting to compile in a Windows environment using Visual Studio Code. What could be the cause of this error?" #33

Open
banzhiqing opened this issue Nov 19, 2023 · 8 comments

Comments

@banzhiqing
Copy link

"Hello, I encountered an error while attempting to compile in a Windows environment using Visual Studio Code. What could be the cause of this error?"
makefile:109: .depend: No such file or directory
make: *** [makefile:146: .depend] Error 255

@gducrozet
Copy link
Member

Hello @banzhiqing
I am not familiar with the compilation using Visual Studio Code. It seems that it tries to use the makefile provided with the code but from what I remember, Visual Studio should generate its own kind of makefile to have the file dependencies, etc.

Sorry for not being helpful in this respect

@YoungmChoi
Copy link

Hello @banzhiqing and @gducrozet

I checked the compilation in Windows with Intel OneAPI package, and found that the dependencies of each modules are mixed, therefore it is not easy to solve the problem for now. To compile the project in Windows, the code structure (module subroutines associated with reading/writing data and parameters) should be arranged a little bit.

I recommend you to rearrange code to compile the project in Windows.

Best regards,
Young-Myung

@banzhiqing
Copy link
Author

Hello @gducrozet and @YoungmChoi
Thank you very much for your answers, I also found it difficult to compile it in windows, I am now compiling with Linux.
Best regards,

@banzhiqing
Copy link
Author

Hello @banzhiqing I am not familiar with the compilation using Visual Studio Code. It seems that it tries to use the makefile provided with the code but from what I remember, Visual Studio should generate its own kind of makefile to have the file dependencies, etc.

Sorry for not being helpful in this respect

Hello @gducrozet,

I hope this message finds you well. I am currently engaged in studying your insightful paper titled "Nonlinear deterministic sea wave prediction using instantaneous velocity profiles." I apologize for any inconvenience my inquiry may cause amidst your busy schedule, but I have encountered some questions in your work that I hope to gain clarity on.

I am particularly interested in understanding whether the left-hand side of equation (10) in your paper corresponds to the 'dpos1stdt' in the SUBROUTINE pos_1st of the hos-nwt model. My interpretation is based on the assumption that, in settings where the wave board is adjusted for first-order nonlinearity, the velocity term U(x=x0,z,t) on the right side of equation (10) is utilized as a replacement for the original 'dpos1stdt'. This understanding has been further informed by another notable paper, "A fully-spectral 3D time-domain model for second-order simulation of wavetank experiments. Part A: Formulation, implementation, and numerical properties," particularly equations (12) and (13).

In light of this, I have observed an interesting pattern in the output of 'dpos1stdt' during the computation process, where some values repeat three times and others twice. Could you provide some insights into why this might be occurring? Additionally, I am curious about how one should effectively address the boundary conditions as outlined in equation (10) under these observations. For your reference, I have attached the relevant formulas and the output results of 'dpos1stdt'.

I greatly appreciate your time and consideration, and I look forward to your esteemed guidance.

Warm regards,
Ban Zhiqing

Formula10 Formula12_13 the result of dpos1stdt

@gducrozet
Copy link
Member

Hello @banzhiqing

dpos1stdt corresponds to the time derivative of the 1st order wavemaker motion, i.e. first equality in Eq. (13). Then, this indeed corresponds to the horizontal velocity induced by the wavemaker motion (what you refere as U(x=x0,z,t).

Then, regarding the output you provide, it is not clear what the index corresponds to since this is a variable dependent on z and t. What I suppose is that you have 33 nodes in the z direction (indexes 1 to 33 consequently corresponds to U(z,t=0) and the following indexes 34 to 66 corresponds to U(z,t=dt) and so on). Then, I do not really get what is your issue with repeated values.

Best,
G.

@banzhiqing
Copy link
Author

Hello @gducrozet,

I am profoundly grateful for your meticulous and detailed response, which has significantly clarified my doubts. I apologize for my earlier incomplete description regarding the output format of pos_1st, as illustrated in Figure 1, where n3=33 and n2=1. Upon closely examining the code, I discovered that the output results depicted in Figure 2, specifically the repeated values of dpos1stdt, are likely due to the sub-time steps calculated by the variable-step length Runge-Kutta method. Here, the sub-time step length is defined as time = t_o + h_loc*RK_c(jloop), with the 'slopes' RK_c(jloop) in RKF45 set to 0, 0.5, 0.5, 1, 1. May I kindly ask for your confirmation on whether my understanding in this regard is accurate?

Furthermore, this insight leads me to another query. Based on my understanding of the variable-step length Runge-Kutta algorithm, it necessitates that dpos1stdt be continuous with respect to time t during the computation of sub-time steps (time = t_o + h_loc*RK_c(jloop)). This continuity is presumed, as shown in Figure 1, because the overall program's time step, h_rk, is determined by principles such as CFL. Consequently, the current time step time_cur = time_cur + h_loc (where h_loc is approximately equivalent to h_rk), making time quite flexible in the variable-step length Runge-Kutta calculations. Therefore, as demonstrated in Figure 1, dpos1stdt needs to be continuously updated with respect to time.

Building upon this understanding, I have a question regarding your exemplary paper, "Experimental assessment of a nonlinear, deterministic sea wave prediction method using instantaneous velocity profiles," particularly as outlined in Equation (2). You developed an algorithm utilizing two ADCPs to acquire the reconstructed horizontal velocity Urec(x0,z0,t). My query pertains to the practical application of this method, considering ADCPs typically have a fixed sampling rate (e.g., 50Hz), which implies that Urec(x0,z0,t) is discrete with respect to time t. How do you effectively use the discrete Urec(x0,z0,t) in place of dpos_1stdt? Is there a process of interpolation or fitting applied to time t within Urec(x0,z0,t) to achieve this?

I am immensely grateful for your time and effort in addressing my queries. Your insights are not only invaluable to my current research but also inspire continued learning and exploration in this field. I eagerly await your response and further guidance.

Best regards,
Ban Zhiqing

Figure1 Figure2 Formula(2)

@gducrozet
Copy link
Member

Hello,

  1. Yes, if you write inside the routine you will get outputs at each call of the function and consequently at each sub time step.
  2. the position is indeed updated at each sub time step and consequently it is 'continuous'
  3. to use an 'external' velocity profile U(x0,z,t) with specific time-stepping, you can simply do an interpolation in time, replacing the call to this function. If the time-steps of your velocity profiles is at 50 Hz, linear time interpolation will be sufficient.

@banzhiqing
Copy link
Author

Hello @gducrozet,

Thank you very much for your response, I now understand the concept clearly.

Best regards,
Ban Zhiqing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants