Page MenuHomec4science

stimulation_dislo.hh
No OneTemporary

File Metadata

Created
Sat, Nov 16, 08:08

stimulation_dislo.hh

/**
* @file stimulation_dislo.hh
*
* @author Guillaume Anciaux <guillaume.anciaux@epfl.ch>
* @author Till Junge <till.junge@epfl.ch>
* @author Jaehyun Cho <jaehyun.cho@epfl.ch>
*
* @date Wed Dec 04 12:14:29 2013
*
* @brief This stmulation command imposes the Volterra displacement fields of strainght screw edge or mixed dislocations
*
* @section LICENSE
*
* Copyright (©) 2010-2011 EPFL (Ecole Polytechnique Fédérale de Lausanne)
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* LibMultiScale is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* LibMultiScale is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with LibMultiScale. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef __LIBMULTISCALE_STIMULATION_DISLO_HH__
#define __LIBMULTISCALE_STIMULATION_DISLO_HH__
/* -------------------------------------------------------------------------- */
#include "stimulation.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_LIBMULTISCALE__
template <typename _Input>
class StimulationDislo : public Stimulation<_Input>
{
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public:
StimulationDislo(const std::string & name, ComponentLMInterface & d):
Stimulation<_Input>(name,d){
nb_replica = 0;
this->dir_replica_char = 'X';
this->burg_edge = this->rotation_matrix;
this->normal = this->burg_edge+3;
this->line_dir = this->burg_edge+6;
for (UInt i = 0; i < 3; ++i) {
this->pos[i] = 0.0;
this->burg_edge_quant[i] = 0;
this->normal_quant[i] = 0;
this->line_dir_quant[i] = 0;
this->dipole[i] = 0;
}
this->normal_quant[1] = 1;
this->line_dir_quant[2] =1;
//resolution = 1.0;
this->theta = 90;
this->fix_border_tol = 0;
};
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
void init();
//! most generic stimulate function
void stimulate(_Input & cont, UInt stage);
/** We define a coordinate system for the dislocation in which the normal n to
the slip plane forms the y axis, the line vector l the z axis and
Be= cross(x,l) is the x direction
**/
//! displacement of a Volterra in its coordinate system's direction Be,
// b_edge is the edge component of the burgers vector
Real computeBeDisplacement(Real b_edge, Real * X);
//! displacement of a Volterra in its coordinate system's direction n,
Real computeNDisplacement(Real b_edge, Real * X);
//! displacement of a Volterra in its coordinate system's direction l,
// b_screw is the screw component of the burgers vector
Real computeLDisplacement(Real b_screw, Real * X);
void declareParams();
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
private:
void fix_boundary(typename _Input::Ref & atom,
const Quantity<Length,3> & xmin,
const Quantity<Length,3> & xmax);
template <bool do_the_fix>
inline void stimulate_fix(_Input & cont, UInt stage);
Quantity<Length> burgers;
Real *burg_edge, *normal, *line_dir;
//Quantity<Length, 3> normal_quant;
int normal_quant[3];
int burg_edge_quant[3];
// Quantity<Length, 3> line_dir_quant;
int line_dir_quant[3];
Real rotation_matrix[9];
//Quantity<Length, 3> pos;
Real pos[3];
//Quantity<Length> width;
int nb_replica;
char dir_replica_char;
UInt dir_replica;
//int sign[2];
Real nu;
//UInt resolution;
GeomID geom;
Real theta;
Quantity<Length> fix_border_tol;
int dipole[3];
};
/* -------------------------------------------------------------------------- */
__END_LIBMULTISCALE__
#endif /* __LIBMULTISCALE_STIMULATION_DISLO_HH__ */

Event Timeline