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
2e93458e
Commit
2e93458e
authored
3 years ago
by
Powers, Peter M.
Browse files
Options
Downloads
Patches
Plain Diff
hazard model size cleanup
parent
38e468c4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!245
Site defaults cleanup
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/gov/usgs/earthquake/nshmp/calc/HazardCalcs.java
+2
-2
2 additions, 2 deletions
...main/java/gov/usgs/earthquake/nshmp/calc/HazardCalcs.java
src/main/java/gov/usgs/earthquake/nshmp/model/HazardModel.java
+11
-10
11 additions, 10 deletions
...ain/java/gov/usgs/earthquake/nshmp/model/HazardModel.java
with
13 additions
and
12 deletions
src/main/java/gov/usgs/earthquake/nshmp/calc/HazardCalcs.java
+
2
−
2
View file @
2e93458e
...
...
@@ -141,7 +141,7 @@ public class HazardCalcs {
Site
site
,
Executor
ex
)
throws
InterruptedException
,
ExecutionException
{
AsyncList
<
HazardCurveSet
>
curveSets
=
AsyncList
.
create
WithCapacity
(
model
.
size
()
);
AsyncList
<
HazardCurveSet
>
curveSets
=
AsyncList
.
create
(
);
AsyncList
<
RuptureSet
<?
extends
Source
>>
gridTables
=
AsyncList
.
create
();
var
settingFilter
=
model
.
settingFilter
(
config
,
site
.
location
());
var
typeFilter
=
new
SourceTypeFilter
(
config
);
...
...
@@ -209,7 +209,7 @@ public class HazardCalcs {
Site
site
,
Logger
log
)
{
List
<
HazardCurveSet
>
curveSets
=
new
ArrayList
<>(
model
.
size
()
);
List
<
HazardCurveSet
>
curveSets
=
new
ArrayList
<>();
var
settingsFilter
=
model
.
settingFilter
(
config
,
site
.
location
());
var
typeFilter
=
new
SourceTypeFilter
(
config
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/gov/usgs/earthquake/nshmp/model/HazardModel.java
+
11
−
10
View file @
2e93458e
...
...
@@ -43,12 +43,13 @@ import gov.usgs.earthquake.nshmp.gmm.NehrpSiteClass;
/**
* A {@code HazardModel} is the top-level wrapper for earthquake {@link Source}
* definitions and attendant {@link GroundMotionModel}s used in probabilis
i
tic
* definitions and attendant {@link GroundMotionModel}s used in probabilistic
* seismic hazard analyses (PSHAs) and related calculations. A
* {@code HazardModel} contains of a number of {@link RuptureSet}s that define
* logical groupings of sources by {@link SourceType}. Each {@code RuptureSet}
* carries with it references to the {@code GroundMotionModel}s and associated
* weights to be used when evaluating hazard.
* {@code HazardModel} is a List of {@link SourceTree}s that define logical
* trees of sources. The tips of the source logic tree branches are
* {@code RuptureSet}s that carry the necessary information to carries with it
* references to the {@code GroundMotionModel}s and associated weights to be
* used when evaluating hazard.
*
* @author U.S. Geological Survey
* @see Source
...
...
@@ -87,8 +88,8 @@ public final class HazardModel implements Iterable<SourceTree> {
*
* <p>For more information on a HazardModel directory and file structure, see
* the <a
* href="https://
github.com/usgs/nshmp-haz/wiki/Earthquake-Source
-Model
s
">
* nshmp-haz
wiki
</a>.
* href="https://
code.usgs.gov/ghsc/nshmp/nshmp-haz/-/blob/main/docs/pages/Hazard
-Model
.md
">
* nshmp-haz
documentation
</a>.
*
* <p><b>Notes:</b> HazardModel loading is not thread safe. There are also a
* wide variety of exceptions that may be encountered when loading a model.
...
...
@@ -103,10 +104,10 @@ public final class HazardModel implements Iterable<SourceTree> {
}
/**
* The number of {@code
RuptureSet
}s in this
{@code HazardM
odel
}
.
* The number of {@code
SourceTree
}s in this
m
odel.
*/
public
int
size
()
{
// TODO this should be the number of trees
return
ruptureSet
Map
.
size
();
public
int
size
()
{
return
id
Map
.
size
();
}
@Override
...
...
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