Commit f83de833 authored by DeAn Wei's avatar DeAn Wei
Browse files

use different functions in HPC.

parent ae21fe5d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@
#include <iostream>
#include <fstream>
#include <math.h>
#include <sstream>

#include <stdlib.h>
#include <algorithm>
+6 −5
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
#include "Home.h"
#include "Util.h"
#include "ProDataIO.h"
#include "DDD.h"

using namespace std;

@@ -41,7 +42,7 @@ void HandleExtendedDislocation(InArgs_t *inArgs)
    list.variables.push_back("Rd");

    if((index = GetValID(inArgs->priVars, cubelName)) < inArgs->priVars.size()){
        cubel = stof(inArgs->priVars[index].vals[0]);
        cubel = atof(inArgs->priVars[index].vals[0].c_str());
    }
    printf("The cubel size is %f\n", cubel);
    
@@ -55,14 +56,14 @@ void HandleExtendedDislocation(InArgs_t *inArgs)

    if((index = GetValID(inArgs->priVars, burgIDName)) < inArgs->priVars.size()){
        if(inArgs->priVars[index].vals.size() == 2){
            burgID1 = stoi(inArgs->priVars[index].vals[0]);
            burgID2 = stoi(inArgs->priVars[index].vals[1]);
            burgID1 = atoi(inArgs->priVars[index].vals[0].c_str());
            burgID2 = atoi(inArgs->priVars[index].vals[1].c_str());
        }
    }
    printf("The burgID of two partials are %2.0f %2.0f\n", burgID1, burgID2);

    if((index = GetValID(inArgs->priVars, remeshSizeName)) < inArgs->priVars.size()){
        remeshSize = stof(inArgs->priVars[index].vals[0]);
        remeshSize = atof(inArgs->priVars[index].vals[0].c_str());
    }
    printf("The remesh size is %f\n", remeshSize);

@@ -144,7 +145,7 @@ void HandleExtendedDislocation(InArgs_t *inArgs)
    }

    swap(list.data, data);
    fileName = inArgs->outFiles[0] + "." + to_string(separation);
    fileName = inArgs->outFiles[0];
    WriteTecplotNormalData(list, fileName, 10);

    return;
+6 −3
Original line number Diff line number Diff line

#include <sstream>
#include "Home.h"
#include "Util.h"

#include "ProDataIO.h"
#include "Parse.h"
#include "Math.h"

using namespace std;

void AverageLines(InArgs_t *inArgs)
{
@@ -21,7 +24,7 @@ void AverageLines(InArgs_t *inArgs)
    vector<string>      s1, s2;

    if((index = GetValID(inArgs->priVars, rsizeName)) < inArgs->priVars.size()){
        rsize = stof(inArgs->priVars[index].vals[0]);
        rsize = atof(inArgs->priVars[index].vals[0].c_str());
    }
    printf("The remesh size (rsize) is %f\n", rsize);

@@ -35,7 +38,7 @@ void AverageLines(InArgs_t *inArgs)
    printf("The variables (vars) are %s %s\n", xName.c_str(), yName.c_str());

    if((index = GetValID(inArgs->priVars, recordName)) < inArgs->priVars.size()){
        record = stoi(inArgs->priVars[index].vals[0]);
        record = atoi(inArgs->priVars[index].vals[0].c_str());
    }
    printf("The Record (record) state is %d\n", record);

+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ void WriteTecplotNormalData(const LineList_t &list, const string &file, double p
        fn += ".plt";
    }

    out.open(fn, ios::out);
    out.open(fn.c_str(), ios::out);

    out << "variables = "; 
    for(i=0; i<list.variables.size(); i++){