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
093196ca
Commit
093196ca
authored
1 year ago
by
Federico Andrés Stasyszyn
Browse files
Options
Downloads
Patches
Plain Diff
cleaning the Gauge
parent
7c4b989c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/mhd/VPotential/mhd.h
+3
-4
3 additions, 4 deletions
src/mhd/VPotential/mhd.h
src/mhd/VPotential/mhd_struct.h
+0
-2
0 additions, 2 deletions
src/mhd/VPotential/mhd_struct.h
with
3 additions
and
6 deletions
src/mhd/VPotential/mhd.h
+
3
−
4
View file @
093196ca
...
...
@@ -121,8 +121,8 @@ __attribute__((always_inline)) INLINE static float mhd_compute_timestep(
const
struct
hydro_props
*
hydro_properties
,
const
struct
cosmology
*
cosmo
,
const
float
mu_0
)
{
//
const float afac_divB = pow(cosmo->a, -mhd_comoving_factor - 0.5f);
const
float
afac_divB
=
pow
(
cosmo
->
a
,
-
mhd_comoving_factor
*
0
.
5
f
-
0
.
5
f
);
const
float
afac_divB
=
pow
(
cosmo
->
a
,
-
mhd_comoving_factor
-
0
.
5
f
);
//
const float afac_divB = pow(cosmo->a, -mhd_comoving_factor*0.5f - 0.5f);
const
float
afac_resistive
=
cosmo
->
a
*
cosmo
->
a
;
/* Dt from 1/DivOperator(Alfven speed) */
...
...
@@ -278,7 +278,7 @@ __attribute__((always_inline)) INLINE static float hydro_get_dGau_dt(
p
->
mhd_data
.
BPred
[
2
]
*
p
->
mhd_data
.
BPred
[
2
]);
const
float
v_sig
=
sqrt
(
b2
/
mu0
);
const
float
afac1
=
pow
(
c
->
a
,
3
.
f
*
mhd_comoving_factor
);
const
float
afac2
=
pow
(
c
->
a
,
2
.
f
*
mhd_comoving_factor
);
const
float
afac2
=
pow
(
c
->
a
,
2
.
f
*
mhd_comoving_factor
+
1
.
f
);
return
(
-
p
->
mhd_data
.
divA
*
v_sig
*
v_sig
*
0
.
1
*
afac1
-
2
.
0
f
*
v_sig
*
Gauge
/
p
->
h
*
afac2
-
...
...
@@ -600,7 +600,6 @@ __attribute__((always_inline)) INLINE static void mhd_convert_quantities(
__attribute__
((
always_inline
))
INLINE
static
void
mhd_first_init_part
(
struct
part
*
restrict
p
,
struct
xpart
*
restrict
xp
,
const
struct
mhd_global_data
*
mhd_data
,
const
double
Lsize
)
{
//xp->mhd_data.Gau_full = 0.0f;
p
->
mhd_data
.
divB
=
0
.
0
f
;
mhd_reset_acceleration
(
p
);
...
...
This diff is collapsed.
Click to expand it.
src/mhd/VPotential/mhd_struct.h
+
0
−
2
View file @
093196ca
...
...
@@ -47,8 +47,6 @@ struct mhd_part_data {
*/
struct
mhd_xpart_data
{
/* Full step Gauge */
float
Gau_full
;
/* Full step VPotential */
float
APot_full
[
3
];
};
...
...
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