Skip to content
Snippets Groups Projects
Commit 87dad973 authored by BRONES Romain's avatar BRONES Romain
Browse files

fix(mapt): replace MATRIXCOEF multiple line by one

* Quick patch, better working on it elsewhere
* The 2D array is given line by line in the MAPT file
* This AWK rules replace that with a single global line
parent 0e4841a2
No related branches found
No related tags found
No related merge requests found
...@@ -23,11 +23,12 @@ python () { ...@@ -23,11 +23,12 @@ python () {
} }
# Changing BAR of mapt files # Changing BAR of mapt files to 0 (field #5 receive 0)
# Replace each line of MATRIX coeff by a global entry
do_compile () { do_compile () {
for MAPT in ${PL_MAPT_PATH} for MAPT in ${PL_MAPT_PATH}
do do
awk 'FNR>1 {$5=0} {print}' ${WORKDIR}/${MAPT} > ${WORKDIR}/${MAPT}.bar0 awk 'FNR>1 {$5=0} {if ($1 ~ /MATRIXCOEF\.[^0]/ ) next} {if ($1 ~ /MATRIXCOEF\.0/) {$1="APP.corr_matrix_0.MATRIXCOEF" ; $2="12800" ; $4="51200"}} {print}' ${WORKDIR}/${MAPT} > ${WORKDIR}/${MAPT}.bar0
done done
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment