Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-lib
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
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
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
ghsc
National Seismic Hazard Model Project
nshmp-lib
Commits
b73827cd
Commit
b73827cd
authored
2 years ago
by
Powers, Peter M.
Browse files
Options
Downloads
Patches
Plain Diff
added mfdTree implementation
parent
5dc7da54
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!277
mfd-tree and text updates
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/gov/usgs/earthquake/nshmp/model/ClusterRuptureSet.java
+18
-6
18 additions, 6 deletions
...va/gov/usgs/earthquake/nshmp/model/ClusterRuptureSet.java
with
18 additions
and
6 deletions
src/main/java/gov/usgs/earthquake/nshmp/model/ClusterRuptureSet.java
+
18
−
6
View file @
b73827cd
...
...
@@ -9,6 +9,7 @@ import java.util.function.Predicate;
import
gov.usgs.earthquake.nshmp.geo.Location
;
import
gov.usgs.earthquake.nshmp.mfd.Mfd
;
import
gov.usgs.earthquake.nshmp.tree.LogicGroup
;
import
gov.usgs.earthquake.nshmp.tree.LogicTree
;
/**
...
...
@@ -47,15 +48,26 @@ public class ClusterRuptureSet extends AbstractRuptureSet<ClusterSource> {
@Override
public
LogicTree
<
Mfd
>
mfdTree
()
{
System
.
err
.
println
(
"TODO Cluster MFD tree implementation"
);
// only returning first cluster source
throw
new
UnsupportedOperationException
();
// return source.mfdTree;
/*
* A ClusterSource is composed of multiple FaultRuptureSets that rupture
* together at some rate. For the purposes of reporting an MFD tree for the
* rupture set, we combine the SINGLE MFDs associated with each
* FaultRuptureSet and set the rate of each magnitude to its weight. We then
* build a logic group where the weight (scale) of each branch is set to the
* cluster rate.
*/
ClusterSource
clusterSource
=
source
.
get
(
0
);
double
rate
=
clusterSource
.
rate
();
LogicGroup
.
Builder
<
Mfd
>
builder
=
LogicGroup
.
builder
();
for
(
FaultRuptureSet
frs
:
clusterSource
.
faults
())
{
Mfd
mfd
=
ModelTrees
.
reduceMfdTree
(
frs
.
mfdTree
());
builder
.
addBranch
(
frs
.
name
(),
mfd
,
rate
);
}
return
builder
.
build
();
}
@Override
// this is problemtic as we are not getting the rate weight
// is this still a problem?
public
Iterator
<
ClusterSource
>
iterator
()
{
return
source
.
iterator
();
}
...
...
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