[Commits] [svn:einsteintoolkit] incoming/PITTNullCode/NullPsiInt/ (Rev. 39)

reisswig at tapir.caltech.edu reisswig at tapir.caltech.edu
Wed Jun 15 11:18:44 CDT 2011


User: reisswig
Date: 2011/06/15 11:18 AM

Added:
 /PITTNullCode/NullPsiInt/
  README, configuration.ccl, interface.ccl, param.ccl, schedule.ccl
 /PITTNullCode/NullPsiInt/doc/
  documentation.tex
 /PITTNullCode/NullPsiInt/src/
  NullPsiInt_InitMoL.F90, NullPsiInt_MoLRegister.c, NullPsiInt_dotNewsPsi.F90, make.code.defn

Log:
 Re-added thorn mistakenly removed in previous commit.

File Changes:

Directory: /PITTNullCode/NullPsiInt/
====================================

File [added]: README
Delta lines: +9 -0
===================================================================
--- PITTNullCode/NullPsiInt/README	                        (rev 0)
+++ PITTNullCode/NullPsiInt/README	2011-06-15 16:18:44 UTC (rev 39)
@@ -0,0 +1,9 @@
+Cactus Code Thorn NullPsi4IO
+Author(s)    : Maria Babiuc <babiuc at marshall.edu>
+Maintainer(s): Maria Babiuc <babiuc at marshall.edu>
+Licence      : N
+--------------------------------------------------------------------------
+
+1. Purpose
+
+not documented

File [added]: configuration.ccl
Delta lines: +2 -0
===================================================================
--- PITTNullCode/NullPsiInt/configuration.ccl	                        (rev 0)
+++ PITTNullCode/NullPsiInt/configuration.ccl	2011-06-15 16:18:44 UTC (rev 39)
@@ -0,0 +1,2 @@
+
+REQUIRES THORNS: Fortran NullNews NullGrid 

File [added]: interface.ccl
Delta lines: +59 -0
===================================================================
--- PITTNullCode/NullPsiInt/interface.ccl	                        (rev 0)
+++ PITTNullCode/NullPsiInt/interface.ccl	2011-06-15 16:18:44 UTC (rev 39)
@@ -0,0 +1,59 @@
+# Interface definition for thorn NullPsiInt
+# $Header:$
+
+implements: NullPsiInt
+inherits: NullVars NullGrid NullNews NullInterp NullEvolve
+
+CCTK_INT FUNCTION MoLRegisterEvolvedGroup(CCTK_INT IN EvolvedIndex, \
+                                          CCTK_INT IN RHSIndex)
+
+
+REQUIRES FUNCTION MoLRegisterEvolvedGroup
+
+public:
+
+# News and Psi4 masked 
+cctk_complex NewsB_mask[2] Type=ARRAY dim=2 size=\
+(NullGrid::N_ang_pts_inside_eq+2*(NullGrid::N_ang_ev_outside_eq+NullGrid::N_ang_stencil_size)),\
+(NullGrid::N_ang_pts_inside_eq+2*(NullGrid::N_ang_ev_outside_eq+NullGrid::N_ang_stencil_size)) \
+   GHOSTSIZE=NullGrid::N_ang_ghost_pts,NullGrid::N_ang_ghost_pts \
+"News inside equator"
+
+cctk_complex Psi4_mask[2] Type=ARRAY dim=2 size=\
+(NullGrid::N_ang_pts_inside_eq+2*(NullGrid::N_ang_ev_outside_eq+NullGrid::N_ang_stencil_size)),\
+(NullGrid::N_ang_pts_inside_eq+2*(NullGrid::N_ang_ev_outside_eq+NullGrid::N_ang_stencil_size)) \
+   GHOSTSIZE=NullGrid::N_ang_ghost_pts,NullGrid::N_ang_ghost_pts \
+"Psi4 inside equator"
+
+#MoL variables
+cctk_complex NewsB_Psi[2] Type=ARRAY dim=2 size=\
+(NullGrid::N_ang_pts_inside_eq+2*(NullGrid::N_ang_ev_outside_eq+NullGrid::N_ang_stencil_size)),\
+(NullGrid::N_ang_pts_inside_eq+2*(NullGrid::N_ang_ev_outside_eq+NullGrid::N_ang_stencil_size)) \
+   GHOSTSIZE=NullGrid::N_ang_ghost_pts,NullGrid::N_ang_ghost_pts \
+"integrated Psi"
+
+private:
+
+cctk_real re_dotNewsB[2] Type=ARRAY timelevels=2 dim=2 size=\
+(NullGrid::N_ang_pts_inside_eq+2*(NullGrid::N_ang_ev_outside_eq+NullGrid::N_ang_stencil_size)),\
+(NullGrid::N_ang_pts_inside_eq+2*(NullGrid::N_ang_ev_outside_eq+NullGrid::N_ang_stencil_size)) \
+   GHOSTSIZE=NullGrid::N_ang_ghost_pts,NullGrid::N_ang_ghost_pts \
+"real dotNews for MoL - this is the real part of Psi4 (RHS)"
+
+cctk_real im_dotNewsB[2] Type=ARRAY timelevels=2 dim=2 size=\
+(NullGrid::N_ang_pts_inside_eq+2*(NullGrid::N_ang_ev_outside_eq+NullGrid::N_ang_stencil_size)),\
+(NullGrid::N_ang_pts_inside_eq+2*(NullGrid::N_ang_ev_outside_eq+NullGrid::N_ang_stencil_size)) \
+   GHOSTSIZE=NullGrid::N_ang_ghost_pts,NullGrid::N_ang_ghost_pts \
+"imag dotNews for MoL - this is the imaginary part of Psi4 (RHS)"
+
+cctk_real re_PsiInt[2] Type=ARRAY timelevels=2 dim=2 size=\
+(NullGrid::N_ang_pts_inside_eq+2*(NullGrid::N_ang_ev_outside_eq+NullGrid::N_ang_stencil_size)),\
+(NullGrid::N_ang_pts_inside_eq+2*(NullGrid::N_ang_ev_outside_eq+NullGrid::N_ang_stencil_size)) \
+   GHOSTSIZE=NullGrid::N_ang_ghost_pts,NullGrid::N_ang_ghost_pts \
+"real integrated Psi for MoL - this is the real part of NewsB_Psi (RHS)"
+
+cctk_real im_PsiInt[2] Type=ARRAY timelevels=2 dim=2 size=\
+(NullGrid::N_ang_pts_inside_eq+2*(NullGrid::N_ang_ev_outside_eq+NullGrid::N_ang_stencil_size)),\
+(NullGrid::N_ang_pts_inside_eq+2*(NullGrid::N_ang_ev_outside_eq+NullGrid::N_ang_stencil_size)) \
+   GHOSTSIZE=NullGrid::N_ang_ghost_pts,NullGrid::N_ang_ghost_pts \
+"imag integrated Psi for MoL - this is the imaginary part of NewsB_Psi4 (RHS)"

File [added]: param.ccl
Delta lines: +38 -0
===================================================================
--- PITTNullCode/NullPsiInt/param.ccl	                        (rev 0)
+++ PITTNullCode/NullPsiInt/param.ccl	2011-06-15 16:18:44 UTC (rev 39)
@@ -0,0 +1,38 @@
+# Parameter definitions for thorn NullPsiInt
+# $Header:$
+
+shares: NullGrid
+
+uses int N_ang_pts_inside_eq
+uses int N_ang_ev_outside_eq
+uses int N_ang_stencil_size
+uses int N_ang_ghost_pts
+uses int N_radial_pts
+
+
+shares: MethodOfLines
+uses cctk_int MoL_Num_ArrayEvolved_Vars
+uses cctk_int MoL_Max_Evolved_Array_Size
+
+restricted:
+
+cctk_int  NullPsiInt_NumArrayEvolvedVars "The maximum number of evolved grid arrays used by NullPsiInt" ACCUMULATOR-BASE=MethodOfLines::MoL_Num_ArrayEvolved_Vars
+{
+  4:4          :: "Is is the real and imaginary part of the RHS (Psi) and the News obtained by integrating Psi"
+} 4
+
+cctk_int NullPsiInt_MaxEvolvedArraySize "The maximum size of evolved grid arrays used by NullPsiInt" ACCUMULATOR-BASE=MethodOfLines::MoL_Max_Evolved_Array_Size
+{
+  1:*           :: "The size of the generator grid arrays"
+} 1
+
+
+private:
+
+keyword mask_type "type of mask for error in J"
+{
+  "none"		:: "no mask"
+  "EG_mask"		:: "mask all the active points"
+  "EV_mask"		:: "mask only the evolution points"
+  "EQ_mask"		:: "mask only the equator points"
+} "none"

File [added]: schedule.ccl
Delta lines: +28 -0
===================================================================
--- PITTNullCode/NullPsiInt/schedule.ccl	                        (rev 0)
+++ PITTNullCode/NullPsiInt/schedule.ccl	2011-06-15 16:18:44 UTC (rev 39)
@@ -0,0 +1,28 @@
+# Schedule definitions for thorn NullPsiInt
+# $Header:$
+
+######## initialization: MoL
+  STORAGE: NewsB_mask, Psi4_mask, NewsB_Psi, re_dotNewsB[2], im_dotNewsB[2], re_PsiInt[2], im_PsiInt[2]
+
+
+  schedule NullPsiInt_InitMoL in NullEvol_Initial after NullEvol_InitialSlice
+  {
+    LANG: Fortran
+    OPTIONS: global
+  } "Initial Data"
+
+  schedule NullPsiInt_MoLRegister in MoL_Register
+  {
+    LANG: C
+  } "Register variables for MoL"
+
+
+######## evolution: Mol
+
+  schedule NullPsiInt_dotNewsPsi in MoL_CalcRHS
+  {
+   LANG: Fortran
+   SYNC: NewsB_Psi
+  } "calculate the integral of Psi4"
+
+

Directory: /PITTNullCode/NullPsiInt/doc/
========================================

File [added]: documentation.tex
Delta lines: +144 -0
===================================================================
--- PITTNullCode/NullPsiInt/doc/documentation.tex	                        (rev 0)
+++ PITTNullCode/NullPsiInt/doc/documentation.tex	2011-06-15 16:18:44 UTC (rev 39)
@@ -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{Maria Babiuc \textless babiuc at marshall.edu\textgreater}
+
+% The title of the document (not necessarily the name of the Thorn)
+\title{NullPsi4IO}
+
+% the date your document was last changed, if your document is in CVS,
+% please use:
+%    \date{$ $Date: 2004/01/07 20:12:39 $ $}
+\date{October 21 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}

Directory: /PITTNullCode/NullPsiInt/src/
========================================

File [added]: NullPsiInt_InitMoL.F90
Delta lines: +67 -0
===================================================================
--- PITTNullCode/NullPsiInt/src/NullPsiInt_InitMoL.F90	                        (rev 0)
+++ PITTNullCode/NullPsiInt/src/NullPsiInt_InitMoL.F90	2011-06-15 16:18:44 UTC (rev 39)
@@ -0,0 +1,67 @@
+! vim: syntax=fortran
+#include "cctk.h"
+#include "cctk_Arguments.h"
+#include "cctk_Functions.h"
+#include "cctk_Parameters.h"
+
+ subroutine NullPsiInt_InitMoL(CCTK_ARGUMENTS)
+ use cctk
+ use NullGrid_Vars
+ implicit none
+
+ DECLARE_CCTK_ARGUMENTS
+ DECLARE_CCTK_FUNCTIONS
+ DECLARE_CCTK_PARAMETERS
+
+  CCTK_INT :: patch_ID
+  CCTK_COMPLEX :: ii
+  ii = dcmplx(0.,1.)
+
+! I need to initialize News_Psi, dotNews_Psi 
+  patch_ID = ip_n-1
+
+  do patch_ID = 1, 2
+
+!Apply mask to the complex Characteristic Fields
+    if (CCTK_EQUALS(mask_type, "none")) then
+
+       NewsB_mask(:,:,patch_ID) = NewsB(:,:,patch_ID) 
+       Psi4_mask(:,:,patch_ID) = Psi4(:,:,patch_ID)
+
+    else if (CCTK_EQUALS(mask_type, "EG_mask")) then
+
+       NewsB_mask(:,:,patch_ID) = EG_mask*NewsB(:,:,patch_ID)
+       Psi4_mask(:,:,patch_ID) = EG_mask*Psi4(:,:,patch_ID)
+
+    else if (CCTK_EQUALS(mask_type, "EQ_mask")) then
+
+       NewsB_mask(:,:,patch_ID) = EQ_mask*NewsB(:,:,patch_ID)
+       Psi4_mask(:,:,patch_ID) = EQ_mask*Psi4(:,:,patch_ID)
+
+    else if (CCTK_EQUALS(mask_type, "EV_mask")) then
+
+       NewsB_mask(:,:,patch_ID) = EV_mask*NewsB(:,:,patch_ID)
+       Psi4_mask(:,:,patch_ID) = EV_mask*Psi4(:,:,patch_ID)
+
+    else
+      call CCTK_WARN(0, "unsupported circular mask type")
+    end if
+
+
+     re_dotNewsB(:,:,patch_ID) = dble(Psi4_mask(:,:,patch_ID))
+     im_dotNewsB(:,:,patch_ID) = dimag(Psi4_mask(:,:,patch_ID))
+
+     re_PsiInt(:,:,patch_ID) = dble(NewsB_mask(:,:,patch_ID))
+     im_PsiInt(:,:,patch_ID) = dimag(NewsB_mask(:,:,patch_ID))
+
+     NewsB_Psi(:,:,patch_ID) = re_PsiInt(:,:,patch_ID) + ii*im_PsiInt(:,:,patch_ID)
+
+     re_dotNewsB_p(:,:,patch_ID) = dble(Psi4_mask(:,:,patch_ID))
+     im_dotNewsB_p(:,:,patch_ID) = dimag(Psi4_mask(:,:,patch_ID))
+
+     re_PsiInt_p(:,:,patch_ID) = dble(NewsB_mask(:,:,patch_ID))
+     im_PsiInt_p(:,:,patch_ID) = dimag(NewsB_mask(:,:,patch_ID))
+
+  end do 
+
+ end subroutine NullPsiInt_InitMoL 

File [added]: NullPsiInt_MoLRegister.c
Delta lines: +55 -0
===================================================================
--- PITTNullCode/NullPsiInt/src/NullPsiInt_MoLRegister.c	                        (rev 0)
+++ PITTNullCode/NullPsiInt/src/NullPsiInt_MoLRegister.c	2011-06-15 16:18:44 UTC (rev 39)
@@ -0,0 +1,55 @@
+ /*@@
+   @file      NullPsiInt_MoLRegister.c
+   @date      Wed Oct 21 11:52:41 CET 2009
+   @author    Maria Babiuc
+   @desc 
+   Routine to register the variables with the MoL thorn.  Based on Ian Hawke's WaveMoL
+   @enddesc 
+ @@*/
+
+#include "cctk.h"
+#include "cctk_Arguments.h"
+#include "cctk_Parameters.h"
+
+static const char *rcsid = "$Header$";
+
+int NullPsiInt_MoLRegister(CCTK_ARGUMENTS);
+
+int NullPsiInt_MoLRegister(CCTK_ARGUMENTS)
+{
+
+  DECLARE_CCTK_ARGUMENTS;
+  DECLARE_CCTK_PARAMETERS;
+
+  CCTK_INT ierr = 0, group, rhs, var;
+
+  group = CCTK_GroupIndex("NullPsiInt::re_PsiInt");
+  rhs = CCTK_GroupIndex("NullPsiInt::re_dotNewsB");
+
+  if (CCTK_IsFunctionAliased("MoLRegisterEvolvedGroup"))
+  {
+    ierr += MoLRegisterEvolvedGroup(group, rhs);
+  }
+  else
+  {
+    CCTK_WARN(0, "MoL function not aliased");
+    ierr++;
+  }
+
+  group = CCTK_GroupIndex("NullPsiInt::im_PsiInt");
+  rhs = CCTK_GroupIndex("NullPsiInt::im_dotNewsB");
+
+  if (CCTK_IsFunctionAliased("MoLRegisterEvolvedGroup"))
+  {
+    ierr += MoLRegisterEvolvedGroup(group, rhs);
+  }
+  else
+  {
+    CCTK_WARN(0, "MoL function not aliased");
+    ierr++;
+  }
+
+  if (ierr) CCTK_WARN(0,"Problems registering with MoL");
+
+  return ierr;
+}

File [added]: NullPsiInt_dotNewsPsi.F90
Delta lines: +61 -0
===================================================================
--- PITTNullCode/NullPsiInt/src/NullPsiInt_dotNewsPsi.F90	                        (rev 0)
+++ PITTNullCode/NullPsiInt/src/NullPsiInt_dotNewsPsi.F90	2011-06-15 16:18:44 UTC (rev 39)
@@ -0,0 +1,61 @@
+! vim: syntax=fortran
+#include "cctk.h"
+#include "cctk_Arguments.h"
+#include "cctk_Functions.h"
+#include "cctk_Parameters.h"
+
+subroutine NullPsiInt_dotNewsPsi(CCTK_ARGUMENTS)
+ use cctk
+ use NullInterp
+ use NullGrid_Vars
+ implicit none
+
+  DECLARE_CCTK_ARGUMENTS
+  DECLARE_CCTK_FUNCTIONS
+  DECLARE_CCTK_PARAMETERS
+
+  CCTK_INT :: patch_ID
+  CCTK_COMPLEX :: ii
+  ii = dcmplx(0.,1.)
+
+!INTEGRATION Int_Psi4 = News
+  patch_ID = ip_n-1
+
+  do patch_ID = 1, 2
+
+!Apply mask to the complex Characteristic Fields
+    if (CCTK_EQUALS(mask_type, "none")) then
+
+       NewsB_mask(:,:,patch_ID) = NewsB(:,:,patch_ID) 
+       Psi4_mask(:,:,patch_ID) = Psi4(:,:,patch_ID) 
+
+    else if (CCTK_EQUALS(mask_type, "EG_mask")) then
+
+       NewsB_mask(:,:,patch_ID) = EG_mask*NewsB(:,:,patch_ID)
+       Psi4_mask(:,:,patch_ID) = EG_mask*Psi4(:,:,patch_ID) 
+
+    else if (CCTK_EQUALS(mask_type, "EQ_mask")) then
+
+       NewsB_mask(:,:,patch_ID) = EQ_mask*NewsB(:,:,patch_ID) 
+       Psi4_mask(:,:,patch_ID) = EQ_mask*Psi4(:,:,patch_ID)
+
+    else if (CCTK_EQUALS(mask_type, "EV_mask")) then
+
+       NewsB_mask(:,:,patch_ID) = EV_mask*NewsB(:,:,patch_ID) 
+       Psi4_mask(:,:,patch_ID) = EV_mask*Psi4(:,:,patch_ID)
+
+    else
+      call CCTK_WARN(0, "unsupported circular mask type")
+    end if
+
+
+! the evolution equation
+
+     re_dotNewsB(:,:,patch_ID) = dble(Psi4_mask(:,:,patch_ID))
+     im_dotNewsB(:,:,patch_ID) = dimag(Psi4_mask(:,:,patch_ID))
+
+     NewsB_Psi(:,:,patch_ID) = re_PsiInt(:,:,patch_ID) + ii*im_PsiInt(:,:,patch_ID)
+
+  end do
+
+end subroutine NullPsiInt_dotNewsPsi 

File [added]: make.code.defn
Delta lines: +9 -0
===================================================================
--- PITTNullCode/NullPsiInt/src/make.code.defn	                        (rev 0)
+++ PITTNullCode/NullPsiInt/src/make.code.defn	2011-06-15 16:18:44 UTC (rev 39)
@@ -0,0 +1,9 @@
+# Main make.code.defn file for thorn NullPsiInt
+# $Header:$
+
+# Source files in this directory
+SRCS = NullPsiInt_dotNewsPsi.F90 NullPsiInt_MoLRegister.c \
+	NullPsiInt_InitMoL.F90 
+
+# Subdirectories containing source files
+SUBDIRS = 



More information about the Commits mailing list