diff options
author | allen <allen@479a9caf-478d-4319-8268-cbb0ee841cc9> | 2003-07-18 18:08:39 +0000 |
---|---|---|
committer | allen <allen@479a9caf-478d-4319-8268-cbb0ee841cc9> | 2003-07-18 18:08:39 +0000 |
commit | 310bab73f14fce8a9089c7cdc570876cc6f22348 (patch) | |
tree | 1be3398b0a510dc7e976b4936f4e6bb88f08df6a | |
parent | dbffc86c72ecb8f77401622825808bc2ea252e88 (diff) |
This commit was generated by cvs2svn to compensate for changes in r2, which
included commits to RCS files with non-trunk default branches.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/WaveToyExtra/trunk@3 479a9caf-478d-4319-8268-cbb0ee841cc9
-rw-r--r-- | README | 12 | ||||
-rw-r--r-- | doc/documentation.tex | 144 | ||||
-rw-r--r-- | interface.ccl | 11 | ||||
-rw-r--r-- | param.ccl | 21 | ||||
-rw-r--r-- | schedule.ccl | 14 | ||||
-rw-r--r-- | src/Boundary.c | 63 | ||||
-rw-r--r-- | src/make.code.defn | 9 | ||||
-rw-r--r-- | test/test_custom.par | 49 | ||||
-rw-r--r-- | test/test_custom/phi.xl | 198 | ||||
-rw-r--r-- | test/test_custom/phi_max.tl | 12 | ||||
-rw-r--r-- | test/test_custom/phi_min.tl | 12 | ||||
-rw-r--r-- | test/test_custom/phi_nm1.tl | 12 | ||||
-rw-r--r-- | test/test_custom/phi_nm2.tl | 12 |
13 files changed, 569 insertions, 0 deletions
@@ -0,0 +1,12 @@ +CVS info : $Header$ + +Cactus Code Thorn WaveToyExtra +Thorn Author(s) : Cactus Maintainers <cactusmaint@cactuscode.org> +Thorn Maintainer(s) : Cactus Maintainers <cactusmaint@cactuscode.org> +-------------------------------------------------------------------------- + +Purpose of the thorn: + +Additional functionality for the WaveToy example + +- custom boundary conditions
\ No newline at end of file diff --git a/doc/documentation.tex b/doc/documentation.tex new file mode 100644 index 0000000..a965521 --- /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 +% 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$ + +\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/ThornGuide/cactus} + +\begin{document} + +% The author of the documentation +\author{Cactus Maintainers \textless cactusmaint@cactuscode.org\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$ $} +\date{July 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/interface.ccl b/interface.ccl new file mode 100644 index 0000000..b5c4577 --- /dev/null +++ b/interface.ccl @@ -0,0 +1,11 @@ +# Interface definition for thorn WaveToyExtra +# $Header$ + +implements: wavetoyextra +inherits: wavetoy + +CCTK_INT FUNCTION Boundary_SelectVarForBC(CCTK_POINTER IN GH, \ + CCTK_INT IN faces, CCTK_INT IN boundary_width, CCTK_INT IN table_handle, \ + CCTK_STRING IN var_name, CCTK_STRING IN bc_name) +USES FUNCTION Boundary_SelectVarForBC + diff --git a/param.ccl b/param.ccl new file mode 100644 index 0000000..053a42f --- /dev/null +++ b/param.ccl @@ -0,0 +1,21 @@ +# Parameter definitions for thorn WaveToyExtra +# $Header$ + +SHARES: wavetoy + +EXTENDS KEYWORD bound +{ + "custom" :: "custom boundary condition" +} + +private: + +STRING custom_bound "Custom boundary condition to use" +{ + .* :: "Any valid boundary condition" +} "" + +STRING custom_options "Table string for custom boundary condition" +{ + .* :: "Any valid table string" +} "" diff --git a/schedule.ccl b/schedule.ccl new file mode 100644 index 0000000..9684deb --- /dev/null +++ b/schedule.ccl @@ -0,0 +1,14 @@ +# Schedule definitions for thorn WaveToyExtra +# $Header$ + + +schedule WaveToyExtra_Boundary at EVOL AFTER WaveToy_Evolution BEFORE WaveToy_Boundaries +{ + LANG: C +} "Additional boundary conditions for 3D wave equation" + +schedule WaveToyC_Terminate at TERMINATE +{ + LANG: C +} "Tidy up" + diff --git a/src/Boundary.c b/src/Boundary.c new file mode 100644 index 0000000..908617b --- /dev/null +++ b/src/Boundary.c @@ -0,0 +1,63 @@ +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" + +#include "cctk_Faces.h" + +#include "util_Table.h" + + +static int handle=-1; + +void WaveToyExtra_Boundary(CCTK_ARGUMENTS); +void WaveToyExtra_Boundary(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + CCTK_INT ierr=0; + + if (CCTK_EQUALS(bound,"custom")) + { + if (!CCTK_EQUALS(custom_options,"")) + { + if (handle == -1) + { + handle = Util_TableCreateFromString(custom_options); + if (handle < 0) + { + CCTK_VWarn(0,__LINE__,__FILE__,CCTK_THORNSTRING, + "WaveToyC_Boundaries: Error creating table for " + "boundary condition %s",custom_bound); + } + } + } + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle, + "wavetoy::phi",custom_bound); + } + + if (ierr < 0) + { + CCTK_VWarn(0,__LINE__,__FILE__,CCTK_THORNSTRING, + "WaveToyC_Boundaries: Error selecting boundary " + "condition %s",bound); + } + + return; +} + + + /*@@ + @routine WaveToyC_Terminate + @date + @author Gabrielle Allen + @desc + Tidy up wavetoy + @enddesc + @history + @endhistory +@@*/ +void WaveToyC_Terminate(const cGH *GH) +{ + Util_TableDestroy(handle); +} diff --git a/src/make.code.defn b/src/make.code.defn new file mode 100644 index 0000000..5b83963 --- /dev/null +++ b/src/make.code.defn @@ -0,0 +1,9 @@ +# Main make.code.defn file for thorn WaveToyExtra +# $Header$ + +# Source files in this directory +SRCS = Boundary.c + +# Subdirectories containing source files +SUBDIRS = + diff --git a/test/test_custom.par b/test/test_custom.par new file mode 100644 index 0000000..c840c00 --- /dev/null +++ b/test/test_custom.par @@ -0,0 +1,49 @@ +!DESC "Custom boundary conditions for WaveToy" + +# $Id$ +# +# /*@@ +# @file test_custom.par +# @date Friday 18th July +# @author Gabrielle Allen +# @desc +# Wavetoy parameter file using custom boundary conditions +# @enddesc +# @@*/ + +ActiveThorns = "wavetoyextra boundary iobasic idscalarwavec time wavetoyc pugh pughslab pughreduce cartgrid3d ioutil ioascii" + +time::dtfac = 0.5 + +idscalarwave::initial_data = "gaussian" +idscalarwave::sigma = 2.8 +idscalarwave::radius = 5 + +wavetoy::bound = "custom" +wavetoyextra::custom_bound = "Radiation" +wavetoyextra::custom_options = "limit=0.0" + +grid::type = "BySpacing" +grid::domain = "octant" +grid::dxyz = 0.6 + +driver::global_nx = 15 +driver::global_ny = 15 +driver::global_nz = 15 + +cactus::cctk_itlast = 10 + +IOBasic::outScalar_every = 1 +IOBasic::outScalar_vars = "wavetoy::phi" + +IOASCII::out1D_every = 1 +IOASCII::out1D_z = "no" +IOASCII::out1D_y = "no" +IOASCII::out1D_d = "no" +IOASCII::out1D_vars = "wavetoy::phi " + +IO::out_dir = "test_custom" +IO::out_fileinfo = "none" + +# do not use the new scheme for names of output files +IO::new_filename_scheme = "no" diff --git a/test/test_custom/phi.xl b/test/test_custom/phi.xl new file mode 100644 index 0000000..07c6591 --- /dev/null +++ b/test/test_custom/phi.xl @@ -0,0 +1,198 @@ + + +"Time = 0.0000000000000 +-0.3000000000000 0.0772707537752 +0.3000000000000 0.0772707537752 +0.9000000000000 0.1292593546971 +1.5000000000000 0.2208214420284 +2.1000000000000 0.3529089299372 +2.7000000000000 0.5192102694005 +3.3000000000000 0.6998161919677 +3.9000000000000 0.8624762718586 +4.5000000000000 0.9710346043534 +5.1000000000000 0.9982370567948 +5.7000000000000 0.9367420144351 +6.3000000000000 0.8022624770949 +6.9000000000000 0.6270073768484 +7.5000000000000 0.4471508970148 +8.1000000000000 0.2909622162579 + + +"Time = 0.3000000000000 +-0.3000000000000 0.0971890085381 +0.3000000000000 0.0971890085381 +0.9000000000000 0.1458070585769 +1.5000000000000 0.2369245713152 +2.1000000000000 0.3677885574700 +2.7000000000000 0.5306119771765 +3.3000000000000 0.7053718642907 +3.9000000000000 0.8609363869443 +4.5000000000000 0.9631174446691 +5.1000000000000 0.9865820055056 +5.7000000000000 0.9249036421069 +6.3000000000000 0.7932839629405 +6.9000000000000 0.6223681325743 +7.5000000000000 0.4465889831319 +8.1000000000000 0.3752705388255 + + +"Time = 0.6000000000000 +-0.3000000000000 0.1535708008300 +0.3000000000000 0.1535708008300 +0.9000000000000 0.1961711720954 +1.5000000000000 0.2851330953631 +2.1000000000000 0.4117506785660 +2.7000000000000 0.5639097924078 +3.3000000000000 0.7212408627121 +3.9000000000000 0.8559228336693 +4.5000000000000 0.9395019698949 +5.1000000000000 0.9521812103876 +5.7000000000000 0.8901154138237 +6.3000000000000 0.7669547692918 +6.9000000000000 0.6087707161662 +7.5000000000000 0.4654810206394 +8.1000000000000 0.3949518426732 + + +"Time = 0.9000000000000 +-0.3000000000000 0.2419028715711 +0.3000000000000 0.2419028715711 +0.9000000000000 0.2806656382453 +1.5000000000000 0.3644680930451 +2.1000000000000 0.4820908511115 +2.7000000000000 0.6157607576356 +3.3000000000000 0.7447219357010 +3.9000000000000 0.8464196741952 +4.5000000000000 0.9011458603973 +5.1000000000000 0.8973392226736 +5.7000000000000 0.8348647235667 +6.3000000000000 0.7249114560560 +6.9000000000000 0.5917334278920 +7.5000000000000 0.4961372040187 +8.1000000000000 0.4091178120740 + + +"Time = 1.2000000000000 +-0.3000000000000 0.3593070173178 +0.3000000000000 0.3593070173178 +0.9000000000000 0.3973371351440 +1.5000000000000 0.4726908984644 +2.1000000000000 0.5744326807980 +2.7000000000000 0.6809664830879 +3.3000000000000 0.7717421624765 +3.9000000000000 0.8309955673036 +4.5000000000000 0.8496166364932 +5.1000000000000 0.8256353888324 +5.7000000000000 0.7629881913118 +6.3000000000000 0.6709847629504 +6.9000000000000 0.5777865714943 +7.5000000000000 0.5227924669622 +8.1000000000000 0.4343697330907 + + +"Time = 1.5000000000000 +-0.3000000000000 0.5052337514342 +0.3000000000000 0.5052337514342 +0.9000000000000 0.5420663473251 +1.5000000000000 0.6053658733846 +2.1000000000000 0.6828252976146 +2.7000000000000 0.7530063971160 +3.3000000000000 0.7974403898287 +3.9000000000000 0.8081376662953 +4.5000000000000 0.7870262578869 +5.1000000000000 0.7415508900000 +5.7000000000000 0.6795672712851 +6.3000000000000 0.6117755641447 +6.9000000000000 0.5680687329189 +7.5000000000000 0.5353391157121 +8.1000000000000 0.4640517504908 + + +"Time = 1.8000000000000 +-0.3000000000000 0.6787849324688 +0.3000000000000 0.6787849324688 +0.9000000000000 0.7096278604905 +1.5000000000000 0.7554393617145 +2.1000000000000 0.7997808925635 +2.7000000000000 0.8246792188637 +3.3000000000000 0.8168537384980 +3.9000000000000 0.7766176744716 +4.5000000000000 0.7159301811155 +5.1000000000000 0.6501011754446 +5.7000000000000 0.5911083685792 +6.3000000000000 0.5547680979643 +6.9000000000000 0.5567416548106 +7.5000000000000 0.5330699604611 +8.1000000000000 0.4864485899527 + + +"Time = 2.1000000000000 +-0.3000000000000 0.8754683095197 +0.3000000000000 0.8754683095197 +0.9000000000000 0.8934902693274 +1.5000000000000 0.9137158682936 +2.1000000000000 0.9164670515964 +2.7000000000000 0.8887416558596 +3.3000000000000 0.8255930718110 +3.9000000000000 0.7358160562774 +4.5000000000000 0.6392096265666 +5.1000000000000 0.5566641884962 +5.7000000000000 0.5053523722766 +6.3000000000000 0.5045939040407 +6.9000000000000 0.5355376421596 +7.5000000000000 0.5206354074394 +8.1000000000000 0.4955742919172 + + +"Time = 2.4000000000000 +-0.3000000000000 1.0856681564264 +0.3000000000000 1.0856681564264 +0.9000000000000 1.0843677225765 +1.5000000000000 1.0695673643261 +2.1000000000000 1.0232864039845 +2.7000000000000 0.9384903774958 +3.3000000000000 0.8203872013323 +3.9000000000000 0.6859437540429 +4.5000000000000 0.5600046057416 +5.1000000000000 0.4669993690287 +5.7000000000000 0.4298308536269 +6.3000000000000 0.4604507953090 +6.9000000000000 0.5002183914684 +7.5000000000000 0.5020727132367 +8.1000000000000 0.4926868928111 + + +"Time = 2.7000000000000 +-0.3000000000000 1.2948926779457 +0.3000000000000 1.2948926779457 +0.9000000000000 1.2692815115984 +1.5000000000000 1.2113104711092 +2.1000000000000 1.1107305230053 +2.7000000000000 0.9682920558388 +3.3000000000000 0.7994092377803 +3.9000000000000 0.6281381151906 +4.5000000000000 0.4817680011886 +5.1000000000000 0.3870573167143 +5.7000000000000 0.3692601499998 +6.3000000000000 0.4172704174136 +6.9000000000000 0.4535251074759 +7.5000000000000 0.4779424710432 +8.1000000000000 0.4819274792745 + + +"Time = 3.0000000000000 +-0.3000000000000 1.4849088247045 +0.3000000000000 1.4849088247045 +0.9000000000000 1.4321131595311 +1.5000000000000 1.3265387801170 +2.1000000000000 1.1701952716927 +2.7000000000000 0.9740267548713 +3.3000000000000 0.7623637194688 +3.9000000000000 0.5644613918504 +4.5000000000000 0.4083753376049 +5.1000000000000 0.3220301380289 +5.7000000000000 0.3233470094901 +6.3000000000000 0.3701520525936 +6.9000000000000 0.4026687234346 +7.5000000000000 0.4467036855088 +8.1000000000000 0.4656795319790 diff --git a/test/test_custom/phi_max.tl b/test/test_custom/phi_max.tl new file mode 100644 index 0000000..be44420 --- /dev/null +++ b/test/test_custom/phi_max.tl @@ -0,0 +1,12 @@ +"phi v time +0.0000000000000 0.9999198827161 +0.3000000000000 0.9888123616498 +0.6000000000000 0.9562359086195 +0.9000000000000 0.9067795980557 +1.2000000000000 0.8496166364932 +1.5000000000000 0.8081376662953 +1.8000000000000 0.8258203526929 +2.1000000000000 0.9178957669541 +2.4000000000000 1.0856681564264 +2.7000000000000 1.2948926779457 +3.0000000000000 1.4849088247045 diff --git a/test/test_custom/phi_min.tl b/test/test_custom/phi_min.tl new file mode 100644 index 0000000..7da4da3 --- /dev/null +++ b/test/test_custom/phi_min.tl @@ -0,0 +1,12 @@ +"phi v time +0.0000000000000 0.0000304406955 +0.3000000000000 0.0000587435510 +0.6000000000000 0.0001086466514 +0.9000000000000 0.0002300978652 +1.2000000000000 0.0002636532697 +1.5000000000000 0.0004151724935 +1.8000000000000 0.0006908830588 +2.1000000000000 0.0011237231386 +2.4000000000000 0.0017885420113 +2.7000000000000 0.0027892279583 +3.0000000000000 0.0042654308870 diff --git a/test/test_custom/phi_nm1.tl b/test/test_custom/phi_nm1.tl new file mode 100644 index 0000000..b840a52 --- /dev/null +++ b/test/test_custom/phi_nm1.tl @@ -0,0 +1,12 @@ +"phi v time +0.0000000000000 0.3981503311756 +0.3000000000000 0.4024026874590 +0.6000000000000 0.4017753010950 +0.9000000000000 0.4004025261602 +1.2000000000000 0.3986629565018 +1.5000000000000 0.3957315893967 +1.8000000000000 0.3908781055989 +2.1000000000000 0.3838434151324 +2.4000000000000 0.3746832451920 +2.7000000000000 0.3634742389163 +3.0000000000000 0.3501584628877 diff --git a/test/test_custom/phi_nm2.tl b/test/test_custom/phi_nm2.tl new file mode 100644 index 0000000..663ffea --- /dev/null +++ b/test/test_custom/phi_nm2.tl @@ -0,0 +1,12 @@ +"phi v time +0.0000000000000 0.5254444636163 +0.3000000000000 0.5238529128447 +0.6000000000000 0.5151703830818 +0.9000000000000 0.5020256994966 +1.2000000000000 0.4865599905153 +1.5000000000000 0.4705361025401 +1.8000000000000 0.4553690349645 +2.1000000000000 0.4419812973758 +2.4000000000000 0.4306043592146 +2.7000000000000 0.4206114938369 +3.0000000000000 0.4105476772558 |