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
12a1e428
Commit
12a1e428
authored
9 years ago
by
Henry Weller
Browse files
Options
Downloads
Patches
Plain Diff
patchInjection: Check for 0-patches
parent
cceebf06
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/patchInjection/patchInjection.C
+13
-1
13 additions, 1 deletion
.../kinematic/injectionModel/patchInjection/patchInjection.C
with
13 additions
and
1 deletion
src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/patchInjection/patchInjection.C
+
13
−
1
View file @
12a1e428
...
@@ -82,6 +82,13 @@ patchInjection::patchInjection
...
@@ -82,6 +82,13 @@ patchInjection::patchInjection
patchInjectedMasses_
.
setSize
(
pbm
.
size
(),
0
);
patchInjectedMasses_
.
setSize
(
pbm
.
size
(),
0
);
}
}
if
(
!
patchIDs_
.
size
())
{
FatalErrorIn
(
"patchInjection::patchInjection"
)
<<
"No patches selected"
<<
exit
(
FatalError
);
}
}
}
...
@@ -100,6 +107,9 @@ void patchInjection::correct
...
@@ -100,6 +107,9 @@ void patchInjection::correct
scalarField
&
diameterToInject
scalarField
&
diameterToInject
)
)
{
{
// Do not correct if no patches selected
if
(
!
patchIDs_
.
size
())
return
;
const
scalarField
&
delta
=
owner
().
delta
();
const
scalarField
&
delta
=
owner
().
delta
();
const
scalarField
&
rho
=
owner
().
rho
();
const
scalarField
&
rho
=
owner
().
rho
();
const
scalarField
&
magSf
=
owner
().
magSf
();
const
scalarField
&
magSf
=
owner
().
magSf
();
...
@@ -160,6 +170,9 @@ void patchInjection::correct
...
@@ -160,6 +170,9 @@ void patchInjection::correct
void
patchInjection
::
patchInjectedMassTotals
(
scalarField
&
patchMasses
)
const
void
patchInjection
::
patchInjectedMassTotals
(
scalarField
&
patchMasses
)
const
{
{
// Do not correct if no patches selected
if
(
!
patchIDs_
.
size
())
return
;
scalarField
patchInjectedMasses
scalarField
patchInjectedMasses
(
(
getModelProperty
<
scalarField
>
getModelProperty
<
scalarField
>
...
@@ -170,7 +183,6 @@ void patchInjection::patchInjectedMassTotals(scalarField& patchMasses) const
...
@@ -170,7 +183,6 @@ void patchInjection::patchInjectedMassTotals(scalarField& patchMasses) const
);
);
scalarField
patchInjectedMassTotals
(
patchInjectedMasses_
);
scalarField
patchInjectedMassTotals
(
patchInjectedMasses_
);
//combineReduce(patchInjectedMassTotals, plusEqOp<scalarField>());
Pstream
::
listCombineGather
(
patchInjectedMassTotals
,
plusEqOp
<
scalar
>
());
Pstream
::
listCombineGather
(
patchInjectedMassTotals
,
plusEqOp
<
scalar
>
());
forAll
(
patchIDs_
,
pidi
)
forAll
(
patchIDs_
,
pidi
)
...
...
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