namespace ewalena
0.2.15
ewalena is not an acronym
|
00001 // ------------------------------------------------------------------- 00002 // @author Toby D. Young 00003 // @version $Id: elastic_field.h 988 2012-11-26 19:09:39Z oneliefleft $ 00004 // 00005 // Copyright 2009, 2010, 2012 namespace ewalena authors. All rights 00006 // reserved. 00007 // 00008 // Redistribution and use in source and binary forms, with or without 00009 // modification, are permitted provided that the following conditions 00010 // are met: 00011 // 00012 // 1. Redistributions of source code must retain the above copyright 00013 // notice, this list of conditions and the following disclaimer. 00014 // 00015 // 2. Redistributions in binary form must reproduce the above 00016 // copyright notice, this list of conditions and the following 00017 // disclaimer in the documentation and/or other materials provided 00018 // with the distribution. 00019 // 00020 // THIS SOFTWARE IS PROVIDED BY THE NAMEPSACE EWALENA AUTHORS ``AS 00021 // IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00022 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00023 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 00024 // NAMESPACE EWALENA AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 00025 // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00026 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00027 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00028 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 00029 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00030 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 00031 // OF THE POSSIBILITY OF SUCH DAMAGE. 00032 // 00033 // The views and conclusions contained in the software and 00034 // documentation are those of the authors and should not be 00035 // interpreted as representing official policies, either expressed or 00036 // implied, of the namespace ewalena authors. 00037 // ------------------------------------------------------------------- 00038 00039 #ifndef __ewalena_elastic_field_h 00040 #define __ewalena_elastic_field_h 00041 00042 00043 #ifdef EWALENA_HAVE_CONFIG_H 00044 #include <ewalena/base/config.h> 00045 #endif 00046 00047 #include <ewalena/numerics/crystal_field_base.h> 00048 00049 namespace ewalena 00050 { 00051 namespace Crystal 00052 { 00053 00074 template <typename ValueType = double> 00075 class ElasticField 00076 : 00077 public Crystal::CrystalFieldBase<3, 4, ValueType> 00078 { 00079 private: 00080 00081 protected: 00082 00087 void distribute_moduli_to_hexagonal (); 00088 00093 void distribute_moduli_to_cubic (); 00094 00099 void distribute_moduli_to_trigonal (); 00100 00101 public: 00102 00106 ElasticField (const Vector<ValueType> &moduli = Vector<ValueType> (), 00107 const SymmetryFlag &symmetry_flags = SymmetryFlag::null, 00108 const SymmetryFlag &group_flags = SymmetryFlag::null) 00109 : 00110 CrystalFieldBase<3, 4, ValueType> (moduli, symmetry_flags, group_flags) 00111 {} 00112 00116 virtual ~ElasticField (); 00117 00122 void distribute_moduli (const Vector<ValueType> &moduli); 00123 00127 inline 00128 ewalena::Crystal::CrystalFieldBase<3, 4, ValueType> operator* () const 00129 { 00130 return (*this); 00131 } 00132 00133 }; /* ElasticField */ 00134 00135 } /* namespace Crystal */ 00136 00137 } /* namespace ewalena */ 00138 00139 #endif /* __ewalena_elastic_field_h */