From 06b4f412170e4c8cca6248ea9c21dea9047024bb Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sat, 1 Mar 2008 22:24:02 -0600 Subject: New thorn CarpetExtra/ReductionTest2 --- CarpetExtra/ReductionTest2/README | 9 ++ CarpetExtra/ReductionTest2/doc/documentation.tex | 144 +++++++++++++++++++++++ CarpetExtra/ReductionTest2/interface.ccl | 11 ++ CarpetExtra/ReductionTest2/param.ccl | 11 ++ CarpetExtra/ReductionTest2/schedule.ccl | 32 +++++ CarpetExtra/ReductionTest2/src/CoM.c | 28 +++++ CarpetExtra/ReductionTest2/src/make.code.defn | 8 ++ CarpetExtra/ReductionTest2/test/redtest.par | 112 ++++++++++++++++++ 8 files changed, 355 insertions(+) create mode 100644 CarpetExtra/ReductionTest2/README create mode 100644 CarpetExtra/ReductionTest2/doc/documentation.tex create mode 100644 CarpetExtra/ReductionTest2/interface.ccl create mode 100644 CarpetExtra/ReductionTest2/param.ccl create mode 100644 CarpetExtra/ReductionTest2/schedule.ccl create mode 100644 CarpetExtra/ReductionTest2/src/CoM.c create mode 100644 CarpetExtra/ReductionTest2/src/make.code.defn create mode 100644 CarpetExtra/ReductionTest2/test/redtest.par (limited to 'CarpetExtra') diff --git a/CarpetExtra/ReductionTest2/README b/CarpetExtra/ReductionTest2/README new file mode 100644 index 000000000..e7b1e569c --- /dev/null +++ b/CarpetExtra/ReductionTest2/README @@ -0,0 +1,9 @@ +CVS info : $Header:$ + +Cactus Code Thorn ReductionTest +Thorn Author(s) : Christian D. Ott +Thorn Maintainer(s) : Christian D. Ott +-------------------------------------------------------------------------- + +Purpose of the thorn: + diff --git a/CarpetExtra/ReductionTest2/doc/documentation.tex b/CarpetExtra/ReductionTest2/doc/documentation.tex new file mode 100644 index 000000000..2a85f9ff3 --- /dev/null +++ b/CarpetExtra/ReductionTest2/doc/documentation.tex @@ -0,0 +1,144 @@ +% *======================================================================* +% Cactus Thorn template for ThornGuide documentation +% Author: Ian Kelley +% Date: Sun Jun 02, 2002 +% $Header: /cactusdevcvs/Cactus/doc/ThornGuide/template.tex,v 1.12 2004/01/07 20:12:39 rideout 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 +% relevant 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 separated 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 graphicx package. +% More specifically, with the "\includegraphics" command. Do +% not specify any graphic file extensions in your .tex file. This +% will allow us 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: /cactusdevcvs/Cactus/doc/ThornGuide/template.tex,v 1.12 2004/01/07 20:12:39 rideout 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{Christian D. Ott \textless cott@aei.mpg.de\textgreater} + +% The title of the document (not necessarily the name of the Thorn) +\title{ReductionTest} + +% the date your document was last changed, if your document is in CVS, +% please use: +% \date{$ $Date: 2004/01/07 20:12:39 $ $} +\date{April 18 2006} + +\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/ReductionTest2/interface.ccl b/CarpetExtra/ReductionTest2/interface.ccl new file mode 100644 index 000000000..bc142c4c6 --- /dev/null +++ b/CarpetExtra/ReductionTest2/interface.ccl @@ -0,0 +1,11 @@ +# Interface definition for thorn ReductionTest2 +# $Header:$ + +implements: ReductionTest2 + + +CCTK_REAL redvars TYPE=GF TIMELEVELS=3 +{ + redvar +} + diff --git a/CarpetExtra/ReductionTest2/param.ccl b/CarpetExtra/ReductionTest2/param.ccl new file mode 100644 index 000000000..06e352b2e --- /dev/null +++ b/CarpetExtra/ReductionTest2/param.ccl @@ -0,0 +1,11 @@ +# Parameter definitions for thorn ReductionTest2 +# $Header:$ + +shares: grid + +USES KEYWORD domain + + + + + diff --git a/CarpetExtra/ReductionTest2/schedule.ccl b/CarpetExtra/ReductionTest2/schedule.ccl new file mode 100644 index 000000000..299654333 --- /dev/null +++ b/CarpetExtra/ReductionTest2/schedule.ccl @@ -0,0 +1,32 @@ +# Schedule definitions for thorn ReductionTest2 +# $Header:$ + +STORAGE: redvars[3] + +SCHEDULE CoM2_Local AT CCTK_INITIAL AFTER Whisky_Initial +{ + + LANG: C + SYNC: redvars +} "Setup integrands for CoM calculation" + +SCHEDULE CoM2_Local AT CCTK_EVOL AFTER MoL_Evolution +{ + + LANG: C + SYNC: redvars +} "Setup integrands for CoM calculation" + +SCHEDULE CoM2_Local AT Postregridinitial +{ + + LANG: C + SYNC: redvars +} "Setup integrands for CoM calculation" + +SCHEDULE CoM2_Local AT Postregrid +{ + + LANG: C + SYNC: redvars +} "Setup integrands for CoM calculation" diff --git a/CarpetExtra/ReductionTest2/src/CoM.c b/CarpetExtra/ReductionTest2/src/CoM.c new file mode 100644 index 000000000..f87a01519 --- /dev/null +++ b/CarpetExtra/ReductionTest2/src/CoM.c @@ -0,0 +1,28 @@ +#include "cctk.h" +#include "cctk_Parameters.h" +#include "cctk_Arguments.h" +#include "util_Table.h" +#include +#include + +void CoM2_Local(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + int i,j,k,index; + + int nx = cctk_lsh[0]; + int ny = cctk_lsh[1]; + int nz = cctk_lsh[2]; + + for (k=0;k