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
1f393aef
Commit
1f393aef
authored
2 years ago
by
Andrew Heather
Committed by
Mark OLESEN
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ENH: subModelBase - added log data member
parent
b94bf625
No related branches found
No related tags found
1 merge request
!583
ENH: added option to control log frequency of lagrangian calculations
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/OpenFOAM/primitives/subModelBase/subModelBase.C
+9
-10
9 additions, 10 deletions
src/OpenFOAM/primitives/subModelBase/subModelBase.C
src/OpenFOAM/primitives/subModelBase/subModelBase.H
+7
-1
7 additions, 1 deletion
src/OpenFOAM/primitives/subModelBase/subModelBase.H
with
16 additions
and
11 deletions
src/OpenFOAM/primitives/subModelBase/subModelBase.C
+
9
−
10
View file @
1f393aef
...
...
@@ -45,7 +45,8 @@ Foam::subModelBase::subModelBase(dictionary& properties)
dict_
(),
baseName_
(),
modelType_
(),
coeffDict_
()
coeffDict_
(),
log
(
properties
.
getOrDefault
<
bool
>
(
"log"
,
true
))
{}
...
...
@@ -63,7 +64,8 @@ Foam::subModelBase::subModelBase
dict_
(
dict
),
baseName_
(
baseName
),
modelType_
(
modelType
),
coeffDict_
(
dict
.
subDict
(
modelType
+
dictExt
))
coeffDict_
(
dict
.
subDict
(
modelType
+
dictExt
)),
log
(
coeffDict_
.
getOrDefault
<
bool
>
(
"log"
,
true
))
{}
...
...
@@ -81,7 +83,8 @@ Foam::subModelBase::subModelBase
dict_
(
dict
),
baseName_
(
baseName
),
modelType_
(
modelType
),
coeffDict_
(
dict
)
coeffDict_
(
dict
),
log
(
coeffDict_
.
getOrDefault
<
bool
>
(
"log"
,
true
))
{}
...
...
@@ -92,13 +95,8 @@ Foam::subModelBase::subModelBase(const subModelBase& smb)
dict_
(
smb
.
dict_
),
baseName_
(
smb
.
baseName_
),
modelType_
(
smb
.
modelType_
),
coeffDict_
(
smb
.
coeffDict_
)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam
::
subModelBase
::~
subModelBase
()
coeffDict_
(
smb
.
coeffDict_
),
log
(
coeffDict_
.
getOrDefault
<
bool
>
(
"log"
,
true
))
{}
...
...
@@ -145,6 +143,7 @@ bool Foam::subModelBase::defaultCoeffs(const bool printMsg) const
bool
def
=
coeffDict_
.
getOrDefault
(
"defaultCoeffs"
,
false
);
if
(
printMsg
&&
def
)
{
// Note: not using Log<< for output
Info
<<
incrIndent
;
Info
<<
indent
<<
"Employing default coefficients"
<<
endl
;
Info
<<
decrIndent
;
...
...
This diff is collapsed.
Click to expand it.
src/OpenFOAM/primitives/subModelBase/subModelBase.H
+
7
−
1
View file @
1f393aef
...
...
@@ -91,6 +91,12 @@ protected:
public:
// Public Data
//- Flag to write log into Info
bool
log
;
// Constructors
//- Construct null
...
...
@@ -121,7 +127,7 @@ public:
//- Destructor
virtual
~
subModelBase
();
virtual
~
subModelBase
()
=
default
;
// Member Functions
...
...
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