Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Timo Koch
dune-common
Commits
c7699919
Commit
c7699919
authored
19 years ago
by
Robert Klöfkorn
Browse files
Options
Downloads
Patches
Plain Diff
added initialize methods for DUNE_ELEM.
[[Imported from SVN: r2772]]
parent
80f4558b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
io/visual/grape/ghmesh.cc
+38
-5
38 additions, 5 deletions
io/visual/grape/ghmesh.cc
with
38 additions
and
5 deletions
io/visual/grape/ghmesh.cc
+
38
−
5
View file @
c7699919
...
...
@@ -103,10 +103,41 @@ inline static void swapHexahedron( double ** vertex, DUNE_ELEM * el)
** **
******************************************************************************
*****************************************************************************/
inline
static
DUNE_ELEM
*
getNewDuneElem
()
{
DUNE_ELEM
*
elem
=
(
DUNE_ELEM
*
)
malloc
(
sizeof
(
DUNE_ELEM
));
assert
(
elem
);
elem
->
type
=
gr_unknown
;
for
(
int
i
=
0
;
i
<
MAX_EL_FACE
;
i
++
)
elem
->
bnd
[
i
]
=
-
1
;
elem
->
eindex
=
-
1
;
elem
->
level
=
-
1
;
elem
->
level_of_interest
=
-
1
;;
elem
->
has_children
=
0
;;
elem
->
mesh
=
0
;
elem
->
isLeafIterator
=
1
;;
for
(
int
i
=
0
;
i
<
MAX_EL_DOF
;
i
++
)
{
elem
->
vindex
[
i
]
=
-
i
;
for
(
int
j
=
0
;
j
<
3
;
j
++
)
{
elem
->
vpointer
[
i
][
j
]
=
0.0
;
}
}
elem
->
display
=
NULL
;
elem
->
liter
=
NULL
;
elem
->
hiter
=
NULL
;
elem
->
actElement
=
NULL
;
return
elem
;
}
inline
static
HELEMENT
*
get_stackentry
()
{
STACKENTRY
*
stel
;
DUNE_ELEM
*
elem
;
DUNE_ELEM
*
elem
=
0
;
if
(
stackfree
)
{
...
...
@@ -116,7 +147,8 @@ inline static HELEMENT *get_stackentry()
else
{
stel
=
(
STACKENTRY
*
)
malloc
(
sizeof
(
STACKENTRY
));
elem
=
(
DUNE_ELEM
*
)
malloc
(
sizeof
(
DUNE_ELEM
));
elem
=
getNewDuneElem
();
assert
(
elem
);
((
HELEMENT
*
)
stel
)
->
user_data
=
(
void
*
)
elem
;
}
return
(
(
HELEMENT
*
)
stel
);
...
...
@@ -180,7 +212,7 @@ inline static HELEMENT * first_macro (GENMESHnD *mesh, MESH_ELEMENT_FLAGS flag)
{
int
i
;
HELEMENT
*
el
=
get_stackentry
();
static
double
*
vertex
[
MAX_EL_DOF
];
static
double
*
vertex
[
MAX_EL_DOF
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}
;
DUNE_ELEM
*
elem
=
(
DUNE_ELEM
*
)
el
->
user_data
;
assert
(
mesh
);
...
...
@@ -209,11 +241,12 @@ inline static HELEMENT * first_macro (GENMESHnD *mesh, MESH_ELEMENT_FLAGS flag)
}
el
->
level
=
0
;
el
->
mesh
=
(
GENMESHnD
*
)
mesh
;
for
(
i
=
0
;
i
<
MAX_EL_DOF
;
i
++
)
{
vertex
[
i
]
=
(
double
*
)
elem
->
vpointer
[
i
];
}
el
->
vertex
=
(
double
G_CONST
*
G_CONST
*
)
vertex
;
...
...
@@ -290,7 +323,7 @@ inline static HELEMENT * first_child (HELEMENT * ael, MESH_ELEMENT_FLAGS flag)
{
HELEMENT
*
el
;
DUNE_ELEM
*
elem
;
static
double
*
vertex
[
MAX_EL_DOF
];
static
double
*
vertex
[
MAX_EL_DOF
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}
;
int
i
,
actlevel
=
ael
->
level
;
if
(
actlevel
<
((
HMESH
*
)
ael
->
mesh
)
->
level_of_interest
)
...
...
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