aboutsummaryrefslogtreecommitdiff
path: root/src/fixedsphere.F90
blob: 9b4fba610352cce070edd0049f2902caa459dc92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "cctk.h"
#include "cctk_Parameters.h"
#include "cctk_Arguments.h"

subroutine Lego_FixedSphere(CCTK_ARGUMENTS)

  implicit none

  DECLARE_CCTK_ARGUMENTS
  DECLARE_CCTK_PARAMETERS
  DECLARE_CCTK_FUNCTIONS

  if (CCTK_EQUALS(fixed_excision,"sphere")) then
    where (r < fixed_size)
      emask = 0.d0
    elsewhere
      emask = 1.d0
    end where
  else if (CCTK_EQUALS(fixed_excision,"cube")) then
    where ((abs(x) < fixed_size).and.(abs(z) < fixed_size).and.&
         (abs(y) < fixed_size))
      emask = 0.d0
    elsewhere
      emask = 1.d0
    end where
  end if
  
end subroutine Lego_FixedSphere