Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-uggrid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
staging
dune-uggrid
Commits
18182168
Commit
18182168
authored
1 year ago
by
Oliver Sander
Browse files
Options
Downloads
Patches
Plain Diff
Remove methods that print control words or control entries
These are never used.
parent
346dac3f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!229
Simplify the control_word handling
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/uggrid/gm/cw.cc
+0
-238
0 additions, 238 deletions
dune/uggrid/gm/cw.cc
dune/uggrid/gm/gm.h
+0
-3
0 additions, 3 deletions
dune/uggrid/gm/gm.h
with
0 additions
and
241 deletions
dune/uggrid/gm/cw.cc
+
0
−
238
View file @
18182168
...
...
@@ -233,240 +233,6 @@ static CONTROL_ENTRY_PREDEF ce_predefines[MAX_CONTROL_ENTRIES] = {
#endif
/* ModelP */
};
/****************************************************************************/
/** \brief Print all control entries of an objects control word
* @param obj - object pointer
* @param offset - controlword offset in (UINT) in object
This function prints the contents of all control entries of an objects control word at a
given offset.
*/
/****************************************************************************/
void
NS_DIM_PREFIX
ListCWofObject
(
const
void
*
obj
,
UINT
offset
)
{
INT
i
,
n
,
ce
,
last_ce
,
sub
,
min
,
cw_objt
,
oiw
;
ASSERT
(
obj
!=
NULL
);
cw_objt
=
BITWISE_TYPE
(
OBJT
(
obj
));
sub
=
-
1
;
last_ce
=
-
1
;
/* print control word entries in ascending order of offsets in word */
do
{
min
=
INT_MAX
;
for
(
i
=
0
;
i
<
MAX_CONTROL_ENTRIES
;
i
++
)
if
(
control_entries
[
i
].
used
)
if
(
control_entries
[
i
].
objt_used
&
cw_objt
)
if
(
control_entries
[
i
].
offset_in_object
==
offset
)
{
oiw
=
control_entries
[
i
].
offset_in_word
;
if
((
oiw
<
min
)
&&
(
oiw
>=
sub
))
{
if
((
oiw
==
sub
)
&&
(
i
<=
last_ce
))
continue
;
ce
=
i
;
min
=
oiw
;
}
}
if
(
min
==
INT_MAX
)
break
;
n
=
CW_READ
(
obj
,
ce
);
UserWriteF
(
" ce %s with offset in cw %3d: %10d
\n
"
,
control_entries
[
ce
].
name
,
min
,
n
);
sub
=
min
;
last_ce
=
ce
;
}
while
(
true
);
ASSERT
(
sub
>=
0
);
}
/****************************************************************************/
/** \brief Print all control entries of all control words of an object
* @param obj - object pointer
This function prints the contents of all control entries of all control words
of the object. 'ListCWofObject' is called.
*/
/****************************************************************************/
void
NS_DIM_PREFIX
ListAllCWsOfObject
(
const
void
*
obj
)
{
INT
i
,
cw
,
last_cw
,
sub
,
min
,
cw_objt
,
offset
;
ASSERT
(
obj
!=
NULL
);
cw_objt
=
BITWISE_TYPE
(
OBJT
(
obj
));
sub
=
-
1
;
last_cw
=
-
1
;
/* print control word contents in ascending order of offsets */
do
{
min
=
INT_MAX
;
for
(
i
=
0
;
i
<
MAX_CONTROL_WORDS
;
i
++
)
if
(
control_words
[
i
].
used
)
if
(
control_words
[
i
].
objt_used
&
cw_objt
)
{
offset
=
control_words
[
i
].
offset_in_object
;
if
((
offset
<
min
)
&&
(
offset
>=
sub
))
{
if
((
offset
==
sub
)
&&
(
i
<=
last_cw
))
continue
;
cw
=
i
;
min
=
offset
;
}
}
if
(
min
==
INT_MAX
)
break
;
UserWriteF
(
"cw %s with offset %3d:
\n
"
,
control_words
[
cw
].
name
,
min
);
ListCWofObject
(
obj
,
min
);
sub
=
min
;
last_cw
=
cw
;
}
while
(
true
);
ASSERT
(
sub
>=
0
);
}
/****************************************************************************/
/** \brief Print used pattern of all control entries of an object types control word
* @param obj - object pointer
* @param offset - controlword offset in (UINT) in object
* @param myprintf - pointer to a printf function (maybe UserWriteF)
This function prints the used pattern of all control entries of an object types control word at a
given offset.
*/
/****************************************************************************/
static
void
ListCWofObjectType
(
INT
objt
,
UINT
offset
,
PrintfProcPtr
myprintf
)
{
INT
i
,
ce
,
last_ce
,
sub
,
min
,
cw_objt
,
oiw
;
char
bitpat
[
33
];
cw_objt
=
BITWISE_TYPE
(
objt
);
sub
=
-
1
;
last_ce
=
-
1
;
/* print control word entries in ascending order of offsets in word */
do
{
min
=
INT_MAX
;
for
(
i
=
0
;
i
<
MAX_CONTROL_ENTRIES
;
i
++
)
if
(
control_entries
[
i
].
used
)
if
(
control_entries
[
i
].
objt_used
&
cw_objt
)
if
(
control_entries
[
i
].
offset_in_object
==
offset
)
{
oiw
=
control_entries
[
i
].
offset_in_word
;
if
((
oiw
<
min
)
&&
(
oiw
>=
sub
))
{
if
((
oiw
==
sub
)
&&
(
i
<=
last_ce
))
continue
;
ce
=
i
;
min
=
oiw
;
}
}
if
(
min
==
INT_MAX
)
break
;
INT_2_bitpattern
(
control_entries
[
ce
].
mask
,
bitpat
);
myprintf
(
" ce %-20s offset in cw %3d, len %3d: %s
\n
"
,
control_entries
[
ce
].
name
,
control_entries
[
ce
].
offset_in_word
,
control_entries
[
ce
].
length
,
bitpat
);
sub
=
min
;
last_ce
=
ce
;
}
while
(
true
);
if
(
sub
==-
1
)
myprintf
(
" --- no ce found with objt %d
\n
"
,
objt
);
}
/****************************************************************************/
/** \brief Print used pattern of all control entries of all
control words of an object type
* @param obj - object pointer
* @param myprintf - pointer to a printf function (maybe UserWriteF)
This function prints the used pattern of all control entries of all control words
of an object type. 'ListCWofObjectType' is called.
*/
/****************************************************************************/
static
void
ListAllCWsOfObjectType
(
INT
objt
,
PrintfProcPtr
myprintf
)
{
INT
i
,
cw
,
last_cw
,
sub
,
min
,
cw_objt
,
offset
;
cw_objt
=
BITWISE_TYPE
(
objt
);
sub
=
-
1
;
last_cw
=
-
1
;
/* print control word contents in ascending order of offsets */
do
{
min
=
INT_MAX
;
for
(
i
=
0
;
i
<
MAX_CONTROL_WORDS
;
i
++
)
if
(
control_words
[
i
].
used
)
if
(
control_words
[
i
].
objt_used
&
cw_objt
)
{
offset
=
control_words
[
i
].
offset_in_object
;
if
((
offset
<
min
)
&&
(
offset
>=
sub
))
{
if
((
offset
==
sub
)
&&
(
i
<=
last_cw
))
continue
;
cw
=
i
;
min
=
offset
;
}
}
if
(
min
==
INT_MAX
)
break
;
myprintf
(
"cw %-20s with offset in object %3d (UINTs):
\n
"
,
control_words
[
cw
].
name
,
min
);
ListCWofObjectType
(
objt
,
min
,
myprintf
);
sub
=
min
;
last_cw
=
cw
;
}
while
(
true
);
if
(
sub
==-
1
)
printf
(
" --- no cw found with objt %d
\n
"
,
objt
);
}
/****************************************************************************/
/** \brief Print used pattern of all control entries of all
control words of all object types
* @param obj - object pointer
* @param myprintf - pointer to a printf function (maybe UserWriteF)
This function prints the used pattern of all control entries of all control words
of all object types. 'ListAllCWsOfObjectType' is called.
*/
/****************************************************************************/
void
NS_DIM_PREFIX
ListAllCWsOfAllObjectTypes
(
PrintfProcPtr
myprintf
)
{
ListAllCWsOfObjectType
(
IVOBJ
,
myprintf
);
ListAllCWsOfObjectType
(
IEOBJ
,
myprintf
);
ListAllCWsOfObjectType
(
EDOBJ
,
myprintf
);
ListAllCWsOfObjectType
(
NDOBJ
,
myprintf
);
ListAllCWsOfObjectType
(
VEOBJ
,
myprintf
);
ListAllCWsOfObjectType
(
GROBJ
,
myprintf
);
ListAllCWsOfObjectType
(
MGOBJ
,
myprintf
);
}
/****************************************************************************/
/** \brief Initialize control words
...
...
@@ -609,10 +375,6 @@ static INT InitPredefinedControlEntries (void)
}
}
IFDEBUG
(
gm
,
1
)
ListAllCWsOfAllObjectTypes
(
printf
);
ENDDEBUG
/* TODO: enable next lines for error control */
IFDEBUG
(
gm
,
1
)
if
(
error
)
...
...
This diff is collapsed.
Click to expand it.
dune/uggrid/gm/gm.h
+
0
−
3
View file @
18182168
...
...
@@ -3173,9 +3173,6 @@ INT CheckSubdomains (MULTIGRID *theMG);
/* multigrid user data space management (using the heaps.c block heap management) */
INT
AllocateControlEntry
(
INT
cw_id
,
INT
length
,
INT
*
ce_id
);
INT
FreeControlEntry
(
INT
ce_id
);
void
ListCWofObject
(
const
void
*
obj
,
UINT
offset
);
void
ListAllCWsOfObject
(
const
void
*
obj
);
void
ListAllCWsOfAllObjectTypes
(
PrintfProcPtr
myprintf
);
UINT
ReadCW
(
const
void
*
obj
,
INT
ce
);
void
WriteCW
(
void
*
obj
,
INT
ce
,
INT
n
);
...
...
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