|
# Custom parameters
|
|
# Custom parameters
|
|
|
|
|
|
The W-SLDA toolkit provides a framework for creating flexible parametrization of formulas. List of numbers (of double type) that can be passed from an input file to the code is called *custom parameters*. In the input file they start with tag:
|
|
The W-SLDA toolkit provides a framework for creating flexible parametrization of formulas. The list of numbers (of double type) that can be passed from an input file to the code is called *custom parameters*. In the input file they start with the tag:
|
|
```bash
|
|
```bash
|
|
# Custom parameters
|
|
# Custom parameters
|
|
params0 0.0 # value of the parameter
|
|
params0 0.0 # value of the parameter
|
|
params1 1.0 # value of the parameter
|
|
params1 1.0 # value of the parameter
|
|
params2 2.0 # value of the parameter
|
|
params2 2.0 # value of the parameter
|
|
# ... and so on ...
|
|
# ... and so on ...
|
|
|
|
# ... if you need pass string parameter...
|
|
|
|
strings0 aaa
|
|
|
|
strings1 bbb
|
|
```
|
|
```
|
|
Maximal number of parameters is specified in `predefines.h` by macro-variable:
|
|
Maximal number of parameters is specified in `predefines.h` by macro-variable:
|
|
```c
|
|
```c
|
... | @@ -33,7 +36,7 @@ During the self-iteration process, before `params` array is passed to user-defin |
... | @@ -33,7 +36,7 @@ During the self-iteration process, before `params` array is passed to user-defin |
|
* @param params array of size MAX_USER_PARAMS with parameters from input file.
|
|
* @param params array of size MAX_USER_PARAMS with parameters from input file.
|
|
* @param kF typical Fermi momentum scale of the problem.
|
|
* @param kF typical Fermi momentum scale of the problem.
|
|
* kF=referencekF if the referencekF tag is indicated in the input file,
|
|
* kF=referencekF if the referencekF tag is indicated in the input file,
|
|
* otherwise to kF value is assigned according formula kF=(3*pi^2*n)^{1/3}, where n corresponds to maximal density.
|
|
* otherwise to kF value is assigned according to formula kF=(3*pi^2*n)^{1/3}, where n corresponds to maximal density.
|
|
* You can also set kF at request in this function using (*kF)=myvalue;
|
|
* You can also set kF at request in this function using (*kF)=myvalue;
|
|
* @param mu array with chemical potentials: mu[SPINA] and mu[SPINB].
|
|
* @param mu array with chemical potentials: mu[SPINA] and mu[SPINB].
|
|
* @param extra_data_size size of extra_data in bytes, if extra_data size=0 the optional data is not uploaded
|
|
* @param extra_data_size size of extra_data in bytes, if extra_data size=0 the optional data is not uploaded
|
... | @@ -86,6 +89,9 @@ and |
... | @@ -86,6 +89,9 @@ and |
|
* */
|
|
* */
|
|
int load_extra_data(size_t size, void *extra_data, double *params)
|
|
int load_extra_data(size_t size, void *extra_data, double *params)
|
|
{
|
|
{
|
|
|
|
// ... for example
|
|
|
|
// FILE *f=fopen(input->strings[0], "r");
|
|
|
|
// ...
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
```
|
|
```
|
... | | ... | |