Skip to content

Combining PINN with FVM #861

Answered by forxltk
chang-change asked this question in Q&A
Aug 23, 2022 · 2 comments · 29 replies
Discussion options

You must be logged in to vote

I can tell you this idea, however, the code should be done by yourself.

  • In sample_func, x_points should be (n, num) that represents n sample points with num neighbors.
  • Flatten x_points so it will be (x1_1, x1_2, ...x1_num, x2_1, ..., xn_num), and the shape is (n*num, 1).
  • Concatenate x_points and y_points as x_y. x_y should be (n*num, 2)
  • The output of my_model is (n*num, 1). Reorganize the output with shape (n, num)
  • Compute the mean of your interest dimension. The result should be (n, 1) as other tensors in final_output

Replies: 2 comments 29 replies

Comment options

You must be logged in to vote
22 replies
@chang-change
Comment options

@forxltk
Comment options

@chang-change
Comment options

@forxltk
Comment options

@chang-change
Comment options

Comment options

You must be logged in to vote
7 replies
@forxltk
Comment options

@chang-change
Comment options

@forxltk
Comment options

@chang-change
Comment options

@forxltk
Comment options

Answer selected by chang-change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants