From 310f0ea48d18866b773136aed11200b6eda6378b Mon Sep 17 00:00:00 2001 From: eschnett <> Date: Thu, 1 Mar 2001 11:40:00 +0000 Subject: Initial revision darcs-hash:20010301114010-f6438-12fb8a9ffcc80e86c0a97e37b5b0dae0dbc59b79.gz --- CarpetExtra/IDScalarWaveExpl/README | 10 ++ CarpetExtra/IDScalarWaveExpl/doc/documentation.tex | 144 +++++++++++++++++++++ CarpetExtra/IDScalarWaveExpl/interface.ccl | 6 + CarpetExtra/IDScalarWaveExpl/param.ccl | 22 ++++ CarpetExtra/IDScalarWaveExpl/schedule.ccl | 8 ++ CarpetExtra/IDScalarWaveExpl/src/initialdata.F77 | 34 +++++ CarpetExtra/IDScalarWaveExpl/src/make.code.defn | 9 ++ 7 files changed, 233 insertions(+) create mode 100644 CarpetExtra/IDScalarWaveExpl/README create mode 100644 CarpetExtra/IDScalarWaveExpl/doc/documentation.tex create mode 100644 CarpetExtra/IDScalarWaveExpl/interface.ccl create mode 100644 CarpetExtra/IDScalarWaveExpl/param.ccl create mode 100644 CarpetExtra/IDScalarWaveExpl/schedule.ccl create mode 100644 CarpetExtra/IDScalarWaveExpl/src/initialdata.F77 create mode 100644 CarpetExtra/IDScalarWaveExpl/src/make.code.defn (limited to 'CarpetExtra/IDScalarWaveExpl') diff --git a/CarpetExtra/IDScalarWaveExpl/README b/CarpetExtra/IDScalarWaveExpl/README new file mode 100644 index 000000000..cc18652e8 --- /dev/null +++ b/CarpetExtra/IDScalarWaveExpl/README @@ -0,0 +1,10 @@ +CVS info : $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveExpl/README,v 1.1 2003/06/18 18:24:29 schnetter Exp $ + +Cactus Code Thorn IDScalarWaveExpl +Thorn Author(s) : Erik Schnetter +Thorn Maintainer(s) : Erik Schnetter +-------------------------------------------------------------------------- + +Purpose of the thorn: + +Create initial data for WaveToyExpl. diff --git a/CarpetExtra/IDScalarWaveExpl/doc/documentation.tex b/CarpetExtra/IDScalarWaveExpl/doc/documentation.tex new file mode 100644 index 000000000..40832d323 --- /dev/null +++ b/CarpetExtra/IDScalarWaveExpl/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/IDScalarWaveExpl/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/IDScalarWaveExpl/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/IDScalarWaveExpl/interface.ccl b/CarpetExtra/IDScalarWaveExpl/interface.ccl new file mode 100644 index 000000000..7ea6b1133 --- /dev/null +++ b/CarpetExtra/IDScalarWaveExpl/interface.ccl @@ -0,0 +1,6 @@ +# Interface definition for thorn IDScalarWaveExpl +# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveExpl/interface.ccl,v 1.1 2003/06/18 18:24:29 schnetter Exp $ + +IMPLEMENTS: IDScalarWaveExpl + +INHERITS: Grid WaveToyExpl diff --git a/CarpetExtra/IDScalarWaveExpl/param.ccl b/CarpetExtra/IDScalarWaveExpl/param.ccl new file mode 100644 index 000000000..fad40e202 --- /dev/null +++ b/CarpetExtra/IDScalarWaveExpl/param.ccl @@ -0,0 +1,22 @@ +# Parameter definitions for thorn IDScalarWaveExpl +# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveExpl/param.ccl,v 1.1 2003/06/18 18:24:29 schnetter Exp $ + +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/IDScalarWaveExpl/schedule.ccl b/CarpetExtra/IDScalarWaveExpl/schedule.ccl new file mode 100644 index 000000000..f3cf87be0 --- /dev/null +++ b/CarpetExtra/IDScalarWaveExpl/schedule.ccl @@ -0,0 +1,8 @@ +# Schedule definitions for thorn IDScalarWaveExpl +# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveExpl/schedule.ccl,v 1.2 2003/11/05 16:18:40 schnetter Exp $ + +SCHEDULE IDScalarWaveExpl_InitialData AT initial +{ + LANG: Fortran + STORAGE: WaveToyExpl::scalarevolve[1] +} "Initial data for the scalar field" diff --git a/CarpetExtra/IDScalarWaveExpl/src/initialdata.F77 b/CarpetExtra/IDScalarWaveExpl/src/initialdata.F77 new file mode 100644 index 000000000..33a19b6cb --- /dev/null +++ b/CarpetExtra/IDScalarWaveExpl/src/initialdata.F77 @@ -0,0 +1,34 @@ +c $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveExpl/src/initialdata.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 IDScalarWaveExpl_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 + 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))) + psi(i,j,k) = - amplitude * 2*pi * omega * sin (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 + end diff --git a/CarpetExtra/IDScalarWaveExpl/src/make.code.defn b/CarpetExtra/IDScalarWaveExpl/src/make.code.defn new file mode 100644 index 000000000..9b92a901f --- /dev/null +++ b/CarpetExtra/IDScalarWaveExpl/src/make.code.defn @@ -0,0 +1,9 @@ +# Main make.code.defn file for thorn IDScalarWaveExpl +# $Header: /home/eschnett/C/carpet/Carpet/CarpetExtra/IDScalarWaveExpl/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 = + -- cgit v1.2.3