#include <CST_Readout.h>
|
| CST_Readout (string cst_file) |
|
virtual | ~CST_Readout () |
|
|
int * | Getnxyz () |
|
int | GetElementMaterial (int element, int node=3) |
|
double * | GetElementMaterialProperty (int element, unsigned int materialProperty, int testnode=3) |
|
void | GetNodesForElement (int element, vector< int > &nodes) |
|
void | Node2Index (int node, int &i, int &j, int &k) |
|
double * | GetMaterialPropertyFromIndex (int i, int j, int k, int n, unsigned int materialProperty) |
|
void | Element2Index (int element, int &i, int &j, int &k) |
|
void | RetrieveFieldData (string TreeFieldName) |
|
int | GetNumberOfNodes () |
|
int | GetNumberOfElements () |
|
double * | GetMaterialPropertyFromIndex (float *matMatrix_cst, int i, int j, int k, int n, unsigned int materialProperty) |
|
void | SetPotentialName (string pot) |
|
string | GetPotentialName () |
|
void | UsePropertyRho () |
|
|
void | WriteElementComp (string path, string prefix="") |
|
void | WritePosLines (string path, string prefix="") |
|
void | WritePotentials (string TreeFieldName, string path, string prefix="") |
|
|
void | ExtractData (string fileName, bool isWeightingField, bool writeMaterialProp=false) |
|
void | SetMaterialFile (string file) |
|
|
static double | Round (double number, int digits) |
|
static void | PrintStatus (int event, int all_events, double percent=0.1) |
|
CST_Readout::CST_Readout |
( |
string |
cst_file | ) |
|
- Parameters
-
cst_file | The file name including the full path of the CST project to be used. |
- Exceptions
-
virtual CST_Readout::~CST_Readout |
( |
| ) |
|
|
virtual |
void CST_Readout::Element2Index |
( |
int |
element, |
|
|
int & |
i, |
|
|
int & |
j, |
|
|
int & |
k |
|
) |
| |
void CST_Readout::ExtractData |
( |
string |
fileName, |
|
|
bool |
isWeightingField, |
|
|
bool |
writeMaterialProp = false |
|
) |
| |
int CST_Readout::GetElementMaterial |
( |
int |
element, |
|
|
int |
node = 3 |
|
) |
| |
double* CST_Readout::GetElementMaterialProperty |
( |
int |
element, |
|
|
unsigned int |
materialProperty, |
|
|
int |
testnode = 3 |
|
) |
| |
double* CST_Readout::GetMaterialPropertyFromIndex |
( |
int |
i, |
|
|
int |
j, |
|
|
int |
k, |
|
|
int |
n, |
|
|
unsigned int |
materialProperty |
|
) |
| |
double* CST_Readout::GetMaterialPropertyFromIndex |
( |
float * |
matMatrix_cst, |
|
|
int |
i, |
|
|
int |
j, |
|
|
int |
k, |
|
|
int |
n, |
|
|
unsigned int |
materialProperty |
|
) |
| |
void CST_Readout::GetNodesForElement |
( |
int |
element, |
|
|
vector< int > & |
nodes |
|
) |
| |
Calculate the index of all nodes of a certain element.
global coordinates 7 _ _ _ _6 t3 t2
/ /| ^ /|
^ z / / | | /
| 4 /_______/5 | | /
| | | | | /
| | 3 | /2 |/ t1
-------> | | / ------->
/ y | |/ local coordinates
/ 0--------1
/
v x
int CST_Readout::GetNumberOfElements |
( |
| ) |
|
|
inline |
int CST_Readout::GetNumberOfNodes |
( |
| ) |
|
|
inline |
int* CST_Readout::Getnxyz |
( |
| ) |
|
|
inline |
Get the number x (m_nxyz[0]), y(m_nxyz[1]), and z(m_nxyz[2]) lines in the CST mesh.
string CST_Readout::GetPotentialName |
( |
| ) |
|
|
inline |
void CST_Readout::Node2Index |
( |
int |
node, |
|
|
int & |
i, |
|
|
int & |
j, |
|
|
int & |
k |
|
) |
| |
static void CST_Readout::PrintStatus |
( |
int |
event, |
|
|
int |
all_events, |
|
|
double |
percent = 0.1 |
|
) |
| |
|
static |
Just print the status of reading data used for the text based export.
- Parameters
-
event | The current processed event. |
all_events | The total number of events to be processed. |
percent | Set the frequency of printing the status. Default means every 10% a message is printed to the terminal. |
void CST_Readout::RetrieveFieldData |
( |
string |
TreeFieldName | ) |
|
Here the field specified by Tree3DField is read. This means Tree3DField should correspond to the name of the tree, that contains the information of the potentials in your CST project.
- Exceptions
-
static double CST_Readout::Round |
( |
double |
number, |
|
|
int |
digits |
|
) |
| |
|
static |
Round a given number to the given number of digits.
void CST_Readout::SetMaterialFile |
( |
string |
file | ) |
|
|
inline |
The xml file containing informations about the materials considered in the simulation. It should be formatted like this:
<Materials Count="3">
<Material ID="2" description="gas" eps="1" mue="1" rho="0" rho_set="1"></Material>
<Material ID="0" description="PEC" eps="1000000" mue="1000000" rho="1000000" rho_set="0"></Material>
<Material ID="1" description="kapton" eps="3.5" mue="1" rho="2.3" rho_set="2"></Material>
</Materials>
- Exceptions
-
void CST_Readout::SetPotentialName |
( |
string |
pot | ) |
|
|
inline |
Set/Get the name of the potential in the CST file to be exported.
void CST_Readout::UsePropertyRho |
( |
| ) |
|
|
inline |
Use this to change the material property that is used to assign a material to elements. The default property is
. When calling this method
will used instead.
void CST_Readout::WriteElementComp |
( |
string |
path, |
|
|
string |
prefix = "" |
|
) |
| |
Here the file ELIST.lis is created in path. It contains the element number, the type of material and the nodes corresponding to the element (element,node1,node2...). The material is encoded as follows:
- mat == 3: Kapton eps +- 0.4 = 3. ~ 4.,
- mat == 5: Al
- mat == 4: G10
- mat == 3: Kapton
- mat == 2: PEC [eps = #inf],
- mat == 1: vacuum else
- Parameters
-
path | The path where the the file named PRNSOL.lis will be stored. |
prefix | This is the name of a subdirectory where to store the PRNSOL.lis file inside the directory specified in path. |
void CST_Readout::WritePosLines |
( |
string |
path, |
|
|
string |
prefix = "" |
|
) |
| |
Here the file NODELINES.lis is created in path. It contains the positions of the nodes for all possible positions (but not for each node)
- Parameters
-
path | The path where the the file named PRNSOL.lis will be stored. |
prefix | This is the name of a subdirectory where to store the PRNSOL.lis file inside the directory specified in path. |
void CST_Readout::WritePotentials |
( |
string |
TreeFieldName, |
|
|
string |
path, |
|
|
string |
prefix = "" |
|
) |
| |
Here the file PRNSOL.lis is created in path. It contains the element number and the corresponding potential.
- Parameters
-
TreeFieldName | The name of the tree, that contains the information of the potentials in the CST project. |
path | The path where the the file named PRNSOL.lis will be stored. |
prefix | This is the name of a subdirectory where to store the PRNSOL.lis file inside the directory specified in path. |
The documentation for this class was generated from the following file: