-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
18 changed files
with
538 additions
and
264 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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@kernel function HyperViscTracerKernel!(FTr,@Const(Tr),@Const(Rho),@Const(D),@Const(DW),@Const(dXdxI), | ||
@Const(JJ),@Const(M),@Const(Glob)) | ||
|
||
I, J, iz = @index(Local, NTuple) | ||
_,_,Iz,IF = @index(Global, NTuple) | ||
|
||
ColumnTilesDim = @uniform @groupsize()[3] | ||
N = @uniform @groupsize()[1] | ||
Nz = @uniform @ndrange()[3] | ||
NF = @uniform @ndrange()[4] | ||
|
||
ID = I + (J - 1) * N | ||
@inbounds ind = Glob[ID,IF] | ||
|
||
TrCol = @localmem eltype(FTr) (N,N, ColumnTilesDim) | ||
TrCxCol = @localmem eltype(FTr) (N,N, ColumnTilesDim) | ||
TrCyCol = @localmem eltype(FTr) (N,N, ColumnTilesDim) | ||
if Iz <= Nz && IF <= NF | ||
@inbounds TrCol[I,J,iz] = Tr[Iz,ind] / Rho[Iz,ind] | ||
end | ||
@synchronize | ||
|
||
ID = I + (J - 1) * N | ||
@inbounds ind = Glob[ID,IF] | ||
|
||
if Iz <= Nz && IF <= NF | ||
@inbounds Dxc = D[I,1] * TrCol[1,J,iz] | ||
@inbounds Dyc = D[J,1] * TrCol[I,1,iz] | ||
for k = 2 : N | ||
@inbounds Dxc += D[I,k] * TrCol[k,J,iz] | ||
@inbounds Dyc += D[J,k] * TrCol[I,k,iz] | ||
end | ||
@views @inbounds (GradDx, GradDy) = Grad12(Dxc,Dyc,dXdxI[1:2,1:2,:,ID,Iz,IF],JJ[ID,:,Iz,IF]) | ||
@views @inbounds (tempx, tempy) = Contra12(GradDx,GradDy,dXdxI[1:2,1:2,:,ID,Iz,IF]) | ||
@inbounds TrCxCol[I,J,iz] = tempx | ||
@inbounds TrCyCol[I,J,iz] = tempy | ||
end | ||
|
||
@synchronize | ||
|
||
ID = I + (J - 1) * N | ||
@inbounds ind = Glob[ID,IF] | ||
if Iz <= Nz && IF <= NF | ||
@inbounds DivTr = DW[I,1] * TrCxCol[1,J,iz] + DW[J,1] * TrCyCol[I,1,iz] | ||
for k = 2 : N | ||
@inbounds DivTr += DW[I,k] * TrCxCol[k,J,iz] + DW[J,k] * TrCyCol[I,k,iz] | ||
end | ||
@inbounds @atomic FTr[Iz,ind] += DivTr / M[Iz,ind] | ||
end | ||
end |
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,7 @@ | ||
import CGDycore: | ||
Examples, Parallels, Models, Grids, Outputs, Integration, GPU, DyCore, FiniteElements | ||
using MPI | ||
|
||
function main(Order) | ||
F1 = FiniteElements.W1(Order) | ||
end |
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,38 +1,44 @@ | ||
mpirun -n 6 julia --project Examples/testNHSphere.jl \ | ||
--Problem="BaroWaveDrySphereOro" \ | ||
--Problem="BaroWaveDrySphere" \ | ||
--Device="CPU" \ | ||
--GPUType="Metal" \ | ||
--FloatTypeBackend="Float32" \ | ||
--NumberThreadGPU=512 \ | ||
--NumV=5 \ | ||
--NumTr=0 \ | ||
--ProfRho="BaroWaveDrySphere" \ | ||
--ProfTheta="BaroWaveDrySphere" \ | ||
--ProfVel="BaroWaveDrySphere" \ | ||
--ProfpBGrd="" \ | ||
--ProfRhoBGrd="" \ | ||
--Source=false \ | ||
--ProfpBGrd="IsoThermal" \ | ||
--ProfRhoBGrd="IsoThermal" \ | ||
--RefProfile=false \ | ||
--Coriolis=true \ | ||
--SurfaceFluxMom=false \ | ||
--VerticalDiffusionMom=false \ | ||
--Curl=true\ | ||
--Forcing=false \ | ||
--Curl=false \ | ||
--ModelType="VectorInvariant" \ | ||
--StrideDamp=15000 \ | ||
--Relax=1.0e-2 \ | ||
--Coriolis=true \ | ||
--VerticalDiffusion=false \ | ||
--Upwind=true \ | ||
--HorLimit=false \ | ||
--Buoyancy=true \ | ||
--Decomp="EqualArea" \ | ||
--SimDays=20 \ | ||
--PrintDays=1 \ | ||
--dtau=300.0 \ | ||
--SimDays=10 \ | ||
--SimSeconds=0 \ | ||
--PrintSeconds=150 \ | ||
--PrintMinutes=0 \ | ||
--PrintHours=0 \ | ||
--PrintDays=0 \ | ||
--StartAverageDays=100 \ | ||
--Flat=true \ | ||
--dtau=75 \ | ||
--IntMethod="Rosenbrock" \ | ||
--Table="SSP-Knoth" \ | ||
--TopoS="EarthOrography" \ | ||
--Stretch=true \ | ||
--StretchType="Exp" \ | ||
--GridType="CubedSphere" \ | ||
--nz=45 \ | ||
--nPanel=16 \ | ||
--nz=64 \ | ||
--nPanel=30 \ | ||
--H=30000.0 \ | ||
--OrdPoly=3 \ | ||
--HyperVisc=true \ | ||
--HyperDCurl=1.e16 \ | ||
--HyperDGrad=1.e16 \ | ||
--HyperDDiv=1.e16 | ||
--HyperDCurl=1.e15 \ | ||
--HyperDGrad=1.e15 \ | ||
--HyperDDiv=1.e15 \ | ||
--HyperDDivW=1.e15 |
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
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.