Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moose
Manage
Activity
Members
Labels
Plan
Issues
9
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sahil Moza
moose
Commits
6aa27cac
Commit
6aa27cac
authored
8 years ago
by
Asia Jędrzejewska-Szmek
Browse files
Options
Downloads
Patches
Plain Diff
Change order of operations to slightly improve accuracy
parent
bc28246b
No related branches found
No related tags found
1 merge request
!205
DifShell and DifBuffer implementation
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
moose-core/biophysics/DifBuffer.cpp
+2
-2
2 additions, 2 deletions
moose-core/biophysics/DifBuffer.cpp
moose-core/biophysics/DifShell.cpp
+2
-3
2 additions, 3 deletions
moose-core/biophysics/DifShell.cpp
with
4 additions
and
5 deletions
moose-core/biophysics/DifBuffer.cpp
+
2
−
2
View file @
6aa27cac
...
@@ -454,14 +454,14 @@ void DifBuffer::vReinit( const Eref& e, ProcPtr p )
...
@@ -454,14 +454,14 @@ void DifBuffer::vReinit( const Eref& e, ProcPtr p )
void
DifBuffer
::
vFluxFromIn
(
const
Eref
&
e
,
double
innerC
,
double
innerThickness
)
void
DifBuffer
::
vFluxFromIn
(
const
Eref
&
e
,
double
innerC
,
double
innerThickness
)
{
{
double
dif
=
2
*
D_
*
innerArea_
/
(
thickness_
+
innerThickness
)
/
volume_
;
double
dif
=
2
*
D_
/
volume_
*
innerArea_
/
(
thickness_
+
innerThickness
);
Af_
+=
dif
*
innerC
;
Af_
+=
dif
*
innerC
;
Bf_
+=
dif
;
Bf_
+=
dif
;
}
}
void
DifBuffer
::
vFluxFromOut
(
const
Eref
&
e
,
double
outerC
,
double
outerThickness
)
void
DifBuffer
::
vFluxFromOut
(
const
Eref
&
e
,
double
outerC
,
double
outerThickness
)
{
{
double
dif
=
2
*
D_
*
outerArea_
/
(
thickness_
+
outerThickness
)
/
volume_
;
double
dif
=
2
*
D_
/
volume_
*
outerArea_
/
(
thickness_
+
outerThickness
);
Af_
+=
dif
*
outerC
;
Af_
+=
dif
*
outerC
;
Bf_
+=
dif
;
Bf_
+=
dif
;
}
}
This diff is collapsed.
Click to expand it.
moose-core/biophysics/DifShell.cpp
+
2
−
3
View file @
6aa27cac
...
@@ -371,7 +371,7 @@ void DifShell::vBuffer(const Eref& e,
...
@@ -371,7 +371,7 @@ void DifShell::vBuffer(const Eref& e,
void
DifShell
::
vFluxFromOut
(
const
Eref
&
e
,
double
outerC
,
double
outerThickness
)
void
DifShell
::
vFluxFromOut
(
const
Eref
&
e
,
double
outerC
,
double
outerThickness
)
{
{
double
diff
=
2.
*
D_
*
outerArea_
/
(
outerThickness
+
thickness_
)
/
volume_
;
double
diff
=
2.
*
D_
/
volume_
*
outerArea_
/
(
outerThickness
+
thickness_
)
;
//influx from outer shell
//influx from outer shell
/**
/**
* We could pre-compute ( D / Volume ), but let us leave the optimizations
* We could pre-compute ( D / Volume ), but let us leave the optimizations
...
@@ -386,8 +386,7 @@ void DifShell::vFluxFromIn(const Eref& e, double innerC, double innerThickness )
...
@@ -386,8 +386,7 @@ void DifShell::vFluxFromIn(const Eref& e, double innerC, double innerThickness )
{
{
//influx from inner shell
//influx from inner shell
//double dx = ( innerThickness + thickness_ ) / 2.0;
//double dx = ( innerThickness + thickness_ ) / 2.0;
double
diff
=
2.
*
D_
*
innerArea_
/
(
innerThickness
+
thickness_
)
/
volume_
;
double
diff
=
2.
*
D_
/
volume_
*
innerArea_
/
(
innerThickness
+
thickness_
);
//cout << "FluxFromIn "<<innerC<<" "<<innerThickness;
dCbyDt_
+=
diff
*
innerC
;
dCbyDt_
+=
diff
*
innerC
;
Cmultiplier_
+=
diff
;
Cmultiplier_
+=
diff
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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