Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
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
SWIFT
SWIFTsim
Commits
2295bc3a
Commit
2295bc3a
authored
2 months ago
by
nickishch
Browse files
Options
Downloads
Patches
Plain Diff
changed back to OW=1 and fixed density mult
parent
a53c29bf
Branches
nickishch/MHD_canvas/RMAR_symmetric
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/mhd/DirectInduction/mhd.h
+1
-1
1 addition, 1 deletion
src/mhd/DirectInduction/mhd.h
src/mhd/DirectInduction/mhd_iact.h
+5
-5
5 additions, 5 deletions
src/mhd/DirectInduction/mhd_iact.h
with
6 additions
and
6 deletions
src/mhd/DirectInduction/mhd.h
+
1
−
1
View file @
2295bc3a
...
...
@@ -348,7 +348,7 @@ __attribute__((always_inline)) INLINE static void mhd_end_gradient(
B
[
2
]
=
p
->
mhd_data
.
B_over_rho
[
2
]
*
rho
;
float
OW
;
OW
=
2
.
0
f
;
OW
=
1
.
0
f
;
float
absB
;
absB
=
sqrtf
(
B
[
0
]
*
B
[
0
]
+
B
[
1
]
*
B
[
1
]
+
B
[
2
]
*
B
[
2
]);
...
...
This diff is collapsed.
Click to expand it.
src/mhd/DirectInduction/mhd_iact.h
+
5
−
5
View file @
2295bc3a
...
...
@@ -160,7 +160,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_mhd_gradient(
/* Calculate OWAR */
float
OW
;
OW
=
2
.
0
f
;
OW
=
1
.
0
f
;
float
absBi
;
absBi
=
sqrtf
(
Bi
[
0
]
*
Bi
[
0
]
+
Bi
[
1
]
*
Bi
[
1
]
+
Bi
[
2
]
*
Bi
[
2
]);
...
...
@@ -309,7 +309,7 @@ runner_iact_nonsym_mhd_gradient(const float r2, const float dx[3],
/* Calculate OWAR */
float
OW
;
OW
=
2
.
0
f
;
OW
=
1
.
0
f
;
float
absBj
;
absBj
=
sqrtf
(
Bj
[
0
]
*
Bj
[
0
]
+
Bj
[
1
]
*
Bj
[
1
]
+
Bj
[
2
]
*
Bj
[
2
]);
...
...
@@ -662,8 +662,8 @@ __attribute__((always_inline)) INLINE static void runner_iact_mhd_force(
const
float
dvr
=
-
(
dv
[
0
]
*
dx
[
0
]
+
dv
[
1
]
*
dx
[
1
]
+
dv
[
2
]
*
dx
[
2
]);
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
dB_dt_adv_i
[
i
]
=
-
over_rho2_i
*
(
Bj
[
i
]
/
over_rho2_j
+
Bi
[
i
]
/
over_rho2_i
)
*
dvr
;
dB_dt_adv_j
[
i
]
=
-
over_rho2_j
*
(
Bi
[
i
]
/
over_rho2_i
+
Bj
[
i
]
/
over_rho2_j
)
*
dvr
;
dB_dt_adv_i
[
i
]
=
(
Bj
[
i
]
*
over_rho2_j
+
Bi
[
i
]
*
over_rho2_i
)
*
dvr
/
over_rho2_i
;
dB_dt_adv_j
[
i
]
=
(
Bi
[
i
]
*
over_rho2_i
+
Bj
[
i
]
*
over_rho2_j
)
*
dvr
/
over_rho2_j
;
}
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
...
...
@@ -932,7 +932,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_mhd_force(
const
float
dvr
=
-
(
dv
[
0
]
*
dx
[
0
]
+
dv
[
1
]
*
dx
[
1
]
+
dv
[
2
]
*
dx
[
2
]);
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
dB_dt_adv_i
[
i
]
=
-
over_rho2_i
*
(
Bj
[
i
]
/
over_rho2_j
+
Bi
[
i
]
/
over_rho2_i
)
*
dvr
;
dB_dt_adv_i
[
i
]
=
(
Bj
[
i
]
*
over_rho2_j
+
Bi
[
i
]
*
over_rho2_i
)
*
dvr
/
over_rho2_i
;
}
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
...
...
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