Skip to content

Commit be6e91e

Browse files
authored
Merge branch 'MFlowCode:master' into source
2 parents c61f36f + 530e1a5 commit be6e91e

File tree

7 files changed

+237
-110
lines changed

7 files changed

+237
-110
lines changed

docs/documentation/case.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ If `file_per_process` is true, then pre_process, simulation, and post_process mu
509509
| `acoustic_source` | Logical | Acoustic source module activation |
510510
| `num_source` | Integer | Number of acoustic sources |
511511
| `acoustic(i)%%support` | Integer | Geometry of spatial support for the acoustic source |
512-
| `acoustic(i)%%dipole` | Logical | Dipole source activation (optional; default = false for monopole) |
512+
| `acoustic(i)%%dipole` | Logical | Dipole source activation (optional; default = false -> monopole) |
513513
| `acoustic(i)%%loc(j)` | Real | $j$-th coordinate of the point that defines the acoustic source location |
514514
| `acoustic(i)%%pulse` | Integer | Acoustic wave form: [1] Sine [2] Gaussian [3] Square |
515515
| `acoustic(i)%%npulse` | Real | Number of pulse cycles |
@@ -525,7 +525,7 @@ If `file_per_process` is true, then pre_process, simulation, and post_process mu
525525
| `acoustic(i)%%foc_length` | Real | Transducer - Focal length of the transducer |
526526
| `acoustic(i)%%aperture` | Real | Transducer - Aperture of the transducer |
527527
| `acoustic(i)%%num_elements` | Integer | Transducer array - Number of transducer elements in a transducer array |
528-
| `acoustic(i)%%element_on` | Integer | Transducer array - Element number that is on (optional; default = 0 for all elements) |
528+
| `acoustic(i)%%element_on` | Integer | Transducer array - Element number that is on (optional; default = 0 -> all elements) |
529529
| `acoustic(i)%%element_spacing_angle` | Real | 2D Transducer array - Spacing angle (in rad) between adjacent transducer elements |
530530
| `acoustic(i)%%element_polygon_ratio` | Real | 3D Transducer array - Ratio of polygon side length to transducer element radius |
531531
| `acoustic(i)%%rotate_angle` | Real | 3D Transducer array - Rotation angle of the transducer array (optional; default = 0) |
@@ -809,7 +809,7 @@ Each patch requires a different set of parameters, which are also listed in this
809809
| 7 | Spherical Transducer | 3D | #5 requirements and `%%loc(3)` |
810810
| 9 | Arcuate Transducer Array | 2D | #5 requirements, `%%num_elements`, `%%element_on`, `%%element_spacing_angle` |
811811
| 10 | Annular Transducer Array | 2D-Axisym | #9 requirements |
812-
| 11 | Circular Transducer Array | 3D | #7 requirements, `%%element_polygon_ratio`, and `%%rotate_angle`(optional; default = 0) |
812+
| 11 | Circular Transducer Array | 3D | #7 requirements, `%%element_polygon_ratio`, and `%%rotate_angle` |
813813

814814
Details of the required parameters for each acoustic support type are listed in [Acoustic Source](#acoustic-source).
815815
The acoustic support number (`#`) corresponds to the acoustic support type `Acoustic(i)%%support`, where $i$ is the acoustic source index.

docs/documentation/getting-started.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ Please select your desired configuration from the list bellow:
2323
. ./mfc.sh load
2424
```
2525

26-
<a id="via-aptitude"></a>
2726
- **Via [Aptitude](https://wiki.debian.org/Aptitude):**
2827

2928
```shell
@@ -77,7 +76,7 @@ Useful software to install for using WSL on Windows:
7776
- [Windows Terminal](https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701)
7877
- [Visual Studio Code](https://code.visualstudio.com/) and the [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension
7978

80-
Once you have WSL installed, you can follow the instructions for *nix systems above (for Ubuntu, see [Via Aptitude](#via-aptitude)).
79+
Once you have WSL installed, you can follow the instructions for *nix systems above (for Ubuntu, see `Via Aptitude` section).
8180

8281
</details>
8382

src/common/include/macros.fpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,30 @@
115115
#endif
116116
#:enddef
117117

118+
#:def ACC_SETUP_source_spatials(*args)
119+
#ifdef CRAY_ACC_WAR
120+
block
121+
122+
@:LOG({'@:ACC_SETUP_source_spatials(${', '.join(args)}$)'})
123+
124+
#:for arg in args
125+
!$acc enter data copyin(${arg}$)
126+
if (allocated(${arg}$%coord)) then
127+
!$acc enter data create(${arg}$%coord)
128+
end if
129+
if (allocated(${arg}$%val)) then
130+
!$acc enter data create(${arg}$%val)
131+
end if
132+
if (allocated(${arg}$%angle)) then
133+
!$acc enter data create(${arg}$%angle)
134+
end if
135+
if (allocated(${arg}$%xyz_to_r_ratios)) then
136+
!$acc enter data create(${arg}$%xyz_to_r_ratios)
137+
end if
138+
#:endfor
139+
end block
140+
#endif
141+
#:enddef
142+
118143
#define t_vec3 real(kind(0d0)), dimension(1:3)
119144
#define t_mat4x4 real(kind(0d0)), dimension(1:4,1:4)

src/common/m_derived_types.fpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,14 @@ module m_derived_types
279279
integer :: element_on !< Element in the acoustic array to turn on
280280
end type acoustic_parameters
281281
282+
!> Acoustic source source_spatial pre-calculated values
283+
type source_spatial_type
284+
integer, dimension(:, :), allocatable :: coord !< List of grid points indices with non-zero source_spatial values
285+
real(kind(0d0)), dimension(:), allocatable :: val !< List of non-zero source_spatial values
286+
real(kind(0d0)), dimension(:), allocatable :: angle !< List of angles with x-axis for mom source term vector
287+
real(kind(0d0)), dimension(:, :), allocatable :: xyz_to_r_ratios !< List of [xyz]/r for mom source term vector
288+
end type source_spatial_type
289+
282290
!> Ghost Point for Immersed Boundaries
283291
type ghost_point
284292

0 commit comments

Comments
 (0)