2013-08-08 05:34:54 +08:00
|
|
|
#ifndef ATC_COUPLING_MOMENTUM_ENERGY_H
|
|
|
|
#define ATC_COUPLING_MOMENTUM_ENERGY_H
|
|
|
|
|
|
|
|
// ATC headers
|
|
|
|
#include "ATC_Coupling.h"
|
|
|
|
#include "Kinetostat.h"
|
|
|
|
#include "Thermostat.h"
|
|
|
|
#include "ElasticTimeIntegrator.h"
|
|
|
|
#include "ThermalTimeIntegrator.h"
|
|
|
|
|
|
|
|
// Other headers
|
2013-08-22 07:06:07 +08:00
|
|
|
#include <string>
|
2013-08-08 05:34:54 +08:00
|
|
|
|
|
|
|
namespace ATC {
|
|
|
|
|
|
|
|
class AtfShapeFunctionRestriction;
|
|
|
|
class AtfShapeFunctionMdProjection;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @class ATC_CouplingMomentumEnergy
|
|
|
|
* @brief A class for atom-continuum transfers & control involving momentum and heat transport
|
|
|
|
* (owned field/s: DISPLACEMENT, VELOCITY, TEMPERATURE)
|
|
|
|
*/
|
|
|
|
|
|
|
|
class ATC_CouplingMomentumEnergy : public ATC_Coupling {
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
// constructor
|
|
|
|
ATC_CouplingMomentumEnergy(std::string groupName,
|
|
|
|
double ** & perAtomArray,
|
|
|
|
LAMMPS_NS::Fix * thisFix,
|
|
|
|
std::string matParamFile,
|
|
|
|
ExtrinsicModelType extrinsic = NO_MODEL);
|
|
|
|
|
|
|
|
// destructor
|
|
|
|
virtual ~ATC_CouplingMomentumEnergy();
|
|
|
|
|
|
|
|
/** parser/modifier */
|
|
|
|
virtual bool modify(int narg, char **arg);
|
|
|
|
|
|
|
|
/** pre time integration */
|
|
|
|
virtual void initialize();
|
|
|
|
|
|
|
|
/** flags whether a methods reset is required */
|
|
|
|
|
|
|
|
virtual bool reset_methods() const {
|
|
|
|
bool resetMethods = ATC_Method::reset_methods() || atomicRegulator_->need_reset();
|
|
|
|
for (_ctiIt_ = timeIntegrators_.begin(); _ctiIt_ != timeIntegrators_.end(); ++_ctiIt_) {
|
|
|
|
resetMethods |= (_ctiIt_->second)->need_reset();
|
|
|
|
}
|
|
|
|
return resetMethods;
|
|
|
|
};
|
|
|
|
|
|
|
|
/** compute scalar for output - added energy */
|
|
|
|
virtual double compute_scalar(void);
|
|
|
|
|
|
|
|
/** compute vector for output */
|
|
|
|
virtual double compute_vector(int n);
|
|
|
|
double kinetic_energy();
|
|
|
|
double potential_energy();
|
|
|
|
|
|
|
|
/** output */
|
|
|
|
virtual void output();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
//---------------------------------------------------------------
|
|
|
|
/** initialization routines */
|
|
|
|
//---------------------------------------------------------------
|
|
|
|
/** constructs all data which is updated with time integration, i.e. fields */
|
|
|
|
//virtual void construct_time_integration_data();
|
|
|
|
/** set up data which is dependency managed */
|
|
|
|
virtual void construct_transfers();
|
2013-08-23 08:14:36 +08:00
|
|
|
#ifdef OBSOLETE
|
2013-08-08 05:34:54 +08:00
|
|
|
/** compute the mass matrix components coming from MD integration */
|
|
|
|
virtual void compute_md_mass_matrix(FieldName thisField,
|
|
|
|
DIAG_MAT & massMats);
|
2013-08-23 08:14:36 +08:00
|
|
|
//
|
2013-08-08 05:34:54 +08:00
|
|
|
/** operator to compute the mass matrix for the momentum equation from MD integration */
|
|
|
|
AtfShapeFunctionRestriction * nodalAtomicMass_;
|
|
|
|
|
|
|
|
/** operator to compute the dimensionless mass matrix from MD integration */
|
|
|
|
AtfShapeFunctionRestriction * nodalAtomicCount_;
|
|
|
|
|
|
|
|
/** operator to compute mass matrix from MD */
|
|
|
|
AtfShapeFunctionRestriction * nodalAtomicHeatCapacity_;
|
2013-08-23 08:14:36 +08:00
|
|
|
#endif
|
2013-08-08 05:34:54 +08:00
|
|
|
/** physics specific filter initialization */
|
|
|
|
void init_filter();
|
|
|
|
/** kinetic temperature for post-processing */
|
|
|
|
AtfShapeFunctionMdProjection * nodalAtomicKineticTemperature_;
|
|
|
|
|
|
|
|
/** configurational temperature for post-processing */
|
|
|
|
AtfShapeFunctionMdProjection * nodalAtomicConfigurationalTemperature_;
|
|
|
|
|
|
|
|
/** workspace matrices for output */
|
|
|
|
DENS_MAT _keTemp_, _peTemp_;
|
|
|
|
|
|
|
|
|
|
|
|
// data
|
|
|
|
double refPE_;
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
#endif
|