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
309120d5
Commit
309120d5
authored
12 years ago
by
andy
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Added null constructor to basicSourceList
parent
ac8af99b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/fieldSources/basicSource/basicSource/basicSourceList.C
+17
-3
17 additions, 3 deletions
src/fieldSources/basicSource/basicSource/basicSourceList.C
src/fieldSources/basicSource/basicSource/basicSourceList.H
+7
-1
7 additions, 1 deletion
src/fieldSources/basicSource/basicSource/basicSourceList.H
with
24 additions
and
4 deletions
src/fieldSources/basicSource/basicSource/basicSourceList.C
+
17
−
3
View file @
309120d5
...
@@ -62,6 +62,22 @@ Foam::basicSourceList::basicSourceList
...
@@ -62,6 +62,22 @@ Foam::basicSourceList::basicSourceList
PtrList
<
basicSource
>
(),
PtrList
<
basicSource
>
(),
mesh_
(
mesh
),
mesh_
(
mesh
),
checkTimeIndex_
(
mesh_
.
time
().
startTimeIndex
()
+
2
)
checkTimeIndex_
(
mesh_
.
time
().
startTimeIndex
()
+
2
)
{
reset
(
dict
);
}
Foam
::
basicSourceList
::
basicSourceList
(
const
fvMesh
&
mesh
)
:
PtrList
<
basicSource
>
(),
mesh_
(
mesh
),
checkTimeIndex_
(
mesh_
.
time
().
startTimeIndex
()
+
2
)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void
Foam
::
basicSourceList
::
reset
(
const
dictionary
&
dict
)
{
{
label
count
=
0
;
label
count
=
0
;
forAllConstIter
(
dictionary
,
dict
,
iter
)
forAllConstIter
(
dictionary
,
dict
,
iter
)
...
@@ -85,15 +101,13 @@ Foam::basicSourceList::basicSourceList
...
@@ -85,15 +101,13 @@ Foam::basicSourceList::basicSourceList
this
->
set
this
->
set
(
(
i
++
,
i
++
,
basicSource
::
New
(
name
,
sourceDict
,
mesh
)
basicSource
::
New
(
name
,
sourceDict
,
mesh
_
)
);
);
}
}
}
}
}
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool
Foam
::
basicSourceList
::
read
(
const
dictionary
&
dict
)
bool
Foam
::
basicSourceList
::
read
(
const
dictionary
&
dict
)
{
{
checkTimeIndex_
=
mesh_
.
time
().
timeIndex
()
+
2
;
checkTimeIndex_
=
mesh_
.
time
().
timeIndex
()
+
2
;
...
...
This diff is collapsed.
Click to expand it.
src/fieldSources/basicSource/basicSource/basicSourceList.H
+
7
−
1
View file @
309120d5
...
@@ -84,7 +84,10 @@ public:
...
@@ -84,7 +84,10 @@ public:
// Constructors
// Constructors
//- Construct from components with list of field names
//- Construct null
basicSourceList
(
const
fvMesh
&
mesh
);
//- Construct from mesh and dictionary
basicSourceList
(
const
fvMesh
&
mesh
,
const
dictionary
&
dict
);
basicSourceList
(
const
fvMesh
&
mesh
,
const
dictionary
&
dict
);
...
@@ -95,6 +98,9 @@ public:
...
@@ -95,6 +98,9 @@ public:
// Member Functions
// Member Functions
//- Reset the source list
void
reset
(
const
dictionary
&
dict
);
//- Correct
//- Correct
template
<
class
Type
>
template
<
class
Type
>
void
correct
(
GeometricField
<
Type
,
fvPatchField
,
volMesh
>&
fld
);
void
correct
(
GeometricField
<
Type
,
fvPatchField
,
volMesh
>&
fld
);
...
...
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