git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13904 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2015-08-19 14:56:21 +00:00
parent 2f55b6da36
commit 1c3e0dbfe9
17 changed files with 28 additions and 26 deletions

View File

@ -9,7 +9,7 @@
#define STRING2(x) #x
#define STRING(x) STRING2(x)
// prints file and line number for error messages
#define ERROR(x) __FILE__":"STRING(__LINE__)" "x
#define ERROR(x) __FILE__ ":" STRING(__LINE__) " " x
//#define FILELINE __FILE__+to_string(__LINE__)
#define FILELINE __FILE__

View File

@ -310,7 +310,7 @@ namespace ATC
default:
throw ATC_Error("field not found in field_to_string");
}
};
}
/** string to field enum */
inline FieldName string_to_field(const std::string & name)
@ -395,7 +395,7 @@ namespace ATC
return QUADRUPOLE_MOMENT;
else
throw ATC_Error(name + " is not a valid field");
};
}
inline bool is_intrinsic(const FieldName & field_enum)
{
@ -410,7 +410,7 @@ namespace ATC
|| field_enum==REFERENCE_POTENTIAL_ENERGY
) return true;
else return false;
};
}
inline std::string field_to_intrinsic_name(const FieldName index)
{
@ -457,7 +457,7 @@ namespace ATC
}
return true;
};
}
/** solver types */
enum SolverType { DIRECT=0, ITERATIVE};
@ -577,7 +577,7 @@ namespace ATC
else if (dir == 'z') index = 2;
else return false;
return true;
};
}
/** string to index */
inline std::string index_to_string(const int &index)
@ -586,7 +586,7 @@ namespace ATC
else if (index==1) return "y";
else if (index==2) return "z";
return "unknown";
};
}
/** string to index */
inline bool string_to_index(const std::string &dim, int &index)
@ -601,7 +601,7 @@ namespace ATC
return false;
return true;
};
}
inline std::string print_mask(const Array2D<bool> & rhsMask)
{

View File

@ -321,6 +321,6 @@ namespace ATC {
};
};
}
#endif

View File

@ -307,5 +307,5 @@ namespace ATC {
};
};
}
#endif

View File

@ -352,6 +352,6 @@ namespace ATC {
};
}; // namespace ATC
} // namespace ATC
#endif // FE_ELEMENT_H

View File

@ -707,6 +707,6 @@ namespace ATC {
};
}; // namespace ATC_Transfer
} // namespace ATC_Transfer
#endif // FE_MESH_H

View File

@ -78,7 +78,7 @@ struct TRIPLET { TRIPLET<T>(int _i=0, int _j=0, T _v=T(0)) : i(_i), j(_j), v(_v)
#define STRING2(x) #x
#define STRING(x) STRING2(x)
// prints file and line number for error messages
#define ERROR(x) __FILE__":"STRING(__LINE__)" "x
#define ERROR(x) __FILE__ ":" STRING(__LINE__) " " x
/******************************************************************************
* BLAS and LAPACK definitions
@ -106,7 +106,7 @@ extern double dlange_(char*,int*,int*,const double*,int*,double*);
extern double dsygvd_(int*,char*,char*,int*,double*,int*,double*,int*,double*,double*,int*,int*,int*,int*);
extern double dgesvd_(char*,char*,int*,int*,double*,int*,double*,double*,int*,double*,int*,double*,int*,int*);
extern double dgesdd_(char*,char*,int*,int*,double*,int*,double*,double*,int*,double*,int*,double*,int*,int*);
};
}
#endif
// forward declarations of matrix and vector classes

View File

@ -46,6 +46,6 @@ namespace ATC {
ATC_matrix::Array<std::pair<std::string,std::set<int> > > * nodeSets_;
};
}; // end namespace ATC
} // end namespace ATC
#endif

View File

@ -60,6 +60,6 @@ namespace ATC {
};
};
}
#endif

View File

@ -272,6 +272,8 @@ BondMatrixKernel::BondMatrixKernel(LammpsInterface * lammpsInterface,
BondMatrix(lammpsInterface,pairMap,x,feMesh),
kernelFunction_(kernelFunction)
{
if (kernelFunction_ == NULL)
throw ATC_Error("No AtC kernel function initialized");
};
void BondMatrixKernel::reset(void) const
{

View File

@ -317,5 +317,5 @@ namespace ATC
SPAR_MAT stiffness_;
};
};
}
#endif

View File

@ -764,6 +764,6 @@ namespace ATC {
};
}
#endif

View File

@ -104,5 +104,5 @@ class WeakEquation {
};
};
}
#endif

View File

@ -208,7 +208,7 @@ public:
virtual void log_text(int level, const char *messtype, const char *messtext){
if(descriptor!="") // descriptor is used as header
printf("%s:\n",descriptor.c_str());
if(messtype!="")
if(string(messtype)!=string(""))
printf("%s: ",messtype);
printf("%s\n",messtext);
}

View File

@ -317,7 +317,6 @@ public:
virtual int init(size_t n, int smanaged=-1){
size=n;
return recmatrix<T>::init(n,n,smanaged);
int managed=recmatrix<T>::parr.managed();
}
sqmatrix(size_t n):size(0){

View File

@ -152,20 +152,20 @@ struct Vector_Nt {
Vector_Nt(const A *beg) {
for (int i=0; i<N; i++, ++beg)
v[i]=*beg;
};
}
//e construct from another vector
template <class A>
Vector_Nt(const Vector_Nt<A,N>& v1) {
for (int i=0; i<N; i++) v[i]=v1[i];
};
}
//r Êîïèðóåò ñîäåðæèìîå âåêòîðà â it
template <class A>
void copy_to(A *beg) const {
for (int i=0; i<N; i++, ++beg)
*beg=v[i];
};
}
//r ïîëó÷åíèå ýëåìåíòà
inline T& operator[](int i) const { return (T&)v[i]; };
@ -568,11 +568,11 @@ Vector_3 Reflect(Vector_3& ini, double t,Vector_3 &dir, double *box, int flag=0x
inline vec_type vec_area(const Vector_2 &vect1, const Vector_2 &vect2) {
return fabs(vect1[0]*vect2[1]-vect1[1]*vect2[0])/2;
};
}
inline vec_type vec_area(const Vector_3 &vect1, const Vector_3 &vect2) {
return (vect1%vect2).norm()/2;
};
}
// remake for vec_type!

View File

@ -89,6 +89,7 @@ public:
public:
AWPMD_split():s_add(0),spl_add(0){}
virtual ~AWPMD_split() {};
///\en Prepares to setup a new system of particles using \ref add_ion(),