aboutsummaryrefslogtreecommitdiff
path: root/src/fixedsphere.F90
blob: 7d2294df58bc27d84486486e4a46ccc2673188c5 (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
30
31
#include "cctk.h"
#include "cctk_Parameters.h"
#include "cctk_Arguments.h"

#include "cctk_Functions.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