提供正确的macrodef.h避免llm被误导

This commit is contained in:
CGH0S7
2026-02-25 11:47:14 +08:00
parent e2bc472845
commit ccf6adaf75
2 changed files with 222 additions and 195 deletions

View File

@@ -1,7 +1,23 @@
#define tetradtype 2
#define Cell
#define ghost_width 3
#define GAUGE 0
#define CPBC_ghost_width (ghost_width)
#define ABV 0
#define EScalar_CC 2
#if 0 #if 0
note here
define tetradtype
v:r; u: phi; w: theta v:r; u: phi; w: theta
tetradtype 0 tetradtype 0
v^a = (x,y,z) v^a = (x,y,z)
@@ -14,70 +30,48 @@ tetradtype 2
v_a = (x,y,z) v_a = (x,y,z)
orthonormal order: v,u,w orthonormal order: v,u,w
m = (phi - i theta)/sqrt(2) following Frans, Eq.(8) of PRD 75, 124018(2007) m = (phi - i theta)/sqrt(2) following Frans, Eq.(8) of PRD 75, 124018(2007)
#endif
#define tetradtype 2
#if 0 define Cell or Vertex
note here
Cell center or Vertex center Cell center or Vertex center
#endif
#define Cell
#if 0 define ghost_width
note here
2nd order: 2 2nd order: 2
4th order: 3 4th order: 3
6th order: 4 6th order: 4
8th order: 5 8th order: 5
#endif
#define ghost_width 3
#if 0 define WithShell
note here
use shell or not use shell or not
#endif
#define WithShell
#if 0 define CPBC
note here
use constraint preserving boundary condition or not use constraint preserving boundary condition or not
only affect Z4c only affect Z4c
#endif CPBC only supports WithShell
#define CPBC
#if 0 define GAUGE
note here
Gauge condition type
0: B^i gauge 0: B^i gauge
1: David's puncture gauge 1: David puncture gauge
2: MB B^i gauge 2: MB B^i gauge
3: RIT B^i gauge 3: RIT B^i gauge
4: MB beta gauge (beta gauge not means Eq.(3) of PRD 84, 124006) 4: MB beta gauge (beta gauge not means Eq.(3) of PRD 84, 124006)
5: RIT beta gauge (beta gauge not means Eq.(3) of PRD 84, 124006) 5: RIT beta gauge (beta gauge not means Eq.(3) of PRD 84, 124006)
6: MGB1 B^i gauge 6: MGB1 B^i gauge
7: MGB2 B^i gauge 7: MGB2 B^i gauge
#endif
#define GAUGE 2
#if 0 define CPBC_ghost_width (ghost_width)
buffer points for CPBC boundary buffer points for CPBC boundary
#endif
#define CPBC_ghost_width (ghost_width)
#if 0 define ABV
using BSSN variable for constraint violation and psi4 calculation: 0 0: using BSSN variable for constraint violation and psi4 calculation
using ADM variable for constraint violation and psi4 calculation: 1 1: using ADM variable for constraint violation and psi4 calculation
#endif
#define ABV 0
#if 0 define EScalar_CC
Type of Potential and Scalar Distribution in F(R) Scalar-Tensor Theory Type of Potential and Scalar Distribution in F(R) Scalar-Tensor Theory
1: Case C of 1112.3928, V=0 1: Case C of 1112.3928, V=0
2: shell with a2^2*phi0/(1+a2^2), f(R) = R+a2*R^2 induced V 2: shell with phi(r) = phi0 * a2^2/(1+a2^2), f(R) = R+a2*R^2 induced V
3: ground state of Schrodinger-Newton system, f(R) = R+a2*R^2 induced V 3: ground state of Schrodinger-Newton system, f(R) = R+a2*R^2 induced V
4: a2 = oo and phi(r) = phi0 * 0.5 * ( tanh((r+r0)/sigma) - tanh((r-r0)/sigma) ) 4: a2 = +oo and phi(r) = phi0 * 0.5 * ( tanh((r+r0)/sigma) - tanh((r-r0)/sigma) )
5: shell with phi(r) = phi0 * Exp(-(r-r0)**2/sigma), V = 0 5: shell with phi(r) = phi0 * Exp(-(r-r0)**2/sigma), V = 0
#endif #endif
#define EScalar_CC 2

View File

@@ -6,93 +6,125 @@
// application parameters // application parameters
/// ****
// sommerfeld boundary type
// 0: bam, 1: shibata
#define SommerType 0 #define SommerType 0
/// ****
// for Using Gauss-Legendre quadrature in theta direction
#define GaussInt #define GaussInt
/// **** #define ABEtype 0
//#define With_AHF
#define Psi4type 0
//#define Point_Psi4
#define RPS 1
#define AGM 0
#define RPB 0
#define MAPBH 1
#define PSTR 0
#define REGLEV 0
//#define USE_GPU
//#define CHECKDETAIL
//#define FAKECHECK
//
// define SommerType
// sommerfeld boundary type
// 0: bam
// 1: shibata
//
// define GaussInt
// for Using Gauss-Legendre quadrature in theta direction
//
// define ABEtype
// 0: BSSN vacuum // 0: BSSN vacuum
// 1: coupled to scalar field // 1: coupled to scalar field
// 2: Z4c vacuum // 2: Z4c vacuum
// 3: coupled to Maxwell field // 3: coupled to Maxwell field
// //
#define ABEtype 2 // define With_AHF
/// ****
// using Apparent Horizon Finder // using Apparent Horizon Finder
//#define With_AHF //
// define Psi4type
/// ****
// Psi4 calculation method // Psi4 calculation method
// 0: EB method // 0: EB method
// 1: 4-D method // 1: 4-D method
// //
#define Psi4type 0 // define Point_Psi4
/// ****
// for Using point psi4 or not // for Using point psi4 or not
//#define Point_Psi4 //
// define RPS
/// ****
// RestrictProlong in Step (0) or after Step (1) // RestrictProlong in Step (0) or after Step (1)
#define RPS 1 //
// define AGM
/// ****
// Enforce algebra constraint // Enforce algebra constraint
// for every RK4 sub step: 0 // for every RK4 sub step: 0
// only when iter_count == 3: 1 // only when iter_count == 3: 1
// after routine Step: 2 // after routine Step: 2
#define AGM 0 //
// define RPB
/// ****
// Restrict Prolong using BAM style 1 or old style 0 // Restrict Prolong using BAM style 1 or old style 0
#define RPB 0 //
// define MAPBH
/// ****
// 1: move Analysis out ot 4 sub steps and treat PBH with Euler method // 1: move Analysis out ot 4 sub steps and treat PBH with Euler method
#define MAPBH 1 //
// define PSTR
/// **** // parallel structure
// parallel structure, 0: level by level, 1: considering all levels, 2: as 1 but reverse the CPU order, 3: Frank's scheme // 0: level by level
#define PSTR 0 // 1: considering all levels
// 2: as 1 but reverse the CPU order
/// **** // 3: Frank's scheme
//
// define REGLEV
// regrid for every level or for all levels at a time // regrid for every level or for all levels at a time
// 0: for every level; 1: for all // 0: for every level;
#define REGLEV 0 // 1: for all
//
/// **** // define USE_GPU
// use gpu or not // use gpu or not
//#define USE_GPU //
// define CHECKDETAIL
/// ****
// use checkpoint for every process // use checkpoint for every process
//#define CHECKDETAIL //
// define FAKECHECK
/// ****
// use FakeCheckPrepare to write CheckPoint // use FakeCheckPrepare to write CheckPoint
//#define FAKECHECK //
////================================================================ ////================================================================
// some basic parameters for numerical calculation // some basic parameters for numerical calculation
////================================================================
#define dim 3 #define dim 3
//#define Cell or Vertex in "microdef.fh" //#define Cell or Vertex in "macrodef.fh"
// ******
// buffer point number for mesh refinement interface
#define buffer_width 6 #define buffer_width 6
// ******
// buffer point number shell-box interface, on shell
#define SC_width buffer_width #define SC_width buffer_width
// buffer point number shell-box interface, on box
#define CS_width (2*buffer_width) #define CS_width (2*buffer_width)
//
// define Cell or Vertex in "macrodef.fh"
//
// define buffer_width
// buffer point number for mesh refinement interface
//
// define SC_width buffer_width
// buffer point number shell-box interface, on shell
//
// define CS_width
// buffer point number shell-box interface, on box
//
#if(buffer_width < ghost_width) #if(buffer_width < ghost_width)
# error we always assume buffer_width>ghost_width # error we always assume buffer_width>ghost_width
#endif #endif
@@ -110,3 +142,4 @@
#define TINY 1e-10 #define TINY 1e-10
#endif /* MICRODEF_H */ #endif /* MICRODEF_H */