Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Kirill Terekhov
INMOST
Commits
0a11ce1e
Commit
0a11ce1e
authored
May 07, 2018
by
SilverLife
Browse files
Fixed exchange data for reference bug. Resolve deadlocks in AdaptiveMesh example.
parent
3624f499
Changes
5
Show whitespace changes
Inline
Side-by-side
Examples/AdaptiveMesh/amesh.cpp
View file @
0a11ce1e
...
...
@@ -562,7 +562,6 @@ namespace INMOST
ReleaseMarker
(
mark_hanging_nodes
);
ReleaseMarker
(
mark_cell_edges
);
DeleteTag
(
internal_face_edges
);
//ExchangeData(hanging_nodes,CELL | FACE,0);
//10.jump to later schedule, and go to 7.
schedule_counter
--
;
}
...
...
@@ -603,6 +602,7 @@ namespace INMOST
//14. Done
//cout << rank << ": Before end " << endl;
EndModification
();
ExchangeData
(
hanging_nodes
,
CELL
|
FACE
,
0
);
//cout << rank << ": After end " << endl;
//reorder element's data to free up space
ReorderEmpty
(
CELL
|
FACE
|
EDGE
|
NODE
);
...
...
@@ -896,7 +896,6 @@ namespace INMOST
}
}
//jump to later schedule
//ExchangeData(hanging_nodes,CELL | FACE,0);
schedule_counter
--
;
}
//free created tag
...
...
@@ -909,6 +908,7 @@ namespace INMOST
ApplyModification
();
//done
EndModification
();
ExchangeData
(
hanging_nodes
,
CELL
|
FACE
,
0
);
//cleanup null links to hanging nodes
for
(
ElementType
etype
=
FACE
;
etype
<=
CELL
;
etype
=
NextElementType
(
etype
))
{
...
...
Examples/AdaptiveMesh/main.cpp
View file @
0a11ce1e
...
...
@@ -74,7 +74,9 @@ int main(int argc, char ** argv)
m.Save(file.str());
}
*/
if
(
!
m
.
Refine
(
indicator
)
)
break
;
int
res
=
m
.
Refine
(
indicator
);
res
=
m
.
Integrate
(
res
);
if
(
!
res
)
break
;
{
std
::
stringstream
file
;
...
...
Source/Data/tag.cpp
View file @
0a11ce1e
...
...
@@ -44,7 +44,7 @@ namespace INMOST
case
DATA_INTEGER
:
return
sizeof
(
INMOST_DATA_INTEGER_TYPE
);
case
DATA_REAL
:
return
sizeof
(
INMOST_DATA_REAL_TYPE
);
case
DATA_REMOTE_REFERENCE
:
throw
-
1
;
//todo, exchange of this data type is not yet supported
case
DATA_REFERENCE
:
throw
-
1
;
//todo, exchange of this data type is not yet supported
case
DATA_REFERENCE
:
return
sizeof
(
HandleType
)
;
//todo, exchange of this data type is not yet supported
#if defined(USE_AUTODIFF)
case
DATA_VARIABLE
:
return
sizeof
(
Sparse
::
Row
::
entry
);
#endif
...
...
Source/Mesh/modify.cpp
View file @
0a11ce1e
...
...
@@ -1689,6 +1689,8 @@ namespace INMOST
void
Mesh
::
ResolveModification
(
int
metric
)
{
int
rank
=
GetProcessorRank
();
int
size
=
GetProcessorsNumber
();
if
(
size
==
1
)
return
;
Tag
tag
=
CreateTag
(
"TEMP_DISTANSE"
,
DATA_REAL
,
CELL
,
CELL
,
2
);
stringstream
ss
;
...
...
Source/Mesh/parallel.cpp
View file @
0a11ce1e
...
...
@@ -2552,7 +2552,14 @@ namespace INMOST
if
(
FindSharedGhost
(
global_id
,
GetHandleElementNum
(
data
),
target
))
{
TagReferenceArray
ref_tag
=
tag
;
ref_tag
[
*
eit
].
push_back
(
target
);
reference_array
refs
=
ReferenceArray
(
*
eit
,
ref_tag
);
bool
already_exist
=
false
;
for
(
Storage
::
reference_array
::
size_type
i
=
0
;
i
<
refs
.
size
();
++
i
)
{
if
(
target
==
refs
[
i
].
GetHandle
())
already_exist
=
true
;
}
if
(
!
already_exist
)
ref_tag
[
*
eit
].
push_back
(
target
);
}
}
}
...
...
@@ -2673,7 +2680,7 @@ namespace INMOST
///////////
if
(
block_recursion
==
0
)
{
bool
call_exchange
=
false
;
int
call_exchange
=
0
;
for
(
unsigned
int
k
=
0
;
k
<
tags
.
size
();
k
++
)
{
if
(
tags
[
k
].
GetDataType
()
==
DATA_REFERENCE
)
...
...
@@ -2695,7 +2702,7 @@ namespace INMOST
for
(
ElementSet
child
=
set
.
GetChild
();
child
.
isValid
();
child
=
child
.
GetSibling
())
{
child
.
IntegerArray
(
tag_sendto
).
push_back
(
*
p
);
call_exchange
=
true
;
call_exchange
=
1
;
}
}
else
...
...
@@ -2704,7 +2711,7 @@ namespace INMOST
{
if
(
refs
[
i
]
==
InvalidElement
())
continue
;
refs
[
i
].
IntegerArray
(
tag_sendto
).
push_back
(
*
p
);
call_exchange
=
true
;
call_exchange
=
1
;
}
}
}
...
...
@@ -2712,6 +2719,7 @@ namespace INMOST
}
}
}
call_exchange
=
Integrate
(
call_exchange
);
if
(
call_exchange
)
{
block_recursion
=
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment