J'en ai marre! J'ai fait les modifications dans le code de MUD que D. Arseneau a proposé. Au moins il est possible maintenant d'utiliser l'architecture EM64T.
This commit is contained in:
parent
a9ea0160a3
commit
3b3521eccf
12
configure.ac
12
configure.ac
@ -493,7 +493,16 @@ dnl -----------------------------------------------
|
||||
dnl Set host specific compiler and linker flags
|
||||
dnl -----------------------------------------------
|
||||
|
||||
LOCAL_BIN_CXXFLAGS="-Wall -Wno-trigraphs"
|
||||
case "${host_cpu}" in
|
||||
x86_64)
|
||||
CPUFLAGS="-m64 -fPIC -DPIC"
|
||||
;;
|
||||
*)
|
||||
CPUFLAGS=
|
||||
;;
|
||||
esac
|
||||
|
||||
LOCAL_BIN_CXXFLAGS="${CPUFLAGS} -Wall -Wno-trigraphs"
|
||||
LOCAL_LIB_CXXFLAGS="${LOCAL_BIN_CXXFLAGS}"
|
||||
LOCAL_PSIBIN_LIB_CXXFLAGS="${LOCAL_LIB_CXXFLAGS}"
|
||||
LOCAL_MUD_LIB_CXXFLAGS="${LOCAL_LIB_CXXFLAGS}"
|
||||
@ -522,6 +531,7 @@ case "$host" in
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
AC_SUBST(LOCAL_BIN_CXXFLAGS)
|
||||
AC_SUBST(LOCAL_LIB_CXXFLAGS)
|
||||
AC_SUBST(LOCAL_PSIBIN_LIB_CXXFLAGS)
|
||||
|
@ -170,10 +170,19 @@ TMeanFieldsForScSingleLayer::TMeanFieldsForScSingleLayer() {
|
||||
}
|
||||
|
||||
// Operator-method that returns the mean field for a given implantation energy
|
||||
// Parameters: field, deadlayer, thicknessSC, lambda
|
||||
// Parameters: field, deadlayer, thicknessSC, lambda, weight (deadlayer), weight (SC), weight (substrate)
|
||||
|
||||
double TMeanFieldsForScSingleLayer::operator()(double E, const vector<double> &par_vec) const{
|
||||
|
||||
vector<double> interfaces;
|
||||
interfaces.push_back(par_vec[1]);
|
||||
interfaces.push_back(par_vec[1]+par_vec[2]);
|
||||
|
||||
vector<double> weights;
|
||||
weights.push_back(par_vec[4]);
|
||||
weights.push_back(par_vec[5]);
|
||||
weights.push_back(par_vec[6]);
|
||||
|
||||
// Calculate field profile
|
||||
vector<double> parForBofZ(par_vec);
|
||||
|
||||
@ -184,12 +193,12 @@ double TMeanFieldsForScSingleLayer::operator()(double E, const vector<double> &p
|
||||
energyIter = find(energies.begin(), energies.end(), E);
|
||||
|
||||
if (energyIter != energies.end()) { // implantation profile found - no interpolation needed
|
||||
return CalcMeanB(E, BofZ);
|
||||
return CalcMeanB(E, interfaces, weights, BofZ);
|
||||
} else {
|
||||
if (E < *energies.begin())
|
||||
return CalcMeanB(*energies.begin(), BofZ);
|
||||
return CalcMeanB(*energies.begin(), interfaces, weights, BofZ);
|
||||
if (E > *(energies.end()-1))
|
||||
return CalcMeanB(*(energies.end()-1), BofZ);
|
||||
return CalcMeanB(*(energies.end()-1), interfaces, weights, BofZ);
|
||||
|
||||
energyIter = find_if(energies.begin(), energies.end(), bind2nd( greater<double>(), E));
|
||||
// cout << *(energyIter - 1) << " " << *(energyIter) << endl;
|
||||
@ -197,16 +206,16 @@ double TMeanFieldsForScSingleLayer::operator()(double E, const vector<double> &p
|
||||
double E1(*(energyIter - 1));
|
||||
double E2(*(energyIter));
|
||||
|
||||
double B1(CalcMeanB(E1, BofZ));
|
||||
double B2(CalcMeanB(E2, BofZ));
|
||||
double B1(CalcMeanB(E1, interfaces, weights, BofZ));
|
||||
double B2(CalcMeanB(E2, interfaces, weights, BofZ));
|
||||
|
||||
return B1 + (B2-B1)/(E2-E1)*(E-E1);
|
||||
}
|
||||
}
|
||||
|
||||
double TMeanFieldsForScSingleLayer::CalcMeanB (double E, const TLondon1D_1L& BofZ) const {
|
||||
double TMeanFieldsForScSingleLayer::CalcMeanB (double E, const vector<double>& interfaces, const vector<double>& weights, const TLondon1D_1L& BofZ) const {
|
||||
//calcData->UseHighResolution(E);
|
||||
|
||||
fImpProfile->WeightLayers(E, interfaces, weights);
|
||||
fImpProfile->Normalize(E);
|
||||
|
||||
vector<double> z(fImpProfile->DataZ(E));
|
||||
@ -217,7 +226,7 @@ double TMeanFieldsForScSingleLayer::CalcMeanB (double E, const TLondon1D_1L& Bof
|
||||
double meanB(0.);
|
||||
|
||||
for (unsigned int i(0); i<z.size(); i++) {
|
||||
meanB += (z[1]-z[0])*nz[i]*BofZ.GetBofZ(z[i]/10.);
|
||||
meanB += (z[1]-z[0])*nz[i]*BofZ.GetBofZ(0.1*z[i]);
|
||||
}
|
||||
return meanB;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
~TMeanFieldsForScSingleLayer() {delete fImpProfile; fImpProfile = 0;}
|
||||
|
||||
double operator()(double, const vector<double>&) const;
|
||||
double CalcMeanB (double, const TLondon1D_1L&) const;
|
||||
double CalcMeanB (double, const vector<double>&, const vector<double>&, const TLondon1D_1L&) const;
|
||||
|
||||
private:
|
||||
TTrimSPData *fImpProfile;
|
||||
|
13
src/external/mud/src/mud.h
vendored
13
src/external/mud/src/mud.h
vendored
@ -102,13 +102,13 @@ typedef char INT8;
|
||||
typedef unsigned char UINT8;
|
||||
typedef short INT16;
|
||||
typedef unsigned short UINT16;
|
||||
#ifdef __alpha
|
||||
#if defined(__alpha) || defined(__x86_64__) || defined(__amd64) || defined(__ia64)
|
||||
typedef int INT32;
|
||||
typedef unsigned int UINT32;
|
||||
#else
|
||||
typedef long INT32;
|
||||
typedef unsigned long UINT32;
|
||||
#endif /* __alpha */
|
||||
#endif /* defined(__alpha) || defined(__x86_64__) || defined(__amd64) || defined(__ia64) */
|
||||
typedef float REAL32;
|
||||
typedef double REAL64;
|
||||
typedef UINT32 TIME;
|
||||
@ -146,10 +146,10 @@ typedef char* caddr_t;
|
||||
/*
|
||||
* c_utils.h, Defines for C utilities
|
||||
*/
|
||||
#if defined(vms) || defined(__MSDOS__)
|
||||
#if defined(vms) || defined(__MSDOS__) || defined(_MSC_VER)
|
||||
#define bcopy( b1, b2, len ) memcpy(b2,b1,len)
|
||||
#define bzero( b, len ) memset(b,(char)0,len)
|
||||
#endif /* vms || __MSDOS__ */
|
||||
#endif /* vms || __MSDOS__ || _MSC_VER */
|
||||
#ifndef _C_UTILS_H_ /* conflict with c_utils.h */
|
||||
#define _max( a, b ) ( ( (a) > (b) ) ? (a) : (b) )
|
||||
#define _min( a, b ) ( ( (a) < (b) ) ? (a) : (b) )
|
||||
@ -161,7 +161,7 @@ typedef char* caddr_t;
|
||||
#define _roundUp( n, r ) ( (r) * (int)( ((n)+(r)-1) / (r) ) )
|
||||
|
||||
#define zalloc( n ) memset((void*)malloc(n),0,n)
|
||||
#if defined(vms) || (defined(mips)&&!defined(__sgi)) || (defined(__MSDOS__)&&defined(__STDC__))
|
||||
#if defined(vms) || (defined(mips)&&!defined(__sgi)) || ((defined(__MSDOS__) || defined(_MSC_VER))&&defined(__STDC__))
|
||||
#define strdup( s ) strcpy((char*)malloc(strlen(s)+1),s)
|
||||
#endif /* vms || mips&&!sgi */
|
||||
/*#endif */
|
||||
@ -388,7 +388,8 @@ typedef struct {
|
||||
#define MUD_instanceID( pM ) (((MUD_SEC*)pM)->core.instanceID)
|
||||
|
||||
|
||||
#if defined(__MSDOS__) || defined(__i386__) || defined(vax) || defined(__alpha) || (defined(__mips)&&!defined(__sgi))
|
||||
#if defined(__MSDOS__) || defined(__i386__) || defined(__i586__) || defined(__i686__) || defined(vax) || defined(__alpha) || defined(__x86_64__) || defined(__amd64) \
|
||||
|| (defined(__mips)&&!defined(__sgi))
|
||||
#define MUD_LITTLE_ENDIAN 1
|
||||
#else
|
||||
#define MUD_BIG_ENDIAN 1
|
||||
|
7
src/external/mud/src/mud_all.c
vendored
7
src/external/mud/src/mud_all.c
vendored
@ -169,6 +169,7 @@ MUD_SEC_CMT_proc( op, pBuf, pMUD )
|
||||
MUD_SEC_CMT* pMUD;
|
||||
{
|
||||
int size;
|
||||
time_t bintime;
|
||||
char tempStr1[32];
|
||||
|
||||
switch( op )
|
||||
@ -207,7 +208,8 @@ MUD_SEC_CMT_proc( op, pBuf, pMUD )
|
||||
printf( " MUD_SEC_CMT: \n" );
|
||||
printf( " number:[%ld], prevReply:[%ld], nextReply:[%ld]\n",
|
||||
pMUD->ID, pMUD->prevReplyID, pMUD->nextReplyID );
|
||||
strcpy( tempStr1, ctime( (time_t*)&pMUD->time ) );
|
||||
bintime = pMUD->time;
|
||||
strncpy( tempStr1, ctime( &bintime ), sizeof(tempStr1) );
|
||||
tempStr1[strlen(tempStr1)-1] = '\0';
|
||||
printf( " time:[%s]\n", tempStr1 );
|
||||
if( pMUD->author ) printf( " author:\"%s\"\n", pMUD->author );
|
||||
@ -221,7 +223,8 @@ MUD_SEC_CMT_proc( op, pBuf, pMUD )
|
||||
if( pMUD->nextReplyID > 0 )
|
||||
printf(" Next: #%ld.", pMUD->nextReplyID );
|
||||
printf( "\n" );
|
||||
strcpy( tempStr1, ctime( (time_t*)&pMUD->time ) );
|
||||
bintime = pMUD->time;
|
||||
strncpy( tempStr1, ctime( &bintime ), sizeof(tempStr1) );
|
||||
tempStr1[strlen(tempStr1)-1] = '\0';
|
||||
if( pMUD->author ) printf( " author: %s, time: %s\n", pMUD->author, tempStr1 );
|
||||
if( pMUD->title ) printf( " title: %s\n", pMUD->title );
|
||||
|
13
src/external/mud/src/mud_gen.c
vendored
13
src/external/mud/src/mud_gen.c
vendored
@ -33,6 +33,7 @@ MUD_SEC_GEN_RUN_DESC_proc( op, pBuf, pMUD )
|
||||
MUD_SEC_GEN_RUN_DESC* pMUD;
|
||||
{
|
||||
int size;
|
||||
time_t bintime;
|
||||
char tempStr1[32];
|
||||
char tempStr2[32];
|
||||
int imin,isec;
|
||||
@ -109,9 +110,11 @@ MUD_SEC_GEN_RUN_DESC_proc( op, pBuf, pMUD )
|
||||
case MUD_SHOW:
|
||||
printf( " MUD_SEC_GEN_RUN_DESC: expt:[%ld], run:[%ld]\n",
|
||||
pMUD->exptNumber, pMUD->runNumber );
|
||||
strcpy( tempStr1, ctime( (time_t*)&pMUD->timeBegin ) );
|
||||
bintime = pMUD->timeBegin;
|
||||
strncpy( tempStr1, ctime( &bintime ), sizeof(tempStr1) );
|
||||
tempStr1[strlen(tempStr1)-1] = '\0';
|
||||
strcpy( tempStr2, ctime( (time_t*)&pMUD->timeEnd ) );
|
||||
bintime = pMUD->timeEnd;
|
||||
strncpy( tempStr1, ctime( &bintime ), sizeof(tempStr1) );
|
||||
tempStr2[strlen(tempStr2)-1] = '\0';
|
||||
printf( " timeBegin:[%s] [%ld]\n", tempStr1, pMUD->timeBegin );
|
||||
printf( " timeEnd:[%s] [%ld]\n", tempStr2, pMUD->timeEnd );
|
||||
@ -139,9 +142,11 @@ MUD_SEC_GEN_RUN_DESC_proc( op, pBuf, pMUD )
|
||||
if( pMUD->experimenter )
|
||||
printf( " operator: %s\n", pMUD->experimenter );
|
||||
if( pMUD->method ) printf( " method: %s\n", pMUD->method );
|
||||
strcpy( tempStr1, ctime( (time_t*)&pMUD->timeBegin ) );
|
||||
bintime = pMUD->timeBegin;
|
||||
strncpy( tempStr1, ctime( &bintime ), sizeof(tempStr1) );
|
||||
tempStr1[strlen(tempStr1)-1] = '\0';
|
||||
strcpy( tempStr2, ctime( (time_t*)&pMUD->timeEnd ) );
|
||||
bintime = pMUD->timeEnd;
|
||||
strncpy( tempStr1, ctime( &bintime ), sizeof(tempStr1) );
|
||||
tempStr2[strlen(tempStr2)-1] = '\0';
|
||||
printf( " began: %s\n ended: %s\n",
|
||||
tempStr1, tempStr2 );
|
||||
|
13
src/external/mud/src/mud_tri_ti.c
vendored
13
src/external/mud/src/mud_tri_ti.c
vendored
@ -18,6 +18,7 @@ MUD_SEC_TRI_TI_RUN_DESC_proc( op, pBuf, pMUD )
|
||||
MUD_SEC_TRI_TI_RUN_DESC* pMUD;
|
||||
{
|
||||
int size;
|
||||
time_t bintime;
|
||||
char tempStr1[32];
|
||||
char tempStr2[32];
|
||||
|
||||
@ -101,9 +102,11 @@ MUD_SEC_TRI_TI_RUN_DESC_proc( op, pBuf, pMUD )
|
||||
case MUD_SHOW:
|
||||
printf( " MUD_SEC_TRI_TI_RUN_DESC: expt:[%ld], run:[%ld]\n",
|
||||
pMUD->exptNumber, pMUD->runNumber );
|
||||
strcpy( tempStr1, ctime( (time_t*)&pMUD->timeBegin ) );
|
||||
bintime = pMUD->timeBegin;
|
||||
strncpy( tempStr1, ctime( &bintime ), sizeof(tempStr1) );
|
||||
tempStr1[strlen(tempStr1)-1] = '\0';
|
||||
strcpy( tempStr2, ctime( (time_t*)&pMUD->timeEnd ) );
|
||||
bintime = pMUD->timeEnd;
|
||||
strncpy( tempStr1, ctime( &bintime ), sizeof(tempStr1) );
|
||||
tempStr2[strlen(tempStr2)-1] = '\0';
|
||||
printf( " timeBegin:[%s]\n", tempStr1 );
|
||||
printf( " timeEnd:[%s]\n", tempStr2 );
|
||||
@ -136,9 +139,11 @@ MUD_SEC_TRI_TI_RUN_DESC_proc( op, pBuf, pMUD )
|
||||
printf( " operator: %s\n", pMUD->experimenter );
|
||||
if( pMUD->method )
|
||||
printf( " method: %s\n", pMUD->method );
|
||||
strcpy( tempStr1, ctime( (time_t*)&pMUD->timeBegin ) );
|
||||
bintime = pMUD->timeBegin;
|
||||
strncpy( tempStr1, ctime( &bintime ), sizeof(tempStr1) );
|
||||
tempStr1[strlen(tempStr1)-1] = '\0';
|
||||
strcpy( tempStr2, ctime( (time_t*)&pMUD->timeEnd ) );
|
||||
bintime = pMUD->timeEnd;
|
||||
strncpy( tempStr1, ctime( &bintime ), sizeof(tempStr1) );
|
||||
tempStr2[strlen(tempStr2)-1] = '\0';
|
||||
printf( " began: %s\n ended: %s\n",
|
||||
tempStr1, tempStr2 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user