Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
ebcfba84
Commit
ebcfba84
authored
Jun 20, 2008
by
Andrew Heather
Browse files
formatting changes
parent
1ae68a17
Changes
27
Hide whitespace changes
Inline
Side-by-side
src/lagrangian/molecularDynamics/molecule/distribution/distribution.C
View file @
ebcfba84
...
...
@@ -135,7 +135,7 @@ scalar distribution::median()
scalar
runningSum
=
0
.
0
;
List
<
Pair
<
scalar
>
>
normDist
(
normalised
());
List
<
Pair
<
scalar
>
>
normDist
(
normalised
());
if
(
normDist
.
size
())
{
...
...
@@ -259,7 +259,7 @@ List< Pair<scalar> > distribution::normalised()
sort
(
keys
);
List
<
Pair
<
scalar
>
>
normDist
(
size
());
List
<
Pair
<
scalar
>
>
normDist
(
size
());
forAll
(
keys
,
k
)
{
...
...
@@ -282,9 +282,9 @@ List< Pair<scalar> > distribution::normalisedMinusMean()
List
<
Pair
<
scalar
>
>
distribution
::
normalisedShifted
(
const
scalar
shiftValue
)
{
List
<
Pair
<
scalar
>
>
oldDist
(
normalised
());
List
<
Pair
<
scalar
>
>
oldDist
(
normalised
());
List
<
Pair
<
scalar
>
>
newDist
(
oldDist
.
size
());
List
<
Pair
<
scalar
>
>
newDist
(
oldDist
.
size
());
forAll
(
oldDist
,
u
)
{
...
...
@@ -383,7 +383,7 @@ List< Pair<scalar> > distribution::normalisedShifted(const scalar shiftValue)
}
List
<
Pair
<
scalar
>
>
distribution
::
raw
()
List
<
Pair
<
scalar
>
>
distribution
::
raw
()
{
insertMissingKeys
();
...
...
@@ -391,7 +391,7 @@ List< Pair<scalar> > distribution::raw()
sort
(
keys
);
List
<
Pair
<
scalar
>
>
rawDist
(
size
());
List
<
Pair
<
scalar
>
>
rawDist
(
size
());
forAll
(
keys
,
k
)
{
...
...
src/lagrangian/molecularDynamics/molecule/distribution/distribution.H
View file @
ebcfba84
...
...
@@ -94,13 +94,14 @@ public:
void
insertMissingKeys
();
List
<
Pair
<
scalar
>
>
normalised
();
List
<
Pair
<
scalar
>
>
normalised
();
List
<
Pair
<
scalar
>
>
normalisedMinusMean
();
List
<
Pair
<
scalar
>
>
normalisedMinusMean
();
List
<
Pair
<
scalar
>
>
normalisedShifted
(
const
scalar
shiftValue
);
List
<
Pair
<
scalar
>
>
normalisedShifted
(
const
scalar
shiftValue
);
List
<
Pair
<
scalar
>
>
raw
();
List
<
Pair
<
scalar
>
>
raw
();
// Access
...
...
src/lagrangian/molecularDynamics/molecule/distribution/distributionI.H
View file @
ebcfba84
...
...
@@ -24,19 +24,12 @@ License
\*---------------------------------------------------------------------------*/
namespace
Foam
{
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline
scalar
distribution
::
binWidth
()
const
inline
Foam
::
scalar
Foam
::
distribution
::
binWidth
()
const
{
return
binWidth_
;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// ************************************************************************* //
src/lagrangian/molecularDynamics/molecule/referredCellList/referredCellListI.H
View file @
ebcfba84
...
...
@@ -24,9 +24,6 @@ License
\*---------------------------------------------------------------------------*/
namespace
Foam
{
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
inline
const
Foam
::
moleculeCloud
&
Foam
::
referredCellList
::
molCloud
()
...
...
@@ -35,8 +32,4 @@ inline const Foam::moleculeCloud& Foam::referredCellList::molCloud()
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// ************************************************************************* //
src/lagrangian/molecularDynamics/molecule/referredMolecule/referredMolecule.H
View file @
ebcfba84
...
...
@@ -98,6 +98,7 @@ public:
const
referredMolecule
&
b
);
// IOstream Operators
friend
Istream
&
operator
>>
...
...
src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.H
View file @
ebcfba84
...
...
@@ -23,7 +23,7 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
energyScalingFunction
Foam::
energyScalingFunction
Description
...
...
@@ -59,11 +59,12 @@ protected:
// Protected data
word
name_
;
dictionary
energyScalingFunctionProperties_
;
const
pairPotential
&
pairPot_
;
// Private Member Functions
//- Disallow copy construct
...
...
@@ -72,6 +73,7 @@ protected:
//- Disallow default bitwise assignment
void
operator
=
(
const
energyScalingFunction
&
);
public:
//- Runtime type information
...
...
src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/doubleSigmoid/doubleSigmoid.H
View file @
ebcfba84
...
...
@@ -23,10 +23,10 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
doubleSigmoid
Foam::energyScalingFunctions::
doubleSigmoid
Description
SourceFiles
doubleSigmoid.C
...
...
@@ -54,14 +54,14 @@ class doubleSigmoid
public
energyScalingFunction
{
// Private data
dictionary
doubleSigmoidCoeffs_
;
scalar
shift1_
;
scalar
scale1_
;
scalar
shift2_
;
scalar
scale2_
;
// Private Member Functions
scalar
sigmoidScale
...
...
@@ -71,6 +71,7 @@ class doubleSigmoid
const
scalar
scale
)
const
;
public:
//- Runtime type information
...
...
src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/noScaling/noScaling.H
View file @
ebcfba84
...
...
@@ -23,10 +23,10 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
noScaling
Foam::energyScalingFunctions::
noScaling
Description
SourceFiles
noScaling.C
...
...
@@ -53,7 +53,6 @@ class noScaling
:
public
energyScalingFunction
{
// Private data
public:
...
...
src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/shifted/shifted.H
View file @
ebcfba84
...
...
@@ -23,10 +23,10 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
shifted
Foam::energyScalingFunctions::
shifted
Description
SourceFiles
shifted.C
...
...
@@ -54,9 +54,10 @@ class shifted
public
energyScalingFunction
{
// Private data
scalar
e_at_rCut_
;
public:
//- Runtime type information
...
...
src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/shiftedForce/shiftedForce.H
View file @
ebcfba84
...
...
@@ -23,10 +23,10 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
shiftedForce
Foam::energyScalingFunctions::
shiftedForce
Description
SourceFiles
shiftedForce.C
...
...
@@ -54,14 +54,13 @@ class shiftedForce
public
energyScalingFunction
{
// Private data
scalar
rCut_
;
scalar
e_at_rCut_
;
scalar
de_dr_at_rCut_
;
// Private Member Functions
public:
...
...
@@ -85,8 +84,9 @@ public:
~
shiftedForce
()
{}
// Member Functions
void
scaleEnergy
(
scalar
&
e
,
const
scalar
r
)
const
;
//- Read transportProperties dictionary
...
...
src/lagrangian/molecularDynamics/potential/energyScalingFunction/derived/sigmoid/sigmoid.H
View file @
ebcfba84
...
...
@@ -23,10 +23,10 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
sigmoid
Foam::energyScalingFunctions::
sigmoid
Description
SourceFiles
sigmoid.C
...
...
@@ -54,12 +54,13 @@ class sigmoid
public
energyScalingFunction
{
// Private data
dictionary
sigmoidCoeffs_
;
scalar
shift_
;
scalar
scale_
;
// Private Member Functions
scalar
sigmoidScale
...
...
@@ -69,6 +70,7 @@ class sigmoid
const
scalar
scale
)
const
;
public:
//- Runtime type information
...
...
@@ -91,6 +93,7 @@ public:
~
sigmoid
()
{}
// Member Functions
void
scaleEnergy
(
scalar
&
e
,
const
scalar
r
)
const
;
...
...
src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C
View file @
ebcfba84
...
...
@@ -52,7 +52,7 @@ void Foam::pairPotential::scaleEnergy(scalar& e, const scalar r) const
name_
,
pairPotentialProperties_
,
*
this
).
ptr
();
}
esfPtr_
->
scaleEnergy
(
e
,
r
);
}
...
...
@@ -77,6 +77,7 @@ Foam::pairPotential::pairPotential
writeTables_
(
Switch
(
pairPotentialProperties_
.
lookup
(
"writeTables"
)))
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void
Foam
::
pairPotential
::
setLookupTables
()
...
...
@@ -91,7 +92,7 @@ void Foam::pairPotential::setLookupTables()
{
energyLookup_
[
k
]
=
scaledEnergy
(
k
*
dr_
+
rMin_
);
forceLookup_
[
k
]
=
-
energyDerivative
(
(
k
*
dr_
+
rMin_
),
true
);
forceLookup_
[
k
]
=
-
energyDerivative
((
k
*
dr_
+
rMin_
),
true
);
}
}
...
...
@@ -105,8 +106,8 @@ Foam::scalar Foam::pairPotential::forceLookup(const scalar r) const
if
(
k
<
0
)
{
FatalErrorIn
(
"pairPotential.C"
)
<<
nl
<<
"r less than rMin"
<<
nl
<<
abort
(
FatalError
);
<<
"r less than rMin"
<<
nl
<<
abort
(
FatalError
);
}
scalar
f
=
...
...
@@ -120,7 +121,7 @@ Foam::scalar Foam::pairPotential::forceLookup(const scalar r) const
Foam
::
List
<
Foam
::
Pair
<
Foam
::
scalar
>
>
Foam
::
pairPotential
::
forceTable
()
const
{
List
<
Pair
<
scalar
>
>
forceTab
(
forceLookup_
.
size
());
List
<
Pair
<
scalar
>
>
forceTab
(
forceLookup_
.
size
());
forAll
(
forceLookup_
,
k
)
{
...
...
@@ -142,8 +143,8 @@ Foam::scalar Foam::pairPotential::energyLookup(const scalar r) const
if
(
k
<
0
)
{
FatalErrorIn
(
"pairPotential.C"
)
<<
nl
<<
"r less than rMin"
<<
nl
<<
abort
(
FatalError
);
<<
"r less than rMin"
<<
nl
<<
abort
(
FatalError
);
}
scalar
e
=
...
...
@@ -157,7 +158,7 @@ Foam::scalar Foam::pairPotential::energyLookup(const scalar r) const
Foam
::
List
<
Foam
::
Pair
<
Foam
::
scalar
>
>
Foam
::
pairPotential
::
energyTable
()
const
{
List
<
Pair
<
scalar
>
>
energyTab
(
energyLookup_
.
size
());
List
<
Pair
<
scalar
>
>
energyTab
(
energyLookup_
.
size
());
forAll
(
energyLookup_
,
k
)
{
...
...
@@ -173,7 +174,7 @@ Foam::List< Foam::Pair< Foam::scalar > >
Foam
::
scalar
Foam
::
pairPotential
::
scaledEnergy
(
const
scalar
r
)
const
{
scalar
e
=
unscaledEnergy
(
r
);
scaleEnergy
(
e
,
r
);
return
e
;
...
...
@@ -192,7 +193,7 @@ Foam::scalar Foam::pairPotential::energyDerivative
scalar
ra
=
r
-
dr_
;
scalar
rf
=
r
;
scalar
rb
=
r
+
dr_
;
scalar
Ea
,
Ef
,
Eb
;
if
(
scaledEnergyDerivative
)
...
...
@@ -207,20 +208,20 @@ Foam::scalar Foam::pairPotential::energyDerivative
Ef
=
unscaledEnergy
(
rf
);
Eb
=
unscaledEnergy
(
rb
);
}
scalar
denominator
=
(
ra
-
rf
)
*
(
ra
-
rb
)
*
(
rf
-
rb
);
scalar
a1
=
(
rb
*
rb
*
(
Ea
-
Ef
)
+
ra
*
ra
*
(
Ef
-
Eb
)
+
rf
*
rf
*
(
Eb
-
Ea
)
)
/
denominator
;
scalar
a2
=
scalar
a2
=
(
rb
*
(
Ef
-
Ea
)
+
rf
*
(
Ea
-
Eb
)
+
ra
*
(
Eb
-
Ef
)
)
/
denominator
;
return
a1
+
2
.
0
*
a2
*
r
;
return
a1
+
2
.
0
*
a2
*
r
;
}
...
...
@@ -231,6 +232,7 @@ bool Foam::pairPotential::read(const dictionary& pairPotentialProperties)
return
true
;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
...
...
src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.H
View file @
ebcfba84
...
...
@@ -23,7 +23,7 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
pairPotential
Foam::
pairPotential
Description
...
...
@@ -82,13 +82,14 @@ protected:
// Private Member Functions
void
scaleEnergy
(
scalar
&
e
,
const
scalar
r
)
const
;
//- Disallow copy construct
pairPotential
(
const
pairPotential
&
);
//- Disallow default bitwise assignment
void
operator
=
(
const
pairPotential
&
);
public:
//- Runtime type information
...
...
@@ -152,9 +153,9 @@ public:
scalar
forceLookup
(
const
scalar
r
)
const
;
List
<
Pair
<
scalar
>
>
energyTable
()
const
;
List
<
Pair
<
scalar
>
>
energyTable
()
const
;
List
<
Pair
<
scalar
>
>
forceTable
()
const
;
List
<
Pair
<
scalar
>
>
forceTable
()
const
;
inline
bool
writeTables
()
const
;
...
...
src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.H
View file @
ebcfba84
...
...
@@ -23,7 +23,7 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
azizChen
Foam::pairPotentials::
azizChen
Description
...
...
src/lagrangian/molecularDynamics/potential/pairPotential/derived/lennardJones/lennardJones.C
View file @
ebcfba84
...
...
@@ -74,7 +74,7 @@ scalar lennardJones::unscaledEnergy(const scalar r) const
// (rIJ/sigma)^-6
scalar
ir6
=
ir2
*
ir2
*
ir2
;
return
4
.
0
*
epsilon_
*
(
ir6
*
(
ir6
-
1
.
0
));
return
4
.
0
*
epsilon_
*
(
ir6
*
(
ir6
-
1
.
0
));
}
...
...
@@ -86,7 +86,7 @@ bool lennardJones::read(const dictionary& pairPotentialProperties)
lennardJonesCoeffs_
.
lookup
(
"sigma"
)
>>
sigma_
;
lennardJonesCoeffs_
.
lookup
(
"epsilon"
)
>>
epsilon_
;
return
true
;
}
...
...
src/lagrangian/molecularDynamics/potential/pairPotential/derived/lennardJones/lennardJones.H
View file @
ebcfba84
...
...
@@ -23,10 +23,10 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
lennardJones
Foam::pairPotentials::
lennardJones
Description
SourceFiles
lennardJones.C
...
...
src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.H
View file @
ebcfba84
...
...
@@ -23,7 +23,7 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
maitlandSmith
Foam::pairPotentials::
maitlandSmith
Description
...
...
src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.C
View file @
ebcfba84
...
...
@@ -36,54 +36,55 @@ void Foam::pairPotentialList::readPairPotentialDict
const
polyMesh
&
mesh
)
{
Info
<<
nl
<<
"Building pair potentials."
<<
endl
;
Info
<<
nl
<<
"Building pair potentials."
<<
endl
;
rCutMax_
=
0
.
0
;
for
(
label
a
=
0
;
a
<
nIds
();
++
a
)
{
word
idA
=
idList_
[
a
];
for
(
label
b
=
a
;
b
<
nIds
();
++
b
)
{
word
idB
=
idList_
[
b
];
word
pairPotentialName
;
if
(
a
==
b
)
if
(
a
==
b
)
{
if
(
pairPotentialDict
.
found
(
idA
+
"-"
+
idB
))
if
(
pairPotentialDict
.
found
(
idA
+
"-"
+
idB
))
{
pairPotentialName
=
idA
+
"-"
+
idB
;
pairPotentialName
=
idA
+
"-"
+
idB
;
}
else
{
FatalErrorIn
(
"pairPotentialList::buildPotentials"
)
<<
nl
<<
"Pair pairPotential specification subDict "
<<
idA
+
"-"
+
idB
<<
" not found"
<<
abort
(
FatalError
);
<<
idA
<<
"-"
<<
idB
<<
" not found"
<<
nl
<<
abort
(
FatalError
);
}
}
else
{
if
(
pairPotentialDict
.
found
(
idA
+
"-"
+
idB
))
if
(
pairPotentialDict
.
found
(
idA
+
"-"
+
idB
))
{
pairPotentialName
=
idA
+
"-"
+
idB
;
pairPotentialName
=
idA
+
"-"
+
idB
;
}
else
if
(
pairPotentialDict
.
found
(
idB
+
"-"
+
idA
))
else
if
(
pairPotentialDict
.
found
(
idB
+
"-"
+
idA
))
{
pairPotentialName
=
idB
+
"-"
+
idA
;
pairPotentialName
=
idB
+
"-"
+
idA
;
}
else
{
FatalErrorIn
(
"pairPotentialList::buildPotentials"
)
<<
nl
<<
"Pair pairPotential specification subDict "
<<
idA
+
"-"
+
idB
<<
" or "
<<
idB
+
"-"
+
idA
<<
" not found"
<<
abort
(
FatalError
);
<<
idA
<<
"-"
<<
idB
<<
" or "
<<
idB
<<
"-"
<<
idA
<<
" not found"
<<
nl
<<
abort
(
FatalError
);
}
if
(
pairPotentialDict
.
found
(
idA
+
"-"
+
idB
)
...
...
@@ -92,15 +93,15 @@ void Foam::pairPotentialList::readPairPotentialDict
{
FatalErrorIn
(
"pairPotentialList::buildPotentials"
)
<<
nl
<<
"Pair pairPotential specification subDict "