Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-haz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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-haz
Commits
58e11b22
Commit
58e11b22
authored
4 months ago
by
Clayton, Brandon Scott
Browse files
Options
Downloads
Patches
Plain Diff
use new method
parent
e08a523b
No related branches found
No related tags found
1 merge request
!800
Site
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java
+5
-12
5 additions, 12 deletions
...t/java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java
with
5 additions
and
12 deletions
src/test/java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java
+
5
−
12
View file @
58e11b22
...
...
@@ -15,6 +15,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.Optional
;
import
java.util.OptionalDouble
;
import
java.util.Set
;
import
java.util.concurrent.ExecutionException
;
import
java.util.concurrent.ExecutorService
;
...
...
@@ -35,6 +36,7 @@ import gov.usgs.earthquake.nshmp.calc.CalcConfig;
import
gov.usgs.earthquake.nshmp.calc.Hazard
;
import
gov.usgs.earthquake.nshmp.calc.HazardCalcs
;
import
gov.usgs.earthquake.nshmp.calc.Site
;
import
gov.usgs.earthquake.nshmp.calc.Sites
;
import
gov.usgs.earthquake.nshmp.data.XySequence
;
import
gov.usgs.earthquake.nshmp.geo.Location
;
import
gov.usgs.earthquake.nshmp.gmm.Imt
;
...
...
@@ -220,9 +222,10 @@ class NshmTestUtils {
NshmModel
nshmModel
,
NamedLocation
location
)
{
Site
site
=
create
Site
(
Site
site
=
Sites
.
locationTo
Site
(
location
.
location
(),
nshmModel
.
model
.
siteData
());
nshmModel
.
model
.
siteData
(),
OptionalDouble
.
empty
());
CalcConfig
config
=
CalcConfig
.
copyOf
(
nshmModel
.
model
.
config
())
.
imts
(
nshmModel
.
nshm
.
imts
())
...
...
@@ -279,16 +282,6 @@ class NshmTestUtils {
Files
.
write
(
resultPath
,
json
.
getBytes
());
}
private
static
Site
createSite
(
Location
loc
,
SiteData
siteData
)
{
Site
.
Builder
builder
=
Site
.
builder
().
location
(
loc
);
SiteData
.
Values
values
=
siteData
.
get
(
loc
);
values
.
z1p0
.
ifPresent
(
builder:
:
z1p0
);
values
.
z2p5
.
ifPresent
(
builder:
:
z2p5
);
values
.
zSed
.
ifPresent
(
builder:
:
zSed
);
builder
.
gmmTrees
(
values
.
gmmTrees
);
return
builder
.
build
();
}
private
static
class
Curve
{
double
[]
xs
;
double
[]
ys
;
...
...
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