replace tabs and remove trailing whitespace in lib folder with updated script

This commit is contained in:
Axel Kohlmeyer
2021-08-22 20:45:24 -04:00
parent 30821b37e5
commit 92b5b159e5
311 changed files with 9176 additions and 9176 deletions

View File

@ -2,8 +2,8 @@
#include "LammpsInterface.h"
#include "Utility.h"
#ifdef HAS_EXODUS
//#include <stdio.h>
//#include "netcdf.h"
//#include <stdio.h>
//#include "netcdf.h"
#include "exodusII.h"
#endif
@ -18,8 +18,8 @@ using std::string;
namespace ATC {
/** constructor, takes a filename */
MeshReader::MeshReader(string filename,
Array<bool> periodicity,
MeshReader::MeshReader(string filename,
Array<bool> periodicity,
double /* tol */)
: meshfile_(filename),
periodicity_(periodicity),
@ -36,7 +36,7 @@ namespace ATC {
}
string ext = filename.substr(idx+1);
if (ext == "mesh"){ read_mesh_file(); }
else { throw ATC_Error("mesh file is of unknown type."); }
}
@ -66,7 +66,7 @@ namespace ATC {
for (unsigned int i=0; i < str.size(); i++) {
if (isdigit(str[i])) {
for (unsigned int a=i; a<str.size(); a++) {
temp += str[a];
temp += str[a];
}
break;
}
@ -151,28 +151,28 @@ namespace ATC {
/** reads .exo format file */
void MeshReader::read_exo_file() {
#ifndef HAS_EXODUS
throw ATC_Error("Reading ExodusII .exo files not supported.");
throw ATC_Error("Reading ExodusII .exo files not supported.");
#else
int CPU_word_size=0,IO_word_size=0;
float version;
int exoid = ex_open (meshfile_.c_str(), EX_READ,
int exoid = ex_open (meshfile_.c_str(), EX_READ,
&CPU_word_size, &IO_word_size, &version);
if (exoid < 0) { throw ATC_Error("couldn't open "+meshfile_); }
int nsd,nelemblk,nfsets;
char title[MAX_LINE_LENGTH+1];
int error = ex_get_init (exoid, title,
int error = ex_get_init (exoid, title,
&nsd, &nNodes_, &nElements_, &nelemblk, &nNodeSets_, &nfsets);
if (error > 0) { throw ATC_Error("problem with init "+meshfile_+" "+title); }
// coordinates
// coordinates
float x[nNodes_], y[nNodes_], z[nNodes_];
error = ex_get_coord (exoid, x, y, z);
if (error > 0) { throw ATC_Error("problem with getting coordinates "+meshfile_); }
nodeCoords_->reset(nsd,nNodes_);
DENS_MAT & nodes = *nodeCoords_;
for (int i = 0; i < nNodes_; ++i) {
nodes(0,i) = x[i]; // this is a float to double conversion
nodes(1,i) = y[i]; // this is a float to double conversion
nodes(2,i) = z[i]; // this is a float to double conversion
nodes(0,i) = x[i]; // this is a float to double conversion
nodes(1,i) = y[i]; // this is a float to double conversion
nodes(2,i) = z[i]; // this is a float to double conversion
}
ATC::LammpsInterface::instance()->print_msg_once("read "+to_string(nNodes_)+
" nodes");
@ -181,7 +181,7 @@ namespace ATC {
error = ex_get_elem_blk_ids(exoid, blkIds);
char etype[MAX_STR_LENGTH+1];
string lastType;
for (int i=0; i<nelemblk; i++){
for (int i=0; i<nelemblk; i++){
error = ex_get_elem_block (exoid, blkIds[i], etype,
&(nblkelem[i]), &(nnpe[i]), &(na[i]));
elementType_ = etype;
@ -192,11 +192,11 @@ namespace ATC {
int nVerts = number_of_vertices(elementType_);
conn_->reset(nVerts, nElements_);
int n = 0;
for (int i=0; i<nelemblk; i++) {
for (int i=0; i<nelemblk; i++) {
int bconn[nnpe[i]*nblkelem[i]];
error = ex_get_elem_conn (exoid, blkIds[i], &bconn);
for (int j=0; j<nblkelem[i]; j++) {
for (int k=0; k<nnpe[i]; k++) {
error = ex_get_elem_conn (exoid, blkIds[i], &bconn);
for (int j=0; j<nblkelem[i]; j++) {
for (int k=0; k<nnpe[i]; k++) {
(*conn_)(k,n) = bconn[k+j*nnpe[i]]-1;
}
n++;
@ -209,12 +209,12 @@ namespace ATC {
int nnodes,ndist;
//nodeSets_ = new Array< pair< string,set<int> > >();
nodeSets_->reset(nNodeSets_);
for (int i=0; i<nNodeSets_; i++) {
for (int i=0; i<nNodeSets_; i++) {
(*nodeSets_)(i).first = to_string(nsetIds[i]);
error = ex_get_node_set_param (exoid, nsetIds[i], &nnodes, &ndist);
int nodes[nnodes];
error = ex_get_node_set (exoid, nsetIds[i], nodes);
for (int j=0; j<nnodes; j++) {
for (int j=0; j<nnodes; j++) {
(*nodeSets_)(i).second.insert(nodes[j]-1);
}
}