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
b11b17e3
Commit
b11b17e3
authored
3 months ago
by
nickishch
Browse files
Options
Downloads
Patches
Plain Diff
without averaging
parent
37eb15e3
Branches
nickishch/MHD_canvas/OWAR_no_averaging
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
+2
-2
2 additions, 2 deletions
src/mhd/DirectInduction/mhd.h
src/mhd/DirectInduction/mhd_iact.h
+4
-4
4 additions, 4 deletions
src/mhd/DirectInduction/mhd_iact.h
with
6 additions
and
6 deletions
src/mhd/DirectInduction/mhd.h
+
2
−
2
View file @
b11b17e3
...
@@ -371,9 +371,9 @@ __attribute__((always_inline)) INLINE static void mhd_end_gradient(
...
@@ -371,9 +371,9 @@ __attribute__((always_inline)) INLINE static void mhd_end_gradient(
Cos_Ind_Diff
=
(
Adv_B_source
[
0
]
*
Delta_B
[
0
]
+
Adv_B_source
[
1
]
*
Delta_B
[
1
]
+
Adv_B_source
[
2
]
*
Delta_B
[
2
]);
Cos_Ind_Diff
=
(
Adv_B_source
[
0
]
*
Delta_B
[
0
]
+
Adv_B_source
[
1
]
*
Delta_B
[
1
]
+
Adv_B_source
[
2
]
*
Delta_B
[
2
]);
p
->
mhd_data
.
eta_OWAR
+=
1
.
0
f
/
OW
*
(
0
.
5
f
*
p
->
h
*
p
->
h
/
(
absB
+
FLT_MIN
))
*
0
.
5
f
*
fmaxf
(
0
.
0
f
,
1
.
0
f
-
Cos_Ind_Diff
)
*
Abs_Adv_B_source
*
p
->
rho
*
(
p
->
mass
*
kernel_root
);
p
->
mhd_data
.
eta_OWAR
+=
1
.
0
f
/
OW
*
(
0
.
5
f
*
p
->
h
*
p
->
h
/
(
absB
+
FLT_MIN
))
*
0
.
5
f
*
fmaxf
(
0
.
0
f
,
1
.
0
f
-
Cos_Ind_Diff
)
*
Abs_Adv_B_source
*
p
->
rho
;
/**
* (p->mass * kernel_root);
p
->
mhd_data
.
eta_OWAR
*=
pow_dimension
(
1
.
0
f
/
p
->
h
)
/
p
->
rho
;
p->mhd_data.eta_OWAR *= pow_dimension(1.0f/p->h) / p->rho;
**/
if
(
p
->
mhd_data
.
eta_OWAR
<
0
.
0
f
){
if
(
p
->
mhd_data
.
eta_OWAR
<
0
.
0
f
){
error
(
error
(
...
...
This diff is collapsed.
Click to expand it.
src/mhd/DirectInduction/mhd_iact.h
+
4
−
4
View file @
b11b17e3
...
@@ -158,7 +158,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_mhd_gradient(
...
@@ -158,7 +158,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_mhd_gradient(
}
}
/* Calculate OWAR */
/* Calculate OWAR */
/**
float OW;
float OW;
OW = 1.0f;
OW = 1.0f;
...
@@ -216,7 +216,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_mhd_gradient(
...
@@ -216,7 +216,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_mhd_gradient(
"Error: incorrect OWAR "
"Error: incorrect OWAR "
);
);
}
}
**/
}
}
...
@@ -307,7 +307,7 @@ runner_iact_nonsym_mhd_gradient(const float r2, const float dx[3],
...
@@ -307,7 +307,7 @@ runner_iact_nonsym_mhd_gradient(const float r2, const float dx[3],
}
}
/* Calculate OWAR */
/* Calculate OWAR */
/**
float OW;
float OW;
OW = 1.0f;
OW = 1.0f;
...
@@ -340,7 +340,7 @@ runner_iact_nonsym_mhd_gradient(const float r2, const float dx[3],
...
@@ -340,7 +340,7 @@ runner_iact_nonsym_mhd_gradient(const float r2, const float dx[3],
"Error: incorrect OWAR "
"Error: incorrect OWAR "
);
);
}
}
**/
}
}
/**
/**
...
...
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