Change c->cpp for better integration with makefile
This commit is contained in:
@ -1,47 +0,0 @@
|
||||
# Install/unInstall package files in LAMMPS
|
||||
# mode = 0/1/2 for uninstall/install/update
|
||||
|
||||
# this is default Install.sh for all packages
|
||||
# if package has an auxiliary library or a file with a dependency,
|
||||
# then package dir has its own customized Install.sh
|
||||
|
||||
mode=$1
|
||||
|
||||
# enforce using portable C locale
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
|
||||
# arg1 = file, arg2 = file it depends on
|
||||
|
||||
action () {
|
||||
if (test $mode = 0) then
|
||||
rm -f ../$1
|
||||
elif (! cmp -s $1 ../$1) then
|
||||
if (test -z "$2" || test -e ../$2) then
|
||||
cp $1 ..
|
||||
if (test $mode = 2) then
|
||||
echo " updating src/$1"
|
||||
fi
|
||||
fi
|
||||
elif (test -n "$2") then
|
||||
if (test ! -e ../$2) then
|
||||
rm -f ../$1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# all package files with no dependencies
|
||||
|
||||
for file in *.cpp *.h; do
|
||||
test -f ${file} && action $file
|
||||
done
|
||||
|
||||
|
||||
# additional files
|
||||
|
||||
for file in meam_*.c; do
|
||||
test -f ${file} && action ${file}
|
||||
done
|
||||
|
||||
action fm_exp.c
|
||||
action meam.h
|
||||
@ -1,3 +1,4 @@
|
||||
extern "C" {
|
||||
/*
|
||||
Copyright (c) 2012,2013 Axel Kohlmeyer <akohlmey@gmail.com>
|
||||
All rights reserved.
|
||||
@ -131,3 +132,4 @@ double fm_exp(double x)
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*/
|
||||
}
|
||||
@ -91,7 +91,7 @@ typedef struct {
|
||||
double dr,rdrar;
|
||||
} meam_data_t;
|
||||
|
||||
meam_data_t meam_data;
|
||||
extern meam_data_t meam_data;
|
||||
|
||||
// Functions we need for compat
|
||||
#ifndef max
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
extern "C" {
|
||||
#include "meam.h"
|
||||
|
||||
void meam_cleanup_(void) {
|
||||
@ -12,3 +13,4 @@ void meam_cleanup_(void) {
|
||||
deallocate(meam_data.phir);
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
#include "meam.h"
|
||||
|
||||
meam_data_t meam_data = {};
|
||||
5
src/USER-MEAMC/meam_data.cpp
Normal file
5
src/USER-MEAMC/meam_data.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
extern "C" {
|
||||
#include "meam.h"
|
||||
|
||||
meam_data_t meam_data = {};
|
||||
}
|
||||
@ -1,3 +1,4 @@
|
||||
extern "C"{
|
||||
#include "meam.h"
|
||||
#include <math.h>
|
||||
|
||||
@ -260,3 +261,5 @@
|
||||
}
|
||||
|
||||
//ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
|
||||
|
||||
}
|
||||
@ -1,3 +1,4 @@
|
||||
extern "C" {
|
||||
#include "meam.h"
|
||||
#include <math.h>
|
||||
|
||||
@ -500,5 +501,4 @@
|
||||
//ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,3 +1,4 @@
|
||||
extern "C"{
|
||||
#include "meam.h"
|
||||
#include <math.h>
|
||||
|
||||
@ -549,3 +550,5 @@ void dsij(int i,int j,int k,int jn,int nmax,int numneigh,double rij2,double *dsi
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,3 +1,4 @@
|
||||
extern "C" {
|
||||
#include "meam.h"
|
||||
#include <math.h>
|
||||
|
||||
@ -943,3 +944,6 @@ void G_gam(double Gamma,int ibar,double gsmooth_factor, double *G, int *errorfla
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,3 +1,4 @@
|
||||
extern "C" {
|
||||
#include "meam.h"
|
||||
#include <math.h>
|
||||
|
||||
@ -97,3 +98,4 @@
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,3 +1,4 @@
|
||||
extern "C" {
|
||||
#include "meam.h"
|
||||
|
||||
//
|
||||
@ -58,7 +59,7 @@
|
||||
void meam_setup_param_(int *which_p, double *value_p, int *nindex_p, int *index /*index(3)*/, int *errorflag)
|
||||
{
|
||||
//: index[0..2]
|
||||
int i1, i2;
|
||||
int i1, i2, val;
|
||||
*errorflag = 0;
|
||||
int which = *which_p;
|
||||
double value = *value_p;
|
||||
@ -97,7 +98,7 @@
|
||||
case 4:
|
||||
meam_checkindex(2,maxelt,nindex,index,errorflag);
|
||||
if (*errorflag!=0) return;
|
||||
int val = (int)value;
|
||||
val = (int)value;
|
||||
|
||||
if (val==0)
|
||||
meam_data.lattce_meam[index[0]][index[1]] = FCC;
|
||||
@ -221,3 +222,5 @@
|
||||
*errorflag = 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user