Commit 3bbab2ca authored by Michael Dumbser's avatar Michael Dumbser

Added GRMHD.f90.

First successful tests with CCZ4GRHD inside the smooth interior region of a TOV star :-)
parent b8c1afe6
Pipeline #168949 failed with stage
{
"project_name": "FOCCZ4",
"compiler_flags": "-DCCZ4GRHD -DGLMROT -DRNSTOV",
"paths": {
"peano_kernel_path": "./Peano",
"exahype_path": "./ExaHyPE",
"output_directory": "./ApplicationExamples/FOCCZ4/FOCCZ4",
"log_file": "whatever.log"
},
"architecture": "noarch",
"computational_domain": {
"dimension": 3,
"end_time": 101.0,
"offset": [
-4.0,
-4.0,
-4.0
],
"width": [
8.0,
8.0,
8.0
]
},
"shared_memory": {
"cores": 10,
"properties_file": "sharedmemory.properties",
"autotuning_strategy": "dummy",
"background_job_consumers": 9
},
"distributed_memory": {
"timeout": 6000,
"load_balancing_type": "static",
"buffer_size": 6400,
"load_balancing_strategy": "hotspot",
"node_pool_strategy": "fair",
"ranks_per_node": 10
},
"optimisation": {
"fuse_algorithmic_steps": "all",
"fuse_algorithmic_steps_rerun_factor": 0.99,
"fuse_algorithmic_steps_diffusion_factor": 0.99,
"spawn_predictor_as_background_thread": true,
"spawn_update_as_background_thread": true,
"spawn_amr_background_threads": true,
"disable_vertex_exchange_in_time_steps": true,
"time_step_batch_factor": 0.0,
"disable_metadata_exchange_in_batched_time_steps": false,
"double_compression": 0.0,
"spawn_double_compression_as_background_thread": true
},
"solvers": [
{
"type": "Limiting-ADER-DG",
"name": "FOCCZ4Solver",
"order": 3,
"maximum_mesh_size": 2.0,
"maximum_mesh_depth": 0,
"time_stepping": "global",
"aderdg_kernel": {
"language": "C",
"nonlinear": true,
"terms": [
"flux",
"ncp",
"source"
],
"space_time_predictor": {},
"optimised_terms": [
"fusedsource"
],
"optimised_kernel_debugging": [],
"implementation": "generic"
},
"point_sources": 0,
"limiter": {
"dmp_observables": 3,
"dmp_relaxation_parameter": 1e+3,
"dmp_difference_scaling": 1e+4,
"patch_size": "max",
"implementation": "generic"
},
"fv_kernel": {
"language": "C",
"terms": [
"flux",
"ncp",
"source"
],
"scheme": "musclhancock",
"slope_limiter" : "minmod",
"implementation": "generic"
},
"variables": [
{
"name": "MYQ",
"multiplicity": 96
}
],
"parameters": {
"reference": "CCZ4TOV"
},
"plotters": [
{
"type": "user::defined",
"name": "TecplotWriter",
"time": 0.0,
"repeat": 1.0,
"output": "./output/tecplot",
"variables": 96
}
]
}
]
}
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -11,7 +11,7 @@
! Trento (EQNTYPE4)
RECURSIVE SUBROUTINE PDEFlux(f,g,hz,Q)
USE MainVariables, ONLY : nVar, nDim, EQN
USE MainVariables, ONLY : nVar, nDim, EQN, d
USE iso_c_binding
IMPLICIT NONE
REAL :: f(nVar), g(nVar), h(nVar), hz(nVar), Q(nVar), V(nVar)
......@@ -21,15 +21,40 @@ RECURSIVE SUBROUTINE PDEFlux(f,g,hz,Q)
! Local varialbes
REAL :: p, A(3,3), AU(3), detA, GT(3,3), devG(3,3), TT(3,3), Id(3,3), T,falpha
INTEGER :: iErr
REAL :: ialpha,LEalpha,u(3)
REAL :: ialpha,LEalpha,alpha,phi,u(3)
real :: LL_gpr,MM_gpr,dMM_gpr,dKK_gpr,YY,etaloc
REAL :: x(3),time,rho,Jx,Jy,Jz, Jv
#ifdef VECTOR
#ifdef AVX512
INTEGER, PARAMETER :: nVarGRMHD = 24 ! The number of variables of the PDE system
#else
INTEGER, PARAMETER :: nVarGRMHD = 20 ! The number of variables of the PDE system
#endif
#else
INTEGER, PARAMETER :: nVarGRMHD = 19 ! The number of variables of the PDE system
#endif
REAL :: QGRMHD(nVarGRMHD), FGRMHD(nVarGRMHD,d)
f=0
g=0
h=0
!CALL PDECons2Prim(V,Q,x,time,iErr)
#ifdef CCZ4GRHD
alpha = EXP(Q(17))
phi = EXP(Q(55))
QGRMHD(1:5) = Q(60:64) ! hydro variables
QGRMHD(6:9) = 0.0 ! EM variables
QGRMHD(10) = alpha ! lapse
QGRMHD(11:13) = Q(18:20) ! shift
QGRMHD(14:19) = Q(1:6)/phi**2 ! metric
CALL PDEFluxGRMHD(FGRMHD,QGRMHD)
f(60:64) = FGRMHD(1:5,1)
g(60:64) = FGRMHD(1:5,2)
h(60:64) = FGRMHD(1:5,3)
#endif
IF(nDim==3) THEN
hz=h
END IF
......@@ -4021,6 +4046,9 @@ RECURSIVE SUBROUTINE pderefinecriteria(refine_flag, max_luh,min_luh,x)
Integer, intent(out) :: refine_flag
real, intent(in) :: max_luh(nVar),min_luh(nVar),x(nDim)
refine_flag = 0
!if(abs(x(1))<10) then
! refine_flag=2
! return
......@@ -4030,17 +4058,23 @@ RECURSIVE SUBROUTINE pderefinecriteria(refine_flag, max_luh,min_luh,x)
! return
!end if
#ifdef CCZ4EINSTEIN
if(abs(max_luh(60)-min_luh(60))>1.e-4 .or. abs(max_luh(54)-min_luh(54))>1.e-3) then
refine_flag=2
else
refine_flag=0
end if
! if(abs(max_luh(60)-min_luh(60))>1.e-4 .or. abs(max_luh(54)-min_luh(54))>1.e-3) then
! refine_flag=2
! else
! refine_flag=0
! end if
!if(nDim .eq. 3) then
!if(sqrt(x(1)**2+x(2)**2+x(3)**2)<15.0) then
! refine_flag=2
!end if
!end if
if(nDim .eq. 3) then
if(sqrt(x(1)**2+x(2)**2+x(3)**2)<15.0) then
refine_flag=2
end if
else
if(sqrt(x(1)**2+x(2)**2)<15.0) then
refine_flag=2
end if
end if
#endif
END SUBROUTINE pderefinecriteria
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment