61
KinetostatShapeFunction(Kinetostat *kinetostat,
61
KinetostatShapeFunction(AtomicRegulator *kinetostat,
62
62
const std::string & regulatorPrefix = "");
64
64
virtual ~KinetostatShapeFunction(){};
73
73
virtual void set_weights();
76
/** pointer to thermostat object for data */
77
Kinetostat * kinetostat_;
77
DIAG_MAN & mdMassMatrix_;
78
78
/** pointer to a time filtering object */
79
79
TimeFilter * timeFilter_;
80
80
/** stress induced by lambda */
302
298
virtual void apply_pre_filtering(double dt);
303
299
/** sets up and solves kinetostat equations */
304
300
virtual void compute_kinetostat(double dt);
301
/** applies kinetostat correction to atoms */
302
virtual void apply_kinetostat(double dt);
305
303
/** sets up appropriate rhs for kinetostat equations */
306
304
virtual void set_kinetostat_rhs(DENS_MAT & rhs, double dt);
307
305
/** computes the nodal FE force applied by the kinetostat */
548
KinetostatGlcFs(Kinetostat *kinetostat,
546
KinetostatGlcFs(AtomicRegulator *kinetostat,
549
547
const std::string & regulatorPrefix = "");
551
549
virtual ~KinetostatGlcFs(){};
559
557
/** applies thermostat to atoms in the predictor phase */
560
558
virtual void apply_pre_predictor(double dt);
560
/** applies thermostat to atoms in the pre-corrector phase */
561
virtual void apply_pre_corrector(double dt);
562
563
/** applies thermostat to atoms in the post-corrector phase */
563
564
virtual void apply_post_corrector(double dt);
565
566
/** get data for output */
566
567
virtual void output(OUTPUT_LIST & outputData);
569
/* flag for performing the full lambda prediction calculation */
570
bool full_prediction();
590
594
/* sets up and solves the linear system for lambda */
591
595
virtual void compute_lambda(double dt);
593
/** sets up the transfer which is the set of nodes being regulated */
594
virtual void construct_regulated_nodes() = 0;
597
598
/** reference to AtC FE velocity */
598
599
DENS_MAN & velocity_;
600
601
/** nodal atomic momentum */
601
602
DENS_MAN * nodalAtomicMomentum_;
604
/** hack to determine if first timestep has been passed */
605
bool isFirstTimestep_;
607
/** local version of velocity used as predicted final veloctiy */
608
PerAtomQuantity<double> * atomPredictedVelocities_;
610
/** predicted nodal atomic momentum */
611
AtfShapeFunctionRestriction * nodalAtomicPredictedMomentum_;
613
/** FE momentum change from kinetostat forces */
614
DENS_MAT deltaMomentum_;
603
616
/** right-hand side data for thermostat equation */
606
/** mapping from all to regulated nodes */
619
/** fraction of timestep over which constraint is exactly enforced */
610
623
DENS_MAT _lambdaForceOutput_; // force applied by lambda in output format
611
624
DENS_MAT _velocityDelta_; // change in velocity when lambda force is applied
612
DENS_MAT _deltaMomentum_; // FE velocity change from kinetostat
631
KinetostatFlux(Kinetostat *kinetostat,
643
KinetostatFlux(AtomicRegulator *kinetostat,
632
644
const std::string & regulatorPrefix = "");
634
646
virtual ~KinetostatFlux(){};
692
KinetostatFluxGhost(Kinetostat *kinetostat,
704
KinetostatFluxGhost(AtomicRegulator *kinetostat,
693
705
const std::string & regulatorPrefix = "");
695
707
virtual ~KinetostatFluxGhost(){};
731
KinetostatFixed(Kinetostat *kinetostat,
743
KinetostatFixed(AtomicRegulator *kinetostat,
732
744
const std::string & regulatorPrefix = "");
734
746
virtual ~KinetostatFixed(){};
742
754
/** applies thermostat to atoms in the predictor phase */
743
755
virtual void apply_pre_predictor(double dt);
757
/** applies thermostat to atoms in the pre-corrector phase */
758
virtual void apply_pre_corrector(double dt);
745
760
/** applies thermostat to atoms in the post-corrector phase */
746
761
virtual void apply_post_corrector(double dt);
763
/** compute boundary flux, requires thermostat input since it is part of the coupling scheme */
764
virtual void compute_boundary_flux(FIELDS & fields)
765
{boundaryFlux_[VELOCITY] = 0.;};
748
767
/** determine if local shape function matrices are needed */
749
768
virtual bool use_local_shape_functions() const {return atomicRegulator_->use_localized_lambda();};
794
810
/** filtered nodal atomic momentum */
795
811
DENS_MAN nodalAtomicMomentumFiltered_;
797
/** hack to determine if first timestep has been passed */
798
bool isFirstTimestep_;
813
/** coefficient to account for effect of time filtering on rhs terms */
814
double filterCoefficient_;
817
DENS_MAT _tempNodalAtomicMomentumFiltered_; // stores filtered momentum change in atoms for persistence during predictor
827
* @class KinetostatFluxFixed
828
* @brief Class for kinetostatting using the velocity matching constraint one one set of nodes and the flux matching constraint on another
831
class KinetostatFluxFixed : public RegulatorMethod {
835
KinetostatFluxFixed(AtomicRegulator * kinetostat,
836
bool constructThermostats = true);
838
virtual ~KinetostatFluxFixed();
840
/** instantiate all needed data */
841
virtual void construct_transfers();
843
/** pre-run initialization of method data */
844
virtual void initialize();
846
/** applies thermostat to atoms in the predictor phase */
847
virtual void apply_pre_predictor(double dt);
849
/** applies thermostat to atoms in the pre-corrector phase */
850
virtual void apply_pre_corrector(double dt);
852
/** applies thermostat to atoms in the post-corrector phase */
853
virtual void apply_post_corrector(double dt);
855
/** get data for output */
856
virtual void output(OUTPUT_LIST & outputData);
858
/** compute boundary flux, requires kinetostat input since it is part of the coupling scheme */
859
virtual void compute_boundary_flux(FIELDS & fields)
860
{kinetostatBcs_->compute_boundary_flux(fields);};
865
/** kinetostat for imposing the fluxes */
866
KinetostatFlux * kinetostatFlux_;
868
/** kinetostat for imposing fixed nodes */
869
KinetostatFixed * kinetostatFixed_;
871
/** pointer to whichever kinetostat should compute the flux, based on coupling method */
872
KinetostatGlcFs * kinetostatBcs_;
876
// DO NOT define this
877
KinetostatFluxFixed();