Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LBM
lbmat
Commits
20b37a04
Commit
20b37a04
authored
Apr 24, 2022
by
Jakub Klinkovský
Browse files
updated build.sh and makefiles
parent
07ef8502
Changes
7
Hide whitespace changes
Inline
Side-by-side
d1q3_ade/Makefile
View file @
20b37a04
defaults
:
all
all
:
@
../scripts/build.sh
all
:
@
+
../scripts/build.sh
clean
:
@
rm
-rf
output
*
compare
*
latex simplify
purge
:
@
rm
-rf
output
*
compare
*
latex simplify
*
.pdf
purge
:
clean
@
rm
-rf
*
.pdf
d1q3_nse/Makefile
View file @
20b37a04
defaults
:
all
all
:
@
../scripts/build.sh
all
:
@
+
../scripts/build.sh
clean
:
@
rm
-rf
output
*
compare
*
latex simplify
purge
:
@
rm
-rf
output
*
compare
*
latex simplify
*
.pdf
purge
:
clean
@
rm
-rf
*
.pdf
d2q5_ade/Makefile
View file @
20b37a04
defaults
:
all
all
:
@
../scripts/build.sh
all
:
@
+
../scripts/build.sh
clean
:
@
rm
-rf
output
*
compare
*
latex simplify
purge
:
@
rm
-rf
output
*
compare
*
latex simplify
*
.pdf
purge
:
clean
@
rm
-rf
*
.pdf
d2q9_nse/Makefile
View file @
20b37a04
defaults
:
all
all
:
@
../scripts/build.sh
all
:
@
+
../scripts/build.sh
clean
:
@
rm
-rf
output
*
compare
*
latex simplify
purge
:
@
rm
-rf
output
*
compare
*
latex simplify
*
.pdf
purge
:
clean
@
rm
-rf
*
.pdf
d3q27_nse/Makefile
View file @
20b37a04
defaults
:
all
all
:
@
../scripts/build.sh
all
:
@
+
../scripts/build.sh
clean
:
@
rm
-rf
output
*
compare
*
latex simplify
purge
:
@
rm
-rf
output
*
compare
*
latex simplify
*
.pdf
purge
:
clean
@
rm
-rf
*
.pdf
d3q7_ade/Makefile
View file @
20b37a04
defaults
:
all
all
:
@
../scripts/build.sh
all
:
@
+
../scripts/build.sh
clean
:
@
rm
-rf
output
*
compare
*
latex simplify
purge
:
@
rm
-rf
output
*
compare
*
latex simplify
*
.pdf
purge
:
clean
@
rm
-rf
*
.pdf
scripts/build.sh
View file @
20b37a04
#!/bin/bash
CODEDIR
=
".."
# exit whenever a command fails
set
-e
CODEDIR
=
"../src"
check_existence
()
{
make
-C
"
$CODEDIR
"
"
$@
"
# check whether $(CODEDIR)/lbmat_$(MODEL) exists
EXE
=
${
CODEDIR
}
/
${
1
}
if
[[
!
-f
"
${
EXE
}
"
]]
;
then
echo
"
${
EXE
}
does not exist -> calling make"
make
-C
..
${
1
}
if
[[
!
-f
${
EXE
}
]]
;
then
echo
"
${
EXE
}
still does not exist -> check manually"
exit
for
target
in
"
$@
"
;
do
target
=
"
$CODEDIR
/
$target
"
if
[[
!
-f
"
$target
"
]]
;
then
echo
"
$target
still does not exist -> check manually"
exit
1
fi
fi
done
}
#echo $(realpath $0)
...
...
@@ -26,23 +29,21 @@ MODEL=${RP1##*/}
echo
model:
${
MODEL
}
check_existence lbmat_
${
MODEL
}
check_existence simplify
check_existence export_latex
check_existence export_latex_compare
# make all necessary binaries
check_existence lbmat_
${
MODEL
}
simplify export_latex export_latex_compare
# execute lbmat_${MODEL} to create output directories
${
CODEDIR
}
/lbmat_
${
MODEL
}
# make symlinks
[[
!
-f
simplify
]]
&&
ln
"
${
CODEDIR
}
/simplify"
simplify
-s
[[
!
-d
latex
]]
&&
ln
"
${
CODEDIR
}
/latex"
latex
-s
[[
!
-d
latex
]]
&&
ln
"
..
/latex"
latex
-s
# symbolic substitutions
for
a
in
output
*
symbolic
;
do
if
[
!
-f
"
${
a
}
/spatial_EPDE/pde_00.tex"
]
;
then
../scripts/script_backsubst_searcher.py
${
a
}
..
/export_latex
${
a
}
"
$CODEDIR
/export_latex
"
${
a
}
# check whether latex files exist
if
[
!
-f
"
${
a
}
/spatial_EPDE/pde_00.tex"
]
;
then
echo
"
${
a
}
/spatial_EPDE/pde_00.tex not found"
...
...
@@ -52,7 +53,7 @@ for a in output*symbolic; do
done
# compare latex
..
/export_latex_compare output_
${
MODEL
}
"
$CODEDIR
/export_latex_compare
"
output_
${
MODEL
}
# call latex
buf_size
=
100000000
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment