Material class handler. More...
#include "material_handler.h"
Collaboration diagram for MaterialHandler:
Public Member Functions | |
| MaterialHandler (integer numMaterials) | |
| Constructor. More... | |
| MaterialHandler (const char *material_cfg) | |
| Constructor from config file. More... | |
| MaterialHandler (integer numMaterials, integer ID, integer interactions, real alpha, real beta) | |
| Constructor. More... | |
| ~MaterialHandler () | |
| Destructor. More... | |
| void | copy (To::Target target, integer index=-1) |
| void | communicate (int from, int to, bool fromDevice=false, bool toDevice=true) |
| void | broadcast (int root=0, bool fromDevice=false, bool toDevice=true) |
Public Attributes | |
| integer | numMaterials |
| number of materials or rather material instances More... | |
| Material * | h_materials |
| host instance of material class More... | |
| Material * | d_materials |
| device instance of material class More... | |
Material class handler.
LibConfigReaderDefinition at line 53 of file material_handler.h.
| MaterialHandler::MaterialHandler | ( | integer | numMaterials | ) |
Constructor.
| numMaterials |
Definition at line 55 of file material_handler.cpp.
Here is the call graph for this function:
| MaterialHandler::MaterialHandler | ( | const char * | material_cfg | ) |
Constructor from config file.
| material_cfg | Config file name/path |
Definition at line 66 of file material_handler.cpp.
Here is the call graph for this function:
| MaterialHandler::MaterialHandler | ( | integer | numMaterials, |
| integer | ID, | ||
| integer | interactions, | ||
| real | alpha, | ||
| real | beta | ||
| ) |
Constructor.
| numMaterials | |
| ID | |
| interactions | |
| alpha | |
| beta |
Definition at line 105 of file material_handler.cpp.
Here is the call graph for this function:
| MaterialHandler::~MaterialHandler | ( | ) |
Destructor.
Definition at line 118 of file material_handler.cpp.
Here is the call graph for this function:
| void MaterialHandler::broadcast | ( | int | root = 0, |
| bool | fromDevice = false, |
||
| bool | toDevice = true |
||
| ) |
Broadcast material instances to all MPI processes from a root
| root | root to broadcast from (default: MPI process 0) |
| fromDevice | flag whether start from device |
| toDevice | flag whether start from device |
Definition at line 159 of file material_handler.cpp.
Here is the call graph for this function:
| void MaterialHandler::communicate | ( | int | from, |
| int | to, | ||
| bool | fromDevice = false, |
||
| bool | toDevice = true |
||
| ) |
Communicate material instances between MPI processes and in addition from and/or to the device(s).
| from | MPI process source |
| to | MPI process target |
| fromDevice | flag whether start from device |
| toDevice | flag whether start from device |
Definition at line 136 of file material_handler.cpp.
Here is the call graph for this function:
| void MaterialHandler::copy | ( | To::Target | target, |
| integer | index = -1 |
||
| ) |
Copy material instance(s) from host to device or vice-versa.
| target | target: host or device |
| index | material instance index to be copied, if -1 copy all instances |
Definition at line 125 of file material_handler.cpp.
Here is the call graph for this function:
| Material* MaterialHandler::d_materials |
device instance of material class
Definition at line 61 of file material_handler.h.
| Material* MaterialHandler::h_materials |
host instance of material class
Definition at line 59 of file material_handler.h.
| integer MaterialHandler::numMaterials |
number of materials or rather material instances
Definition at line 57 of file material_handler.h.