Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Multiphysics 0471
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Denis Louis
Multiphysics 0471
Commits
1e347e93
Commit
1e347e93
authored
3 years ago
by
Denis Louis
Browse files
Options
Downloads
Patches
Plain Diff
srcs repos
parent
d2d76218
No related branches found
Branches containing commit
No related tags found
1 merge request
!6
merge kevin branch
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/gmsh_api/my_code.cpp
+4
-1
4 additions, 1 deletion
examples/gmsh_api/my_code.cpp
srcs/srcs_BEM/CMakeLists.txt
+52
-0
52 additions, 0 deletions
srcs/srcs_BEM/CMakeLists.txt
srcs/srcs_FEM/CMakeLists.txt
+52
-0
52 additions, 0 deletions
srcs/srcs_FEM/CMakeLists.txt
with
108 additions
and
1 deletion
examples/gmsh_api/my_code.cpp
+
4
−
1
View file @
1e347e93
...
@@ -210,7 +210,10 @@ int main(int argc, char **argv)
...
@@ -210,7 +210,10 @@ int main(int argc, char **argv)
Eigen
::
Matrix
<
double
,
2
,
2
>
jacobinvtrans
=
jacobinv
.
transpose
();
Eigen
::
Matrix
<
double
,
2
,
2
>
jacobinvtrans
=
jacobinv
.
transpose
();
std
::
cout
<<
"
\t
transpose of the inverse of the first jacobian (Eigen):
\n
"
std
::
cout
<<
"
\t
transpose of the inverse of the first jacobian (Eigen):
\n
"
<<
jacobinvtrans
.
format
(
fmt
)
<<
"
\n
"
;
<<
jacobinvtrans
.
format
(
fmt
)
<<
"
\n
"
;
Eigen
::
Matrix
<
double
,
3
,
Eigen
::
Dynamic
>
B_matrix
;
B_matrix
(
0
,
0
)
=
0.
;
std
::
cout
<<
"
\t
transpose of the inverse of the first jacobian (Eigen):
\n
"
<<
B_matrix
.
format
(
fmt
)
<<
"
\n
"
;
for
(
int
j
=
0
;
j
<
weights
.
size
();
++
j
){
// looping over the number of gauss points ( = number of shape functions (A VERIF))
for
(
int
j
=
0
;
j
<
weights
.
size
();
++
j
){
// looping over the number of gauss points ( = number of shape functions (A VERIF))
}
}
...
...
This diff is collapsed.
Click to expand it.
srcs/srcs_BEM/CMakeLists.txt
0 → 100644
+
52
−
0
View file @
1e347e93
PROJECT
(
MATH0471 CXX
)
CMAKE_MINIMUM_REQUIRED
(
VERSION 3.12
)
# ------------------------------------------------------------------------------
# Find libraries and setup compiler
# ------------------------------------------------------------------------------
# build type is "" by default in Linux
IF
(
NOT CMAKE_BUILD_TYPE
)
SET
(
CMAKE_BUILD_TYPE
"Release"
CACHE STRING
""
FORCE
)
ENDIF
()
# enable C++11
SET
(
CMAKE_CXX_STANDARD 11
)
SET
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
IF
(
APPLE
)
# on macOS, do not give priority to frameworks/apps
SET
(
CMAKE_FIND_APPBUNDLE LAST
)
SET
(
CMAKE_FIND_FRAMEWORK LAST
)
ENDIF
()
# find gmsh-sdk
# gmsh.h
FIND_PATH
(
GMSH_INCLUDE_DIRS NAMES
"gmsh.h"
)
MESSAGE
(
STATUS
"GMSH_INCLUDE_DIRS="
${
GMSH_INCLUDE_DIRS
}
)
if
(
NOT GMSH_INCLUDE_DIRS
)
MESSAGE
(
FATAL_ERROR
"gmsh.h not found!"
)
ENDIF
()
INCLUDE_DIRECTORIES
(
${
GMSH_INCLUDE_DIRS
}
)
# libgmsh.so
FIND_LIBRARY
(
GMSH_LIBRARIES gmsh
)
MESSAGE
(
STATUS
"GMSH_LIBRARIES="
${
GMSH_LIBRARIES
}
)
IF
(
NOT GMSH_LIBRARIES
)
MESSAGE
(
FATAL_ERROR
"gmsh library not found!"
)
ENDIF
()
# find Eigen
find_path
(
EIGEN_INCLUDE_DIRS
"Eigen/Dense"
PATHS
"
${
PROJECT_SOURCE_DIR
}
/lib/eigen"
"/usr/include/eigen3"
)
MESSAGE
(
STATUS
"EIGEN_INCLUDE_DIRS="
${
EIGEN_INCLUDE_DIRS
}
)
IF
(
NOT EIGEN_INCLUDE_DIRS
)
MESSAGE
(
FATAL_ERROR
"Eigen include dir not found!"
)
ENDIF
()
INCLUDE_DIRECTORIES
(
${
EIGEN_INCLUDE_DIRS
}
)
# ------------------------------------------------------------------------------
FILE
(
GLOB SRCS *.cpp
)
ADD_EXECUTABLE
(
solver
${
SRCS
}
)
TARGET_LINK_LIBRARIES
(
solver
${
GMSH_LIBRARIES
}
)
This diff is collapsed.
Click to expand it.
srcs/srcs_FEM/CMakeLists.txt
0 → 100644
+
52
−
0
View file @
1e347e93
PROJECT
(
MATH0471 CXX
)
CMAKE_MINIMUM_REQUIRED
(
VERSION 3.12
)
# ------------------------------------------------------------------------------
# Find libraries and setup compiler
# ------------------------------------------------------------------------------
# build type is "" by default in Linux
IF
(
NOT CMAKE_BUILD_TYPE
)
SET
(
CMAKE_BUILD_TYPE
"Release"
CACHE STRING
""
FORCE
)
ENDIF
()
# enable C++11
SET
(
CMAKE_CXX_STANDARD 11
)
SET
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
IF
(
APPLE
)
# on macOS, do not give priority to frameworks/apps
SET
(
CMAKE_FIND_APPBUNDLE LAST
)
SET
(
CMAKE_FIND_FRAMEWORK LAST
)
ENDIF
()
# find gmsh-sdk
# gmsh.h
FIND_PATH
(
GMSH_INCLUDE_DIRS NAMES
"gmsh.h"
)
MESSAGE
(
STATUS
"GMSH_INCLUDE_DIRS="
${
GMSH_INCLUDE_DIRS
}
)
if
(
NOT GMSH_INCLUDE_DIRS
)
MESSAGE
(
FATAL_ERROR
"gmsh.h not found!"
)
ENDIF
()
INCLUDE_DIRECTORIES
(
${
GMSH_INCLUDE_DIRS
}
)
# libgmsh.so
FIND_LIBRARY
(
GMSH_LIBRARIES gmsh
)
MESSAGE
(
STATUS
"GMSH_LIBRARIES="
${
GMSH_LIBRARIES
}
)
IF
(
NOT GMSH_LIBRARIES
)
MESSAGE
(
FATAL_ERROR
"gmsh library not found!"
)
ENDIF
()
# find Eigen
find_path
(
EIGEN_INCLUDE_DIRS
"Eigen/Dense"
PATHS
"
${
PROJECT_SOURCE_DIR
}
/lib/eigen"
"/usr/include/eigen3"
)
MESSAGE
(
STATUS
"EIGEN_INCLUDE_DIRS="
${
EIGEN_INCLUDE_DIRS
}
)
IF
(
NOT EIGEN_INCLUDE_DIRS
)
MESSAGE
(
FATAL_ERROR
"Eigen include dir not found!"
)
ENDIF
()
INCLUDE_DIRECTORIES
(
${
EIGEN_INCLUDE_DIRS
}
)
# ------------------------------------------------------------------------------
FILE
(
GLOB SRCS *.cpp
)
ADD_EXECUTABLE
(
solver
${
SRCS
}
)
TARGET_LINK_LIBRARIES
(
solver
${
GMSH_LIBRARIES
}
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment