aboutsummaryrefslogtreecommitdiff
path: root/CarpetExtra/IDScalarWaveFO
diff options
context:
space:
mode:
authoreschnett <>2001-03-01 11:40:00 +0000
committereschnett <>2001-03-01 11:40:00 +0000
commit310f0ea48d18866b773136aed11200b6eda6378b (patch)
tree445d3e34ce8b89812994b6614f7bc9f4acbc7fe2 /CarpetExtra/IDScalarWaveFO
Initial revision
darcs-hash:20010301114010-f6438-12fb8a9ffcc80e86c0a97e37b5b0dae0dbc59b79.gz
Diffstat (limited to 'CarpetExtra/IDScalarWaveFO')
-rw-r--r--CarpetExtra/IDScalarWaveFO/README10
-rw-r--r--CarpetExtra/IDScalarWaveFO/doc/documentation.tex144
-rw-r--r--CarpetExtra/IDScalarWaveFO/interface.ccl6
-rw-r--r--CarpetExtra/IDScalarWaveFO/param.ccl32
-rw-r--r--CarpetExtra/IDScalarWaveFO/schedule.ccl7
-rw-r--r--CarpetExtra/IDScalarWaveFO/src/initialdata.F7761
-rw-r--r--CarpetExtra/IDScalarWaveFO/src/make.code.defn9
7 files changed, 269 insertions, 0 deletions
diff --git a/CarpetExtra/IDScalarWaveFO/README b/CarpetExtra/IDScalarWaveFO/README
new file mode 100644
index 000000000..6c4dd2d75
--- /dev/null
+++ b/CarpetExtra/IDScalarWaveFO/README
@@ -0,0 +1,10 @@
+CVS info : $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveFO/README,v 1.1 2003/06/18 18:24:29 schnetter Exp $
+
+Cactus Code Thorn IDScalarWaveFO
+Thorn Author(s) : Erik Schnetter <schnetter@uni-tuebingen.de>
+Thorn Maintainer(s) : Erik Schnetter <schnetter@uni-tuebingen.de>
+--------------------------------------------------------------------------
+
+Purpose of the thorn:
+
+Create initial data for WaveToyFO.
diff --git a/CarpetExtra/IDScalarWaveFO/doc/documentation.tex b/CarpetExtra/IDScalarWaveFO/doc/documentation.tex
new file mode 100644
index 000000000..96a39119b
--- /dev/null
+++ b/CarpetExtra/IDScalarWaveFO/doc/documentation.tex
@@ -0,0 +1,144 @@
+% *======================================================================*
+% Cactus Thorn template for ThornGuide documentation
+% Author: Ian Kelley
+% Date: Sun Jun 02, 2002
+% $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveFO/doc/documentation.tex,v 1.1 2003/06/18 18:24:29 schnetter Exp $
+%
+% Thorn documentation in the latex file doc/documentation.tex
+% will be included in ThornGuides built with the Cactus make system.
+% The scripts employed by the make system automatically include
+% pages about variables, parameters and scheduling parsed from the
+% relevent thorn CCL files.
+%
+% This template contains guidelines which help to assure that your
+% documentation will be correctly added to ThornGuides. More
+% information is available in the Cactus UsersGuide.
+%
+% Guidelines:
+% - Do not change anything before the line
+% % START CACTUS THORNGUIDE",
+% except for filling in the title, author, date etc. fields.
+% - Each of these fields should only be on ONE line.
+% - Author names should be sparated with a \\ or a comma
+% - You can define your own macros, but they must appear after
+% the START CACTUS THORNGUIDE line, and must not redefine standard
+% latex commands.
+% - To avoid name clashes with other thorns, 'labels', 'citations',
+% 'references', and 'image' names should conform to the following
+% convention:
+% ARRANGEMENT_THORN_LABEL
+% For example, an image wave.eps in the arrangement CactusWave and
+% thorn WaveToyC should be renamed to CactusWave_WaveToyC_wave.eps
+% - Graphics should only be included using the graphix package.
+% More specifically, with the "includegraphics" command. Do
+% not specify any graphic file extensions in your .tex file. This
+% will allow us (later) to create a PDF version of the ThornGuide
+% via pdflatex. |
+% - References should be included with the latex "bibitem" command.
+% - Use \begin{abstract}...\end{abstract} instead of \abstract{...}
+% - Do not use \appendix, instead include any appendices you need as
+% standard sections.
+% - For the benefit of our Perl scripts, and for future extensions,
+% please use simple latex.
+%
+% *======================================================================*
+%
+% Example of including a graphic image:
+% \begin{figure}[ht]
+% \begin{center}
+% \includegraphics[width=6cm]{MyArrangement_MyThorn_MyFigure}
+% \end{center}
+% \caption{Illustration of this and that}
+% \label{MyArrangement_MyThorn_MyLabel}
+% \end{figure}
+%
+% Example of using a label:
+% \label{MyArrangement_MyThorn_MyLabel}
+%
+% Example of a citation:
+% \cite{MyArrangement_MyThorn_Author99}
+%
+% Example of including a reference
+% \bibitem{MyArrangement_MyThorn_Author99}
+% {J. Author, {\em The Title of the Book, Journal, or periodical}, 1 (1999),
+% 1--16. {\tt http://www.nowhere.com/}}
+%
+% *======================================================================*
+
+% If you are using CVS use this line to give version information
+% $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveFO/doc/documentation.tex,v 1.1 2003/06/18 18:24:29 schnetter Exp $
+
+\documentclass{article}
+
+% Use the Cactus ThornGuide style file
+% (Automatically used from Cactus distribution, if you have a
+% thorn without the Cactus Flesh download this from the Cactus
+% homepage at www.cactuscode.org)
+\usepackage{../../../../doc/latex/cactus}
+
+\begin{document}
+
+% The author of the documentation
+\author{Erik Schnetter \textless schnetter@uni-tuebingen.de\textgreater}
+
+% The title of the document (not necessarily the name of the Thorn)
+\title{}
+
+% the date your document was last changed, if your document is in CVS,
+% please use:
+% \date{$ $Date: 2003/06/18 18:24:29 $ $}
+\date{June 18 2003}
+
+\maketitle
+
+% Do not delete next line
+% START CACTUS THORNGUIDE
+
+% Add all definitions used in this documentation here
+% \def\mydef etc
+
+% Add an abstract for this thorn's documentation
+\begin{abstract}
+
+\end{abstract}
+
+% The following sections are suggestive only.
+% Remove them or add your own.
+
+\section{Introduction}
+
+\section{Physical System}
+
+\section{Numerical Implementation}
+
+\section{Using This Thorn}
+
+\subsection{Obtaining This Thorn}
+
+\subsection{Basic Usage}
+
+\subsection{Special Behaviour}
+
+\subsection{Interaction With Other Thorns}
+
+\subsection{Examples}
+
+\subsection{Support and Feedback}
+
+\section{History}
+
+\subsection{Thorn Source Code}
+
+\subsection{Thorn Documentation}
+
+\subsection{Acknowledgements}
+
+
+\begin{thebibliography}{9}
+
+\end{thebibliography}
+
+% Do not delete next line
+% END CACTUS THORNGUIDE
+
+\end{document}
diff --git a/CarpetExtra/IDScalarWaveFO/interface.ccl b/CarpetExtra/IDScalarWaveFO/interface.ccl
new file mode 100644
index 000000000..065f14ec1
--- /dev/null
+++ b/CarpetExtra/IDScalarWaveFO/interface.ccl
@@ -0,0 +1,6 @@
+# Interface definition for thorn IDScalarWaveFO
+# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveFO/interface.ccl,v 1.1 2003/06/18 18:24:29 schnetter Exp $
+
+IMPLEMENTS: IDScalarWaveFO
+
+INHERITS: Grid WaveToyFO
diff --git a/CarpetExtra/IDScalarWaveFO/param.ccl b/CarpetExtra/IDScalarWaveFO/param.ccl
new file mode 100644
index 000000000..e6bc7b617
--- /dev/null
+++ b/CarpetExtra/IDScalarWaveFO/param.ccl
@@ -0,0 +1,32 @@
+# Parameter definitions for thorn IDScalarWaveFO
+# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveFO/param.ccl,v 1.3 2004/05/07 22:51:08 schnetter Exp $
+
+RESTRICTED:
+
+KEYWORD initial_data "Type of initial data"
+{
+ "plane" :: "Plane wave"
+ "noise" :: "Noise"
+} "plane"
+
+PRIVATE:
+
+CCTK_REAL wave_number[3] "Wave number"
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL phase_offset[3] "Phase offset"
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL time_offset "Time offset"
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL amplitude "Wave amplitude"
+{
+ *:* :: ""
+} 1.0
diff --git a/CarpetExtra/IDScalarWaveFO/schedule.ccl b/CarpetExtra/IDScalarWaveFO/schedule.ccl
new file mode 100644
index 000000000..8e615a685
--- /dev/null
+++ b/CarpetExtra/IDScalarWaveFO/schedule.ccl
@@ -0,0 +1,7 @@
+# Schedule definitions for thorn IDScalarWaveFO
+# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveFO/schedule.ccl,v 1.3 2004/01/11 12:20:39 schnetter Exp $
+
+SCHEDULE IDScalarWaveFO_InitialData AT initial
+{
+ LANG: Fortran
+} "Initial data for the scalar field"
diff --git a/CarpetExtra/IDScalarWaveFO/src/initialdata.F77 b/CarpetExtra/IDScalarWaveFO/src/initialdata.F77
new file mode 100644
index 000000000..e2808d54f
--- /dev/null
+++ b/CarpetExtra/IDScalarWaveFO/src/initialdata.F77
@@ -0,0 +1,61 @@
+c $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveFO/src/initialdata.F77,v 1.5 2004/05/07 22:51:08 schnetter Exp $
+
+#include "cctk.h"
+#include "cctk_Arguments.h"
+#include "cctk_Functions.h"
+#include "cctk_Parameters.h"
+
+ subroutine IDScalarWaveFO_InitialData (CCTK_ARGUMENTS)
+ implicit none
+ DECLARE_CCTK_ARGUMENTS
+ DECLARE_CCTK_FUNCTIONS
+ DECLARE_CCTK_PARAMETERS
+ CCTK_REAL pi
+ parameter (pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068d0)
+ CCTK_REAL omega
+ integer i, j, k
+
+ if (CCTK_EQUALS(initial_data, "plane")) then
+ omega = sqrt(wave_number(1)**2 + wave_number(2)**2 + wave_number(3)**2)
+ do k=1,cctk_lsh(3)
+ do j=1,cctk_lsh(2)
+ do i=1,cctk_lsh(1)
+ phi(i,j,k) = amplitude * cos (2*pi *
+ $ ( wave_number(1)*(x(i,j,k)-phase_offset(1))
+ $ + wave_number(2)*(y(i,j,k)-phase_offset(2))
+ $ + wave_number(3)*(z(i,j,k)-phase_offset(3))
+ $ + omega*(cctk_time-time_offset)))
+ psix(i,j,k) = amplitude * wave_number(1) / omega * cos (2*pi *
+ $ ( wave_number(1)*(x(i,j,k)-phase_offset(1))
+ $ + wave_number(2)*(y(i,j,k)-phase_offset(2))
+ $ + wave_number(3)*(z(i,j,k)-phase_offset(3))
+ $ + omega*(cctk_time-time_offset)))
+ psiy(i,j,k) = amplitude * wave_number(2) / omega * cos (2*pi *
+ $ ( wave_number(1)*(x(i,j,k)-phase_offset(1))
+ $ + wave_number(2)*(y(i,j,k)-phase_offset(2))
+ $ + wave_number(3)*(z(i,j,k)-phase_offset(3))
+ $ + omega*(cctk_time-time_offset)))
+ psiz(i,j,k) = amplitude * wave_number(3) / omega * cos (2*pi *
+ $ ( wave_number(1)*(x(i,j,k)-phase_offset(1))
+ $ + wave_number(2)*(y(i,j,k)-phase_offset(2))
+ $ + wave_number(3)*(z(i,j,k)-phase_offset(3))
+ $ + omega*(cctk_time-time_offset)))
+ end do
+ end do
+ end do
+
+ else if (CCTK_EQUALS(initial_data, "noise")) then
+
+ do k=1,cctk_lsh(3)
+ do j=1,cctk_lsh(2)
+ do i=1,cctk_lsh(1)
+ call random_number (phi(i,j,k))
+ call random_number (psix(i,j,k))
+ call random_number (psiy(i,j,k))
+ call random_number (psiz(i,j,k))
+ end do
+ end do
+ end do
+
+ end if
+ end
diff --git a/CarpetExtra/IDScalarWaveFO/src/make.code.defn b/CarpetExtra/IDScalarWaveFO/src/make.code.defn
new file mode 100644
index 000000000..472cb8f8d
--- /dev/null
+++ b/CarpetExtra/IDScalarWaveFO/src/make.code.defn
@@ -0,0 +1,9 @@
+# Main make.code.defn file for thorn IDScalarWaveFO
+# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveFO/src/make.code.defn,v 1.1 2003/06/18 18:24:29 schnetter Exp $
+
+# Source files in this directory
+SRCS = initialdata.F77
+
+# Subdirectories containing source files
+SUBDIRS =
+