Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TRAIL.H
Go to the documentation of this file.
1 /* *******************************************************************
2  * Rocstar Simulation Suite *
3  * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4  * *
5  * Illinois Rocstar LLC *
6  * Champaign, IL *
7  * www.illinoisrocstar.com *
8  * sales@illinoisrocstar.com *
9  * *
10  * License: See LICENSE file in top level of distribution package or *
11  * http://opensource.org/licenses/NCSA *
12  *********************************************************************/
13 /* *******************************************************************
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17  * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21  * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22  *********************************************************************/
23 #ifndef _TRAIL_H_
24 #define _TRAIL_H_
25 #include "PMesh.H"
26 #include "BSMesh.H"
27 #include "GEM.H"
28 #include <algorithm>
29 #include "roccom.h"
30 
31 int TRAIL_FD2FE_WinCreate(const std::string &wname,const std::string &outwname,std::ostream *ouf=NULL);
32 int TRAIL_FD2FE_WinCreate2(const std::string &wname,const std::string &outwname,std::ostream *ouf=NULL);
33 int TRAIL_FD2FE_Transfer(const std::string &,const std::string &,const std::string &,std::ostream *ouf=NULL);
34 int TRAIL_FE2FD_Transfer(const std::string &fewin,const std::string &fdwin,
35  const std::string &attlist,MPI_Comm communicator,std::ostream *ouf=NULL);
36 int TRAIL_SurfaceMesh2Window(const std::string &wname,int pane_id,Mesh::NodalCoordinates &,Mesh::Connectivity &);
37 
38 void TRAIL_AutoSurfer(const std::string &src, const std::string &trg,
39  const std::string &srcpath=".",
40  const std::string &trgpath=".",
41  const std::string &destpath=".", double t=0,
42  MPI_Comm comm=MPI_COMM_NULL,
43  std::ostream * = NULL);
44 void
45 TRAIL_CreateRobustFC(const std::string &wname,const std::string &path);
46 
47 void TRAIL_MergeRocinFiles(const std::string &srcname,
48  const std::string &trgname,
49  const std::string &path="./",
50  double t=0,unsigned int np=1,
51  std::ostream * = NULL);
52 
53 
54 void TRAIL_HDF2Window( const std::string &fname, const std::string &wname,int verb=0);
55 void TRAIL_GetRocstarDumpStrings(const std::string &filename,std::string &wname,
56  std::string &timestring,std::string &rankstring);
57 
58 
59 void
60 TRAIL_File2Window( const std::string &fname,
61  const std::string &wname,
62  std::vector<int> &bcflags,
63  MPI_Comm comm=MPI_COMM_NULL,
64  bool apply_disp=false,
65  bool all=false,
66  bool with_ghost=false);
67 bool
68 TRAIL_WriteWindow(const std::string &wname,const std::string &path,
69  const std::string &twin,const std::string &tpath,
70  double t,unsigned int id,MPI_Comm comm,std::ostream * = NULL);
71 
72 void
73 TRAIL_WriteRocinControl(std::vector<int> &pane_id,const std::string &pre,
74  int rank);
75 std::string TRAIL_TimeString( double t);
76 double TRAIL_TimeString( const std::string &);
77 
78 //std::string TRAIL_CWD();
79 
80 bool TRAIL_TransferSurfDataFILE(const std::string &src,
81  const std::string &trg,
82  const std::string &dest,
83  const std::string &srcpath,
84  const std::string &trgpath,
85  const std::string &destpath,
86  const std::string &crpath,
87  double t,unsigned int id,
88  MPI_Comm comm,
89  std::ostream * = NULL);
90 
91 //std::string TRAIL_ResolveLink(const std::string &path);
92 void TRAIL_Debug(GEM_Partition &gp);
93 // class TRAIL_Directory : public std::vector<std::string>
94 // {
95 // protected:
96 // std::string _path;
97 // bool _good;
98 // DIR *_dir;
99 // public:
100 // TRAIL_Directory(const std::string &s = "");
101 // ~TRAIL_Directory();
102 // int open(const std::string &s = "");
103 // void close();
104 // operator void* ();
105 // bool operator ! ();
106 // };
107 
108 void TRAIL_RocmopSmooth(GEM_Partition &gp, unsigned int niter);
109 void
110 TRAIL_RocpropSmoothSurf(double *nc,unsigned int nnodes,
111  unsigned int *ec,unsigned int nel,
112  unsigned int *cnstr_type,
113  unsigned int niter);
114 
116 public:
117  std::string name;
118  char loc;
119  std::string unit;
120  unsigned int ncomp;
121 };
122 
123 int TRAIL_UnstructuredMesh2Pane( const std::string &wname,int pane_id,
126  std::vector<std::vector<double> > &soln_data,
127  int verblevel );
128 
129 void
130 TRAIL_GetWindowSolnMetaData(const std::string &wname,std::vector<SolnMetaData> &smdv,int verblevel=0);
131 void TRAIL_GetWindowSolnData(const std::string &wname,std::vector<std::vector<std::vector<double> > > &soln_data,
132  std::vector<SolnMetaData> &smdv,int verblevel = 0);
133 void TRAIL_Window2UnstructuredMesh(const std::string &wname,std::vector<Mesh::UnstructuredMesh> &meshes,
134  std::vector<SolnMetaData> &smdv,
135  std::vector<std::vector<std::vector<double> > > &soln_data,
136  int verb=0,bool no_ghost=false);
137 #endif
138 
139 
std::vector< Mesh::UnstructuredMesh > meshes
The list of grids to write.
Definition: hdf2pltV2.C:61
void TRAIL_RocmopSmooth(GEM_Partition &gp, unsigned int niter)
Definition: TRAIL.C:2992
void TRAIL_GetWindowSolnMetaData(const std::string &wname, std::vector< SolnMetaData > &smdv, int verblevel=0)
Definition: TRAIL.C:2260
General connectivity object.
Definition: Mesh.H:334
void TRAIL_HDF2Window(const std::string &fname, const std::string &wname, int verb=0)
Definition: TRAIL.C:2229
int TRAIL_FE2FD_Transfer(const std::string &fewin, const std::string &fdwin, const std::string &attlist, MPI_Comm communicator, std::ostream *ouf=NULL)
Definition: TRAIL.C:974
std::string unit
Definition: TRAIL.H:119
int TRAIL_FD2FE_Transfer(const std::string &, const std::string &, const std::string &, std::ostream *ouf=NULL)
Definition: TRAIL.C:1183
bool TRAIL_TransferSurfDataFILE(const std::string &src, const std::string &trg, const std::string &dest, const std::string &srcpath, const std::string &trgpath, const std::string &destpath, const std::string &crpath, double t, unsigned int id, MPI_Comm comm, std::ostream *=NULL)
Definition: TRAIL.C:2620
This file contains the prototypes for Roccom API.
void TRAIL_CreateRobustFC(const std::string &wname, const std::string &path)
Definition: TRAIL.C:2515
Parallel Mesh Stuff.
void TRAIL_AutoSurfer(const std::string &src, const std::string &trg, const std::string &srcpath=".", const std::string &trgpath=".", const std::string &destpath=".", double t=0, MPI_Comm comm=MPI_COMM_NULL, std::ostream *=NULL)
Definition: TRAIL.C:2544
bool TRAIL_WriteWindow(const std::string &wname, const std::string &path, const std::string &twin, const std::string &tpath, double t, unsigned int id, MPI_Comm comm, std::ostream *=NULL)
Definition: TRAIL.C:2811
void TRAIL_RocpropSmoothSurf(double *nc, unsigned int nnodes, unsigned int *ec, unsigned int nel, unsigned int *cnstr_type, unsigned int niter)
Definition: TRAIL.C:3057
std::vector< SolnMetaData > smdv
The solution Metadata.
Definition: hdf2pltV2.C:63
int TRAIL_FD2FE_WinCreate(const std::string &wname, const std::string &outwname, std::ostream *ouf=NULL)
Adds ghost zones for block structured meshes to close gaps in the interface surface mesh...
Definition: TRAIL.C:565
Block Structured Mesh stuff.
void TRAIL_Window2UnstructuredMesh(const std::string &wname, std::vector< Mesh::UnstructuredMesh > &meshes, std::vector< SolnMetaData > &smdv, std::vector< std::vector< std::vector< double > > > &soln_data, int verb=0, bool no_ghost=false)
Definition: TRAIL.C:2010
std::string TRAIL_TimeString(double t)
Definition: TRAIL.C:85
void TRAIL_GetRocstarDumpStrings(const std::string &filename, std::string &wname, std::string &timestring, std::string &rankstring)
Definition: TRAIL.C:112
char loc
Definition: TRAIL.H:118
int TRAIL_UnstructuredMesh2Pane(const std::string &wname, int pane_id, Mesh::UnstructuredMesh &mesh, SolnMetaData &smdv, std::vector< std::vector< double > > &soln_data, int verblevel)
Creates a window from a Mesh object. (copies data)
Definition: TRAIL.C:473
int TRAIL_SurfaceMesh2Window(const std::string &wname, int pane_id, Mesh::NodalCoordinates &, Mesh::Connectivity &)
Creates a window from a Mesh object. (copies data)
Definition: TRAIL.C:414
void TRAIL_File2Window(const std::string &fname, const std::string &wname, std::vector< int > &bcflags, MPI_Comm comm=MPI_COMM_NULL, bool apply_disp=false, bool all=false, bool with_ghost=false)
Definition: TRAIL.C:2391
unsigned int ncomp
Definition: TRAIL.H:120
std::string name
Definition: TRAIL.H:117
void TRAIL_MergeRocinFiles(const std::string &srcname, const std::string &trgname, const std::string &path="./", double t=0, unsigned int np=1, std::ostream *=NULL)
Definition: TRAIL.C:2476
void TRAIL_Debug(GEM_Partition &gp)
Definition: TRAIL.C:60
static int rank
Definition: advectest.C:66
void TRAIL_WriteRocinControl(std::vector< int > &pane_id, const std::string &pre, int rank)
Definition: TRAIL.C:2793
int TRAIL_FD2FE_WinCreate2(const std::string &wname, const std::string &outwname, std::ostream *ouf=NULL)
Takes as input a block structured FD grid.
Definition: TRAIL.C:1652
void TRAIL_GetWindowSolnData(const std::string &wname, std::vector< std::vector< std::vector< double > > > &soln_data, std::vector< SolnMetaData > &smdv, int verblevel=0)
Definition: TRAIL.C:2305