Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Chaofan Chen
ogs
Commits
c4180b0b
Commit
c4180b0b
authored
1 year ago
by
Florian Zill
Committed by
Dmitri Naumov
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
[PL] added ids of active elements to process
parent
1a9aaaf1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ProcessLib/Process.cpp
+20
-0
20 additions, 0 deletions
ProcessLib/Process.cpp
ProcessLib/Process.h
+8
-0
8 additions, 0 deletions
ProcessLib/Process.h
with
28 additions
and
0 deletions
ProcessLib/Process.cpp
+
20
−
0
View file @
c4180b0b
...
...
@@ -202,6 +202,26 @@ void Process::updateDeactivatedSubdomains(double const time,
{
variable
.
get
().
updateDeactivatedSubdomains
(
time
);
}
_ids_of_active_elements
.
clear
();
for
(
ProcessLib
::
ProcessVariable
const
&
pv
:
getProcessVariables
(
process_id
))
{
auto
const
pv_active_element_ids
=
pv
.
getActiveElementIDs
();
// empty if no deactivated_subdomains exist in process variable
// executeSelectedMemberDereferenced with empty active_element_ids
// will run executeMemberDereferenced (i.e. on all elements)
if
(
pv_active_element_ids
.
empty
())
{
_ids_of_active_elements
.
clear
();
return
;
}
std
::
vector
<
std
::
size_t
>
tempResult
;
std
::
set_union
(
_ids_of_active_elements
.
begin
(),
_ids_of_active_elements
.
end
(),
pv_active_element_ids
.
begin
(),
pv_active_element_ids
.
end
(),
std
::
back_inserter
(
tempResult
));
_ids_of_active_elements
=
std
::
move
(
tempResult
);
}
}
void
Process
::
preAssemble
(
const
double
t
,
double
const
dt
,
...
...
This diff is collapsed.
Click to expand it.
ProcessLib/Process.h
+
8
−
0
View file @
c4180b0b
...
...
@@ -157,6 +157,11 @@ public:
return
_process_variables
[
process_id
];
}
std
::
vector
<
std
::
size_t
>
const
&
getActiveElementIDs
()
const
{
return
_ids_of_active_elements
;
}
SecondaryVariableCollection
const
&
getSecondaryVariables
()
const
{
return
_secondary_variables
;
...
...
@@ -393,6 +398,9 @@ private:
std
::
vector
<
SourceTermCollection
>
_source_term_collections
;
ExtrapolatorData
_extrapolator_data
;
/// Union of active element ids per process variable
mutable
std
::
vector
<
std
::
size_t
>
_ids_of_active_elements
;
};
}
// namespace ProcessLib
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