Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DOUAR WSMP
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
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
HUGG
DOUAR WSMP
Commits
05855f51
Commit
05855f51
authored
15 years ago
by
Dave Whipp
Browse files
Options
Downloads
Patches
Plain Diff
Added option 12 for embossed rectangle with set slope
parent
e2b5a9bb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/create_surfaces.f90
+43
-3
43 additions, 3 deletions
src/create_surfaces.f90
with
43 additions
and
3 deletions
src/create_surfaces.f90
+
43
−
3
View file @
05855f51
...
...
@@ -161,6 +161,7 @@ else
! type 9 : cosinus sinus
! type 10 : slope
! type 11 : 2D hill
! type 12 : rectangular emboss with specified slope
select
case
(
surface_type
)
...
...
@@ -483,12 +484,11 @@ double precision sp01,sp02,sp03,sp04,sp05,sp06,sp07,sp08,sp09,sp10
!------------------------------------------------------------------------------|
integer
i
double precision
delta
,
dist
,
ran
double precision
delta
,
dist
,
ran
,
m
,
pi
,
x1a
,
x1b
,
x2a
,
x2b
,
y1a
,
y1b
,
y2a
,
y2b
,
zx
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
select
case
(
surface_type
)
case
(
1
)
! a flat surface,
...
...
@@ -610,7 +610,47 @@ select case(surface_type)
z
(
i
)
=
sp01
end
if
end
do
case
(
12
)
! rectangular emboss with specified slope,
! sp01 is the z level
! sp02 and 03 are x1,x2
! sp04 and 05 are y1,y2
! sp06 is the thickness
! sp07 is the slope
pi
=
atan
(
1.d0
)
*
4.d0
m
=
tan
(
sp07
*
pi
/
180.d0
)
x1a
=
sp02
+
(
sp06
/(
2.d0
*
m
))
x1b
=
sp02
-
(
sp06
/(
2.d0
*
m
))
x2a
=
sp03
+
(
sp06
/(
2.d0
*
m
))
x2b
=
sp03
-
(
sp06
/(
2.d0
*
m
))
y1a
=
sp04
+
(
sp06
/(
2.d0
*
m
))
y1b
=
sp04
-
(
sp06
/(
2.d0
*
m
))
y2a
=
sp05
+
(
sp06
/(
2.d0
*
m
))
y2b
=
sp05
-
(
sp06
/(
2.d0
*
m
))
do
i
=
1
,
ns
if
(
x
(
i
)
.le.
x1a
)
then
zx
=
sp01
elseif
(
x
(
i
)
.le.
x1b
)
then
zx
=
sp01
-
((
x
(
i
)
-
x1a
)/(
sp06
/
m
)
*
sp06
)
elseif
(
x
(
i
)
.le.
x2a
)
then
zx
=
sp01
-
sp06
elseif
(
x
(
i
)
.le.
x2b
)
then
zx
=
sp01
-
((
1.d0
-
((
x
(
i
)
-
x2a
)/(
sp06
/
m
)))
*
sp06
)
else
zx
=
sp01
endif
if
(
y
(
i
)
.le.
y1a
)
then
z
(
i
)
=
sp01
elseif
(
y
(
i
)
.le.
y1b
)
then
z
(
i
)
=
min
(
sp01
-
((
y
(
i
)
-
y1a
)/(
sp06
/
m
)
*
sp06
),
zx
)
elseif
(
y
(
i
)
.le.
y2a
)
then
z
(
i
)
=
min
(
sp01
-
sp06
,
zx
)
elseif
(
y
(
i
)
.le.
y2b
)
then
z
(
i
)
=
min
(
sp01
-
((
1.d0
-
((
y
(
i
)
-
y2a
)/(
sp06
/
m
)))
*
sp06
),
zx
)
else
z
(
i
)
=
sp01
endif
end
do
case
default
call
stop_run
(
'surface type not defined$'
)
...
...
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