-
Notifications
You must be signed in to change notification settings - Fork 8
Fm/task/unst 9257 snap longculvert 2 #497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
FlorisBuwaldaDeltares
wants to merge
45
commits into
main
Choose a base branch
from
fm/task/UNST-9257_snap_longculvert_2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
6c54e47
UNST-9257: Working unit test setup
rene-deltares 1cbd08a
UNST-9257: Forgot to add unit test files.
rene-deltares e7e7225
Three tests: One for four point longculvert, one for two point longcu…
rene-deltares 39d2ee9
Made a start with subroutine to replace coordinates in structures
rene-deltares 2edaa89
Save work
rene-deltares 4783361
UNST-9257: Hand-over for Floris. Dflowfm still builds on my laptop.
rene-deltares 933421a
remove unused variables
FlorisBuwaldaDeltares ef4e129
now copy runtime deps with a cmake function
FlorisBuwaldaDeltares 95c995c
reset meshgeom1d counters, small refactor
FlorisBuwaldaDeltares eb31757
don't write any meshgeom1d for 2D2D culverts
FlorisBuwaldaDeltares 97a17f5
single loop
FlorisBuwaldaDeltares 88471c3
wip
FlorisBuwaldaDeltares 6670049
refactor wip
FlorisBuwaldaDeltares 328aa9e
fix unit tests
FlorisBuwaldaDeltares 4b488e9
wip
FlorisBuwaldaDeltares bfd3a04
sequential long culvert without branchid works
FlorisBuwaldaDeltares b9d4161
write branch only if its available
FlorisBuwaldaDeltares a8dea28
wip
FlorisBuwaldaDeltares 3fe8f8d
write long culvert branchid to contactid
FlorisBuwaldaDeltares 614333a
add contactID
FlorisBuwaldaDeltares a5f9f6e
remove setlongculvertlinkangles
FlorisBuwaldaDeltares 35f0412
contactid is now read during find1d2dculvertlinks
FlorisBuwaldaDeltares f768f60
fixed long culvert traversal algorithm
FlorisBuwaldaDeltares f220564
prevent crash if numlinks is 0 (culvert lies on another partition)
FlorisBuwaldaDeltares 33a96df
fix interacter crashing in debug
FlorisBuwaldaDeltares b94e84c
move subroutine is_2D2D_longculvertlink to avoid circular dependency
FlorisBuwaldaDeltares 8fda74c
flip 2d2d link orientation
FlorisBuwaldaDeltares 401937f
delete obsolete testcase data
FlorisBuwaldaDeltares 7493442
new ref c100 longculvert
FlorisBuwaldaDeltares f868849
reconstruct Long Culvert direction for 2D2D culverts
FlorisBuwaldaDeltares b576f0a
new refs for c99 longculvert on the fly
FlorisBuwaldaDeltares a403a07
wip
FlorisBuwaldaDeltares 1afc53c
swap k1 and k2
FlorisBuwaldaDeltares 3850fe6
new refs c100 again
FlorisBuwaldaDeltares 159a1ed
c102 longculvertsnew new case data
FlorisBuwaldaDeltares 0627caf
bugfixes for parallel long culvert initialisation
FlorisBuwaldaDeltares fb859e4
remove cross section checks for long culvert testcase
FlorisBuwaldaDeltares adf3dc5
new references for 102_longculvert_new
FlorisBuwaldaDeltares b7648a4
merge with main
FlorisBuwaldaDeltares 631f14d
new case c150 long culverts parallel
FlorisBuwaldaDeltares 6967829
further fix parallel long culvert initialisation
FlorisBuwaldaDeltares 1ae1b0c
back to old mdu name and dir
FlorisBuwaldaDeltares 377eaf7
new refs c150
FlorisBuwaldaDeltares 4ea2ae1
new refs c151
FlorisBuwaldaDeltares bcace4a
fix long culvert unit tests
FlorisBuwaldaDeltares File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -605,10 +605,11 @@ subroutine partition_make_domain(idmn, numlay_cell, numlay_node, jacells, ierror | |
| use messagehandling, only: mess, level_warn | ||
| use dfm_error, only: dfm_genericerror, dfm_noerr | ||
| use m_polygon, only: npl | ||
| use network_data, only: lc, numl, kn, link_2d, lnn, lne, nump1d2d, netstat, netstat_ok, numk, cellmask, lperm, netcell, numl1d | ||
| use network_data, only: lc, numl, kn, link_2d, lnn, lne, nump1d2d, nump, netstat, netstat_ok, numk, cellmask, lperm, netcell, numl1d | ||
| use m_alloc, only: realloc | ||
| use gridoperations, only: findcells | ||
| use m_remove_masked_netcells, only: remove_masked_netcells | ||
| use m_save_ugrid_state, only: contactnetlinks, contactids_2D2D, hashlist_contactids | ||
| implicit none | ||
|
|
||
| integer, intent(in) :: idmn !< domain number | ||
|
|
@@ -619,7 +620,7 @@ subroutine partition_make_domain(idmn, numlay_cell, numlay_node, jacells, ierror | |
|
|
||
| integer :: ic1, ic2, L | ||
| logical :: domain_needs_cell_1, domain_needs_cell_2 | ||
| integer :: i | ||
| integer :: i, icontact, i_valid_contact | ||
| integer, dimension(:, :), allocatable :: lne_org | ||
| integer :: i_old | ||
| character(len=128) :: message | ||
|
|
@@ -672,6 +673,23 @@ subroutine partition_make_domain(idmn, numlay_cell, numlay_node, jacells, ierror | |
| end do | ||
| end if | ||
|
|
||
| if (allocated(contactnetlinks) .and. allocated(contactids_2D2D)) then | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do I understand correctly that the 2D2D link is valid only if both endpoints lie in the same partition? |
||
| i_valid_contact = 0 | ||
| call realloc(contactids_2D2D, size(contactnetlinks), keepExisting=.false.) | ||
| do icontact = 1, size(contactnetlinks) | ||
| L = contactnetlinks(icontact) | ||
| if (L > 0 .and. L <= numL) then | ||
| if (Lc(L) == 1) then !> valid link | ||
| if (lne_org(1, L) < nump .and. lne_org(2, L) < nump) then !> both cells are real 2D cells | ||
| i_valid_contact = i_valid_contact + 1 | ||
| contactids_2D2D(i_valid_contact) = hashlist_contactids%id_list(icontact) | ||
| end if | ||
| end if | ||
| end if | ||
| end do | ||
| call realloc(contactids_2D2D, i_valid_contact, keepExisting=.true.) | ||
| end if | ||
|
|
||
| ! physically remove nodes and links from network | ||
| NPL = 0 ! number of polygon points, we set no polygon | ||
| call findcells(100000) ! output link permutation array "Lperm" (only used if jacells.eq.1) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je kan ook
i = 0doen als de link niet kan vinden in plaats vanres = .false.. Scheelt weer eenintent(out)maar misschien vind je dat niet mooi :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oja, het is denk ik niet onduidelijker en scheelt weer een argument, goed idee!