apply clang-tidy updates
This commit is contained in:
@ -775,7 +775,7 @@ namespace ATC {
|
|||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
/** allow FE_Engine to construct data manager after mesh is constructed */
|
/** allow FE_Engine to construct data manager after mesh is constructed */
|
||||||
void ATC_Coupling::construct_prescribed_data_manager (void) {
|
void ATC_Coupling::construct_prescribed_data_manager () {
|
||||||
prescribedDataMgr_ = new PrescribedDataManager(feEngine_,fieldSizes_);
|
prescribedDataMgr_ = new PrescribedDataManager(feEngine_,fieldSizes_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1704,7 +1704,7 @@ namespace ATC {
|
|||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
/** method to trigger construction of mesh data after mesh construction */
|
/** method to trigger construction of mesh data after mesh construction */
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
void ATC_Coupling::initialize_mesh_data(void)
|
void ATC_Coupling::initialize_mesh_data()
|
||||||
{
|
{
|
||||||
int nelts = feEngine_->fe_mesh()->num_elements();
|
int nelts = feEngine_->fe_mesh()->num_elements();
|
||||||
elementToMaterialMap_.reset(nelts);
|
elementToMaterialMap_.reset(nelts);
|
||||||
@ -1715,7 +1715,7 @@ namespace ATC {
|
|||||||
}
|
}
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
|
|
||||||
void ATC_Coupling::reset_flux_mask(void)
|
void ATC_Coupling::reset_flux_mask()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
// this is exact only for uniform meshes and certain types of atomic weights
|
// this is exact only for uniform meshes and certain types of atomic weights
|
||||||
|
|||||||
@ -357,7 +357,7 @@ namespace ATC {
|
|||||||
// compute_scalar : added energy
|
// compute_scalar : added energy
|
||||||
// this is used in the line search
|
// this is used in the line search
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
double ATC_CouplingMomentum::compute_scalar(void)
|
double ATC_CouplingMomentum::compute_scalar()
|
||||||
{
|
{
|
||||||
double energy = extrinsicModelManager_.compute_scalar();
|
double energy = extrinsicModelManager_.compute_scalar();
|
||||||
return energy;
|
return energy;
|
||||||
|
|||||||
@ -327,7 +327,7 @@ namespace ATC {
|
|||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
// compute_scalar : added energy
|
// compute_scalar : added energy
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
double ATC_CouplingMomentumEnergy::compute_scalar(void)
|
double ATC_CouplingMomentumEnergy::compute_scalar()
|
||||||
{
|
{
|
||||||
double energy = 0.0;
|
double energy = 0.0;
|
||||||
energy += extrinsicModelManager_.compute_scalar();
|
energy += extrinsicModelManager_.compute_scalar();
|
||||||
@ -337,7 +337,7 @@ namespace ATC {
|
|||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
// total kinetic energy
|
// total kinetic energy
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
double ATC_CouplingMomentumEnergy::kinetic_energy(void)
|
double ATC_CouplingMomentumEnergy::kinetic_energy()
|
||||||
{
|
{
|
||||||
const MATRIX & M = massMats_[VELOCITY].quantity();
|
const MATRIX & M = massMats_[VELOCITY].quantity();
|
||||||
|
|
||||||
@ -355,7 +355,7 @@ namespace ATC {
|
|||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
// total potential energy
|
// total potential energy
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
double ATC_CouplingMomentumEnergy::potential_energy(void)
|
double ATC_CouplingMomentumEnergy::potential_energy()
|
||||||
{
|
{
|
||||||
Array<FieldName> mask(1);
|
Array<FieldName> mask(1);
|
||||||
mask(0) = VELOCITY;
|
mask(0) = VELOCITY;
|
||||||
|
|||||||
@ -1674,7 +1674,7 @@ pecified
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
void ATC_Method::set_reference_potential_energy(void)
|
void ATC_Method::set_reference_potential_energy()
|
||||||
{
|
{
|
||||||
if (setRefPE_) {
|
if (setRefPE_) {
|
||||||
if (setRefPEvalue_) {
|
if (setRefPEvalue_) {
|
||||||
@ -2170,7 +2170,7 @@ pecified
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
void ATC_Method::compute_nodeset_output(void)
|
void ATC_Method::compute_nodeset_output()
|
||||||
{
|
{
|
||||||
map< pair <string, FieldName>, NodesetOperationType >::const_iterator iter;
|
map< pair <string, FieldName>, NodesetOperationType >::const_iterator iter;
|
||||||
for (iter = nsetData_.begin(); iter != nsetData_.end();iter++){
|
for (iter = nsetData_.begin(); iter != nsetData_.end();iter++){
|
||||||
@ -2194,7 +2194,7 @@ pecified
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
void ATC_Method::compute_faceset_output(void)
|
void ATC_Method::compute_faceset_output()
|
||||||
{
|
{
|
||||||
map < pair<string,string>, FacesetIntegralType >::const_iterator iter;
|
map < pair<string,string>, FacesetIntegralType >::const_iterator iter;
|
||||||
DENS_MAT values;
|
DENS_MAT values;
|
||||||
@ -2223,7 +2223,7 @@ pecified
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
void ATC_Method::compute_elementset_output(void)
|
void ATC_Method::compute_elementset_output()
|
||||||
{
|
{
|
||||||
map< pair <string, FieldName>, ElementsetOperationType >::const_iterator iter;
|
map< pair <string, FieldName>, ElementsetOperationType >::const_iterator iter;
|
||||||
for (iter = esetData_.begin(); iter != esetData_.end();iter++){
|
for (iter = esetData_.begin(); iter != esetData_.end();iter++){
|
||||||
@ -2379,7 +2379,7 @@ pecified
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
void ATC_Method::remap_ghost_ref_positions(void)
|
void ATC_Method::remap_ghost_ref_positions()
|
||||||
{
|
{
|
||||||
|
|
||||||
int nlocal = lammpsInterface_->nlocal();
|
int nlocal = lammpsInterface_->nlocal();
|
||||||
|
|||||||
@ -916,12 +916,12 @@ namespace ATC {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
void ATC_Transfer::compute_bond_matrix(void)
|
void ATC_Transfer::compute_bond_matrix()
|
||||||
{
|
{
|
||||||
bondMatrix_->reset();
|
bondMatrix_->reset();
|
||||||
}
|
}
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
void ATC_Transfer::compute_fields(void)
|
void ATC_Transfer::compute_fields()
|
||||||
{
|
{
|
||||||
|
|
||||||
// keep per-atom computes fresh. JAZ and REJ not sure why;
|
// keep per-atom computes fresh. JAZ and REJ not sure why;
|
||||||
|
|||||||
@ -83,7 +83,7 @@ using ATC_Utility::to_string;
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
void ATC_TransferKernel::compute_kernel_matrix_molecule(void) // KKM add
|
void ATC_TransferKernel::compute_kernel_matrix_molecule() // KKM add
|
||||||
{
|
{
|
||||||
int nLocalMol = smallMoleculeSet_->local_molecule_count();
|
int nLocalMol = smallMoleculeSet_->local_molecule_count();
|
||||||
if (nLocal_>0) {
|
if (nLocal_>0) {
|
||||||
|
|||||||
@ -688,7 +688,7 @@ namespace ATC {
|
|||||||
// compute_sparsity
|
// compute_sparsity
|
||||||
// - creates sparsity template
|
// - creates sparsity template
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
void RegulatorShapeFunction::compute_sparsity(void)
|
void RegulatorShapeFunction::compute_sparsity()
|
||||||
{
|
{
|
||||||
|
|
||||||
// first get local pattern from N N^T
|
// first get local pattern from N N^T
|
||||||
|
|||||||
@ -198,7 +198,7 @@ namespace ATC {
|
|||||||
|
|
||||||
|
|
||||||
// nomenclature might be a bit backwark: control --> nodes that exert the control, & influence --> atoms that feel the influence
|
// nomenclature might be a bit backwark: control --> nodes that exert the control, & influence --> atoms that feel the influence
|
||||||
void ChargeRegulatorMethod::initialize(void)
|
void ChargeRegulatorMethod::initialize()
|
||||||
{
|
{
|
||||||
interscaleManager_ = &(atc_->interscale_manager());
|
interscaleManager_ = &(atc_->interscale_manager());
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ namespace ATC {
|
|||||||
|
|
||||||
int ChargeRegulatorMethod::nlocal() { return atc_->nlocal(); }
|
int ChargeRegulatorMethod::nlocal() { return atc_->nlocal(); }
|
||||||
|
|
||||||
void ChargeRegulatorMethod::set_greens_functions(void)
|
void ChargeRegulatorMethod::set_greens_functions()
|
||||||
{
|
{
|
||||||
// set up Green's function per node
|
// set up Green's function per node
|
||||||
for (int i = 0; i < nNodes_; i++) {
|
for (int i = 0; i < nNodes_; i++) {
|
||||||
@ -272,7 +272,7 @@ namespace ATC {
|
|||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
// Initialize
|
// Initialize
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
void ChargeRegulatorMethodFeedback::initialize(void)
|
void ChargeRegulatorMethodFeedback::initialize()
|
||||||
{
|
{
|
||||||
ChargeRegulatorMethod::initialize();
|
ChargeRegulatorMethod::initialize();
|
||||||
if (surfaceType_ != ChargeRegulator::CONDUCTOR)
|
if (surfaceType_ != ChargeRegulator::CONDUCTOR)
|
||||||
@ -284,7 +284,7 @@ namespace ATC {
|
|||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
// Initialize
|
// Initialize
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
void ChargeRegulatorMethodFeedback::construct_transfers(void)
|
void ChargeRegulatorMethodFeedback::construct_transfers()
|
||||||
{
|
{
|
||||||
ChargeRegulatorMethod::construct_transfers();
|
ChargeRegulatorMethod::construct_transfers();
|
||||||
|
|
||||||
@ -301,7 +301,7 @@ namespace ATC {
|
|||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
// find measurement atoms and nodes
|
// find measurement atoms and nodes
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
void ChargeRegulatorMethodFeedback::set_influence(void)
|
void ChargeRegulatorMethodFeedback::set_influence()
|
||||||
{
|
{
|
||||||
|
|
||||||
// get nodes that overlap influence atoms & compact list of influence atoms
|
// get nodes that overlap influence atoms & compact list of influence atoms
|
||||||
@ -321,7 +321,7 @@ namespace ATC {
|
|||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
// constuct a Green's submatrix
|
// constuct a Green's submatrix
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
void ChargeRegulatorMethodFeedback::set_influence_matrix(void)
|
void ChargeRegulatorMethodFeedback::set_influence_matrix()
|
||||||
{
|
{
|
||||||
// construct control-influence matrix bar{G}^-1: ds{p} = G{p,m}^-1 dphi{m}
|
// construct control-influence matrix bar{G}^-1: ds{p} = G{p,m}^-1 dphi{m}
|
||||||
|
|
||||||
@ -434,7 +434,7 @@ namespace ATC {
|
|||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
// Initialize
|
// Initialize
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
void ChargeRegulatorMethodImageCharge::initialize(void)
|
void ChargeRegulatorMethodImageCharge::initialize()
|
||||||
{
|
{
|
||||||
ChargeRegulatorMethod::initialize();
|
ChargeRegulatorMethod::initialize();
|
||||||
if (surfaceType_ != ChargeRegulator::DIELECTRIC) throw ATC_Error("currently image charge can only mimic a dielectric");
|
if (surfaceType_ != ChargeRegulator::DIELECTRIC) throw ATC_Error("currently image charge can only mimic a dielectric");
|
||||||
|
|||||||
@ -224,7 +224,7 @@ const double kMinScale_ = 10000.;
|
|||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
// Initialize
|
// Initialize
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
void ConcentrationRegulatorMethodTransition::initialize(void)
|
void ConcentrationRegulatorMethodTransition::initialize()
|
||||||
{
|
{
|
||||||
#ifdef ATC_VERBOSE
|
#ifdef ATC_VERBOSE
|
||||||
lammpsInterface_->print_msg_once(
|
lammpsInterface_->print_msg_once(
|
||||||
@ -289,7 +289,7 @@ const double kMinScale_ = 10000.;
|
|||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
// pre exchange
|
// pre exchange
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
void ConcentrationRegulatorMethodTransition::pre_exchange(void)
|
void ConcentrationRegulatorMethodTransition::pre_exchange()
|
||||||
{
|
{
|
||||||
// return if should not be called on this timestep
|
// return if should not be called on this timestep
|
||||||
if ( ! lammpsInterface_->now(frequency_)) return;
|
if ( ! lammpsInterface_->now(frequency_)) return;
|
||||||
@ -312,7 +312,7 @@ const double kMinScale_ = 10000.;
|
|||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
// pre force
|
// pre force
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
void ConcentrationRegulatorMethodTransition::pre_force(void)
|
void ConcentrationRegulatorMethodTransition::pre_force()
|
||||||
{
|
{
|
||||||
transition();
|
transition();
|
||||||
}
|
}
|
||||||
@ -353,7 +353,7 @@ const double kMinScale_ = 10000.;
|
|||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
// excess
|
// excess
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
int ConcentrationRegulatorMethodTransition::excess(void) const
|
int ConcentrationRegulatorMethodTransition::excess() const
|
||||||
{
|
{
|
||||||
int nexcess = count()-targetCount_;
|
int nexcess = count()-targetCount_;
|
||||||
nexcess = max(min(nexcess,maxExchanges_),-maxExchanges_);
|
nexcess = max(min(nexcess,maxExchanges_),-maxExchanges_);
|
||||||
@ -362,7 +362,7 @@ const double kMinScale_ = 10000.;
|
|||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
// count
|
// count
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
int ConcentrationRegulatorMethodTransition::count(void) const
|
int ConcentrationRegulatorMethodTransition::count() const
|
||||||
{
|
{
|
||||||
// integrate concentration over region
|
// integrate concentration over region
|
||||||
const DENS_MAT & c = (atc_->field(SPECIES_CONCENTRATION)).quantity();
|
const DENS_MAT & c = (atc_->field(SPECIES_CONCENTRATION)).quantity();
|
||||||
|
|||||||
@ -181,7 +181,7 @@ namespace ATC {
|
|||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
// compute_scalar
|
// compute_scalar
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
double ExtrinsicModelManager::compute_scalar(void)
|
double ExtrinsicModelManager::compute_scalar()
|
||||||
{
|
{
|
||||||
double value = 0.;
|
double value = 0.;
|
||||||
vector<ExtrinsicModel *>::iterator imodel;
|
vector<ExtrinsicModel *>::iterator imodel;
|
||||||
@ -360,7 +360,7 @@ namespace ATC {
|
|||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
// initialize
|
// initialize
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
void ExtrinsicModel::initialize(void)
|
void ExtrinsicModel::initialize()
|
||||||
{
|
{
|
||||||
physicsModel_->initialize();
|
physicsModel_->initialize();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -483,7 +483,7 @@ namespace ATC {
|
|||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
// compute_scalar : added energy = - f.x
|
// compute_scalar : added energy = - f.x
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
double ExtrinsicModelElectrostatic::compute_scalar(void)
|
double ExtrinsicModelElectrostatic::compute_scalar()
|
||||||
{
|
{
|
||||||
//((atc_->interscale_manager()).fundamental_atom_quantity(LammpsInterface::ATOM_POSITION))->force_reset();
|
//((atc_->interscale_manager()).fundamental_atom_quantity(LammpsInterface::ATOM_POSITION))->force_reset();
|
||||||
const DENS_MAT & atomPosition = ((atc_->interscale_manager()).fundamental_atom_quantity(LammpsInterface::ATOM_POSITION))->quantity();
|
const DENS_MAT & atomPosition = ((atc_->interscale_manager()).fundamental_atom_quantity(LammpsInterface::ATOM_POSITION))->quantity();
|
||||||
|
|||||||
@ -430,7 +430,7 @@ namespace ATC{
|
|||||||
//-----------------------------------------------------------------
|
//-----------------------------------------------------------------
|
||||||
// write geometry
|
// write geometry
|
||||||
//-----------------------------------------------------------------
|
//-----------------------------------------------------------------
|
||||||
void FE_Engine::write_geometry(void)
|
void FE_Engine::write_geometry()
|
||||||
{
|
{
|
||||||
outputManager_.write_geometry(feMesh_->coordinates(),
|
outputManager_.write_geometry(feMesh_->coordinates(),
|
||||||
feMesh_->connectivity());
|
feMesh_->connectivity());
|
||||||
@ -2373,7 +2373,7 @@ namespace ATC{
|
|||||||
feMesh_->face_shape_function(face, _fN_, _fdN_, _nN_, _fweights_);
|
feMesh_->face_shape_function(face, _fN_, _fdN_, _nN_, _fweights_);
|
||||||
feMesh_->element_coordinates(elem, xCoords);
|
feMesh_->element_coordinates(elem, xCoords);
|
||||||
|
|
||||||
MultAB(xCoords,_fN_,xAtIPs,0,1); //xAtIPs = xCoords*(N.transpose());
|
MultAB(xCoords,_fN_,xAtIPs,false,true); //xAtIPs = xCoords*(N.transpose());
|
||||||
|
|
||||||
// interpolate prescribed flux at ips of this element
|
// interpolate prescribed flux at ips of this element
|
||||||
|
|
||||||
|
|||||||
@ -404,7 +404,7 @@ namespace ATC {
|
|||||||
// -------------------------------------------------------------
|
// -------------------------------------------------------------
|
||||||
// initialize
|
// initialize
|
||||||
// -------------------------------------------------------------
|
// -------------------------------------------------------------
|
||||||
void FE_Mesh::initialize(void)
|
void FE_Mesh::initialize()
|
||||||
{
|
{
|
||||||
|
|
||||||
bool aligned = is_aligned();
|
bool aligned = is_aligned();
|
||||||
@ -469,7 +469,7 @@ namespace ATC {
|
|||||||
// -------------------------------------------------------------
|
// -------------------------------------------------------------
|
||||||
// test whether almost structured
|
// test whether almost structured
|
||||||
// -------------------------------------------------------------
|
// -------------------------------------------------------------
|
||||||
bool FE_Mesh::is_aligned(void) const
|
bool FE_Mesh::is_aligned() const
|
||||||
{
|
{
|
||||||
vector<bool> foundBestMatch(nSD_,false);
|
vector<bool> foundBestMatch(nSD_,false);
|
||||||
vector<DENS_VEC> tangents(nSD_);
|
vector<DENS_VEC> tangents(nSD_);
|
||||||
@ -518,7 +518,7 @@ namespace ATC {
|
|||||||
// -------------------------------------------------------------
|
// -------------------------------------------------------------
|
||||||
// element_type
|
// element_type
|
||||||
// -------------------------------------------------------------
|
// -------------------------------------------------------------
|
||||||
string FE_Mesh::element_type(void) const {
|
string FE_Mesh::element_type() const {
|
||||||
int npe = feElement_->num_elt_nodes();
|
int npe = feElement_->num_elt_nodes();
|
||||||
if (npe == 4) { return "TET4"; }
|
if (npe == 4) { return "TET4"; }
|
||||||
else if (npe == 8) { return "HEX8"; }
|
else if (npe == 8) { return "HEX8"; }
|
||||||
@ -1915,7 +1915,7 @@ namespace ATC {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FE_3DMesh::set_unique_connectivity(void)
|
void FE_3DMesh::set_unique_connectivity()
|
||||||
{
|
{
|
||||||
int numEltNodes = feElement_->num_elt_nodes();
|
int numEltNodes = feElement_->num_elt_nodes();
|
||||||
connectivityUnique_.reset(numEltNodes, nElts_);
|
connectivityUnique_.reset(numEltNodes, nElts_);
|
||||||
|
|||||||
@ -483,7 +483,7 @@ void LammpsInterface::periodicity_correction(double * x) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LammpsInterface::set_reference_box(void) const
|
void LammpsInterface::set_reference_box() const
|
||||||
{
|
{
|
||||||
double * hi = lammps_->domain->boxhi;
|
double * hi = lammps_->domain->boxhi;
|
||||||
double * lo = lammps_->domain->boxlo;
|
double * lo = lammps_->domain->boxlo;
|
||||||
@ -570,7 +570,7 @@ void LammpsInterface::closest_image(const double * const xi, const double * cons
|
|||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
// update interface methods
|
// update interface methods
|
||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
LammpsInterface::UnitsType LammpsInterface::units_style(void) const
|
LammpsInterface::UnitsType LammpsInterface::units_style() const
|
||||||
{
|
{
|
||||||
if (strcmp(lammps_->update->unit_style,"lj") == 0) return LJ;
|
if (strcmp(lammps_->update->unit_style,"lj") == 0) return LJ;
|
||||||
else if (strcmp(lammps_->update->unit_style,"real") == 0) return REAL;
|
else if (strcmp(lammps_->update->unit_style,"real") == 0) return REAL;
|
||||||
@ -655,7 +655,7 @@ void LammpsInterface::basis_vectors(double **basis) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//* gets the (max) lattice constant
|
//* gets the (max) lattice constant
|
||||||
double LammpsInterface::max_lattice_constant(void) const
|
double LammpsInterface::max_lattice_constant() const
|
||||||
{
|
{
|
||||||
double a1[3], a2[3], a3[3];
|
double a1[3], a2[3], a3[3];
|
||||||
unit_cell(a1,a2,a3);
|
unit_cell(a1,a2,a3);
|
||||||
@ -666,7 +666,7 @@ double LammpsInterface::max_lattice_constant(void) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//* computes a cutoff distance halfway between 1st and 2nd nearest neighbors
|
//* computes a cutoff distance halfway between 1st and 2nd nearest neighbors
|
||||||
double LammpsInterface::near_neighbor_cutoff(void) const
|
double LammpsInterface::near_neighbor_cutoff() const
|
||||||
{
|
{
|
||||||
double cutoff;
|
double cutoff;
|
||||||
double alat = LammpsInterface::max_lattice_constant();
|
double alat = LammpsInterface::max_lattice_constant();
|
||||||
@ -716,7 +716,7 @@ void LammpsInterface::unit_cell(double *a1, double *a2, double *a3) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//* gets number of atoms in a unit cell
|
//* gets number of atoms in a unit cell
|
||||||
int LammpsInterface::num_atoms_per_cell(void) const
|
int LammpsInterface::num_atoms_per_cell() const
|
||||||
{
|
{
|
||||||
int naCell = 0;
|
int naCell = 0;
|
||||||
LatticeType type = lattice_style();
|
LatticeType type = lattice_style();
|
||||||
@ -733,7 +733,7 @@ int LammpsInterface::num_atoms_per_cell(void) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//* gets tributary volume for an atom
|
//* gets tributary volume for an atom
|
||||||
double LammpsInterface::volume_per_atom(void) const
|
double LammpsInterface::volume_per_atom() const
|
||||||
{
|
{
|
||||||
double naCell = num_atoms_per_cell();
|
double naCell = num_atoms_per_cell();
|
||||||
double volPerAtom =
|
double volPerAtom =
|
||||||
@ -1468,7 +1468,7 @@ LAMMPS_NS::Compute * LammpsInterface::const_to_active(COMPUTE_POINTER computePoi
|
|||||||
// compute pe/atom interface methods
|
// compute pe/atom interface methods
|
||||||
// - the only compute "owned" by ATC
|
// - the only compute "owned" by ATC
|
||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
int LammpsInterface::create_compute_pe_peratom(void) const
|
int LammpsInterface::create_compute_pe_peratom() const
|
||||||
{
|
{
|
||||||
char **list = new char*[4];
|
char **list = new char*[4];
|
||||||
string atomPeName = compute_pe_name();
|
string atomPeName = compute_pe_name();
|
||||||
@ -1493,7 +1493,7 @@ int LammpsInterface::create_compute_pe_peratom(void) const
|
|||||||
return icompute;
|
return icompute;
|
||||||
}
|
}
|
||||||
|
|
||||||
double * LammpsInterface::compute_pe_peratom(void) const
|
double * LammpsInterface::compute_pe_peratom() const
|
||||||
{
|
{
|
||||||
if (atomPE_) {
|
if (atomPE_) {
|
||||||
atomPE_->compute_peratom();
|
atomPE_->compute_peratom();
|
||||||
|
|||||||
@ -84,7 +84,7 @@ LinearSolver::LinearSolver(
|
|||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
// Setup
|
// Setup
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
void LinearSolver::setup(void)
|
void LinearSolver::setup()
|
||||||
{
|
{
|
||||||
tol_ = kTol;
|
tol_ = kTol;
|
||||||
nVariables_ = matrix_.nRows();
|
nVariables_ = matrix_.nRows();
|
||||||
@ -113,7 +113,7 @@ void LinearSolver::setup(void)
|
|||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
// Initialize
|
// Initialize
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
void LinearSolver::allow_reinitialization(void)
|
void LinearSolver::allow_reinitialization()
|
||||||
{
|
{
|
||||||
if (constraintHandlerType_ == PENALIZE_CONSTRAINTS) {
|
if (constraintHandlerType_ == PENALIZE_CONSTRAINTS) {
|
||||||
if (matrixModified_ ) throw ATC_Error("LinearSolver: can't allow reinitialization after matrix has been modified");
|
if (matrixModified_ ) throw ATC_Error("LinearSolver: can't allow reinitialization after matrix has been modified");
|
||||||
@ -157,7 +157,7 @@ void LinearSolver::initialize(const BC_SET * bcs)
|
|||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
// initialize_matrix
|
// initialize_matrix
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
void LinearSolver::initialize_matrix(void)
|
void LinearSolver::initialize_matrix()
|
||||||
{
|
{
|
||||||
if ( initializedMatrix_ ) return;
|
if ( initializedMatrix_ ) return;
|
||||||
if (constraintHandlerType_ == PENALIZE_CONSTRAINTS) {
|
if (constraintHandlerType_ == PENALIZE_CONSTRAINTS) {
|
||||||
@ -172,7 +172,7 @@ void LinearSolver::initialize_matrix(void)
|
|||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
// initialize_inverse
|
// initialize_inverse
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
void LinearSolver::initialize_inverse(void)
|
void LinearSolver::initialize_inverse()
|
||||||
{
|
{
|
||||||
if ( initializedInverse_ ) return;
|
if ( initializedInverse_ ) return;
|
||||||
if (solverType_ == ITERATIVE_SOLVE_SYMMETRIC
|
if (solverType_ == ITERATIVE_SOLVE_SYMMETRIC
|
||||||
@ -196,7 +196,7 @@ void LinearSolver::initialize_inverse(void)
|
|||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
// initialize_rhs
|
// initialize_rhs
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
void LinearSolver::initialize_rhs(void)
|
void LinearSolver::initialize_rhs()
|
||||||
{
|
{
|
||||||
if (! rhs_ ) return;
|
if (! rhs_ ) return;
|
||||||
if (! bcs_ ) {
|
if (! bcs_ ) {
|
||||||
@ -215,7 +215,7 @@ void LinearSolver::initialize_rhs(void)
|
|||||||
// add matrix penalty
|
// add matrix penalty
|
||||||
// - change matrix for Dirichlet conditions: add penalty
|
// - change matrix for Dirichlet conditions: add penalty
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
void LinearSolver::add_matrix_penalty(void)
|
void LinearSolver::add_matrix_penalty()
|
||||||
{
|
{
|
||||||
penalty_ = kPenalty; // relative to matrix diagonal
|
penalty_ = kPenalty; // relative to matrix diagonal
|
||||||
SPAR_MAT & A = matrixCopy_;
|
SPAR_MAT & A = matrixCopy_;
|
||||||
@ -233,7 +233,7 @@ void LinearSolver::add_matrix_penalty(void)
|
|||||||
// partition matrix
|
// partition matrix
|
||||||
// - partition matrix based on Dirichlet constraints
|
// - partition matrix based on Dirichlet constraints
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
void LinearSolver::partition_matrix(void)
|
void LinearSolver::partition_matrix()
|
||||||
{
|
{
|
||||||
fixedSet_.clear();
|
fixedSet_.clear();
|
||||||
BC_SET::const_iterator itr;
|
BC_SET::const_iterator itr;
|
||||||
|
|||||||
@ -172,7 +172,7 @@ void OutputManager::read_restart_file(string fileName, RESTART_LIST *data)
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//*
|
//*
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void OutputManager::write_globals(void)
|
void OutputManager::write_globals()
|
||||||
{
|
{
|
||||||
if ( outputPrefix_ == "NULL") return;
|
if ( outputPrefix_ == "NULL") return;
|
||||||
string file = outputPrefix_ + ".GLOBALS";
|
string file = outputPrefix_ + ".GLOBALS";
|
||||||
@ -224,7 +224,7 @@ void OutputManager::write_geometry(const MATRIX *coordinates,
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//*
|
//*
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void OutputManager::write_geometry_ensight(void)
|
void OutputManager::write_geometry_ensight()
|
||||||
{
|
{
|
||||||
// geometry based on a reference configuration
|
// geometry based on a reference configuration
|
||||||
string geom_file_name = outputPrefix_ + ".geo";
|
string geom_file_name = outputPrefix_ + ".geo";
|
||||||
@ -327,7 +327,7 @@ void OutputManager::write_geometry_ensight(void)
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//*
|
//*
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void OutputManager::write_geometry_text(void)
|
void OutputManager::write_geometry_text()
|
||||||
{
|
{
|
||||||
if ( outputPrefix_ == "NULL") return;
|
if ( outputPrefix_ == "NULL") return;
|
||||||
// geometry based on a reference configuration
|
// geometry based on a reference configuration
|
||||||
|
|||||||
@ -18,7 +18,7 @@ PairMap::PairMap(LammpsInterface * lammpsInterface, int groupbit ):
|
|||||||
nPairs_(0), nBonds_(0)
|
nPairs_(0), nBonds_(0)
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
PairMap::~PairMap(void)
|
PairMap::~PairMap()
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
//==========================================================
|
//==========================================================
|
||||||
@ -27,7 +27,7 @@ PairMapNeighbor::PairMapNeighbor(LammpsInterface * lammpsInterface, int groupbit
|
|||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
void PairMapNeighbor::reset(void) const
|
void PairMapNeighbor::reset() const
|
||||||
{
|
{
|
||||||
int inum = lammpsInterface_->neighbor_list_inum();
|
int inum = lammpsInterface_->neighbor_list_inum();
|
||||||
int *ilist = lammpsInterface_->neighbor_list_ilist();
|
int *ilist = lammpsInterface_->neighbor_list_ilist();
|
||||||
@ -90,7 +90,7 @@ PairVirialEulerian::PairVirialEulerian(LammpsInterface * lammpsInterface,
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void PairVirialEulerian::reset(void) const
|
void PairVirialEulerian::reset() const
|
||||||
{
|
{
|
||||||
int nPairs = pairMap_.size();
|
int nPairs = pairMap_.size();
|
||||||
quantity_.reset(nPairs,nCols_);
|
quantity_.reset(nPairs,nCols_);
|
||||||
@ -129,7 +129,7 @@ PairVirialLagrangian::PairVirialLagrangian(LammpsInterface * lammpsInterface,
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void PairVirialLagrangian::reset(void) const
|
void PairVirialLagrangian::reset() const
|
||||||
{
|
{
|
||||||
int nPairs = pairMap_.size();
|
int nPairs = pairMap_.size();
|
||||||
quantity_.reset(nPairs,nCols_);
|
quantity_.reset(nPairs,nCols_);
|
||||||
@ -181,7 +181,7 @@ PairPotentialHeatFluxEulerian::PairPotentialHeatFluxEulerian(LammpsInterface * l
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void PairPotentialHeatFluxEulerian::reset(void) const
|
void PairPotentialHeatFluxEulerian::reset() const
|
||||||
{
|
{
|
||||||
int nPairs = pairMap_.size();
|
int nPairs = pairMap_.size();
|
||||||
quantity_.reset(nPairs,nCols_);
|
quantity_.reset(nPairs,nCols_);
|
||||||
@ -217,7 +217,7 @@ PairPotentialHeatFluxLagrangian::PairPotentialHeatFluxLagrangian(LammpsInterface
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void PairPotentialHeatFluxLagrangian::reset(void) const
|
void PairPotentialHeatFluxLagrangian::reset() const
|
||||||
{
|
{
|
||||||
int nPairs = pairMap_.size();
|
int nPairs = pairMap_.size();
|
||||||
quantity_.reset(nPairs,nCols_);
|
quantity_.reset(nPairs,nCols_);
|
||||||
@ -275,7 +275,7 @@ BondMatrixKernel::BondMatrixKernel(LammpsInterface * lammpsInterface,
|
|||||||
if (kernelFunction_ == nullptr)
|
if (kernelFunction_ == nullptr)
|
||||||
throw ATC_Error("No AtC kernel function initialized");
|
throw ATC_Error("No AtC kernel function initialized");
|
||||||
};
|
};
|
||||||
void BondMatrixKernel::reset(void) const
|
void BondMatrixKernel::reset() const
|
||||||
{
|
{
|
||||||
int nPairs = pairMap_.size(); // needs to come after quantity for reset
|
int nPairs = pairMap_.size(); // needs to come after quantity for reset
|
||||||
int nNodes = feMesh_->num_nodes_unique();
|
int nNodes = feMesh_->num_nodes_unique();
|
||||||
@ -328,7 +328,7 @@ BondMatrixPartitionOfUnity::BondMatrixPartitionOfUnity(LammpsInterface * lammpsI
|
|||||||
lineWg_[i] *= 0.5;
|
lineWg_[i] *= 0.5;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
void BondMatrixPartitionOfUnity::reset(void) const
|
void BondMatrixPartitionOfUnity::reset() const
|
||||||
{
|
{
|
||||||
int nNodes = feMesh_->num_nodes_unique();
|
int nNodes = feMesh_->num_nodes_unique();
|
||||||
int nPairs = pairMap_.size();
|
int nPairs = pairMap_.size();
|
||||||
|
|||||||
@ -108,7 +108,7 @@ void PhysicsModel::parse_material_file(string fileName)
|
|||||||
fileId.close();
|
fileId.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsModel::initialize(void)
|
void PhysicsModel::initialize()
|
||||||
{
|
{
|
||||||
// initialize materials
|
// initialize materials
|
||||||
vector< Material* >::const_iterator iter;
|
vector< Material* >::const_iterator iter;
|
||||||
|
|||||||
@ -111,7 +111,7 @@ PoissonSolver::~PoissonSolver()
|
|||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
// Initialize
|
// Initialize
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
void PoissonSolver::initialize(void)
|
void PoissonSolver::initialize()
|
||||||
{
|
{
|
||||||
nNodes_ = feEngine_->num_nodes();
|
nNodes_ = feEngine_->num_nodes();
|
||||||
|
|
||||||
|
|||||||
@ -523,7 +523,7 @@ namespace ATC {
|
|||||||
// print
|
// print
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
void PrescribedDataManager::print(void)
|
void PrescribedDataManager::print()
|
||||||
{
|
{
|
||||||
// print and check consistency
|
// print and check consistency
|
||||||
enum dataType {FREE=0,FIELD,SOURCE};
|
enum dataType {FREE=0,FIELD,SOURCE};
|
||||||
|
|||||||
@ -735,7 +735,7 @@ double fermi_dirac(const double E, const double T)
|
|||||||
else
|
else
|
||||||
ATC_Error("schrodinger-poisson solver:too many fixed");
|
ATC_Error("schrodinger-poisson solver:too many fixed");
|
||||||
}
|
}
|
||||||
GlobalSliceSchrodingerPoissonSolver::~GlobalSliceSchrodingerPoissonSolver(void) {
|
GlobalSliceSchrodingerPoissonSolver::~GlobalSliceSchrodingerPoissonSolver() {
|
||||||
if (solver_) delete solver_;
|
if (solver_) delete solver_;
|
||||||
}
|
}
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
|||||||
@ -237,7 +237,7 @@ StressCubicElastic::StressCubicElastic(fstream &fileId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StressCubicElastic::set_tangent(void)
|
void StressCubicElastic::set_tangent()
|
||||||
{
|
{
|
||||||
C_.reset(6,6);
|
C_.reset(6,6);
|
||||||
C_(0,0)=C_(1,1)=C_(2,2) =c11_;
|
C_(0,0)=C_(1,1)=C_(2,2) =c11_;
|
||||||
@ -374,7 +374,7 @@ StressCauchyBorn::~StressCauchyBorn()
|
|||||||
//==============================================================================
|
//==============================================================================
|
||||||
// initialize
|
// initialize
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
void StressCauchyBorn::initialize(void)
|
void StressCauchyBorn::initialize()
|
||||||
{
|
{
|
||||||
if (!initialized_) {
|
if (!initialized_) {
|
||||||
if (makeLinear_) linearize();
|
if (makeLinear_) linearize();
|
||||||
@ -393,7 +393,7 @@ void StressCauchyBorn::initialize(void)
|
|||||||
//==============================================================================
|
//==============================================================================
|
||||||
// compute the bond stiffness consistent with the einstein freq
|
// compute the bond stiffness consistent with the einstein freq
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
double StressCauchyBorn::stiffness(void) const
|
double StressCauchyBorn::stiffness() const
|
||||||
{
|
{
|
||||||
AtomCluster vac;
|
AtomCluster vac;
|
||||||
cblattice_->atom_cluster(eye<double>(3,3), potential_->cutoff_radius(), vac);
|
cblattice_->atom_cluster(eye<double>(3,3), potential_->cutoff_radius(), vac);
|
||||||
|
|||||||
@ -19,7 +19,7 @@ WeakEquationChargeDiffusion::WeakEquationChargeDiffusion()
|
|||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
// Destructor
|
// Destructor
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
WeakEquationChargeDiffusion::~WeakEquationChargeDiffusion(void)
|
WeakEquationChargeDiffusion::~WeakEquationChargeDiffusion()
|
||||||
{}
|
{}
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
// compute capacity
|
// compute capacity
|
||||||
|
|||||||
@ -19,7 +19,7 @@ WeakEquationDiffusion::WeakEquationDiffusion()
|
|||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
// Destructor
|
// Destructor
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
WeakEquationDiffusion::~WeakEquationDiffusion(void)
|
WeakEquationDiffusion::~WeakEquationDiffusion()
|
||||||
{}
|
{}
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
// compute capacity
|
// compute capacity
|
||||||
|
|||||||
@ -18,7 +18,7 @@ WeakEquationElectronContinuity::WeakEquationElectronContinuity()
|
|||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
// Destructor
|
// Destructor
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
WeakEquationElectronContinuity::~WeakEquationElectronContinuity(void)
|
WeakEquationElectronContinuity::~WeakEquationElectronContinuity()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
@ -66,7 +66,7 @@ WeakEquationElectronEquilibrium::WeakEquationElectronEquilibrium()
|
|||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
// Destructor
|
// Destructor
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
WeakEquationElectronEquilibrium::~WeakEquationElectronEquilibrium(void)
|
WeakEquationElectronEquilibrium::~WeakEquationElectronEquilibrium()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
|||||||
@ -18,7 +18,7 @@ WeakEquationElectronTemperature::WeakEquationElectronTemperature()
|
|||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
// Destructor
|
// Destructor
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
WeakEquationElectronTemperature::~WeakEquationElectronTemperature(void)
|
WeakEquationElectronTemperature::~WeakEquationElectronTemperature()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
@ -93,7 +93,7 @@ WeakEquationElectronTemperatureJouleHeating::WeakEquationElectronTemperatureJoul
|
|||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
// Destructor
|
// Destructor
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
WeakEquationElectronTemperatureJouleHeating::~WeakEquationElectronTemperatureJouleHeating(void)
|
WeakEquationElectronTemperatureJouleHeating::~WeakEquationElectronTemperatureJouleHeating()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
@ -162,7 +162,7 @@ WeakEquationElectronTemperatureConvection::WeakEquationElectronTemperatureConvec
|
|||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
// Destructor
|
// Destructor
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
WeakEquationElectronTemperatureConvection::~WeakEquationElectronTemperatureConvection(void)
|
WeakEquationElectronTemperatureConvection::~WeakEquationElectronTemperatureConvection()
|
||||||
{
|
{
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@ WeakEquationMassDiffusion::WeakEquationMassDiffusion()
|
|||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
// Destructor
|
// Destructor
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
WeakEquationMassDiffusion::~WeakEquationMassDiffusion(void)
|
WeakEquationMassDiffusion::~WeakEquationMassDiffusion()
|
||||||
{}
|
{}
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
// compute capacity
|
// compute capacity
|
||||||
|
|||||||
@ -19,7 +19,7 @@ WeakEquationPhononTemperature::WeakEquationPhononTemperature()
|
|||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
// Destructor
|
// Destructor
|
||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
WeakEquationPhononTemperature::~WeakEquationPhononTemperature(void)
|
WeakEquationPhononTemperature::~WeakEquationPhononTemperature()
|
||||||
{}
|
{}
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
// compute total energy
|
// compute total energy
|
||||||
@ -67,7 +67,7 @@ WeakEquationPhononTemperatureExchange::WeakEquationPhononTemperatureExchange()
|
|||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
// Destructor
|
// Destructor
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
WeakEquationPhononTemperatureExchange::~WeakEquationPhononTemperatureExchange(void)
|
WeakEquationPhononTemperatureExchange::~WeakEquationPhononTemperatureExchange()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
|||||||
@ -18,7 +18,7 @@ WeakEquationSchrodinger::WeakEquationSchrodinger()
|
|||||||
//--------------------------------------------------------------
|
//--------------------------------------------------------------
|
||||||
// Destructor
|
// Destructor
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
WeakEquationSchrodinger::~WeakEquationSchrodinger(void)
|
WeakEquationSchrodinger::~WeakEquationSchrodinger()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
|||||||
@ -98,10 +98,10 @@ colvarproxy_lammps::colvarproxy_lammps(LAMMPS_NS::LAMMPS *lmp,
|
|||||||
|
|
||||||
// try to extract a restart prefix from a potential restart command.
|
// try to extract a restart prefix from a potential restart command.
|
||||||
LAMMPS_NS::Output *outp = _lmp->output;
|
LAMMPS_NS::Output *outp = _lmp->output;
|
||||||
if ((outp->restart_every_single > 0) && (outp->restart1 != 0)) {
|
if ((outp->restart_every_single > 0) && (outp->restart1 != nullptr)) {
|
||||||
restart_frequency_engine = outp->restart_every_single;
|
restart_frequency_engine = outp->restart_every_single;
|
||||||
restart_output_prefix_str = std::string(outp->restart1);
|
restart_output_prefix_str = std::string(outp->restart1);
|
||||||
} else if ((outp->restart_every_double > 0) && (outp->restart2a != 0)) {
|
} else if ((outp->restart_every_double > 0) && (outp->restart2a != nullptr)) {
|
||||||
restart_frequency_engine = outp->restart_every_double;
|
restart_frequency_engine = outp->restart_every_double;
|
||||||
restart_output_prefix_str = std::string(outp->restart2a);
|
restart_output_prefix_str = std::string(outp->restart2a);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -121,7 +121,7 @@ void Ndx2Group::command(int narg, char **arg)
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
while (1) {
|
while (true) {
|
||||||
MPI_Bcast(&len,1,MPI_INT,0,world);
|
MPI_Bcast(&len,1,MPI_INT,0,world);
|
||||||
if (len < 0) break;
|
if (len < 0) break;
|
||||||
if (len > 1) {
|
if (len > 1) {
|
||||||
|
|||||||
@ -47,7 +47,7 @@ typedef struct { double x,y,z; } dbl3_t;
|
|||||||
FixNHGPU::FixNHGPU(LAMMPS *lmp, int narg, char **arg) :
|
FixNHGPU::FixNHGPU(LAMMPS *lmp, int narg, char **arg) :
|
||||||
FixNH(lmp, narg, arg)
|
FixNH(lmp, narg, arg)
|
||||||
{
|
{
|
||||||
_dtfm = 0;
|
_dtfm = nullptr;
|
||||||
_nlocal3 = 0;
|
_nlocal3 = 0;
|
||||||
_nlocal_max = 0;
|
_nlocal_max = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -154,11 +154,11 @@ using namespace FixConst;
|
|||||||
FixNVEAsphereGPU::FixNVEAsphereGPU(LAMMPS *lmp, int narg, char **arg) :
|
FixNVEAsphereGPU::FixNVEAsphereGPU(LAMMPS *lmp, int narg, char **arg) :
|
||||||
FixNVE(lmp, narg, arg)
|
FixNVE(lmp, narg, arg)
|
||||||
{
|
{
|
||||||
_dtfm = 0;
|
_dtfm = nullptr;
|
||||||
_nlocal_max = 0;
|
_nlocal_max = 0;
|
||||||
_inertia0 = 0;
|
_inertia0 = nullptr;
|
||||||
_inertia1 = 0;
|
_inertia1 = nullptr;
|
||||||
_inertia2 = 0;
|
_inertia2 = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -37,12 +37,12 @@ using namespace FixConst;
|
|||||||
FixNVEAsphereIntel::FixNVEAsphereIntel(LAMMPS *lmp, int narg, char **arg) :
|
FixNVEAsphereIntel::FixNVEAsphereIntel(LAMMPS *lmp, int narg, char **arg) :
|
||||||
FixNVE(lmp, narg, arg)
|
FixNVE(lmp, narg, arg)
|
||||||
{
|
{
|
||||||
_dtfm = 0;
|
_dtfm = nullptr;
|
||||||
_nlocal3 = 0;
|
_nlocal3 = 0;
|
||||||
_nlocal_max = 0;
|
_nlocal_max = 0;
|
||||||
_inertia0 = 0;
|
_inertia0 = nullptr;
|
||||||
_inertia1 = 0;
|
_inertia1 = nullptr;
|
||||||
_inertia2 = 0;
|
_inertia2 = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -570,7 +570,7 @@ void PairAIREBOIntel::eval(
|
|||||||
if (EVFLAG)
|
if (EVFLAG)
|
||||||
fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag);
|
fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag);
|
||||||
else
|
else
|
||||||
fix->add_result_array(f_start, 0, offload);
|
fix->add_result_array(f_start, nullptr, offload);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -428,7 +428,7 @@ void PairDPDIntel::eval(const int offload, const int vflag,
|
|||||||
if (EFLAG || vflag)
|
if (EFLAG || vflag)
|
||||||
fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag);
|
fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag);
|
||||||
else
|
else
|
||||||
fix->add_result_array(f_start, 0, offload);
|
fix->add_result_array(f_start, nullptr, offload);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
|||||||
@ -44,7 +44,7 @@ using namespace LAMMPS_NS;
|
|||||||
PairEAMIntel::PairEAMIntel(LAMMPS *lmp) : PairEAM(lmp)
|
PairEAMIntel::PairEAMIntel(LAMMPS *lmp) : PairEAM(lmp)
|
||||||
{
|
{
|
||||||
suffix_flag |= Suffix::INTEL;
|
suffix_flag |= Suffix::INTEL;
|
||||||
fp_float = 0;
|
fp_float = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@ -656,7 +656,7 @@ void PairEAMIntel::eval(const int offload, const int vflag,
|
|||||||
if (EFLAG || vflag)
|
if (EFLAG || vflag)
|
||||||
fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag);
|
fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag);
|
||||||
else
|
else
|
||||||
fix->add_result_array(f_start, 0, offload);
|
fix->add_result_array(f_start, nullptr, offload);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
|||||||
@ -881,7 +881,7 @@ void PairGayBerneIntel::eval(const int offload, const int vflag,
|
|||||||
if (EFLAG || vflag)
|
if (EFLAG || vflag)
|
||||||
fix->add_result_array(f_start, ev_global, offload, eatom, 0, 2);
|
fix->add_result_array(f_start, ev_global, offload, eatom, 0, 2);
|
||||||
else
|
else
|
||||||
fix->add_result_array(f_start, 0, offload, 0, 0, 2);
|
fix->add_result_array(f_start, nullptr, offload, 0, 0, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -448,7 +448,7 @@ void PairLJCharmmCoulCharmmIntel::eval(const int offload, const int vflag,
|
|||||||
if (EFLAG || vflag)
|
if (EFLAG || vflag)
|
||||||
fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag);
|
fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag);
|
||||||
else
|
else
|
||||||
fix->add_result_array(f_start, 0, offload);
|
fix->add_result_array(f_start, nullptr, offload);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -573,7 +573,7 @@ void PairSWIntel::eval(const int offload, const int vflag,
|
|||||||
if (EFLAG || vflag)
|
if (EFLAG || vflag)
|
||||||
fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag);
|
fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag);
|
||||||
else
|
else
|
||||||
fix->add_result_array(f_start, 0, offload);
|
fix->add_result_array(f_start, nullptr, offload);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -168,7 +168,7 @@ MDIEngine::MDIEngine(LAMMPS *_lmp, int narg, char ** /*arg*/) : Pointers(_lmp)
|
|||||||
node_match = true;
|
node_match = true;
|
||||||
exit_command = false;
|
exit_command = false;
|
||||||
|
|
||||||
while (1) {
|
while (true) {
|
||||||
|
|
||||||
// top-level mdi engine only recognizes three nodes
|
// top-level mdi engine only recognizes three nodes
|
||||||
// DEFAULT, INIT_MD, INIT_OPTG
|
// DEFAULT, INIT_MD, INIT_OPTG
|
||||||
@ -760,7 +760,7 @@ void MDIEngine::mdi_optg()
|
|||||||
timer->init();
|
timer->init();
|
||||||
timer->barrier_start();
|
timer->barrier_start();
|
||||||
|
|
||||||
while (1) {
|
while (true) {
|
||||||
update->minimize->run(1);
|
update->minimize->run(1);
|
||||||
|
|
||||||
if (strcmp(mdicmd, "@COORDS") != 0 && strcmp(mdicmd, "@FORCES") != 0) break;
|
if (strcmp(mdicmd, "@COORDS") != 0 && strcmp(mdicmd, "@FORCES") != 0) break;
|
||||||
@ -956,9 +956,9 @@ void MDIEngine::create_system()
|
|||||||
// optionally set charges if specified by ">CHARGES"
|
// optionally set charges if specified by ">CHARGES"
|
||||||
|
|
||||||
if (flag_velocities)
|
if (flag_velocities)
|
||||||
lammps_create_atoms(lmp, sys_natoms, NULL, sys_types, sys_coords, sys_velocities, NULL, 1);
|
lammps_create_atoms(lmp, sys_natoms, nullptr, sys_types, sys_coords, sys_velocities, nullptr, 1);
|
||||||
else
|
else
|
||||||
lammps_create_atoms(lmp, sys_natoms, NULL, sys_types, sys_coords, NULL, NULL, 1);
|
lammps_create_atoms(lmp, sys_natoms, nullptr, sys_types, sys_coords, nullptr, nullptr, 1);
|
||||||
|
|
||||||
if (flag_charges) lammps_scatter_atoms(lmp, (char *) "q", 1, 1, sys_charges);
|
if (flag_charges) lammps_scatter_atoms(lmp, (char *) "q", 1, 1, sys_charges);
|
||||||
|
|
||||||
|
|||||||
@ -164,8 +164,8 @@ void ThirdOrder::command(int narg, char **arg)
|
|||||||
folded = 0;
|
folded = 0;
|
||||||
|
|
||||||
// set Neigborlist attributes to NULL
|
// set Neigborlist attributes to NULL
|
||||||
ijnum = NULL;
|
ijnum = nullptr;
|
||||||
neighbortags = NULL;
|
neighbortags = nullptr;
|
||||||
|
|
||||||
// read options from end of input line
|
// read options from end of input line
|
||||||
if (style == REGULAR) options(narg-3,&arg[3]);
|
if (style == REGULAR) options(narg-3,&arg[3]);
|
||||||
|
|||||||
Reference in New Issue
Block a user