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