Repository: einsteintoolkit/Cactus — pull request #21 (cpp)
Title: Add missing metrics/de_Sitter.F in EinsteinInitialData/Exact

This PR adds the missing source file metrics/de_Sitter.F to complete the EinsteinInitialData/Exact thorn implementation.

Resolved issues:
title: Implement the full functionality of Exact
body: Please implement the full functionality of `Exact` by finishing the code in `metrics/de_Sitter.F`.

## Thorn Information:
- Name: Exact
- Target file: metrics/de_Sitter.F

## Interface Definition in interface.ccl:

## Schedule Definition in schedule.ccl:

## Parameters Definition in param.ccl:

## Configuration Definition in configuration.ccl:

## Documentation Context in readme.md and doc/documentation.tex

## Related Code Context in src folder



Hints:

Fix patch:
diff --git a/arrangements/EinsteinInitialData/Exact/src/metrics/de_Sitter.F b/arrangements/EinsteinInitialData/Exact/src/metrics/de_Sitter.F
new file mode 100644
index 0000000..0000000
--- /dev/null
+++ b/arrangements/EinsteinInitialData/Exact/src/metrics/de_Sitter.F
@@ -0,0 +1,79 @@
+C Einstein-DeSitter metric spacetime !!!!
+C It emulates the Robertson-Walker universe
+C near t=0, with zero pressure, and k=0
+C See :J.N. Islam, An Introduction to 
+C Mathematical Cosmology, Cambridge, 1992 and 
+C S. Hawking, G.F.R. Ellis, The Large Scale
+C Structure of space-time, Cambridge, 1973
+C
+C Author : D. Vulcanov (Timisoara, Romania)
+C see ../../README for copyright & licensing info
+C
+C $Header$
+
+#include "cctk.h"
+#include "cctk_Parameters.h"
+
+      subroutine Exact__de_Sitter(
+     $     x, y, z, t,
+     $     gdtt, gdtx, gdty, gdtz, 
+     $     gdxx, gdyy, gdzz, gdxy, gdyz, gdzx,
+     $     gutt, gutx, guty, gutz, 
+     $     guxx, guyy, guzz, guxy, guyz, guzx,
+     $     psi, Tmunu_flag)
+
+      implicit none
+
+      DECLARE_CCTK_PARAMETERS
+
+c input arguments
+      CCTK_DECLARE(CCTK_REAL, x,)
+      CCTK_DECLARE(CCTK_REAL, y,)
+      CCTK_DECLARE(CCTK_REAL, z,)
+      CCTK_REAL t
+
+c output arguments
+      CCTK_REAL gdtt, gdtx, gdty, gdtz, 
+     $       gdxx, gdyy, gdzz, gdxy, gdyz, gdzx,
+     $       gutt, gutx, guty, gutz, 
+     $       guxx, guyy, guzz, guxy, guyz, guzx
+      CCTK_DECLARE(CCTK_REAL, psi,)
+      LOGICAL   Tmunu_flag
+
+c local variables
+      CCTK_REAL arad
+      CCTK_REAL am
+
+C This model has a cosmological constant
+C ==> it sets the stress-energy tensor in the "CalcTmunu" code
+      Tmunu_flag = .true.
+
+      arad = de_Sitter__scale
+ 
+      am=arad*t**(4.0D0/3.0D0)     
+
+      gdtt = -1.0D0 
+      gdtx = 0.0D0 
+      gdty = 0.0D0
+      gdtz = 0.0D0
+      gdxx = am
+      gdyy = am
+      gdzz = am
+      gdxy = 0.d0
+      gdyz = 0.d0
+      gdzx = 0.d0
+
+      gutt = -1.d0
+      gutx = 0.d0
+      guty = 0.d0
+      gutz = 0.d0
+      guxx = 1.d0/am
+      guyy = 1.d0/am
+      guzz = 1.d0/am
+      guxy = 0.d0
+      guyz = 0.d0
+      guzx = 0.d0
+
+
+      return
+      end

Test patch:
diff --git a/all_tests.txt b/all_tests.txt
new file mode 100644
index 0000000..0000000
--- /dev/null
+++ b/all_tests.txt
@@ -0,0 +1,2 @@
+Schwarzschild_EF
+bowl-init