Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120668172
ElectronPhononExchange.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jul 6, 03:44
Size
1 KB
Mime Type
text/x-c
Expires
Tue, Jul 8, 03:44 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27224762
Attached To
rLAMMPS lammps
ElectronPhononExchange.cpp
View Options
#include "ElectronPhononExchange.h"
#include "StringManip.h"
#include "ATC_Error.h"
#include <iostream>
#include <fstream>
namespace ATC {
using namespace ATC_STRING;
ElectronPhononExchangeLinear::ElectronPhononExchangeLinear(
fstream &fileId, map<string,double> & parameters)
: ElectronPhononExchange(),
exchangeCoef_(0)
{
if (!fileId.is_open()) throw ATC_Error(0,"cannot open material file");
vector<string> line;
while(fileId.good()) {
get_command_line(fileId, line);
if (line.size() == 0) continue;
if (line[0] == "end") return;
else if (line[0] == "coefficient") {
exchangeCoef_ = str2dbl(line[1]);
parameters["electron_phonon_exchange_coefficient"] = exchangeCoef_;
}
else {
throw ATC_Error(0, "unrecognized material function "+line[0]);
}
}
}
ElectronPhononExchangePowerLaw::ElectronPhononExchangePowerLaw(
fstream &fileId, map<string,double> & parameters)
: ElectronPhononExchange(),
exchangeCoef_(0),
exponent_(1)
{
if (!fileId.is_open()) throw ATC_Error(0,"cannot open material file");
vector<string> line;
while(fileId.good()) {
get_command_line(fileId, line);
if (line.size() == 0) continue;
if (line[0] == "end") return;
else if (line[0] == "coefficient") {
exchangeCoef_ = str2dbl(line[1]);
parameters["electron_phonon_exchange_coefficient"] = exchangeCoef_;
}
else if (line[0] == "exponent") {
exponent_ = str2int(line[1]);
}
else {
throw ATC_Error(0, "unrecognized material function "+line[0]);
}
}
}
}
Event Timeline
Log In to Comment