Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • wslda wslda
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • wtools
  • wsldawslda
  • Wiki
  • Logger

Last edited by Gabriel Wlazłowski Dec 28, 2023
Page history
This is an old version of this page. You can view the most recent version or browse the history.

Logger

For reporting basic quantities (like particle number, energy, etc) W-SLDA code used wlog file. It is txt file produced by function int logger( ) from logger.h file. This file can be modified by the user depending on a specifics of a given problem.

Example

In addition to defined by default variables, the user needs to print out variable:

\Delta_{\textrm{avg}}(t) = \dfrac{\int |\Delta(\bm{r},t)|(n_a(\bm{r},t)+n_b(\bm{r},t))\,d\bm{r}}{\int (n_a(\bm{r},t)+n_b(\bm{r},t))\,d\bm{r}}

which is (weighted) average value of delta. This can be done by adding to logger(..):

int ixyz;
int lNXYZ = h_potentials.blocklength;
double delta_avg=0.0, Ntot = 0.0; 
for(ixyz=0; ixyz<lNXYZ; ixyz++) delta_avg+=cabs(h_potentials.delta[ixyz])*(h_densities.rho_a[ixyz]+h_densities.rho_b[ixyz]);
for(ixyz=0; ixyz<lNXYZ; ixyz++) Ntot+=h_densities.rho_a[ixyz]+h_densities.rho_b[ixyz];
delta_avg /= Ntot;

and supplementing printf statement appropriate entry, like:

    // add entry
    fprintf(log, "%6d %18.10g %18.10g 
                %18.10g %18.10g %18.10g 
                %18.10g %18.10g %18.10g 
                %18.10g %18.10g %18.10g 
                %18.10g %18.10g %18.10g 
                %18.10g %18.10g %18.10g %10.2f %20s\n",
                                 //  <-- HERE
        it, // 1
        npart[SPINA], // 2
        npart[SPINB], // 3
        npart[SPINA]+npart[SPINB], // 4
        E_tot/Effg, // 5
        energy[EKIN]/Effg, // 6
        energy[EPOT]/Effg, // 7
        energy[EPAIR]/Effg, // 8
        energy[ECURRENT]/Effg, // 9
        energy[EPOTEXT]/Effg, //10
        energy[EPAIREXT]/Effg, //11
        energy[EVELEXT]/Effg, //12
        mu[SPINA]/eF, //13
        mu[SPINB]/eF, //14
        kF, // 15
        eF, // 16
        Effg, // 17
        delta_avg, // 18 <-- HERE
        logger_get_time_from_last_entry(), //19
        buffer
    );
Clone repository
  • API version
  • Automatic interpolations
  • Auxiliary tools
  • Browsing the code
  • Broyden algorithm
  • C and CUDA
  • Campaign of calculations
  • Checking correctness of settings
  • Chemical potentials control
  • Code & Results quality
  • Common failures of static codes
  • Common failures of time dependent codes
  • Computation domain
  • Configuring GPU machine
  • Constraining densities and potentials
View All Pages