twodof

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsErrorM

func AbsErrorM(env *Environment, Ds *HoppingEV, variables []string, p, alpha int) solve.Diffable

Return the absolute error and gradient of the M_{p, alpha} equation w.r.t. the given variables.

func AbsErrorMu

func AbsErrorMu(env *Environment, variables []string) solve.Diffable

Return the absolute error and gradient of the Mu equation w.r.t. the given variables (which should be fixed to ["M", "W", "Mu"] for this case).

func AbsErrorW

func AbsErrorW(env *Environment, Ds *HoppingEV, variables []string, p, alpha int) solve.Diffable

Return the absolute error and gradient of the W_{p, alpha} equation w.r.t. the given variables.

func ElHamiltonian

func ElHamiltonian(env *Environment, k vec.Vector, H *cmatrix.CMatrixGSL)

Calculate 4x4 electronic Hamiltonian. k is in the Cartesian basis, with each component scaled by the corresponding lattice constant; i.e. k = (a kx, a ky, c kz) and a kx, a ky, c kz range over [-pi, pi) and periodic copies of this interval.

func EpsilonAE

func EpsilonAE(env *Environment, k vec.Vector) complex128

Cubic axes, even symmetry (k, p; k, p)

func EpsilonAO

func EpsilonAO(env *Environment, k vec.Vector) complex128

Cubic axes, odd symmetry (k, p; k+Q, p)

func EpsilonBE

func EpsilonBE(env *Environment, k vec.Vector) complex128

Body diagonal, even symmetry (k, p; k, pbar)

func GetEV_K0_KQ0

func GetEV_K0_KQ0(env *Environment, k vec.Vector, H *cmatrix.CMatrixGSL, work *cmatrix.HermWorkGSL, evals *cmatrix.VectorGSL, evecs *cmatrix.CMatrixGSL) complex128

Evaluate <c^{\dagger}_{k,0} c_{k+Q,0}>.

func MWMuSolve

func MWMuSolve(env *Environment, Ds *HoppingEV, epsAbs, epsRel float64, m01_0, m11_0, m02_0, m12_0 bool) (vec.Vector, error)

func MWMuSystem

func MWMuSystem(env *Environment, Ds *HoppingEV, m01_0, m11_0, m02_0, m12_0 bool) (solve.DiffSystem, []float64)

func MWSolve

func MWSolve(env *Environment, Ds *HoppingEV, epsAbs, epsRel float64, m01_0, m11_0, m02_0, m12_0 bool) (vec.Vector, error)

func MWSystem

func MWSystem(env *Environment, Ds *HoppingEV, m01_0, m11_0, m02_0, m12_0 bool) (solve.DiffSystem, []float64)

Types

type Environment

type Environment struct {
	// Size of k mesh.
	BZPointsPerDim int

	// Order parameter <S_{p,alpha}>.
	M01, M11, M02, M12 float64
	// Order parameter <S^2_{p,alpha}>.
	W01, W11, W02, W12 float64
	// Inverse temperature, 1 / (k_B * T).
	Beta float64

	// One-spin term for BEG model: coefficient for (S_i)^2.
	Bxy0, Bzz0, Bxz0 float64
	// Exchange parameters for BEG model: coefficients to S_i dot S_j.
	// Jb is excluded since it does not contribute to results.
	Jb0, Jc0 float64
	// Quartic contribution corresponding to Jb term.
	Kb0 float64
	// Quartic contributions along dimers.
	Kcxx0, Kczz0, Kcxz0 float64
	// Poisson's ratio (approx 0.3 for VO2)
	Poisson float64
	// Scaling factor for [110] strain:
	// Bxy_02 *= (1 - Fac_xy)
	// Bxy_11 *= (1 + Poisson*Fac_xy)
	// Bzz *= (1 + Poisson*Fac_xy)
	Fac_xy float64

	// Hopping along c axis. TODO - strain dependence.
	Tce, Tco float64
	// Hopping along body diagonal.
	Tbe float64
	// Electron chemical potential.
	Mu float64
	// Only do ionic part of calculation (all electronic quantities --> 0)
	IonsOnly bool
}

Contains parameters necessary to characterize electronic and ionic systems. The ionic order parameters M and W and the electronic chemical potential Mu must be determined self-consistently.

func LoadEnv

func LoadEnv(envFilePath string) (*Environment, error)

Load an Environment from the JSON file at envFilePath.

func LoadIonEnv

func LoadIonEnv(envFilePath string) (*Environment, error)

Load an Environment from the JSON file at envFilePath. Set all electronic parameters to 0 to restrict to ionic system.

func NewEnvironment

func NewEnvironment(jsonData string) (*Environment, error)

Create an Environment from the given serialized data.

func (*Environment) Bxy

func (env *Environment) Bxy() float64

func (*Environment) Bxz

func (env *Environment) Bxz() float64

func (*Environment) Bzz

func (env *Environment) Bzz() float64

func (*Environment) EConst_Ion

func (env *Environment) EConst_Ion() float64

Constant part of the ionic Hamiltonian (no S dependence).

func (*Environment) EConst_IonEl

func (env *Environment) EConst_IonEl(Ds *HoppingEV) float64

Constant part of the electron-ion Hamiltonian.

func (*Environment) Fermi

func (env *Environment) Fermi(energy float64) float64

Fermi distribution function.

func (*Environment) FiniteHoppings

func (env *Environment) FiniteHoppings() bool

Are electronic hopping finite? If not, don't need to calculate D's.

func (*Environment) FreeEnergy

func (env *Environment) FreeEnergy(Ds *HoppingEV) float64

Free energy per cell value (Ncell = 2Nsite). Points on the phase diagram include the state with minimum free energy (may not reach this state, depending on initial conditions - need to consider a set of initial conditions and look for minimum).

func (*Environment) FreeEnergyElectrons

func (env *Environment) FreeEnergyElectrons() float64

func (*Environment) FreeEnergyIons

func (env *Environment) FreeEnergyIons(Ds *HoppingEV) float64

func (*Environment) GetFloat

func (env *Environment) GetFloat(var_name string) float64

Return the value of the env variable with type float64 with the given name.

func (*Environment) H_Ion

func (env *Environment) H_Ion(S []int, Ds *HoppingEV) float64

Single-site ionic Hamiltonian (local and ion-ion parts). S = [S01, S11, S02, S12].

func (*Environment) Jb

func (env *Environment) Jb() float64

func (*Environment) Jc

func (env *Environment) Jc() float64

func (*Environment) Kb

func (env *Environment) Kb() float64

func (*Environment) Kcxx

func (env *Environment) Kcxx() float64

func (*Environment) Kcxz

func (env *Environment) Kcxz() float64

func (*Environment) Kczz

func (env *Environment) Kczz() float64

func (*Environment) Marshal

func (env *Environment) Marshal() string

func (*Environment) Mpa

func (env *Environment) Mpa(p, alpha int, Ds *HoppingEV) float64

func (*Environment) Set

func (env *Environment) Set(v vec.Vector, vars []string)

Iterate through v and vars simultaneously. vars specifies the names of fields to change in env (they are set to the values given in v). Panics if vars specifies a field not contained in env (or a field of non-float type).

func (*Environment) String

func (env *Environment) String() string

Convert to string by marshalling to JSON

func (*Environment) Wpa

func (env *Environment) Wpa(p, alpha int, Ds *HoppingEV) float64

func (*Environment) Z1

func (env *Environment) Z1(Ds *HoppingEV) float64

type FinalEnvironment

type FinalEnvironment struct {
	Environment
	Dco        float64
	FreeEnergy float64
}

Environment with all self-consistent values converged. Includes additional data for exporting to outside programs.

func NewFinalEnvironment

func NewFinalEnvironment(env *Environment, Ds *HoppingEV) *FinalEnvironment

Create a FinalEnvironment from the given solved Environment and associated HoppingEV.

func (*FinalEnvironment) Marshal

func (env *FinalEnvironment) Marshal() string

func (*FinalEnvironment) String

func (env *FinalEnvironment) String() string

type HoppingEV

type HoppingEV struct {
	// contains filtered or unexported fields
}

func NewHoppingEV

func NewHoppingEV() *HoppingEV

func (*HoppingEV) Dco

func (Ds *HoppingEV) Dco(env *Environment) float64

func (*HoppingEV) MarshalEnv

func (Ds *HoppingEV) MarshalEnv(env *Environment) string

func (*HoppingEV) StringEnv

func (Ds *HoppingEV) StringEnv(env *Environment) string

Convert to string by marshalling to JSON. Leave out internal cache data.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL