Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
0797f806
Commit
0797f806
authored
15 years ago
by
Richard Comblen
Browse files
Options
Downloads
Patches
Plain Diff
No commit message
No commit message
parent
6a36758c
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Solver/dgDofContainer.cpp
+7
-0
7 additions, 0 deletions
Solver/dgDofContainer.cpp
Solver/dgGroupOfElements.cpp
+10
-1
10 additions, 1 deletion
Solver/dgGroupOfElements.cpp
with
17 additions
and
1 deletion
Solver/dgDofContainer.cpp
+
7
−
0
View file @
0797f806
...
...
@@ -204,6 +204,7 @@ void dgDofContainer::load(const std::string name) {
}
void
dgDofContainer
::
L2Projection
(
std
::
string
functionName
){
scale
(
0.
);
dgDofContainer
rhs
(
&
_groups
,
_nbFields
);
for
(
int
iGroup
=
0
;
iGroup
<
_groups
.
getNbElementGroups
();
iGroup
++
)
{
const
dgGroupOfElements
&
group
=
*
_groups
.
getElementGroup
(
iGroup
);
...
...
@@ -387,4 +388,10 @@ void dgDofContainer::registerBindings(binding *b){
cm
->
setDescription
(
"Export the group ids for gmsh visualization"
);
cm
=
cb
->
addMethod
(
"norm"
,
&
dgDofContainer
::
norm
);
cm
->
setDescription
(
"Returns the norm of the vector"
);
cm
=
cb
->
addMethod
(
"scale"
,(
void
(
dgDofContainer
::*
)(
double
))
&
dgDofContainer
::
scale
);
cm
->
setArgNames
(
"factor"
,
NULL
);
cm
->
setDescription
(
"this=this*scale"
);
cm
=
cb
->
addMethod
(
"axpy"
,(
void
(
dgDofContainer
::*
)(
dgDofContainer
&
,
double
))
&
dgDofContainer
::
axpy
);
cm
->
setArgNames
(
"dofContainer"
,
"a"
,
NULL
);
cm
->
setDescription
(
"this = this+a*dofContainer"
);
}
This diff is collapsed.
Click to expand it.
Solver/dgGroupOfElements.cpp
+
10
−
1
View file @
0797f806
...
...
@@ -759,6 +759,9 @@ double dgGroupCollection::splitGroupsForMultirate(int maxLevels,dgConservationLa
// localDt[oldGroupId][oldElementId]
std
::
vector
<
std
::
vector
<
double
>
>
localDt
;
std
::
vector
<
int
>
oldGroupIds
;
newGroupIds
.
resize
(
getNbElementGroups
());
elementToNeighbors
.
resize
(
getNbElementGroups
());
for
(
int
iGroup
=
0
;
iGroup
<
getNbElementGroups
();
iGroup
++
){
...
...
@@ -921,6 +924,8 @@ double dgGroupCollection::splitGroupsForMultirate(int maxLevels,dgConservationLa
for
(
int
i
=
0
;
i
<
forBulk
.
size
();
i
++
){
forBulkV
.
push_back
(
getElementGroup
(
it
->
first
)
->
getElement
(
forBulk
[
i
]));
}
oldGroupIds
.
resize
(
currentNewGroupId
+
1
);
oldGroupIds
[
currentNewGroupId
]
=
it
->
first
;
newGroup
=
new
dgGroupOfElements
(
forBulkV
,
oldGroup
->
getOrder
(),
oldGroup
->
getGhostPartition
());
newGroup
->
copyPrivateDataFrom
(
oldGroup
);
newGroup
->
_multirateExponent
=
currentExponent
;
...
...
@@ -939,6 +944,8 @@ double dgGroupCollection::splitGroupsForMultirate(int maxLevels,dgConservationLa
for
(
int
i
=
0
;
i
<
forInnerBuffer
.
size
();
i
++
){
forInnerBufferV
.
push_back
(
getElementGroup
(
it
->
first
)
->
getElement
(
forInnerBuffer
[
i
]));
}
oldGroupIds
.
resize
(
currentNewGroupId
+
1
);
oldGroupIds
[
currentNewGroupId
]
=
it
->
first
;
newGroup
=
new
dgGroupOfElements
(
forInnerBufferV
,
oldGroup
->
getOrder
(),
oldGroup
->
getGhostPartition
());
newGroup
->
copyPrivateDataFrom
(
oldGroup
);
newGroup
->
_multirateExponent
=
currentExponent
;
...
...
@@ -966,6 +973,8 @@ double dgGroupCollection::splitGroupsForMultirate(int maxLevels,dgConservationLa
for
(
int
i
=
0
;
i
<
it
->
second
.
size
();
i
++
){
newGroupV
.
push_back
(
getElementGroup
(
it
->
first
)
->
getElement
(
it
->
second
[
i
]));
}
oldGroupIds
.
resize
(
currentNewGroupId
+
1
);
oldGroupIds
[
currentNewGroupId
]
=
it
->
first
;
dgGroupOfElements
*
newGroup
=
new
dgGroupOfElements
(
newGroupV
,
oldGroup
->
getOrder
(),
oldGroup
->
getGhostPartition
());
newGroup
->
copyPrivateDataFrom
(
oldGroup
);
newGroup
->
_multirateExponent
=
currentExponent
;
...
...
@@ -985,7 +994,7 @@ double dgGroupCollection::splitGroupsForMultirate(int maxLevels,dgConservationLa
// Some stats
int
count
=
0
;
for
(
int
i
=
0
;
i
<
newGroups
.
size
();
i
++
){
Msg
::
Info
(
"
%d
New group # %d has %d elements"
,
newGroups
[
i
]
->
getMultirateExponent
(),
i
,
newGroups
[
i
]
->
getNbElements
());
Msg
::
Info
(
"
old: %d, level %d,
New group # %d has %d elements"
,
oldGroupIds
[
i
],
newGroups
[
i
]
->
getMultirateExponent
(),
i
,
newGroups
[
i
]
->
getNbElements
());
if
(
newGroups
[
i
]
->
getIsInnerMultirateBuffer
())
Msg
::
Info
(
"InnerBuffer"
);
else
if
(
newGroups
[
i
]
->
getIsOuterMultirateBuffer
())
...
...
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