Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor 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
Development
openfoam
Commits
7612b518
Commit
7612b518
authored
8 years ago
by
Henry Weller
Browse files
Options
Downloads
Patches
Plain Diff
lagrangian::NonInertialFrameForce: Use field references rather than copies
Patch contributed by Mattijs Janssens
parent
78ee6c2a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/NonInertialFrame/NonInertialFrameForce.C
+6
-5
6 additions, 5 deletions
...c/ParticleForces/NonInertialFrame/NonInertialFrameForce.C
with
6 additions
and
5 deletions
src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/NonInertialFrame/NonInertialFrameForce.C
+
6
−
5
View file @
7612b518
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
========= |
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / O peration |
\\ / A nd | Copyright (C) 2011-201
6
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-201
7
OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation |
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
License
License
...
@@ -121,7 +121,7 @@ void Foam::NonInertialFrameForce<CloudType>::cacheFields(const bool store)
...
@@ -121,7 +121,7 @@ void Foam::NonInertialFrameForce<CloudType>::cacheFields(const bool store)
)
)
)
)
{
{
uniformDimensionedVectorField
W
=
this
->
mesh
().
template
const
uniformDimensionedVectorField
&
W
=
this
->
mesh
().
template
lookupObject
<
uniformDimensionedVectorField
>
(
WName_
);
lookupObject
<
uniformDimensionedVectorField
>
(
WName_
);
W_
=
W
.
value
();
W_
=
W
.
value
();
...
@@ -135,7 +135,7 @@ void Foam::NonInertialFrameForce<CloudType>::cacheFields(const bool store)
...
@@ -135,7 +135,7 @@ void Foam::NonInertialFrameForce<CloudType>::cacheFields(const bool store)
)
)
)
)
{
{
uniformDimensionedVectorField
omega
=
this
->
mesh
().
template
const
uniformDimensionedVectorField
&
omega
=
this
->
mesh
().
template
lookupObject
<
uniformDimensionedVectorField
>
(
omegaName_
);
lookupObject
<
uniformDimensionedVectorField
>
(
omegaName_
);
omega_
=
omega
.
value
();
omega_
=
omega
.
value
();
...
@@ -149,7 +149,8 @@ void Foam::NonInertialFrameForce<CloudType>::cacheFields(const bool store)
...
@@ -149,7 +149,8 @@ void Foam::NonInertialFrameForce<CloudType>::cacheFields(const bool store)
)
)
)
)
{
{
uniformDimensionedVectorField
omegaDot
=
this
->
mesh
().
template
const
uniformDimensionedVectorField
&
omegaDot
=
this
->
mesh
().
template
lookupObject
<
uniformDimensionedVectorField
>
(
omegaDotName_
);
lookupObject
<
uniformDimensionedVectorField
>
(
omegaDotName_
);
omegaDot_
=
omegaDot
.
value
();
omegaDot_
=
omegaDot
.
value
();
...
@@ -163,7 +164,7 @@ void Foam::NonInertialFrameForce<CloudType>::cacheFields(const bool store)
...
@@ -163,7 +164,7 @@ void Foam::NonInertialFrameForce<CloudType>::cacheFields(const bool store)
)
)
)
)
{
{
uniformDimensionedVectorField
centreOfRotation
=
const
uniformDimensionedVectorField
&
centreOfRotation
=
this
->
mesh
().
template
this
->
mesh
().
template
lookupObject
<
uniformDimensionedVectorField
>
lookupObject
<
uniformDimensionedVectorField
>
(
(
...
...
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