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
e7e1313b
Commit
e7e1313b
authored
16 years ago
by
mattijs
Browse files
Options
Downloads
Patches
Plain Diff
use meshPoint numbering
parent
596ae902
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/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.C
+18
-37
18 additions, 37 deletions
...tchFields/constraint/processor/processorPointPatchField.C
with
18 additions
and
37 deletions
src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.C
+
18
−
37
View file @
e7e1313b
...
@@ -103,29 +103,13 @@ void processorPointPatchField<Type>::initSwapAdd(Field<Type>& pField) const
...
@@ -103,29 +103,13 @@ void processorPointPatchField<Type>::initSwapAdd(Field<Type>& pField) const
// Get internal field into my point order
// Get internal field into my point order
Field
<
Type
>
pf
(
this
->
patchInternalField
(
pField
));
Field
<
Type
>
pf
(
this
->
patchInternalField
(
pField
));
// Normally points will be ordered same on both sides due to
OPstream
::
write
// the point numbering by decomposePar. However this will not be
(
// the case for meshes changed in parallel.
Pstream
::
blocking
,
procPatch_
.
neighbProcNo
(),
// Reorder into neighbour point order. Note that one side can have
reinterpret_cast
<
const
char
*>
(
pf
.
begin
()),
// more or less points than other side if partically decomposed
pf
.
byteSize
()
// cyclics are present.
);
const
labelList
&
nbrPts
=
procPatch_
.
procPolyPatch
().
neighbPoints
();
Field
<
Type
>
nbrf
(
this
->
size
(),
pTraits
<
Type
>::
zero
);
forAll
(
nbrPts
,
i
)
{
label
nbrPointI
=
nbrPts
[
i
];
if
(
nbrPointI
>=
0
&&
nbrPointI
<
nbrf
.
size
())
{
nbrf
[
nbrPointI
]
=
pf
[
i
];
}
}
OPstream
toNbr
(
Pstream
::
blocking
,
procPatch_
.
neighbProcNo
());
toNbr
<<
nbrf
;
}
}
}
}
...
@@ -136,26 +120,19 @@ void processorPointPatchField<Type>::swapAdd(Field<Type>& pField) const
...
@@ -136,26 +120,19 @@ void processorPointPatchField<Type>::swapAdd(Field<Type>& pField) const
if
(
Pstream
::
parRun
())
if
(
Pstream
::
parRun
())
{
{
Field
<
Type
>
pnf
(
this
->
size
());
Field
<
Type
>
pnf
(
this
->
size
());
{
// We do not know the number of points on the other side
// so cannot use Pstream::read.
IPstream
fromNbr
(
Pstream
::
blocking
,
procPatch_
.
neighbProcNo
()
);
fromNbr
>>
pnf
;
}
pnf
.
setSize
(
this
->
size
(),
pTraits
<
Type
>::
zero
);
IPstream
::
read
(
Pstream
::
blocking
,
procPatch_
.
neighbProcNo
(),
reinterpret_cast
<
char
*>
(
pnf
.
begin
()),
pnf
.
byteSize
()
);
if
(
doTransform
())
if
(
doTransform
())
{
{
const
processorPolyPatch
&
ppp
=
procPatch_
.
procPolyPatch
();
const
processorPolyPatch
&
ppp
=
procPatch_
.
procPolyPatch
();
const
tensorField
&
forwardT
=
ppp
.
forwardT
();
const
tensorField
&
forwardT
=
ppp
.
forwardT
();
const
labelList
&
nonGlobalPatchPoints
=
procPatch_
.
nonGlobalPatchPoints
();
const
labelListList
&
pointFaces
=
ppp
.
pointFaces
();
if
(
forwardT
.
size
()
==
1
)
if
(
forwardT
.
size
()
==
1
)
{
{
...
@@ -163,6 +140,10 @@ void processorPointPatchField<Type>::swapAdd(Field<Type>& pField) const
...
@@ -163,6 +140,10 @@ void processorPointPatchField<Type>::swapAdd(Field<Type>& pField) const
}
}
else
else
{
{
const
labelList
&
nonGlobalPatchPoints
=
procPatch_
.
nonGlobalPatchPoints
();
const
labelListList
&
pointFaces
=
ppp
.
pointFaces
();
forAll
(
nonGlobalPatchPoints
,
pfi
)
forAll
(
nonGlobalPatchPoints
,
pfi
)
{
{
pnf
[
pfi
]
=
transform
pnf
[
pfi
]
=
transform
...
...
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