svFSIplus
read_msh.h
1 /* Copyright (c) Stanford University, The Regents of the University of California, and others.
2  *
3  * All Rights Reserved.
4  *
5  * See Copyright-SimVascular.txt for additional details.
6  *
7  * Permission is hereby granted, free of charge, to any person obtaining
8  * a copy of this software and associated documentation files (the
9  * "Software"), to deal in the Software without restriction, including
10  * without limitation the rights to use, copy, modify, merge, publish,
11  * distribute, sublicense, and/or sell copies of the Software, and to
12  * permit persons to whom the Software is furnished to do so, subject
13  * to the following conditions:
14  *
15  * The above copyright notice and this permission notice shall be included
16  * in all copies or substantial portions of the Software.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
19  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
22  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 #ifndef READ_MSH_H
32 #define READ_MSH_H
33 
34 #include "ComMod.h"
35 #include "Simulation.h"
36 #include "Vector.h"
37 
38 #include "utils.h"
39 
40 #include <string>
41 
42 namespace read_msh_ns {
43 
44  class blkType
45  {
46  public:
47  int n = 0;
48  Vector<int> gN;
49  };
50 
51  void calc_elem_ar(ComMod& com_mod, const CmMod& cm_mod, mshType& lM, bool& rflag);
52  void calc_elem_jac(ComMod& com_mod, const CmMod& cm_mod, mshType& lM, bool& rflag);
53  void calc_elem_skew(ComMod& com_mod, const CmMod& cm_mod, mshType& lM, bool& rflag);
54 
55  void calc_mesh_props(ComMod& com_mod, const CmMod& cm_mod, const int nMesh, std::vector<mshType>& mesh);
56 
57  void calc_nbc(mshType& mesh, faceType& face);
58 
59  void check_ien(Simulation* simulation, mshType& mesh);
60  void check_line_conn(mshType& mesh);
61  void check_hex8_conn(mshType& mesh);
62  void check_hex20_conn(mshType& mesh);
63  void check_hex27_conn(mshType& mesh);
64  void check_quad4_conn(mshType& mesh);
65  void check_tet_conn(mshType& mesh);
66  void check_tri3_conn(mshType& mesh);
67  void check_tri6_conn(mshType& mesh);
68  void check_wedge_conn(mshType& mesh);
69 
70  int find_blk(const int nsd, const int nBkd, const std::vector<bool>& nFlt, const Vector<double>&xMin, const Vector<double>&dx, const Vector<double>& x);
71 
72  void load_var_ini(Simulation* simulation, const ComMod& com_mod);
73 
74  void match_faces(const ComMod& com_mod, const faceType& face1, const faceType& face2, const double tol, utils::stackType& lPrj);
75 
76  void read_fib_nff(Simulation* simulation, mshType& mesh, const std::string& fName, const std::string& kwrd, const int idx);
77  void read_msh(Simulation* simulation);
78 
79  void set_dmn_id_ff(Simulation* simulation, mshType& mesh, const std::string& file_name);
80  void set_dmn_id_vtk(Simulation* simulation, mshType& mesh, const std::string& file_name, const std::string& kwrd);
81  void set_projector(Simulation* simulation, utils::stackType& avNds);
82 
83 
84 };
85 
86 #endif
87 
The CmMod class duplicates the data structures in the Fortran CMMOD module defined in COMU....
Definition: CmMod.h:62
The ComMod class duplicates the data structures in the Fortran COMMOD module defined in MOD....
Definition: ComMod.h:1332
Definition: Simulation.h:41
The face type containing mesh at boundary.
Definition: ComMod.h:521
This is the container for a mesh or NURBS patch, those specific to NURBS are noted.
Definition: ComMod.h:810
Definition: read_msh.h:45
Definition: utils.h:39