From 42b99dfd9a113a66b4532b166661fa903b445fcd Mon Sep 17 00:00:00 2001 From: Tobias Reiter Date: Fri, 14 Jun 2024 16:34:28 +0200 Subject: [PATCH] Fix application --- app/application.hpp | 231 +++++++++++++++++----------------- app/applicationParameters.hpp | 13 +- app/applicationParser.hpp | 213 ++++++++++++++++--------------- 3 files changed, 230 insertions(+), 227 deletions(-) diff --git a/app/application.hpp b/app/application.hpp index 5c625165..3cb54ff3 100644 --- a/app/application.hpp +++ b/app/application.hpp @@ -28,9 +28,11 @@ #include "applicationParameters.hpp" #include "applicationParser.hpp" +using namespace viennaps; + template class Application { - psSmartPointer> geometry = nullptr; - psSmartPointer params = nullptr; + SmartPointer> geometry = nullptr; + SmartPointer params = nullptr; ApplicationParser parser; int clArgC = 0; char **clArgV; @@ -40,7 +42,7 @@ template class Application { void run() { if (clArgC < 2) { - psLogger::getInstance().addError("No input file specified.").print(); + Logger::getInstance().addError("No input file specified.").print(); return; } @@ -48,11 +50,11 @@ template class Application { inputFile.open(clArgV[1], std::fstream::in); if (!inputFile.is_open()) { - psLogger::getInstance().addError("Could not open input file.").print(); + Logger::getInstance().addError("Could not open input file.").print(); return; } - params = psSmartPointer::New(); + params = SmartPointer::New(); params->defaultParameters(true); parser.setParameters(params); @@ -101,18 +103,18 @@ template class Application { } protected: - virtual void runSingleParticleProcess( - psSmartPointer> processGeometry, - psSmartPointer processParams) { + virtual void + runSingleParticleProcess(SmartPointer> processGeometry, + SmartPointer processParams) { // copy top layer for deposition processGeometry->duplicateTopLevelSet(processParams->material); - auto model = psSmartPointer>::New( + auto model = SmartPointer>::New( processParams->rate, processParams->sticking, processParams->cosinePower); - psProcess process; + Process process; process.setDomain(processGeometry); process.setProcessModel(model); if (processParams->smoothFlux) @@ -124,17 +126,17 @@ template class Application { } virtual void - runTEOSDeposition(psSmartPointer> processGeometry, - psSmartPointer processParams) { + runTEOSDeposition(SmartPointer> processGeometry, + SmartPointer processParams) { // copy top layer for deposition processGeometry->duplicateTopLevelSet(processParams->material); - auto model = psSmartPointer>::New( + auto model = SmartPointer>::New( processParams->stickingP1, processParams->rateP1, processParams->orderP1, processParams->stickingP2, processParams->rateP2, processParams->orderP2); - psProcess process; + Process process; process.setDomain(processGeometry); process.setProcessModel(model); if (processParams->smoothFlux) @@ -146,15 +148,15 @@ template class Application { } virtual void - runSF6O2Etching(psSmartPointer> processGeometry, - psSmartPointer processParams) { - auto model = psSmartPointer>::New( + runSF6O2Etching(SmartPointer> processGeometry, + SmartPointer processParams) { + auto model = SmartPointer>::New( processParams->ionFlux, processParams->etchantFlux, processParams->oxygenFlux, processParams->ionEnergy, processParams->sigmaIonEnergy, processParams->ionExponent, processParams->A_O); - psProcess process; + Process process; process.setDomain(processGeometry); process.setProcessModel(model); process.setMaxCoverageInitIterations(10); @@ -166,16 +168,16 @@ template class Application { process.apply(); } - virtual void runFluorocarbonEtching( - psSmartPointer> processGeometry, - psSmartPointer processParams) { - auto model = psSmartPointer>::New( + virtual void + runFluorocarbonEtching(SmartPointer> processGeometry, + SmartPointer processParams) { + auto model = SmartPointer>::New( processParams->ionFlux, processParams->etchantFlux, processParams->oxygenFlux, processParams->ionEnergy, processParams->sigmaIonEnergy, processParams->ionExponent, processParams->deltaP); - psProcess process; + Process process; process.setDomain(processGeometry); process.setProcessModel(model); process.setMaxCoverageInitIterations(10); @@ -187,13 +189,13 @@ template class Application { process.apply(); } - virtual void runSphereDistribution( - psSmartPointer> processGeometry, - psSmartPointer processParams) { - auto model = psSmartPointer>::New( + virtual void + runSphereDistribution(SmartPointer> processGeometry, + SmartPointer processParams) { + auto model = SmartPointer>::New( processParams->radius, processParams->gridDelta); - psProcess process; + Process process; process.setDomain(processGeometry); process.setProcessModel(model); process.setIntegrationScheme(params->integrationScheme); @@ -201,27 +203,27 @@ template class Application { } virtual void - runBoxDistribution(psSmartPointer> processGeometry, - psSmartPointer processParams) { - auto model = psSmartPointer>::New( + runBoxDistribution(SmartPointer> processGeometry, + SmartPointer processParams) { + auto model = SmartPointer>::New( processParams->halfAxes, processParams->gridDelta); - psProcess process; + Process process; process.setDomain(processGeometry); process.setProcessModel(model); process.setIntegrationScheme(params->integrationScheme); process.apply(); } - virtual void runDirectionalEtching( - psSmartPointer> processGeometry, - psSmartPointer processParams) { + virtual void + runDirectionalEtching(SmartPointer> processGeometry, + SmartPointer processParams) { - auto model = psSmartPointer>::New( + auto model = SmartPointer>::New( getDirection(processParams->direction), processParams->directionalRate, processParams->isotropicRate, processParams->maskMaterial); - psProcess process; + Process process; process.setDomain(processGeometry); process.setProcessModel(model); process.setProcessDuration(params->processTime); @@ -230,18 +232,18 @@ template class Application { } virtual void - runIsotropicProcess(psSmartPointer> processGeometry, - psSmartPointer processParams) { + runIsotropicProcess(SmartPointer> processGeometry, + SmartPointer processParams) { if (params->rate > 0.) { // copy top layer for deposition processGeometry->duplicateTopLevelSet(processParams->material); } - auto model = psSmartPointer>::New( + auto model = SmartPointer>::New( processParams->rate, processParams->maskMaterial); - psProcess process; + Process process; process.setDomain(processGeometry); process.setProcessModel(model); process.setProcessDuration(params->processTime); @@ -249,10 +251,10 @@ template class Application { process.apply(); } - virtual void runAnisotropicProcess( - psSmartPointer> processGeometry, - psSmartPointer processParams) { - psLogger::getInstance() + virtual void + runAnisotropicProcess(SmartPointer> processGeometry, + SmartPointer processParams) { + Logger::getInstance() .addError("Warning: Anisotropic process model not implemented in " "application.") .print(); @@ -269,7 +271,7 @@ template class Application { << "\n\tUsing integration scheme: " << intSchemeString(params->integrationScheme) << "\n\n"; - geometry = psSmartPointer>::New(); + geometry = SmartPointer>::New(); } void createGeometry() { @@ -281,11 +283,11 @@ template class Application { << "\n\tzPos: " << params->maskZPos << "\n\tTapering angle: " << params->taperAngle << "\n\tMask: " << boolString(params->mask) << "\n\n"; - psMakeTrench(geometry, params->gridDelta, params->xExtent, - params->yExtent, params->trenchWidth, - params->trenchHeight, params->taperAngle, - params->maskZPos, params->periodicBoundary, - params->mask, params->material) + MakeTrench(geometry, params->gridDelta, params->xExtent, + params->yExtent, params->trenchWidth, + params->trenchHeight, params->taperAngle, + params->maskZPos, params->periodicBoundary, + params->mask, params->material) .apply(); break; @@ -295,26 +297,25 @@ template class Application { << "\n\tzPos: " << params->maskZPos << "\n\tTapering angle: " << params->taperAngle << "\n\tMask: " << boolString(params->mask) << "\n\n"; - psMakeHole(geometry, params->gridDelta, params->xExtent, - params->yExtent, params->holeRadius, - params->holeDepth, params->taperAngle, - params->maskZPos, params->periodicBoundary, - params->mask, params->material) + MakeHole(geometry, params->gridDelta, params->xExtent, + params->yExtent, params->holeRadius, + params->holeDepth, params->taperAngle, + params->maskZPos, params->periodicBoundary, + params->mask, params->material) .apply(); break; case GeometryType::PLANE: std::cout << "Plane" << "\n\tzPos: " << params->maskZPos << "\n\n"; - if (geometry->getLevelSets()->back()) { + if (!geometry->getLevelSets().empty()) { std::cout << "\tAdding plane to current geometry...\n\n"; - psMakePlane(geometry, params->maskZPos, - params->material) + MakePlane(geometry, params->maskZPos, params->material) .apply(); } else { - psMakePlane( - geometry, params->gridDelta, params->xExtent, params->yExtent, - params->maskZPos, params->periodicBoundary, params->material) + MakePlane(geometry, params->gridDelta, params->xExtent, + params->yExtent, params->maskZPos, + params->periodicBoundary, params->material) .apply(); } break; @@ -325,7 +326,7 @@ template class Application { << "\n\tSubstrate height: " << params->substrateHeight << "\n\tHole radius: " << params->holeRadius << "\n\tMask height: " << params->maskHeight << "\n\n"; - psMakeStack( + MakeStack( geometry, params->gridDelta, params->xExtent, params->yExtent, params->numLayers, params->layerHeight, params->substrateHeight, params->holeRadius, params->maskHeight, params->periodicBoundary) @@ -344,30 +345,32 @@ template class Application { << "\n\n"; if constexpr (D == 3) { - typename lsDomain::BoundaryType boundaryCons[D]; + typename viennals::Domain::BoundaryType boundaryCons[D]; for (int i = 0; i < D - 1; i++) { if (params->periodicBoundary) { boundaryCons[i] = - lsDomain::BoundaryType::PERIODIC_BOUNDARY; + viennals::Domain::BoundaryType::PERIODIC_BOUNDARY; } else { boundaryCons[i] = - lsDomain::BoundaryType::REFLECTIVE_BOUNDARY; + viennals::Domain::BoundaryType::REFLECTIVE_BOUNDARY; } } boundaryCons[D - 1] = - lsDomain::BoundaryType::INFINITE_BOUNDARY; - auto mask = psSmartPointer>::New( - params->gridDelta); + viennals::Domain::BoundaryType::INFINITE_BOUNDARY; + auto mask = + SmartPointer>::New(params->gridDelta); mask->setBoundaryConditions(boundaryCons); mask->setBoundaryPadding(params->xPadding, params->yPadding); - psGDSReader(mask, params->fileName).apply(); + GDSReader(mask, params->fileName).apply(); auto layer = mask->layerToLevelSet(params->layers, params->maskZPos, params->maskHeight, params->maskInvert); geometry->insertNextLevelSetAsMaterial(layer, params->material); } else { - psLogger::getInstance() + Logger::getInstance() .addError("Can only parse GDS geometries in 3D application.") .print(); } @@ -381,11 +384,11 @@ template class Application { std::string layerFileName = params->fileName + "_layer" + std::to_string(i) + ".lvst"; std::cout << "\tReading " << layerFileName << std::endl; - auto layer = psSmartPointer>::New(); - lsReader(layer, layerFileName).apply(); - if (!geometry->getLevelSets()->empty() && + auto layer = SmartPointer>::New(); + viennals::Reader(layer, layerFileName).apply(); + if (!geometry->getLevelSets().empty() && layer->getGrid().getGridDelta() != - geometry->getLevelSets()->back()->getGrid().getGridDelta()) { + geometry->getLevelSets().back()->getGrid().getGridDelta()) { std::cout << std::setprecision(8); std::cout << "Import geometry grid does not match. Grid resolution: " << params->gridDelta << ", Import grid resolution: " @@ -404,8 +407,8 @@ template class Application { } void runProcess() { - if (geometry->getLevelSets()->empty()) { - psLogger::getInstance() + if (geometry->getLevelSets().empty()) { + Logger::getInstance() .addError("Cannot run process on empty geometry.") .print(); return; @@ -510,7 +513,7 @@ template class Application { case ProcessType::ANISOTROPIC: { std::cout << "Wet etching\n\tTime: " << params->processTime << "\n\tUsing integration scheme: " - << intSchemeString(lsIntegrationSchemeEnum:: + << intSchemeString(viennals::IntegrationSchemeEnum:: STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER) << "\n\n"; runAnisotropicProcess(geometry, params); @@ -518,7 +521,7 @@ template class Application { } case ProcessType::NONE: - psLogger::getInstance() + Logger::getInstance() .addWarning("Process model could not be parsed. Skipping line.") .print(); break; @@ -530,11 +533,11 @@ template class Application { } void planarizeGeometry() { - psPlanarize(geometry, params->maskZPos).apply(); + Planarize(geometry, params->maskZPos).apply(); } void writeOutput() { - if (geometry->getLevelSets()->empty()) { + if (geometry->getLevelSets().empty()) { std::cout << "Cannot write empty geometry." << std::endl; return; } @@ -587,7 +590,7 @@ template class Application { } else if (directionString == "posX") { direction[0] = 1.; } else { - psLogger::getInstance() + Logger::getInstance() .addError("Invalid direction: " + directionString) .print(); } @@ -599,72 +602,74 @@ template class Application { return in == 0 ? "false" : "true"; } - static std::string materialString(const psMaterial material) { + static std::string materialString(const Material material) { switch (material) { - case psMaterial::None: + case Material::None: return "None"; - case psMaterial::Mask: + case Material::Mask: return "Mask"; - case psMaterial::Si: + case Material::Si: return "Si"; - case psMaterial::Si3N4: + case Material::Si3N4: return "Si3N4"; - case psMaterial::SiO2: + case Material::SiO2: return "SiO2"; - case psMaterial::SiON: + case Material::SiON: return "SiON"; - case psMaterial::PolySi: + case Material::PolySi: return "PolySi"; - case psMaterial::Polymer: + case Material::Polymer: return "Polymer"; - case psMaterial::SiC: + case Material::SiC: return "SiC"; - case psMaterial::SiN: + case Material::SiN: return "SiN"; - case psMaterial::Metal: + case Material::Metal: return "Metal"; - case psMaterial::W: + case Material::W: return "W"; - case psMaterial::TiN: + case Material::TiN: return "TiN"; - case psMaterial::GaN: + case Material::GaN: return "GaN"; - case psMaterial::GAS: + case Material::GAS: return "GAS"; - case psMaterial::Air: + case Material::Air: return "Air"; - case psMaterial::Al2O3: + case Material::Al2O3: return "Al2O3"; - case psMaterial::Dielectric: + case Material::Dielectric: return "Dielectric"; - case psMaterial::Cu: + case Material::Cu: return "Cu"; default: return "Unknown material"; } } - std::string intSchemeString(lsIntegrationSchemeEnum scheme) { + std::string intSchemeString(viennals::IntegrationSchemeEnum scheme) { switch (scheme) { - case lsIntegrationSchemeEnum::ENGQUIST_OSHER_1ST_ORDER: + case viennals::IntegrationSchemeEnum::ENGQUIST_OSHER_1ST_ORDER: return "Enquist-Osher 1st Order"; - case lsIntegrationSchemeEnum::ENGQUIST_OSHER_2ND_ORDER: + case viennals::IntegrationSchemeEnum::ENGQUIST_OSHER_2ND_ORDER: return "Enquist-Osher 2nd Order"; - case lsIntegrationSchemeEnum::LOCAL_LAX_FRIEDRICHS_1ST_ORDER: + case viennals::IntegrationSchemeEnum::LOCAL_LAX_FRIEDRICHS_1ST_ORDER: return "Local Lax-Friedrichs 1st Order"; - case lsIntegrationSchemeEnum::LOCAL_LAX_FRIEDRICHS_2ND_ORDER: + case viennals::IntegrationSchemeEnum::LOCAL_LAX_FRIEDRICHS_2ND_ORDER: return "Local Lax-Friedrichs 2nd Order"; - case lsIntegrationSchemeEnum::LAX_FRIEDRICHS_1ST_ORDER: + case viennals::IntegrationSchemeEnum::LAX_FRIEDRICHS_1ST_ORDER: return "Lax-Friedrichs 1st Order"; - case lsIntegrationSchemeEnum::LAX_FRIEDRICHS_2ND_ORDER: + case viennals::IntegrationSchemeEnum::LAX_FRIEDRICHS_2ND_ORDER: return "Lax-Friedrichs 2nd Order"; - case lsIntegrationSchemeEnum::LOCAL_LAX_FRIEDRICHS_ANALYTICAL_1ST_ORDER: + case viennals::IntegrationSchemeEnum:: + LOCAL_LAX_FRIEDRICHS_ANALYTICAL_1ST_ORDER: return "Local Lax-Friedrichs Analytical 1st Order"; - case lsIntegrationSchemeEnum::LOCAL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER: + case viennals::IntegrationSchemeEnum::LOCAL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER: return "Local Local Lax-Friedrichs 1st Order"; - case lsIntegrationSchemeEnum::LOCAL_LOCAL_LAX_FRIEDRICHS_2ND_ORDER: + case viennals::IntegrationSchemeEnum::LOCAL_LOCAL_LAX_FRIEDRICHS_2ND_ORDER: return "Local Local Lax-Friedrichs 2nd Order"; - case lsIntegrationSchemeEnum::STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER: + case viennals::IntegrationSchemeEnum:: + STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER: return "Stencil Lax-Friedrichs 1st Order"; } diff --git a/app/applicationParameters.hpp b/app/applicationParameters.hpp index 16f43d68..79285d93 100644 --- a/app/applicationParameters.hpp +++ b/app/applicationParameters.hpp @@ -3,9 +3,9 @@ #include #include -#include #include #include +#include enum class CommandType { NONE, INIT, GEOMETRY, PROCESS, OUTPUT, PLANARIZE }; @@ -42,8 +42,8 @@ struct ApplicationParameters { NumericType xExtent = 1.0; NumericType yExtent = 1.0; int periodicBoundary = 0; - lsIntegrationSchemeEnum integrationScheme = - lsIntegrationSchemeEnum::ENGQUIST_OSHER_1ST_ORDER; + viennals::IntegrationSchemeEnum integrationScheme = + viennals::IntegrationSchemeEnum::ENGQUIST_OSHER_1ST_ORDER; // Geometry int mask = 0; @@ -67,8 +67,8 @@ struct ApplicationParameters { int maskInvert = 0; NumericType xPadding = 0.; NumericType yPadding = 0.; - psMaterial material = psMaterial::Si; - psMaterial maskMaterial = psMaterial::Mask; + viennaps::Material material = viennaps::Material::Si; + viennaps::Material maskMaterial = viennaps::Material::Mask; // Process NumericType processTime = 1; @@ -164,7 +164,8 @@ struct ApplicationParameters { xExtent = 1.0; yExtent = 1.0; periodicBoundary = 0; - integrationScheme = lsIntegrationSchemeEnum::ENGQUIST_OSHER_1ST_ORDER; + integrationScheme = + viennals::IntegrationSchemeEnum::ENGQUIST_OSHER_1ST_ORDER; } } }; \ No newline at end of file diff --git a/app/applicationParser.hpp b/app/applicationParser.hpp index e3b8d7c9..2592c719 100644 --- a/app/applicationParser.hpp +++ b/app/applicationParser.hpp @@ -2,23 +2,24 @@ #include -#include +#include #include "applicationParameters.hpp" +using namespace viennaps; + class ApplicationParser { private: - psSmartPointer params; + SmartPointer params; public: ApplicationParser() {} - ApplicationParser( - const psSmartPointer passedParameters) + ApplicationParser(const SmartPointer passedParameters) : params(passedParameters) {} void - setParameters(const psSmartPointer passedParameters) { + setParameters(const SmartPointer passedParameters) { params = passedParameters; } @@ -53,67 +54,66 @@ class ApplicationParser { } private: - void parseMaterial(const std::string materialString, psMaterial &material) { + void parseMaterial(const std::string materialString, Material &material) { if (materialString == "Undefined") { - material = psMaterial::None; + material = Material::None; } else if (materialString == "Si") { - material = psMaterial::Si; + material = Material::Si; } else if (materialString == "SiO2") { - material = psMaterial::SiO2; + material = Material::SiO2; } else if (materialString == "Si3N4") { - material = psMaterial::Si3N4; + material = Material::Si3N4; } else if (materialString == "PolySi") { - material = psMaterial::PolySi; + material = Material::PolySi; } else if (materialString == "Polymer") { - material = psMaterial::Polymer; + material = Material::Polymer; } else if (materialString == "Al2O3") { - material = psMaterial::Al2O3; + material = Material::Al2O3; } else if (materialString == "SiC") { - material = psMaterial::SiC; + material = Material::SiC; } else if (materialString == "Metal") { - material = psMaterial::Metal; + material = Material::Metal; } else if (materialString == "W") { - material = psMaterial::W; + material = Material::W; } else if (materialString == "Dielectric") { - material = psMaterial::Dielectric; + material = Material::Dielectric; } else if (materialString == "SiON") { - material = psMaterial::SiON; + material = Material::SiON; } else if (materialString == "SiN") { - material = psMaterial::SiN; + material = Material::SiN; } else if (materialString == "TiN") { - material = psMaterial::TiN; + material = Material::TiN; } else if (materialString == "Cu") { - material = psMaterial::Cu; + material = Material::Cu; } else if (materialString == "Air") { - material = psMaterial::Air; + material = Material::Air; } else if (materialString == "GAS") { - material = psMaterial::GAS; + material = Material::GAS; } else if (materialString == "GaN") { - material = psMaterial::GaN; + material = Material::GaN; } else { std::cout << "Unknown material: " << materialString << std::endl; - material = psMaterial::None; + material = Material::None; } } void parseInit(std::istringstream &stream) { unsigned integrationSchemeNum = 0; auto config = parseLineStream(stream); - psUtils::AssignItems( - config, psUtils::Item{"xExtent", params->xExtent}, - psUtils::Item{"yExtent", params->yExtent}, - psUtils::Item{"resolution", params->gridDelta}, - psUtils::Item{"logLevel", params->logLevel}, - psUtils::Item{"periodic", params->periodicBoundary}, - psUtils::Item{"integrationScheme", integrationSchemeNum}); + utils::AssignItems(config, utils::Item{"xExtent", params->xExtent}, + utils::Item{"yExtent", params->yExtent}, + utils::Item{"resolution", params->gridDelta}, + utils::Item{"logLevel", params->logLevel}, + utils::Item{"periodic", params->periodicBoundary}, + utils::Item{"integrationScheme", integrationSchemeNum}); if (integrationSchemeNum > 9) { std::cout << "Invalid integration scheme number. Using default." << std::endl; integrationSchemeNum = 0; } params->integrationScheme = - static_cast(integrationSchemeNum); - psLogger::setLogLevel(static_cast(params->logLevel)); + static_cast(integrationSchemeNum); + Logger::setLogLevel(static_cast(params->logLevel)); } void parseGeometry(std::istringstream &stream) { @@ -123,49 +123,49 @@ class ApplicationParser { std::string material; if (type == "Trench") { params->geometryType = GeometryType::TRENCH; - psUtils::AssignItems(config, psUtils::Item{"width", params->trenchWidth}, - psUtils::Item{"depth", params->trenchHeight}, - psUtils::Item{"zPos", params->maskZPos}, - psUtils::Item{"tapering", params->taperAngle}, - psUtils::Item{"mask", params->mask}, - psUtils::Item{"material", material}); + utils::AssignItems(config, utils::Item{"width", params->trenchWidth}, + utils::Item{"depth", params->trenchHeight}, + utils::Item{"zPos", params->maskZPos}, + utils::Item{"tapering", params->taperAngle}, + utils::Item{"mask", params->mask}, + utils::Item{"material", material}); parseMaterial(material, params->material); } else if (type == "Hole") { params->geometryType = GeometryType::HOLE; - psUtils::AssignItems(config, psUtils::Item{"radius", params->holeRadius}, - psUtils::Item{"depth", params->holeDepth}, - psUtils::Item{"zPos", params->maskZPos}, - psUtils::Item{"tapering", params->taperAngle}, - psUtils::Item{"mask", params->mask}, - psUtils::Item{"material", material}); + utils::AssignItems(config, utils::Item{"radius", params->holeRadius}, + utils::Item{"depth", params->holeDepth}, + utils::Item{"zPos", params->maskZPos}, + utils::Item{"tapering", params->taperAngle}, + utils::Item{"mask", params->mask}, + utils::Item{"material", material}); parseMaterial(material, params->material); } else if (type == "Plane") { params->geometryType = GeometryType::PLANE; - psUtils::AssignItems(config, psUtils::Item{"zPos", params->maskZPos}); + utils::AssignItems(config, utils::Item{"zPos", params->maskZPos}); parseMaterial(material, params->material); } else if (type == "Stack") { params->geometryType = GeometryType::STACK; - psUtils::AssignItems( - config, psUtils::Item{"numLayers", params->numLayers}, - psUtils::Item{"layerHeight", params->layerHeight}, - psUtils::Item{"maskHeight", params->maskHeight}, - psUtils::Item{"substrateHeight", params->substrateHeight}, - psUtils::Item{"holeRadius", params->holeRadius}); + utils::AssignItems( + config, utils::Item{"numLayers", params->numLayers}, + utils::Item{"layerHeight", params->layerHeight}, + utils::Item{"maskHeight", params->maskHeight}, + utils::Item{"substrateHeight", params->substrateHeight}, + utils::Item{"holeRadius", params->holeRadius}); } else if (type == "GDS") { params->geometryType = GeometryType::GDS; - psUtils::AssignItems(config, psUtils::Item{"file", params->fileName}, - psUtils::Item{"layer", params->layers}, - psUtils::Item{"zPos", params->maskZPos}, - psUtils::Item{"maskHeight", params->maskHeight}, - psUtils::Item{"invert", params->maskInvert}, - psUtils::Item{"xPadding", params->xPadding}, - psUtils::Item{"yPadding", params->yPadding}, - psUtils::Item{"material", material}); + utils::AssignItems(config, utils::Item{"file", params->fileName}, + utils::Item{"layer", params->layers}, + utils::Item{"zPos", params->maskZPos}, + utils::Item{"maskHeight", params->maskHeight}, + utils::Item{"invert", params->maskInvert}, + utils::Item{"xPadding", params->xPadding}, + utils::Item{"yPadding", params->yPadding}, + utils::Item{"material", material}); parseMaterial(material, params->material); } else if (type == "Import") { params->geometryType = GeometryType::IMPORT; - psUtils::AssignItems(config, psUtils::Item{"file", params->fileName}, - psUtils::Item{"layers", params->layers}); + utils::AssignItems(config, utils::Item{"file", params->fileName}, + utils::Item{"layers", params->layers}); } else { params->geometryType = GeometryType::NONE; std::cout << "Invalid geometry type." << std::endl; @@ -180,67 +180,64 @@ class ApplicationParser { if (model == "SingleParticleProcess") { std::string material; params->processType = ProcessType::SINGLEPARTICLEPROCESS; - psUtils::AssignItems(config, psUtils::Item{"rate", params->rate}, - psUtils::Item{"time", params->processTime}, - psUtils::Item{"sticking", params->sticking}, - psUtils::Item{"cosineExponent", params->cosinePower}, - psUtils::Item{"smoothFlux", params->smoothFlux}, - psUtils::Item{"raysPerPoint", params->raysPerPoint}, - psUtils::Item{"material", material}); + utils::AssignItems(config, utils::Item{"rate", params->rate}, + utils::Item{"time", params->processTime}, + utils::Item{"sticking", params->sticking}, + utils::Item{"cosineExponent", params->cosinePower}, + utils::Item{"smoothFlux", params->smoothFlux}, + utils::Item{"raysPerPoint", params->raysPerPoint}, + utils::Item{"material", material}); parseMaterial(material, params->material); } else if (model == "SF6O2Etching") { params->processType = ProcessType::SF6O2ETCHING; - psUtils::AssignItems( - config, psUtils::Item{"time", params->processTime}, - psUtils::Item{"ionFlux", params->ionFlux}, - psUtils::Item{"meanIonEnergy", params->ionEnergy}, - psUtils::Item{"sigmaIonEnergy", params->sigmaIonEnergy}, - psUtils::Item{"etchantFlux", params->etchantFlux}, - psUtils::Item{"oxygenFlux", params->oxygenFlux}, - psUtils::Item{"A_O", params->A_O}, - psUtils::Item{"smoothFlux", params->smoothFlux}, - psUtils::Item{"ionExponent", params->ionExponent}, - psUtils::Item{"raysPerPoint", params->raysPerPoint}); + utils::AssignItems(config, utils::Item{"time", params->processTime}, + utils::Item{"ionFlux", params->ionFlux}, + utils::Item{"meanIonEnergy", params->ionEnergy}, + utils::Item{"sigmaIonEnergy", params->sigmaIonEnergy}, + utils::Item{"etchantFlux", params->etchantFlux}, + utils::Item{"oxygenFlux", params->oxygenFlux}, + utils::Item{"A_O", params->A_O}, + utils::Item{"smoothFlux", params->smoothFlux}, + utils::Item{"ionExponent", params->ionExponent}, + utils::Item{"raysPerPoint", params->raysPerPoint}); } else if (model == "FluorocarbonEtching") { params->processType = ProcessType::FLUOROCARBONETCHING; - psUtils::AssignItems( - config, psUtils::Item{"time", params->processTime}, - psUtils::Item{"ionFlux", params->ionFlux}, - psUtils::Item{"meanIonEnergy", params->ionEnergy}, - psUtils::Item{"sigmaIonEnergy", params->sigmaIonEnergy}, - psUtils::Item{"etchantFlux", params->etchantFlux}, - psUtils::Item{"polyFlux", params->oxygenFlux}, - psUtils::Item{"deltaP", params->deltaP}, - psUtils::Item{"smoothFlux", params->smoothFlux}, - psUtils::Item{"raysPerPoint", params->raysPerPoint}); + utils::AssignItems(config, utils::Item{"time", params->processTime}, + utils::Item{"ionFlux", params->ionFlux}, + utils::Item{"meanIonEnergy", params->ionEnergy}, + utils::Item{"sigmaIonEnergy", params->sigmaIonEnergy}, + utils::Item{"etchantFlux", params->etchantFlux}, + utils::Item{"polyFlux", params->oxygenFlux}, + utils::Item{"deltaP", params->deltaP}, + utils::Item{"smoothFlux", params->smoothFlux}, + utils::Item{"raysPerPoint", params->raysPerPoint}); } else if (model == "SphereDistribution") { params->processType = ProcessType::SPHEREDISTRIBUTION; - psUtils::AssignItems(config, psUtils::Item{"radius", params->radius}); + utils::AssignItems(config, utils::Item{"radius", params->radius}); } else if (model == "BoxDistribution") { params->processType = ProcessType::BOXDISTRIBUTION; - psUtils::AssignItems(config, - psUtils::Item{"halfAxisX", params->halfAxes[0]}, - psUtils::Item{"halfAxisY", params->halfAxes[1]}, - psUtils::Item{"halfAxisZ", params->halfAxes[2]}); + utils::AssignItems(config, utils::Item{"halfAxisX", params->halfAxes[0]}, + utils::Item{"halfAxisY", params->halfAxes[1]}, + utils::Item{"halfAxisZ", params->halfAxes[2]}); } else if (model == "DirectionalEtching") { params->processType = ProcessType::DIRECTIONALETCHING; std::string material = "Undefined"; - psUtils::AssignItems( - config, psUtils::Item{"direction", params->direction}, - psUtils::Item{"directionalRate", params->directionalRate}, - psUtils::Item{"isotropicRate", params->isotropicRate}, - psUtils::Item{"time", params->processTime}, - psUtils::Item{"maskMaterial", material}); + utils::AssignItems( + config, utils::Item{"direction", params->direction}, + utils::Item{"directionalRate", params->directionalRate}, + utils::Item{"isotropicRate", params->isotropicRate}, + utils::Item{"time", params->processTime}, + utils::Item{"maskMaterial", material}); parseMaterial(material, params->maskMaterial); } else if (model == "Isotropic") { params->processType = ProcessType::ISOTROPIC; std::string material = "Undefined"; std::string maskMaterial = "Mask"; - psUtils::AssignItems(config, psUtils::Item{"rate", params->rate}, - psUtils::Item{"time", params->processTime}, - psUtils::Item{"time", params->processTime}, - psUtils::Item{"material", material}, - psUtils::Item{"maskMaterial", maskMaterial}); + utils::AssignItems(config, utils::Item{"rate", params->rate}, + utils::Item{"time", params->processTime}, + utils::Item{"time", params->processTime}, + utils::Item{"material", material}, + utils::Item{"maskMaterial", maskMaterial}); parseMaterial(material, params->material); parseMaterial(maskMaterial, params->maskMaterial); } else if (model == "Anisotropic") { @@ -253,7 +250,7 @@ class ApplicationParser { void parsePlanarize(std::istringstream &stream) { auto config = parseLineStream(stream); - psUtils::AssignItems(config, psUtils::Item{"height", params->maskZPos}); + utils::AssignItems(config, utils::Item{"height", params->maskZPos}); } void parseOutput(std::istringstream &stream) {