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
a7524700
Commit
a7524700
authored
6 years ago
by
mattijs
Browse files
Options
Downloads
Patches
Plain Diff
ENH: overset: overlap communications
parent
386450ed
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/overset/oversetPolyPatch/oversetFvPatchField.C
+60
-3
60 additions, 3 deletions
src/overset/oversetPolyPatch/oversetFvPatchField.C
src/overset/oversetPolyPatch/oversetFvPatchField.H
+20
-0
20 additions, 0 deletions
src/overset/oversetPolyPatch/oversetFvPatchField.H
with
80 additions
and
3 deletions
src/overset/oversetPolyPatch/oversetFvPatchField.C
+
60
−
3
View file @
a7524700
...
...
@@ -211,6 +211,59 @@ void Foam::oversetFvPatchField<Type>::initEvaluate
}
template
<
class
Type
>
void
Foam
::
oversetFvPatchField
<
Type
>::
initInterfaceMatrixUpdate
(
scalarField
&
,
const
bool
add
,
const
scalarField
&
psiInternal
,
const
scalarField
&
,
const
direction
,
const
Pstream
::
commsTypes
commsType
)
const
{
// Add remote values
const
oversetFvPatch
&
ovp
=
this
->
oversetPatch_
;
if
(
ovp
.
master
())
{
const
fvMesh
&
mesh
=
this
->
patch
().
boundaryMesh
().
mesh
();
// Try to find out if the solve routine comes from the mesh
// TBD. This should be cleaner.
if
(
&
mesh
.
lduAddr
()
==
&
mesh
.
fvMesh
::
lduAddr
())
{
return
;
}
const
mapDistribute
&
map
=
ovp
.
cellInterpolationMap
();
// Transfer the current state (similar to processorFvPatchField). Note
// use of separate tag to avoid clashes with any outstanding processor
// exchanges
if
(
this
->
pBufs_
.
valid
())
{
this
->
pBufs_
().
clear
();
}
else
{
this
->
pBufs_
.
set
(
new
PstreamBuffers
(
Pstream
::
commsTypes
::
nonBlocking
,
UPstream
::
msgType
()
+
1
)
);
}
// Start sending
map
.
mapDistributeBase
::
send
(
this
->
pBufs_
(),
psiInternal
);
}
}
template
<
class
Type
>
void
Foam
::
oversetFvPatchField
<
Type
>::
updateInterfaceMatrix
(
...
...
@@ -251,11 +304,14 @@ void Foam::oversetFvPatchField<Type>::updateInterfaceMatrix
const
scalarList
&
factor
=
ovp
.
cellInterpolationWeight
();
const
scalarField
&
normalisation
=
ovp
.
normalisation
();
// Since we're inside initEvaluate/evaluate there might be processor
// comms underway. Change the tag we use.
scalarField
work
(
psiInternal
);
map
.
mapDistributeBase
::
distribute
(
work
,
UPstream
::
msgType
()
+
1
);
//scalarField work(psiInternal);
//map.mapDistributeBase::distribute(work, UPstream::msgType()+1);
// Receive the outstanding data
scalarField
work
;
map
.
receive
(
this
->
pBufs_
(),
work
);
forAll
(
cellIDs
,
i
)
{
...
...
@@ -263,6 +319,7 @@ void Foam::oversetFvPatchField<Type>::updateInterfaceMatrix
const
scalarList
&
w
=
wghts
[
celli
];
const
labelList
&
nbrs
=
stencil
[
celli
];
scalar
f
=
factor
[
celli
];
const
scalar
norm
=
normalisation
[
celli
];
...
...
This diff is collapsed.
Click to expand it.
src/overset/oversetPolyPatch/oversetFvPatchField.H
+
20
−
0
View file @
a7524700
...
...
@@ -56,6 +56,14 @@ class oversetFvPatchField
:
public
semiImplicitOversetFvPatchField
<
Type
>
{
protected:
// Protected data
//- Send/receive buffer
mutable
autoPtr
<
PstreamBuffers
>
pBufs_
;
public:
//- Runtime type information
...
...
@@ -127,6 +135,18 @@ public:
//- Initialise the evaluation of the patch field
virtual
void
initEvaluate
(
const
Pstream
::
commsTypes
commsType
);
//- Initialise neighbour matrix update. Add
// or subtract coupled contributions to matrix
virtual
void
initInterfaceMatrixUpdate
(
scalarField
&
,
const
bool
add
,
const
scalarField
&
,
const
scalarField
&
,
const
direction
,
const
Pstream
::
commsTypes
commsType
)
const
;
//- Update result field based on interface functionality
virtual
void
updateInterfaceMatrix
(
...
...
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