diff --git a/lib/atc/ATC_Coupling.cpp b/lib/atc/ATC_Coupling.cpp index b021584186..9468064f8d 100644 --- a/lib/atc/ATC_Coupling.cpp +++ b/lib/atc/ATC_Coupling.cpp @@ -1693,7 +1693,7 @@ namespace ATC { extrinsicModelManager_.construct_transfers(); } //-------------------------------------------------- - void ATC_Coupling::delete_mass_mat_time_filter(FieldName thisField) + void ATC_Coupling::delete_mass_mat_time_filter(FieldName /* thisField */) { } //-------------------------------------------------- diff --git a/lib/atc/ATC_Coupling.h b/lib/atc/ATC_Coupling.h index 002041b536..3816a82798 100644 --- a/lib/atc/ATC_Coupling.h +++ b/lib/atc/ATC_Coupling.h @@ -131,7 +131,7 @@ namespace ATC { virtual void initialize_mesh_data(void); // public for FieldIntegrator - bool source_atomic_quadrature(FieldName field) + bool source_atomic_quadrature(FieldName /* field */) { return (sourceIntegration_ == FULL_DOMAIN_ATOMIC_QUADRATURE_SOURCE); } ATC::IntegrationDomainType source_integration() { return sourceIntegration_; } diff --git a/lib/atc/ATC_CouplingMomentumEnergy.cpp b/lib/atc/ATC_CouplingMomentumEnergy.cpp index c4f7829c60..bf0edc71fb 100644 --- a/lib/atc/ATC_CouplingMomentumEnergy.cpp +++ b/lib/atc/ATC_CouplingMomentumEnergy.cpp @@ -319,7 +319,7 @@ namespace ATC { // modify // parses inputs and modifies state of the filter //-------------------------------------------------------- - bool ATC_CouplingMomentumEnergy::modify(int narg, char **arg) + bool ATC_CouplingMomentumEnergy::modify(int /* narg */, char ** /* arg */) { return false; } diff --git a/lib/atc/ATC_Method.h b/lib/atc/ATC_Method.h index aa8f238721..e356243e03 100644 --- a/lib/atc/ATC_Method.h +++ b/lib/atc/ATC_Method.h @@ -140,9 +140,9 @@ namespace ATC { /** compute scalar for output */ virtual double compute_scalar() {return 0.;} /** compute vector for output */ - virtual double compute_vector(int n) {return 0.;} + virtual double compute_vector(int /* n */) {return 0.;} /** compute vector for output */ - virtual double compute_array(int irow, int icol) {return 0.;}; + virtual double compute_array(int /* irow */, int /* icol */) {return 0.;}; int scalar_flag() const {return scalarFlag_;} int vector_flag() const {return vectorFlag_;} int size_vector() const {return sizeVector_;} @@ -398,8 +398,8 @@ namespace ATC { // /** determine weighting method for atomic integration */ // void compute_consistent_md_mass_matrix(const SPAR_MAT & shapeFunctionMatrix, // SPAR_MAT & mdMassMatrix); - virtual void compute_md_mass_matrix(FieldName thisField, - DIAG_MAT & massMat) {}; + virtual void compute_md_mass_matrix(FieldName /* thisField */, + DIAG_MAT & /* massMat */) {}; /** access to md mass matrices */ DIAG_MAN &mass_mat_md_inv(FieldName thisField) diff --git a/lib/atc/ATC_Transfer.cpp b/lib/atc/ATC_Transfer.cpp index 968dcbbea7..c876f46634 100644 --- a/lib/atc/ATC_Transfer.cpp +++ b/lib/atc/ATC_Transfer.cpp @@ -1658,7 +1658,7 @@ namespace ATC { } //-------------------------------------------------------------------- void ATC_Transfer::compute_vacancy_concentration(DENS_MAT & Cv, - const DENS_MAT & H, const DENS_MAT & rhoN) + const DENS_MAT & H, const DENS_MAT & /* rhoN */) { int * type = lammpsInterface_->atom_type(); DENS_MAT new_rho(nNodes_,1); diff --git a/lib/atc/ATC_TransferPartitionOfUnity.cpp b/lib/atc/ATC_TransferPartitionOfUnity.cpp index a847a8ee3b..5d83fd8fd7 100644 --- a/lib/atc/ATC_TransferPartitionOfUnity.cpp +++ b/lib/atc/ATC_TransferPartitionOfUnity.cpp @@ -54,7 +54,7 @@ namespace ATC { //------------------------------------------------------------------- void ATC_TransferPartitionOfUnity::compute_projection( - const DENS_MAT & atomData, DENS_MAT & nodeData) + const DENS_MAT & /* atomData */, DENS_MAT & /* nodeData */) { throw ATC_Error("unimplemented function"); } diff --git a/lib/atc/AtomicRegulator.cpp b/lib/atc/AtomicRegulator.cpp index 9d329852af..9c7e758816 100644 --- a/lib/atc/AtomicRegulator.cpp +++ b/lib/atc/AtomicRegulator.cpp @@ -158,7 +158,7 @@ namespace ATC { // parses and adjusts controller state based on // user input, in the style of LAMMPS user input //-------------------------------------------------------- - bool AtomicRegulator::modify(int narg, char **arg) + bool AtomicRegulator::modify(int /* narg */, char **arg) { bool foundMatch = false; diff --git a/lib/atc/AtomicRegulator.h b/lib/atc/AtomicRegulator.h index 454f54989d..8fb7de1006 100644 --- a/lib/atc/AtomicRegulator.h +++ b/lib/atc/AtomicRegulator.h @@ -90,7 +90,7 @@ namespace ATC { /** add output information */ virtual void output(OUTPUT_LIST & outputData) const; - virtual double compute_vector(int n) const {return 0;} + virtual double compute_vector(int /* n */) const {return 0;} /** final work at the end of a run */ virtual void finish(); @@ -123,14 +123,15 @@ namespace ATC { virtual void pack_fields(RESTART_LIST & data); /** thermo output */ - virtual int size_vector(int s) const {return 0;}; + virtual int size_vector(int /* s */) const {return 0;}; // coupling to FE state /** FE state variable regulator is applied to */ virtual RegulatorTargetType regulator_target() const {return regulatorTarget_;}; /** type of boundary coupling */ //TEMP_JAT field variable should be removed - virtual RegulatorCouplingType coupling_mode(const FieldName field=NUM_TOTAL_FIELDS) const {return couplingMode_;}; + virtual RegulatorCouplingType coupling_mode(const FieldName /* field */) const {return couplingMode_;}; + virtual RegulatorCouplingType coupling_mode() const {return couplingMode_;}; /** compute the thermal boundary flux, must be consistent with regulator */ virtual void compute_boundary_flux(FIELDS & fields); /** add contributions (if any) to the finite element right-hand side */ @@ -140,7 +141,7 @@ namespace ATC { /** returns a pointer to the DENS_MAN associated with the tag, creates a new data member if necessary */ DENS_MAN * regulator_data(const std::string tag, int nCols); /** can externally set regulator dynamic contributions */ - virtual void reset_lambda_contribution(const DENS_MAT & target, const FieldName field) {}; + virtual void reset_lambda_contribution(const DENS_MAT & /* target */, const FieldName /* field */) {}; virtual void reset_lambda_contribution(const DENS_MAT & target) { reset_lambda_contribution(target,NUM_TOTAL_FIELDS); } /** returns a const pointer to the DENS_MAN associated with the tag, or NULL */ const DENS_MAN * regulator_data(const std::string tag) const; @@ -291,29 +292,29 @@ namespace ATC { virtual void reset_nlocal(){}; /** set up atom to material identification */ - virtual void reset_atom_materials(const Array & elementToMaterialMap, - const MatrixDependencyManager * atomElement){}; + virtual void reset_atom_materials(const Array & /* elementToMaterialMap */, + const MatrixDependencyManager * /* atomElement */){}; /** applies regulator to atoms in the pre-predictor phase */ - virtual void apply_pre_predictor(double dt){}; + virtual void apply_pre_predictor(double /* dt */){}; /** applies regulator to atoms in the mid-predictor phase */ - virtual void apply_mid_predictor(double dt){}; + virtual void apply_mid_predictor(double /* dt */){}; /** applies regulator to atoms in the post-predictor phase */ - virtual void apply_post_predictor(double dt){}; + virtual void apply_post_predictor(double /* dt */){}; /** applies regulator to atoms in the pre-corrector phase */ - virtual void apply_pre_corrector(double dt){}; + virtual void apply_pre_corrector(double /* dt */){}; /** applies regulator to atoms in the post-corrector phase */ - virtual void apply_post_corrector(double dt){}; + virtual void apply_post_corrector(double /* dt */){}; /** applies regulator to atoms in the pre-corrector phase */ - virtual void apply_pre_force(double dt){}; + virtual void apply_pre_force(double /* dt */){}; /** applies regulator to atoms in the post-corrector phase */ - virtual void apply_post_force(double dt){}; + virtual void apply_post_force(double /* dt */){}; /** applies regulator in pre-force phase */ virtual void pre_force(){}; @@ -328,17 +329,17 @@ namespace ATC { virtual void compute_boundary_flux(FIELDS & fields); /** add contributions (if any) to the finite element right-hand side */ - virtual void add_to_rhs(FIELDS & rhs){}; + virtual void add_to_rhs(FIELDS & /* rhs */){}; /** get data for output */ - virtual void output(OUTPUT_LIST & outputData){}; - virtual double compute_vector(int n) const {return 0;} + virtual void output(OUTPUT_LIST & /* outputData */){}; + virtual double compute_vector(int /* n */) const {return 0;} /** final work at the end of a run */ virtual void finish(){}; /** pack fields for restart */ - virtual void pack_fields(RESTART_LIST & data){}; + virtual void pack_fields(RESTART_LIST & /* data */){}; protected: diff --git a/lib/atc/BodyForce.h b/lib/atc/BodyForce.h index eef5df03be..10d7cf66c1 100644 --- a/lib/atc/BodyForce.h +++ b/lib/atc/BodyForce.h @@ -18,8 +18,8 @@ namespace ATC { public: BodyForce() {}; virtual ~BodyForce() {}; - virtual bool body_force(const FIELD_MATS &fields, - DENS_MAT &flux) const { return false; }; + virtual bool body_force(const FIELD_MATS & /* fields */, + DENS_MAT & /* flux */) const { return false; }; }; /** @@ -49,7 +49,7 @@ namespace ATC { class BodyForceElectricField : public BodyForce { public: - BodyForceElectricField(std::fstream &matfile,std::map & parameters) + BodyForceElectricField(std::fstream & /* matfile */,std::map & /* parameters */) { throw ATC_Error("unimplemented due to issues with accessing electric field"); } virtual ~BodyForceElectricField() {}; virtual bool body_force(const FIELD_MATS &fields, diff --git a/lib/atc/CbPotential.h b/lib/atc/CbPotential.h index 44b9b7c1de..e218ae2254 100644 --- a/lib/atc/CbPotential.h +++ b/lib/atc/CbPotential.h @@ -40,7 +40,7 @@ namespace ATC //! @name Pairwise interaction term and derivatives. //@{ - virtual double phi (const double &r) const { return 0.0; } + virtual double phi (const double & /* r */) const { return 0.0; } virtual double phi_r (const double &r) const; virtual double phi_rr (const double &r) const; virtual double phi_rrr(const double &r) const; @@ -48,11 +48,11 @@ namespace ATC //! @name Embedding terms. Electron cloud density and embedding functions //@{ - virtual double rho (const double &r) const { return 0.0; } + virtual double rho (const double & /* r */) const { return 0.0; } virtual double rho_r (const double &r) const; virtual double rho_rr(const double &r) const; virtual double rho_rrr(const double &r) const; - virtual double F (const double &p) const { return 0.0; } + virtual double F (const double & /* p */) const { return 0.0; } virtual double F_p (const double &p) const; virtual double F_pp(const double &p) const; virtual double F_ppp(const double &p) const; @@ -60,7 +60,7 @@ namespace ATC //! @name Three-body terms and derivatives //@{ - virtual double phi3 (const double &q) const {return 0.0; } + virtual double phi3 (const double & /* q */) const {return 0.0; } virtual double phi3_q (const double &q) const; virtual double phi3_qq(const double &q) const; //@} diff --git a/lib/atc/ChargeRegulator.cpp b/lib/atc/ChargeRegulator.cpp index 2e899fcc8e..cbfda69480 100644 --- a/lib/atc/ChargeRegulator.cpp +++ b/lib/atc/ChargeRegulator.cpp @@ -53,7 +53,7 @@ namespace ATC { // parses and adjusts charge regulator state based on // user input, in the style of LAMMPS user input //-------------------------------------------------------- - bool ChargeRegulator::modify(int narg, char **arg) + bool ChargeRegulator::modify(int /* narg */, char ** /* arg */) { bool foundMatch = false; return foundMatch; @@ -241,7 +241,7 @@ namespace ATC { //-------------------------------------------------------- // output //-------------------------------------------------------- - void ChargeRegulatorMethod::output(OUTPUT_LIST & outputData) + void ChargeRegulatorMethod::output(OUTPUT_LIST & /* outputData */) { //vector localSum(sum_.size()); //lammpsInteface_->allsum(localSum.pointer,sum_.pointer,sum_.size()); @@ -383,7 +383,7 @@ namespace ATC { //-------------------------------------------------------- // change potential/charge pre-force calculation //-------------------------------------------------------- - void ChargeRegulatorMethodFeedback::apply_pre_force(double dt) + void ChargeRegulatorMethodFeedback::apply_pre_force(double /* dt */) { sum_ = 0; @@ -455,7 +455,7 @@ namespace ATC { //-------------------------------------------------------- // change potential/charge post-force calculation //-------------------------------------------------------- - void ChargeRegulatorMethodImageCharge::apply_post_force(double dt) + void ChargeRegulatorMethodImageCharge::apply_post_force(double /* dt */) { sum_ = 0; apply_local_forces(); @@ -644,7 +644,7 @@ namespace ATC { //-------------------------------------------------------- // add effective forces post LAMMPS force call //-------------------------------------------------------- - void ChargeRegulatorMethodEffectiveCharge::apply_post_force(double dt) + void ChargeRegulatorMethodEffectiveCharge::apply_post_force(double /* dt */) { apply_local_forces(); } diff --git a/lib/atc/ChargeRegulator.h b/lib/atc/ChargeRegulator.h index b51707b9cd..f250a955e8 100644 --- a/lib/atc/ChargeRegulator.h +++ b/lib/atc/ChargeRegulator.h @@ -65,7 +65,7 @@ namespace ATC { virtual void apply_pre_force(double dt); virtual void apply_post_force(double dt); virtual void output(OUTPUT_LIST & outputData) const; - virtual double compute_vector(int n) const {return 0;} // TODO + virtual double compute_vector(int /* n */) const {return 0;} // TODO void assign_poisson_solver(PoissonSolver * solver) { poissonSolver_ = solver;} PoissonSolver * poisson_solver(void) { return poissonSolver_;} @@ -97,8 +97,8 @@ namespace ATC { ~ChargeRegulatorMethod(){}; virtual void initialize(void); void set_greens_functions(); - virtual void apply_pre_force(double dt){}; - virtual void apply_post_force(double dt){}; + virtual void apply_pre_force(double /* dt */){}; + virtual void apply_post_force(double /* dt */){}; virtual void set_weights() {}; const DENS_VEC & total_influence() const { return sum_;} virtual void output(OUTPUT_LIST & outputData); diff --git a/lib/atc/CloneVector.h b/lib/atc/CloneVector.h index 0c3bef8c59..02db700f27 100644 --- a/lib/atc/CloneVector.h +++ b/lib/atc/CloneVector.h @@ -72,7 +72,7 @@ CloneVector::CloneVector(const Matrix &c, int dim, INDEX idx) // Construct from a DiagonalMatrix //----------------------------------------------------------------------------- template -CloneVector::CloneVector(const DiagonalMatrix &c, INDEX idx) +CloneVector::CloneVector(const DiagonalMatrix &c, INDEX /* idx */) : Vector(), _baseV(NULL), _baseM(const_cast*>(&c)) , _clone_type(CLONE_DIAG), _idx(0) {} @@ -80,7 +80,7 @@ CloneVector::CloneVector(const DiagonalMatrix &c, INDEX idx) // value (const) indexing operator //----------------------------------------------------------------------------- template -T CloneVector::operator()(INDEX i, INDEX j) const + T CloneVector::operator()(INDEX i, INDEX /* j */) const { return (*this)[i]; } @@ -88,7 +88,7 @@ T CloneVector::operator()(INDEX i, INDEX j) const // reference index operator //----------------------------------------------------------------------------- template -T& CloneVector::operator()(INDEX i, INDEX j) +T& CloneVector::operator()(INDEX i, INDEX /* j */) { return (*this)[i]; } diff --git a/lib/atc/ConcentrationRegulator.cpp b/lib/atc/ConcentrationRegulator.cpp index c734a5d98d..8055433f5d 100644 --- a/lib/atc/ConcentrationRegulator.cpp +++ b/lib/atc/ConcentrationRegulator.cpp @@ -47,7 +47,7 @@ const double kMinScale_ = 10000.; // parses and adjusts charge regulator state based on // user input, in the style of LAMMPS user input //-------------------------------------------------------- - bool ConcentrationRegulator::modify(int narg, char **arg) + bool ConcentrationRegulator::modify(int /* narg */, char ** /* arg */) { bool foundMatch = false; return foundMatch; @@ -166,7 +166,7 @@ const double kMinScale_ = 10000.; //-------------------------------------------------------- // size vector //-------------------------------------------------------- - int ConcentrationRegulator::size_vector(int i) const + int ConcentrationRegulator::size_vector(int /* i */) const { int n = (regulators_.size())*5; if (n==0) n = 20; @@ -319,7 +319,7 @@ const double kMinScale_ = 10000.; //-------------------------------------------------------- // accept //-------------------------------------------------------- - bool ConcentrationRegulatorMethodTransition::accept(double energy, double T) const + bool ConcentrationRegulatorMethodTransition::accept(double energy, double /* T */) const { #ifdef ATC_VERBOSE2 if (energy < maxEnergy_) lammpsInterface_->print_msg(" energy "+to_string(energy)+" "+to_string(rngCounter_)); @@ -423,7 +423,7 @@ const double kMinScale_ = 10000.; int * tag = lammpsInterface_->atom_tag(); for (itr = list.begin(); itr != list.end(); itr++) { int atag = tag[itr->second]; - double d = abs(atag-r); + double d = fabs(atag-r); if (d < min) { min = d; idx = i; diff --git a/lib/atc/ConcentrationRegulator.h b/lib/atc/ConcentrationRegulator.h index 3645880cc5..952cf88339 100644 --- a/lib/atc/ConcentrationRegulator.h +++ b/lib/atc/ConcentrationRegulator.h @@ -60,19 +60,19 @@ namespace ATC { //WIP_JAT need a nicer way to consistently handle sets of regulators, not sure how yet // application steps /** apply the regulator in the pre-predictor phase */ - virtual void apply_pre_predictor(double dt, int timeStep){}; + virtual void apply_pre_predictor(double /* dt */, int /* timeStep */){}; /** apply the regulator in the mid-predictor phase */ - virtual void apply_mid_predictor(double dt, int timeStep){}; + virtual void apply_mid_predictor(double /* dt */, int /* timeStep */){}; /** apply the regulator in the post-predictor phase */ - virtual void apply_post_predictor(double dt, int timeStep){}; + virtual void apply_post_predictor(double /* dt */, int /* timeStep */){}; /** apply the regulator in the pre-correction phase */ - virtual void apply_pre_corrector(double dt, int timeStep){}; + virtual void apply_pre_corrector(double /* dt */, int /* timeStep */){}; /** apply the regulator in the post-correction phase */ - virtual void apply_post_corrector(double dt, int timeStep){}; + virtual void apply_post_corrector(double /* dt */, int /* timeStep */){}; /** compute the thermal boundary flux, must be consistent with regulator */ - virtual void compute_boundary_flux(FIELDS & fields){}; + virtual void compute_boundary_flux(FIELDS & /* fields */){}; /** add contributions (if any) to the finite element right-hand side */ - virtual void add_to_rhs(FIELDS & rhs){}; + virtual void add_to_rhs(FIELDS & /* rhs */){}; /** prior to exchanges */ virtual void pre_force(); @@ -113,8 +113,8 @@ namespace ATC { virtual void pre_exchange() {}; virtual void finish() {}; virtual void set_weights() {}; - virtual double compute_vector(int n) const { return 0;} - virtual void output(OUTPUT_LIST & outputData){}; + virtual double compute_vector(int /* n */) const { return 0;} + virtual void output(OUTPUT_LIST & /* outputData */){}; private: ConcentrationRegulatorMethod(); // DO NOT define this }; @@ -144,7 +144,7 @@ namespace ATC { virtual double compute_vector(int n) const; protected: /** set transition state: epsilon and charge */ - int mask(int type, int groupbit) {return 0;} + int mask(int /* type */, int /* groupbit */) {return 0;} int count(void) const; int excess(void) const; double energy(int id) const; diff --git a/lib/atc/DenseVector.h b/lib/atc/DenseVector.h index 70e223d988..38ed68f937 100644 --- a/lib/atc/DenseVector.h +++ b/lib/atc/DenseVector.h @@ -31,8 +31,10 @@ public: // overloaded inline virtual functions T operator[](INDEX i) const { VICK(i) return _data[i]; } T& operator[](INDEX i) { VICK(i) return _data[i]; } - T operator()(INDEX i, INDEX j=0) const { VICK(i) return _data[i]; } - T& operator()(INDEX i, INDEX j=0) { VICK(i) return _data[i]; } + T operator()(INDEX i, INDEX /* j */) const { VICK(i) return _data[i]; } + T& operator()(INDEX i, INDEX /* j */) { VICK(i) return _data[i]; } + T operator()(INDEX i) const { VICK(i) return _data[i]; } + T& operator()(INDEX i) { VICK(i) return _data[i]; } void set_all_elements_to(const T &v) { int sz = this->size(); for (INDEX i = 0; i < sz; i++) _data[i] = v; @@ -62,7 +64,7 @@ private: // resizes the matrix and optionally copies over what still fits, ignores cols //----------------------------------------------------------------------------- template -void DenseVector::resize(INDEX rows, INDEX cols, bool copy) + void DenseVector::resize(INDEX rows, INDEX /* cols */, bool copy) { if (_size==rows) return; // if is correct size, done if (!copy) diff --git a/lib/atc/DiagonalMatrix.h b/lib/atc/DiagonalMatrix.h index 516fb47878..986593056c 100644 --- a/lib/atc/DiagonalMatrix.h +++ b/lib/atc/DiagonalMatrix.h @@ -49,7 +49,8 @@ class DiagonalMatrix : public Matrix void write_restart(FILE *f) const; // Dump matrix contents to screen (not defined for all datatypes) - std::string to_string(int p=myPrecision) const { return _data->to_string(); } + std::string to_string(int /* p */) const { return _data->to_string(); } + std::string to_string() const { return _data->to_string(); } using Matrix::matlab; void matlab(std::ostream &o, const std::string &s="D") const; @@ -78,8 +79,8 @@ class DiagonalMatrix : public Matrix protected: void _set_equal(const Matrix &r); - DiagonalMatrix& operator=(const Vector &c) {} - DiagonalMatrix& operator=(const Matrix &c) {} + DiagonalMatrix& operator=(const Vector /* &c */) {} + DiagonalMatrix& operator=(const Matrix /* &c */) {} private: void _delete(); @@ -246,7 +247,7 @@ void DiagonalMatrix::_delete() // resizes the matrix, ignores nCols, optionally zeros //----------------------------------------------------------------------------- template -void DiagonalMatrix::reset(INDEX rows, INDEX cols, bool zero) +void DiagonalMatrix::reset(INDEX rows, INDEX /* cols */, bool zero) { _delete(); _data = new DenseVector(rows, zero); @@ -255,7 +256,7 @@ void DiagonalMatrix::reset(INDEX rows, INDEX cols, bool zero) // resizes the matrix, ignores nCols, optionally copies what fits //----------------------------------------------------------------------------- template -void DiagonalMatrix::resize(INDEX rows, INDEX cols, bool copy) +void DiagonalMatrix::resize(INDEX rows, INDEX /* cols */, bool copy) { _data->resize(rows, copy); } @@ -327,7 +328,7 @@ void DiagonalMatrix::shallowreset(const DenseMatrix &c) // reference indexing operator - must throw an error if i!=j //----------------------------------------------------------------------------- template -T& DiagonalMatrix::operator()(INDEX i, INDEX j) +T& DiagonalMatrix::operator()(INDEX i, INDEX /* j */) { GCK(*this,*this,i!=j,"DiagonalMatrix: tried to index off diagonal"); return (*this)[i]; diff --git a/lib/atc/ElasticTimeIntegrator.cpp b/lib/atc/ElasticTimeIntegrator.cpp index c2a592d46c..9793f6a58e 100644 --- a/lib/atc/ElasticTimeIntegrator.cpp +++ b/lib/atc/ElasticTimeIntegrator.cpp @@ -27,7 +27,7 @@ namespace ATC { // modify // parses inputs and modifies state of the integrator //-------------------------------------------------------- - bool MomentumTimeIntegrator::modify(int narg, char **arg) + bool MomentumTimeIntegrator::modify(int /* narg */, char **arg) { bool foundMatch = false; int argIndex = 0; @@ -611,7 +611,7 @@ namespace ATC { // compute_velocity_delta //-------------------------------------------------------- void ElasticTimeIntegratorFractionalStep::compute_velocity_delta(const DENS_MAT & atomicMomentumDelta, - double dt) + double /* dt */) { DENS_MAT & myAtomicVelocityDelta(atomicVelocityDelta_.set_quantity()); myAtomicVelocityDelta = nodalAtomicMomentumOld_ + atomicMomentumDelta; @@ -832,7 +832,7 @@ namespace ATC { // compute_velocity_delta //-------------------------------------------------------- void FluidsTimeIntegratorGear::compute_velocity_delta(const DENS_MAT & atomicMomentumDelta, - double dt) + double /* dt */) { DENS_MAT & myAtomicVelocityDelta(atomicVelocityDelta_.set_quantity()); myAtomicVelocityDelta = nodalAtomicMomentumOld_ + atomicMomentumDelta; diff --git a/lib/atc/ElectronChargeDensity.cpp b/lib/atc/ElectronChargeDensity.cpp index 69127a9335..14c764e46e 100644 --- a/lib/atc/ElectronChargeDensity.cpp +++ b/lib/atc/ElectronChargeDensity.cpp @@ -14,7 +14,7 @@ using std::vector; namespace ATC { ElectronChargeDensityInterpolation::ElectronChargeDensityInterpolation( - fstream &fileId, map & parameters) + fstream &fileId, map & /* parameters */) : ElectronChargeDensity(), n_() { if (!fileId.is_open()) throw ATC_Error("cannot open material file"); diff --git a/lib/atc/ElectronChargeDensity.h b/lib/atc/ElectronChargeDensity.h index a5288c0b19..ac6052a9ef 100644 --- a/lib/atc/ElectronChargeDensity.h +++ b/lib/atc/ElectronChargeDensity.h @@ -21,17 +21,17 @@ namespace ATC { public: ElectronChargeDensity() {}; virtual ~ElectronChargeDensity() {}; - virtual bool electron_charge_density(const FIELD_MATS &fields, - DENS_MAT &flux) const { return false; }; + virtual bool electron_charge_density(const FIELD_MATS & /* fields */, + DENS_MAT & /* flux */) const { return false; }; - virtual void D_electron_charge_density(const FieldName fieldName, - const FIELD_MATS &fields, - DENS_MAT &flux) const + virtual void D_electron_charge_density(const FieldName /* fieldName */, + const FIELD_MATS & /* fields */, + DENS_MAT & /* flux */) const { throw ATC_Error("Charge density D_electron_charge_density unimplemented function");} - virtual void band_edge_potential(const FIELD_MATS &fields, - DENS_MAT &density) const + virtual void band_edge_potential(const FIELD_MATS & /* fields */, + DENS_MAT & /* density */) const { throw ATC_Error("Charge density band_edge_potential unimplemented function");} }; //----------------------------------------------------------------------- @@ -58,7 +58,7 @@ namespace ATC { flux *= -1.; return true; }; - virtual void D_electron_charge_density(const FieldName field, + virtual void D_electron_charge_density(const FieldName /* field */, const FIELD_MATS &fields, DENS_MAT &coef) const { @@ -94,7 +94,7 @@ namespace ATC { flux *= -C_; return true; }; - virtual void D_electron_charge_density(const FieldName field, + virtual void D_electron_charge_density(const FieldName /* field */, const FIELD_MATS &fields, DENS_MAT &coef) const { @@ -150,7 +150,7 @@ namespace ATC { density *= -1.; return true; }; - virtual void D_electron_charge_density(const FieldName field, + virtual void D_electron_charge_density(const FieldName /* field */, const FIELD_MATS &fields, DENS_MAT &coef) const { @@ -235,7 +235,7 @@ namespace ATC { } return true; }; - virtual void D_electron_charge_density(const FieldName fieldName, + virtual void D_electron_charge_density(const FieldName /* fieldName */, const FIELD_MATS &fields, DENS_MAT &coef) const { diff --git a/lib/atc/ElectronDragPower.cpp b/lib/atc/ElectronDragPower.cpp index aff6be6106..7fe31f0120 100644 --- a/lib/atc/ElectronDragPower.cpp +++ b/lib/atc/ElectronDragPower.cpp @@ -39,7 +39,7 @@ ElectronDragPowerLinear::ElectronDragPowerLinear(fstream &fileId, } bool ElectronDragPowerLinear::electron_drag_power(const FIELD_MATS &fields, - const GRAD_FIELD_MATS &gradFields, + const GRAD_FIELD_MATS & /* gradFields */, DENS_MAT & flux) { diff --git a/lib/atc/ElectronDragPower.h b/lib/atc/ElectronDragPower.h index 92103fe3e8..12c1472e37 100644 --- a/lib/atc/ElectronDragPower.h +++ b/lib/atc/ElectronDragPower.h @@ -21,9 +21,9 @@ namespace ATC { ElectronDragPower() {}; virtual ~ElectronDragPower() {}; /** computes drag power */ - virtual bool electron_drag_power(const FIELD_MATS &fields, - const GRAD_FIELD_MATS &gradFields, - DENS_MAT & flux) + virtual bool electron_drag_power(const FIELD_MATS & /* fields */, + const GRAD_FIELD_MATS & /* gradFields */, + DENS_MAT & /* flux */) { return false; }; diff --git a/lib/atc/ElectronFlux.cpp b/lib/atc/ElectronFlux.cpp index 8ae8503a31..4894a32dae 100644 --- a/lib/atc/ElectronFlux.cpp +++ b/lib/atc/ElectronFlux.cpp @@ -79,7 +79,7 @@ ElectronFluxThermopower::ElectronFluxThermopower( } ElectronFluxConvection::ElectronFluxConvection( - fstream &fileId, map & parameters) + fstream &fileId, map & /* parameters */) : ElectronFlux() { if (!fileId.is_open()) throw ATC_Error("cannot open material file"); diff --git a/lib/atc/ElectronFlux.h b/lib/atc/ElectronFlux.h index 013f9aac42..b9cfd2305c 100644 --- a/lib/atc/ElectronFlux.h +++ b/lib/atc/ElectronFlux.h @@ -19,7 +19,7 @@ namespace ATC { virtual ~ElectronFlux() {}; /** computes flux */ virtual void electron_flux(const FIELD_MATS &fields, - const GRAD_FIELD_MATS &gradFields, + const GRAD_FIELD_MATS & /* gradFields */, DENS_MAT_VEC &flux) { @@ -211,7 +211,7 @@ namespace ATC { ElectronFluxConvection(std::fstream &matfile,std::map & parameters); virtual ~ElectronFluxConvection() {}; virtual void electron_flux(const FIELD_MATS &fields, - const GRAD_FIELD_MATS &gradFields, + const GRAD_FIELD_MATS & /* gradFields */, DENS_MAT_VEC &flux) { // flux = n v diff --git a/lib/atc/ElectronHeatCapacity.h b/lib/atc/ElectronHeatCapacity.h index aefc3d681c..f27d8193a0 100644 --- a/lib/atc/ElectronHeatCapacity.h +++ b/lib/atc/ElectronHeatCapacity.h @@ -51,7 +51,7 @@ namespace ATC { capacity = electronHeatCapacity_; }; virtual void D_electron_heat_capacity(const FIELD_MATS &fields, - const GRAD_FIELD_MATS &gradFields, + const GRAD_FIELD_MATS & /* gradFields */, DENS_MAT_VEC & Dcapacity) { FIELD_MATS::const_iterator etField = fields.find(ELECTRON_TEMPERATURE); @@ -91,7 +91,7 @@ namespace ATC { const DENS_MAT & T = etField->second; capacity = electronHeatCapacity_*T; }; - virtual void D_electron_heat_capacity(const FIELD_MATS &fields, + virtual void D_electron_heat_capacity(const FIELD_MATS & /* fields */, const GRAD_FIELD_MATS &gradFields, DENS_MAT_VEC &Dcapacity) { diff --git a/lib/atc/ElectronHeatFlux.h b/lib/atc/ElectronHeatFlux.h index 12a68fed70..41c89d6c6d 100644 --- a/lib/atc/ElectronHeatFlux.h +++ b/lib/atc/ElectronHeatFlux.h @@ -21,7 +21,7 @@ namespace ATC { virtual ~ElectronHeatFlux() {}; /** computes heat flux */ virtual void electron_heat_flux(const FIELD_MATS &fields, - const GRAD_FIELD_MATS &gradFields, + const GRAD_FIELD_MATS & /* gradFields */, DENS_MAT_VEC &flux) { @@ -70,7 +70,7 @@ namespace ATC { ElectronHeatFluxLinear(std::fstream &matfile,std::map & parameters, /*const*/ ElectronHeatCapacity * electronHeatCapacity = NULL); virtual ~ElectronHeatFluxLinear() {}; - virtual void electron_heat_flux(const FIELD_MATS &fields, + virtual void electron_heat_flux(const FIELD_MATS & /* fields */, const GRAD_FIELD_MATS &gradFields, DENS_MAT_VEC &flux) { diff --git a/lib/atc/ElectronPhononExchange.h b/lib/atc/ElectronPhononExchange.h index 59cc61b4d2..3037451513 100644 --- a/lib/atc/ElectronPhononExchange.h +++ b/lib/atc/ElectronPhononExchange.h @@ -21,8 +21,8 @@ namespace ATC { ElectronPhononExchange() {}; virtual ~ElectronPhononExchange() {}; /** computes heat capacity */ - virtual bool electron_phonon_exchange(const FIELD_MATS &fields, - DENS_MAT &flux) { return false; } + virtual bool electron_phonon_exchange(const FIELD_MATS & /* fields */, + DENS_MAT & /* flux */) { return false; } }; //------------------------------------------------------------------- diff --git a/lib/atc/ExtrinsicModel.cpp b/lib/atc/ExtrinsicModel.cpp index cdf556f4c1..b20b2a26d1 100644 --- a/lib/atc/ExtrinsicModel.cpp +++ b/lib/atc/ExtrinsicModel.cpp @@ -114,7 +114,7 @@ namespace ATC { ATC::LammpsInterface::instance()->print_msg_once(ss.str()); myModel = new ExtrinsicModelElectrostatic (this,modelType,matFileName); - } + } else myModel = NULL; extrinsicModels_.push_back(myModel); // add new fields to fields data @@ -339,7 +339,7 @@ namespace ATC { //-------------------------------------------------------- ExtrinsicModel::ExtrinsicModel(ExtrinsicModelManager * modelManager, ExtrinsicModelType modelType, - string matFileName) : + string /* matFileName */) : atc_(modelManager->atc()), modelManager_(modelManager), modelType_(modelType), diff --git a/lib/atc/ExtrinsicModel.h b/lib/atc/ExtrinsicModel.h index 99acf59ef2..66282fb505 100644 --- a/lib/atc/ExtrinsicModel.h +++ b/lib/atc/ExtrinsicModel.h @@ -221,7 +221,7 @@ namespace ATC { virtual ~ExtrinsicModel(); /** parser/modifier */ - virtual bool modify(int narg, char **arg) {return false;}; + virtual bool modify(int /* narg */, char ** /* arg */) {return false;}; /** construct transfers needed by the model */ virtual void construct_transfers(){}; @@ -230,11 +230,11 @@ namespace ATC { virtual void initialize(); /** set up LAMMPS display variables */ - virtual int size_vector(int externalSize) {return 0;}; + virtual int size_vector(int /* externalSize */) {return 0;}; /** get LAMMPS display variables */ virtual double compute_scalar(void) { return 0.0; } - virtual bool compute_vector(int n, double & value) {return false;}; + virtual bool compute_vector(int /* n */, double & /* value */) {return false;}; /** post integration run */ // is this called at end of run or simulation @@ -259,10 +259,10 @@ namespace ATC { virtual void post_final_integrate(){}; /** Set sources to AtC equation */ - virtual void set_sources(FIELDS & fields, FIELDS & sources){}; + virtual void set_sources(FIELDS & /* fields */, FIELDS & /* sources */){}; /** Add model-specific output data */ - virtual void output(OUTPUT_LIST & outputData){}; + virtual void output(OUTPUT_LIST & /* outputData */){}; /** get the fields and their sizes */ void num_fields(std::map & fieldSizes); diff --git a/lib/atc/ExtrinsicModelElectrostatic.cpp b/lib/atc/ExtrinsicModelElectrostatic.cpp index 03766920e3..b10e77a306 100644 --- a/lib/atc/ExtrinsicModelElectrostatic.cpp +++ b/lib/atc/ExtrinsicModelElectrostatic.cpp @@ -827,7 +827,7 @@ namespace ATC { // apply_charged_surfaces //-------------------------------------------------------- void ExtrinsicModelElectrostatic::apply_charged_surfaces - (MATRIX & potential) + (MATRIX & /* potential */) { //double qE2f = LammpsInterface::instance()->qe2f(); double qV2e = LammpsInterface::instance()->qv2e(); diff --git a/lib/atc/FE_Engine.cpp b/lib/atc/FE_Engine.cpp index efcde66d78..bef135a5f2 100644 --- a/lib/atc/FE_Engine.cpp +++ b/lib/atc/FE_Engine.cpp @@ -721,7 +721,7 @@ namespace ATC{ const SPAR_MAT &N, const SPAR_MAT_VEC &dN, SPAR_MAT &tangent, - const DenseMatrix *elementMask ) const + const DenseMatrix * /* elementMask */ ) const { int nn = nNodesUnique_; FieldName rowField = row_col.first; @@ -1298,7 +1298,7 @@ namespace ATC{ const PhysicsModel * physicsModel, const Array & elementMaterials, FIELDS &rhs, - bool freeOnly, + bool /* freeOnly */, const DenseMatrix *elementMask) const { vector usedFields; @@ -2503,7 +2503,7 @@ namespace ATC{ // previously computed nodal sources //----------------------------------------------------------------- void FE_Engine::add_sources(const Array &fieldMask, - const double time, + const double /* time */, const FIELDS &sources, FIELDS &nodalSources) const { diff --git a/lib/atc/FE_Engine.h b/lib/atc/FE_Engine.h index bc3fb0e4a5..18dae0e6b4 100644 --- a/lib/atc/FE_Engine.h +++ b/lib/atc/FE_Engine.h @@ -345,7 +345,7 @@ namespace ATC { /** integrate a nodal field over an face set */ - DENS_VEC integrate(const DENS_MAT &field, const FSET & fset) const + DENS_VEC integrate(const DENS_MAT & /* field */, const FSET & /* fset */) const { throw ATC_Error(FILELINE,"unimplemented function"); } /*@}*/ @@ -496,7 +496,8 @@ namespace ATC { /** set kernel */ void set_kernel(KernelFunction* ptr); - KernelFunction *kernel(int i=0) { return kernelFunction_; } + KernelFunction *kernel(int /* i */) { return kernelFunction_; } + KernelFunction *kernel() { return kernelFunction_; } private: //---------------------------------------------------------------- diff --git a/lib/atc/FE_Mesh.cpp b/lib/atc/FE_Mesh.cpp index b090bf2881..0ff4b0b3b5 100644 --- a/lib/atc/FE_Mesh.cpp +++ b/lib/atc/FE_Mesh.cpp @@ -797,7 +797,7 @@ namespace ATC { { int node = element_connectivity_unique(ielem, inode); nodeSet.insert(node); - inode++; + inode++; // XXX: is this correct? } } } @@ -832,7 +832,7 @@ namespace ATC { { int node = element_connectivity_unique(ielem, inode); nodeSet.erase(node); - inode++; + inode++; // XXX: is this correct? } } } @@ -1788,7 +1788,7 @@ namespace ATC { // ------------------------------------------------------------- // setup_periodicity // ------------------------------------------------------------- - void FE_3DMesh::setup_periodicity(double tol) + void FE_3DMesh::setup_periodicity(double /* tol */) { // unique <-> global id maps globalToUniqueMap_.reset(nNodes_); @@ -2119,7 +2119,6 @@ namespace ATC { // divide between all processors, we get the next-highest // power of 2. vector > procEltLists = tree_->getElemIDs(depth); - int numEltLists = procEltLists.size(); // Make sure the KD tree is behaving as expected. assert(numEltLists >= nProcs); diff --git a/lib/atc/FE_Mesh.h b/lib/atc/FE_Mesh.h index be40d7cb28..0b2df7b656 100644 --- a/lib/atc/FE_Mesh.h +++ b/lib/atc/FE_Mesh.h @@ -691,7 +691,7 @@ namespace ATC { void departition_mesh(void); - virtual void element_size(const int ielem, + virtual void element_size(const int /* ielem */, double &hx, double &hy, double &hz) { hx = L_[0]/n_[0]; hy = L_[1]/n_[1]; hz = L_[2]/n_[2]; } diff --git a/lib/atc/FieldEulerIntegrator.cpp b/lib/atc/FieldEulerIntegrator.cpp index eeea0cd4eb..0abc71cbab 100644 --- a/lib/atc/FieldEulerIntegrator.cpp +++ b/lib/atc/FieldEulerIntegrator.cpp @@ -46,7 +46,7 @@ FieldExplicitEulerIntegrator::FieldExplicitEulerIntegrator( // -------------------------------------------------------------------- // update // -------------------------------------------------------------------- -void FieldExplicitEulerIntegrator::update(const double dt, double time, + void FieldExplicitEulerIntegrator::update(const double dt, double /* time */, FIELDS & fields, FIELDS & rhs) { // write and add update mass matrix to handled time variation @@ -81,7 +81,7 @@ FieldImplicitEulerIntegrator::FieldImplicitEulerIntegrator( // update // -------------------------------------------------------------------- void FieldImplicitEulerIntegrator::update(const double dt, double time, - FIELDS & fields, FIELDS & rhs) + FIELDS & fields, FIELDS & /* rhs */) { // solver handles bcs FieldImplicitSolveOperator solver(atc_, fields, fieldName_, rhsMask_, physicsModel_, @@ -127,8 +127,8 @@ FieldImplicitDirectEulerIntegrator::~FieldImplicitDirectEulerIntegrator() // -------------------------------------------------------------------- // initialize // -------------------------------------------------------------------- -void FieldImplicitDirectEulerIntegrator::initialize(const double dt, double time, - FIELDS & fields) + void FieldImplicitDirectEulerIntegrator::initialize(const double dt, double /* time */, + FIELDS & /* fields */) { std::pair p(fieldName_,fieldName_); Array2D rmask = atc_->rhs_mask(); @@ -140,7 +140,7 @@ void FieldImplicitDirectEulerIntegrator::initialize(const double dt, double time // -------------------------------------------------------------------- // update // -------------------------------------------------------------------- -void FieldImplicitDirectEulerIntegrator::update(const double dt, double time, + void FieldImplicitDirectEulerIntegrator::update(const double /* dt */, double /* time */, FIELDS & fields, FIELDS & rhs) { atc_->compute_rhs_vector(rhsMask_, fields, rhs, diff --git a/lib/atc/FieldEulerIntegrator.h b/lib/atc/FieldEulerIntegrator.h index f349ada5d4..c7b79f85d9 100644 --- a/lib/atc/FieldEulerIntegrator.h +++ b/lib/atc/FieldEulerIntegrator.h @@ -41,8 +41,8 @@ class FieldEulerIntegrator { virtual ~FieldEulerIntegrator() {}; /** initialize */ - virtual void initialize(const double dt, const double time, - FIELDS & fields) {}; + virtual void initialize(const double /* dt */, const double /* time */, + FIELDS & /* fields */) {}; /** update */ virtual void update(const double dt, const double time, diff --git a/lib/atc/FieldManager.cpp b/lib/atc/FieldManager.cpp index ce9f859533..338f06acad 100644 --- a/lib/atc/FieldManager.cpp +++ b/lib/atc/FieldManager.cpp @@ -298,7 +298,7 @@ typedef PerAtomQuantity PAQ; //----------------------------------------------------------------------------- //* REFERENCE_POTENTIAL_ENERGY //----------------------------------------------------------------------------- - DENS_MAN * FieldManager::reference_potential_energy(string name) + DENS_MAN * FieldManager::reference_potential_energy(string /* name */) { DENS_MAN * rpe = interscaleManager_.dense_matrix(field_to_string(REFERENCE_POTENTIAL_ENERGY)); if (! rpe ) { diff --git a/lib/atc/FieldManager.h b/lib/atc/FieldManager.h index d3db3f268a..9a98676417 100644 --- a/lib/atc/FieldManager.h +++ b/lib/atc/FieldManager.h @@ -123,7 +123,7 @@ namespace ATC { DENS_MAN * projected_atom_quantity(FieldName field,std::string name, PAQ * atomic, DIAG_MAN * normalization = NULL); DENS_MAN * scaled_projected_atom_quantity(FieldName field,std::string name, PAQ * atomic, double scale, DIAG_MAN * normalization = NULL); DENS_MAN * referenced_projected_atom_quantity(FieldName field, std::string name, PAQ * atomic, DENS_MAN * reference, DIAG_MAN * normalization = NULL); - DENS_MAN * inferred_atom_quantity(FieldName field, std::string name, PAQ * atomic){return NULL;}; + DENS_MAN * inferred_atom_quantity(FieldName /* field */, std::string /* name */, PAQ * /* atomic */){return NULL;}; PAQ * prolonged_field(FieldName field); private: FieldManager(void); diff --git a/lib/atc/Function.cpp b/lib/atc/Function.cpp index 12396937bd..70f8bbfa41 100644 --- a/lib/atc/Function.cpp +++ b/lib/atc/Function.cpp @@ -16,7 +16,7 @@ namespace ATC { //==================================================================== // UXT_Function //=================================================================== - UXT_Function::UXT_Function(int narg, double* args) { } + UXT_Function::UXT_Function(int /* narg */, double* /* args */) { } //==================================================================== // UXT_Function_Mgr //==================================================================== @@ -312,7 +312,7 @@ XT_Function_Mgr * XT_Function_Mgr::myInstance_ = NULL; } ATC::LammpsInterface::instance()->print_msg_once(ss.str()); } - double PiecewiseLinearFunction::f(double * x, double t) + double PiecewiseLinearFunction::f(double * x, double /* t */) { double s = mask[0]*(x[0]-x0[0])+mask[1]*(x[1]-x0[1])+mask[2]*(x[2]-x0[2]); @@ -355,7 +355,7 @@ XT_Function_Mgr * XT_Function_Mgr::myInstance_ = NULL; return slope[0]*(x[0]-x0[0])+slope[1]*(x[1]-x0[1])+slope[2]*(x[2]-x0[2]) + C0; } - double LinearTemporalRamp::dfdt(double* x, double t) { + double LinearTemporalRamp::dfdt(double* x, double /* t */) { return mask_slope[0]*(x[0]-x0[0])+mask_slope[1]*(x[1]-x0[1])+mask_slope[2]*(x[2]-x0[2]) + C0_slope; } @@ -499,7 +499,7 @@ XT_Function_Mgr * XT_Function_Mgr::myInstance_ = NULL; if (i == 0) { dx = xs_(1)-xs_(0); } else if (i+1 == npts_) { dx = xs_(npts_-1)-xs_(npts_-2); } else { dx= 0.5*(xs_(i+1)-xs_(i-1)); } - if (abs(dx-dx0) > 1.e-8) throw ATC_Error("InterpolationFunction::initialize non-uniform data spacing not handled currently"); + if (fabs(dx-dx0) > 1.e-8) throw ATC_Error("InterpolationFunction::initialize non-uniform data spacing not handled currently"); fps_(i) *= dx; } // options: calculate / adjust tangents for monotonicity diff --git a/lib/atc/Function.h b/lib/atc/Function.h index 4572009f92..0c654fa47c 100644 --- a/lib/atc/Function.h +++ b/lib/atc/Function.h @@ -29,8 +29,8 @@ namespace ATC { virtual inline ARG_NAMES args(void) {ARG_NAMES names; return names;}; /** (1st) derivative of function wrt to a field */ - virtual inline double dfd(FieldName field, ARGS& args ) {return 0.0;}; - virtual inline void dfd(FieldName field, ARGS& args, DENS_MAT vals ) {}; + virtual inline double dfd(FieldName /* field */, ARGS& /* args */) {return 0.0;}; + virtual inline void dfd(FieldName /* field */, ARGS& /* args */, DENS_MAT /* vals */ ) {}; // addl: d2fd2(field1, field2, args), linearization(), grad_args @@ -70,8 +70,8 @@ namespace ATC { LinearFieldFunction(int nargs, char** args); virtual ~LinearFieldFunction(void) {}; - inline double f(double* u, double* x, double t) {return c1_*u[0]-c0_;} - inline double dfd(FieldName field, ARGS& args) {return c1_;} + inline double f(double* u, double* /* x */, double /* t */) {return c1_*u[0]-c0_;} + inline double dfd(FieldName /* field */, ARGS& /* args */) {return c1_;} private : double c0_,c1_; @@ -90,9 +90,9 @@ namespace ATC { const std::string & tag() { return tag_;} /** function value */ - virtual inline double f(double * u, double* x, double t) {return 0.0;}; + virtual inline double f(double * /* u */, double* /* x */, double /* t */) {return 0.0;}; /** derivative of function wrt to field */ - virtual inline double dfdu(double * u, double* x, double t) {return 0.0;}; + virtual inline double dfdu(double * /* u */, double* /* x */, double /* t */) {return 0.0;}; protected: /** tag : name of function */ @@ -136,8 +136,8 @@ namespace ATC { //inline double f(double* u, double* x, double t) {return c1_*(u[0]-c0_);} - inline double f(double* u, double* x, double t) {return c1_*u[0]+c0_;} - inline double dfdu(double* u, double* x, double t) {return c1_;} + inline double f(double* u, double* /* x */, double /* t */) {return c1_*u[0]+c0_;} + inline double dfdu(double* /* u */, double* /* x */, double /* t */) {return c1_;} private : double c0_,c1_; @@ -156,13 +156,13 @@ namespace ATC { const std::string & tag() { return tag_;} /** function value */ - virtual inline double f(double* x, double t) {return 0.0;}; + virtual inline double f(double* /* x */, double /* t */) {return 0.0;}; /** time derivative of function */ - virtual inline double dfdt(double* x, double t) {return 0.0;}; + virtual inline double dfdt(double* /* x */, double /* t */) {return 0.0;}; /** 2nd time derivative of function */ - virtual inline double ddfdt(double* x, double t) {return 0.0;}; + virtual inline double ddfdt(double* /* x */, double /* t */) {return 0.0;}; /** 3rd time derivative of function */ - virtual inline double dddfdt(double* x, double t) {return 0.0;}; + virtual inline double dddfdt(double* /* x */, double /* t */) {return 0.0;}; protected: /** mask : masks x,y,z dependence, x0 : origin */ @@ -210,7 +210,7 @@ namespace ATC { ConstantFunction(double arg); virtual ~ConstantFunction(void) {}; - inline double f(double* x, double t) + inline double f(double* /* x */, double /* t */) {return C0;}; private : @@ -227,7 +227,7 @@ namespace ATC { LinearFunction(int nargs, double* args); virtual ~LinearFunction(void) {}; - double f(double* x, double t) + double f(double* x, double /* t */) {return mask[0]*(x[0]-x0[0])+mask[1]*(x[1]-x0[1])+mask[2]*(x[2]-x0[2]) + C0;}; private : @@ -280,7 +280,7 @@ namespace ATC { QuadraticFunction(int nargs, double* args); virtual ~QuadraticFunction(void) {}; - inline double f(double* x, double t) + inline double f(double* x, double /* t */) {return C2[0]*(x[0]-x0[0])*(x[0]-x0[0])+ C2[1]*(x[1]-x0[1])*(x[1]-x0[1])+ @@ -324,7 +324,7 @@ namespace ATC { virtual ~GaussianFunction(void){}; // 1/(2 pi \sigma)^(n/2) exp(-1/2 x.x/\sigma^2 ) for n = dimension - inline double f(double* x, double t) + inline double f(double* x, double /* t */) {return C*exp(-(mask[0]*(x[0]-x0[0])*(x[0]-x0[0]) +mask[1]*(x[1]-x0[1])*(x[1]-x0[1]) +mask[2]*(x[2]-x0[2])*(x[2]-x0[2]))/tau/tau) + C0;}; @@ -362,10 +362,10 @@ namespace ATC { TemporalRamp(int nargs, double* args); virtual ~TemporalRamp(void) {}; - inline double f(double* x, double t) + inline double f(double* /* x */, double t) {return f_initial + slope*t;}; - inline double dfdt(double* x, double t) + inline double dfdt(double* /* x */, double /* t */) {return slope;}; private : @@ -382,7 +382,7 @@ namespace ATC { RadialPower(int nargs, double* args); virtual ~RadialPower(void) {}; - inline double f(double* x, double t) + inline double f(double* x, double /* t */) { double dx = x[0]-x0[0]; double dy = x[1]-x0[1]; double dz = x[2]-x0[2]; double r = mask[0]*dx*dx+mask[1]*dy*dy+mask[2]*dz*dz; r = sqrt(r); diff --git a/lib/atc/FundamentalAtomicQuantity.h b/lib/atc/FundamentalAtomicQuantity.h index 63c4747552..6561b8112d 100644 --- a/lib/atc/FundamentalAtomicQuantity.h +++ b/lib/atc/FundamentalAtomicQuantity.h @@ -82,43 +82,43 @@ namespace ATC { virtual ~AtomMass() {}; /** sets the quantity to a given value */ - virtual void operator=(const DENS_MAT & target) + virtual void operator=(const DENS_MAT & /* target */) {throw ATC_Error("Cannot modify type-based atom mass");}; /** sets the quantity to a given constant value */ - virtual void operator=(const double & target) + virtual void operator=(const double & /* target */) {throw ATC_Error("Cannot modify type-based atom mass");}; /** adds the given data to the Lammps quantity */ - virtual void operator+=(const DENS_MAT & addition) + virtual void operator+=(const DENS_MAT & /* addition */) {throw ATC_Error("Cannot modify type-based atom mass");}; /** adds the scalar data to the Lammps quantity for AtC atoms */ - virtual void operator+=(double addition) + virtual void operator+=(double /* addition */) {throw ATC_Error("Cannot modify type-based atom mass");}; /** subtracts the given data from the Lammps quantity */ - virtual void operator-=(const DENS_MAT & subtraction) + virtual void operator-=(const DENS_MAT & /* subtraction */) {throw ATC_Error("Cannot modify type-based atom mass");}; /** subtracts the scalar data from the Lammps quantity for AtC atoms */ - virtual void operator-=(double subtracts) + virtual void operator-=(double /* subtracts */) {throw ATC_Error("Cannot modify type-based atom mass");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(const DENS_MAT & multiplier) + virtual void operator*=(const DENS_MAT & /* multiplier */) {throw ATC_Error("Cannot modify type-based atom mass");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(double multiplier) + virtual void operator*=(double /* multiplier */) {throw ATC_Error("Cannot modify type-based atom mass");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(const DENS_MAT & divisor) + virtual void operator/=(const DENS_MAT & /* divisor */) {throw ATC_Error("Cannot modify type-based atom mass");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(double divisor) + virtual void operator/=(double /* divisor */) {throw ATC_Error("Cannot modify type-based atom mass");}; protected: @@ -182,39 +182,39 @@ namespace ATC { {throw ATC_Error("ComputedAtomQuantity::set_quantity - Cannot modify computed per atom quantities"); return quantity_;}; /** sets the quantity to a given constant value */ - virtual void operator=(const DENS_MAT & target) + virtual void operator=(const DENS_MAT & /* target */) {throw ATC_Error("ComputedAtomQuantity::operator= - Cannot modify computed per atom quantities");}; /** adds the given data to the Lammps quantity */ - virtual void operator+=(const DENS_MAT & addition) + virtual void operator+=(const DENS_MAT & /* addition */) {throw ATC_Error("ComputedAtomQuantity::operator+= - Cannot modify computed per atom quantities");}; /** adds the scalar data to the Lammps quantity for AtC atoms */ - virtual void operator+=(double addition) + virtual void operator+=(double /* addition */) {throw ATC_Error("ComputedAtomQuantity::operator+= - Cannot modify computed per atom quantities");}; /** subtracts the given data from the Lammps quantity */ - virtual void operator-=(const DENS_MAT & subtraction) + virtual void operator-=(const DENS_MAT & /* subtraction */) {throw ATC_Error("ComputedAtomQuantity::operator-= - Cannot modify computed per atom quantities");}; /** subtracts the scalar data from the Lammps quantity for AtC atoms */ - virtual void operator-=(double subtraction) + virtual void operator-=(double /* subtraction */) {throw ATC_Error("ComputedAtomQuantity::operator-= - Cannot modify computed per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(const DENS_MAT & multiplier) + virtual void operator*=(const DENS_MAT & /* multiplier */) {throw ATC_Error("ComputedAtomQuantity::operator*= - Cannot modify computed per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(double multiplier) + virtual void operator*=(double /* multiplier */) {throw ATC_Error("ComputedAtomQuantity::operator*= - Cannot modify computed per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(const DENS_MAT & divisor) + virtual void operator/=(const DENS_MAT & /* divisor */) {throw ATC_Error("ComputedAtomQuantity::operator/= - Cannot modify computed per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(double divisor) + virtual void operator/=(double /* divisor */) {throw ATC_Error("ComputedAtomQuantity::operator/= - Cannot modify computed per atom quantities");}; protected: diff --git a/lib/atc/KernelFunction.cpp b/lib/atc/KernelFunction.cpp index 80e41a1550..70a1616e01 100644 --- a/lib/atc/KernelFunction.cpp +++ b/lib/atc/KernelFunction.cpp @@ -123,7 +123,7 @@ namespace ATC { // KernelFunction //------------------------------------------------------------------------ // constructor - KernelFunction::KernelFunction(int nparameters, double* parameters): + KernelFunction::KernelFunction(int /* nparameters */, double* parameters): Rc_(0),invRc_(0),nsd_(3), lammpsInterface_(LammpsInterface::instance()) { @@ -286,7 +286,7 @@ namespace ATC { } // function derivative value - void KernelFunctionStep::derivative(const DENS_VEC& x_atom, DENS_VEC& deriv) const + void KernelFunctionStep::derivative(const DENS_VEC& /* x_atom */, DENS_VEC& deriv) const { deriv.reset(nsd_); } @@ -378,7 +378,7 @@ namespace ATC { } // function derivative value - void KernelFunctionCell::derivative(const DENS_VEC& x_atom, DENS_VEC& deriv) const + void KernelFunctionCell::derivative(const DENS_VEC& /* x_atom */, DENS_VEC& deriv) const { deriv.reset(nsd_); } @@ -518,7 +518,7 @@ namespace ATC { } // function derivative value - void KernelFunctionCubicSphere::derivative(const DENS_VEC& x_atom, DENS_VEC& deriv) const + void KernelFunctionCubicSphere::derivative(const DENS_VEC& /* x_atom */, DENS_VEC& deriv) const { deriv.reset(nsd_); } @@ -548,7 +548,7 @@ namespace ATC { } // function derivative value - void KernelFunctionQuarticSphere::derivative(const DENS_VEC& x_atom, DENS_VEC& deriv) const + void KernelFunctionQuarticSphere::derivative(const DENS_VEC& /* x_atom */, DENS_VEC& deriv) const { deriv.reset(nsd_); } @@ -581,7 +581,7 @@ namespace ATC { } // function derivative value - void KernelFunctionCubicCyl::derivative(const DENS_VEC& x_atom, DENS_VEC& deriv) const + void KernelFunctionCubicCyl::derivative(const DENS_VEC& /* x_atom */, DENS_VEC& deriv) const { deriv.reset(nsd_); } @@ -614,7 +614,7 @@ namespace ATC { } // function derivative value - void KernelFunctionQuarticCyl::derivative(const DENS_VEC& x_atom, DENS_VEC& deriv) const + void KernelFunctionQuarticCyl::derivative(const DENS_VEC& /* x_atom */, DENS_VEC& deriv) const { deriv.reset(nsd_); } @@ -646,7 +646,7 @@ namespace ATC { } // function derivative value - void KernelFunctionCubicBar::derivative(const DENS_VEC& x_atom, DENS_VEC& deriv) const + void KernelFunctionCubicBar::derivative(const DENS_VEC& /* x_atom */, DENS_VEC& deriv) const { deriv.reset(nsd_); } @@ -719,7 +719,7 @@ namespace ATC { } // function derivative value - void KernelFunctionQuarticBar::derivative(const DENS_VEC& x_atom, DENS_VEC& deriv) const + void KernelFunctionQuarticBar::derivative(const DENS_VEC& /* x_atom */, DENS_VEC& deriv) const { deriv.reset(nsd_); } diff --git a/lib/atc/KernelFunction.h b/lib/atc/KernelFunction.h index 9966852537..6922ed9a7b 100644 --- a/lib/atc/KernelFunction.h +++ b/lib/atc/KernelFunction.h @@ -83,7 +83,7 @@ namespace ATC { // function derivative virtual void derivative(const DENS_VEC& x_atom, DENS_VEC& deriv) const; // bond function value - virtual double bond(DENS_VEC& xa, DENS_VEC&xb, double lam1, double lam2) const + virtual double bond(DENS_VEC& /* xa */, DENS_VEC& /* xb */, double lam1, double lam2) const { return lam2-lam1; } }; @@ -105,7 +105,7 @@ namespace ATC { // function derivative virtual void derivative(const DENS_VEC& x_atom, DENS_VEC& deriv) const; // bond function value - virtual double bond(DENS_VEC& xa, DENS_VEC&xb, double lam1, double lam2) const + virtual double bond(DENS_VEC& /* xa */, DENS_VEC& /* xb */, double lam1, double lam2) const {return lam2 -lam1;} // bond intercept values : origin is the node position void bond_intercepts(DENS_VEC& xa, DENS_VEC& xb, diff --git a/lib/atc/KinetoThermostat.cpp b/lib/atc/KinetoThermostat.cpp index bdc11238ad..c10f7eb458 100644 --- a/lib/atc/KinetoThermostat.cpp +++ b/lib/atc/KinetoThermostat.cpp @@ -32,7 +32,7 @@ namespace ATC { // parses and adjusts thermostat state based on // user input, in the style of LAMMPS user input //-------------------------------------------------------- - bool KinetoThermostat::modify(int narg, char **arg) + bool KinetoThermostat::modify(int /* narg */, char ** /* arg */) { bool foundMatch = false; return foundMatch; @@ -171,7 +171,7 @@ namespace ATC { // sets up the right-hand side of the // kinetostat equations //-------------------------------------------------------- - void VelocityRescaleCombined::set_kinetostat_rhs(DENS_MAT & rhs, double dt) + void VelocityRescaleCombined::set_kinetostat_rhs(DENS_MAT & rhs, double /* dt */) { rhs = ((atc_->mass_mat_md(VELOCITY)).quantity())*(velocity_.quantity()); rhs -= thermostatCorrection_->quantity(); @@ -682,8 +682,8 @@ namespace ATC { // sets up and solves linear system for lambda, if the // bool is true it iterators to a non-linear solution //-------------------------------------------------------- - void KinetoThermostatGlcFs::compute_lambda(double dt, - bool iterateSolution) + void KinetoThermostatGlcFs::compute_lambda(double /* dt */, + bool /* iterateSolution */) { // ITERATIVE SOLUTION } @@ -692,7 +692,7 @@ namespace ATC { // output: // adds all relevant output to outputData //-------------------------------------------------------- - void KinetoThermostatGlcFs::output(OUTPUT_LIST & outputData) + void KinetoThermostatGlcFs::output(OUTPUT_LIST & /* outputData */) { // DO NOT CALL INDIVIDUAL REGULATORS // OUTPUT TOTAL FORCE AND TOTAL POWER diff --git a/lib/atc/KinetoThermostat.h b/lib/atc/KinetoThermostat.h index 465da6b49a..6f7d113734 100644 --- a/lib/atc/KinetoThermostat.h +++ b/lib/atc/KinetoThermostat.h @@ -75,8 +75,11 @@ namespace ATC { KinetoThermostatShapeFunction(AtomicRegulator * kinetoThermostat, int couplingMaxIterations, - const std::string & regulatorPrefix = "") : RegulatorMethod(kinetoThermostat), + const std::string & /* regulatorPrefix */) : RegulatorMethod(kinetoThermostat), couplingMaxIterations_(couplingMaxIterations) {}; + KinetoThermostatShapeFunction(AtomicRegulator * kinetoThermostat, + int couplingMaxIterations) + : RegulatorMethod(kinetoThermostat), couplingMaxIterations_(couplingMaxIterations) {}; virtual ~KinetoThermostatShapeFunction() {}; @@ -120,9 +123,9 @@ namespace ATC { virtual void initialize(); /** applies kinetostat to atoms */ - virtual void apply_mid_predictor(double dt){}; + virtual void apply_mid_predictor(double /* dt */){}; /** applies kinetostat to atoms */ - virtual void apply_post_corrector(double dt){}; + virtual void apply_post_corrector(double /* dt */){}; /** local shape function matrices are incompatible with this mode */ virtual bool use_local_shape_functions() const {return false;}; @@ -142,15 +145,17 @@ namespace ATC { // disable un-needed functionality /** does initial filtering operations before main computation */ - virtual void apply_pre_filtering(double dt){}; + virtual void apply_pre_filtering(double /* dt */){}; /** applies kinetostat correction to atoms */ - virtual void apply_kinetostat(double dt) {}; + virtual void apply_kinetostat(double /* dt */) {}; /** computes the nodal FE force applied by the kinetostat */ - virtual void compute_nodal_lambda_force(double dt){}; + virtual void compute_nodal_lambda_force(double /* dt */){}; /** apply any required corrections for localized kinetostats */ - virtual void apply_localization_correction(const DENS_MAT & source, - DENS_MAT & nodalField, - double weight = 1.){}; + virtual void apply_localization_correction(const DENS_MAT & /* source */, + DENS_MAT & /* nodalField */, + double /* weight */){}; + virtual void apply_localization_correction(const DENS_MAT & /* source */, + DENS_MAT & /* nodalField */){}; private: @@ -177,7 +182,7 @@ namespace ATC { // deactivate un-needed methods /** applies thermostat to atoms in the post-corrector phase */ - virtual void apply_post_corrector(double dt){}; + virtual void apply_post_corrector(double /* dt */){}; protected: @@ -187,7 +192,7 @@ namespace ATC { // deactivate un-needed methods /** apply solution to atomic quantities */ - virtual void apply_to_atoms(PerAtomQuantity * atomVelocities){}; + virtual void apply_to_atoms(PerAtomQuantity * /* atomVelocities */){}; /** construct the RHS vector */ virtual void set_rhs(DENS_MAT & rhs); @@ -223,7 +228,7 @@ namespace ATC { virtual void apply_post_corrector(double dt); /** compute boundary flux, requires thermostat input since it is part of the coupling scheme */ - virtual void compute_boundary_flux(FIELDS & fields) + virtual void compute_boundary_flux(FIELDS & /* fields */) {boundaryFlux_[TEMPERATURE] = 0.; boundaryFlux_[VELOCITY] = 0.;}; /** get data for output */ @@ -291,7 +296,7 @@ namespace ATC { // deactivate un-needed methods /** applies thermostat to atoms in the post-corrector phase */ - virtual void apply_post_corrector(double dt){}; + virtual void apply_post_corrector(double /* dt */){}; protected: @@ -301,7 +306,7 @@ namespace ATC { // deactivate un-needed methods /** apply solution to atomic quantities */ - virtual void apply_to_atoms(PerAtomQuantity * atomVelocities){}; + virtual void apply_to_atoms(PerAtomQuantity * /* atomVelocities */){}; /** construct the RHS vector */ virtual void set_rhs(DENS_MAT & rhs); diff --git a/lib/atc/Kinetostat.cpp b/lib/atc/Kinetostat.cpp index 17c5b6caf7..8093d5925a 100644 --- a/lib/atc/Kinetostat.cpp +++ b/lib/atc/Kinetostat.cpp @@ -445,7 +445,7 @@ namespace ATC { //-------------------------------------------------------- void GlcKinetostat::apply_to_atoms(PerAtomQuantity * quantity, const DENS_MAT & lambdaAtom, - double dt) + double /* dt */) { *quantity -= lambdaAtom; } @@ -576,7 +576,7 @@ namespace ATC { // sets up the right-hand side of the // kinetostat equations //-------------------------------------------------------- - void DisplacementGlc::set_kinetostat_rhs(DENS_MAT & rhs, double dt) + void DisplacementGlc::set_kinetostat_rhs(DENS_MAT & rhs, double /* dt */) { // form rhs : sum_a (hatN_Ia * x_ai) - (Upsilon)_Ii rhs = nodalAtomicMassWeightedDisplacement_->quantity(); @@ -922,7 +922,7 @@ namespace ATC { // sets up the right-hand side of the // kinetostat equations //-------------------------------------------------------- - void VelocityGlc::set_kinetostat_rhs(DENS_MAT & rhs, double dt) + void VelocityGlc::set_kinetostat_rhs(DENS_MAT & rhs, double /* dt */) { // form rhs : sum_a (hatN_Ia * x_ai) - (\dot{Upsilon})_Ii rhs = nodalAtomicMomentum_->quantity(); @@ -1252,7 +1252,7 @@ namespace ATC { // sets up the RHS of the kinetostat equations // for the coupling parameter lambda //-------------------------------------------------------- - void StressFlux::set_kinetostat_rhs(DENS_MAT & rhs, double dt) + void StressFlux::set_kinetostat_rhs(DENS_MAT & rhs, double /* dt */) { // (a) for flux based : // form rhs : \int N_I r dV - \sum_g N_Ig^* f_g @@ -1381,7 +1381,7 @@ namespace ATC { // computes the boundary flux to be consistent with // the controller //-------------------------------------------------------- - void StressFluxGhost::compute_boundary_flux(FIELDS & fields) + void StressFluxGhost::compute_boundary_flux(FIELDS & /* fields */) { // This is only used in computation of atomic sources boundaryFlux_[VELOCITY] = 0.; @@ -1407,7 +1407,7 @@ namespace ATC { // sets up the RHS of the kinetostat equations // for the coupling parameter lambda //-------------------------------------------------------- - void StressFluxGhost::set_kinetostat_rhs(DENS_MAT & rhs, double dt) + void StressFluxGhost::set_kinetostat_rhs(DENS_MAT & rhs, double /* dt */) { // (a) for flux based : // form rhs : \int N_I r dV - \sum_g N_Ig^* f_g @@ -1985,7 +1985,7 @@ namespace ATC { // sets up the RHS of the kinetostat equations // for the coupling parameter lambda //-------------------------------------------------------- - void KinetostatFlux::set_kinetostat_rhs(DENS_MAT & rhs, double dt) + void KinetostatFlux::set_kinetostat_rhs(DENS_MAT & rhs, double /* dt */) { // (a) for flux based : // form rhs : \int N_I r dV - \sum_g N_Ig^* f_g @@ -2056,7 +2056,7 @@ namespace ATC { // computes the boundary flux to be consistent with // the controller //-------------------------------------------------------- - void KinetostatFluxGhost::compute_boundary_flux(FIELDS & fields) + void KinetostatFluxGhost::compute_boundary_flux(FIELDS & /* fields */) { // This is only used in computation of atomic sources boundaryFlux_[VELOCITY] = 0.; @@ -2086,7 +2086,7 @@ namespace ATC { // sets up the RHS of the kinetostat equations // for the coupling parameter lambda //-------------------------------------------------------- - void KinetostatFluxGhost::set_kinetostat_rhs(DENS_MAT & rhs, double dt) + void KinetostatFluxGhost::set_kinetostat_rhs(DENS_MAT & rhs, double /* dt */) { // (a) for flux based : // form rhs : \int N_I r dV - \sum_g N_Ig^* f_g @@ -2348,7 +2348,7 @@ namespace ATC { //-------------------------------------------------------- void KinetostatFixed::add_to_momentum(const DENS_MAT & nodalLambdaForce, DENS_MAT & deltaMomentum, - double dt) + double /* dt */) { deltaMomentum.resize(nNodes_,nsd_); const set & regulatedNodes(regulatedNodes_->quantity()); diff --git a/lib/atc/Kinetostat.h b/lib/atc/Kinetostat.h index 3d9b8cd5d2..691b929e9f 100644 --- a/lib/atc/Kinetostat.h +++ b/lib/atc/Kinetostat.h @@ -129,9 +129,11 @@ namespace ATC { double dt=0.); /** apply any required corrections for localized kinetostats */ - virtual void apply_localization_correction(const DENS_MAT & source, - DENS_MAT & nodalField, - double weight = 1.){}; + virtual void apply_localization_correction(const DENS_MAT & /* source */, + DENS_MAT & /* nodalField */, + double /* weight */){}; + virtual void apply_localization_correction(const DENS_MAT & /* source */, + DENS_MAT & /* nodalField */){}; // member data /** nodeset corresponding to Hoover coupling */ @@ -761,7 +763,7 @@ namespace ATC { virtual void apply_post_corrector(double dt); /** compute boundary flux, requires thermostat input since it is part of the coupling scheme */ - virtual void compute_boundary_flux(FIELDS & fields) + virtual void compute_boundary_flux(FIELDS & /* fields */) {boundaryFlux_[VELOCITY] = 0.;}; /** determine if local shape function matrices are needed */ diff --git a/lib/atc/LammpsInterface.cpp b/lib/atc/LammpsInterface.cpp index 2238d930f4..9c2223f555 100644 --- a/lib/atc/LammpsInterface.cpp +++ b/lib/atc/LammpsInterface.cpp @@ -902,7 +902,7 @@ int LammpsInterface::reset_ghosts(int deln) const //* energy for interactions within the shortrange cutoff double LammpsInterface::shortrange_energy(double *coord, - int itype, int id, double max) const + int itype, int id, double /* max */) const { LAMMPS_NS::Atom * atom = lammps_->atom; double **x = atom->x; @@ -1293,7 +1293,7 @@ int LammpsInterface::nsteps() const { return lammps_->update->nsteps; } int LammpsInterface::sbmask(int j) const {return j >> SBBITS & 3; } -void LammpsInterface::set_list(int id, LAMMPS_NS::NeighList *ptr) { list_ = ptr; } +void LammpsInterface::set_list(int /* id */, LAMMPS_NS::NeighList *ptr) { list_ = ptr; } int LammpsInterface::neighbor_list_inum() const { return list_->inum; } diff --git a/lib/atc/Material.cpp b/lib/atc/Material.cpp index 22273de2ef..676a87524f 100644 --- a/lib/atc/Material.cpp +++ b/lib/atc/Material.cpp @@ -816,7 +816,7 @@ void Material::inv_effective_mass( }; //--------------------------------------------------------------------- void Material::heat_flux( - const FIELD_MATS & fields, + const FIELD_MATS & /* fields */, const GRAD_FIELD_MATS & gradFields, DENS_MAT_VEC & flux) const { @@ -865,7 +865,7 @@ bool Material::electron_drag_power( //--------------------------------------------------------------------- bool Material::electron_recombination( const FIELD_MATS &fields, - const GRAD_FIELD_MATS &gradFields, + const GRAD_FIELD_MATS & /* gradFields */, DENS_MAT & recombination) const { // 1/tau (n - n0) @@ -937,7 +937,7 @@ void Material::electron_flux( } //--------------------------------------------------------------------- void Material::electric_field( - const FIELD_MATS &fields, + const FIELD_MATS & /* fields */, const GRAD_FIELD_MATS &gradFields, DENS_MAT_VEC &flux) const { @@ -950,7 +950,7 @@ void Material::electric_field( } //--------------------------------------------------------------------- void Material::electric_displacement( - const FIELD_MATS &fields, + const FIELD_MATS & /* fields */, const GRAD_FIELD_MATS &gradFields, DENS_MAT_VEC &flux) const { diff --git a/lib/atc/Matrix.h b/lib/atc/Matrix.h index e806ebd016..6745ea96db 100644 --- a/lib/atc/Matrix.h +++ b/lib/atc/Matrix.h @@ -248,7 +248,7 @@ DenseMatrix operator-(const Matrix &A, const Matrix &B) //* performs a matrix-matrix multiply with general type implementation template void MultAB(const Matrix &A, const Matrix &B, DenseMatrix &C, - const bool At, const bool Bt, T a, T b) + const bool At, const bool Bt, T /* a */, T b) { const INDEX sA[2] = {A.nRows(), A.nCols()}; // m is sA[At] k is sA[!At] const INDEX sB[2] = {B.nRows(), B.nCols()}; // k is sB[Bt] n is sB[!Bt] diff --git a/lib/atc/MeshReader.cpp b/lib/atc/MeshReader.cpp index 14101f1297..c4896ec727 100644 --- a/lib/atc/MeshReader.cpp +++ b/lib/atc/MeshReader.cpp @@ -20,7 +20,7 @@ namespace ATC { /** constructor, takes a filename */ MeshReader::MeshReader(string filename, Array periodicity, - double tol) + double /* tol */) : meshfile_(filename), periodicity_(periodicity), nNodes_(0), diff --git a/lib/atc/MoleculeSet.cpp b/lib/atc/MoleculeSet.cpp index 618261f186..e3b1ed30d4 100644 --- a/lib/atc/MoleculeSet.cpp +++ b/lib/atc/MoleculeSet.cpp @@ -165,7 +165,7 @@ namespace ATC { // Constructor //-------------------------------------------------------- SmallMoleculeSet::SmallMoleculeSet(ATC_Method * atc, int groupBit, - PerAtomQuantity * bondList, PerAtomQuantity * numBond) : + PerAtomQuantity * bondList, PerAtomQuantity * /* numBond */) : MoleculeSet(atc,groupBit), bondList_(bondList) { diff --git a/lib/atc/NonLinearSolver.h b/lib/atc/NonLinearSolver.h index d3d906a39a..010e3ee72e 100644 --- a/lib/atc/NonLinearSolver.h +++ b/lib/atc/NonLinearSolver.h @@ -20,7 +20,7 @@ class TangentOperator { public: TangentOperator(){}; virtual ~TangentOperator(){}; - virtual void function(const VECTOR & x, DENS_VEC & f) {}; // =0; + virtual void function(const VECTOR & /* x */, DENS_VEC & /* f */) {}; // =0; virtual void tangent(const VECTOR & x, DENS_VEC & f, MATRIX & dfdx) =0; //virtual void function(const VECTOR & x, VECTOR & f) {}; // =0; //virtual void tangent(const VECTOR & x, VECTOR & f, MATRIX & dfdx) {}; // =0; diff --git a/lib/atc/OutputManager.cpp b/lib/atc/OutputManager.cpp index 4340c8b8b0..996d212507 100644 --- a/lib/atc/OutputManager.cpp +++ b/lib/atc/OutputManager.cpp @@ -792,7 +792,7 @@ void OutputManager::write_data_vtk(OUTPUT_LIST *data) } /** write (ensight gold : ASCII "C" format) dictionary */ -void OutputManager::write_dictionary(double time, OUTPUT_LIST *data) +void OutputManager::write_dictionary(double /* time */, OUTPUT_LIST *data) { // file names string dict_file_name = outputPrefix_ + ".case"; diff --git a/lib/atc/PerAtomQuantity-inl.h b/lib/atc/PerAtomQuantity-inl.h index 037c3adeda..f95e5d306d 100644 --- a/lib/atc/PerAtomQuantity-inl.h +++ b/lib/atc/PerAtomQuantity-inl.h @@ -177,7 +177,7 @@ namespace ATC { //----------------------------------------------------------------- template int PerAtomQuantity::pack_comm(int index, double *buf, - int pbc_flag, int *pbc) + int /* pbc_flag */, int * /* pbc */) { if (this->need_reset()) this->reset(); DenseMatrix & myQuantity(this->quantity_); @@ -256,7 +256,7 @@ namespace ATC { //----------------------------------------------------------------- template int LammpsAtomQuantity::pack_comm(int index, double *buf, - int pbc_flag, int *pbc) + int /* pbc_flag */, int * /* pbc */) { if (this->need_reset()) this->reset(); int bufIdx = 0; @@ -550,7 +550,7 @@ namespace ATC { //----------------------------------------------------------------- template int PerAtomDiagonalMatrix::pack_comm(int index, double *buf, - int pbc_flag, int *pbc) + int /* pbc_flag */, int * /* pbc */) { if (this->need_reset()) this->reset(); DiagonalMatrix & myQuantity(this->quantity_); @@ -756,8 +756,8 @@ namespace ATC { // pack values in local atom-based arrays for passing to ghosts on another proc //----------------------------------------------------------------- template - int PerAtomSparseMatrix::pack_comm(int index, double *buf, - int pbc_flag, int *pbc) + int PerAtomSparseMatrix::pack_comm(int /* index */, double * /* buf */, + int /* pbc_flag */, int */* pbc */) { return 0; } @@ -766,7 +766,7 @@ namespace ATC { // unpack values in local atom-based arrays for passing to ghosts on another proc //----------------------------------------------------------------- template - int PerAtomSparseMatrix::unpack_comm(int index, double *buf) + int PerAtomSparseMatrix::unpack_comm(int /* index */, double * /* buf */) { return 0; } diff --git a/lib/atc/PerAtomQuantity.h b/lib/atc/PerAtomQuantity.h index 548918c9cc..e6cb19981a 100644 --- a/lib/atc/PerAtomQuantity.h +++ b/lib/atc/PerAtomQuantity.h @@ -274,26 +274,26 @@ namespace ATC { virtual int memory_usage() const {return 0;}; /** packs up data for parallel transfer when atoms change processors */ - virtual int pack_exchange(int i, double *buffer) {return 0;}; + virtual int pack_exchange(int /* i */, double */* buffer */) {return 0;}; /** unpacks data after parallel transfer when atoms change processors */ - virtual int unpack_exchange(int i, double *buffer) {return 0;}; + virtual int unpack_exchange(int /* i */, double * /* buffer */) {return 0;}; /** packs up data for parallel transfer to ghost atoms on other processors */ - virtual int pack_comm(int index, double *buf, - int pbc_flag, int *pbc) {return 0;}; + virtual int pack_comm(int /* index */, double * /* buf */, + int /* pbc_flag */, int * /* pbc */) {return 0;}; /** unpacks data after parallel transfer to ghost atoms on other processors */ - virtual int unpack_comm(int index, double *buf) {return 0;}; + virtual int unpack_comm(int /* index */, double * /* buf */) {return 0;}; /** returns size of per-atom communication */ virtual int size_comm() const {return 0;}; /** changes size of temperary lammps storage data if transfer is being used */ - virtual void grow_lammps_array(int nmax, const std::string & tag) {}; + virtual void grow_lammps_array(int /* nmax */, const std::string & /* tag */) {}; /** rearrange memory of temporary lammps storage data, called from copy_array */ - virtual void copy_lammps_array(int i, int j) {}; + virtual void copy_lammps_array(int /* i */, int /* j */) {}; protected: @@ -396,43 +396,43 @@ namespace ATC { {throw ATC_Error("ProtectedClonedAtomQuantity::set_quantity - Cannot modify protected per atom quantities"); return this->quantity_;}; /** sets the quantity to a given value */ - virtual void operator=(const DenseMatrix & target) + virtual void operator=(const DenseMatrix & /* target */) {throw ATC_Error("ProtectedClonedAtomQuantity::set_quantity - Cannot modify protected per atom quantities");}; /** sets the quantity to a given constant value */ - virtual void operator=(const T & target) + virtual void operator=(const T & /* target */) {throw ATC_Error("ProtectedClonedAtomQuantity::operator= - Cannot modify protected per atom quantities");}; /** adds the given data to the Lammps quantity */ - virtual void operator+=(const DenseMatrix & addition) + virtual void operator+=(const DenseMatrix & /* addition */) {throw ATC_Error("ProtectedClonedAtomQuantity::operator+= - Cannot modify protected per atom quantities");}; /** adds the scalar data to the Lammps quantity for AtC atoms */ - virtual void operator+=(T addition) + virtual void operator+=(T /* addition */) {throw ATC_Error("ProtectedClonedAtomQuantity::operator+= - Cannot modify protected per atom quantities");}; /** subtracts the given data from the Lammps quantity */ - virtual void operator-=(const DenseMatrix & subtraction) + virtual void operator-=(const DenseMatrix & /* subtraction */) {throw ATC_Error("ProtectedClonedAtomQuantity::operator-= - Cannot modify protected per atom quantities");}; /** subtracts the scalar data from the Lammps quantity for AtC atoms */ - virtual void operator-=(T subtraction) + virtual void operator-=(T /* subtraction */) {throw ATC_Error("ProtectedClonedAtomQuantity::operator-= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(const DenseMatrix & multiplier) + virtual void operator*=(const DenseMatrix & /* multiplier */) {throw ATC_Error("ProtectedClonedAtomQuantity::operator*= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(T multiplier) + virtual void operator*=(T /* multiplier */) {throw ATC_Error("ProtectedClonedAtomQuantity::operator*= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(const DenseMatrix & divisor) + virtual void operator/=(const DenseMatrix & /* divisor */) {throw ATC_Error("ProtectedClonedAtomQuantity::operator/= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(T divisor) + virtual void operator/=(T /* divisor */) {throw ATC_Error("ProtectedClonedAtomQuantity::operator/= - Cannot modify protected per atom quantities");}; protected: @@ -517,43 +517,43 @@ namespace ATC { {throw ATC_Error("ProtectedAtomQuantity::set_quantity - Cannot modify protected per atom quantities"); return this->quantity_;}; /** sets the quantity to a given value */ - virtual void operator=(const DenseMatrix & target) + virtual void operator=(const DenseMatrix & /* target */) {throw ATC_Error("ProtectedAtomQuantity::set_quantity - Cannot modify protected per atom quantities");}; /** sets the quantity to a given constant value */ - virtual void operator=(const T & target) + virtual void operator=(const T & /* target */) {throw ATC_Error("ProtectedAtomQuantity::operator= - Cannot modify protected per atom quantities");}; /** adds the given data to the Lammps quantity */ - virtual void operator+=(const DenseMatrix & addition) + virtual void operator+=(const DenseMatrix & /* addition */) {throw ATC_Error("ProtectedAtomQuantity::operator+= - Cannot modify protected per atom quantities");}; /** adds the scalar data to the Lammps quantity for AtC atoms */ - virtual void operator+=(T addition) + virtual void operator+=(T /* addition */) {throw ATC_Error("ProtectedAtomQuantity::operator+= - Cannot modify protected per atom quantities");}; /** subtracts the given data from the Lammps quantity */ - virtual void operator-=(const DenseMatrix & subtraction) + virtual void operator-=(const DenseMatrix & /* subtraction */) {throw ATC_Error("ProtectedAtomQuantity::operator-= - Cannot modify protected per atom quantities");}; /** subtracts the scalar data from the Lammps quantity for AtC atoms */ - virtual void operator-=(T subtraction) + virtual void operator-=(T /* subtraction */) {throw ATC_Error("ProtectedAtomQuantity::operator-= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(const DenseMatrix & multiplier) + virtual void operator*=(const DenseMatrix & /* multiplier */) {throw ATC_Error("ProtectedAtomQuantity::operator*= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(T multiplier) + virtual void operator*=(T /* multiplier */) {throw ATC_Error("ProtectedAtomQuantity::operator*= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(const DenseMatrix & divisor) + virtual void operator/=(const DenseMatrix & /* divisor */) {throw ATC_Error("ProtectedAtomQuantity::operator/= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(T divisor) + virtual void operator/=(T /* divisor */) {throw ATC_Error("ProtectedAtomQuantity::operator/= - Cannot modify protected per atom quantities");}; protected: @@ -646,43 +646,43 @@ namespace ATC { {throw ATC_Error("ProtectedLammpsAtomQuantity::set_quantity - Cannot modify protected per atom quantities"); return this->quantity_;}; /** sets the quantity to a given value */ - virtual void operator=(const DenseMatrix & target) + virtual void operator=(const DenseMatrix & /* target */) {throw ATC_Error("ProtectedLammpsAtomQuantity::set_quantity - Cannot modify protected per atom quantities");}; /** sets the quantity to a given constant value */ - virtual void operator=(const T & target) + virtual void operator=(const T & /* target */) {throw ATC_Error("ProtectedLammpsAtomQuantity::operator= - Cannot modify protected per atom quantities");}; /** adds the given data to the Lammps quantity */ - virtual void operator+=(const DenseMatrix & addition) + virtual void operator+=(const DenseMatrix & /* addition */) {throw ATC_Error("ProtectedLammpsAtomQuantity::operator+= - Cannot modify protected per atom quantities");}; /** adds the scalar data to the Lammps quantity for AtC atoms */ - virtual void operator+=(T addition) + virtual void operator+=(T /* addition */) {throw ATC_Error("ProtectedLammpsAtomQuantity::operator+= - Cannot modify protected per atom quantities");}; /** subtracts the given data from the Lammps quantity */ - virtual void operator-=(const DenseMatrix & subtraction) + virtual void operator-=(const DenseMatrix & /* subtraction */) {throw ATC_Error("ProtectedLammpsAtomQuantity::operator-= - Cannot modify protected per atom quantities");}; /** subtracts the scalar data from the Lammps quantity for AtC atoms */ - virtual void operator-=(T subtraction) + virtual void operator-=(T /* subtraction */) {throw ATC_Error("ProtectedLammpsAtomQuantity::operator-= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(const DenseMatrix & multiplier) + virtual void operator*=(const DenseMatrix & /* multiplier */) {throw ATC_Error("ProtectedLammpsAtomQuantity::operator*= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(T multiplier) + virtual void operator*=(T /* multiplier */) {throw ATC_Error("ProtectedLammpsAtomQuantity::operator*= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(const DenseMatrix & divisor) + virtual void operator/=(const DenseMatrix & /* divisor */) {throw ATC_Error("ProtectedLammpsAtomQuantity::operator/= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(T divisor) + virtual void operator/=(T /* divisor */) {throw ATC_Error("ProtectedLammpsAtomQuantity::operator/= - Cannot modify protected per atom quantities");}; protected: @@ -734,16 +734,16 @@ namespace ATC { virtual int memory_usage() const {return 0;}; /** packs up data for parallel transfer */ - virtual int pack_exchange(int i, double *buffer) {return 0;}; + virtual int pack_exchange(int /* i */, double * /* buffer */) {return 0;}; /** unpacks data after parallel transfer */ - virtual int unpack_exchange(int i, double *buffer) {return 0;}; + virtual int unpack_exchange(int /* i */, double * /* buffer */) {return 0;}; /** changes size of temperary lammps storage data if transfer is being used */ - virtual void grow_lammps_array(int nmax, const std::string & tag) {}; + virtual void grow_lammps_array(int /* nmax */, const std::string & /* tag */) {}; /** rearrange memory of temporary lammps storage data, called from copy_array */ - virtual void copy_lammps_array(int i, int j) {}; + virtual void copy_lammps_array(int /* i */, int /* j */) {}; protected: @@ -791,16 +791,16 @@ namespace ATC { virtual int memory_usage() const {return 0;}; /** packs up data for parallel transfer */ - virtual int pack_exchange(int i, double *buffer) {return 0;}; + virtual int pack_exchange(int /* i */, double * /* buffer */) {return 0;}; /** unpacks data after parallel transfer */ - virtual int unpack_exchange(int i, double *buffer) {return 0;}; + virtual int unpack_exchange(int /* i */, double * /* buffer */) {return 0;}; /** changes size of temperary lammps storage data if transfer is being used */ - virtual void grow_lammps_array(int nmax, const std::string & tag) {}; + virtual void grow_lammps_array(int /* nmax */, const std::string & /* tag */) {}; /** rearrange memory of temporary lammps storage data, called from copy_array */ - virtual void copy_lammps_array(int i, int j) {}; + virtual void copy_lammps_array(int /* i */, int /* j */) {}; protected: @@ -1066,43 +1066,43 @@ namespace ATC { {throw ATC_Error("ProtectedAtomDiagonalMatrix::set_quantity - Cannot modify protected per atom quantities"); return this->quantity_;}; /** sets the quantity to a given value */ - virtual void operator=(const DiagonalMatrix & target) + virtual void operator=(const DiagonalMatrix & /* target */) {throw ATC_Error("ProtectedAtomDiagonalMatrix::set_quantity - Cannot modify protected per atom quantities");}; /** sets the quantity to a given constant value */ - virtual void operator=(const T & target) + virtual void operator=(const T & /* target */) {throw ATC_Error("ProtectedAtomDiagonalMatrix::operator= - Cannot modify protected per atom quantities");}; /** adds the given data to the Lammps quantity */ - virtual void operator+=(const DiagonalMatrix & addition) + virtual void operator+=(const DiagonalMatrix & /* addition */) {throw ATC_Error("ProtectedAtomDiagonalMatrix::operator+= - Cannot modify protected per atom quantities");}; /** adds the scalar data to the Lammps quantity for AtC atoms */ - virtual void operator+=(T addition) + virtual void operator+=(T /* addition */) {throw ATC_Error("ProtectedAtomDiagonalMatrix::operator+= - Cannot modify protected per atom quantities");}; /** subtracts the given data from the Lammps quantity */ - virtual void operator-=(const DiagonalMatrix & subtraction) + virtual void operator-=(const DiagonalMatrix & /* subtraction */) {throw ATC_Error("ProtectedAtomDiagonalMatrix::operator-= - Cannot modify protected per atom quantities");}; /** subtracts the scalar data from the Lammps quantity for AtC atoms */ - virtual void operator-=(T subtraction) + virtual void operator-=(T /* subtraction */) {throw ATC_Error("ProtectedAtomDiagonalMatrix::operator-= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(const DiagonalMatrix & multiplier) + virtual void operator*=(const DiagonalMatrix & /* multiplier */) {throw ATC_Error("ProtectedAtomDiagonalMatrix::operator*= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(T multiplier) + virtual void operator*=(T /* multiplier */) {throw ATC_Error("ProtectedAtomDiagonalMatrix::operator*= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(const DiagonalMatrix & divisor) + virtual void operator/=(const DiagonalMatrix & /* divisor */) {throw ATC_Error("ProtectedAtomDiagonalMatrix::operator/= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(T divisor) + virtual void operator/=(T /* divisor */) {throw ATC_Error("ProtectedAtomDiagonalMatrix::operator/= - Cannot modify protected per atom quantities");}; protected: @@ -1331,43 +1331,43 @@ namespace ATC { {throw ATC_Error("ProtectedAtomSparseMatrix::set_quantity - Cannot modify protected per atom quantities"); return this->quantity_;}; /** sets the quantity to a given value */ - virtual void operator=(const SparseMatrix & target) + virtual void operator=(const SparseMatrix & /* target */) {throw ATC_Error("ProtectedAtomSparseMatrix::set_quantity - Cannot modify protected per atom quantities");}; /** sets the quantity to a given constant value */ - virtual void operator=(const T & target) + virtual void operator=(const T & /* target */) {throw ATC_Error("ProtectedAtomSparseMatrix::operator= - Cannot modify protected per atom quantities");}; /** adds the given data to the Lammps quantity */ - virtual void operator+=(const SparseMatrix & addition) + virtual void operator+=(const SparseMatrix & /* addition */) {throw ATC_Error("ProtectedAtomSparseMatrix::operator+= - Cannot modify protected per atom quantities");}; /** adds the scalar data to the Lammps quantity for AtC atoms */ - virtual void operator+=(T addition) + virtual void operator+=(T /* addition */) {throw ATC_Error("ProtectedAtomSparseMatrix::operator+= - Cannot modify protected per atom quantities");}; /** subtracts the given data from the Lammps quantity */ - virtual void operator-=(const SparseMatrix & subtraction) + virtual void operator-=(const SparseMatrix & /* subtraction */) {throw ATC_Error("ProtectedAtomSparseMatrix::operator-= - Cannot modify protected per atom quantities");}; /** subtracts the scalar data from the Lammps quantity for AtC atoms */ - virtual void operator-=(T subtraction) + virtual void operator-=(T /* subtraction */) {throw ATC_Error("ProtectedAtomSparseMatrix::operator-= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(const SparseMatrix & multiplier) + virtual void operator*=(const SparseMatrix & /* multiplier */) {throw ATC_Error("ProtectedAtomSparseMatrix::operator*= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(T multiplier) + virtual void operator*=(T /* multiplier */) {throw ATC_Error("ProtectedAtomSparseMatrix::operator*= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(const SparseMatrix & divisor) + virtual void operator/=(const SparseMatrix & /* divisor */) {throw ATC_Error("ProtectedAtomSparseMatrix::operator/= - Cannot modify protected per atom quantities");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(T divisor) + virtual void operator/=(T /* divisor */) {throw ATC_Error("ProtectedAtomSparseMatrix::operator/= - Cannot modify protected per atom quantities");}; protected: @@ -1420,27 +1420,27 @@ namespace ATC { virtual int memory_usage() const {return 0;}; /** packs up data for parallel transfer when atoms change processors */ - virtual int pack_exchange(int i, double *buffer) {return 0;}; + virtual int pack_exchange(int /* i */, double * /* buffer */) {return 0;}; /** unpacks data after parallel transfer when atoms change processors */ - virtual int unpack_exchange(int i, double *buffer) {return 0;}; + virtual int unpack_exchange(int /* i */, double * /* buffer */) {return 0;}; // pack/unpack_comm only valid if the quantity is over all real and processor ghost atoms /** packs up data for parallel transfer to ghost atoms on other processors */ - virtual int pack_comm(int index, double *buf, - int pbc_flag, int *pbc) {return 0;}; + virtual int pack_comm(int /* index */, double * /* buf */, + int /* pbc_flag */, int * /* pbc */) {return 0;}; /** unpacks data after parallel transfer to ghost atoms on other processors */ - virtual int unpack_comm(int index, double *buf) {return 0;}; + virtual int unpack_comm(int /* index */, double * /* buf */) {return 0;}; /** returns per-atom size of communicated data */ virtual int size_comm() const {return 0;}; /** changes size of temperary lammps storage data if transfer is being used */ - virtual void grow_lammps_array(int nmax, const std::string & tag) {}; + virtual void grow_lammps_array(int /* nmax */, const std::string & /* tag */) {}; /** rearrange memory of temporary lammps storage data, called from copy_array */ - virtual void copy_lammps_array(int i, int j) {}; + virtual void copy_lammps_array(int /* i */, int /* j */) {}; protected: diff --git a/lib/atc/PerAtomQuantityLibrary.cpp b/lib/atc/PerAtomQuantityLibrary.cpp index 36f9252451..7f8a9b879a 100644 --- a/lib/atc/PerAtomQuantityLibrary.cpp +++ b/lib/atc/PerAtomQuantityLibrary.cpp @@ -1129,7 +1129,7 @@ namespace ATC { FluctuatingKineticTensor::FluctuatingKineticTensor(ATC_Method * atc, PerAtomQuantity * atomVelocities, PerAtomQuantity * atomMasses, - PerAtomQuantity * atomMeanVelocities, + PerAtomQuantity * /* atomMeanVelocities */, AtomType atomType) : ProtectedAtomQuantity(atc,6,atomType), atomVelocities_(atomVelocities), diff --git a/lib/atc/PerAtomQuantityLibrary.h b/lib/atc/PerAtomQuantityLibrary.h index b3db140f82..0089df7855 100644 --- a/lib/atc/PerAtomQuantityLibrary.h +++ b/lib/atc/PerAtomQuantityLibrary.h @@ -1045,26 +1045,26 @@ namespace ATC { virtual int memory_usage() const {return 0;}; /** packs up data for parallel transfer when atoms change processors */ - virtual int pack_exchange(int i, double *buffer) {return 0;}; + virtual int pack_exchange(int /* i */, double * /* buffer */) {return 0;}; /** unpacks data after parallel transfer when atoms change processors */ - virtual int unpack_exchange(int i, double *buffer) {return 0;}; + virtual int unpack_exchange(int /* i */, double * /* buffer */) {return 0;}; /** packs up data for parallel transfer to ghost atoms on other processors */ - virtual int pack_comm(int index, double *buf, - int pbc_flag, int *pbc) {return 0;}; + virtual int pack_comm(int /* index */, double * /* buf */, + int /* pbc_flag */, int * /* pbc */) {return 0;}; /** unpacks data after parallel transfer to ghost atoms on other processors */ - virtual int unpack_comm(int index, double *buf) {return 0;}; + virtual int unpack_comm(int /* index */, double * /* buf */) {return 0;}; /** returns size of per-atom communication */ virtual int size_comm() const {return 0;}; /** changes size of temperary lammps storage data if transfer is being used */ - virtual void grow_lammps_array(int nmax, const std::string & tag) {}; + virtual void grow_lammps_array(int /* nmax */, const std::string & /* tag */) {}; /** rearrange memory of temporary lammps storage data, called from copy_array */ - virtual void copy_lammps_array(int i, int j) {}; + virtual void copy_lammps_array(int /* i */, int /* j */) {}; protected: diff --git a/lib/atc/PerPairQuantity.cpp b/lib/atc/PerPairQuantity.cpp index 86ad331eca..3632a87aa9 100644 --- a/lib/atc/PerPairQuantity.cpp +++ b/lib/atc/PerPairQuantity.cpp @@ -281,7 +281,6 @@ void BondMatrixKernel::reset(void) const int nNodes = feMesh_->num_nodes_unique(); quantity_.reset(nNodes,nPairs); double lam1,lam2; - std::pair< int,int > pair_jk; int heartbeatFreq = (nNodes <= 10 ? 1 : (int) nNodes / 10); HeartBeat beat("computing bond matrix ",heartbeatFreq); beat.start(); @@ -337,7 +336,6 @@ void BondMatrixPartitionOfUnity::reset(void) const int nodes_per_element = feMesh_->num_nodes_per_element(); Array node_list(nodes_per_element); DENS_VEC shp(nodes_per_element); - std::pair< int,int > pair_jk; int heartbeatFreq = (int) nPairs / 10; HeartBeat beat("computing bond matrix ",heartbeatFreq); beat.start(); diff --git a/lib/atc/PhysicsModel.h b/lib/atc/PhysicsModel.h index ce25174d90..50b327ce0b 100644 --- a/lib/atc/PhysicsModel.h +++ b/lib/atc/PhysicsModel.h @@ -47,7 +47,7 @@ namespace ATC void initialize(void); // set timescale parameters based on a given lengthscale - virtual void set_timescales(const double lengthscale) {}; + virtual void set_timescales(const double /* lengthscale */) {}; /** access number of materials */ int nMaterials(void) const { return materials_.size(); } diff --git a/lib/atc/PoissonSolver.cpp b/lib/atc/PoissonSolver.cpp index b3c077b593..86670ae218 100644 --- a/lib/atc/PoissonSolver.cpp +++ b/lib/atc/PoissonSolver.cpp @@ -71,7 +71,7 @@ PoissonSolver::~PoissonSolver() // Parser // -------------------------------------------------------------------- -bool PoissonSolver::modify(int narg, char **arg) + bool PoissonSolver::modify(int /* narg */, char **arg) { bool match = false; /*! \page man_poisson_solver fix_modify AtC poisson_solver diff --git a/lib/atc/PolynomialSolver.cpp b/lib/atc/PolynomialSolver.cpp index 9088a7eaf3..b498b3b5bb 100644 --- a/lib/atc/PolynomialSolver.cpp +++ b/lib/atc/PolynomialSolver.cpp @@ -104,7 +104,7 @@ namespace ATC { // solve ode with polynomial source : y'n + a_n-1 y'n-1 + ... = b_n x^n +... void integrate_ode(double x, - int na, double * a, double * y0, double * y, int nb, double *b ) + int na, double * a, double * y0, double * y, int nb, double * /* b */ ) { if (na == 2) { // particular diff --git a/lib/atc/SchrodingerSolver.cpp b/lib/atc/SchrodingerSolver.cpp index 92eb1a7a62..d79fa85595 100644 --- a/lib/atc/SchrodingerSolver.cpp +++ b/lib/atc/SchrodingerSolver.cpp @@ -66,7 +66,7 @@ double fermi_dirac(const double E, const double T) M_ = sparseM.dense_copy(); } //----------------------------------------------------- - bool SchrodingerSolver::solve(FIELDS & fields) + bool SchrodingerSolver::solve(FIELDS & /* fields */) { // typedef struct{float real, imag;} COMPLEX; @@ -132,7 +132,7 @@ double fermi_dirac(const double E, const double T) //-------------------------------------------------------- // compute charge density per slice //-------------------------------------------------------- - bool SliceSchrodingerSolver::solve(FIELDS & fields) + bool SliceSchrodingerSolver::solve(FIELDS & /* fields */) { // fields DENS_MAT & psi = (atc_->field(ELECTRON_WAVEFUNCTION)).set_quantity(); @@ -250,7 +250,7 @@ double fermi_dirac(const double E, const double T) { } //---------------------------------------------------------- - bool SchrodingerPoissonManager::modify(int narg, char **arg) + bool SchrodingerPoissonManager::modify(int /* narg */, char **arg) { bool match = false; int argIndx = 0; @@ -350,7 +350,7 @@ double fermi_dirac(const double E, const double T) } //---------------------------------------------------------------------- - void SchrodingerPoissonSolver::solve(FIELDS & rhs, GRAD_FIELD_MATS & fluxes) + void SchrodingerPoissonSolver::solve(FIELDS & rhs, GRAD_FIELD_MATS & /* fluxes */) { if ((atc_->prescribed_data_manager()->all_fixed(ELECTRON_WAVEFUNCTION)) && (atc_->prescribed_data_manager()->all_fixed(ELECTRIC_POTENTIAL))) { @@ -739,7 +739,7 @@ double fermi_dirac(const double E, const double T) if (solver_) delete solver_; } //-------------------------------------------------------------------------- - void GlobalSliceSchrodingerPoissonSolver::solve(FIELDS & rhs, GRAD_FIELD_MATS & fluxes) + void GlobalSliceSchrodingerPoissonSolver::solve(FIELDS & rhs, GRAD_FIELD_MATS & /* fluxes */) { const DENS_MAT & phi = (atc_->fields_[ELECTRIC_POTENTIAL]).quantity(); const DENS_MAT & n = (atc_->fields_[ELECTRON_DENSITY] ).quantity(); diff --git a/lib/atc/SchrodingerSolver.h b/lib/atc/SchrodingerSolver.h index 9b8616b458..e2addc48a3 100644 --- a/lib/atc/SchrodingerSolver.h +++ b/lib/atc/SchrodingerSolver.h @@ -41,7 +41,7 @@ class SchrodingerSolver { virtual ~SchrodingerSolver(){}; /** parser */ - bool modify(int narg, char **arg){ return false;} + bool modify(int /* narg */, char ** /* arg */){ return false;} /** initialize */ void initialize(void); @@ -103,7 +103,7 @@ class SliceSchrodingerSolver : public SchrodingerSolver { virtual ~SliceSchrodingerSolver(){}; /** parser */ - bool modify(int narg, char **arg){return false;} + bool modify(int /* narg */, char ** /* arg */){return false;} /** initialize */ void initialize(void); diff --git a/lib/atc/SparseMatrix-inl.h b/lib/atc/SparseMatrix-inl.h index f70dd0361d..36867ad8de 100644 --- a/lib/atc/SparseMatrix-inl.h +++ b/lib/atc/SparseMatrix-inl.h @@ -498,7 +498,7 @@ TRIPLET SparseMatrix::triplet(INDEX i) const // full reset - completely wipes out all SparseMatrix data, zero is ignored //----------------------------------------------------------------------------- template -void SparseMatrix::reset(INDEX rows, INDEX cols, bool zero) +void SparseMatrix::reset(INDEX rows, INDEX cols, bool /* zero */) { _delete(); _nRows = rows; @@ -545,7 +545,7 @@ void SparseMatrix::reset(const DenseMatrix& D, double TOL) // copy - dangerous: ignores rows & columns //----------------------------------------------------------------------------- template -void SparseMatrix::copy(const T * ptr, INDEX rows, INDEX cols) +void SparseMatrix::copy(const T * /* ptr */, INDEX /* rows */, INDEX /* cols */) { std::cout << "SparseMatrix::copy() has no effect.\n"; throw; diff --git a/lib/atc/SparseVector-inl.h b/lib/atc/SparseVector-inl.h index 204c412d6d..760eb66f58 100644 --- a/lib/atc/SparseVector-inl.h +++ b/lib/atc/SparseVector-inl.h @@ -106,7 +106,7 @@ std::string SparseVector::to_string() const // Indexes the ith component of the vector or returns zero if not found. template -T SparseVector::operator()(INDEX i, INDEX j) const +T SparseVector::operator()(INDEX i, INDEX /* j */) const { STORE::const_iterator it = data_.find(i); if (it == data_.end()) return 0.0; @@ -115,7 +115,7 @@ T SparseVector::operator()(INDEX i, INDEX j) const // Indexes the ith component of the vector or returns zero if not found. template -T& SparseVector::operator()(INDEX i, INDEX j) +T& SparseVector::operator()(INDEX i, INDEX /* j */) { return data_[i]; } @@ -129,7 +129,7 @@ template T SparseVector::operator[](INDEX i) const // Indexes the ith component of the vector or returns zero if not found. template T& SparseVector::operator[](INDEX i) { - return (*this)[i]; + return (*this)(i); } // Returns a pair (index, value) for a nonzero in the vector. @@ -177,7 +177,7 @@ SparseVector& SparseVector::operator=(const SparseVector &c) // Changes the size of the SparseVector template -void SparseVector::resize(INDEX nRows, INDEX nCols, bool copy) +void SparseVector::resize(INDEX nRows, INDEX /* nCols */, bool copy) { length_ = nRows; STORE::iterator it; @@ -202,16 +202,14 @@ void SparseVector::zero() template -void SparseVector::copy(const T* ptr, INDEX nRows, INDEX nCols) +void SparseVector::copy(const T* /* ptr */, INDEX /* nRows */, INDEX /* nCols */) { - } template -void SparseVector::write_restart(FILE *F) const +void SparseVector::write_restart(FILE */* F */) const { - } // writes a stream to a matlab script to recreate this variable diff --git a/lib/atc/SpeciesTimeIntegrator.cpp b/lib/atc/SpeciesTimeIntegrator.cpp index bf9f1a8888..3a196e745a 100644 --- a/lib/atc/SpeciesTimeIntegrator.cpp +++ b/lib/atc/SpeciesTimeIntegrator.cpp @@ -37,7 +37,7 @@ namespace ATC { // modify // parses inputs and modifies state of the filter //-------------------------------------------------------- - bool SpeciesTimeIntegrator::modify(int narg, char **arg) + bool SpeciesTimeIntegrator::modify(int /* narg */, char ** /* arg */) { bool match = false; @@ -185,7 +185,7 @@ namespace ATC { // first time integration computations // before FractionalStep step 2 //-------------------------------------------------------- - void SpeciesTimeIntegratorFractionalStep::pre_final_integrate1(double dt) + void SpeciesTimeIntegratorFractionalStep::pre_final_integrate1(double /* dt */) { // Compute MD contribution to FEM equation @@ -244,7 +244,7 @@ namespace ATC { //-------------------------------------------------------- // pre_initial_integrate1 //-------------------------------------------------------- - void SpeciesTimeIntegratorFractionalStepFiltered::pre_final_integrate1(double dt) + void SpeciesTimeIntegratorFractionalStepFiltered::pre_final_integrate1(double /* dt */) { } diff --git a/lib/atc/Stress.cpp b/lib/atc/Stress.cpp index df329f9faf..906b15986e 100644 --- a/lib/atc/Stress.cpp +++ b/lib/atc/Stress.cpp @@ -62,7 +62,7 @@ void deformation_gradient(const DENS_MAT_VEC &du, INDEX q, MATRIX &F) // E = 1/2 stress*strain for linear elastic models //============================================================================= -void Stress::elastic_energy(const FIELD_MATS &fields, + void Stress::elastic_energy(const FIELD_MATS & /* fields */, const GRAD_FIELD_MATS &gradFields, DENS_MAT &energy) const { @@ -103,7 +103,7 @@ StressLinearElastic::StressLinearElastic(fstream &fileId) // compute the stress at N integration points from the displacement gradient // T_{ij} = 1/2*C_{ijkl}* (u_{k,l} + u_{l,k}) //============================================================================= -void StressLinearElastic::stress(const FIELD_MATS &fields, + void StressLinearElastic::stress(const FIELD_MATS & /* fields */, const GRAD_FIELD_MATS &gradFields, DENS_MAT_VEC &sigma) { @@ -159,7 +159,7 @@ StressCubicElastic::StressCubicElastic(fstream &fileId) // compute the stress at N integration points from the displacement gradient // T_{ij} = 1/2*C_{ijkl}*(u_{k,l} + u_{l,k}) //--------------------------------------------------------------------------- -void StressCubicElastic::stress(const FIELD_MATS &fields, + void StressCubicElastic::stress(const FIELD_MATS & /* fields */, const GRAD_FIELD_MATS &gradFields, DENS_MAT_VEC &sigma) { @@ -200,7 +200,7 @@ void StressCubicElastic::stress(const FIELD_MATS &fields, // = 1/2 (4 c44 (u12^2 + u13^2 + u23^2) + 2 c12 (u11 u22 + u11 u33 + u22 u33) // + c11 (u11^2 + u22^2 + u33^2)) //--------------------------------------------------------------------------- -void StressCubicElastic::elastic_energy(const FIELD_MATS &fields, + void StressCubicElastic::elastic_energy(const FIELD_MATS & /* fields */, const GRAD_FIELD_MATS &gradFields, DENS_MAT &energy) const { diff --git a/lib/atc/Stress.h b/lib/atc/Stress.h index bf40655192..513cdb2d97 100644 --- a/lib/atc/Stress.h +++ b/lib/atc/Stress.h @@ -24,7 +24,7 @@ namespace ATC { virtual ~Stress() {}; virtual void initialize(void){}; //* Returns parameter values, (Nothing uses this). - virtual void parameters(std::map ¶meters) {} + virtual void parameters(std::map & /* parameters */) {} //* Computes stress given a displacement gradient. //* Units: mvv/L^3 (i.e. for units Real: g/(mol ps^2 A^2) ) virtual void stress(const FIELD_MATS &fields, @@ -36,7 +36,7 @@ namespace ATC { const GRAD_FIELD_MATS &gradFields, DENS_MAT &energy) const; //* Returns the material tangent at a given deformation gradient. - virtual void tangent(const MATRIX &F, MATRIX &C) const + virtual void tangent(const MATRIX & /* F */, MATRIX & /* C */) const {throw ATC_Error("Stress::tangent: unimplemented function");} }; @@ -59,7 +59,7 @@ namespace ATC { virtual void elastic_energy(const FIELD_MATS &fields, const GRAD_FIELD_MATS &gradFields, DENS_MAT &energy) const; - virtual void tangent(const MATRIX &F, MATRIX &C) const {C=C_;} + virtual void tangent(const MATRIX & /* F */, MATRIX &C) const {C=C_;} protected: double c11_, c12_, c44_; DENS_MAT C_; diff --git a/lib/atc/ThermalTimeIntegrator.cpp b/lib/atc/ThermalTimeIntegrator.cpp index 8186437bfa..f68f46b01f 100644 --- a/lib/atc/ThermalTimeIntegrator.cpp +++ b/lib/atc/ThermalTimeIntegrator.cpp @@ -28,7 +28,7 @@ namespace ATC { // modify // parses inputs and modifies state of the integrator //-------------------------------------------------------- - bool ThermalTimeIntegrator::modify(int narg, char **arg) + bool ThermalTimeIntegrator::modify(int /* narg */, char **arg) { bool foundMatch = false; int argIndex = 0; @@ -570,7 +570,7 @@ namespace ATC { // compute_temperature_delta //-------------------------------------------------------- void ThermalTimeIntegratorFractionalStep::compute_temperature_delta(const DENS_MAT & atomicEnergyDelta, - double dt) + double /* dt */) { DENS_MAT & myAtomicTemperatureDelta(atomicTemperatureDelta_.set_quantity()); myAtomicTemperatureDelta = nodalAtomicEnergyOld_.quantity() + atomicEnergyDelta; diff --git a/lib/atc/Thermostat.cpp b/lib/atc/Thermostat.cpp index 41312bd851..0ede724371 100644 --- a/lib/atc/Thermostat.cpp +++ b/lib/atc/Thermostat.cpp @@ -483,7 +483,7 @@ namespace ATC { // manages the solution of the // thermostat equations and variables //-------------------------------------------------------- - void ThermostatRescale::compute_thermostat(double dt) + void ThermostatRescale::compute_thermostat(double /* dt */) { // compute right-hand side this->set_rhs(_rhs_); @@ -738,7 +738,7 @@ namespace ATC { // Constructor //-------------------------------------------------------- ThermostatGlcFs::ThermostatGlcFs(AtomicRegulator * thermostat, - int lambdaMaxIterations, + int /* lambdaMaxIterations */, const string & regulatorPrefix) : RegulatorMethod(thermostat,regulatorPrefix), lambdaSolver_(NULL), @@ -1225,7 +1225,7 @@ namespace ATC { // fixed (uncoupled) nodes //-------------------------------------------------------- void ThermostatIntegratorFlux::set_thermostat_rhs(DENS_MAT & rhs, - double dt) + double /* dt */) { // only tested with flux != 0 + ess bc = 0 @@ -1586,7 +1586,7 @@ namespace ATC { //-------------------------------------------------------- void ThermostatIntegratorFixed::add_to_energy(const DENS_MAT & nodalLambdaPower, DENS_MAT & deltaEnergy, - double dt) + double /* dt */) { deltaEnergy.resize(nNodes_,1); @@ -2387,7 +2387,7 @@ namespace ATC { // determines the power exerted by the Hoover // thermostat at each FE node //-------------------------------------------------------- - void ThermostatHooverVerlet::add_to_lambda_power(const DENS_MAT & myLambdaForce, + void ThermostatHooverVerlet::add_to_lambda_power(const DENS_MAT & /* myLambdaForce */, double dt) { _myNodalLambdaPower_ = nodalAtomicHooverLambdaPower_->quantity(); @@ -2593,7 +2593,7 @@ namespace ATC { // determines the power exerted by the Hoover // thermostat at each FE node //-------------------------------------------------------- - void ThermostatHooverVerletFiltered::add_to_lambda_power(const DENS_MAT & myLambdaForce, + void ThermostatHooverVerletFiltered::add_to_lambda_power(const DENS_MAT & /* myLambdaForce */, double dt) { _myNodalLambdaPower_ = nodalAtomicHooverLambdaPower_->quantity(); diff --git a/lib/atc/Thermostat.h b/lib/atc/Thermostat.h index 65dbba7e15..95d2d1162d 100644 --- a/lib/atc/Thermostat.h +++ b/lib/atc/Thermostat.h @@ -128,7 +128,7 @@ namespace ATC { virtual void apply_post_corrector(double dt); /** compute boundary flux, requires thermostat input since it is part of the coupling scheme */ - virtual void compute_boundary_flux(FIELDS & fields) + virtual void compute_boundary_flux(FIELDS & /* fields */) {boundaryFlux_[TEMPERATURE] = 0.;}; /** get data for output */ @@ -540,7 +540,7 @@ namespace ATC { virtual void apply_post_corrector(double dt); /** compute boundary flux, requires thermostat input since it is part of the coupling scheme */ - virtual void compute_boundary_flux(FIELDS & fields) + virtual void compute_boundary_flux(FIELDS & /* fields */) {boundaryFlux_[TEMPERATURE] = 0.;}; /** determine if local shape function matrices are needed */ @@ -917,7 +917,7 @@ namespace ATC { virtual void finish() {}; /** compute boundary flux, requires thermostat input since it is part of the coupling scheme */ - virtual void compute_boundary_flux(FIELDS & fields) + virtual void compute_boundary_flux(FIELDS & /* fields */) {boundaryFlux_[TEMPERATURE] = 0.;}; protected: @@ -1022,7 +1022,7 @@ namespace ATC { virtual void finish() {}; /** compute boundary flux, requires thermostat input since it is part of the coupling scheme */ - virtual void compute_boundary_flux(FIELDS & fields) + virtual void compute_boundary_flux(FIELDS & /* fields */) {boundaryFlux_[TEMPERATURE] = 0.;}; protected: diff --git a/lib/atc/TimeFilter.cpp b/lib/atc/TimeFilter.cpp index cb6aff9beb..08cb64c8fe 100644 --- a/lib/atc/TimeFilter.cpp +++ b/lib/atc/TimeFilter.cpp @@ -40,7 +40,7 @@ namespace ATC { // modify // parses input commands //-------------------------------------------------------- - bool TimeFilterManager::modify(int narg, char ** arg) + bool TimeFilterManager::modify(int /* narg */, char ** arg) { bool foundMatch = false; @@ -210,7 +210,7 @@ namespace ATC { } else if (filterType_ == STEP_FILTER) { newTimeFilter = new TimeFilterStep(*this); - } + } else newTimeFilter = NULL; } else { // default to return base class newTimeFilter = new TimeFilter(*this); diff --git a/lib/atc/TimeFilter.h b/lib/atc/TimeFilter.h index 6f7d65f366..321d9bb8e6 100644 --- a/lib/atc/TimeFilter.h +++ b/lib/atc/TimeFilter.h @@ -143,62 +143,62 @@ namespace ATC { virtual void initialize(){}; /** pre time integration with a target for an initial condition */ - virtual void initialize(const MATRIX & target){initialize();}; + virtual void initialize(const MATRIX & /* target */){initialize();}; /** Step 1: apply first step in a time filter update in the pre integration phase */ - virtual void apply_pre_step1(MATRIX & filteredQuantity, + virtual void apply_pre_step1(MATRIX & /* filteredQuantity */, const MATRIX & unFilteredQuantity, - double dt) + double /* dt */) { TimeFilter::unFilteredQuantityOld_ = unFilteredQuantity;} /** Step 2: apply second step in a time filter update in pre integration phase */ - virtual void apply_pre_step2(MATRIX & filteredQuantity, - const MATRIX & unFilteredQuantity, - double dt) {}; + virtual void apply_pre_step2(MATRIX & /* filteredQuantity */, + const MATRIX & /* unFilteredQuantity */, + double /* dt */) {}; /** Step 3: apply first step in a time filter update in post integration phase */ virtual void apply_post_step1(MATRIX & filteredQuantity, const MATRIX & unFilteredQuantity, - double dt) + double /* dt */) { filteredQuantity = unFilteredQuantity;}; /** Step 4: apply second step in a time filter update in post integration phase */ virtual void apply_post_step2(MATRIX & filteredQuantity, const MATRIX & unFilteredQuantity, - double dt) + double /* dt */) { filteredQuantity = unFilteredQuantity;} /** coefficient multipling unfiltered terms in apply_pre_step1 method */ - virtual double unfiltered_coefficient_pre_s1(double dt){return 0.;}; + virtual double unfiltered_coefficient_pre_s1(double /* dt */){return 0.;}; /** coefficient multipling old filtered terms in apply_pre_step1 method */ - virtual double filtered_coefficient_pre_s1(double dt){return 0.;}; + virtual double filtered_coefficient_pre_s1(double /* dt */){return 0.;}; /** coefficient multipling unfiltered terms in apply_post_step1 method */ - virtual double unfiltered_coefficient_post_s1(double dt){return 0.;}; + virtual double unfiltered_coefficient_post_s1(double /* dt */){return 0.;}; /** coefficient multipling old filtered terms in apply_post_step1 method */ - virtual double filtered_coefficient_post_s1(double dt){return 0.;}; + virtual double filtered_coefficient_post_s1(double /* dt */){return 0.;}; /** coefficient multipling unfiltered terms in apply_pre_step2 method */ - virtual double unfiltered_coefficient_pre_s2(double dt){return 0.;}; + virtual double unfiltered_coefficient_pre_s2(double /* dt */){return 0.;}; /** coefficient multipling old filtered terms in apply_pre_step2 method */ - virtual double filtered_coefficient_pre_s2(double dt){return 0.;}; + virtual double filtered_coefficient_pre_s2(double /* dt */){return 0.;}; /** coefficient multipling unfiltered terms in apply_post_step2 method */ - virtual double unfiltered_coefficient_post_s2(double dt){return 0.;}; + virtual double unfiltered_coefficient_post_s2(double /* dt */){return 0.;}; /** coefficient multipling old filtered terms in apply_post_step2 method */ - virtual double filtered_coefficient_post_s2(double dt){return 0.;}; + virtual double filtered_coefficient_post_s2(double /* dt */){return 0.;}; /** rate of filtered quantity to be called in post integration phase */ virtual void rate(MATRIX & rate, - const MATRIX & filteredQuantity, + const MATRIX & /* filteredQuantity */, const MATRIX & unFilteredQuantity, double dt = 0.0) { rate = 1/dt*(unFilteredQuantity - TimeFilter::unFilteredQuantityOld_);}; @@ -243,30 +243,36 @@ namespace ATC { // destructor virtual ~TimeFilterExponential(){}; /** apply first step in a time filter update in the pre integration phase */ - virtual void apply_pre_step1(MATRIX & filteredQuantity, - const MATRIX & unFilteredQuantity, - double dt) {}; + virtual void apply_pre_step1(MATRIX & /* filteredQuantity */, + const MATRIX & /* unFilteredQuantity */, + double /* dt */) {}; /** apply second step in a time filter update in pre integration phase */ - virtual void apply_pre_step2(MATRIX & filteredQuantity, - const MATRIX & unFilteredQuantity, - double dt) {}; + virtual void apply_pre_step2(MATRIX & /* filteredQuantity */, + const MATRIX & /* unFilteredQuantity */, + double /* dt */) {}; /** apply first step in a time filter update in post integration phase */ - virtual void apply_post_step1(MATRIX & filteredQuantity, - const MATRIX & unFilteredQuantity, - double dt) {}; + virtual void apply_post_step1(MATRIX & /* filteredQuantity */, + const MATRIX & /* unFilteredQuantity */, + double /* dt */) {}; /** apply second step in a time filter update in post integration phase */ - virtual void apply_post_step2(MATRIX & filteredQuantity, - const MATRIX & unFilteredQuantity, - double dt) {}; + virtual void apply_post_step2(MATRIX & /* filteredQuantity */, + const MATRIX & /* unFilteredQuantity */, + double /* dt */) {}; /** time rate of filtered quantity */ virtual void rate(MATRIX & rate, - const MATRIX & filteredQuantity, - const MATRIX & unfilteredQuantity, - double dt = 0) + const MATRIX & filteredQuantity, + const MATRIX & unfilteredQuantity, + double /* dt */) + { double tau = TimeFilter::filterScale_; + rate = 1/tau*(unfilteredQuantity - filteredQuantity); }; + + virtual void rate(MATRIX & rate, + const MATRIX & filteredQuantity, + const MATRIX & unfilteredQuantity) { double tau = TimeFilter::filterScale_; rate = 1/tau*(unfilteredQuantity - filteredQuantity); }; @@ -702,19 +708,19 @@ namespace ATC { virtual void initialize(const MATRIX & target); /** apply first step in a time filter update in the pre integration phase */ - virtual void apply_pre_step1(MATRIX & filteredQuantity, - const MATRIX & unFilteredQuantity, - double dt) {}; + virtual void apply_pre_step1(MATRIX & /* filteredQuantity */, + const MATRIX & /* unFilteredQuantity */, + double /* dt */) {}; /** apply second step in a time filter update in pre integration phase */ - virtual void apply_pre_step2(MATRIX & filteredQuantity, - const MATRIX & unFilteredQuantity, - double dt) {}; + virtual void apply_pre_step2(MATRIX & /* filteredQuantity */, + const MATRIX & /* unFilteredQuantity */, + double /* dt */) {}; /** apply first step in a time filter update in post integration phase */ - virtual void apply_post_step1(MATRIX & filteredQuantity, - const MATRIX & unFilteredQuantity, - double dt) {}; + virtual void apply_post_step1(MATRIX & /* filteredQuantity */, + const MATRIX & /* unFilteredQuantity */, + double /* dt */) {}; /** apply second step in a time filter update in post integration phase */ virtual void apply_post_step2(MATRIX & filteredQuantity, @@ -726,9 +732,14 @@ namespace ATC { /** time rate of filtered quantity */ virtual void rate(MATRIX & rate, - const MATRIX & filteredQuantity, - const MATRIX & unfilteredQuantity, - double dt = 0) + const MATRIX & filteredQuantity, + const MATRIX & unfilteredQuantity, + double /* dt */) + { rate = 1/elapsedTime_*(unfilteredQuantity - filteredQuantity); } + + virtual void rate(MATRIX & rate, + const MATRIX & filteredQuantity, + const MATRIX & unfilteredQuantity) { rate = 1/elapsedTime_*(unfilteredQuantity - filteredQuantity); } protected: diff --git a/lib/atc/TimeIntegrator.h b/lib/atc/TimeIntegrator.h index 2753386d06..ceeb7610fb 100644 --- a/lib/atc/TimeIntegrator.h +++ b/lib/atc/TimeIntegrator.h @@ -31,13 +31,13 @@ namespace ATC { virtual void construct_transfers(){}; /** Predictor phase, Verlet first step for velocity */ - virtual void init_integrate_velocity(double dt){}; + virtual void init_integrate_velocity(double /* dt */){}; /** Predictor phase, Verlet first step for position */ - virtual void init_integrate_position(double dt){}; + virtual void init_integrate_position(double /* dt */){}; /** Corrector phase, Verlet second step for velocity */ - virtual void final_integrate(double dt){}; + virtual void final_integrate(double /* dt */){}; }; @@ -128,7 +128,7 @@ namespace ATC { virtual ~TimeIntegrator(); /** parser/modifier */ - virtual bool modify(int narg, char **arg){return false;}; + virtual bool modify(int /* narg */, char ** /* arg */){return false;}; /** create objects to implement requested numerical method */ virtual void construct_methods() = 0; @@ -251,26 +251,26 @@ namespace ATC { // time step methods, corresponding to ATC_Coupling and TimeIntegrator /** first part of pre_initial_integrate */ - virtual void pre_initial_integrate1(double dt){}; + virtual void pre_initial_integrate1(double /* dt */){}; /** second part of pre_initial_integrate */ - virtual void pre_initial_integrate2(double dt){}; + virtual void pre_initial_integrate2(double /* dt */){}; /** first part of post_initial_integrate */ - virtual void post_initial_integrate1(double dt){}; + virtual void post_initial_integrate1(double /* dt */){}; /** second part of post_initial_integrate */ - virtual void post_initial_integrate2(double dt){}; + virtual void post_initial_integrate2(double /* dt */){}; /** first part of pre_final_integrate */ - virtual void pre_final_integrate1(double dt){}; + virtual void pre_final_integrate1(double /* dt */){}; /** second part of pre_final_integrate */ - virtual void pre_final_integrate2(double dt){}; + virtual void pre_final_integrate2(double /* dt */){}; /** first part of post_final_integrate */ - virtual void post_final_integrate1(double dt){}; + virtual void post_final_integrate1(double /* dt */){}; /** second part of post_final_integrate */ - virtual void post_final_integrate2(double dt){}; + virtual void post_final_integrate2(double /* dt */){}; /** third part of post_final_integrate */ - virtual void post_final_integrate3(double dt){}; + virtual void post_final_integrate3(double /* dt */){}; /** checks to see if first RHS computation is needed */ virtual bool has_final_predictor() {return false;}; @@ -282,9 +282,9 @@ namespace ATC { /** post processing step */ virtual void post_process(){}; /** add output data */ - virtual void output(OUTPUT_LIST & outputData){}; + virtual void output(OUTPUT_LIST & /* outputData */){}; /** pack persistent fields */ - virtual void pack_fields(RESTART_LIST & data){}; + virtual void pack_fields(RESTART_LIST & /* data */){}; /** finalize any states */ virtual void finish(){}; diff --git a/lib/atc/TransferLibrary.cpp b/lib/atc/TransferLibrary.cpp index a6bba5ca23..d0db0076d7 100644 --- a/lib/atc/TransferLibrary.cpp +++ b/lib/atc/TransferLibrary.cpp @@ -705,7 +705,7 @@ namespace ATC { //-------------------------------------------------------- // Constructor //-------------------------------------------------------- - ReducedSparseMatrix::ReducedSparseMatrix(ATC_Method * atc, + ReducedSparseMatrix::ReducedSparseMatrix(ATC_Method * /* atc */, SPAR_MAN * source, LargeToSmallAtomMap * map) : SparseMatrixTransfer(), @@ -782,7 +782,7 @@ namespace ATC { //-------------------------------------------------------- // Constructor //-------------------------------------------------------- - RowMappedSparseMatrixVector::RowMappedSparseMatrixVector(ATC_Method * atc, + RowMappedSparseMatrixVector::RowMappedSparseMatrixVector(ATC_Method * /* atc */, VectorDependencyManager * source, LargeToSmallAtomMap * map) : VectorTransfer(), @@ -846,7 +846,7 @@ namespace ATC { //-------------------------------------------------------- // Constructor //-------------------------------------------------------- - MappedDiagonalMatrix::MappedDiagonalMatrix(ATC_Method * atc, + MappedDiagonalMatrix::MappedDiagonalMatrix(ATC_Method * /* atc */, DIAG_MAN * source, LargeToSmallAtomMap * map) : DiagonalMatrixTransfer(), @@ -892,7 +892,7 @@ namespace ATC { //-------------------------------------------------------- // Constructor //-------------------------------------------------------- - MappedQuantity::MappedQuantity(ATC_Method * atc, + MappedQuantity::MappedQuantity(ATC_Method * /* atc */, DENS_MAN * source, LargeToSmallMap * map) : DenseMatrixTransfer(), diff --git a/lib/atc/TransferOperator.cpp b/lib/atc/TransferOperator.cpp index efa4bc1da2..ab91141c6a 100644 --- a/lib/atc/TransferOperator.cpp +++ b/lib/atc/TransferOperator.cpp @@ -868,7 +868,7 @@ namespace ATC { //-------------------------------------------------------- // Constructor //-------------------------------------------------------- - MatToGradBySparse::MatToGradBySparse(ATC_Method * atc, + MatToGradBySparse::MatToGradBySparse(ATC_Method * /* atc */, DENS_MAN * source, VectorDependencyManager * gradientMatrices) : MatToMatTransfer(source), diff --git a/lib/atc/TransferOperator.h b/lib/atc/TransferOperator.h index 333e8d2a69..0ab92805be 100644 --- a/lib/atc/TransferOperator.h +++ b/lib/atc/TransferOperator.h @@ -42,43 +42,43 @@ namespace ATC { /** sets the quantity to a given value */ - virtual void operator=(const DenseMatrix & target) + virtual void operator=(const DenseMatrix & /* target */) {throw ATC_Error("DenseMatrixTransfer::set_quantity - Cannot modify transfer-based matrices");}; /** sets the quantity to a given constant value */ - virtual void operator=(const T & target) + virtual void operator=(const T & /* target */) {throw ATC_Error("DenseMatrixTransfer::operator= - Cannot modify transfer-based matrices");}; /** adds the given data to the Lammps quantity */ - virtual void operator+=(const DenseMatrix & addition) + virtual void operator+=(const DenseMatrix & /* addition */) {throw ATC_Error("DenseMatrixTransfer::operator+= - Cannot modify transfer-based matrices");}; /** adds the scalar data to the Lammps quantity for AtC atoms */ - virtual void operator+=(T addition) + virtual void operator+=(T /* addition */) {throw ATC_Error("DenseMatrixTransfer::operator+= - Cannot modify transfer-based matrices");}; /** subtracts the given data from the Lammps quantity */ - virtual void operator-=(const DenseMatrix & subtraction) + virtual void operator-=(const DenseMatrix & /* subtraction */) {throw ATC_Error("DenseMatrixTransfer::operator-= - Cannot modify transfer-based matrices");}; /** subtracts the scalar data from the Lammps quantity for AtC atoms */ - virtual void operator-=(T subtraction) + virtual void operator-=(T /* subtraction */) {throw ATC_Error("DenseMatrixTransfer::operator-= - Cannot modify transfer-based matrices");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(const DenseMatrix & multiplier) + virtual void operator*=(const DenseMatrix & /* multiplier */) {throw ATC_Error("DenseMatrixTransfer::operator*= - Cannot modify transfer-based matrices");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(T multiplier) + virtual void operator*=(T /* multiplier */) {throw ATC_Error("DenseMatrixTransfer::operator*= - Cannot modify transfer-based matrices");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(const DenseMatrix & divisor) + virtual void operator/=(const DenseMatrix & /* divisor */) {throw ATC_Error("DenseMatrixTransfer::operator/= - Cannot modify transfer-based matrices");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(T divisor) + virtual void operator/=(T /* divisor */) {throw ATC_Error("DenseMatrixTransfer::operator/= - Cannot modify transfer-based matrices");}; protected: @@ -113,43 +113,43 @@ namespace ATC { /** sets the quantity to a given value */ - virtual void operator=(const SparseMatrix & target) + virtual void operator=(const SparseMatrix & /* target */) {throw ATC_Error("SparseMatrixTransfer::set_quantity - Cannot modify transfer-based matrices");}; /** sets the quantity to a given constant value */ - virtual void operator=(const T & target) + virtual void operator=(const T & /* target */) {throw ATC_Error("SparseMatrixTransfer::operator= - Cannot modify transfer-based matrices");}; /** adds the given data to the Lammps quantity */ - virtual void operator+=(const SparseMatrix & addition) + virtual void operator+=(const SparseMatrix & /* addition */) {throw ATC_Error("SparseMatrixTransfer::operator+= - Cannot modify transfer-based matrices");}; /** adds the scalar data to the Lammps quantity for AtC atoms */ - virtual void operator+=(T addition) + virtual void operator+=(T /* addition */) {throw ATC_Error("SparseMatrixTransfer::operator+= - Cannot modify transfer-based matrices");}; /** subtracts the given data from the Lammps quantity */ - virtual void operator-=(const SparseMatrix & subtraction) + virtual void operator-=(const SparseMatrix & /* subtraction */) {throw ATC_Error("SparseMatrixTransfer::operator-= - Cannot modify transfer-based matrices");}; /** subtracts the scalar data from the Lammps quantity for AtC atoms */ - virtual void operator-=(T subtraction) + virtual void operator-=(T /* subtraction */) {throw ATC_Error("SparseMatrixTransfer::operator-= - Cannot modify transfer-based matrices");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(const SparseMatrix & multiplier) + virtual void operator*=(const SparseMatrix & /* multiplier */) {throw ATC_Error("SparseMatrixTransfer::operator*= - Cannot modify transfer-based matrices");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(T multiplier) + virtual void operator*=(T /* multiplier */) {throw ATC_Error("SparseMatrixTransfer::operator*= - Cannot modify transfer-based matrices");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(const SparseMatrix & divisor) + virtual void operator/=(const SparseMatrix & /* divisor */) {throw ATC_Error("SparseMatrixTransfer::operator/= - Cannot modify transfer-based matrices");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(T divisor) + virtual void operator/=(T /* divisor */) {throw ATC_Error("SparseMatrixTransfer::operator/= - Cannot modify transfer-based matrices");}; protected: @@ -184,43 +184,43 @@ namespace ATC { /** sets the quantity to a given value */ - virtual void operator=(const DiagonalMatrix & target) + virtual void operator=(const DiagonalMatrix & /* target */) {throw ATC_Error("DiagonalMatrixTransfer::set_quantity - Cannot modify transfer-based matrices");}; /** sets the quantity to a given constant value */ - virtual void operator=(const T & target) + virtual void operator=(const T & /* target */) {throw ATC_Error("DiagonalMatrixTransfer::operator= - Cannot modify transfer-based matrices");}; /** adds the given data to the Lammps quantity */ - virtual void operator+=(const DiagonalMatrix & addition) + virtual void operator+=(const DiagonalMatrix & /* addition */) {throw ATC_Error("DiagonalMatrixTransfer::operator+= - Cannot modify transfer-based matrices");}; /** adds the scalar data to the Lammps quantity for AtC atoms */ - virtual void operator+=(T addition) + virtual void operator+=(T /* addition */) {throw ATC_Error("DiagonalMatrixTransfer::operator+= - Cannot modify transfer-based matrices");}; /** subtracts the given data from the Lammps quantity */ - virtual void operator-=(const DiagonalMatrix & subtraction) + virtual void operator-=(const DiagonalMatrix & /* subtraction */) {throw ATC_Error("DiagonalMatrixTransfer::operator-= - Cannot modify transfer-based matrices");}; /** subtracts the scalar data from the Lammps quantity for AtC atoms */ - virtual void operator-=(T subtraction) + virtual void operator-=(T /* subtraction */) {throw ATC_Error("DiagonalMatrixTransfer::operator-= - Cannot modify transfer-based matrices");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(const DiagonalMatrix & multiplier) + virtual void operator*=(const DiagonalMatrix & /* multiplier */) {throw ATC_Error("DiagonalMatrixTransfer::operator*= - Cannot modify transfer-based matrices");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator*=(T multiplier) + virtual void operator*=(T /* multiplier */) {throw ATC_Error("DiagonalMatrixTransfer::operator*= - Cannot modify transfer-based matrices");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(const DiagonalMatrix & divisor) + virtual void operator/=(const DiagonalMatrix & /* divisor */) {throw ATC_Error("DiagonalMatrixTransfer::operator/= - Cannot modify transfer-based matrices");}; /** multiples the Lammps quantity by the given data, input is indexed in AtC atom counts */ - virtual void operator/=(T divisor) + virtual void operator/=(T /* divisor */) {throw ATC_Error("DiagonalMatrixTransfer::operator/= - Cannot modify transfer-based matrices");}; protected: diff --git a/lib/atc/Utility.h b/lib/atc/Utility.h index d975d4804a..2c0ea7270f 100644 --- a/lib/atc/Utility.h +++ b/lib/atc/Utility.h @@ -59,10 +59,10 @@ namespace ATC_Utility return ( (dblL > dblR) || ((dblL <= (dblR + \ std::numeric_limits::epsilon() * \ - tolMult * std::max(abs(dblL), abs(dblR)))) && + tolMult * std::max(fabs(dblL), fabs(dblR)))) && (dblR <= (dblL + \ std::numeric_limits::epsilon() * \ - tolMult * std::max(abs(dblL), abs(dblR)))))); + tolMult * std::max(fabs(dblL), fabs(dblR)))))); } inline double tolerance(double x, double tol = parsetol_) { diff --git a/lib/atc/Vector.h b/lib/atc/Vector.h index ff04b0720d..884a080d7d 100644 --- a/lib/atc/Vector.h +++ b/lib/atc/Vector.h @@ -61,7 +61,7 @@ public: //* performs a matrix-vector multiply with default naive implementation template void MultMv(const Matrix &A, const Vector &v, DenseVector &c, - const bool At, T a, T b) + const bool At, T /* a */, T b) { const INDEX sA[2] = {A.nRows(), A.nCols()}; // m is sA[At] k is sA[!At] const INDEX M=sA[At], K=sA[!At]; diff --git a/lib/atc/ViscousStress.cpp b/lib/atc/ViscousStress.cpp index 4053cf6cb7..305769af68 100644 --- a/lib/atc/ViscousStress.cpp +++ b/lib/atc/ViscousStress.cpp @@ -34,7 +34,7 @@ ViscousStressConstant::ViscousStressConstant(fstream &fileId) // compute the stress at N integration points from the velocity gradients // T_{ij} = viscosity * du_i/dx_j //============================================================================= -void ViscousStressConstant::viscous_stress(const FIELD_MATS &fields, + void ViscousStressConstant::viscous_stress(const FIELD_MATS & /* fields */, const GRAD_FIELD_MATS &gradFields, DENS_MAT_VEC &sigma) { diff --git a/lib/atc/ViscousStress.h b/lib/atc/ViscousStress.h index d9da270452..1636aa5bc3 100644 --- a/lib/atc/ViscousStress.h +++ b/lib/atc/ViscousStress.h @@ -22,17 +22,17 @@ namespace ATC { virtual ~ViscousStress() {}; virtual void initialize(void){}; //* Returns parameter values, (Nothing uses this). - virtual void parameters(std::map ¶meters) {} + virtual void parameters(std::map & /* parameters */) {} //* Computes viscous stress given a strain rate tensor. //* Units: mvv/L^3 (i.e. for units Real: g/(mol ps^2 A^2) ) virtual void viscous_stress(const FIELD_MATS &fields, const GRAD_FIELD_MATS &gradFields, DENS_MAT_VEC &stress)=0; - virtual void viscosity(const FIELD_MATS & fields, - DENS_MAT & coefs) const + virtual void viscosity(const FIELD_MATS & /* fields */, + DENS_MAT & /* coefs */) const {throw ATC_Error("ViscousStress::viscosity: unimplemented function");} //* Returns the derivative of the stress tensor for a given strain-rate tensor. - virtual void tangent(const MATRIX &F, MATRIX &C) const + virtual void tangent(const MATRIX & /* F */, MATRIX & /* C */) const {throw ATC_Error("ViscousStress::tangent: unimplemented function");} }; diff --git a/lib/atc/WeakEquation.h b/lib/atc/WeakEquation.h index 84f2b5bb48..bf349a2a53 100644 --- a/lib/atc/WeakEquation.h +++ b/lib/atc/WeakEquation.h @@ -32,52 +32,52 @@ class WeakEquation { /** integrand that used to form the energy */ virtual bool has_E_integrand(void) const {return false;} - virtual void E_integrand(const FIELD_MATS &fields, - const GRAD_FIELD_MATS &grad_fields, - const Material * material, - DENS_MAT &energy ) const {}; + virtual void E_integrand(const FIELD_MATS & /* fields */, + const GRAD_FIELD_MATS & /* grad_fields */, + const Material * /* material */, + DENS_MAT & /* energy */ ) const {}; /** density that used to form the mass matrix */ virtual bool has_M_integrand(void) const {return false;} - virtual void M_integrand(const FIELD_MATS &fields, - const Material * material, - DENS_MAT &density ) const {}; + virtual void M_integrand(const FIELD_MATS & /* fields */, + const Material * /* material */, + DENS_MAT & /* density */ ) const {}; /** flux that is integrated with B = Grad N as its weight */ virtual bool has_B_integrand(void) const {return false;} - virtual void B_integrand(const FIELD_MATS &fields, - const GRAD_FIELD_MATS &grad_fields, - const Material * material, - DENS_MAT_VEC &flux) const {}; + virtual void B_integrand(const FIELD_MATS & /* fields */, + const GRAD_FIELD_MATS & /* grad_fields */, + const Material * /* material */, + DENS_MAT_VEC & /* flux */) const {}; /** flux that is integrated with N as its weight */ virtual bool has_N_integrand(void) const {return false;} // N_integrand bool is for masking in FE_Engine - virtual bool N_integrand(const FIELD_MATS &fields, - const GRAD_FIELD_MATS &grad_fields, - const Material * material, - DENS_MAT &flux) const {return false;}; + virtual bool N_integrand(const FIELD_MATS & /* fields */, + const GRAD_FIELD_MATS & /* grad_fields */, + const Material * /* material */, + DENS_MAT & /* flux */) const {return false;}; /** stiffness matrix */ // linear - virtual void BB_tangent_coefficients(const FieldName field, - const Material * material, - DENS_MAT &coefs) const {}; - virtual void NN_tangent_coefficients(const FieldName field, - const Material * material, - DENS_MAT &coefs) const {}; + virtual void BB_tangent_coefficients(const FieldName /* field */, + const Material * /* material */, + DENS_MAT & /* coefs */) const {}; + virtual void NN_tangent_coefficients(const FieldName /* field */, + const Material * /* material */, + DENS_MAT & /* coefs */) const {}; // non-linear virtual bool has_BB_tangent_coefficients(void) const {return false;} - virtual void BB_tangent_coefficients(const FieldName field, - const FIELD_MATS &fields, - const Material * material, - DENS_MAT &coefs) const {}; + virtual void BB_tangent_coefficients(const FieldName /* field */, + const FIELD_MATS & /* fields */, + const Material * /* material */, + DENS_MAT & /* coefs */) const {}; virtual bool has_NN_tangent_coefficients(void) const {return false;} - virtual void NN_tangent_coefficients(const FieldName field, - const FIELD_MATS &fields, - const Material * material, - DENS_MAT &coefs) const {}; + virtual void NN_tangent_coefficients(const FieldName /* field */, + const FIELD_MATS & /* fields */, + const Material * /* material */, + DENS_MAT & /* coefs */) const {}; /** type of equation */ PDE_Type type(void) const {return type_;} diff --git a/lib/atc/WeakEquationChargeDiffusion.cpp b/lib/atc/WeakEquationChargeDiffusion.cpp index 05152579fc..6593e90622 100644 --- a/lib/atc/WeakEquationChargeDiffusion.cpp +++ b/lib/atc/WeakEquationChargeDiffusion.cpp @@ -26,7 +26,7 @@ WeakEquationChargeDiffusion::~WeakEquationChargeDiffusion(void) //--------------------------------------------------------------------- void WeakEquationChargeDiffusion::M_integrand( const FIELD_MATS &fields, - const Material * material, + const Material * /* material */, DENS_MAT & capacity ) const { FIELD_MATS::const_iterator rhoField = fields.find(CHARGE_DENSITY); diff --git a/lib/atc/WeakEquationDiffusion.cpp b/lib/atc/WeakEquationDiffusion.cpp index 1af7d2f7f3..5470d30b1b 100644 --- a/lib/atc/WeakEquationDiffusion.cpp +++ b/lib/atc/WeakEquationDiffusion.cpp @@ -26,7 +26,7 @@ WeakEquationDiffusion::~WeakEquationDiffusion(void) //--------------------------------------------------------------------- void WeakEquationDiffusion::M_integrand( const FIELD_MATS &fields, - const Material * material, + const Material * /* material */, DENS_MAT & capacity ) const { FIELD_MATS::const_iterator rhoField = fields.find(SPECIES_CONCENTRATION); @@ -38,10 +38,10 @@ void WeakEquationDiffusion::M_integrand( // compute flux //-------------------------------------------------------------- void WeakEquationDiffusion::B_integrand( - const FIELD_MATS &fields, - const GRAD_FIELD_MATS &grad_fields, - const Material * material, - DENS_MAT_VEC &flux) const + const FIELD_MATS & /* fields */, + const GRAD_FIELD_MATS & /* grad_fields */, + const Material * /* material */, + DENS_MAT_VEC & /* flux */) const { // material->diffusion_flux(fields, grad_fields, flux[SPECIES_CONCENTRATION]); } diff --git a/lib/atc/WeakEquationElectronContinuity.cpp b/lib/atc/WeakEquationElectronContinuity.cpp index 3b2a18b0f2..193da6e2c7 100644 --- a/lib/atc/WeakEquationElectronContinuity.cpp +++ b/lib/atc/WeakEquationElectronContinuity.cpp @@ -24,7 +24,7 @@ WeakEquationElectronContinuity::~WeakEquationElectronContinuity(void) //--------------------------------------------------------------------- void WeakEquationElectronContinuity::M_integrand( const FIELD_MATS &fields, - const Material * material, + const Material * /* material */, DENS_MAT & density ) const { FIELD_MATS::const_iterator nField = fields.find(ELECTRON_DENSITY); @@ -72,7 +72,7 @@ WeakEquationElectronEquilibrium::~WeakEquationElectronEquilibrium(void) //--------------------------------------------------------------------- void WeakEquationElectronEquilibrium::M_integrand( const FIELD_MATS &fields, - const Material * material, + const Material * /* material */, DENS_MAT & density ) const { FIELD_MATS::const_iterator nField = fields.find(ELECTRON_DENSITY); @@ -85,7 +85,7 @@ void WeakEquationElectronEquilibrium::M_integrand( bool WeakEquationElectronEquilibrium::N_integrand( const FIELD_MATS &fields, - const GRAD_FIELD_MATS &grad_fields, + const GRAD_FIELD_MATS & /* grad_fields */, const Material * material, DENS_MAT &flux) const { diff --git a/lib/atc/WeakEquationElectronMomentum.cpp b/lib/atc/WeakEquationElectronMomentum.cpp index 37484f61d5..c4728c7bd5 100644 --- a/lib/atc/WeakEquationElectronMomentum.cpp +++ b/lib/atc/WeakEquationElectronMomentum.cpp @@ -79,7 +79,7 @@ void WeakEquationElectronMomentum::M_integrand( //-------------------------------------------------------------- void WeakEquationElectronMomentum::B_integrand( const FIELD_MATS &fields, - const GRAD_FIELD_MATS &grad_fields, + const GRAD_FIELD_MATS & /* grad_fields */, const Material * material, DENS_MAT_VEC &flux) const { diff --git a/lib/atc/WeakEquationElectronMomentum.h b/lib/atc/WeakEquationElectronMomentum.h index a3bc62bef7..0010b012cd 100644 --- a/lib/atc/WeakEquationElectronMomentum.h +++ b/lib/atc/WeakEquationElectronMomentum.h @@ -78,10 +78,10 @@ namespace ATC{ /** flux that is integrated with grad N as its weight */ virtual bool has_B_integrand(void) const {return false;} - virtual void B_integrand(const FIELD_MATS &fields, - const GRAD_FIELD_MATS &grad_fields, - const Material * material, - DENS_MAT_VEC &flux) const {}; + virtual void B_integrand(const FIELD_MATS & /* fields */, + const GRAD_FIELD_MATS & /* grad_fields */, + const Material * /* material */, + DENS_MAT_VEC &/* flux */) const {}; /** flux that is integrated with N as its weight */ virtual bool has_N_integrand(void) const {return true;} diff --git a/lib/atc/WeakEquationElectronTemperature.cpp b/lib/atc/WeakEquationElectronTemperature.cpp index 97a21628d8..72315dd1e6 100644 --- a/lib/atc/WeakEquationElectronTemperature.cpp +++ b/lib/atc/WeakEquationElectronTemperature.cpp @@ -26,7 +26,7 @@ WeakEquationElectronTemperature::~WeakEquationElectronTemperature(void) //--------------------------------------------------------------------- void WeakEquationElectronTemperature::E_integrand( const FIELD_MATS &fields, - const GRAD_FIELD_MATS &grad_fields, + const GRAD_FIELD_MATS & /* grad_fields */, const Material * material, DENS_MAT & energy ) const { @@ -61,7 +61,7 @@ void WeakEquationElectronTemperature::B_integrand( //--------------------------------------------------------------------- bool WeakEquationElectronTemperature::N_integrand( const FIELD_MATS &fields, - const GRAD_FIELD_MATS &grad_fields, + const GRAD_FIELD_MATS & /* grad_fields */, const Material * material, DENS_MAT &flux) const { diff --git a/lib/atc/WeakEquationMassDiffusion.cpp b/lib/atc/WeakEquationMassDiffusion.cpp index 5e4445442b..47ca01bbe4 100644 --- a/lib/atc/WeakEquationMassDiffusion.cpp +++ b/lib/atc/WeakEquationMassDiffusion.cpp @@ -26,7 +26,7 @@ WeakEquationMassDiffusion::~WeakEquationMassDiffusion(void) //--------------------------------------------------------------------- void WeakEquationMassDiffusion::M_integrand( const FIELD_MATS &fields, - const Material * material, + const Material * /* material */, DENS_MAT & capacity ) const { FIELD_MATS::const_iterator dField = fields.find(MASS_DENSITY); @@ -38,10 +38,10 @@ void WeakEquationMassDiffusion::M_integrand( // compute flux //-------------------------------------------------------------- void WeakEquationMassDiffusion::B_integrand( - const FIELD_MATS &fields, - const GRAD_FIELD_MATS &grad_fields, - const Material * material, - DENS_MAT_VEC &flux) const + const FIELD_MATS & /* fields */, + const GRAD_FIELD_MATS & /* grad_fields */, + const Material * /* material */, + DENS_MAT_VEC & /* flux */) const { // material->mass_flux(fields, grad_fields, flux[MASS_DENSITY]); } diff --git a/lib/atc/WeakEquationMomentum.cpp b/lib/atc/WeakEquationMomentum.cpp index 04e52b6c9c..39400d3167 100644 --- a/lib/atc/WeakEquationMomentum.cpp +++ b/lib/atc/WeakEquationMomentum.cpp @@ -45,7 +45,7 @@ void WeakEquationMomentum::B_integrand( //-------------------------------------------------------------- bool WeakEquationMomentum::N_integrand( const FIELD_MATS &fields, - const GRAD_FIELD_MATS &grad_fields, + const GRAD_FIELD_MATS & /* grad_fields */, const Material * material, DENS_MAT &flux) const { @@ -137,7 +137,7 @@ void WeakEquationMomentumDiffusion::B_integrand( //--------------------------------------------------------------------- void WeakEquationMomentumDiffusion::BB_tangent_coefficients( - const FieldName field, + const FieldName /* field */, const FIELD_MATS &fields, const Material* material, DENS_MAT &coefs) const @@ -148,7 +148,7 @@ void WeakEquationMomentumDiffusion::BB_tangent_coefficients( //-------------------------------------------------------------- bool WeakEquationMomentumDiffusion::N_integrand( const FIELD_MATS &fields, - const GRAD_FIELD_MATS &grad_fields, + const GRAD_FIELD_MATS & /* grad_fields */, const Material * material, DENS_MAT &flux) const { diff --git a/lib/atc/WeakEquationPhononTemperature.cpp b/lib/atc/WeakEquationPhononTemperature.cpp index aef1cd4c53..fe1ac894bd 100644 --- a/lib/atc/WeakEquationPhononTemperature.cpp +++ b/lib/atc/WeakEquationPhononTemperature.cpp @@ -26,7 +26,7 @@ WeakEquationPhononTemperature::~WeakEquationPhononTemperature(void) //--------------------------------------------------------------------- void WeakEquationPhononTemperature::E_integrand( const FIELD_MATS &fields, - const GRAD_FIELD_MATS &gradFields, + const GRAD_FIELD_MATS & /* gradFields */, const Material * material, DENS_MAT &energy) const { diff --git a/lib/atc/WeakEquationPoisson.cpp b/lib/atc/WeakEquationPoisson.cpp index 02e8655dc0..4440c02bd3 100644 --- a/lib/atc/WeakEquationPoisson.cpp +++ b/lib/atc/WeakEquationPoisson.cpp @@ -36,7 +36,7 @@ void WeakEquationPoisson::B_integrand( //--------------------------------------------------------------------- void WeakEquationPoisson::BB_tangent_coefficients( - const FieldName field, + const FieldName /* field */, const FIELD_MATS &fields, const Material* material, DENS_MAT &coefs) const @@ -47,7 +47,7 @@ void WeakEquationPoisson::BB_tangent_coefficients( //--------------------------------------------------------------------- bool WeakEquationPoisson::N_integrand( const FIELD_MATS &fields, - const GRAD_FIELD_MATS &grad_fields, + const GRAD_FIELD_MATS & /* grad_fields */, const Material * material, DENS_MAT &flux) const { @@ -56,7 +56,7 @@ bool WeakEquationPoisson::N_integrand( //--------------------------------------------------------------------- void WeakEquationPoisson::NN_tangent_coefficients( - const FieldName field, + const FieldName /* field */, const FIELD_MATS &fields, const Material* material, DENS_MAT &coefs) const @@ -78,8 +78,8 @@ WeakEquationPoissonConstantRHS::WeakEquationPoissonConstantRHS() //--------------------------------------------------------------------- bool WeakEquationPoissonConstantRHS::N_integrand( const FIELD_MATS &fields, - const GRAD_FIELD_MATS &grad_fields, - const Material * material, + const GRAD_FIELD_MATS & /* grad_fields */, + const Material * /* material */, DENS_MAT &flux) const { diff --git a/lib/atc/WeakEquationPoisson.h b/lib/atc/WeakEquationPoisson.h index 667034525d..b004b350ce 100644 --- a/lib/atc/WeakEquationPoisson.h +++ b/lib/atc/WeakEquationPoisson.h @@ -98,10 +98,10 @@ class WeakEquationPoissonConstantRHS : public WeakEquationPoisson { /** rhs is constant */ virtual bool has_NN_tangent_coefficients(void) const {return false;} - virtual void NN_tangent_coefficients(const FieldName field, - const FIELD_MATS &fields, - const Material * material, - DENS_MAT &coefs) const {}; + virtual void NN_tangent_coefficients(const FieldName /* field */, + const FIELD_MATS & /* fields */, + const Material * /* material */, + DENS_MAT & /* coefs */) const {}; virtual std::set needs_material_functions(void) const { diff --git a/lib/atc/WeakEquationSchrodinger.cpp b/lib/atc/WeakEquationSchrodinger.cpp index 3663b8c806..07497b1fd5 100644 --- a/lib/atc/WeakEquationSchrodinger.cpp +++ b/lib/atc/WeakEquationSchrodinger.cpp @@ -23,7 +23,7 @@ WeakEquationSchrodinger::~WeakEquationSchrodinger(void) //--------------------------------------------------------------------- void WeakEquationSchrodinger::BB_tangent_coefficients( - const FieldName field, + const FieldName /* field */, const FIELD_MATS & fields, const Material* material, DENS_MAT &coefs) const @@ -33,7 +33,7 @@ void WeakEquationSchrodinger::BB_tangent_coefficients( //--------------------------------------------------------------------- void WeakEquationSchrodinger::NN_tangent_coefficients( - const FieldName field, + const FieldName /* field */, const FIELD_MATS & fields, const Material* material, DENS_MAT & V) const diff --git a/lib/message/cslib/src/cslib.cpp b/lib/message/cslib/src/cslib.cpp index 336ba87588..7c75a39929 100644 --- a/lib/message/cslib/src/cslib.cpp +++ b/lib/message/cslib/src/cslib.cpp @@ -641,6 +641,7 @@ void CSlib::onefield(int ftype, int flen, int &nbytes, int &nbytesround) else if (ftype == 3) bigbytes = biglen * sizeof(float); else if (ftype == 4) bigbytes = biglen * sizeof(double); else if (ftype == 5) bigbytes = biglen * sizeof(char); + else bigbytes = 0; bigbytesround = roundup(bigbytes,8); if (nbuf + bigbytesround > INT_MAX) diff --git a/src/USER-ATC/fix_atc.cpp b/src/USER-ATC/fix_atc.cpp index e2a1768f55..0e9cd02ad6 100644 --- a/src/USER-ATC/fix_atc.cpp +++ b/src/USER-ATC/fix_atc.cpp @@ -581,7 +581,7 @@ void FixATC::min_setup(int vflag) setup(vflag); } -void FixATC::setup(int vflag) +void FixATC::setup(int /* vflag */) { comm->forward_comm_fix(this); @@ -642,7 +642,7 @@ void FixATC::grow_arrays(int nmax) atc_->grow_arrays(nmax); } -void FixATC::copy_arrays(int i, int j, int delflag) +void FixATC::copy_arrays(int i, int j, int /* delflag */) { atc_->copy_arrays(i,j); } @@ -675,7 +675,7 @@ void FixATC::unpack_forward_comm(int n, int first, double *buf) pack values in local atom-based arrays for restart file ------------------------------------------------------------------------- */ -int FixATC::pack_restart(int i, double *buf){ +int FixATC::pack_restart(int /* i */, double * /* buf */){ return 0; } @@ -683,7 +683,7 @@ int FixATC::pack_restart(int i, double *buf){ unpack values from atom->extra array to restart the fix ------------------------------------------------------------------------- */ -void FixATC::unpack_restart(int nlocal, int nth){ +void FixATC::unpack_restart(int /* nlocal */, int /* nth */){ } /* ---------------------------------------------------------------------- @@ -698,7 +698,7 @@ int FixATC::maxsize_restart(){ size of atom nlocal's restart data ------------------------------------------------------------------------- */ -int FixATC::size_restart(int nlocal){ +int FixATC::size_restart(int /* nlocal */){ return 0; } @@ -706,7 +706,7 @@ int FixATC::size_restart(int nlocal){ pack entire state of Fix into one write ------------------------------------------------------------------------- */ -void FixATC::write_restart(FILE *fp){ +void FixATC::write_restart(FILE * /* fp */){ char ** args = new char*[2]; args[0] = new char[50]; @@ -728,7 +728,7 @@ void FixATC::write_restart(FILE *fp){ use state info from restart file to restart the Fix ------------------------------------------------------------------------- */ -void FixATC::restart(char *buf){ +void FixATC::restart(char * /* buf */){ char ** args = new char*[2]; args[0] = new char[50]; @@ -750,7 +750,7 @@ void FixATC::restart(char *buf){ allow for both per-type and per-atom mass ------------------------------------------------------------------------- */ -void FixATC::initial_integrate(int vflag) +void FixATC::initial_integrate(int /* vflag */) { try { atc_->pre_init_integrate(); @@ -836,7 +836,7 @@ void FixATC::pre_neighbor() } } /* ---------------------------------------------------------------------- */ -void FixATC::pre_force(int vflag) +void FixATC::pre_force(int /* vflag */) { try { @@ -848,7 +848,7 @@ void FixATC::pre_force(int vflag) } } /* ---------------------------------------------------------------------- */ -void FixATC::post_force(int vflag) +void FixATC::post_force(int /* vflag */) { try { @@ -884,7 +884,7 @@ void FixATC::setup_pre_neighbor() } } /* ---------------------------------------------------------------------- */ -void FixATC::min_pre_force(int vflag) +void FixATC::min_pre_force(int /* vflag */) { try { atc_->min_pre_force(); @@ -896,7 +896,7 @@ void FixATC::min_pre_force(int vflag) } /* ---------------------------------------------------------------------- */ -void FixATC::min_post_force(int vflag) +void FixATC::min_post_force(int /* vflag */) { try { atc_->min_post_force();