svFSIplus
Classes | Functions | Variables
read_msh_ns Namespace Reference

Classes

class  blkType
 

Functions

void calc_elem_ar (ComMod &com_mod, const CmMod &cm_mod, mshType &lM, bool &rflag)
 Calculate element Aspect Ratio of a given mesh. More...
 
void calc_elem_jac (ComMod &com_mod, const CmMod &cm_mod, mshType &lM, bool &rflag)
 Calculate element Jacobian of a given mesh. More...
 
void calc_elem_skew (ComMod &com_mod, const CmMod &cm_mod, mshType &lM, bool &rflag)
 Calculate element Skewness of a given mesh. More...
 
void calc_mesh_props (ComMod &com_mod, const CmMod &cm_mod, const int nMesh, std::vector< mshType > &mesh)
 
void calc_nbc (mshType &mesh, faceType &face)
 Checks that face nodes are valid and creates a list of unique node IDs for the face. More...
 
void check_ien (Simulation *simulation, mshType &mesh)
 Check the mesh connectivity and node ordering. More...
 
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)
 Compute the block ID for the given coordinate. More...
 
void check_line_conn (mshType &mesh)
 Check and reorder line connectivity if needed. More...
 
void check_hex8_conn (mshType &mesh)
 Check and reorder hex connectivity if needed. More...
 
void check_hex20_conn (mshType &mesh)
 Check and reorder hex connectivity if needed. More...
 
void check_hex27_conn (mshType &mesh)
 Check and reorder hex connectivity if needed. More...
 
void check_quad4_conn (mshType &mesh)
 
void check_tet_conn (mshType &mesh)
 Check and reorder tet connectivity if needed. More...
 
void check_tri3_conn (mshType &mesh)
 
void check_tri6_conn (mshType &mesh)
 
void check_wedge_conn (mshType &mesh)
 Check and reorder wedge connectivity if needed. More...
 
void load_var_ini (Simulation *simulation, ComMod &com_mod)
 Read initial field values (pressure, velocity or displacement). More...
 
void match_faces (const ComMod &com_mod, const faceType &lFa, const faceType &pFa, const double ptol, utils::stackType &lPrj)
 
void read_fib_nff (Simulation *simulation, mshType &mesh, const std::string &fName, const std::string &kwrd, const int idx)
 Read fiber direction from a vtu file. More...
 
void read_msh (Simulation *simulation)
 For each mesh defined for the simulation. More...
 
void set_dmn_id_ff (Simulation *simulation, mshType &lM, const std::string &file_name)
 Read domain from a dat file. More...
 
void set_dmn_id_vtk (Simulation *simulation, mshType &mesh, const std::string &file_name, const std::string &kwrd)
 Read mesh domains from a vtu/vtp file. More...
 
void set_projector (Simulation *simulation, utils::stackType &avNds)
 This routines associates two faces with each other and sets gN. More...
 
void load_var_ini (Simulation *simulation, const ComMod &com_mod)
 

Variables

std::map< consts::ElementType, std::function< void(mshType &)> > check_element_conn
 A map of function pointers used to check element connecivity. More...
 

Detailed Description

Copyright (c) Stanford University, The Regents of the University of California, and others.

All Rights Reserved.

See Copyright-SimVascular.txt for additional details.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Function Documentation

◆ calc_elem_ar()

void read_msh_ns::calc_elem_ar ( ComMod com_mod,
const CmMod cm_mod,
mshType lM,
bool &  rflag 
)

Calculate element Aspect Ratio of a given mesh.

◆ calc_elem_jac()

void read_msh_ns::calc_elem_jac ( ComMod com_mod,
const CmMod cm_mod,
mshType lM,
bool &  rflag 
)

Calculate element Jacobian of a given mesh.

◆ calc_elem_skew()

void read_msh_ns::calc_elem_skew ( ComMod com_mod,
const CmMod cm_mod,
mshType lM,
bool &  rflag 
)

Calculate element Skewness of a given mesh.

◆ calc_nbc()

void read_msh_ns::calc_nbc ( mshType mesh,
faceType face 
)

Checks that face nodes are valid and creates a list of unique node IDs for the face.

Valid face nodes 1) Must be < number of nodes in the volume mesh 2) Must match the nodes from its parent volume mesh element

Face data modified face.gN - Face global node Ids face.nNo - Number of nodes

Reproduces 'SUBROUTINE CALCNBC(lM, lFa)'

◆ check_hex20_conn()

void read_msh_ns::check_hex20_conn ( mshType mesh)

Check and reorder hex connectivity if needed.

Todo:
[NOTE] Not implemented.

◆ check_hex27_conn()

void read_msh_ns::check_hex27_conn ( mshType mesh)

Check and reorder hex connectivity if needed.

Todo:
[NOTE] Not implemented.

◆ check_hex8_conn()

void read_msh_ns::check_hex8_conn ( mshType mesh)

Check and reorder hex connectivity if needed.

Todo:
[NOTE] Not implemented.

◆ check_ien()

void read_msh_ns::check_ien ( Simulation simulation,
mshType mesh 
)

Check the mesh connectivity and node ordering.

Replicates the Fortran CHECKIEN subroutine defined in READMSH.f.

◆ check_line_conn()

void read_msh_ns::check_line_conn ( mshType mesh)

Check and reorder line connectivity if needed.

Todo:
[NOTE] Not implemented.

◆ check_quad4_conn()

void read_msh_ns::check_quad4_conn ( mshType mesh)
Todo:
[NOTE] Not implemented.

◆ check_tet_conn()

void read_msh_ns::check_tet_conn ( mshType mesh)

Check and reorder tet connectivity if needed.

◆ check_tri3_conn()

void read_msh_ns::check_tri3_conn ( mshType mesh)
Todo:
[NOTE] Not implemented.

◆ check_tri6_conn()

void read_msh_ns::check_tri6_conn ( mshType mesh)
Todo:
[NOTE] Not implemented.

◆ check_wedge_conn()

void read_msh_ns::check_wedge_conn ( mshType mesh)

Check and reorder wedge connectivity if needed.

◆ find_blk()

int read_msh_ns::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 
)

Compute the block ID for the given coordinate.

◆ load_var_ini()

void read_msh_ns::load_var_ini ( Simulation simulation,
ComMod com_mod 
)

Read initial field values (pressure, velocity or displacement).

Variables that may be changed com_mod.Pinit - com_mod.Vinit - com_mod.Dinit -

Reproduces Fortran 'LOADVARINI'.

◆ read_fib_nff()

void read_msh_ns::read_fib_nff ( Simulation simulation,
mshType mesh,
const std::string &  fName,
const std::string &  kwrd,
const int  idx 
)

Read fiber direction from a vtu file.

The fiber orientations data is copied into mesh.fN.

Reproduces Fortran READFIBNFF.

◆ read_msh()

void read_msh_ns::read_msh ( Simulation simulation)

For each mesh defined for the simulation.

1) Set mesh parameters

2) Read mesh nodal coordiantes and element connectivity

◆ set_dmn_id_ff()

void read_msh_ns::set_dmn_id_ff ( Simulation simulation,
mshType lM,
const std::string &  file_name 
)

Read domain from a dat file.

Reproduces the Fortran 'SETDMNIDFF' subroutine.

◆ set_dmn_id_vtk()

void read_msh_ns::set_dmn_id_vtk ( Simulation simulation,
mshType mesh,
const std::string &  file_name,
const std::string &  kwrd 
)

Read mesh domains from a vtu/vtp file.

Todo:
[NOTE] Not implemented.

◆ set_projector()

void read_msh_ns::set_projector ( Simulation simulation,
utils::stackType avNds 
)

This routines associates two faces with each other and sets gN.

Data set

mesh.gpN = Vector<int>(gnNo);
com_mod.msh[].gpN = Vector<int>(gnNo);
com_mod.gtnNo
com_mod.msh[].gN[]
Definition: mesh.cpp:52

Variable Documentation

◆ check_element_conn

std::map<consts::ElementType, std::function<void(mshType&)> > read_msh_ns::check_element_conn
Initial value:
= {
{consts::ElementType::LIN1, check_line_conn},
{consts::ElementType::HEX8, check_hex8_conn},
{consts::ElementType::HEX20, check_hex20_conn},
{consts::ElementType::HEX27, check_hex27_conn},
{consts::ElementType::QUD4, check_quad4_conn},
{consts::ElementType::QUD9, check_quad4_conn},
{consts::ElementType::TET4, check_tet_conn},
{consts::ElementType::TRI3, check_tri3_conn},
{consts::ElementType::TRI6, check_tri6_conn},
{consts::ElementType::TET10, check_tet_conn},
{consts::ElementType::WDG, check_wedge_conn}
}
void check_tet_conn(mshType &mesh)
Check and reorder tet connectivity if needed.
Definition: read_msh.cpp:680
void check_tri3_conn(mshType &mesh)
Definition: read_msh.cpp:732
void check_line_conn(mshType &mesh)
Check and reorder line connectivity if needed.
Definition: read_msh.cpp:644
void check_quad4_conn(mshType &mesh)
Definition: read_msh.cpp:674
void check_wedge_conn(mshType &mesh)
Check and reorder wedge connectivity if needed.
Definition: read_msh.cpp:744
void check_tri6_conn(mshType &mesh)
Definition: read_msh.cpp:738
void check_hex20_conn(mshType &mesh)
Check and reorder hex connectivity if needed.
Definition: read_msh.cpp:660
void check_hex8_conn(mshType &mesh)
Check and reorder hex connectivity if needed.
Definition: read_msh.cpp:652
void check_hex27_conn(mshType &mesh)
Check and reorder hex connectivity if needed.
Definition: read_msh.cpp:668

A map of function pointers used to check element connecivity.

Reproduces 'SUBROUTINE CHECKIEN(lM)' defined in READMSH.f.