45 #ifndef SRC_APPS_CHEM_POINTGROUPOPERATOR_H_
46 #define SRC_APPS_CHEM_POINTGROUPOPERATOR_H_
52 template<
typename T, std::
size_t NDIM>
61 const std::vector<long> md)
70 template<
typename T, std::
size_t NDIM>
74 if (
name_==
"identity") {
77 }
else if (
name_==
"inversion"){
79 std::vector<long> mm(
NDIM,-1);
90 template<
typename T, std::
size_t NDIM>
92 std::vector<Function<T,NDIM> > result(vf.size());
95 if (vf.size()==0)
return result;
96 World& world=vf.begin()->world();
98 for (
size_t i=0; i<vf.size(); ++i) result[i]=this->
operator()(vf[i],
false);
107 s <<
"Symmetry operator " << pg_op.
name() ;
124 return pg_operator(
"E",
"identity",std::vector<long>(), std::vector<long>());
128 return pg_operator(
"i",
"inversion",std::vector<long>(), std::vector<long>());
133 return pg_operator(
"s",
"sigma_x",vector_factory<long>(1,-1),std::vector<long>());
137 return pg_operator(
"s",
"sigma_y",vector_factory<long>(-1,1),std::vector<long>());
141 return pg_operator(
"C2",
"C_2",vector_factory<long>(-1,-1),std::vector<long>());
145 return pg_operator(
"C4",
"C_4",vector_factory<long>(-1,1),vector_factory<long>(1,0));
151 return pg_operator(
"s",
"sigma_xy",vector_factory<long>(1,1,-1), std::vector<long>());
155 return pg_operator(
"s",
"sigma_xz",vector_factory<long>(1,-1,1), std::vector<long>());
159 return pg_operator(
"s",
"sigma_yz",vector_factory<long>(-1,1,1), std::vector<long>());
163 return pg_operator(
"C2",
"C_2(x)",vector_factory<long>(1,-1,-1), std::vector<long>());
167 return pg_operator(
"C2",
"C_2(y)",vector_factory<long>(-1,1,-1), std::vector<long>());
171 return pg_operator(
"C2",
"C_2(z)",vector_factory<long>(-1,-1,1), std::vector<long>());
175 return pg_operator(
"C4",
"C_4(x)",vector_factory<long>(1,-1,1), vector_factory<long>(0,2,1));
179 return pg_operator(
"C4",
"C_4(y)",vector_factory<long>(1,1,-1), vector_factory<long>(2,1,0));
183 return pg_operator(
"C4",
"C_4(z)",vector_factory<long>(-1,1,1), vector_factory<long>(1,0,2));
A multiresolution adaptive numerical function.
Definition: mra.h:122
void fence(bool debug=false)
Synchronizes all processes in communicator AND globally ensures no pending AM or tasks.
Definition: worldgop.cc:161
A parallel world class.
Definition: world.h:132
WorldGopInterface & gop
Global operations.
Definition: world.h:205
This class implements the symmetry operations (not the point groups)
Definition: pointgroupoperator.h:55
std::string symbol_
Definition: pointgroupoperator.h:114
std::vector< long > mapdim_
Definition: pointgroupoperator.h:117
std::string name() const
return the name of the symmetry operator
Definition: pointgroupoperator.h:65
std::string symbol() const
Definition: pointgroupoperator.h:67
Function< T, NDIM > operator()(const Function< T, NDIM > &f, bool fence=true) const
apply the operator on an n-dimensional MRA function
Definition: pointgroupoperator.h:71
std::vector< Function< T, NDIM > > operator()(const std::vector< Function< T, NDIM > > &vf, bool fence=true) const
apply the operator on an n-dimensional MRA function
Definition: pointgroupoperator.h:91
pg_operator(std::string symbol, std::string name, const std::vector< long > mm, const std::vector< long > md)
ctor with explicit mirror maps
Definition: pointgroupoperator.h:60
friend std::ostream & operator<<(std::ostream &s, const pg_operator &pg_op)
Definition: pointgroupoperator.h:106
std::string name_
Definition: pointgroupoperator.h:115
std::vector< long > mirrormap
Definition: pointgroupoperator.h:116
File holds all helper structures necessary for the CC_Operator and CC2 class.
Definition: DFParameters.h:10
static pg_operator pg_c2x()
Definition: pointgroupoperator.h:162
static pg_operator pg_sigma_y()
Definition: pointgroupoperator.h:136
static pg_operator pg_c4y()
Definition: pointgroupoperator.h:178
Function< T, NDIM > copy(const Function< T, NDIM > &f, const std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > &pmap, bool fence=true)
Create a new copy of the function with different distribution and optional fence.
Definition: mra.h:2002
static pg_operator pg_c4()
Definition: pointgroupoperator.h:144
Function< T, NDIM > map_and_mirror(const Function< T, NDIM > &f, const std::vector< long > &map, const std::vector< long > &mirror, bool fence=true)
This is replaced with mirror(map(f)), optional fence.
Definition: mra.h:2288
static pg_operator pg_sigma_yz()
Definition: pointgroupoperator.h:158
static pg_operator pg_c4z()
Definition: pointgroupoperator.h:182
static pg_operator pg_sigma_x()
Definition: pointgroupoperator.h:132
static pg_operator pg_c2()
Definition: pointgroupoperator.h:140
NDIM & f
Definition: mra.h:2416
static pg_operator pg_c4x()
Definition: pointgroupoperator.h:174
Function< T, NDIM > mirror(const Function< T, NDIM > &f, const std::vector< long > &mirrormap, bool fence=true)
Generate a new function by mirroring within the dimensions .. optional fence.
Definition: mra.h:2271
static pg_operator pg_inversion()
Definition: pointgroupoperator.h:127
static pg_operator pg_c2z()
Definition: pointgroupoperator.h:170
static pg_operator pg_c2y()
Definition: pointgroupoperator.h:166
static pg_operator pg_sigma_xy()
Definition: pointgroupoperator.h:150
static pg_operator pg_sigma_xz()
Definition: pointgroupoperator.h:154
static pg_operator pg_identity()
Definition: pointgroupoperator.h:123
static const std::size_t NDIM
Definition: testpdiff.cc:42
Declares and implements factories for short vectors.