Skip to content

Commit

Permalink
Merge pull request #72 from streeve/cabana_group_init
Browse files Browse the repository at this point in the history
Cabana: SF group initialization
  • Loading branch information
singraber committed Nov 24, 2020
2 parents 67cbf5a + 6398e01 commit bf4db65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libnnp/version.h
Expand Up @@ -17,7 +17,7 @@
#ifndef VERSION_H
#define VERSION_H

#define NNP_VERSION "2.0.0"
#define NNP_VERSION "2.0.2"
#define NNP_GIT_REV ""
#define NNP_GIT_REV_SHORT ""
#define NNP_GIT_BRANCH ""
Expand Down
6 changes: 5 additions & 1 deletion src/libnnpif/CabanaMD/ElementCabana_impl.h
Expand Up @@ -311,7 +311,7 @@ void ElementCabana::setupSymmetryFunctionGroups( t_SF SF,
h_t_int h_numSFGperElem,
int maxSFperElem )
{
int num_group = h_numSFperElem.extent( 0 ) * 2;
int num_group = h_numSFperElem.extent( 0 );
h_t_int h_numGR( "RadialCounter", num_group );
h_t_int h_numGA( "AngularCounter", num_group );
int SFindex;
Expand Down Expand Up @@ -366,12 +366,16 @@ void ElementCabana::setupSymmetryFunctionGroups( t_SF SF,
if ( SF( attype, SFindex, 1 ) == 2 )
{
SFGmemberlist( attype, l, 0 ) = SFindex;
if ( l >= (int)h_numGR.extent( 0 ) )
Kokkos::resize( h_numGR, l+1 );
h_numGR( l ) = 1;
SFGmemberlist( attype, l, maxSFperElem )++;
}
else if ( SF( attype, SFindex, 1 ) == 3 )
{
SFGmemberlist( attype, l, 0 ) = SFindex;
if ( l >= (int)h_numGA.extent( 0 ) )
Kokkos::resize( h_numGA, l+1 );
h_numGA( l ) = 1;
SFGmemberlist( attype, l, maxSFperElem )++;
}
Expand Down

0 comments on commit bf4db65

Please sign in to comment.