text:
    !Default parameterization using theta = r_s/D_a instead of H_0, and tau instead of z_re
    !and log(A_s) instead of A_s
    !Less general, but should give better performance
    !
    !The well-determined parameter A_s exp(-2tau) should be found by the covariance matrix
    !parameter 3 is 100*theta, parameter 4 is tau, others same as params_H except A->log(A)
    !Theta is much better constrained than H_0
    !
    !Also a background-only parameterization, e.g. for use with just supernoave etc

    module CosmologyParameterizations
    use CosmologyTypes
    use CosmoTheory
    use Calculator_Cosmology
    use bbn
    implicit none
    private

    Type, extends(TCosmologyParameterization) :: ThetaParameterization
        real(mcp) :: H0_min = 40, H0_max = 100
        real(mcp) :: H0_prior_mean = 0._mcp, H0_prior_std = 0._mcp
        real(mcp) :: sterile_mphys_max = 10 !maximum allowed physical mass of thermal sterile neutrino in eV
        real(mcp) :: use_min_zre = 0._mcp
        real(mcp) :: zre_prior_mean = 0._mcp, zre_prior_std = 0._mcp
        integer :: num_derived = 0
    contains
    procedure :: ParamArrayToTheoryParams => TP_ParamArrayToTheoryParams
    procedure :: NonBaseParameterPriors => TP_NonBaseParameterPriors
    procedure :: CalcDerivedParams => TP_CalcDerivedParams
    procedure :: InitWithSetNames => TP_Init
    end type ThetaParameterization

    Type, extends(TCosmologyParameterization) :: BackgroundParameterization
    contains
    procedure :: ParamArrayToTheoryParams => BK_ParamArrayToTheoryParams
    procedure :: CalcDerivedParams => BK_CalcDerivedParams
    procedure :: InitWithSetNames => BK_Init
    end type BackgroundParameterization

    public BackgroundParameterization,ThetaParameterization
    contains

    subroutine TP_Init(this, Ini, Names, Config)
    class(ThetaParameterization) :: this
    class(TSettingIni) :: Ini
    class(TParamNames) :: Names
    class(TGeneralConfig), target :: Config
    character(LEN=:), pointer :: prior

    call Ini%Read('H0_min',this%H0_min)
    call Ini%Read('H0_max',this%H0_max)
    call Ini%Read('use_min_zre',this%use_min_zre)
    call Ini%Read('sterile_mphys_max',this%sterile_mphys_max)
    prior => Ini%Read_String('H0_prior',NotFoundFail=.false.)
    if (prior/='') then
        read(prior,*) this%H0_prior_mean, this%H0_prior_std
    end if
    prior => Ini%Read_String('zre_prior',NotFoundFail=.false.)
    if (prior/='') then
        read(prior,*) this%zre_prior_mean, this%zre_prior_std
    end if

    call this%Initialize(Ini,Names, 'paramnames/params_CMB.paramnames', Config)
    if (CosmoSettings%bbn_consistency) call Names%Add('paramnames/derived_bbn.paramnames')
    call Names%Add('paramnames/derived_theory.paramnames')
    if (CosmoSettings%use_LSS) call Names%Add('paramnames/derived_LSS.paramnames')
    if (CosmoSettings%compute_tensors) call Names%Add('paramnames/derived_tensors.paramnames')
    this%num_derived = Names%num_derived
    !set number of hard parameters, number of initial power spectrum parameters
    call this%SetTheoryParameterNumbers(18,last_power_index)

    end subroutine TP_Init

    function TP_NonBaseParameterPriors(this,CMB)
    class(ThetaParameterization) :: this
    class(TTheoryParams) :: CMB
    real(mcp):: TP_NonBaseParameterPriors

    select type (CMB)
    class is (CMBParams)
        TP_NonBaseParameterPriors = logZero
        if (CMB%H0 < this%H0_min .or. CMB%H0 > this%H0_max) return
        if (CMB%zre < this%Use_min_zre) return
        if (CMB%omnuh2_sterile > 0 .and. CMB%nnu > standard_neutrino_neff) then
            !Check if physical mass of thermal massive sterile too big (look like CDM, so don't need to model separately)
            if (CMB%omnuh2_sterile*neutrino_mass_fac/(CMB%nnu-standard_neutrino_neff)**0.75_mcp > this%sterile_mphys_max) return
        end if
        TP_NonBaseParameterPriors = 0
        if (this%H0_prior_mean/=0._mcp) then
            TP_NonBaseParameterPriors = ((CMB%H0 - this%H0_prior_mean)/this%H0_prior_std)**2/2
        end if
        if (this%zre_prior_mean/=0._mcp) then
            TP_NonBaseParameterPriors = TP_NonBaseParameterPriors + ((CMB%zre - this%zre_prior_mean)/this%zre_prior_std)**2/2
        end if
    end select
    end function TP_NonBaseParameterPriors

    subroutine TP_ParamArrayToTheoryParams(this, Params, CMB)
    class(ThetaParameterization) :: this
    real(mcp) Params(:)
    integer, parameter :: ncache =2
    Class(TTheoryParams), target :: CMB
    Type(CMBParams), save :: LastCMB(ncache)
    real(mcp) DA
    real(mcp)  D_b,D_t,D_try,try_b,try_t, lasttry
    integer, save :: cache=1
    integer i
    Type(CMBParams), pointer :: CP2
    integer error

    select type(CosmoCalc=>this%Config%Calculator)
    class is (TCosmologyCalculator)
        select type (CMB)
        class is (CMBParams)
            do i=1, ncache
                !want to save two slow positions for some fast-slow methods
                if (all(Params(1:num_hard) == LastCMB(i)%BaseParams(1:num_hard))) then
                    CP2 => CMB !needed to make next line work for some odd reason CMB=LastCMB(i) does not work
                    CP2 = LastCMB(i)
                    call this%TCosmologyParameterization%ParamArrayToTheoryParams(Params, CMB)
                    call SetFast(Params,CMB)
                    return
                end if
            end do
            call this%TCosmologyParameterization%ParamArrayToTheoryParams(Params, CMB)

            error = 0   !JD to prevent stops when using bbn_consistency or m_sterile
            DA = Params(3)/100
            try_b = this%H0_min
            call SetForH(Params,CMB,try_b, .true.,error)  !JD for bbn related errors
            if(error/=0)then
                cmb%H0=0
                return
            end if
            D_b = CosmoCalc%CMBToTheta(CMB)
            try_t = this%H0_max
            call SetForH(Params,CMB,try_t, .false.)
            D_t = CosmoCalc%CMBToTheta(CMB)
            if (DA < D_b .or. DA > D_t) then
                if (Feedback>1) write(*,*) instance, 'Out of range finding H0: ', real(Params(3))
                cmb%H0=0 !Reject it
            else
                lasttry = -1
                do
                    call SetForH(Params,CMB,(try_b+try_t)/2, .false.)
                    D_try = CosmoCalc%CMBToTheta(CMB)
                    if (D_try < DA) then
                        try_b = (try_b+try_t)/2
                    else
                        try_t = (try_b+try_t)/2
                    end if
                    if (abs(D_try - lasttry)< 1e-7) exit
                    lasttry = D_try
                end do

                !!call InitCAMB(CMB,error)
                if (CMB%tau==0._mcp) then
                    CMB%zre=0
                else
                    CMB%zre = CosmoCalc%GetZreFromTau(CMB, CMB%tau)
                end if

                LastCMB(cache) = CMB
                cache = mod(cache,ncache)+1
            end if
        end select
        class default
        call MpiStop('CosmologyParameterizations: Calculator is not TCosmologyCalculator')
    end select

    end subroutine TP_ParamArrayToTheoryParams

    function GetYPBBN(Yhe)
    !Convert yhe defined as mass fraction (CMB codes), to nucleon ratio definition
    real(mcp), intent(in) :: Yhe
    real(mcp) GetYPBBN
    real(mcp), parameter :: m_proton = 1.672621637e-27
    real(mcp), parameter :: m_H = 1.673575e-27
    real(mcp), parameter :: not4 = 3.9715
    real(mcp), parameter :: m_He = m_H * not4

    GetYPBBN =  4 * m_H * Yhe / (m_He - Yhe * (m_He - 4*m_H))

    end function GetYPBBN

    subroutine TP_CalcDerivedParams(this, P, Theory, derived)
    class(ThetaParameterization) :: this
    real(mcp), allocatable :: derived(:)
    class(TTheoryPredictions), allocatable :: Theory
    real(mcp) :: P(:)
    Type(CMBParams) CMB
    real(mcp) :: lograt
    integer ix,i
    real(mcp) z
    integer, parameter :: derivedCL(5) = [40, 220, 810, 1420, 2000]

    if (.not. allocated(Theory)) call MpiStop('Not allocated theory!!!')
    select type (Theory)
    class is (TCosmoTheoryPredictions)
        allocate(Derived(this%num_derived), source=0._mcp)

        call this%ParamArrayToTheoryParams(P,CMB)

        derived(1) = CMB%H0
        derived(2) = CMB%omv
        derived(3) = CMB%omdm+CMB%omb
        derived(4) = CMB%omdmh2 + CMB%ombh2
        derived(5) = CMB%omnuh2
        derived(6) = (CMB%omdmh2 + CMB%ombh2)*CMB%h

        derived(7) = Theory%Sigma_8
        derived(8) = Theory%Sigma_8*((CMB%omdm+CMB%omb))**0.5_mcp
        derived(9) = Theory%Sigma_8*((CMB%omdm+CMB%omb))**0.25_mcp
        derived(10)= Theory%Sigma_8/CMB%h**0.5_mcp

        derived(11) = Theory%Lensing_rms_deflect
        derived(12) = CMB%zre
        ix=13
        derived(ix) = cl_norm*CMB%InitPower(As_index)*1e9
        derived(ix+1) = derived(ix)*exp(-2*CMB%tau)  !A e^{-2 tau}
        ix = ix+2

        if(CosmoSettings%use_CMB .and. allocated(Theory%Cls(1,1)%CL)) then
            !L(L+1)C_L/2pi at various places
            derived(ix:ix+size(DerivedCL)-1) = Theory%Cls(1,1)%CL(derivedCL)
        end if
        ix = ix+size(derivedCL)

        lograt = log(0.002_mcp/CosmoSettings%pivot_k)   !get ns at k=0.002
        derived(ix) = CMB%InitPower(ns_index) +CMB%InitPower(nrun_index)*lograt +&
            CMB%InitPower(nrunrun_index)*lograt**2/2
        ix=ix+1

        derived(ix)= CMB%Yhe !value actually used, may be set from bbn consistency
        derived(ix+1)= GetYpBBN(CMB%Yhe) !same, as nucleon ratio definition
        ix = ix+2

        if (CosmoSettings%bbn_consistency) then
            derived(ix) = 1d5*BBN_DH%Value(CMB%ombh2,CMB%nnu - standard_neutrino_neff)
            ix =ix + 1
        end if

        derived(ix:ix + Theory%numderived-1) = Theory%derived_parameters(1: Theory%numderived)
        ix = ix + Theory%numderived

        if (CosmoSettings%Use_LSS) then
            ! f sigma_8 at specified redshift
            do i=1,size(CosmoSettings%z_outputs)
                z =  CosmoSettings%z_outputs(i)
                derived(ix) = Theory%growth_z%Value(z)
                derived(ix+1) = Theory%sigma8_z%Value(z)
                ix = ix + 2
            end do
        end if

        if (CosmoSettings%Compute_tensors) then
            derived(ix:ix+5) = [Theory%tensor_ratio_02, Theory%tensor_ratio_BB, log(Theory%tensor_AT*1e10), &
                Theory%tensor_ratio_C10, Theory%tensor_AT*1e9, Theory%tensor_AT*1e9*exp(-2*CMB%tau) ]
            ix=ix+6
        end if

        if (ix - 1 /= this%num_derived) then
            write(*,*) 'num_derived =', this%num_derived, '; ix, Theory%numderived = ', ix, Theory%numderived
            call MpiStop('TP_CalcDerivedParams error in derived parameter numbers')
        end if
    end select

    end subroutine TP_CalcDerivedParams

    subroutine SetFast(Params,CMB)
    real(mcp) Params(num_Params)
    Type(CMBParams) CMB

    CMB%InitPower(1:num_initpower) = Params(index_initpower:index_initpower+num_initpower-1)
    CMB%InitPower(As_index) = exp(CMB%InitPower(As_index))

    end subroutine SetFast

    subroutine SetForH(Params,CMB,H0, firsttime,error)
    use bbn
    real(mcp) Params(num_Params)
    logical, intent(in) :: firsttime
    Type(CMBParams) CMB
    real(mcp) h2,H0
    integer, optional :: error

    CMB%H0=H0
    if (firsttime) then
        CMB%reserved = 0
        CMB%ombh2 = Params(1)
        CMB%tau = params(4) !tau, set zre later
        CMB%Omk = Params(5)
        CMB%w = Params(8)
        CMB%wa = Params(9)
        CMB%belta = Params(10)
        CMB%IDEcase = Params(11)
        CMB%nnu = Params(12) !3.046
        !Params(6) is now mnu, where mnu is physical standard neutrino mass and we assume standard heating
        CMB%omnuh2=Params(6)/neutrino_mass_fac*(standard_neutrino_neff/3)**0.75_mcp
        !Params(7) is mass_sterile*Neff_sterile
        CMB%omnuh2_sterile = Params(7)/neutrino_mass_fac
        !we are using interpretation where there are degeneracy_factor neutrinos, each exactly thermal
        !So internally 3.046 or 3.046/3 massive neutrnos. But mnu is the physical integer mass sum.
        if (CMB%omnuh2_sterile >0 .and. CMB%nnu < standard_neutrino_neff) then
            if(present(error))then
                error=-1
            else
                call MpiStop('sterile neutrino mass required Neff>3.046')
            end if
        end if

        CMB%omnuh2 = CMB%omnuh2 + CMB%omnuh2_sterile
        CMB%omch2 = Params(2)
        CMB%omdmh2 = CMB%omch2+ CMB%omnuh2
        CMB%nufrac=CMB%omnuh2/CMB%omdmh2

        if (CosmoSettings%bbn_consistency) then
            CMB%YHe = BBN_YHe%Value(CMB%ombh2,CMB%nnu - standard_neutrino_neff,error)
        else
            !e.g. set from free parameter..
            CMB%YHe  =Params(13)
        end if

        CMB%iso_cdm_correlated =  Params(14)
        CMB%zre_delta = Params(15)
        CMB%ALens = Params(16)
        CMB%ALensf = Params(17)
        CMB%fdm = Params(18)
        call SetFast(Params,CMB)
    end if

    CMB%h = CMB%H0/100
    h2 = CMB%h**2
    CMB%omb = CMB%ombh2/h2
    CMB%omc = CMB%omch2/h2
    CMB%omnu = CMB%omnuh2/h2
    CMB%omdm = CMB%omdmh2/h2
    CMB%omv = 1- CMB%omk - CMB%omb - CMB%omdm

    end subroutine SetForH

    !!! Simple parameterization for background data, e.g. Supernovae only (no thermal history)
    subroutine BK_Init(this, Ini, Names, Config)
    class(BackgroundParameterization) :: this
    class(TSettingIni) :: Ini
    class(TParamNames) :: Names
    class(TGeneralConfig), target :: Config

    this%late_time_only = .true.
    call this%Initialize(Ini,Names, 'paramnames/params_background.paramnames', Config)
    call this%SetTheoryParameterNumbers(Names%num_MCMC,0)

    end subroutine BK_Init

    subroutine BK_ParamArrayToTheoryParams(this, Params, CMB)
    class(BackgroundParameterization) :: this
    real(mcp) Params(:)
    class(TTheoryParams), target :: CMB
    real(mcp) omegam, h2

    select type (CMB)
    class is (CMBParams)
        omegam = Params(1)
        CMB%H0 = Params(2)
        CMB%omk = Params(3)
        CMB%omnuh2=Params(4)/neutrino_mass_fac*(standard_neutrino_neff/3)**0.75_mcp
        CMB%w =    Params(5)
        CMB%wa =    Params(6)
        CMB%belta = Params(7)
        CMB%IDEcase = Params(8)
        CMB%nnu =    Params(9)

        CMB%h=CMB%H0/100
        h2 = CMB%h**2
        CMB%Yhe=0.24
        CMB%omnu = CMB%omnuh2/h2
        CMB%omb= omegam - CMB%omnu
        CMB%ombh2 = CMB%omb*h2
        CMB%omc=0
        CMB%omch2 = CMB%omc*h2
        CMB%zre=0
        CMB%tau=0
        CMB%omdmh2 = CMB%omch2+ CMB%omnuh2
        CMB%omdm = CMB%omdmh2/h2
        CMB%omv = 1- CMB%omk - CMB%omb - CMB%omdm
        CMB%nufrac=CMB%omnuh2/CMB%omdmh2
        CMB%reserved=0
        CMB%fdm=0
        CMB%iso_cdm_correlated=0
        CMB%Alens=1
    end select
    end subroutine BK_ParamArrayToTheoryParams

    subroutine BK_CalcDerivedParams(this, P, Theory, derived)
    class(BackgroundParameterization) :: this
    real(mcp), allocatable :: derived(:)
    class(TTheoryPredictions), allocatable :: Theory
    real(mcp) :: P(:)
    Type(CMBParams) CMB

    allocate(Derived(1))

    call this%ParamArrayToTheoryParams(P,CMB)

    derived(1) = CMB%omv

    end subroutine BK_CalcDerivedParams

    end module CosmologyParameterizations

max_stars_repo_name: Ji-Ping-Dai/GeneralPPF

max_issues_repo_name: Ji-Ping-Dai/GeneralPPF

max_forks_repo_name: Ji-Ping-Dai/GeneralPPF


text:
C    @(#)xscan.f	20.3 2/13/96
        subroutine xscan (ain, aout, nwrd)
C
C       This routine will parse a FREE FIELD CHARACTER STRING BUFFER
C       "AIN", into a character array "AOUT".
C
C       Limiters are blanks. Distinct words are continuous strings
C       and the following arithmetic operators:
C
C          "+" (if not part of an exponent)
C          "-" (if not part of an exponent)
C          "**"
C          "*"
C          "/"
C          ">"
C          "<"
C          "("
C          ")"
C
C       A blank character can be inserted in the word and not be
C       interpreted as a blank by using the "#".  XSCAN will insert
C       the blank in the same position as the word is built.
C
        character    aout (*) * (*)
        character    ain * (*)
C
C       Clear the output array before starting
C
        nwrd=1
        nchr=0
        lenout = len(aout(1))
        aout(nwrd) = ' '
        do 100 i=1,len(ain)
           ityp = index (' ()*/+-<>', ain(i:i))
           if (ityp .eq. 0) then
              nchr=nchr+1
              if (nchr .le. lenout ) then
                 if (ain(i:i).eq.'#') then
                    aout(nwrd)(nchr:nchr) = ' '
                 else
                    aout(nwrd)(nchr:nchr) = ain(i:i)
                 endif
              endif
C
C          Blank delimits words.
C
           else if (ityp .eq. 1) then
              if (nchr.ne.0) then
                 nwrd=nwrd+1
                 aout(nwrd) = ' '
                 nchr=0
              endif
C
C          "+" or "-" delimits word if it is not part of a numerical
C          exponential expression or it is a arithmetic suffix.
C
           else if (ityp .eq. 6 .or. ityp .eq. 7) then
              if (nchr .gt. 0) then
                 if (aout(nwrd)(nchr:nchr) .eq. 'E') then
                    nchr=nchr+1
                    if (nchr .le. lenout ) then
                       aout(nwrd)(nchr:nchr) = ain(i:i)
                    endif
                 else if (nwrd .eq. 1 .and. nchr .eq. 0) then
                    nchr=nchr+1
                    if (nchr .le. lenout ) then
                       aout(nwrd)(nchr:nchr) = ain(i:i)
                    endif
                 else
                    if (nchr.ne.0) then
                       nwrd=nwrd+1
                    endif
                    aout(nwrd) = ain(i:i)
                    nchr=0
                    nwrd=nwrd+1
                    aout(nwrd) = ' '
                 endif
              else
                 if (nwrd .gt. 1) then
                    if (aout(nwrd-1) .eq. '(' ) then
                       nchr=nchr+1
                       if (nchr .le. lenout ) then
                          aout(nwrd)(nchr:nchr) = ain(i:i)
                       endif
                    else
                       aout(nwrd) = ain(i:i)
                       nchr=0
                       nwrd=nwrd+1
                       aout(nwrd) = ' '
                    endif
                 else
                    aout(nwrd) = ain(i:i)
                    nchr=0
                    nwrd=nwrd+1
                    aout(nwrd) = ' '
                 endif
              endif
C
C          Look back for exponentiation.
C
           else if (ityp .eq. 4) then
              if (nchr.ne.0) then
                 nwrd=nwrd+1
                 aout(nwrd) = ain(i:i)
                 nchr=0
                 nwrd=nwrd+1
                 aout(nwrd) = ' '
              else
                 if (nwrd .gt. 1) then
                    if (aout(nwrd-1) .eq. '*') then
                       aout(nwrd-1) = '**'
                    else
                       aout(nwrd) = ain(i:i)
                       nchr=0
                       nwrd=nwrd+1
                       aout(nwrd) = ' '
                    endif
                 else
                    aout(nwrd) = ain(i:i)
                    nchr=0
                    nwrd=nwrd+1
                    aout(nwrd) = ' '
                 endif
              endif
C
C          All remaining operators are delimiters.
C
           else
              if (nchr.ne.0) then
                 nwrd=nwrd+1
              endif
              aout(nwrd) = ain(i:i)
              nchr=0
              nwrd=nwrd+1
              aout(nwrd) = ' '
           endif
 100    continue
 150    if (nchr .eq. 0) nwrd = nwrd - 1
        return
        end

ext: f

max_stars_repo_name: mbheinen/bpa-ipf-tsp

max_issues_repo_name: cuihantao/bpa-ipf-tsp

max_forks_repo_name: mbheinen/bpa-ipf-tsp


text:
!
! Copyright (C) 2001 PWSCF group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
!-----------------------------------------------------------------------
subroutine dqvan2 (ngy, ih, jh, np, qmod, dqg, ylmk0, dylmk0, ipol)
  !-----------------------------------------------------------------------
  !
  !    This routine computes the derivatives of the fourier transform of
  !    the Q function needed in stress assuming that the radial fourier
  !    trasform is already computed and stored in table qrad.
  !
  !    The formula implemented here is
  !
  !     dq(g,l,k) = sum_lm (-i)^l ap(lm,l,k) *
  !                ( yr_lm(g^) dqrad(g,l,l,k) + dyr_lm(g^) qrad(g,l,l,k))
  !
  !     here the dummy variables
  !
  USE kinds, ONLY: DP
  USE gvect, ONLY: g
  USE us, ONLY: dq, qrad
  USE uspp_param, ONLY: lmaxq, nbetam
  USE uspp, ONLY: nlx, lpl, lpx, ap, indv, nhtol, nhtolm
  implicit none
  integer :: ngy, ih, jh, np, ipol
  ! input: the number of G vectors to compute
  ! input: the first index of Q
  ! input: the second index of Q
  ! input: the number of the pseudopotential
  ! input: the polarization of the derivative

  real(DP) :: ylmk0 (ngy, lmaxq * lmaxq), dylmk0 (ngy, lmaxq * lmaxq), &
       qmod (ngy)
  ! the spherical harmonics
  ! the spherical harmonics derivetives
  ! input: moduli of the q+g vectors
  complex(DP) :: dqg (ngy)
  ! output: the fourier transform of interest
  !
  !     here the local variables
  !

  complex(DP) :: sig
  ! (-i)^L

  integer :: nb, mb, ijv, ivl, jvl, ig, lp, l, lm, i0, i1, i2, i3
  ! the atomic index corresponding to ih
  ! the atomic index corresponding to jh
  ! combined index (nb,mb)
  ! the lm corresponding to ih
  ! the lm corresponding to jh
  ! counter on g vectors
  ! the actual LM
  ! the angular momentum L
  ! the possible LM's compatible with ih,j
  ! counters for interpolation table

  real(DP) :: sixth, dqi, qm, px, ux, vx, wx, uvx, pwx, work, work1, qm1
  ! 1 divided by six
  ! 1 divided dq
  ! qmod/dq
  ! measures for interpolation table
  ! auxiliary variables for intepolation
  ! auxiliary variable
  ! auxiliary variable
  !
  !     compute the indices which correspond to ih,jh
  !
  sixth = 1.d0 / 6.d0
  dqi = 1 / dq
  nb = indv (ih, np)
  mb = indv (jh, np)
  if (nb.ge.mb) then
     ijv = nb * (nb - 1) / 2 + mb
  else
     ijv = mb * (mb - 1) / 2 + nb
  endif
  ivl = nhtolm (ih, np)
  jvl = nhtolm (jh, np)

  if (nb > nbetam .OR. mb > nbetam) &
       call errore (' dqvan2 ', ' wrong dimensions (1)', MAX(nb,mb))
  if (ivl > nlx .OR. jvl > nlx) &
       call errore (' dqvan2 ', ' wrong dimensions (2)', MAX(ivl,jvl))

  dqg(:) = (0.d0,0.d0)
  !
  !    and make the sum over the non zero LM
  !
  do lm = 1, lpx (ivl, jvl)
     lp = lpl (ivl, jvl, lm)
     !
     !     extraction of angular momentum l from lp:
     !
     if (lp.eq.1) then
        l = 1
     elseif ( (lp.ge.2) .and. (lp.le.4) ) then
        l = 2
     elseif ( (lp.ge.5) .and. (lp.le.9) ) then
        l = 3
     elseif ( (lp.ge.10) .and. (lp.le.16) ) then
        l = 4
     elseif ( (lp.ge.17) .and. (lp.le.25) ) then
        l = 5
     elseif ( (lp.ge.26) .and. (lp.le.36) ) then
        l = 6
     elseif ( (lp.ge.37) .and. (lp.le.49) ) then
        l = 7
     else
        call errore (' qvan ', ' lp.gt.49 ', lp)
     endif

     sig = (0.d0, -1.d0) ** (l - 1)
     sig = sig * ap (lp, ivl, jvl)
     !
     qm1 = -1.0_dp !  any number smaller than qmod(1)
     !
!$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(qm,px,ux,vx,wx,i0,i1,i2,i3,uvx,pwx,work,work1)
     do ig = 1, ngy
        !
        ! calculate quantites depending on the module of G only when needed
        !
#if !defined(__OPENMP)
        IF ( ABS( qmod(ig) - qm1 ) > 1.0D-6 ) THEN
#endif
           qm = qmod (ig) * dqi
           px = qm - int (qm)
           ux = 1.d0 - px
           vx = 2.d0 - px
           wx = 3.d0 - px
           i0 = qm + 1
           i1 = qm + 2
           i2 = qm + 3
           i3 = qm + 4
           uvx = ux * vx * sixth

           pwx = px * wx * 0.5d0

           work = qrad (i0, ijv, l, np) * uvx * wx + &
                  qrad (i1, ijv, l, np) * pwx * vx - &
                  qrad (i2, ijv, l, np) * pwx * ux + &
                  qrad (i3, ijv, l, np) * px * uvx
           work1 = - qrad(i0, ijv, l, np) * (ux*vx + vx*wx + ux*wx) * sixth &
                   + qrad(i1, ijv, l, np) * (wx*vx - px*wx - px*vx) * 0.5d0 &
                   - qrad(i2, ijv, l, np) * (wx*ux - px*wx - px*ux) * 0.5d0 &
                   + qrad(i3, ijv, l, np) * (ux*vx - px*ux - px*vx) * sixth

           work1 = work1 * dqi

#if !defined(__OPENMP)
           qm1 = qmod(ig)
        END IF
#endif

        dqg (ig) = dqg (ig) + sig * dylmk0 (ig, lp) * work
        if (qmod (ig) > 1.d-9) dqg (ig) = dqg (ig) + &
            sig * ylmk0 (ig, lp) * work1 * g (ipol, ig) / qmod (ig)
     enddo
!$OMP END PARALLEL DO

  enddo
  return

end subroutine dqvan2

max_stars_repo_name: utdsimmons/ohpc

max_issues_repo_name: utdsimmons/ohpc

max_forks_repo_name: utdsimmons/ohpc


text:
PROGRAM Fep2D

  ! #DES: Performs the FEP/US procedure for an n-dimensional reaction coordinate
  !       composed of geometric collective variables.

  IMPLICIT NONE

  CALL Startup()
  CALL Run2D()
  CALL CleanUp()

  CONTAINS

!*

    SUBROUTINE Startup()

      USE Log,   ONLY : logUnit, createLogFile
      USE Data,  ONLY : ComputeDerivedData
      USE Input, ONLY : ReadInput
      USE InputCollectiveVariables, ONLY : DetermineCollectiveVariables

      IMPLICIT NONE
      LOGICAL, PARAMETER :: readCoords = .TRUE.

      CALL CreateLogFile()
      CALL ReadInput(readCoords=readCoords)
      CALL DetermineCollectiveVariables(logUnit)
      CALL ComputeDerivedData(logUnit,doTiming=.FALSE.,readCoords=readCoords,doFEPUS=.TRUE.)

    END SUBROUTINE Startup

!*

    SUBROUTINE Cleanup()

      USE Input, ONLY : DeallocateInputArrays
      USE Data,  ONLY : DeallocateDataArrays
      USE Log,   ONLY : EndLogFile
      USE InputCollectiveVariables, ONLY : DeallocateArrays

      IMPLICIT NONE

        CALL DeallocateInputArrays()
        CALL DeallocateDataArrays()
        CALL DeallocateArrays()
        CALL EndLogFile("Normal termination of Fepcat:")

    END SUBROUTINE Cleanup

!*

    SUBROUTINE Run2D()

      USE Analysis, ONLY : Fepus2D
      USE FIleIO,   ONLY : OpenFile, CloseFile
      USE Data,     ONLY : geomRC, mappingEnergies, groundStateEnergy
      USE Input,    ONLY : mask, minPop, nBins

      IMPLICIT NONE
      INTEGER, PARAMETER :: outUnit = 19
      CHARACTER(11), PARAMETER :: outFileName = "fepus2D.csv"

      CALL OpenFile(outUnit,outFileName,"write")
      CALL Fepus2D(geomRC(:,:,:),groundStateEnergy(:,:),mappingEnergies(:,:,:,1),mask(:,:),nBins,minPop,outUnit)
      CALL CloseFile(outUnit)

    END SUBROUTINE Run2D

END PROGRAM Fep2D

max_stars_repo_name: MJLMills/fepcat

max_issues_repo_name: MJLMills/fepcat

max_forks_repo_name: MJLMills/fepcat


text:
c
c     $Id$
c
      subroutine muld(a, b, p, ar, ac, bc)
      implicit none
c
c     Modula-3/C array indexing M(COLS,ROWS)
c
      integer ar, ac, bc
      double precision a(ac,ar), b(bc,ac), p(bc,ar)

      integer row, col, term
      double precision elem

      do 200 row = 1, ar
         do 150 col = 1, bc
            p(col,row) = 0.0
            do 100 term = 1, ac
               p(col,row) = p(col,row) + a(term,row) * b(col,term)
 100        continue
 150     continue
 200  continue
      end

cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc


text:
! -----------------------------------------------------------------------------
! BSD 3-Clause License
!
! Copyright (c) 2019, Science and Technology Facilities Council
! All rights reserved.
!
! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions are met:
!
! * Redistributions of source code must retain the above copyright notice, this
!   list of conditions and the following disclaimer.
!
! * Redistributions in binary form must reproduce the above copyright notice,
!   this list of conditions and the following disclaimer in the documentation
!   and/or other materials provided with the distribution.
!
! * Neither the name of the copyright holder nor the names of its
!   contributors may be used to endorse or promote products derived from
!   this software without specific prior written permission.
!
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
! FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
! COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
! INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
! BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
! LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
! ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGE.
! -----------------------------------------------------------------------------
! Author R. W. Ford STFC Daresbury Lab
program utf
! N²<0
end program utf

max_stars_repo_name: sturmianseq/fparser

max_issues_repo_name: sturmianseq/fparser

max_forks_repo_name: sturmianseq/fparser


text:
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
cc                                                                    cc
cc               mnregr : regrid test program                         cc
cc                                                                    cc
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
      real x(11),y(11),z(121),tx(17),ty(17),c(300),wrk(850),f(121),
     * wk(132)
      integer iwrk(60),iw(22)
      real ai,fp,s,xb,xe,yb,ye
      integer kx,ky,kwrk,lwrk,m,mx,my,m1,m2,nc,nx,nxest,ny,nyest,
     * i,ier,is,iopt,j
c  we fetch the number of x-coordinates of the grid.
      read(5,900) mx
c  we fetch the x-coordinates of the grid.
      read(5,905) (x(i),i=1,mx)
c  we fetch the number of y-coordinates of the grid.
      read(5,900) my
c  we fetch the y-coordinates of the grid.
      read(5,905) (y(i),i=1,my)
c  we fetch the function values at the grid points.
      m = mx*my
      read(5,910) (z(i),i=1,m)
c  printing of the input data.
      write(6,915)
      write(6,920) (y(i),i=1,6)
      write(6,925)
      m1 = 1
      do 10 i=1,mx
        m2 = m1+5
        write(6,930) x(i),(z(j),j=m1,m2)
        m1 = m1+my
  10  continue
      write(6,920) (y(i),i=7,my)
      write(6,925)
      m1 = 7
      do 20 i=1,mx
        m2 = m1+4
        write(6,930) x(i),(z(j),j=m1,m2)
        m1 = m1+my
  20  continue
c  we set up the boundaries of the approximation domain.
      xb = x(1)
      yb = y(1)
      xe = x(mx)
      ye = y(my)
c  we set up the dimension information
      nxest = 17
      nyest = 17
      lwrk = 850
      kwrk = 60
c  main loop for the different spline approximations
      do 300 is=1,6
        go to (110,120,130,140,150,160),is
c  we start computing the least-squares bicubic polynomial
 110    iopt = 0
        kx = 3
        ky = 3
        s = 10.
        go to 200
c  iopt=1 from the second call on
 120    iopt = 1
        s = 0.22
        go to 200
c  overfitting (s too small)
 130    s = 0.1
        go to 200
c  an interpolating spline
 140    s = 0.
        go to 200
c  we change the degrees of the spline
 150    kx = 5
        ky = 5
        s = 0.2
        iopt = 0
        go to 200
c  finally we also calculate a least-squares spline approximation
c  with specified knots.
 160    iopt = -1
        kx = 3
        ky = 3
        nx = 11
        ny = 11
        j = kx+2
        do 170 i=1,3
          ai = i-2
          tx(j) = ai*0.5
          ty(j) = tx(j)
          j = j+1
 170    continue
c  determination of the spline approximation.
 200    call regrid(iopt,mx,x,my,y,z,xb,xe,yb,ye,kx,ky,s,nxest,
     *   nyest,nx,tx,ny,ty,c,fp,wrk,lwrk,iwrk,kwrk,ier)
c  printing of the fitting results.
        if(iopt.ge.0) go to 210
        write(6,935) kx,ky
        go to 220
 210    write(6,940) kx,ky
        write(6,945) s
 220    write(6,950) fp,ier
        write(6,955) nx
        write(6,960)
        write(6,965) (tx(i),i=1,nx)
        write(6,970) ny
        write(6,960)
        write(6,965) (ty(i),i=1,ny)
        nc = (nx-kx-1)*(ny-ky-1)
        write(6,975)
        write(6,980) (c(i),i=1,nc)
c  evaluation of the spline approximation.
        call bispev(tx,nx,ty,ny,c,kx,ky,x,mx,y,my,f,
     *   wk,132,iw,22,ier)
        write(6,985)
        write(6,920) (y(i),i=1,my,2)
        write(6,925)
        m1 = 1
        do 230 i=1,mx,2
          m2 = m1+my-1
          write(6,930) x(i),(f(j),j=m1,m2,2)
          m1 = m1+2*my
 230    continue
 300  continue
      stop
c  format statements.
 900  format(i2)
 905  format(11f5.1)
 910  format(11f7.4)
 915  format(15h1the input data)
 920  format(1h0,8x,1hy,4x,6(4x,f4.1))
 925  format(1h ,7x,1hx)
 930  format(6x,f4.1,5x,6f8.4)
 935  format(32h0least-squares spline of degrees,2i3)
 940  format(28h0smoothing spline of degrees,2i3)
 945  format(20h smoothing factor s=,f7.2)
 950  format(1x,23hsum squared residuals =,e15.6,5x,11herror flag=,i3)
 955  format(1x,42htotal number of knots in the x-direction =,i3)
 960  format(1x,22hposition of the knots )
 965  format(5x,10f6.2)
 970  format(1x,42htotal number of knots in the y-direction =,i3)
 975  format(23h0b-spline coefficients )
 980  format(5x,8f9.4)
 985  format(1h0,37hspline values at selected grid points)
      end

max_issues_repo_name: tbeu/ApproxSpline


text:
European Wax Center is a franchise waxing salon that does a wide variety of body and face waxing services for women and men. The women at the front desk love to try to lure you in with different packages, memberships, and promotions that EWC has to offer, but they can actually be worth it for frequent waxers. Your first wax at EWC is either free or very cheap, depending on the service you select. They also sell a line of products including exfoliating body wash, lotion, and ingrown hair serum.

  To learn about other businesses in Davis that provide professional aesthetic services, visit our Beauty Salons and Barber Shops page.

20090918 10:48:45 nbsp I was excited to see this place come in initially, but their customer service is terribly fake. I have no intention of returning. Users/RandiF

20090919 15:08:17 nbsp box waxing? Users/StevenDaubert

20091003 11:11:44 nbsp these ladies were great! yes, their customer service isnt what you would get at a full salon, but you arent paying for that. these ladies know what they are doing, and are good at it. they are welcoming and talk to you while you wait (whereas at some places you would be ignored until you are called). they use hard wax, rather than strip wax, which means that the pain is minimal, and there is very little chance of getting your skin pulled or ripped. i just got my brazillian done and it didnt hurt at all  at least compared to the strip wax that i am used to. they are offering great discounts because they just opened, and they have packages that you can buy that can save you some serious money. i am definitely going to go back every month. Users/Millie

20091003 17:33:15 nbsp
European Wax Center is like a gym  they encourage people to get memberships.  Overall, price wise, the memberships appear to be reasonable, but expect a hard sell on the memberships if you go in.   A friend and I went there and she liked it, but I didnt care for it.   While the atmosphere was great, it was probably one of the worst waxes Ive had in a long time.  They recommend you coming back every 4 weeks and I can understand why    eyebrows look terrible within 2 weeks.  Ill stick to New Fashion Salon in the U mall.  They may not be as spalike on the inside, but they do a good job and my brows look great for up to 6 weeks after getting waxed at New Fashion.
  Users/RohiniJasavala

20091006 11:36:59 nbsp There wax is definitely less painful than other waxes I have tried. My first experience getting a brazilian here was very pain free, but I was a little annoyed the esthetician  didnt go over and pull out the hairs the wax did not remove with tweezers there were definitely some major hairs that should have been removed. It was also strange that they dont leave the room to let you get undressed/dressed before and after. The second time was a better experience. The estheticians were very nice and made me feel comfortable. What is really annoying is that the people in the front are always trying to sell you their memberships. The nose waxing they do is awesome and does not hurt at all, it just feels like pressure. More men should get their noses waxed! Overall, I would recommend them! Users/Ldish949

20091018 17:04:29 nbsp The lady here did a great job waxing my eyebrows. She did exactly what I wanted and was very professional. The place itself is very clean and relatively new. Nobody bothered me about buying a membership, and even if they did its as easy as just saying No thank you so its no reason to avoid the place. The price was very reasonable. For how fancy the place was I would have expected to be charged more. My first wax was free and they gave me a $5 off my next service! If anything, you might as well try it out once and get the free wax! Users/Sarah1988

20091117 14:52:05 nbsp I liked the women at European Wax Center and the waxing was top notch. Both receptionists were very nice, real, and friendly. My esthetician, Sabrina was awesome. Her touch was as pain free as waxing can get and she was very easy going and made me feel completely comfortable. Dont let the glossy franchise fool you, the women working there are in fact very real and make it a nice experience. Users/kettle

20091124 11:51:05 nbsp Heather is the bomb. Go to her for your Brazillians or Bikini waxing!  Users/Ldish949

20091129 11:20:57 nbsp I just got a brazilian the other day and it was the best waxing job Ive had in a long time. I only paid $12 for the waxing as a first timer promo. There was very little pain (only when she flicked up some of the wax to get a hold), no irritation, and the redness went away really fast. By the way, if youve never gotten a dry wax done, one nice advantage is you dont have to worry about having sticky wax leftover on your body from sloppy waxing/cleaning. It was a little odd that the esthetician didnt leave the room while I undressed, but youre showing them all your junk anyways so I didnt think it was that big of a deal. She at least turned the other way and shes being efficient. Everything looks clean, and I actually really appreciated that the esthetician cleaned the table while I was in the room getting dressed.

I got the Super Pass membership which is $28 a month for a brazilian, and if you get waxed regularly I think its worth it. Most places Ive been to will only give you a wax under $40 if youve gone multiple times. The receptionist said something like as long as you try to go every 34 weeks, they wont screw you over or something? I dont remember. Anyways to cancel the membership all you need to do is give them written notice 30 days in advance. I dont think the super pass membership is advertised on the website, so if you go to the website and look at the deals, dont be fooled by the club 30 pass, which is really designed for people who wax every hair off their bodies. Definitely talk to them in person about what deal will be best for you if you decide to stay with them. Users/ymdean

20091213 14:13:15 nbsp I would recommend this place to my friends without hesitation. Ok, its not Bliss Spa, but they are efficient and very affordable at $28 a month for a thorough box waxing.  Went today for the first time and got my membership. For a brazilian and brow wax I was in and out in about 35 minutes and she did tweeze strayspretty remarkable.  With the inital brow wax being free and my membership it was $28 for all that. Impressive! Also a huge fan of the dry waxing  much less painful, I dont know why more places dont use this kind of wax. It also doesnt pull up your skin like the wax they use strips on, only the hairs.  Users/soledad101

20091217 22:56:00 nbsp This place does a good job for the price that you pay. My membership is under $25 a month, cant really beat that price anywhere that I know of for the quality of service you get here. Like salons of any other type, your experience will depend on the people you get. Some of the people at the counter here are fake and can come off as pretty rude, but other people are really friendly and helpful. I have had several of their estheticians and some are better, quicker, cleaner than others. Its a dice you have to roll unless you want to go somewhere with one esthetician like A Plus Image. Sure its a franchise (and looks/feels like one) but this place is much cheaper and does a better job than Smooth As Silk, and they use hard wax instead of the more painful soft wax. They also sell products that are expensive but worth the money because they work, especially the serum that Id recommend to anyone whether or not you wax here. Users/SRB

20100207 21:41:01 nbsp Traumatic! That was my experience.  I got a brazilian and full leg wax from Sabrina.

The brazilian was horrible! When she tried to take the wax off, she had a really hard time, so what with more skilled waxers is a quick rip, from her was a series of five yanks. It was much more painful and scary this way. Every time she went to remove the wax, I was so scared of how it was going to go that I was actually shaking. Then, each time, she would say in a cold, cold voice, take a minute.  In the end, I told her to just stop, and actually walked out with a chunk of wax stuck to my hair (that was fun to deal with later) because I had had enough and was scared of more pain.

After that, I did have her finish my legs  I was there anyways, and wanted to get the job done. She was sharp in her demeanor with me, and never apologetic for her terrorizing me with the brazilian.

The leg job was ok, but I was surprised because the hard wax I have used in the past is completely thorough. This stuff they call hard wax is not, so she had to run over each strip at least three times to get everything. And, of course, in the end didnt. But that, at least, is normal. However, she didnt get all of the wax off so I left with all of these dark blue blotches on my legs, and had to deal with it all when I got home.

Brazilians are for professionals, which Sabrina in my experience is not. Not in her waxing technique or her people skills. Ladies  dont do it to yourselves  steer clear!!! Users/SpringRose

20100308 14:07:42 nbsp I have absolutely no idea what the last person who commented is talking about. I just went to european wax center and had the BEST experience ever.
And I cant believe I almost let the last comment stop me from going.
Ive been getting brazilian waxes for almost 4 years now. Never before have I done hard wax. So granted I was a little nervous. The front staff was super friendly and reassuring and my esthetician Maricela (i hope i spelled her name correctly) was WONDERFUL! I will never get waxed anywhere else again.
The prices are ridiculously affordable. This was another reason I hesitated, I figured for that cheap they cant be that good. But Im glad I at least tried it.
Usually after the the hot wax with the strip, Im red and swollen and sticky! I know it depends on everyones pain tolerance and maybe Im more used to pain since Ive been getting waxed for 4 years, so getting waxed today did hurt but barely anything compared to what Im used to. And lets remember they are ripping hair out of your body so it has to hurt a little. Plus I wasnt left sticky, I wasnt swollen or hurting afterwards. It was great.
Id definitely recommend at least trying it out. They do give you 1/2 off if its your first try which also helped me take that risk of going there. I dont usually leave comments because I never think its worth it but this place is worth it, especially because I read that last comment before going there and I think she was wrong and unfair.
 Users/Aarti

20100518 12:56:15 nbsp This was my very first Brazilian wax EVER! and Sabrina made the entire experience very comfortable. She understood I was nervous and was very friendly and helpful. I 100% recommend this place. I am officially a loyal customer. Users/HoneyB

20100519 19:57:39 nbsp I decided to try this place for a free bikini line wax. The ladies were very professional and very friendly. Jessica was the receptionist and Melissa did the waxing. It was painless and the facility was very clean. The wax they use did not stick to the skin, they made sure to get any strays hairs not removed with waxing. Not pressured to buy a membership.  Users/ElizabethBarthel

20100529 09:54:44 nbsp The staff was friendly and nice; however, the job performed was lacking. I received an eye brow waxing which I had to get redone a week later because my shape was not right and there was a significant amount of growth in a week where as normally I am good for 4 weeks. They also use hard wax which is a body wax and is not recommended  for the face and I had a severe reaction. Ill stick with Benefit in Arden from now on. So much for getting a quick brow wax on a Friday when I am pressed for time.  Users/dimes

20100714 10:55:14 nbsp I just had a full leg wax and this was my first time with the hard wax method. I have been waxing since I was about 10 years old and this was way less painful then the hot wax method. I am middle eastern and have coarse thick leg hair and it worked great for me. No broken or missed hairs. I found the service professional and efficient. I was never asked or told about any membership deals. I was especially pleased at how easily they handled the fact that I am pregnant and therefore unable to lay easily on my back or stomach, Melissa was very accommodating and worked with me to find workable positions to make sure we got every spot on my legs. I am definitely going back. Users/Zeeba

20100727 11:51:11 nbsp I have been here several times, and have never had a bad experience. All of the girls are good but Maricela is great. She explains what she does before she does it so there are no surprises, then gets every hair you want off, and makes it so painless. Very friendly and would recommend.  Users/ChardeIrby

20100814 13:37:24 nbsp I used the Green Machine coupon to get a free bikini wax and it was okay. The women at the front desk seemed annoyed that I wasnt a fully paying customer. The wax was pretty good though also really quick. I realized later in the day that she had removed the very top layer of my skin on one side, which I dont often have happen with waxing. Its not terribly expensive, so I guess you get what you pay for. Users/Ratatat

20100826 12:56:47 nbsp INSIDE the WAXING ROOM:
I highly recommend Maricela for Bikini Waxing. It was my first time getting a bikini wax ever and she was especially friendly and good at calming my nerves. She explained everything about the procedure and left no surprises, which I really appreciated. She also explained to me afterwards how to properly take care of my newly bare skin. I cant believe how relatively painless my first Brazilian wax was! I would definitely come back for Maricela to do other waxing services for me. In terms of service in the waxing room, you get better than you pay for.

I have also had Rachel do a Full Bikini Wax for me. She is very pleasant to talk to and easy to be around, but I felt like she rushed me. She tried removing the wax before it had set in (to the point where I could see the wax still sticking to her wooden stick). I was a bit surprised my Brazilian Bikini Wax was LESS painful than this Full Bikini Wax (which removes less hair than the Brazilian). In addition to that, Rachel didnt do a thorough job removing all the leftover wax so I felt as if my butt was glued together for awhile.  Users/MooMoo28

20100826 12:58:14 nbsp OUTSIDE the WAXING ROOM:
If you want any kind of discount that you are PROMISED as a customer (see their website), COME ALREADY KNOWING about it. They did not tell me about the free wax for first time customers and I felt pretty cheated.

Also, dont expect any sophistication or courtesy from the receptionist. The receptionist I spoke to on the phone, Jackie, knew very little about her own companys online system, didnt even input my information correctly over the phone, and then just kept making excuses about the underdeveloped online booking system, unimplemented platinum rewards system, her computer that keeps freaking out, and the malfunctioning phones at the front desk. (These are just a few of the excuses I can remember off the top of my head.)

Even worse, my friends were in the lobby when I was on the phone and they told me that Jackie had the audacity to talk smack about me to another employee after we hung up! Heres what I found even more suspicious. I tried booking an appointment online but it didnt work, so I called back Jackie and she told me she made my appointment for me around 11 (and sure enough, I checked my account online and it said my appointment was at 11:15am). But when I went in for my appointment, it turns out Jackie had made my appointment for 10:45am. I dont know how my appointment could have changed when I had not touched my account since I made the appointment and Jackie told me specifically over the phone that she had made it for 11, but the kind of service and competence from Jackie the receptionist speaks for itself.

On top of that, the manager, Jessica, in front of my friends approved of the way Jackie handled me as the customer but told me during my appointment that her behavior was inappropriate. Its no wonder the customer service does not improve if the manager does nothing to change it.

If asking questions about promotions that are BLATANTLY advertised on European Wax Centers website is such a crime, and if the manager herself is vague about standards of customer service, I cant say much else about their customer service outside of the waxing room other than their rudeness is uncalled for.  Users/MooMoo28

20101026 11:00:53 nbsp Awful.  Car got towed from the parking spaces behind the building during my wax  my fault, I just didnt see the signs saying they were private.  Asked the receptonist to have the owner contact me, as the cost ($225) to retrieve my car was outrageous and I thought they should know that the firm theyve hired is charging outrageous fees.  She promised a call........never got one.

The wax job was soso.

The membership vibe rubs me the wrong way.  Really cheesey, in my opinion.

SPA CENTRAL is far superior.  Less cheese, more chill.  So, thats my take. Users/browneyedblues

20101211 16:26:37 nbsp I have been here on two different occasions and was fully satisfied both times!
I went to Sabrina the first time for a full bikini and lower leg wax. She was professional and did a good job. But during my second visit I went to Rachel who was easier to talk to and faster/more thorough.  The rooms are clean and the staff is professional and cordial. The free wax special is great and affordable.
I highly recommend this place and will be going back! Users/Tier

20101216 12:50:34 nbsp I just found out that Natalia is no longer working here due to poor ergonomics. I was really disappointed. I bought multiuse passes here after a wonderful experience with her, and now I definitely feel stuck. When I went in yesterday for my appointment, they had moved my 6:15 with Natalia to a 6:30 with Maricela and didnt tell me. It took Maricela much longer than Natalia and the work was, in my opinion, subpar. On the lower legs: When I left, my legs were red, swollen and stinging for over an hour. She left stray hairs all over the place, and this morning I noticed tons of stubble  it looks like many of the hairs were broken off instead of removed. Some areas on my legs are still pink and sore now, 18 hours later. Underarms: Overall not too bad, though I found lots of stray hairs this morning. Without Natalia, this place definitely is not the same!! Users/MeganCleary

20110129 14:14:41 nbsp I went in recently to get my eyebrows waxed and will never know how good the quality of work here is. The reason being very bad customer service. Probably the worst customer service experience Ive ever had. I didnt have an appointment but saw a sign saying that walkins were welcome so I decided to drop by in the early afternoon. Upon walking in, I saw the receptionist and another employee at the front counter. Neither of them greeted me when I walked in. I walked up to the front counter and stood there for about a minute before being addressed by the receptionist. Her first words to me were Hold on one sec, with her finger raised at me and not even looking in my direction. After she finished talking to her coworker about things that Im pretty sure were not related to work, she finally asked me what I needed. I told her I wanted an eyebrow wax and she told me she only had an opening at 1:45 but I was not able to make it because I had work at 2. When I told her this, she told me to come back after work since they do not close until 8. I agreed to this and mentioned that I would not be done from work until 6:30, at which point she told me that her only available appointment that evening would be 5:45. Why would she tell me that I could come back after work because theyre open til 8, yet tell me that she only had one opening at 5:45?? I told her that I would not be able to make it at that time and she commented that they were open the next day so maybe I should try then. I walked out and will never be going back. I cant say that this business does poor quality work because I was not able to experience it, but with that kind of customer service I dont think I would want to anyways. Users/HeartAlong

20110315 20:15:28 nbsp I went to Maricela today, and it was AMAZING. I have never posted anything on Daviswiki, but this was enough to make me create an account and write a comment. I read through these reviews and there was a lot of mixed emotion about this place, so I was really hesitant to try it. But my friend recommended Maricela, and I trusted her, so I went, and it was so great. I got a brazillian, and she was fast, painless, professional, and she made me feel very comfortable. This was the best waxing Ive EVER had. I recommend her a million times. I dont know about the other ladies, but Maricela was so good. Ask for her! And for $19.50 for my first time there, it was even better. I HIGHLY RECOMMEND MARICELA!! Users/TAT

20110411 18:51:23 nbsp I had a bad experience here.  The girl who waxed me was obviously new, and it was more painful than necessary, as well as awkward because she wouldnt talk to me.  I highly recommend Smooth As Silk on D street, shes great. Users/WhitneyMarie

20110606 06:54:41 nbsp The receptionists are kind of rude.. but Ive had Melissa and Maricela for Brazilian waxes and they are great! Users/Lisaaa

20111002 12:45:34 nbsp Have been coming here for 2 years. Have never had a problem with the receptionists. They used to keep promoting the membership, but they stopped after a while. They started promoting their products more instead. You can simply turn them down nicely with a no, thank you and they leave you alone. I dont understand why so many people complain about this. Ive met most of the waxers, and theyve all done a good job. Usually get a brazilian but i did my eyebrows once (which turned out great btw). Only had 1 notsogood brazilian out of the many times ive been here (shed waxed me before and after with no problem, so it was probably just a fluke or a bad day). From what Ive sen there so far, I believe most of their customers are satisfied with their services but just dont write about it here, so people just see the complaints. Their facilities are clean, you get a private room, and the waxing process is not nearly as painful as regular waxing. Dont know what kind of wax it is, but I like it. Users/vk

20111005 13:28:11 nbsp This place is the bomb dot com. I dont understand why anyone would talk negatively about Sabrina. Ive been going to her since they opened and she is by far the most professional person they have there. Youre not there to fall in love, just to get a job done, and thats reflected in the price. Deal! Users/YesItsMe

The ladies here are always super professional and offer wonderful customer service. I came in a few months ago with a free eyebrow wax coupon and the lady who assisted me did a fantastic job. I came back last week to get my eyebrows done again and was impressed. She did them exactly as I asked. The place is very clean and the wax is great less painful than other types that I have tried. I highly recommend it to both men and women.

20120320 14:02:11 nbsp I had a great experience. Front desk staff was friendly, I didnt have to wait, and my wax came out perfect. I had Rachel for Brazilian and I will be back. It was the least painful Brazilian I have had and she got everything without needing to pluck strays. She was also really nice about accommodating me since I am quite pregnant.  Users/Kristin

20120403 10:35:35 nbsp My experience here was great. When it comes to getting my hairs pulled out en masse, Im just not the stoic badass I wish I was; but Jasmin took her time, explained every step, gave me as many breathers as I needed, and still managed to do a thorough and fantastic job. She was patient and personable and responsive.

I went to my appointment a bit defensively, since the other reviewers talk about being barraged with sales pitches for subscriptions or packages. But absolutely nobody pressured me to buy a package or subscription. Nor was I pressured about products. And my firsttime customer discount was added immediately. My appointment was low stress, the results are great, and Ill go back.  Users/spulford

20120511 19:40:13 nbsp Got my first brazilian here!  ANGEL was wonderful, super friendly and communicative about what she was doing. Really knows how to take care of her clients! Users/kg18

20120613 18:30:42 nbsp Today I had a second bad experience with this business. The last time I went I was left with little burn marks on my upper lip. Today, a whole layer of skin on my eyebrow was ripped off and has left me with a large, painful burn. Some of the more established waxers seem to get a lot of raves on here, but be very careful if you get placed with one of the newer girls. Users/ASeward

20120701 17:20:37 nbsp I keep meaning to leave a comment here but always forget to. Of course, the allure of being hairfree down there is what drew me to come to this place  and also, because my friend who was a regular until she moved to Colorado told me that I absolutely must try getting a Brazilian wax. So I did. And it was awesome.

I had Sabrina and shes super easy to talk to. My first time, I was really nervous, and she catered to me and took the whole process slow and was very gentle. After that, I didnt go for a few months due to laziness, but I ended up going back and have been going every month since. ) Its even better that shes a Firefly fan! We get along swell, and shes good at her job. It gets easier and easier the more you go in, too, so if you do plan on getting a Brazilian, try to keep it up! Itll only make it more comfortable for you in the long run.

About the complaints...she traumatized you with a Brazilian? What? Im pretty sure getting waxed is a voluntary procedure...

Also, my friend saw Angel for the first time last month and absolutely loved her as well! Users/HannahFolkes

20121230 21:37:03 nbsp This place is amazing. The front desk staff is amazing and every waxer I have had has been great. I do find it super annoying that their prices are not listed online so I brought home a brochure and this is what I found: Eyebrow 16$, Lip 9$, Bikini Line 28$, Bikini Full 35$, Brazilian 42$, Lower Leg 32$, Full Leg 60$... and they have a great deal for your first time! Free Eyebrow or 50% off Bikini! I go back every month and I even got one of their wax passes! All I had to do was bring my Student ID and I got 4 services for the price of 3! Definitely worth every penny.  Users/AlexLN

20130213 15:19:55 nbsp Im European and the place or the products dont have the European touch at all, except for the name.
Price: reasonable.
What has me go hmm...: Forget having a SPA experience. This is not a SPA. It is a CENTER, and it feels like a factory and a clinic, which seems to be the definition by which Wikipedia also goes by. Dont be late or your appointment is canceled. Depending on time at which you show up, the reception is understaffed, the phone rings all the time and the receptionist (one at that time) is obviously overwhelmed. Fast speech. Out as soon as youre in, which is great cause you dont waste time if thats what youre into. Didnt find the music and surroundings relaxing, but this is a matter of personal taste. Users/DavisSite

20130611 19:17:02 nbsp Alexa and Lindsay are wonderful. So friendly and very gentle.  Users/AmandaC

max_stars_repo_name: voflo/Search

max_issues_repo_name: voflo/Search

max_forks_repo_name: voflo/Search


text:
Avalon Apartments has a mix of 3 and 4 bedroom townhomes with big, bright windows and expansive floor plans.  Just a short walk from each unit is the W Bus Line W bus stop, M Bus Line M bus stop on Cowell Blvd. and the Oakshade Town Center Oakshade shopping center providing quick access to school and shopping. The community facilities include a pool, spa, fitness room, billiards table and a kitchen. Residents are also allowed to rent out the community building to hold study sessions and small gatherings.

To learn more about rental housing in Davis, check out our Housing Guide as well as our Apartments pages.

Avalon Apartments has the same management as Sorrento Apartments and Brisa Villas in South Davis.

 2014/2015 Rental Information

3 Bedrooms: Starting at $2200
4 Bedrooms: Starting at $2710

Pictures

  /Pre 2009 Pre 2009  Reviews before the 2009 property management company change

20090505 15:00:31 nbsp I shared with 2 other people (3 total) in the largest room and we fit very comfortably. Wasnt cramped at all! It was $295/person in that room so I didnt think it was too expensive, however if you look at the bigger picture you can probably find somewhere cheaper.

On the other hand, it IS expensive for a reason. The complex is really beautiful and the maintenance is GREAT. They attend VERY prompt when you have problems and the yard work is very well taken care of.

I did however run into numerous problems while living here though..
The smoke alarms are INSANE! They go off even when were not even cooking in the kitchen! We called maintenance to fix the problem, but they told us that thats how their smoke alarms are and that theyre just sensitive to the gas thats on the stove. Sometimes the smoke alarm would even go off in the middle of the night.

One of our toilets didnt flush very well so maintenance had to come and fix our toilet at LEAST 20 times Im not even exaggerating. It kept on clogging up. One time they told us not to throw anything in there not even toilet paper.

In the beginning of the year we had a cockroach problem, but after a few traps they went away.

Other than these 3 major problems, I enjoyed living here. Users/Joe21

20100331 00:20:53 nbsp This place is overpriced and cheaply built on the inside. Also, they will hit you hard for the security deposit. Trust me, I know from experience, do not live here. Users/tneeley

          Avalon may not be inexpensive but interior finishes are certainly not cheap. The cabinets, for one example, are each custom made and have
          upgraded laminate doors.

          I am sorry you feel the security deposit process hit you hard. You do not give enough information for me to specifically comment on your concerns
          but mistakes do happen so, please, contact me at sorrentoapartments@gmail.com and I will review the charges and credits and discuss them with you.

           Jacqueline Mestaz
        Management

20100912 03:35:48 nbsp i moved into Avalon recently for fall. The environment and exterior is really nice and its really green. However, I find the interior to be little bit disappointing for the price we pay. it seems to be little outdated now. I lived in The Drake in the summer and the interior there feels new and clean. Here at avalon i can see stains on the blinds and in the kitchen. however the paint is new. In addition, I find the units to be really not soundproof, I can hear people talking across another unit at night. Maybe its just the beginning of the year, but the repair and maintenance is really slow, like it has been a week now. I find there to be lots of bugs everywhere coming in or around the house. and there is some strange scent present in the house that seems to be related to the trees and grass around the unit, maybe the AC intake? It does have the nicest environment and the pool seems to be one of the best among all apartments.  Users/MatthewLaw

20100912 03:44:12 nbsp oh and Baker from the office is really nice even though the response is slow for maintenance. It would really be nice if the apartment have security patrol like other apartment complexs because avalon at night seems to be empty and especially after the recent community center robbery where several people were held at gun point.  Users/MatthewLaw

           Thank you for the positive comments especially about the office staff. I do not know which house you are in so please give me a call or email and I will come over with maintenance staff because we want it new and clean without delay just like you do.

           Regarding noise, you have at most one common wall and it is built to a STC rating of 50 (very quiet) so I would like to learn more about the problem when I come over with maintenance.

           Thank you for your security comments. We are constantly looking to improve security. Last year we hosted a Crime Prevention Workshop with the Davis Police. They explained that the crime statistics for the area were low and that the best crime prevention is neighbors paying attention. We are scheduling another Workshop this Fall and will explore your suggestion.

           Finally on bugs. Bugs are just part of the environment in Davis, but if any of your screens are off let me know so I can get those fixed immediately. We also have weekly pest control service and we will treat specific areas of your apartment if you show me the problem.

           Thanks again for your comment and suggestions we are always trying to improve. Please contact me.

           Steven Baker
           Community Manager

20110124 12:37:42 nbsp these apartments are fancy but expensive...  Users/tneeley

20110131 19:57:32 nbsp How much is the rent for a 3 bedroom unit? 4 bedroom unit? Users/btorres

20110812 19:57:38 nbsp I live in avalon, the thing that pisses me off about avalon is the slowwww bug service. I called about 5 times before about cochroaches in my room and they told me theyd come spray on friday, but they kept on forgetting. Even I forgot about the problem until today when I switched on the light and saw a big roach scrurry under my backpack. The funny thing is i was listening to papa roach at the same time. The great thing about avalon is the maintenence man, I dont know his name but hes great and fast. So advice is dont live on the first floor cuz too many bugs. Users/mikic0

 Mikic0, I am terribly sorry for the slow response. If you are still a tenant with us, please send me an email at sorrentoapartments@gmail.com and I will get in contact with you about the problem. We recently switched services so that may have been a factor in the issues, but regardless of the reasons, Im sorry youve had to wait so long for a response. Thomas, Community Manager


text: BikeDavis.info is a locally owned websites locally oriented website created by Davis Bicycles! to serve the Davis community by providing a public forum for news and discussion on bicycle related topics in Davis.