Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
avalanche
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Community
avalanche
Commits
a82a2f62
Commit
a82a2f62
authored
Nov 20, 2018
by
Mark Olesen
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: use dictionary guarded access for dimensioned types
parent
31bbd299
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
60 additions
and
66 deletions
+60
-66
applications/solvers/implicitSolver/readTransportProperties.H
...ications/solvers/implicitSolver/readTransportProperties.H
+2
-2
applications/utilities/slopeMesh/elevationModels/elevationModel/elevationModelNew.C
...peMesh/elevationModels/elevationModel/elevationModelNew.C
+4
-1
applications/utilities/slopeMesh/slopeMesh.C
applications/utilities/slopeMesh/slopeMesh.C
+8
-15
src/avalanche/deposition/Stoppingprofile/Stoppingprofile.C
src/avalanche/deposition/Stoppingprofile/Stoppingprofile.C
+5
-5
src/avalanche/deposition/depositionModel/depositionModel.C
src/avalanche/deposition/depositionModel/depositionModel.C
+1
-1
src/avalanche/deposition/depositionModel/depositionModelNew.C
...avalanche/deposition/depositionModel/depositionModelNew.C
+1
-1
src/avalanche/entrainment/Erosionenergy/Erosionenergy.C
src/avalanche/entrainment/Erosionenergy/Erosionenergy.C
+2
-2
src/avalanche/entrainment/Front/Front.C
src/avalanche/entrainment/Front/Front.C
+2
-2
src/avalanche/entrainment/IsslerFC/IsslerFC.C
src/avalanche/entrainment/IsslerFC/IsslerFC.C
+4
-5
src/avalanche/entrainment/Medina/Medina.C
src/avalanche/entrainment/Medina/Medina.C
+4
-4
src/avalanche/entrainment/entrainmentModel/entrainmentModel.C
...avalanche/entrainment/entrainmentModel/entrainmentModel.C
+1
-1
src/avalanche/entrainment/entrainmentModel/entrainmentModelNew.C
...lanche/entrainment/entrainmentModel/entrainmentModelNew.C
+1
-1
src/avalanche/friction/DarcyWeisbach/DarcyWeisbach.C
src/avalanche/friction/DarcyWeisbach/DarcyWeisbach.C
+2
-2
src/avalanche/friction/ManningStrickler/ManningStrickler.C
src/avalanche/friction/ManningStrickler/ManningStrickler.C
+2
-2
src/avalanche/friction/PoliquenForterre/PoliquenForterre.C
src/avalanche/friction/PoliquenForterre/PoliquenForterre.C
+6
-6
src/avalanche/friction/Voellmy/Voellmy.C
src/avalanche/friction/Voellmy/Voellmy.C
+3
-3
src/avalanche/friction/frictionModel/frictionModel.C
src/avalanche/friction/frictionModel/frictionModel.C
+3
-3
src/avalanche/friction/frictionModel/frictionModelNew.C
src/avalanche/friction/frictionModel/frictionModelNew.C
+2
-3
src/avalanche/friction/kt/kt.C
src/avalanche/friction/kt/kt.C
+2
-2
src/avalanche/friction/muI/muI.C
src/avalanche/friction/muI/muI.C
+5
-5
No files found.
applications/solvers/implicitSolver/readTransportProperties.H
View file @
a82a2f62
...
...
@@ -25,9 +25,9 @@ autoPtr<depositionModel> deposition
depositionModel
::
New
(
transportProperties
,
Us
,
h
,
hentrain
,
pb
,
tau
)
);
dimensionedScalar
hmin
(
transportProperties
.
lookup
(
"hmin"
)
);
dimensionedScalar
hmin
(
"hmin"
,
dimLength
,
transportProperties
);
dimensionedScalar
xi
(
transportProperties
.
lookup
(
"xi"
)
);
dimensionedScalar
xi
(
"xi"
,
dimless
,
transportProperties
);
Switch
pressureFeedback
(
transportProperties
.
lookup
(
"pressureFeedback"
));
...
...
applications/utilities/slopeMesh/elevationModels/elevationModel/elevationModelNew.C
View file @
a82a2f62
...
...
@@ -41,7 +41,10 @@ autoPtr<elevationModel> elevationModel::New
const
dictionary
&
elevationProperties
)
{
word
elevationModelTypeName
(
elevationProperties
.
lookup
(
"elevationModel"
));
const
word
elevationModelTypeName
(
elevationProperties
.
get
<
word
>
(
"elevationModel"
)
);
Info
<<
"Selecting elevation model "
<<
elevationModelTypeName
<<
endl
;
...
...
applications/utilities/slopeMesh/slopeMesh.C
View file @
a82a2f62
...
...
@@ -74,23 +74,16 @@ int main(int argc, char *argv[])
);
label
cellCountX
,
cellCountY
;
scalar
minX
,
maxX
,
minY
,
maxY
,
meshH
;
Switch
tri
;
demMeshDict
.
lookup
(
"cellCountX"
)
>>
cellCountX
;
demMeshDict
.
lookup
(
"cellCountY"
)
>>
cellCountY
;
demMeshDict
.
lookup
(
"minX"
)
>>
minX
;
demMeshDict
.
lookup
(
"maxX"
)
>>
maxX
;
demMeshDict
.
lookup
(
"minY"
)
>>
minY
;
demMeshDict
.
lookup
(
"maxY"
)
>>
maxY
;
demMeshDict
.
lookup
(
"h"
)
>>
meshH
;
const
label
cellCountX
=
demMeshDict
.
get
<
label
>
(
"cellCountX"
);
const
label
cellCountY
=
demMeshDict
.
get
<
label
>
(
"cellCountY"
);
const
label
cellCountZ
=
1
;
const
scalar
minX
=
demMeshDict
.
get
<
scalar
>
(
"minX"
);
const
scalar
maxX
=
demMeshDict
.
get
<
scalar
>
(
"maxX"
);
const
scalar
minY
=
demMeshDict
.
get
<
scalar
>
(
"minY"
);
const
scalar
maxY
=
demMeshDict
.
get
<
scalar
>
(
"maxY"
);
const
scalar
meshH
=
demMeshDict
.
get
<
scalar
>
(
"h"
);
const
scalar
cellCount
=
cellCountX
*
cellCountY
;
const
scalar
pointCount
=
(
cellCountZ
+
1
)
*
(
cellCountX
+
1
)
*
(
cellCountY
+
1
);
const
scalar
dx
=
(
maxX
-
minX
)
/
cellCountX
;
...
...
src/avalanche/deposition/Stoppingprofile/Stoppingprofile.C
View file @
a82a2f62
...
...
@@ -56,8 +56,8 @@ Foam::depositionModels::Stoppingprofile::Stoppingprofile
)
:
depositionModel
(
type
(),
depositionProperties
,
Us
,
h
,
hentrain
,
pb
,
tau
),
ud_
(
coeffDict_
.
lookup
(
"ud"
)
),
ad_
(
coeffDict_
.
lookup
(
"ad"
)
),
ud_
(
"ud"
,
coeffDict_
),
ad_
(
"ad"
,
coeffDict_
),
gs_
(
Us
.
db
().
lookupObject
<
areaVectorField
>
(
"gs"
)),
gn_
(
Us
.
db
().
lookupObject
<
areaScalarField
>
(
"gn"
))
{
...
...
@@ -88,7 +88,7 @@ Foam::depositionModels::Stoppingprofile::Sd() const
&
Us_
.
oldTime
()
/
(
mag
(
Us_
.
oldTime
())
+
smallVel
)
);
hUddt
=
min
(
hUddt
,
dimensionedScalar
(
"zero"
,
hUddt
.
dimensions
(),
0
));
hUddt
=
min
(
hUddt
,
dimensionedScalar
(
hUddt
.
dimensions
(),
Zero
));
Sd_
=
-
a
/
(
mag
(
Us_
.
oldTime
())
+
smallVel
)
*
hUddt
;
Sd_
=
max
(
Sd_
,
dimensionedScalar
(
dimVelocity
));
Sd_
=
min
(
Sd_
,
h_
/
Us_
.
db
().
time
().
deltaT
());
...
...
@@ -111,8 +111,8 @@ bool Foam::depositionModels::Stoppingprofile::read
{
readDict
(
type
(),
depositionProperties
);
coeffDict_
.
lookup
(
"ud"
)
>>
ud_
;
coeffDict_
.
lookup
(
"ad"
)
>>
ad_
;
coeffDict_
.
readEntry
(
"ud"
,
ud_
)
;
coeffDict_
.
readEntry
(
"ad"
,
ad_
)
;
return
true
;
}
...
...
src/avalanche/deposition/depositionModel/depositionModel.C
View file @
a82a2f62
...
...
@@ -70,7 +70,7 @@ Foam::depositionModel::depositionModel
(
depositionProperties_
.
optionalSubDict
(
type
+
"Coeffs"
)
),
rho_
(
depositionProperties_
.
lookup
(
"rho"
)
),
rho_
(
"rho"
,
dimDensity
,
depositionProperties_
),
Us_
(
Us
),
h_
(
h
),
hentrain_
(
hentrain
),
...
...
src/avalanche/deposition/depositionModel/depositionModelNew.C
View file @
a82a2f62
...
...
@@ -41,7 +41,7 @@ Foam::autoPtr<Foam::depositionModel> Foam::depositionModel::New
)
{
const
word
modelName
(
deposition
.
lookup
(
"depositionModel"
));
const
word
modelName
(
deposition
.
get
<
word
>
(
"depositionModel"
));
Info
<<
"Selecting deposition model "
<<
modelName
<<
endl
;
...
...
src/avalanche/entrainment/Erosionenergy/Erosionenergy.C
View file @
a82a2f62
...
...
@@ -56,7 +56,7 @@ Foam::entrainmentModels::Erosionenergy::Erosionenergy
)
:
entrainmentModel
(
type
(),
entrainmentProperties
,
Us
,
h
,
hentrain
,
pb
,
tau
),
eb_
(
coeffDict_
.
lookup
(
"eb"
)
),
eb_
(
"eb"
,
sqr
(
dimLength
/
dimTime
),
coeffDict_
),
gs_
(
Us_
.
db
().
lookupObject
<
areaVectorField
>
(
"gs"
)),
gn_
(
Us_
.
db
().
lookupObject
<
areaScalarField
>
(
"gn"
))
{
...
...
@@ -83,7 +83,7 @@ bool Foam::entrainmentModels::Erosionenergy::read
{
readDict
(
type
(),
entrainmentProperties
);
coeffDict_
.
lookup
(
"eb"
)
>>
eb_
;
coeffDict_
.
readEntry
(
"eb"
,
eb_
)
;
return
true
;
}
...
...
src/avalanche/entrainment/Front/Front.C
View file @
a82a2f62
...
...
@@ -56,7 +56,7 @@ Foam::entrainmentModels::Front::Front
)
:
entrainmentModel
(
type
(),
entrainmentProperties
,
Us
,
h
,
hentrain
,
pb
,
tau
),
htrigger_
(
coeffDict_
.
lookup
(
"htrigger"
)
)
htrigger_
(
"htrigger"
,
coeffDict_
)
{
Info
<<
" "
<<
htrigger_
<<
endl
<<
endl
;
}
...
...
@@ -82,7 +82,7 @@ bool Foam::entrainmentModels::Front::read
{
readDict
(
type
(),
entrainmentProperties
);
coeffDict_
.
lookup
(
"htrigger"
)
>>
htrigger_
;
coeffDict_
.
readEntry
(
"htrigger"
,
htrigger_
)
;
return
true
;
}
...
...
src/avalanche/entrainment/IsslerFC/IsslerFC.C
View file @
a82a2f62
...
...
@@ -56,10 +56,9 @@ Foam::entrainmentModels::IsslerFC::IsslerFC
)
:
entrainmentModel
(
type
(),
entrainmentProperties
,
Us
,
h
,
hentrain
,
pb
,
tau
),
tauc_
(
coeffDict_
.
lookup
(
"tauc"
)),
mu_
(
coeffDict_
.
lookup
(
"mu"
)),
K_
(
coeffDict_
.
lookup
(
"K"
)),
tauc_
(
"tauc"
,
coeffDict_
),
mu_
(
"mu"
,
coeffDict_
),
K_
(
"K"
,
coeffDict_
),
gs_
(
Us
.
db
().
lookupObject
<
areaVectorField
>
(
"gs"
)),
gn_
(
Us
.
db
().
lookupObject
<
areaScalarField
>
(
"gn"
))
{
...
...
@@ -113,7 +112,7 @@ bool Foam::entrainmentModels::IsslerFC::read
{
readDict
(
type
(),
entrainmentProperties
);
coeffDict_
.
lookup
(
"tauc"
)
>>
tauc_
;
coeffDict_
.
readEntry
(
"tauc"
,
tauc_
)
;
return
true
;
}
...
...
src/avalanche/entrainment/Medina/Medina.C
View file @
a82a2f62
...
...
@@ -56,8 +56,8 @@ Foam::entrainmentModels::Medina::Medina
)
:
entrainmentModel
(
type
(),
entrainmentProperties
,
Us
,
h
,
hentrain
,
pb
,
tau
),
tauc_
(
coeffDict_
.
lookup
(
"tauc"
)
),
mu_
(
coeffDict_
.
lookup
(
"mu"
)
),
tauc_
(
"tauc"
,
coeffDict_
),
mu_
(
"mu"
,
coeffDict_
),
gs_
(
Us_
.
db
().
lookupObject
<
areaVectorField
>
(
"gs"
)),
gn_
(
Us_
.
db
().
lookupObject
<
areaScalarField
>
(
"gn"
))
{
...
...
@@ -92,8 +92,8 @@ bool Foam::entrainmentModels::Medina::read
{
readDict
(
type
(),
entrainmentProperties
);
coeffDict_
.
lookup
(
"tauc"
)
>>
tauc_
;
coeffDict_
.
lookup
(
"mu"
)
>>
mu_
;
coeffDict_
.
readEntry
(
"tauc"
,
tauc_
)
;
coeffDict_
.
readEntry
(
"mu"
,
mu_
)
;
return
true
;
}
...
...
src/avalanche/entrainment/entrainmentModel/entrainmentModel.C
View file @
a82a2f62
...
...
@@ -70,7 +70,7 @@ Foam::entrainmentModel::entrainmentModel
(
entrainmentProperties_
.
optionalSubDict
(
type
+
"Coeffs"
)
),
rho_
(
entrainmentProperties_
.
lookup
(
"rho"
)
),
rho_
(
"rho"
,
dimDensity
,
entrainmentProperties_
),
Us_
(
Us
),
h_
(
h
),
hentrain_
(
hentrain
),
...
...
src/avalanche/entrainment/entrainmentModel/entrainmentModelNew.C
View file @
a82a2f62
...
...
@@ -40,7 +40,7 @@ Foam::autoPtr<Foam::entrainmentModel> Foam::entrainmentModel::New
const
areaVectorField
&
tau
)
{
const
word
modelName
(
entrainmentProperties
.
lookup
(
"entrainmentModel"
));
const
word
modelName
(
entrainmentProperties
.
get
<
word
>
(
"entrainmentModel"
));
Info
<<
"Selecting entrainment model "
<<
modelName
<<
endl
;
...
...
src/avalanche/friction/DarcyWeisbach/DarcyWeisbach.C
View file @
a82a2f62
...
...
@@ -52,8 +52,8 @@ Foam::frictionModels::DarcyWeisbach::DarcyWeisbach
)
:
frictionModel
(
type
(),
frictionProperties
,
Us
,
h
,
p
),
Cf_
(
coeffDict_
.
lookup
(
"Cf"
)
),
g_
(
coeffDict_
.
lookup
(
"g"
)
)
Cf_
(
"Cf"
,
coeffDict_
),
g_
(
"g"
,
coeffDict_
)
{
Info
<<
" "
<<
Cf_
<<
nl
<<
endl
;
}
...
...
src/avalanche/friction/ManningStrickler/ManningStrickler.C
View file @
a82a2f62
...
...
@@ -52,8 +52,8 @@ Foam::frictionModels::ManningStrickler::ManningStrickler
)
:
frictionModel
(
type
(),
frictionProperties
,
Us
,
h
,
p
),
n_
(
coeffDict_
.
lookup
(
"n"
)
),
g_
(
coeffDict_
.
lookup
(
"g"
)
)
n_
(
"n"
,
coeffDict_
),
g_
(
"g"
,
coeffDict_
)
{
Info
<<
" "
<<
n_
<<
nl
<<
" "
<<
g_
<<
nl
<<
endl
;
...
...
src/avalanche/friction/PoliquenForterre/PoliquenForterre.C
View file @
a82a2f62
...
...
@@ -53,12 +53,12 @@ Foam::frictionModels::PoliquenForterre::PoliquenForterre
)
:
frictionModel
(
type
(),
frictionProperties
,
Us
,
h
,
p
),
L_
(
coeffDict_
.
lookup
(
"L"
)
),
beta_
(
coeffDict_
.
lookup
(
"beta"
)
),
zeta1_
(
coeffDict_
.
lookup
(
"zeta1"
)
),
zeta2_
(
coeffDict_
.
lookup
(
"zeta2"
)
),
zeta3_
(
coeffDict_
.
lookup
(
"zeta3"
)
),
gamma_
(
coeffDict_
.
lookup
(
"gamma"
)
),
L_
(
"L"
,
coeffDict_
),
beta_
(
"beta"
,
coeffDict_
),
zeta1_
(
"zeta1"
,
coeffDict_
),
zeta2_
(
"zeta2"
,
coeffDict_
),
zeta3_
(
"zeta3"
,
coeffDict_
),
gamma_
(
"gamma"
,
coeffDict_
),
mu_
(
IOobject
...
...
src/avalanche/friction/Voellmy/Voellmy.C
View file @
a82a2f62
...
...
@@ -52,8 +52,8 @@ Foam::frictionModels::Voellmy::Voellmy
)
:
frictionModel
(
type
(),
frictionProperties
,
Us
,
h
,
p
),
mu_
(
coeffDict_
.
lookup
(
"mu"
)
),
xi_
(
coeffDict_
.
lookup
(
"xi"
)
)
mu_
(
"mu"
,
dimless
,
coeffDict_
),
xi_
(
"xi"
,
dimless
,
coeffDict_
)
{
Info
<<
" "
<<
mu_
<<
nl
<<
" "
<<
xi_
<<
nl
<<
endl
;
...
...
@@ -100,7 +100,7 @@ bool Foam::frictionModels::Voellmy::read
{
readDict
(
type
(),
frictionProperties
);
//frictionProperties_.
lookup("nu") >> nu0_
;
//frictionProperties_.
readEntry("nu", nu0_)
;
return
true
;
}
...
...
src/avalanche/friction/frictionModel/frictionModel.C
View file @
a82a2f62
...
...
@@ -81,9 +81,9 @@ Foam::frictionModel::frictionModel
(
frictionProperties_
.
optionalSubDict
(
type
+
"Coeffs"
)
),
rho_
(
frictionProperties_
.
lookup
(
"rho"
)
),
u0_
(
frictionProperties_
.
lookup
(
"u0"
)
),
h0_
(
frictionProperties_
.
lookup
(
"h0"
)
),
rho_
(
"rho"
,
dimDensity
,
frictionProperties_
),
u0_
(
"u0"
,
dimVelocity
,
frictionProperties_
),
h0_
(
"h0"
,
dimLength
,
frictionProperties_
),
Us_
(
Us
),
h_
(
h
),
p_
(
p
),
...
...
src/avalanche/friction/frictionModel/frictionModelNew.C
View file @
a82a2f62
...
...
@@ -38,10 +38,9 @@ Foam::autoPtr<Foam::frictionModel> Foam::frictionModel::New
const
areaScalarField
&
p
)
{
const
word
modelName
(
frictionProperties
.
lookup
(
"frictionModel"
));
const
word
modelName
(
frictionProperties
.
get
<
word
>
(
"frictionModel"
));
Info
<<
"Selecting friction model "
<<
modelName
<<
endl
;
Info
<<
"Selecting friction model "
<<
modelName
<<
nl
;
auto
cstrIter
=
dictionaryConstructorTablePtr_
->
cfind
(
modelName
);
...
...
src/avalanche/friction/kt/kt.C
View file @
a82a2f62
...
...
@@ -52,8 +52,8 @@ Foam::frictionModels::kt::kt
)
:
frictionModel
(
type
(),
frictionProperties
,
Us
,
h
,
p
),
mu_
(
coeffDict_
.
lookup
(
"mu"
)
),
chi_
(
coeffDict_
.
lookup
(
"chi"
)
)
mu_
(
"mu"
,
coeffDict_
),
chi_
(
"chi"
,
coeffDict_
)
{
Info
<<
" "
<<
mu_
<<
nl
<<
" "
<<
chi_
<<
nl
<<
endl
;
...
...
src/avalanche/friction/muI/muI.C
View file @
a82a2f62
...
...
@@ -52,11 +52,11 @@ Foam::frictionModels::MuI::MuI
)
:
frictionModel
(
type
(),
frictionProperties
,
Us
,
h
,
p
),
d_
(
coeffDict_
.
lookup
(
"d"
)
),
rhop_
(
coeffDict_
.
lookup
(
"rho_p"
)
),
mus_
(
coeffDict_
.
lookup
(
"mu_s"
)
),
mu2_
(
coeffDict_
.
lookup
(
"mu_2"
)
),
I0_
(
coeffDict_
.
lookup
(
"I_0"
)
),
d_
(
"d"
,
dimLength
,
coeffDict_
),
rhop_
(
"rho_p"
,
dimDensity
,
coeffDict_
),
mus_
(
"mu_s"
,
dimless
,
coeffDict_
),
mu2_
(
"mu_2"
,
dimless
,
coeffDict_
),
I0_
(
"I_0"
,
dimless
,
coeffDict_
),
mu_
(
IOobject
...
...
Andrew Heather
@andy
mentioned in commit
6106b0f8
·
Dec 18, 2018
mentioned in commit
6106b0f8
mentioned in commit 6106b0f8f4fd02a920f5bf46e3909fcb755b8805
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment