ATC version 2.0, date: Aug28
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10695 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -31,11 +31,6 @@ namespace ATC {
|
||||
string matParamFile,
|
||||
ExtrinsicModelType extrinsicModel)
|
||||
: ATC_Coupling(groupName,perAtomArray,thisFix),
|
||||
#ifdef OBSOLETE
|
||||
nodalAtomicMass_(NULL),
|
||||
nodalAtomicCount_(NULL),
|
||||
nodalAtomicHeatCapacity_(NULL),
|
||||
#endif
|
||||
nodalAtomicKineticTemperature_(NULL),
|
||||
nodalAtomicConfigurationalTemperature_(NULL),
|
||||
refPE_(0)
|
||||
@ -82,9 +77,6 @@ namespace ATC {
|
||||
extVector_ = 1;
|
||||
if (extrinsicModel != NO_MODEL)
|
||||
sizeVector_ += extrinsicModelManager_.size_vector(sizeVector_);
|
||||
|
||||
// create PE per atom ccompute
|
||||
lammpsInterface_->create_compute_pe_peratom();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------
|
||||
@ -111,88 +103,6 @@ namespace ATC {
|
||||
|
||||
// Base class initalizations
|
||||
ATC_Coupling::initialize();
|
||||
|
||||
// resetting precedence:
|
||||
// time integrator -> kinetostat/thermostat -> time filter
|
||||
// init_filter uses fieldRateNdFiltered which comes from the time integrator,
|
||||
// which is why the time integrator is initialized first
|
||||
|
||||
// other initializations
|
||||
#ifdef OBSOLETE
|
||||
|
||||
if (reset_methods()) {
|
||||
for (_tiIt_ = timeIntegrators_.begin(); _tiIt_ != timeIntegrators_.end(); ++_tiIt_) {
|
||||
(_tiIt_->second)->force_reset();
|
||||
}
|
||||
atomicRegulator_->force_reset();
|
||||
}
|
||||
#endif
|
||||
if (reset_methods()) {
|
||||
for (_tiIt_ = timeIntegrators_.begin(); _tiIt_ != timeIntegrators_.end(); ++_tiIt_) {
|
||||
(_tiIt_->second)->initialize();
|
||||
}
|
||||
atomicRegulator_->initialize();
|
||||
extrinsicModelManager_.initialize();
|
||||
}
|
||||
if (timeFilterManager_.need_reset()) {// reset thermostat power
|
||||
init_filter();
|
||||
}
|
||||
// clears need for reset
|
||||
timeFilterManager_.initialize();
|
||||
ghostManager_.initialize();
|
||||
|
||||
if (!initialized_) {
|
||||
// initialize sources based on initial FE temperature
|
||||
double dt = lammpsInterface_->dt();
|
||||
prescribedDataMgr_->set_sources(time()+0.5*dt,sources_);
|
||||
extrinsicModelManager_.set_sources(fields_,extrinsicSources_);
|
||||
atomicRegulator_->compute_boundary_flux(fields_);
|
||||
compute_atomic_sources(fieldMask_,fields_,atomicSources_);
|
||||
|
||||
// read in field data if necessary
|
||||
if (useRestart_) {
|
||||
RESTART_LIST data;
|
||||
read_restart_data(restartFileName_,data);
|
||||
useRestart_ = false;
|
||||
}
|
||||
|
||||
// set consistent initial conditions, if requested
|
||||
if (!timeFilterManager_.filter_dynamics()) {
|
||||
if (consistentInitialization_) {
|
||||
|
||||
DENS_MAT & velocity(fields_[VELOCITY].set_quantity());
|
||||
DENS_MAN * nodalAtomicVelocity(interscaleManager_.dense_matrix("NodalAtomicVelocity"));
|
||||
const DENS_MAT & atomicVelocity(nodalAtomicVelocity->quantity());
|
||||
DENS_MAT & temperature(fields_[TEMPERATURE].set_quantity());
|
||||
DENS_MAN * nodalAtomicTemperature(interscaleManager_.dense_matrix("NodalAtomicTemperature"));
|
||||
const DENS_MAT & atomicTemperature(nodalAtomicTemperature->quantity());
|
||||
const INT_ARRAY & nodeType(nodalGeometryType_->quantity());
|
||||
for (int i = 0; i<nNodes_; ++i) {
|
||||
|
||||
if (nodeType(i,0)==MD_ONLY) {
|
||||
for (int j = 0; j < nsd_; j++) {
|
||||
velocity(i,j) = atomicVelocity(i,j);
|
||||
}
|
||||
temperature(i,0) = atomicTemperature(i,0);
|
||||
}
|
||||
}
|
||||
if (trackDisplacement_) {
|
||||
DENS_MAT & displacement(fields_[DISPLACEMENT].set_quantity());
|
||||
DENS_MAN * nodalAtomicDisplacement(interscaleManager_.dense_matrix("NodalAtomicDisplacement"));
|
||||
const DENS_MAT & atomicDisplacement(nodalAtomicDisplacement->quantity());
|
||||
for (int i = 0; i<nNodes_; ++i) {
|
||||
|
||||
if (nodeType(i,0)==MD_ONLY) {
|
||||
for (int j = 0; j < nsd_; j++) {
|
||||
displacement(i,j) = atomicDisplacement(i,j);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
initialized_ = true;
|
||||
}
|
||||
|
||||
// reset integration field mask
|
||||
intrinsicMask_.reset(NUM_FIELDS,NUM_FLUX);
|
||||
@ -368,38 +278,7 @@ namespace ATC {
|
||||
TEMPERATURE);
|
||||
interscaleManager_.add_dense_matrix(nodalAtomicTemperature,
|
||||
"NodalAtomicTemperature");
|
||||
#ifdef OBSOLETE
|
||||
if (!useFeMdMassMatrix_) {
|
||||
// atomic momentum mass matrix
|
||||
FundamentalAtomQuantity * atomicMass = interscaleManager_.fundamental_atom_quantity(LammpsInterface::ATOM_MASS);
|
||||
nodalAtomicMass_ = new AtfShapeFunctionRestriction(this,
|
||||
atomicMass,
|
||||
shpFcn_);
|
||||
interscaleManager_.add_dense_matrix(nodalAtomicMass_,
|
||||
"AtomicMomentumMassMat");
|
||||
|
||||
// atomic dimensionless mass matrix
|
||||
ConstantQuantity<double> * atomicOnes = new ConstantQuantity<double>(this,1);
|
||||
interscaleManager_.add_per_atom_quantity(atomicOnes,"AtomicOnes");
|
||||
nodalAtomicCount_ = new AtfShapeFunctionRestriction(this,
|
||||
atomicOnes,
|
||||
shpFcn_);
|
||||
interscaleManager_.add_dense_matrix(nodalAtomicCount_,
|
||||
"AtomicDimensionlessMassMat");
|
||||
|
||||
// classical thermodynamic heat capacity of the atoms
|
||||
HeatCapacity * heatCapacity = new HeatCapacity(this);
|
||||
interscaleManager_.add_per_atom_quantity(heatCapacity,
|
||||
"AtomicHeatCapacity");
|
||||
|
||||
// atomic thermal mass matrix
|
||||
nodalAtomicHeatCapacity_ = new AtfShapeFunctionRestriction(this,
|
||||
heatCapacity,
|
||||
shpFcn_);
|
||||
interscaleManager_.add_dense_matrix(nodalAtomicHeatCapacity_,
|
||||
"NodalAtomicHeatCapacity");
|
||||
}
|
||||
#endif
|
||||
for (_tiIt_ = timeIntegrators_.begin(); _tiIt_ != timeIntegrators_.end(); ++_tiIt_) {
|
||||
(_tiIt_->second)->construct_transfers();
|
||||
}
|
||||
@ -431,28 +310,7 @@ namespace ATC {
|
||||
atomicRegulator_->reset_lambda_contribution(powerMat,TEMPERATURE);
|
||||
}
|
||||
}
|
||||
#ifdef OBSOLETE
|
||||
//---------------------------------------------------------
|
||||
// compute_md_mass_matrix
|
||||
// compute the mass matrix arising from only atomistic
|
||||
// quadrature and contributions as a summation
|
||||
//---------------------------------------------------------
|
||||
void ATC_CouplingMomentumEnergy::compute_md_mass_matrix(FieldName thisField,
|
||||
DIAG_MAT & massMat)
|
||||
{
|
||||
|
||||
|
||||
if (thisField == DISPLACEMENT || thisField == VELOCITY) {
|
||||
massMat.reset(nodalAtomicMass_->quantity());
|
||||
}
|
||||
else if (thisField == MASS_DENSITY) { // dimensionless mass matrix
|
||||
massMat.reset(nodalAtomicCount_->quantity());
|
||||
}
|
||||
else if (thisField == TEMPERATURE) {
|
||||
massMat.reset(nodalAtomicHeatCapacity_->quantity());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------
|
||||
// modify
|
||||
// parses inputs and modifies state of the filter
|
||||
|
||||
Reference in New Issue
Block a user