IPCC  1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
KNMaterialParam.cpp
Go to the documentation of this file.
1 
7 #include "KNMaterialParam.h"
8 #include "KNIPCCUtility.h"
10 #include <string.h>
11 #include <stdio.h>
12 #include <stdlib.h>
13 #include <algorithm>
14 
16 {
17 }
18 
19 
21 {
22 }
23 
29 GEO_PARAMETER CKNMaterialParam::BuildMaterialParam(char *pszMaterialName, bool &bResult)
30 {
31  char szMaterialName[1024];
32  MATERIAL_INDEX material;
33 
34  strcpy(szMaterialName, pszMaterialName);
35  CKNIPCCUtility::ConvertLower(szMaterialName);
36 
37  if (!strcmp(szMaterialName, "si"))
38  material = Si;
39  else if (!strcmp(szMaterialName, "gaas"))
40  material = GaAs;
41  /*else if (!strcmp(szMaterialName, "as"))
42  material = As;*/
43  else if (!strcmp(szMaterialName, "inas"))
44  material = InAs;
45  else
46  material = ATOM_NUM_BASE;
47 
48  return BuildMaterialParam(material, bResult);;
49 }
50 
57 {
58  GEO_PARAMETER parameter;
59 
60  switch (material)
61  {
62  case Si:
63  strcpy(parameter.strMaterialType, "Si");
65  bResult = true;
66  break;
67  case GaAs:
68  strcpy(parameter.strMaterialType, "GaAs");
70  bResult = true;
71  break;
72  case InAs:
73  strcpy(parameter.strMaterialType, "InAs");
75  bResult = true;
76  break;
77  default:
78  bResult = false;
79  break;
80  }
81 
82  return parameter;
83 }
84 
92 {
93  GEO_PARAMETER parameter;
94  MATERIAL_INDEX multimater = (MATERIAL_INDEX)(material | material2);
95 
96  switch (multimater)
97  {
98  case Si:
99  strcpy(parameter.strMaterialType, "Si");
101  bResult = true;
102  break;
103  case GaAs:
104  strcpy(parameter.strMaterialType, "GaAs");
106  bResult = true;
107  break;
108  case InAs:
109  strcpy(parameter.strMaterialType, "InAs");
111  bResult = true;
112  break;
113  default:
114  bResult = false;
115  break;
116  }
117 
118  return parameter;
119 }
char strMaterialType[1024]
<--------------------— From this point generated by meterialParam
MATERIAL_INDEX
Definition: CKNGlobal.h:106
Class for material parameter setting.
GEO_PARAMETER BuildMaterialParam(char *pszMaterialName, bool &bResult)
Load material parameter.
static void SetSiParameter(LPGEO_PARAMETER lpParameter)
Set Si material parameter.
static void ConvertLower(char *pszBuffer)
Convert string to lower case.
static void SetGaAsParameter(LPGEO_PARAMETER lpParameter)
Set GaAs material parameter.
Definition: CKNGlobal.h:106
This class includes functions for matrix debugging.
Structure for saving geometric parameter.
Class for Material Parameter.
static void SetInAsParameter(LPGEO_PARAMETER lpParameter)
Set InAs material parameter.