From drichie at hpti.com Tue Apr 27 15:02:15 2004 From: drichie at hpti.com (david richie) Date: Tue Apr 27 16:03:38 2004 Subject: [Ohmms-dev] AntiSymTensor Message-ID: <003601c42c9a$ec8c4d20$0f01a8c0@yourw92p4bhlzg> Should AntiSymTensor and SymTensor behave like Tensor when used in ParticleAttirb<>? Specifically, consider code fragment: typedef Tensor Tensor_t; typedef AntiSymTensor AntiSymTensor_t; ParticleAttrib tensor; ParticleAttrib antisymtensor; t = 0.0e0; antisymtensor = 0.0e0; The last assignment triggers error. Above is a mock version of problem. I can forward exact source if necessary. Can you verify that above should work? Compile-time error is particularly nasty, but maybe it will shed some light. This is real error, not from toy problem above. In real example I am using AntiSymTensor for torque. When I switch Torque_t to a simple Tensor<> compiles fine (but torque is not a tensor, so not a solution). g++ -DHAVE_CONFIG_H -I. -I../../src -I. -I../../src/OOMPI -ftemplate-depth-60 -DADD_ -I/usr/include/libxml2 -c -o FFHydroSDPotential.o `test -f 'StokesianDynamics/FFHydroSDPotential.cpp' || echo '../../src/'`StokesianDynamics/FFHydroSDPotential.cpp ../../src/PETE/OperatorTags.h: In member function `BinaryReturn::Type_t OpAssign::operator()(const T1&, const T2&) const [with T1 = AntiSymTensor, T2 = double]': ../../src/ParticleBase/ParticleAttrib.cpp:1135: instantiated from `void evaluate(ParticleAttrib&, const Op&, const Expression&) [with T = AntiSymTensor, Op = OpAssign, RHS = Scalar]' ../../src/ParticleBase/ParticleAttrib.cpp:974: instantiated from `ParticleAttrib& assign(ParticleAttrib&, const RHS&) [with T1 = AntiSymTensor, RHS = double]' ../../src/ParticleBase/ParticleAttrib.h:139: instantiated from `ParticleAttrib& ParticleAttrib::operator=(const RHS&) [with RHS = double, T = AntiSymTensor]' ../../src/StokesianDynamics/FFHydroSDPotential.cpp:57: instantiated from here ../../src/PETE/OperatorTags.h:757: could not convert `(++a)->AntiSymTensor::operator=(const T&) [with T = Scalar_t, unsigned int D = 3]((+b))' to ` AntiSymTensor&' -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mcc0.mcc.uiuc.edu/pipermail/ohmms-dev/attachments/20040427/fb815894/attachment.html From jnkim at ncsa.uiuc.edu Tue Apr 27 15:15:08 2004 From: jnkim at ncsa.uiuc.edu (Jeongnim Kim) Date: Tue Apr 27 16:15:11 2004 Subject: [Ohmms-dev] AntiSymTensor In-Reply-To: <003601c42c9a$ec8c4d20$0f01a8c0@yourw92p4bhlzg> Message-ID: <5.1.0.14.2.20040427161044.023b8a78@pop.ncsa.uiuc.edu> Let me know if you can compile antisymtesor[0] = 0.0; At 05:02 PM 4/27/2004 -0400, david richie wrote: >Should AntiSymTensor and SymTensor behave >like Tensor when used in ParticleAttirb<>? > >Specifically, consider code fragment: > > typedef Tensor Tensor_t; > typedef AntiSymTensor AntiSymTensor_t; > > ParticleAttrib tensor; > ParticleAttrib antisymtensor; > > t = 0.0e0; > antisymtensor = 0.0e0; > >The last assignment triggers error. Above is a mock version >of problem. I can forward exact source if necessary. Can >you verify that above should work? > >Compile-time error is particularly nasty, but maybe it will >shed some light. This is real error, not from toy problem above. >In real example I am using AntiSymTensor for torque. When I >switch Torque_t to a simple Tensor<> compiles fine (but torque >is not a tensor, so not a solution). > >g++ -DHAVE_CONFIG_H -I. -I../../src -I. >-I../../src/OOMPI -ftemplate-depth-60 -DADD_ -I/usr/include/libxml2 -c >-o FFHydroSDPotential.o `test -f >'StokesianDynamics/FFHydroSDPotential.cpp' || echo >'../../src/'`StokesianDynamics/FFHydroSDPotential.cpp >../../src/PETE/OperatorTags.h: In member function `BinaryReturn OpAssign>::Type_t OpAssign::operator()(const T1&, const T2&) const > [with T1 > = AntiSymTensor, T2 = double]': >../../src/ParticleBase/ParticleAttrib.cpp:1135: instantiated from `void >evaluate(ParticleAttrib&, const Op&, const Expression&) [with T = >AntiSymTensor, Op = OpAssign, RHS = Scalar]' >../../src/ParticleBase/ParticleAttrib.cpp:974: instantiated from >`ParticleAttrib& assign(ParticleAttrib&, const RHS&) [with T1 = >AntiSymTensor, RHS = double]' >../../src/ParticleBase/ParticleAttrib.h:139: instantiated from >`ParticleAttrib& ParticleAttrib::operator=(const RHS&) [with RHS = >double, T = AntiSymTensor]' >../../src/StokesianDynamics/FFHydroSDPotential.cpp:57: instantiated from >here >../../src/PETE/OperatorTags.h:757: could not convert `(++a)->AntiSymTensor D>::operator=(const T&) [with T = Scalar_t, unsigned int D = 3]((+b))' > to ` > AntiSymTensor&' > > >_______________________________________________ >Ohmms-dev mailing list >Ohmms-dev@mcc.uiuc.edu >http://mcc0.mcc.uiuc.edu/mailman/listinfo/ohmms-dev Best wishes, Jeongnim Kim --------------------------------------------------------------- Jeongnim Kim e-mail: jnkim@uiuc.edu NCSA Tel: 217-244-6319 (NCSA) Beckman Institute 217-244-4971 (MCC) 405 N Mathews Av. Fax: 217-244-2909 Urbana, IL 61801 --------------------------------------------------------------- From drichie at hpti.com Wed Apr 28 14:45:56 2004 From: drichie at hpti.com (david richie) Date: Wed Apr 28 15:46:10 2004 Subject: [Ohmms-dev] exp() and ParticleAttrib > Message-ID: <006001c42d61$da4a5a40$0f01a8c0@yourw92p4bhlzg> does there exist support for using exp() function on ParticleAttirb<> container? If not, can you suggest closest function to use as starting point in OhmmsPETE/ Example: typedef TinyVector Position_t; typedef ParticleAttrib ParticlePosition_t; double alpha = 0.9; ParticlePosition_t& R1,R2; R1 = something R2 = exp(-R1/alpha); ??? -David -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mcc0.mcc.uiuc.edu/pipermail/ohmms-dev/attachments/20040428/853a575a/attachment.html