-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
40a618b
commit e7d57f6
Showing
22 changed files
with
350 additions
and
158 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,45 +1,37 @@ | ||
|
||
PROGRAM main | ||
USE easifemBase | ||
USE easifemClasses | ||
USE FEDomain_Class | ||
|
||
IMPLICIT NONE | ||
|
||
TYPE(FEDomain_) :: obj | ||
TYPE(HDF5File_) :: meshfile | ||
CHARACTER(*), PARAMETER :: filename="../../Mesh/examples/meshdata/small_tri3_mesh_two_region.h5" | ||
REAL(DFP) :: ans(3, 4) | ||
|
||
ans(:, 1) = [0, 0, 0] | ||
ans(:, 2) = [1, 0, 0] | ||
ans(:, 3) = [2, 0, 0] | ||
ans(:, 4) = [0, 1, 0] | ||
|
||
CALL meshfile%Initiate(filename, "READ") | ||
CALL meshfile%OPEN() | ||
CALL obj%Initiate(meshfile, '') | ||
|
||
BLOCK | ||
REAL(DFP), ALLOCATABLE :: xij(:, :) | ||
CALL Reallocate(xij, 3, obj%GetTotalNodes()) | ||
CALL obj%GetNodeCoord(xij) | ||
CALL OK(ALL(xij(1:3, 1:4) .approxeq.ans(1:3, 1:4)), "GetNodeCoord: ") | ||
END BLOCK | ||
|
||
BLOCK | ||
REAL(DFP), ALLOCATABLE :: xij(:, :) | ||
CALL Reallocate(xij, 2, obj%GetTotalNodes()) | ||
CALL obj%GetNodeCoord(xij) | ||
CALL OK(ALL(xij(1:2, 1:4) .approxeq.ans(1:2, 1:4)), "GetNodeCoord: ") | ||
END BLOCK | ||
|
||
BLOCK | ||
REAL(DFP) :: xij(2, 4) | ||
|
||
CALL obj%GetNodeCoord(xij, [1, 2, 3, 4]) | ||
CALL OK(ALL(xij(1:2, 1:4) .approxeq.ans(1:2, 1:4)), "GetNodeCoord: ") | ||
END BLOCK | ||
|
||
CALL meshfile%DEALLOCATE() | ||
CALL obj%DEALLOCATE() | ||
END PROGRAM main |
This file contains 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 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 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 |
---|---|---|
@@ -1,40 +1,33 @@ | ||
|
||
PROGRAM main | ||
USE easifemBase | ||
USE easifemClasses | ||
USE FEDomain_Class | ||
|
||
IMPLICIT NONE | ||
|
||
TYPE(FEDomain_) :: obj | ||
TYPE(HDF5File_) :: meshfile | ||
CHARACTER(*), PARAMETER :: filename="../../Mesh/examples/meshdata/small_tri3_mesh_two_region.h5" | ||
|
||
CALL meshfile%Initiate(filename, "READ") | ||
CALL meshfile%OPEN() | ||
CALL obj%Initiate(meshfile, '') | ||
|
||
BLOCK | ||
INTEGER(I4B), ALLOCATABLE :: nptrs(:) | ||
nptrs = obj%GetNptrs(2) | ||
CALL HeapSort(nptrs) | ||
CALL OK(ALL(nptrs .EQ. arange(1, obj%GetTotalNodes())), "GetNptrs: ") | ||
END BLOCK | ||
|
||
BLOCK | ||
INTEGER(I4B), ALLOCATABLE :: nptrs(:) | ||
nptrs = obj%GetNptrs(1) | ||
CALL HeapSort(nptrs) | ||
CALL OK(ALL(nptrs .EQ. arange(1, obj%GetTotalNodes(1))), "GetNptrs: ") | ||
END BLOCK | ||
|
||
BLOCK | ||
INTEGER(I4B), ALLOCATABLE :: nptrs(:) | ||
nptrs = obj%GetNptrs(0) | ||
CALL HeapSort(nptrs) | ||
CALL OK(ALL(nptrs .EQ. arange(1, obj%GetTotalNodes(0))), "GetNptrs: ") | ||
END BLOCK | ||
|
||
CALL meshfile%DEALLOCATE() | ||
CALL obj%DEALLOCATE() | ||
|
||
END PROGRAM main |
This file contains 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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<!-- markdownlint-disable MD041 MD013 MD033 --> | ||
|
||
```fortran | ||
PROGRAM main | ||
USE easifemBase | ||
|
This file contains 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 |
---|---|---|
@@ -1,35 +1,29 @@ | ||
|
||
PROGRAM main | ||
USE easifemBase | ||
USE easifemClasses | ||
USE FEDomain_Class | ||
|
||
IMPLICIT NONE | ||
|
||
TYPE(FEDomain_) :: obj | ||
TYPE(HDF5File_) :: meshfile | ||
CHARACTER(*), PARAMETER :: filename="../../Mesh/examples/meshdata/small_tri3_mesh_two_region.h5" | ||
|
||
CALL meshfile%Initiate(filename, "READ") | ||
CALL meshfile%OPEN() | ||
CALL obj%Initiate(meshfile, '') | ||
|
||
BLOCK | ||
INTEGER(I4B), ALLOCATABLE :: nptrs(:) | ||
CALL Reallocate(nptrs, obj%GetTotalNodes()) | ||
CALL obj%GetNptrs_(nptrs=nptrs, dim=2) | ||
CALL HeapSort(nptrs) | ||
CALL OK(ALL(nptrs .EQ. arange(1, obj%GetTotalNodes())), "GetNptrs: ") | ||
END BLOCK | ||
|
||
BLOCK | ||
INTEGER(I4B), ALLOCATABLE :: nptrs(:) | ||
CALL Reallocate(nptrs, obj%GetTotalNodes(1)) | ||
CALL obj%GetNptrs_(nptrs=nptrs, dim=1) | ||
CALL HeapSort(nptrs) | ||
CALL OK(ALL(nptrs .EQ. arange(1, obj%GetTotalNodes(1))), "GetNptrs: ") | ||
END BLOCK | ||
|
||
CALL meshfile%DEALLOCATE() | ||
CALL obj%DEALLOCATE() | ||
|
||
END PROGRAM main |
This file contains 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 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 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Testing initiate method for 2D mesh. | ||
<!-- markdownlint-disable MD041 MD013 MD033 --> | ||
|
||
```fortran | ||
PROGRAM main | ||
|
46 changes: 23 additions & 23 deletions
46
docs/docs-api/FEDomain/examples/_IsElementPresent_test_1.F90
This file contains 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 |
---|---|---|
@@ -1,27 +1,27 @@ | ||
|
||
PROGRAM main | ||
USE easifemBase | ||
USE easifemClasses | ||
USE FEDomain_Class | ||
IMPLICIT NONE | ||
TYPE(FEDomain_) :: obj | ||
TYPE(HDF5File_) :: meshfile | ||
USE easifemBase | ||
USE easifemClasses | ||
USE FEDomain_Class | ||
IMPLICIT NONE | ||
TYPE(FEDomain_) :: obj | ||
TYPE(HDF5File_) :: meshfile | ||
CHARACTER(*), PARAMETER :: filename="../../Mesh/examples/meshdata/small_tri3_mesh_two_region.h5" | ||
CALL meshfile%Initiate(filename, "READ") | ||
CALL meshfile%Open() | ||
CALL obj%Initiate(meshfile, '') | ||
! Let us now test `isElementPresent` method, | ||
! which returns true IF a given global node is present in the domain. | ||
CALL OK( obj%isElementPresent( 35 ), "isElementPresent : " ) | ||
CALL OK( (obj%isElementPresent( 84 )), "isElementPresent : " ) | ||
CALL OK( .NOT. (obj%isElementPresent( 7 )), "isElementPresent : " ) | ||
CALL OK( .NOT. (obj%isElementPresent( 21 )), "isElementPresent : " ) | ||
CALL OK( obj%isElementPresent( 35, 2 ), "isElementPresent : " ) | ||
CALL OK( (obj%isElementPresent( 84, 2 )), "isElementPresent : " ) | ||
CALL OK( .NOT. (obj%isElementPresent( 35, 1 )), "isElementPresent : " ) | ||
CALL OK( .NOT. (obj%isElementPresent( 84, 1 )), "isElementPresent : " ) | ||
CALL OK( .NOT. (obj%isElementPresent( 7, 2 )), "isElementPresent : " ) | ||
CALL OK( .NOT. (obj%isElementPresent( 21, 2 )), "isElementPresent : " ) | ||
CALL meshfile%Deallocate() | ||
CALL obj%Deallocate() | ||
CALL meshfile%Initiate(filename, "READ") | ||
CALL meshfile%OPEN() | ||
CALL obj%Initiate(meshfile, '') | ||
! Let us now test `isElementPresent` method, | ||
! which returns true IF a given global node is present in the domain. | ||
CALL OK(obj%isElementPresent(35), "isElementPresent : ") | ||
CALL OK((obj%isElementPresent(84)), "isElementPresent : ") | ||
CALL OK(.NOT. (obj%isElementPresent(7)), "isElementPresent : ") | ||
CALL OK(.NOT. (obj%isElementPresent(21)), "isElementPresent : ") | ||
CALL OK(obj%isElementPresent(35, 2), "isElementPresent : ") | ||
CALL OK((obj%isElementPresent(84, 2)), "isElementPresent : ") | ||
CALL OK(.NOT. (obj%isElementPresent(35, 1)), "isElementPresent : ") | ||
CALL OK(.NOT. (obj%isElementPresent(84, 1)), "isElementPresent : ") | ||
CALL OK(.NOT. (obj%isElementPresent(7, 2)), "isElementPresent : ") | ||
CALL OK(.NOT. (obj%isElementPresent(21, 2)), "isElementPresent : ") | ||
CALL meshfile%DEALLOCATE() | ||
CALL obj%DEALLOCATE() | ||
END PROGRAM main |
This file contains 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
``` fortran | ||
```fortran | ||
PROGRAM main | ||
USE easifemBase | ||
USE easifemClasses | ||
|
This file contains 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
PROGRAM main | ||
USE easifemBase | ||
USE easifemClasses | ||
|
||
IMPLICIT NONE | ||
|
||
TYPE(FEMesh_) :: obj | ||
TYPE(HDF5File_) :: meshfile | ||
CHARACTER(LEN=*), PARAMETER :: filename = & | ||
& "../../Mesh/examples/meshdata/small_mesh.h5" | ||
|
||
CALL meshfile%Initiate(FileName=filename, MODE="READ") | ||
|
||
CALL meshfile%OPEN() | ||
|
||
CALL obj%Initiate(hdf5=meshfile, dim=2) | ||
|
||
CALL obj%InitiateFacetElements() | ||
|
||
CALL obj%DisplayFacetData(msg="facet data of "//filename) | ||
|
||
CALL obj%DEALLOCATE() | ||
CALL meshfile%DEALLOCATE() | ||
END PROGRAM main |
This file contains 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
PROGRAM main | ||
USE easifemBase | ||
USE easifemClasses | ||
|
||
IMPLICIT NONE | ||
|
||
TYPE(FEMesh_) :: obj | ||
TYPE(HDF5File_) :: meshfile | ||
CHARACTER(LEN=*), PARAMETER :: filename = & | ||
& "../../Mesh/examples/meshdata/small_mesh.h5" | ||
|
||
CALL meshfile%Initiate(FileName=filename, MODE="READ") | ||
|
||
CALL meshfile%OPEN() | ||
|
||
CALL obj%Initiate(hdf5=meshfile, dim=2) | ||
|
||
CALL obj%InitiateFacetElements() | ||
|
||
CALL obj%DEALLOCATE() | ||
CALL meshfile%DEALLOCATE() | ||
END PROGRAM main |
17 changes: 17 additions & 0 deletions
17
docs/docs-api/FEMesh/examples/_DisplayInternalFacetData_test_1.F90
This file contains 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
PROGRAM main | ||
USE easifemBase | ||
USE easifemClasses | ||
IMPLICIT NONE | ||
TYPE(FEMesh_) :: obj | ||
TYPE(HDF5File_) :: meshfile | ||
CHARACTER(LEN=*), PARAMETER :: filename = & | ||
& "../../Mesh/examples/meshdata/small_mesh.h5" | ||
CALL meshfile%Initiate(FileName=filename, MODE="READ") | ||
CALL meshfile%OPEN() | ||
CALL obj%Initiate(hdf5=meshfile, dim=2) | ||
CALL obj%InitiateFacetElements() | ||
CALL obj%DisplayInternalFacetData(msg="internal facet data of "//filename) | ||
CALL obj%DEALLOCATE() | ||
CALL meshfile%DEALLOCATE() | ||
END PROGRAM main |
Oops, something went wrong.