Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
icc1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cristian Weiland
icc1
Commits
df3202ef
Commit
df3202ef
authored
9 years ago
by
Cristian Weiland
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' of gitlab.c3sl.ufpr.br:cw14/icc1 into develop
Conflicts: pdeSolver.c
parents
a6264df2
15c53abb
No related branches found
No related tags found
1 merge request
!1
Develop
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pdeSolver.c
+45
-1
45 additions, 1 deletion
pdeSolver.c
with
45 additions
and
1 deletion
pdeSolver.c
+
45
−
1
View file @
df3202ef
...
...
@@ -261,3 +261,47 @@ int main(int argc, char *argv[]) {
return
0
;
}
/*
u(i,j) = f(x,y) + (u(i+1,j) + u(i-1,j))/Δx² + (u(i,j+1) + u(i,j-1))/Δy² + (-u(i+1,j)+u(i-1,j))/2Δx + (-u(i,j+1)+u(i,j-1))/2Δy
--------------------------------------------------------------------------------------------------------------------
2/Δx² + 2/Δy² + 4π²
Formato:
Ax = B
A [a11 a12 a13] * X [x1] = B [b1] -> a11*x1 + a12*x2 + a13*x3 = b1 -> x1 = (b1 - a12*x2 - a13*x3)/a11
[a21 a22 a23] [x2] [b2] -> a11*x1 + a12*x2 + a13*x3 = b2 -> x2 = (b2 - a11*x1 - a13*x3)/a12
[a31 a32 a33] [x3] [b3] -> a11*x1 + a12*x2 + a13*x3 = b3 -> x3 = (b3 - a11*x1 - a12*x2)/a13
se x1 = u(1,1), sei calcular x1 da forma double u(int i, int j) {}
Mesmo vale pra x2 e x3. E valeria pra x4, x5, x6, etc.
Se u for uma matriz de 6 elementos. Ou seja, Hx = 0.25 e Hy = 0.3
u u u u
u x5 x6 u
u x3 x4 u
u x1 x2 u
u u u u
5 linhas, 4 colunas.
Ny = 3, Nx = 2.
x1 = u11
x2 = u12
x3 = u13
x4 = u21
x5 = u22
x6 = u23
Matriz A, olhando pela equação u(i,j) obtida, seria algo assim:
A = [1 ]
[ 1 ]
[ 1 ]
[ 1 ]
[ 1]
*/
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment