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
91128b31
Commit
91128b31
authored
Dec 10, 2010
by
sergio
Browse files
Merge branch 'master' of
ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
parents
564ef70f
f7c3a8e4
Changes
43
Hide whitespace changes
Inline
Side-by-side
applications/utilities/mesh/manipulation/setSet/setSet.C
View file @
91128b31
...
...
@@ -482,7 +482,7 @@ bool doCommand
topoSet
&
currentSet
=
currentSetPtr
();
Info
<<
" Set:"
<<
currentSet
.
name
()
<<
" Size:"
<<
currentSet
.
size
()
<<
" Size:"
<<
returnReduce
(
currentSet
.
size
()
,
sumOp
<
label
>
())
<<
" Action:"
<<
actionName
<<
endl
;
...
...
@@ -579,7 +579,9 @@ bool doCommand
);
Info
<<
" Writing "
<<
currentSet
.
name
()
<<
" (size "
<<
currentSet
.
size
()
<<
") to "
<<
" (size "
<<
returnReduce
(
currentSet
.
size
(),
sumOp
<
label
>
())
<<
") to "
<<
currentSet
.
instance
()
/
currentSet
.
local
()
/
currentSet
.
name
()
<<
" and to vtk file "
<<
vtkName
<<
endl
<<
endl
;
...
...
@@ -589,7 +591,9 @@ bool doCommand
else
{
Info
<<
" Writing "
<<
currentSet
.
name
()
<<
" (size "
<<
currentSet
.
size
()
<<
") to "
<<
" (size "
<<
returnReduce
(
currentSet
.
size
(),
sumOp
<
label
>
())
<<
") to "
<<
currentSet
.
instance
()
/
currentSet
.
local
()
/
currentSet
.
name
()
<<
endl
<<
endl
;
}
...
...
@@ -642,9 +646,9 @@ enum commandStatus
void
printMesh
(
const
Time
&
runTime
,
const
polyMesh
&
mesh
)
{
Info
<<
"Time:"
<<
runTime
.
timeName
()
<<
" cells:"
<<
mesh
.
n
Cells
()
<<
" faces:"
<<
mesh
.
n
Faces
()
<<
" points:"
<<
mesh
.
n
Points
()
<<
" cells:"
<<
mesh
.
globalData
().
nTotal
Cells
()
<<
" faces:"
<<
mesh
.
globalData
().
nTotal
Faces
()
<<
" points:"
<<
mesh
.
globalData
().
nTotal
Points
()
<<
" patches:"
<<
mesh
.
boundaryMesh
().
size
()
<<
" bb:"
<<
mesh
.
bounds
()
<<
nl
;
}
...
...
applications/utilities/surface/surfaceInertia/surfaceInertia.C
View file @
91128b31
...
...
@@ -51,7 +51,7 @@ using namespace Foam;
void
massPropertiesSolid
(
const
pointField
&
pts
,
const
triFaceList
triFaces
,
const
triFaceList
&
triFaces
,
scalar
density
,
scalar
&
mass
,
vector
&
cM
,
...
...
@@ -208,7 +208,7 @@ void massPropertiesSolid
void
massPropertiesShell
(
const
pointField
&
pts
,
const
triFaceList
triFaces
,
const
triFaceList
&
triFaces
,
scalar
density
,
scalar
&
mass
,
vector
&
cM
,
...
...
src/ODE/ODESolvers/KRR4/KRR4.C
View file @
91128b31
...
...
@@ -58,17 +58,17 @@ const scalar
Foam
::
KRR4
::
KRR4
(
const
ODE
&
ode
)
:
ODESolver
(
ode
),
yTemp_
(
n_
),
dydxTemp_
(
n_
),
g1_
(
n_
),
g2_
(
n_
),
g3_
(
n_
),
g4_
(
n_
),
yErr_
(
n_
),
dfdx_
(
n_
),
dfdy_
(
n_
,
n_
),
a_
(
n_
,
n_
),
pivotIndices_
(
n_
)
yTemp_
(
n_
,
0
.
0
),
dydxTemp_
(
n_
,
0
.
0
),
g1_
(
n_
,
0
.
0
),
g2_
(
n_
,
0
.
0
),
g3_
(
n_
,
0
.
0
),
g4_
(
n_
,
0
.
0
),
yErr_
(
n_
,
0
.
0
),
dfdx_
(
n_
,
0
.
0
),
dfdy_
(
n_
,
n_
,
0
.
0
),
a_
(
n_
,
n_
,
0
.
0
),
pivotIndices_
(
n_
,
0
.
0
)
{}
...
...
src/ODE/ODESolvers/RK/RK.C
View file @
91128b31
...
...
@@ -57,14 +57,14 @@ const scalar
Foam
::
RK
::
RK
(
const
ODE
&
ode
)
:
ODESolver
(
ode
),
yTemp_
(
n_
),
ak2_
(
n_
),
ak3_
(
n_
),
ak4_
(
n_
),
ak5_
(
n_
),
ak6_
(
n_
),
yErr_
(
n_
),
yTemp2_
(
n_
)
yTemp_
(
n_
,
0
.
0
),
ak2_
(
n_
,
0
.
0
),
ak3_
(
n_
,
0
.
0
),
ak4_
(
n_
,
0
.
0
),
ak5_
(
n_
,
0
.
0
),
ak6_
(
n_
,
0
.
0
),
yErr_
(
n_
,
0
.
0
),
yTemp2_
(
n_
,
0
.
0
)
{}
...
...
src/ODE/ODESolvers/SIBS/SIBS.C
View file @
91128b31
...
...
@@ -50,17 +50,17 @@ namespace Foam
Foam
::
SIBS
::
SIBS
(
const
ODE
&
ode
)
:
ODESolver
(
ode
),
a_
(
iMaxX_
),
alpha_
(
kMaxX_
,
kMaxX_
),
d_p_
(
n_
,
kMaxX_
),
x_p_
(
kMaxX_
),
err_
(
kMaxX_
),
yTemp_
(
n_
),
ySeq_
(
n_
),
yErr_
(
n_
),
dfdx_
(
n_
),
dfdy_
(
n_
,
n_
),
a_
(
iMaxX_
,
0
.
0
),
alpha_
(
kMaxX_
,
kMaxX_
,
0
.
0
),
d_p_
(
n_
,
kMaxX_
,
0
.
0
),
x_p_
(
kMaxX_
,
0
.
0
),
err_
(
kMaxX_
,
0
.
0
),
yTemp_
(
n_
,
0
.
0
),
ySeq_
(
n_
,
0
.
0
),
yErr_
(
n_
,
0
.
0
),
dfdx_
(
n_
,
0
.
0
),
dfdy_
(
n_
,
n_
,
0
.
0
),
first_
(
1
),
epsOld_
(
-
1
.
0
)
{}
...
...
src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedronI.H
View file @
91128b31
...
...
@@ -21,12 +21,11 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Description
\*---------------------------------------------------------------------------*/
#include
"triangle.H"
#include
"IOstreams.H"
#include
"triPointRef.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
@@ -152,7 +151,37 @@ inline Point tetrahedron<Point, PointRef>::circumCentre() const
vector
ba
=
b
^
a
;
vector
ca
=
c
^
a
;
return
a_
+
0.5
*
(
a
+
(
lambda
*
ba
-
mu
*
ca
)
/
((
c
&
ba
)
+
ROOTVSMALL
));
vector
num
=
lambda
*
ba
-
mu
*
ca
;
scalar
denom
=
(
c
&
ba
);
if
(
Foam
::
mag
(
denom
)
<
ROOTVSMALL
)
{
// Degenerate tet. Use test of the individual triangles.
{
point
triCentre
=
triPointRef
(
a_
,
b_
,
c_
).
circumCentre
();
if
(
magSqr
(
d_
-
triCentre
)
<
magSqr
(
a_
-
triCentre
))
{
return
triCentre
;
}
}
{
point
triCentre
=
triPointRef
(
a_
,
b_
,
d_
).
circumCentre
();
if
(
magSqr
(
c_
-
triCentre
)
<
magSqr
(
a_
-
triCentre
))
{
return
triCentre
;
}
}
{
point
triCentre
=
triPointRef
(
a_
,
c_
,
d_
).
circumCentre
();
if
(
magSqr
(
b_
-
triCentre
)
<
magSqr
(
a_
-
triCentre
))
{
return
triCentre
;
}
}
return
triPointRef
(
b_
,
c_
,
d_
).
circumCentre
();
}
return
a_
+
0.5
*
(
a
+
num
/
denom
);
}
...
...
src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/IObasicSourceList.C
View file @
91128b31
...
...
@@ -39,7 +39,7 @@ Foam::IObasicSourceList::IObasicSourceList
"sourcesProperties"
,
mesh
.
time
().
constant
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
MUST_READ
_IF_MODIFIED
,
IOobject
::
NO_WRITE
)
),
...
...
src/thermophysicalModels/basicSolidThermo/Make/files
View file @
91128b31
basicSolidThermo/basicSolidThermo.C
basicSolidThermo/
newB
asicSolidThermo.C
basicSolidThermo/
b
asicSolidThermo
New
.C
constSolidThermo/constSolidThermo.C
directionalKSolidThermo/directionalKSolidThermo.C
...
...
src/thermophysicalModels/basicSolidThermo/basicSolidThermo/basicSolidThermo.H
View file @
91128b31
...
...
@@ -50,7 +50,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class basicSolidThermo Declaration
Class basicSolidThermo Declaration
\*---------------------------------------------------------------------------*/
class
basicSolidThermo
...
...
@@ -109,8 +109,7 @@ public:
//- Destructor
virtual
~
basicSolidThermo
();
virtual
~
basicSolidThermo
();
// Member functions
...
...
@@ -204,7 +203,7 @@ public:
//- Read thermophysicalProperties dictionary
virtual
bool
read
()
=
0
;
// Ostream Operator
//
-
Ostream Operator
friend
Ostream
&
operator
<<
(
Ostream
&
os
,
const
basicSolidThermo
&
s
);
};
...
...
src/thermophysicalModels/basicSolidThermo/basicSolidThermo/newBasicSolidThermo.C
deleted
100644 → 0
View file @
564ef70f
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include
"basicSolidThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam
::
autoPtr
<
Foam
::
basicSolidThermo
>
Foam
::
basicSolidThermo
::
New
(
const
fvMesh
&
mesh
)
{
if
(
debug
)
{
Info
<<
"basicSolidThermo::New(const fvMesh&): "
<<
"constructing basicSolidThermo"
<<
endl
;
}
const
word
thermoType
(
IOdictionary
(
IOobject
(
"solidThermophysicalProperties"
,
mesh
.
time
().
constant
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
NO_WRITE
,
false
)
).
lookup
(
"thermoType"
)
);
meshConstructorTable
::
iterator
cstrIter
=
meshConstructorTablePtr_
->
find
(
thermoType
);
if
(
cstrIter
==
meshConstructorTablePtr_
->
end
())
{
FatalErrorIn
(
"basicSolidThermo::New(const fvMesh&, const word&)"
)
<<
"Unknown solidThermo type "
<<
thermoType
<<
endl
<<
endl
<<
"Valid solidThermo types are :"
<<
endl
<<
meshConstructorTablePtr_
->
toc
()
<<
exit
(
FatalError
);
}
return
autoPtr
<
basicSolidThermo
>
(
cstrIter
()(
mesh
));
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
src/thermophysicalModels/basicSolidThermo/constSolidThermo/constSolidThermo.H
View file @
91128b31
...
...
@@ -43,7 +43,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class constSolidThermo Declaration
Class constSolidThermo Declaration
\*---------------------------------------------------------------------------*/
class
constSolidThermo
...
...
@@ -159,11 +159,8 @@ public:
//- Read solidThermophysicalProperties dictionary
bool
read
(
const
dictionary
&
);
// Ostream Operator
friend
Ostream
&
operator
<<
(
Ostream
&
os
,
const
constSolidThermo
&
s
);
//- Ostream Operator
friend
Ostream
&
operator
<<
(
Ostream
&
os
,
const
constSolidThermo
&
s
);
};
...
...
src/thermophysicalModels/basicSolidThermo/directionalKSolidThermo/directionalKSolidThermo.C
View file @
91128b31
...
...
@@ -309,8 +309,8 @@ void Foam::directionalKSolidThermo::correct()
}
const
Foam
::
volSymmTensorField
&
Foam
::
directionalKSolidThermo
::
directionalK
()
const
const
Foam
::
volSymmTensorField
&
Foam
::
directionalKSolidThermo
::
directionalK
()
const
{
return
directionalK_
;
}
...
...
src/thermophysicalModels/basicSolidThermo/directionalKSolidThermo/directionalKSolidThermo.H
View file @
91128b31
...
...
@@ -44,7 +44,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class directionalKSolidThermo Declaration
Class directionalKSolidThermo Declaration
\*---------------------------------------------------------------------------*/
class
directionalKSolidThermo
...
...
@@ -99,8 +99,8 @@ public:
directionalKSolidThermo
(
const
fvMesh
&
mesh
);
// Destructor
virtual
~
directionalKSolidThermo
();
//
-
Destructor
virtual
~
directionalKSolidThermo
();
// Member Functions
...
...
@@ -136,14 +136,12 @@ public:
//- Read the directionalKSolidThermo properties
bool
read
(
const
dictionary
&
dict
);
// Ostream Operator
friend
Ostream
&
operator
<<
(
Ostream
&
os
,
const
directionalKSolidThermo
&
s
);
//- Ostream Operator
friend
Ostream
&
operator
<<
(
Ostream
&
os
,
const
directionalKSolidThermo
&
s
);
};
...
...
src/thermophysicalModels/basicSolidThermo/interpolatedSolidThermo/interpolateSolid/interpolateSolid.C
View file @
91128b31
...
...
@@ -31,7 +31,6 @@ License
Foam
::
interpolateSolid
::
interpolateSolid
(
const
dictionary
&
dict
)
{
read
(
dict
);
Info
<<
"Constructed directionalKSolidThermo with samples"
<<
nl
...
...
@@ -108,4 +107,6 @@ bool Foam::interpolateSolid::read(const dictionary& dict)
sigmaSValues_
=
Field
<
scalar
>
(
dict
.
lookup
(
"sigmaSValues"
));
return
true
;
}
// ************************************************************************* //
src/thermophysicalModels/basicSolidThermo/interpolatedSolidThermo/interpolateSolid/interpolateSolid.H
View file @
91128b31
...
...
@@ -44,7 +44,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class interpolateSolid Declaration
Class interpolateSolid Declaration
\*---------------------------------------------------------------------------*/
class
interpolateSolid
...
...
@@ -77,8 +77,7 @@ public:
//- Destructor
virtual
~
interpolateSolid
();
virtual
~
interpolateSolid
();
// Member Functions
...
...
src/thermophysicalModels/basicSolidThermo/interpolatedSolidThermo/interpolatedSolidThermo.H
View file @
91128b31
...
...
@@ -44,7 +44,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class interpolatedSolidThermo Declaration
Class interpolatedSolidThermo Declaration
\*---------------------------------------------------------------------------*/
class
interpolatedSolidThermo
...
...
@@ -119,14 +119,12 @@ public:
//- Read the interpolatedSolidThermo properties
bool
read
(
const
dictionary
&
dict
);
// Ostream Operator
friend
Ostream
&
operator
<<
(
Ostream
&
os
,
const
interpolatedSolidThermo
&
s
);
//- Ostream Operator
friend
Ostream
&
operator
<<
(
Ostream
&
os
,
const
interpolatedSolidThermo
&
s
);
};
...
...
src/thermophysicalModels/basicSolidThermo/isotropicKSolidThermo/isotropicKSolidThermo.H
View file @
91128b31
...
...
@@ -43,7 +43,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class isotropicKSolidThermo Declaration
Class isotropicKSolidThermo Declaration
\*---------------------------------------------------------------------------*/
class
isotropicKSolidThermo
...
...
@@ -71,9 +71,10 @@ public:
isotropicKSolidThermo
(
const
fvMesh
&
mesh
);
// Destructor
//
-
Destructor
virtual
~
isotropicKSolidThermo
();
// Member functions
//- Update properties
...
...
@@ -102,9 +103,7 @@ public:
//- Write properties
virtual
bool
writeData
(
Ostream
&
os
)
const
;
// Ostream Operator
//- Ostream Operator
friend
Ostream
&
operator
<<
(
Ostream
&
os
,
...
...
src/thermophysicalModels/basicSolidThermo/solidMixtureThermo/mixtures/multiComponentSolidMixture/multiComponentSolidMixture.H
View file @
91128b31
...
...
@@ -43,8 +43,9 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class multiComponentSolidMixture Declaration
Class multiComponentSolidMixture Declaration
\*---------------------------------------------------------------------------*/
template
<
class
ThermoSolidType
>
class
multiComponentSolidMixture
:
...
...
@@ -65,6 +66,7 @@ class multiComponentSolidMixture
//- Return molar fraction for component i in celli and at T
scalar
X
(
label
i
,
label
celli
,
scalar
T
)
const
;
public:
...
...
@@ -75,9 +77,8 @@ public:
//- Destructor
virtual
~
multiComponentSolidMixture
()
{}
virtual
~
multiComponentSolidMixture
()
{}
// Member Functions
...
...
@@ -92,7 +93,7 @@ public:
void
read
(
const
dictionary
&
);
// Cell
based properties
.
// Cell
-
based properties
//- Density
virtual
scalar
rho
(
scalar
T
,
label
celli
)
const
;
...
...
@@ -118,9 +119,8 @@ public:
//- Total enthalpy
virtual
scalar
h
(
scalar
T
,
label
celli
)
const
;
//-
Cp
//-
Specific heat capacity
virtual
scalar
Cp
(
scalar
T
,
label
celli
)
const
;
};
...
...
src/thermophysicalModels/basicSolidThermo/solidMixtureThermo/mixtures/reactingSolidMixture/reactingSolidMixture.H
View file @
91128b31
...
...
@@ -44,7 +44,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class reactingSolidMixture Declaration
Class reactingSolidMixture Declaration
\*---------------------------------------------------------------------------*/
template
<
class
ThermoSolidType
>
...
...
src/thermophysicalModels/basicSolidThermo/solidMixtureThermo/solidMixtureThermo/solidMixtureThermo.C
View file @
91128b31
...
...
@@ -104,8 +104,7 @@ void Foam::solidMixtureThermo<MixtureType>::correct()
template
<
class
MixtureType
>
const
Foam
::
volScalarField
&
Foam
::
solidMixtureThermo
<
MixtureType
>::
K
()
const
const
Foam
::
volScalarField
&
Foam
::
solidMixtureThermo
<
MixtureType
>::
K
()
const
{
return
K_
;
}
...
...
@@ -220,8 +219,7 @@ Foam::solidMixtureThermo<MixtureType>::Hf() const
template
<
class
MixtureType
>
Foam
::
tmp
<
Foam
::
scalarField
>
Foam
::
solidMixtureThermo
<
MixtureType
>::
rho
Foam
::
tmp
<
Foam
::
scalarField
>
Foam
::
solidMixtureThermo
<
MixtureType
>::
rho
(
const
label
patchI
)
const
...
...
@@ -243,8 +241,7 @@ Foam::solidMixtureThermo<MixtureType>::rho
template
<
class
MixtureType
>
Foam
::
tmp
<
Foam
::
scalarField
>
Foam
::
solidMixtureThermo
<
MixtureType
>::
Cp
Foam
::
tmp
<
Foam
::
scalarField
>
Foam
::
solidMixtureThermo
<
MixtureType
>::
Cp
(
const
label
patchI
)
const
...
...
@@ -266,8 +263,7 @@ Foam::solidMixtureThermo<MixtureType>::Cp
template
<
class
MixtureType
>