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

付属の Turing.f90 がどんな偏微分方程式を解いているかわからない #2

Open
mino2357 opened this issue Nov 14, 2023 · 1 comment

Comments

@mino2357
Copy link
Owner

https://github.com/ElmerCSC/elmerfem/blob/devel/fem/examples/turing/Turing.f90

      ! Finally, the elemental matrix & vector:
      !----------------------------------------
     DO p=1,nd
       DO q=1,nd
         i = 2*(p-1)+1
         j = 2*(q-1)+1
         M =>  MASS(i:i+1, j:j+1)
         A => STIFF(i:i+1, j:j+1)

         Base = s * Basis(q) * Basis(p)
         Grad = s * SUM( dBasisdx(q,:) * dBasisdx(p,:) )

         M(1,1) = M(1,1) + Base
         M(2,2) = M(2,2) + Base
         A(1,1) = A(1,1) + du*Grad + nu*((vprev+C)*vprev-1)    * Base
         A(1,2) = A(1,2) + nu*((3*vprev+C)*uprev-alpha) * Base
         A(2,1) = A(2,1) - nu*((vprev+C)*vprev+gamma) * Base
         A(2,2) = A(2,2) + dv*Grad - nu*((3*vprev+C)*uprev+beta) * Base
       END DO
       i = 2*(p-1)+1
       F => FORCE(i:i+1)
       F(1) = F(1) + s * nu*(3*vprev+C)*uprev*vprev * Basis(p)
       F(2) = F(2) - s * nu*(3*vprev+C)*uprev*vprev * Basis(p)
     END DO
    END DO
@mino2357
Copy link
Owner Author

フォーラムで議論されているが詳細まで議論されていない。

https://www.elmerfem.org/forum/viewtopic.php?t=3754&sid=5e78e41c656bbbea7804ff5e04ff4db9

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

1 participant