svMultiPhysics
Loading...
Searching...
No Matches
all_fun.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 ALL_FUN_H
32#define ALL_FUN_H
33
34#include "Array3.h"
35#include "Array.h"
36#include "Vector.h"
37#include "ComMod.h"
38
39#include "consts.h"
40
41#include <optional>
42#include <string>
43
44namespace all_fun {
45
46 double aspect_ratio(ComMod& com_mod, const int nDim, const int eNoN, const Array<double>& x);
47
48 void commu(const ComMod& com_mod, Vector<double>& u);
49 void commu(const ComMod& com_mod, Array<double>& u);
50
51 int domain(const ComMod& com_mod, const mshType& lM, const int iEq, const int e);
52
53 void find_face(const std::vector<mshType>& mesh_list, const std::string& faceName, int& iM, int& iFa);
54
55 void find_msh(const std::vector<mshType>& mesh_list, const std::string& mesh_name, int& iM);
56
57 Array<double> global(const ComMod& com_mod, const CmMod& cm_mod, const mshType& lM, const Array<double>& U);
58
59 double integ(const ComMod& com_mod, const CmMod& cm_mod, int dId, const Array<double>& s, int l, int u,
60 bool pFlag=false);
61
62 double integ(const ComMod& com_mod, const CmMod& cm_mod, const faceType& lFa, const Vector<double>& s,
63 bool pFlag=false, consts::MechanicalConfigurationType cfg=consts::MechanicalConfigurationType::reference);
64
65 double integ(const ComMod& com_mod, const CmMod& cm_mod, const faceType& lFa, const Array<double>& s,
66 const int l, std::optional<int> uo=std::nullopt, bool THflag=false, consts::MechanicalConfigurationType cfg=consts::MechanicalConfigurationType::reference);
67
68 double integ(const ComMod& com_mod, const CmMod& cm_mod, const faceType& lFa, const Array<double>& s, consts::MechanicalConfigurationType cfg=consts::MechanicalConfigurationType::reference);
69
70 bool is_domain(const ComMod& com_mod, const eqType& eq, const int node, const consts::EquationType phys);
71
72 double jacobian(ComMod& com_mod, const int nDim, const int eNoN, const Array<double>& x, const Array<double>&Nxi);
73
74 Vector<int> local(const ComMod& com_mod, const CmMod& cm_mod, const cmType& cm, Vector<int>& u);
75
76 Array<double> local(const ComMod& com_mod, const CmMod& cm_mod, const cmType& cm, Array<double>& u);
77
78 Array3<double> local(const ComMod& com_mod, const CmMod& cm_mod, const cmType& cm, Array3<double>& u);
79
80 Vector<double> mkc(const ComMod& com_mod, Vector<double>& U);
81 Array<double> mkc(const ComMod& com_mod, Array<double>& U);
82
83 void mkci(const ComMod& com_mod, Vector<double>& U);
84 void mkci(const ComMod& com_mod, Array<double>& U);
85
86 void set_dmn_id(mshType& mesh, const int iDmn, const int ifirst=consts::int_inf, const int ilast=consts::int_inf);
87
88 double skewness(ComMod& com_mod, const int nDim, const int eNoN, const Array<double>& x);
89
90 void split_jobs(int tid, int m, int n, Array<double>& A, Vector<double>& b);
91
92};
93
94#endif
95
The Array3 template class implements a simple interface to 3D arrays.
Definition Array3.h:52
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:1354
The Vector template class is used for storing int and double data.
Definition Vector.h:50
The cmType class stores data and defines methods used for mpi communication.
Definition CmMod.h:82
Equation type.
Definition ComMod.h:1022
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:832