Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
documentation:language_reference:objects:responsefunction:functions:new [2024/12/17 16:20] – created Maurits W. Haverkort | documentation:language_reference:objects:responsefunction:functions:new [2024/12/22 21:00] (current) – Maurits W. Haverkort | ||
---|---|---|---|
Line 3: | Line 3: | ||
### | ### | ||
- | alligned paragraph text | + | ResponseFunction.New(Table) creates a new response function object according to the values in Table. Response functions can be of 4 different types (ListOfPoles, |
### | ### | ||
- | ===== Example | + | ===== ListOfPoles representation |
### | ### | ||
- | description text | + | Response functions stored as list of poles are defined via |
+ | $$ G(\omega, | ||
### | ### | ||
- | ==== Input ==== | + | ==== Single valued functions ==== |
+ | <code Quanty Example.Quanty> | ||
+ | a = {10, -1,-0.5, 0, | ||
+ | b = { 0.1, 0.1, 0.1, 0.1, 0.2, 0.3} | ||
+ | G = ResponseFunction.New( {a, | ||
+ | print(" | ||
+ | print(G) | ||
+ | omega = 1.1 | ||
+ | Gamma = 0.001 | ||
+ | print() | ||
+ | print(" | ||
+ | </ | ||
+ | Generates the output | ||
+ | <file Quanty_Output> | ||
+ | The resposne function definition is | ||
+ | { { 10 , -1 , -0.5 , 0 , 0.5 , 1 , 1.5 } , | ||
+ | { 0.1 , 0.1 , 0.1 , 0.1 , 0.2 , 0.3 } , | ||
+ | name = A , | ||
+ | type = ListOfPoles , | ||
+ | mu = 0 } | ||
+ | |||
+ | Evaluated at omega = 1.1 and Gamma = 0.001 yields (11.617645834991 - 0.011148328755289 I) | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Matrix valued functions ==== | ||
+ | <code Quanty Example.Quanty> | ||
+ | A0 = Matrix.New( {{0, | ||
+ | a1 = -1 | ||
+ | a2 = 1/2 | ||
+ | a3 = 1 | ||
+ | B1s = Matrix.New( {{1, | ||
+ | B1 = B1s * B1s | ||
+ | B2s = Matrix.New( {{2, | ||
+ | B2 = B2s * B2s | ||
+ | B3s = Matrix.New( {{3, | ||
+ | B3 = B3s * B3s | ||
+ | G = ResponseFunction.New( { {A0, | ||
+ | print(" | ||
+ | print(G) | ||
+ | omega = 1.1 | ||
+ | Gamma = 0.001 | ||
+ | print() | ||
+ | print(" | ||
+ | print(G(omega, | ||
+ | </ | ||
+ | |||
+ | Generates the output | ||
+ | <file Quanty_Output> | ||
+ | { { { { 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 0 } } , -1 , 0.5 , 1 } , | ||
+ | { { { 11 , 24 , 36 } , | ||
+ | { 24 , 62 , 87 } , | ||
+ | { 36 , 87 , 126 } } , | ||
+ | { { 13 , 18 , 33 } , | ||
+ | { 18 , 61 , 84 } , | ||
+ | { 33 , 84 , 126 } } , | ||
+ | { { 18 , 18 , 36 } , | ||
+ | { 18 , 61 , 84 } , | ||
+ | { 36 , 84 , 126 } } } , | ||
+ | type = ListOfPoles , | ||
+ | name = ML , | ||
+ | mu = 0 } | ||
+ | |||
+ | Evaluated at omega = 1.1 and Gamma = 0.001 yields | ||
+ | { { (206.90024667403 - 0.91928020904165 I) , (221.42405005987 - 0.9276985714825 I) , (432.13381820162 - 1.8498699350513 I) } , | ||
+ | { (221.42405005987 - 0.9276985714825 I) , (741.17515429623 - 3.1416753933531 I) , (1021.4074723828 - 4.3264255332922 I) } , | ||
+ | { (432.13381820162 - 1.8498699350513 I) , (1021.4074723828 - 4.3264255332922 I) , (1529.9683515529 - 6.4891280958856 I) } } | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== Tridiagonal representation ===== | ||
+ | |||
+ | ### | ||
+ | Response functions stored in tridiagonal format are defined via | ||
+ | $$ G(\omega, | ||
+ | ### | ||
+ | |||
+ | ==== Single valued functions ==== | ||
+ | <code Quanty Example.Quanty> | ||
+ | a = {0, 1, | ||
+ | b = { 1, 0.5, 0.5, 0.5, 0.5, 0.5} | ||
+ | G = ResponseFunction.New( {a, | ||
+ | print(" | ||
+ | print(G) | ||
+ | omega = 1.1 | ||
+ | Gamma = 0.001 | ||
+ | print() | ||
+ | print(" | ||
+ | print(G(omega, | ||
+ | </ | ||
+ | Generates the output | ||
+ | <file Quanty_Output> | ||
+ | { { 0 , 1 , 1 , 1 , 1 , 1 , 1 } , | ||
+ | { 1 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 } , | ||
+ | name = GT , | ||
+ | type = Tri , | ||
+ | mu = 0 } | ||
+ | |||
+ | Evaluated at omega = 1.1 and Gamma = 0.001 yields | ||
+ | (-1.4800882525182 - 0.010904814637879 I) | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Matrix valued functions ==== | ||
+ | <code Quanty Example.Quanty> | ||
+ | A0 = Matrix.New( {{0, | ||
+ | A1 = Matrix.New( {{1, | ||
+ | A2 = Matrix.New( {{2, | ||
+ | A3 = Matrix.New( {{3, | ||
+ | B0s = Matrix.New( {{1, | ||
+ | B0 = B0s * B0s | ||
+ | B1s = Matrix.New( {{1, | ||
+ | B1 = B1s * B1s | ||
+ | B2s = Matrix.New( {{2, | ||
+ | B2 = B2s * B2s | ||
+ | B3s = Matrix.New( {{3, | ||
+ | B3 = B3s * B3s | ||
+ | G = ResponseFunction.New( { {A0, | ||
+ | print(" | ||
+ | print(G) | ||
+ | omega = 1.1 | ||
+ | Gamma = 0.001 | ||
+ | print() | ||
+ | print(" | ||
+ | print(G(omega, | ||
+ | </ | ||
+ | |||
+ | Generates the output | ||
+ | <file Quanty_Output> | ||
+ | { { { { 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 0 } } , | ||
+ | { { 1 , 2 , 3 } , | ||
+ | { 2 , 5 , 6 } , | ||
+ | { 3 , 6 , 9 } } , | ||
+ | { { 2 , 2 , 3 } , | ||
+ | { 2 , 5 , 6 } , | ||
+ | { 3 , 6 , 9 } } , | ||
+ | { { 3 , 2 , 3 } , | ||
+ | { 2 , 5 , 6 } , | ||
+ | { 3 , 6 , 9 } } } , | ||
+ | { { { 1 , 0 , 0 } , | ||
+ | { 0 , 1 , 0 } , | ||
+ | { 0 , 0 , 1 } } , | ||
+ | { { 11 , 24 , 36 } , | ||
+ | { 24 , 62 , 87 } , | ||
+ | { 36 , 87 , 126 } } , | ||
+ | { { 13 , 18 , 33 } , | ||
+ | { 18 , 61 , 84 } , | ||
+ | { 33 , 84 , 126 } } } , | ||
+ | type = Tri , | ||
+ | mu = 0 , | ||
+ | BlockSize = { 3 , 3 , 3 , 3 } , | ||
+ | name = MT } | ||
+ | |||
+ | Evaluated at omega = 1.1 and Gamma = 0.001 yields | ||
+ | { { (0.82041346528466 - 0.0005287731551253 I) , (-0.10773626514221 + 0.00047135055668369 I) , (-0.18782055050369 - 0.00021908813997981 I) } , | ||
+ | { (-0.10773626514222 + 0.00047135055668371 I) , (0.9906660606812 - 0.0018715007457328 I) , (-0.67958409204703 + 0.0013049040629232 I) } , | ||
+ | { (-0.18782055050369 - 0.00021908813997982 I) , (-0.67958409204703 + 0.0013049040629232 I) , (0.51775011277794 - 0.00095267059250443 I) } } | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Anderson representation ===== | ||
+ | |||
+ | ### | ||
+ | Response functions stored in Anderson format are defined via | ||
+ | $$ G(\omega, | ||
+ | ### | ||
+ | |||
+ | ==== Single valued functions ==== | ||
+ | <code Quanty Example.Quanty> | ||
+ | a = {0, 1, 1.5, 2, 2.5, 3, 3.5} | ||
+ | b = { 1, 0.5, 0.5, 0.5, 0.5, 0.5} | ||
+ | G = ResponseFunction.New( {a, | ||
+ | print(" | ||
+ | print(G) | ||
+ | omega = 1.1 | ||
+ | Gamma = 0.001 | ||
+ | print() | ||
+ | print(" | ||
+ | print(G(omega, | ||
+ | </ | ||
+ | Generates the output | ||
+ | <file Quanty_Output> | ||
+ | The resposne function definition is | ||
+ | { { 0 , 1 , 1.5 , 2 , 2.5 , 3 , 3.5 } , | ||
+ | { 1 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 } , | ||
+ | type = And , | ||
+ | name = GA , | ||
+ | mu = 0 } | ||
+ | |||
+ | Evaluated at omega = 1.1 and Gamma = 0.001 yields | ||
+ | (0.70566877797716 - 0.00077467678957667 I) | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Matrix valued functions ==== | ||
+ | <code Quanty Example.Quanty> | ||
+ | A0 = Matrix.New( {{0, | ||
+ | A1 = Matrix.New( {{1, | ||
+ | A2 = Matrix.New( {{2, | ||
+ | A3 = Matrix.New( {{3, | ||
+ | B0s = Matrix.New( {{1, | ||
+ | B0 = B0s * B0s | ||
+ | B1s = Matrix.New( {{1, | ||
+ | B1 = B1s * B1s | ||
+ | B2s = Matrix.New( {{2, | ||
+ | B2 = B2s * B2s | ||
+ | B3s = Matrix.New( {{3, | ||
+ | B3 = B3s * B3s | ||
+ | G = ResponseFunction.New( { {A0, | ||
+ | print(" | ||
+ | print(G) | ||
+ | omega = 1.1 | ||
+ | Gamma = 0.001 | ||
+ | print() | ||
+ | print(" | ||
+ | print(G(omega, | ||
+ | </ | ||
+ | |||
+ | Generates the output | ||
+ | <file Quanty_Output> | ||
+ | { { { { 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 0 } , | ||
+ | { 0 , 0 , 0 } } , | ||
+ | { { 1 , 2 , 3 } , | ||
+ | { 2 , 5 , 6 } , | ||
+ | { 3 , 6 , 9 } } , | ||
+ | { { 2 , 2 , 3 } , | ||
+ | { 2 , 5 , 6 } , | ||
+ | { 3 , 6 , 9 } } , | ||
+ | { { 3 , 2 , 3 } , | ||
+ | { 2 , 5 , 6 } , | ||
+ | { 3 , 6 , 9 } } } , | ||
+ | { { { 1 , 0 , 0 } , | ||
+ | { 0 , 1 , 0 } , | ||
+ | { 0 , 0 , 1 } } , | ||
+ | { { 11 , 24 , 36 } , | ||
+ | { 24 , 62 , 87 } , | ||
+ | { 36 , 87 , 126 } } , | ||
+ | { { 13 , 18 , 33 } , | ||
+ | { 18 , 61 , 84 } , | ||
+ | { 33 , 84 , 126 } } } , | ||
+ | mu = 0 , | ||
+ | name = MA , | ||
+ | type = And } | ||
+ | |||
+ | Evaluated at omega = 1.1 and Gamma = 0.001 yields | ||
+ | { { (0.079202023515427 - 0.00018271816123949 I) , (0.019672301598063 - 0.00021050428128743 I) , (-0.033329362936266 + 0.00019529208541705 I) } , | ||
+ | { (0.019672301598062 - 0.00021050428128743 I) , (-0.028178571653589 - 0.00029307470840254 I) , (0.014801870346139 + 0.00026254621032145 I) } , | ||
+ | { (-0.033329362936266 + 0.00019529208541705 I) , (0.014801870346139 + 0.00026254621032145 I) , (-0.0017775335507766 - 0.00023672956892774 I) } } | ||
+ | </ | ||
+ | |||
+ | ===== Natural impurity orbital representation ===== | ||
+ | |||
+ | ### | ||
+ | Response functions stored in Natural impurity format are defined via | ||
+ | $$ G(\omega, | ||
+ | ### | ||
+ | |||
+ | ==== Single valued functions ==== | ||
+ | <code Quanty Example.Quanty> | ||
+ | acon = {0, | ||
+ | bcon = { | ||
+ | Gcon = ResponseFunction.New( | ||
+ | aval = {0, -1, -1, -2, -1, -1, -1} | ||
+ | bval = { | ||
+ | Gval = ResponseFunction.New( {aval, | ||
+ | a0=0 | ||
+ | b0=1 | ||
+ | G = ResponseFunction.New( {{a0, | ||
+ | print(" | ||
+ | print(G) | ||
+ | omega = 1.1 | ||
+ | Gamma = 0.001 | ||
+ | print() | ||
+ | print(" | ||
+ | print(G(omega, | ||
+ | </ | ||
+ | Generates the output | ||
+ | <file Quanty_Output> | ||
+ | The resposne function definition is | ||
+ | { { 0 , 1 } , | ||
+ | type = NaturalImpurityOrbital , | ||
+ | name = GD , | ||
+ | mu = 0 , | ||
+ | con = { { 0 , 1 , 1 , 1 , 1 , 1 , 1 } , | ||
+ | { 0.70710678118655 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 } , | ||
+ | mu = 0 , | ||
+ | type = Tri , | ||
+ | name = Matrix } , | ||
+ | epsilon = 0 , | ||
+ | val = { { 0 , -1 , -1 , -2 , -1 , -1 , -1 } , | ||
+ | { 0.70710678118655 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 } , | ||
+ | mu = 0 , | ||
+ | type = Tri , | ||
+ | name = Matrix } } | ||
+ | |||
+ | Evaluated at omega = 1.1 and Gamma = 0.001 yields | ||
+ | (-0.48700605787262 - 0.0055204934115643 I) | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Matrix valued functions | ||
<code Quanty Example.Quanty> | <code Quanty Example.Quanty> | ||
-- some example code | -- some example code | ||
</ | </ | ||
- | ==== Result ==== | + | Generates the output |
<file Quanty_Output> | <file Quanty_Output> | ||
text produced as output | text produced as output |