From 2d52ce734e4775c90f0ad3e85c819ecc0dea2738 Mon Sep 17 00:00:00 2001 From: schnetter Date: Tue, 24 Nov 2009 21:52:23 +0000 Subject: Add three thorns ID_Bin_BH, ID_Bin_NS, and ID_Mag_NS that import LORENE initial data. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/Meudon_Bin_BH/trunk@2 0994f19a-7e1f-4f5a-9787-1e7a3bb7f33f --- README | 12 ++++ configuration.ccl | 3 + doc/documentation.tex | 144 ++++++++++++++++++++++++++++++++++++++++++++++++ interface.ccl | 5 ++ param.ccl | 27 +++++++++ schedule.ccl | 16 ++++++ src/Bin_BH.cc | 116 ++++++++++++++++++++++++++++++++++++++ src/check_parameters.cc | 19 +++++++ src/make.code.defn | 7 +++ 9 files changed, 349 insertions(+) create mode 100644 README create mode 100644 configuration.ccl create mode 100644 doc/documentation.tex create mode 100644 interface.ccl create mode 100644 param.ccl create mode 100644 schedule.ccl create mode 100644 src/Bin_BH.cc create mode 100644 src/check_parameters.cc create mode 100644 src/make.code.defn diff --git a/README b/README new file mode 100644 index 0000000..b5cbd50 --- /dev/null +++ b/README @@ -0,0 +1,12 @@ +Cactus Code Thorn ID_Bin_BH +Author(s) : Erik Schnetter +Maintainer(s): Erik Schnetter +Licence : GPL +-------------------------------------------------------------------------- + +1. Purpose + +Import LORENE Bin_BH binary black hole initial data. + +This thorn is one of three closely related thorns ID_Bin_BH, +ID_Bin_NS, and ID_Mag_NS which all import LORENE initial data. diff --git a/configuration.ccl b/configuration.ccl new file mode 100644 index 0000000..8d8558c --- /dev/null +++ b/configuration.ccl @@ -0,0 +1,3 @@ +# Configuration definition for thorn ID_Bin_BH + +REQUIRES LORENE diff --git a/doc/documentation.tex b/doc/documentation.tex new file mode 100644 index 0000000..7d1f411 --- /dev/null +++ b/doc/documentation.tex @@ -0,0 +1,144 @@ +% *======================================================================* +% Cactus Thorn template for ThornGuide documentation +% Author: Ian Kelley +% Date: Sun Jun 02, 2002 +% $Header$ +% +% 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$ + +\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@cct.lsu.edu\textgreater} + +% The title of the document (not necessarily the name of the Thorn) +\title{ID\_Bin\_BH} + +% the date your document was last changed, if your document is in CVS, +% please use: +% \date{$ $Date$ $} +\date{November 24 2009} + +\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/interface.ccl b/interface.ccl new file mode 100644 index 0000000..cb32a3c --- /dev/null +++ b/interface.ccl @@ -0,0 +1,5 @@ +# Interface definition for thorn ID_Bin_BH + +IMPLEMENTS: ID_Bin_BH + +INHERITS: grid ADMBase diff --git a/param.ccl b/param.ccl new file mode 100644 index 0000000..1125d91 --- /dev/null +++ b/param.ccl @@ -0,0 +1,27 @@ +# Parameter definitions for thorn ID_Bin_BH + +SHARES: ADMBase + +EXTENDS KEYWORD initial_data +{ + "ID_Bin_BH" :: "" +} + +EXTENDS KEYWORD initial_lapse +{ + "ID_Bin_BH" :: "" +} + +EXTENDS KEYWORD initial_shift +{ + "ID_Bin_BH" :: "" +} + + + +PRIVATE: + +STRING filename "Input file name" +{ + "" :: "" +} "" diff --git a/schedule.ccl b/schedule.ccl new file mode 100644 index 0000000..6b147e5 --- /dev/null +++ b/schedule.ccl @@ -0,0 +1,16 @@ +# Schedule definitions for thorn ID_Bin_BH + +if (CCTK_EQUALS (initial_data, "ID_Bin_BH") || + CCTK_EQUALS (initial_lapse, "ID_Bin_BH") || + CCTK_EQUALS (initial_shift, "ID_Bin_BH")) +{ + SCHEDULE ID_Bin_BH_check_parameters AT paramcheck + { + LANG: C + } "Check parameters" + + SCHEDULE ID_Bin_BH_initialise IN ADMBase_Initial + { + LANG: C + } "Set up binary black hole initial data" +} diff --git a/src/Bin_BH.cc b/src/Bin_BH.cc new file mode 100644 index 0000000..693cdbc --- /dev/null +++ b/src/Bin_BH.cc @@ -0,0 +1,116 @@ +#include +#include +#include + +#include +#include +#include + +#include + +using namespace std; + + + +extern "C" +void ID_Bin_BH_initialise (CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + CCTK_INFO ("Setting up LORENE Bin_BH initial data"); + + + + CCTK_INFO ("Setting up coordinates"); + + int const npoints = cctk_lsh[0] * cctk_lsh[1] * cctk_lsh[2]; + + vector xx(npoints), yy(npoints), zz(npoints); + +#pragma omp parallel for + for (int i=0; i +#include +#include + + + +extern "C" +void ID_Bin_BH_check_parameters (CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + if (not CCTK_EQUALS (initial_data , "ID_Bin_BH") or + not CCTK_EQUALS (initial_lapse, "ID_Bin_BH") or + not CCTK_EQUALS (initial_shift, "ID_Bin_BH")) + { + CCTK_PARAMWARN ("The parameters ADMBase::initial_data, ADMBase::initial_lapse, and ADMBase::initial_shift must all be set to the value \"ID_Bin_BH\""); + } +} diff --git a/src/make.code.defn b/src/make.code.defn new file mode 100644 index 0000000..f52b6c8 --- /dev/null +++ b/src/make.code.defn @@ -0,0 +1,7 @@ +# Main make.code.defn file for thorn ID_Bin_BH + +# Source files in this directory +SRCS = Bin_BH.cc check_parameters.cc + +# Subdirectories containing source files +SUBDIRS = -- cgit v1.2.3