Skip to content

Commit

Permalink
Make typedef local
Browse files Browse the repository at this point in the history
  • Loading branch information
shivupa committed Jun 30, 2021
1 parent 8f0e8b2 commit 7582d4d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
14 changes: 8 additions & 6 deletions src/QMCWaveFunctions/Jastrow/J1OrbitalSoA.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ struct J1OrbitalSoA : public WaveFunctionComponent

std::vector<std::pair<int, int>> OffSet;
Vector<RealType> dLogPsi;
std::vector<GradVectorType*> gradLogPsi;
std::vector<ValueVectorType*> lapLogPsi;
typedef ParticleAttrib<QTFull::GradType> WavefunctionFirstDerivativeType;
typedef ParticleAttrib<QTFull::ValueType> WavefunctionSecondDerivativeType;
std::vector<WavefunctionFirstDerivativeType*> gradLogPsi;
std::vector<WavefunctionSecondDerivativeType*> lapLogPsi;

J1OrbitalSoA(const std::string& obj_name, const ParticleSet& ions, ParticleSet& els)
: WaveFunctionComponent("J1OrbitalSoA", obj_name), myTableID(els.addTable(ions)),
Expand Down Expand Up @@ -516,8 +518,8 @@ struct J1OrbitalSoA : public WaveFunctionComponent
lapLogPsi.resize(NumVars, 0);
for (int i = 0; i < NumVars; ++i)
{
gradLogPsi[i] = new GradVectorType(Nelec);
lapLogPsi[i] = new ValueVectorType(Nelec);
gradLogPsi[i] = new WavefunctionFirstDerivativeType(Nelec);
lapLogPsi[i] = new WavefunctionSecondDerivativeType(Nelec);
}
}

Expand Down Expand Up @@ -581,8 +583,8 @@ struct J1OrbitalSoA : public WaveFunctionComponent
lapLogPsi.resize(NumVars, 0);
for (int i = 0; i < NumVars; ++i)
{
gradLogPsi[i] = new GradVectorType(Nelec);
lapLogPsi[i] = new ValueVectorType(Nelec);
gradLogPsi[i] = new WavefunctionFirstDerivativeType(Nelec);
lapLogPsi[i] = new WavefunctionSecondDerivativeType(Nelec);
}
OffSet.resize(F.size());
int varoffset = myVars.Index[0];
Expand Down
8 changes: 0 additions & 8 deletions src/QMCWaveFunctions/WaveFunctionComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ struct WaveFunctionComponent : public QMCTraits
ORB_ALLWALKER /*!< all walkers update */
};

typedef ParticleAttrib<ValueType> ValueVectorType;
typedef ParticleAttrib<GradType> GradVectorType;
typedef ParticleSet::Walker_t Walker_t;
typedef Walker_t::WFBuffer_t WFBufferType;
typedef Walker_t::Buffer_t BufferType;
Expand Down Expand Up @@ -118,12 +116,6 @@ struct WaveFunctionComponent : public QMCTraits
* If dPsi=0, this WaveFunctionComponent is constant with respect to the optimizable variables
*/
DiffWaveFunctionComponentPtr dPsi;
/** A vector for \f$ \frac{\partial \nabla \log\phi}{\partial \alpha} \f$
*/
GradVectorType dLogPsi;
/** A vector for \f$ \frac{\partial \nabla^2 \log\phi}{\partial \alpha} \f$
*/
ValueVectorType d2LogPsi;
/** Name of the class derived from WaveFunctionComponent
*/
const std::string ClassName;
Expand Down

0 comments on commit 7582d4d

Please sign in to comment.