39 #define fei_file "cube_main.cpp" 
   48   std::vector<std::string> stdstrings;
 
   53   const char** params = NULL;
 
   61   std::string solverName;
 
   62   std::string datasource;
 
   76     fei::console_out() << 
"Failed to find one or more required parameters in input-file." 
   86   if (datasource == 
"HexBeam") {
 
   87     hexcubeptr = 
new HexBeam(W, D, DofPerNode,
 
   91     hexcubeptr = 
new HexBeamCR(W, D, DofPerNode,
 
   98     int numCRs = (W+1)*(W+1)*(numProcs*2)-1;
 
  101     FEI_COUT << 
"========================================================"  
  103     FEI_COUT << 
"Size W: " << W << 
" (num-elements-along-side-of-cube)"<<
FEI_ENDL;
 
  104     FEI_COUT << 
"Size D: " << D << 
" (num-elements-along-depth-of-cube)"<<
FEI_ENDL;
 
  111     FEI_COUT << 
"========================================================"  
  123   if (whichFEI == 
"OLDFEI") {
 
  127     catch (std::runtime_error& exc) {
 
  133   else if (whichFEI == 
"fei::FEI_Impl") {
 
  137     catch (std::runtime_error& exc) {
 
  172   if (localProc == 0) {
 
  197   if (localProc == 0) {
 
  201     FEI_COUT << 
"Total assembly time:    " << fei_init_time + fei_load_time << 
FEI_ENDL;
 
  213   err = fei->
solve(status);
 
  216     if (localProc==0) 
FEI_COUT << 
"solve returned status: " << status << 
FEI_ENDL;
 
  221   if (localProc == 0) {
 
  226   if (localProc == 0) {
 
  227 #if defined(FEI_PLATFORM) && defined(FEI_OPT_LEVEL) 
  228     double benchmark = fei_init_time;
 
  231     testname_init << 
"cube_"<<whichFEI<<
"_init_"<<W<<
"_"<<D<<
"_"<<DofPerNode<<
"_" 
  232       <<solverName<<
"_np"<<numProcs<<
"_" 
  233       <<FEI_PLATFORM<<
"_"<<FEI_OPT_LEVEL;
 
  236     testname_load << 
"cube_"<<whichFEI<<
"_load_"<<W<<
"_"<<D<<
"_"<<DofPerNode<<
"_" 
  237       <<solverName<<
"_np"<<numProcs<<
"_" 
  238       <<FEI_PLATFORM<<
"_"<<FEI_OPT_LEVEL;
 
  240     double file_init, file_load;
 
  241     bool file_benchmarks_available = 
true;
 
  244                 testname_init.str().c_str());
 
  246                 testname_load.str().c_str());
 
  248     catch (std::runtime_error& exc) {
 
  249       file_benchmarks_available = 
false;
 
  252     if (file_benchmarks_available) {
 
  254       bool init_test_passed =
 
  258       benchmark = fei_load_time;
 
  259       bool load_test_passed =
 
  263       returnValue = init_test_passed&&load_test_passed ? 0 : 1;
 
  268   bool testPassed = returnValue==0;
 
  269   if (testPassed && localProc == 0) {
 
int load_constraints(FEI *fei, HexBeam &hexcube, int firstLocalCRID)
void strings_to_char_ptrs(std::vector< std::string > &stdstrings, int &numStrings, const char **&charPtrs)
virtual int parameters(int numParams, const char *const *paramStrings)=0
virtual int initComplete()=0
fei::SharedPtr< fei::Factory > create_fei_Factory(MPI_Comm comm, const char *libraryName)
virtual int solve(int &status)=0
#define FEI_Implementation
int beam_oldfei_main(int argc, char **argv, MPI_Comm comm, int numProcs, int localProc)
int init_constraints(FEI *fei, HexBeam &hexcube, int &firstLocalCRID)
int init_elem_connectivities(FEI *fei, HexBeam &hexcube)
#define FEI_SINGLE_SYSTEM
int load_elem_data(FEI *fei, HexBeam &hexcube)
int getStringParamValue(const char *name, std::string ¶mValue) const 
double get_file_benchmark(const char *filename, const char *testname)
int get_filename_and_read_input(int argc, char **argv, MPI_Comm comm, int localProc, std::vector< std::string > &stdstrings)
virtual int numDofPerNode()
virtual int initFields(int numFields, const int *fieldSizes, const int *fieldIDs, const int *fieldTypes=NULL)=0
int init_shared_nodes(FEI *fei, HexBeam &hexcube)
virtual int setSolveType(int solveType)=0
std::ostream & console_out()
void parse_strings(std::vector< std::string > &stdstrings, const char *separator_string, fei::ParameterSet ¶mset)
virtual int loadComplete(bool applyBCs=true, bool globalAssemble=true)=0
int localProc(MPI_Comm comm)
virtual fei::SharedPtr< FEI > createFEI(fei::SharedPtr< LibraryWrapper > wrapper, MPI_Comm comm)
#define FEI_OSTRINGSTREAM
fei::SharedPtr< LibraryWrapper > create_LibraryWrapper(MPI_Comm comm, const char *libraryName)
int numProcs(MPI_Comm comm)
int getIntParamValue(const char *name, int ¶mValue) const 
bool check_and_cout_test_result(std::string testname, double value, double file_value, unsigned margin)