ASCOT5
Loading...
Searching...
No Matches
Enumerations | Functions
endcond.h File Reference

Header file for endcond.c. More...

#include "particle.h"
#include "simulate.h"

Go to the source code of this file.

Enumerations

enum  ENDCOND_FLAG {
  endcond_tlim = 0x1 , endcond_emin = 0x2 , endcond_therm = 0x4 , endcond_wall = 0x8 ,
  endcond_rhomin = 0x10 , endcond_rhomax = 0x20 , endcond_polmax = 0x40 , endcond_tormax = 0x80 ,
  endcond_cpumax = 0x100 , endcond_hybrid = 0x200 , endcond_neutr = 0x400 , endcond_ioniz = 0x800
}
 Marker end condition bit masks. More...
 

Functions

void endcond_check_gc (particle_simd_gc *p_f, particle_simd_gc *p_i, sim_data *sim)
 Check end conditions for GC markers.
 
void endcond_check_fo (particle_simd_fo *p_f, particle_simd_fo *p_i, sim_data *sim)
 Check end conditions for FO markers.
 
void endcond_check_ml (particle_simd_ml *p_f, particle_simd_ml *p_i, sim_data *sim)
 Check end conditions for ML markers.
 
void endcond_parse (int endcond, int *endconds)
 Split endcond to an array of end conditions.
 
void endcond_parse2str (int endcond, char *str)
 Represent end condition in human-readable format.
 

Detailed Description

Header file for endcond.c.

Contains a list declaring all end conditions.

Definition in file endcond.h.

Enumeration Type Documentation

◆ ENDCOND_FLAG

Marker end condition bit masks.

These bit masks are used to mark specific end condition as being active.

Enumerator
endcond_tlim 

Simulation time limit

endcond_emin 

Minimum energy

endcond_therm 

Thermalized

endcond_wall 

Wall collision

endcond_rhomin 

Minimum rho

endcond_rhomax 

Maximum rho

endcond_polmax 

Poloidal limit

endcond_tormax 

Toroidal limit

endcond_cpumax 

Wall time exceeded

endcond_hybrid 

Hybrid mode condition

endcond_neutr 

Neutralized

endcond_ioniz 

Ionized

Definition at line 18 of file endcond.h.

Function Documentation

◆ endcond_check_gc()

void endcond_check_gc ( particle_simd_gc * p_f,
particle_simd_gc * p_i,
sim_data * sim )

Check end conditions for GC markers.

The end conditions are checked for all markers within the SIMD marker struct.

Parameters
p_fpointer to SIMD struct storing marker states at the end of current time-step
p_ipointer to SIMD struct storing marker states at the beginning of current time-step
simpointer to simulation data struct

Definition at line 262 of file endcond.c.

◆ endcond_check_fo()

void endcond_check_fo ( particle_simd_fo * p_f,
particle_simd_fo * p_i,
sim_data * sim )

Check end conditions for FO markers.

The end conditions are checked for all markers within the SIMD marker struct.

Parameters
p_fpointer to SIMD struct storing marker states at the end of current time-step
p_ipointer to SIMD struct storing marker states at the beginning of current time-step
simpointer to simulation data struct

Definition at line 73 of file endcond.c.

◆ endcond_check_ml()

void endcond_check_ml ( particle_simd_ml * p_f,
particle_simd_ml * p_i,
sim_data * sim )

Check end conditions for ML markers.

The end conditions are checked for all markers within the SIMD marker struct.

Parameters
p_fpointer to SIMD struct storing marker states at the end of current time-step
p_ipointer to SIMD struct storing marker states at the beginning of current time-step
simpointer to simulation data struct

Definition at line 435 of file endcond.c.

◆ endcond_parse()

void endcond_parse ( int endcond,
int * endconds )

Split endcond to an array of end conditions.

This function splits the bit array end condition to an array where the active end conditions are presented by numbers. Number for each end condition are defined in this function.

Parameters
endcondbit array representing marker end conditions
endcondsinteger array large enough to hold all end conditions

Definition at line 538 of file endcond.c.

◆ endcond_parse2str()

void endcond_parse2str ( int endcond,
char * str )

Represent end condition in human-readable format.

This function takes end condition represented as integer, as given by endcond_parse().

Parameters
endcondend condition integer representation
strend condition as human-readable string

Definition at line 564 of file endcond.c.