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
54b48d6d
Commit
54b48d6d
authored
Feb 15, 2021
by
Kirill Terekhov
Browse files
prepare switch for 64-bit integer indexes (AdaptiveMesh example)
parent
d4bc436b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Examples/AdaptiveMesh/amesh.cpp
View file @
54b48d6d
...
@@ -383,7 +383,7 @@ namespace INMOST
...
@@ -383,7 +383,7 @@ namespace INMOST
{
{
ENTER_FUNC
();
ENTER_FUNC
();
#if !defined(NDEBUG)
#if !defined(NDEBUG)
int
err
=
0
;
Storage
::
Integer
err
=
0
;
Storage
::
integer_array
procs
;
Storage
::
integer_array
procs
;
for
(
Mesh
::
iteratorCell
it
=
m
->
BeginCell
();
it
!=
m
->
EndCell
();
++
it
)
for
(
Mesh
::
iteratorCell
it
=
m
->
BeginCell
();
it
!=
m
->
EndCell
();
++
it
)
{
{
...
@@ -456,7 +456,7 @@ namespace INMOST
...
@@ -456,7 +456,7 @@ namespace INMOST
static
int
fi
=
0
;
static
int
fi
=
0
;
ENTER_FUNC
();
ENTER_FUNC
();
static
int
call_counter
=
0
;
static
int
call_counter
=
0
;
int
ret
=
0
;
//return number of refined cells
Storage
::
integer
ret
=
0
;
//return number of refined cells
//initialize tree structure
//initialize tree structure
//m->CheckCentroids(__FILE__,__LINE__);
//m->CheckCentroids(__FILE__,__LINE__);
ENTER_BLOCK
();
ENTER_BLOCK
();
...
@@ -499,7 +499,7 @@ namespace INMOST
...
@@ -499,7 +499,7 @@ namespace INMOST
int
schedule_counter
=
1
;
//indicates order in which refinement will be scheduled
int
schedule_counter
=
1
;
//indicates order in which refinement will be scheduled
int
scheduled
=
1
;
//indicates that at least one element was scheduled on current sweep
Storage
::
integer
scheduled
=
1
;
//indicates that at least one element was scheduled on current sweep
ENTER_BLOCK
();
ENTER_BLOCK
();
//0. Extend indicator for edges and faces
//0. Extend indicator for edges and faces
indicator
=
m
->
CreateTag
(
indicator
.
GetTagName
(),
DATA_INTEGER
,
FACE
|
EDGE
,
NONE
,
1
);
indicator
=
m
->
CreateTag
(
indicator
.
GetTagName
(),
DATA_INTEGER
,
FACE
|
EDGE
,
NONE
,
1
);
...
@@ -1021,7 +1021,7 @@ namespace INMOST
...
@@ -1021,7 +1021,7 @@ namespace INMOST
//return false;
//return false;
static
int
call_counter
=
0
;
static
int
call_counter
=
0
;
//return number of coarsened cells
//return number of coarsened cells
int
ret
=
0
;
Storage
::
integer
ret
=
0
;
//initialize tree structure
//initialize tree structure
ENTER_BLOCK
();
ENTER_BLOCK
();
PrepareSet
();
PrepareSet
();
...
@@ -1054,7 +1054,7 @@ namespace INMOST
...
@@ -1054,7 +1054,7 @@ namespace INMOST
CheckParentSet
(
__FILE__
,
__LINE__
);
CheckParentSet
(
__FILE__
,
__LINE__
);
int
schedule_counter
=
1
;
//indicates order in which refinement will be scheduled
int
schedule_counter
=
1
;
//indicates order in which refinement will be scheduled
int
scheduled
=
1
,
unscheduled
=
0
;
//indicates that at least one element was scheduled on current sweep
Storage
::
integer
scheduled
=
1
,
unscheduled
=
0
;
//indicates that at least one element was scheduled on current sweep
ENTER_BLOCK
();
ENTER_BLOCK
();
//TagInteger coarsened = CreateTag("COARSENED",DATA_INTEGER,CELL,NONE,1);
//TagInteger coarsened = CreateTag("COARSENED",DATA_INTEGER,CELL,NONE,1);
...
...
Examples/AdaptiveMesh/main.cpp
View file @
54b48d6d
...
@@ -115,7 +115,7 @@ int main(int argc, char ** argv)
...
@@ -115,7 +115,7 @@ int main(int argc, char ** argv)
//std::fill(nc.begin(),nc.end(),0); nc[m.GetProcessorRank()] = m.NumberOfCells(); m.Integrate(&nc[0],nc.size()); if( !m.GetProcessorRank() ) {std::cout << "start "; for(unsigned q = 0; q < nc.size(); ++q) std::cout << nc[q] << " "; std::cout << std::endl;}
//std::fill(nc.begin(),nc.end(),0); nc[m.GetProcessorRank()] = m.NumberOfCells(); m.Integrate(&nc[0],nc.size()); if( !m.GetProcessorRank() ) {std::cout << "start "; for(unsigned q = 0; q < nc.size(); ++q) std::cout << nc[q] << " "; std::cout << std::endl;}
ref_time
=
Timer
();
ref_time
=
Timer
();
int
numref
;
Storage
::
integer
numref
;
int
refcnt
=
0
;
int
refcnt
=
0
;
do
do
{
{
...
...
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