aboutsummaryrefslogtreecommitdiff
path: root/CarpetExtra/IDScalarWaveMoL
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/IDScalarWaveMoL
Initial revision
darcs-hash:20010301114010-f6438-12fb8a9ffcc80e86c0a97e37b5b0dae0dbc59b79.gz
Diffstat (limited to 'CarpetExtra/IDScalarWaveMoL')
-rw-r--r--CarpetExtra/IDScalarWaveMoL/README10
-rw-r--r--CarpetExtra/IDScalarWaveMoL/doc/documentation.tex144
-rw-r--r--CarpetExtra/IDScalarWaveMoL/interface.ccl13
-rw-r--r--CarpetExtra/IDScalarWaveMoL/param.ccl50
-rw-r--r--CarpetExtra/IDScalarWaveMoL/schedule.ccl17
-rw-r--r--CarpetExtra/IDScalarWaveMoL/src/errors.F7736
-rw-r--r--CarpetExtra/IDScalarWaveMoL/src/initialdata.F7749
-rw-r--r--CarpetExtra/IDScalarWaveMoL/src/make.code.defn9
8 files changed, 328 insertions, 0 deletions
diff --git a/CarpetExtra/IDScalarWaveMoL/README b/CarpetExtra/IDScalarWaveMoL/README
new file mode 100644
index 000000000..c42d0163e
--- /dev/null
+++ b/CarpetExtra/IDScalarWaveMoL/README
@@ -0,0 +1,10 @@
+CVS info : $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveMoL/README,v 1.1 2003/06/18 18:24:29 schnetter Exp $
+
+Cactus Code Thorn IDScalarWaveMoL
+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 WaveToyMoL.
diff --git a/CarpetExtra/IDScalarWaveMoL/doc/documentation.tex b/CarpetExtra/IDScalarWaveMoL/doc/documentation.tex
new file mode 100644
index 000000000..22abf5155
--- /dev/null
+++ b/CarpetExtra/IDScalarWaveMoL/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/IDScalarWaveMoL/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/IDScalarWaveMoL/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 07 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/IDScalarWaveMoL/interface.ccl b/CarpetExtra/IDScalarWaveMoL/interface.ccl
new file mode 100644
index 000000000..1cef68090
--- /dev/null
+++ b/CarpetExtra/IDScalarWaveMoL/interface.ccl
@@ -0,0 +1,13 @@
+# Interface definition for thorn IDScalarWaveMoL
+# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveMoL/interface.ccl,v 1.1 2003/06/18 18:24:29 schnetter Exp $
+
+IMPLEMENTS: IDScalarWaveMoL
+
+INHERITS: Grid WaveToyMoL
+
+
+
+CCTK_REAL scalarevolveerror TYPE=gf
+{
+ phierror psierror
+} "Errors of the scalar field"
diff --git a/CarpetExtra/IDScalarWaveMoL/param.ccl b/CarpetExtra/IDScalarWaveMoL/param.ccl
new file mode 100644
index 000000000..b7d933e69
--- /dev/null
+++ b/CarpetExtra/IDScalarWaveMoL/param.ccl
@@ -0,0 +1,50 @@
+# Parameter definitions for thorn IDScalarWaveMoL
+# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveMoL/param.ccl,v 1.2 2003/08/14 17:22:09 schnetter Exp $
+
+KEYWORD initial_data "Initial data"
+{
+ "plane wave" :: "Plane wave"
+ "Gaussian pulse" :: "Gaussian pulse"
+} "plane wave"
+
+
+
+# Plane wave specification
+
+CCTK_REAL wave_number[3] "Wave number"
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL phase_offset[3] "Phase offset"
+{
+ *:* :: ""
+} 0.0
+
+
+
+# Gaussian pulse specification
+
+CCTK_REAL pulse_direction[3] "Pulse width"
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL pulse_offset[3] "Pulse offset"
+{
+ *:* :: ""
+} 0.0
+
+
+
+# Generic specifications
+
+CCTK_REAL time_offset "Time offset"
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL amplitude "Amplitude"
+{
+ *:* :: ""
+} 1.0
diff --git a/CarpetExtra/IDScalarWaveMoL/schedule.ccl b/CarpetExtra/IDScalarWaveMoL/schedule.ccl
new file mode 100644
index 000000000..4cb14d4d9
--- /dev/null
+++ b/CarpetExtra/IDScalarWaveMoL/schedule.ccl
@@ -0,0 +1,17 @@
+# Schedule definitions for thorn IDScalarWaveMoL
+# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveMoL/schedule.ccl,v 1.2 2003/11/05 16:18:40 schnetter Exp $
+
+SCHEDULE IDScalarWaveMoL_InitialData AT initial
+{
+ LANG: Fortran
+ STORAGE: WaveToyMoL::scalarevolve[1]
+} "Initial data for the scalar field"
+
+
+
+SCHEDULE IDScalarWaveMoL_Errors AT analysis
+{
+ LANG: Fortran
+ STORAGE: scalarevolveerror WaveToyMoL::scalarevolve[1]
+ TRIGGERS: scalarevolveerror
+} "Calculate errors of the scalar field"
diff --git a/CarpetExtra/IDScalarWaveMoL/src/errors.F77 b/CarpetExtra/IDScalarWaveMoL/src/errors.F77
new file mode 100644
index 000000000..a47394f84
--- /dev/null
+++ b/CarpetExtra/IDScalarWaveMoL/src/errors.F77
@@ -0,0 +1,36 @@
+c $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveMoL/src/errors.F77,v 1.2 2003/11/05 16:18:40 schnetter Exp $
+
+#include "cctk.h"
+#include "cctk_Arguments.h"
+#include "cctk_Functions.h"
+#include "cctk_Parameters.h"
+
+ subroutine IDScalarWaveMoL_Errors (CCTK_ARGUMENTS)
+ implicit none
+ DECLARE_CCTK_ARGUMENTS
+ DECLARE_CCTK_FUNCTIONS
+ DECLARE_CCTK_PARAMETERS
+ CCTK_REAL tmp
+ integer i, j, k
+ do k=1,cctk_lsh(3)
+ do j=1,cctk_lsh(2)
+ do i=1,cctk_lsh(1)
+ phierror(i,j,k) = phi(i,j,k)
+ psierror(i,j,k) = psi(i,j,k)
+ end do
+ end do
+ end do
+ call IDScalarWaveMol_InitialData (CCTK_PASS_FTOF)
+ do k=1,cctk_lsh(3)
+ do j=1,cctk_lsh(2)
+ do i=1,cctk_lsh(1)
+ tmp = phi(i,j,k)
+ phi(i,j,k) = phierror(i,j,k)
+ phierror(i,j,k) = phi(i,j,k) - tmp
+ tmp = psi(i,j,k)
+ psi(i,j,k) = psierror(i,j,k)
+ psierror(i,j,k) = psi(i,j,k) - tmp
+ end do
+ end do
+ end do
+ end
diff --git a/CarpetExtra/IDScalarWaveMoL/src/initialdata.F77 b/CarpetExtra/IDScalarWaveMoL/src/initialdata.F77
new file mode 100644
index 000000000..f8385b48a
--- /dev/null
+++ b/CarpetExtra/IDScalarWaveMoL/src/initialdata.F77
@@ -0,0 +1,49 @@
+c $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveMoL/src/initialdata.F77,v 1.3 2003/11/05 16:18:40 schnetter Exp $
+
+#include "cctk.h"
+#include "cctk_Arguments.h"
+#include "cctk_Functions.h"
+#include "cctk_Parameters.h"
+
+ subroutine IDScalarWaveMoL_InitialData (CCTK_ARGUMENTS)
+ implicit none
+ DECLARE_CCTK_ARGUMENTS
+ DECLARE_CCTK_FUNCTIONS
+ DECLARE_CCTK_PARAMETERS
+ CCTK_REAL pi
+ parameter (pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068d0)
+ CCTK_REAL omega
+ CCTK_REAL tmp
+ integer i, j, k
+ if (CCTK_EQUALS(initial_data, "plane wave")) 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)
+ tmp = 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)
+ phi(i,j,k) = amplitude * cos (2*pi * tmp)
+ psi(i,j,k) = - amplitude * 2*pi * omega * sin (2*pi * tmp)
+ end do
+ end do
+ end do
+ else if (CCTK_EQUALS(initial_data, "Gaussian pulse")) then
+ omega = sqrt(pulse_direction(1)**2 + pulse_direction(2)**2
+ $ + pulse_direction(3)**2)
+ do k=1,cctk_lsh(3)
+ do j=1,cctk_lsh(2)
+ do i=1,cctk_lsh(1)
+ tmp = pulse_direction(1)*(x(i,j,k)-pulse_offset(1))
+ $ + pulse_direction(2)*(y(i,j,k)-pulse_offset(2))
+ $ + pulse_direction(3)*(z(i,j,k)-pulse_offset(3))
+ $ + omega*(cctk_time-time_offset)
+ phi(i,j,k) = amplitude * exp (-0.5d0 * tmp**2)
+ psi(i,j,k) = - tmp * omega * phi(i,j,k)
+ end do
+ end do
+ end do
+ end if
+ end
diff --git a/CarpetExtra/IDScalarWaveMoL/src/make.code.defn b/CarpetExtra/IDScalarWaveMoL/src/make.code.defn
new file mode 100644
index 000000000..ae74370dd
--- /dev/null
+++ b/CarpetExtra/IDScalarWaveMoL/src/make.code.defn
@@ -0,0 +1,9 @@
+# Main make.code.defn file for thorn IDScalarWaveMoL
+# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveMoL/src/make.code.defn,v 1.1 2003/06/18 18:24:29 schnetter Exp $
+
+# Source files in this directory
+SRCS = errors.F77 initialdata.F77
+
+# Subdirectories containing source files
+SUBDIRS =
+