Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-xt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
ag-ohlberger
dune-community
dune-xt
Commits
6e21c376
Commit
6e21c376
authored
15 years ago
by
René Fritze
Browse files
Options
Downloads
Patches
Plain Diff
latest stuff copied
parent
90f53890
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
stuff/misc.hh
+22
-6
22 additions, 6 deletions
stuff/misc.hh
with
22 additions
and
6 deletions
stuff/misc.hh
+
22
−
6
View file @
6e21c376
...
...
@@ -320,12 +320,14 @@ public:
f
.
preWalk
();
EntityIteratorType
entityItEndLog
=
space_
.
end
();
for
(
EntityIteratorType
it
=
space_
.
begin
();
it
!=
entityItEndLog
;
++
it
)
{
int
ent_idx
=
getIdx
(
entityIdxMap_
,
it
);
f
(
*
it
,
*
it
);
const
int
ent_idx
=
getIdx
(
entityIdxMap_
,
it
);
f
(
*
it
,
*
it
,
ent_idx
,
ent_idx
);
IntersectionIteratorType
intItEnd
=
gridPart_
.
iend
(
*
it
);
for
(
IntersectionIteratorType
intIt
=
gridPart_
.
ibegin
(
*
it
);
intIt
!=
intItEnd
;
++
intIt
)
{
int
neigh_idx
=
getIdx
(
entityIdxMap_
,
intIt
.
outside
());
f
(
*
it
,
*
intIt
.
outside
());
const
int
neigh_idx
=
getIdx
(
entityIdxMap_
,
intIt
.
outside
());
if
(
intIt
.
neighbor
())
{
f
(
*
it
,
*
intIt
.
outside
(),
ent_idx
,
neigh_idx
);
}
}
}
f
.
postWalk
();
...
...
@@ -342,29 +344,43 @@ template <class GlobalMatrix, class Stream>
class
LocalMatrixPrintFunctor
{
public:
LocalMatrixPrintFunctor
(
const
GlobalMatrix
&
m
,
Stream
&
stream
)
LocalMatrixPrintFunctor
(
const
GlobalMatrix
&
m
,
Stream
&
stream
,
const
std
::
string
name
)
:
matrix_
(
m
)
,
stream_
(
stream
)
,
name_
(
name
)
{
}
template
<
class
Entity
>
void
operator
()(
const
Entity
&
en
,
const
Entity
&
ne
)
void
operator
()(
const
Entity
&
en
,
const
Entity
&
ne
,
const
int
en_idx
,
const
int
ne_idx
)
{
typename
GlobalMatrix
::
LocalMatrixType
localMatrix
=
matrix_
.
localMatrix
(
en
,
ne
);
const
int
rows
=
localMatrix
.
rows
();
const
int
cols
=
localMatrix
.
columns
();
stream_
<<
"
\n
local_"
<<
name_
<<
"_Matrix_"
<<
en_idx
<<
"_"
<<
ne_idx
<<
" = ["
<<
std
::
endl
;
for
(
int
i
=
0
;
i
<
rows
;
++
i
)
{
for
(
int
j
=
0
;
j
<
cols
;
++
j
)
{
stream_
<<
std
::
setw
(
8
)
<<
std
::
setprecision
(
2
)
<<
localMatrix
.
get
(
i
,
j
);
}
stream_
<<
";"
<<
std
::
endl
;
}
stream_
<<
"];"
<<
std
::
endl
;
}
void
preWalk
()
{
stream_
<<
"% printing local matrizes of "
<<
name_
<<
std
::
endl
;
}
void
postWalk
()
{
stream_
<<
"
\n
% done printing local matrizes of "
<<
name_
<<
std
::
endl
;
}
private
:
const
GlobalMatrix
&
matrix_
;
Stream
&
stream_
;
const
std
::
string
name_
;
};
}
// end namepspace stuff
...
...
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