From c4be70ea16ed983ca835518e895f67f9ddbca36a Mon Sep 17 00:00:00 2001 From: benoit128 Date: Wed, 17 Jul 2024 08:18:56 +0200 Subject: [PATCH 1/3] docs: update developers doc --- docs/developers/Git/GitShortcuts.md | 6 ++--- docs/developers/Git/cloning-cassiopee.md | 12 ++++++++-- docs/developers/guide4devs.md | 28 +++++++++++++----------- 3 files changed, 28 insertions(+), 18 deletions(-) diff --git a/docs/developers/Git/GitShortcuts.md b/docs/developers/Git/GitShortcuts.md index a446f027c..f5f17da40 100644 --- a/docs/developers/Git/GitShortcuts.md +++ b/docs/developers/Git/GitShortcuts.md @@ -1,4 +1,4 @@ -# -- Useful git shortcuts -- +# Useful git shortcuts ## Detailed & compact display of git log with graph ```shell @@ -34,8 +34,8 @@ e.g. 1) gitgrep var2 2) gitgrep var 2 Converter ```shell -#first argument: variable names -#second argument: local path to directory +# first argument: variable names +# second argument: local path to directory gitgrep () { if [ "$#" -lt 2 ] then diff --git a/docs/developers/Git/cloning-cassiopee.md b/docs/developers/Git/cloning-cassiopee.md index ddb194cb3..c732e7b6c 100644 --- a/docs/developers/Git/cloning-cassiopee.md +++ b/docs/developers/Git/cloning-cassiopee.md @@ -1,4 +1,4 @@ -# Cloning Cassiopee on Linux +# Cloning Cassiopee ## Add an SSH key to your Github account @@ -28,7 +28,15 @@ git config --global user.name git config --global user.email ``` -5. Clone Cassiopee +## Cloning/forking Cassiopee + +If you consider developping and propose pull request, please fork the repository: on the github page, click on "Fork" and "Create new fork". +Then: +```sh +git clone git@github.com:/Cassiopee.git +``` +else, tou can directly clone the main repository: + ```sh git clone git@github.com:onera/Cassiopee.git ``` diff --git a/docs/developers/guide4devs.md b/docs/developers/guide4devs.md index 31c0b6847..8e0f374b8 100644 --- a/docs/developers/guide4devs.md +++ b/docs/developers/guide4devs.md @@ -1,8 +1,8 @@ -For developers : -================ +For developers: +=============== -Editor : --------- +Editor: +------- - indent with spaces (2 or 4 depending on file complexity). Dont use tabs. - use utf8/lf encoding - respect typo for commas: t1, t2, a3. @@ -17,14 +17,16 @@ Python Functions: - internal functions ends with __ - function must have a copyRef counter part that calls in place function - no IO in function (must work on input t and return t or a copy of t) +- try to unify argument names with existing functions +- complexifying an existing function, adding argument or modifying argument sense must be discussed - check that function performs correctly on FlowSolutionNodes, FlowSolution#Centers, ZoneBC and ZoneGridConnectivity - if the function is fully operational, write doc - always pass full global validCassiopee before commit -Tests : -------- +Tests: +------ - no snake in test file name. - first line of test shoud be # - functionName (pyTree) - - seq tests finishes by _t1, _t2. @@ -32,12 +34,12 @@ Tests : - in tests, dont use input files, create the test case in the script. - a test must run in less than 10 seconds (ideally 1 sec). -OpenMP : --------- +OpenMP: +------- - when a computationaly intensive loops exist, if the treatment is independant, you must use omp for parallelisation. For example : -~~~ +```c #pragma omp parallel { E_Int localInt; @@ -50,17 +52,17 @@ omp for parallelisation. For example : /* ... */ } } -~~~ +``` - the pragma omp parallel creates threads and as a slight cost. - the pragma omp for only split the for loop into equal pieces -- for more complex creation, you can access the thread id like this : +- for more complex creation, you can access the thread id like this: -~~~ +```c #pragma omp parallel { E_Int ithread = __CURRENT_THREAD__; E_Int numThreads = __NUMTHREADS__; /* ... */ } -~~~ +``` \ No newline at end of file From 2dad9084d6651eb790f7a85186a025b2ff1f0549 Mon Sep 17 00:00:00 2001 From: BconstantMMK Date: Wed, 17 Jul 2024 16:55:50 +0200 Subject: [PATCH 2/3] CPlot: bug fix for solidStyle --- Cassiopee/CPlot/CPlot/Data.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cassiopee/CPlot/CPlot/Data.cpp b/Cassiopee/CPlot/CPlot/Data.cpp index cb12997e6..f2fef0b0e 100644 --- a/Cassiopee/CPlot/CPlot/Data.cpp +++ b/Cassiopee/CPlot/CPlot/Data.cpp @@ -336,7 +336,7 @@ void Data::initState() // Styles ptrState->meshStyle = 2; - ptrState->solidStyle = 1; + ptrState->solidStyle = 0; ptrState->scalarStyle = 0; ptrState->vectorStyle = 0; ptrState->vectorScale = 100.f; From 66d4acfeec6a57d87b0e57cf9f27428f3c9fac2e Mon Sep 17 00:00:00 2001 From: benoit128 Date: Thu, 18 Jul 2024 08:14:18 +0200 Subject: [PATCH 3/3] XCore: add some headers --- Cassiopee/XCore/XCore/AdaptMesh/Pyra.h | 18 ++++++++++++++++++ Cassiopee/XCore/XCore/AdaptMesh/Q6.cpp | 18 ++++++++++++++++++ Cassiopee/XCore/XCore/AdaptMesh/Q9.cpp | 18 ++++++++++++++++++ Cassiopee/XCore/XCore/AdaptMesh/Quad.h | 18 ++++++++++++++++++ Cassiopee/XCore/XCore/AdaptMesh/Tetra.cpp | 18 ++++++++++++++++++ Cassiopee/XCore/XCore/AdaptMesh/Tetra.h | 18 ++++++++++++++++++ Cassiopee/XCore/XCore/AdaptMesh/Tri.cpp | 18 ++++++++++++++++++ Cassiopee/XCore/XCore/AdaptMesh/Tri.h | 18 ++++++++++++++++++ 8 files changed, 144 insertions(+) diff --git a/Cassiopee/XCore/XCore/AdaptMesh/Pyra.h b/Cassiopee/XCore/XCore/AdaptMesh/Pyra.h index e672790ac..a4eb697c3 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/Pyra.h +++ b/Cassiopee/XCore/XCore/AdaptMesh/Pyra.h @@ -1,3 +1,21 @@ +/* + Copyright 2013-2024 Onera. + + This file is part of Cassiopee. + + Cassiopee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Cassiopee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Cassiopee. If not, see . +*/ #pragma once #include "../common/common.h" diff --git a/Cassiopee/XCore/XCore/AdaptMesh/Q6.cpp b/Cassiopee/XCore/XCore/AdaptMesh/Q6.cpp index 87aef2d23..0f2b3a7fc 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/Q6.cpp +++ b/Cassiopee/XCore/XCore/AdaptMesh/Q6.cpp @@ -1,3 +1,21 @@ +/* + Copyright 2013-2024 Onera. + + This file is part of Cassiopee. + + Cassiopee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Cassiopee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Cassiopee. If not, see . +*/ #include "Quad.h" int Q6_refine(Int quad, Mesh *M) diff --git a/Cassiopee/XCore/XCore/AdaptMesh/Q9.cpp b/Cassiopee/XCore/XCore/AdaptMesh/Q9.cpp index 751f89148..70ccafdfa 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/Q9.cpp +++ b/Cassiopee/XCore/XCore/AdaptMesh/Q9.cpp @@ -1,3 +1,21 @@ +/* + Copyright 2013-2024 Onera. + + This file is part of Cassiopee. + + Cassiopee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Cassiopee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Cassiopee. If not, see . +*/ #include "Quad.h" int Q9_refine(Int quad, Mesh *M) diff --git a/Cassiopee/XCore/XCore/AdaptMesh/Quad.h b/Cassiopee/XCore/XCore/AdaptMesh/Quad.h index 7650b9608..d3453f9d9 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/Quad.h +++ b/Cassiopee/XCore/XCore/AdaptMesh/Quad.h @@ -1,3 +1,21 @@ +/* + Copyright 2013-2024 Onera. + + This file is part of Cassiopee. + + Cassiopee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Cassiopee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Cassiopee. If not, see . +*/ #pragma once #include "common/common.h" diff --git a/Cassiopee/XCore/XCore/AdaptMesh/Tetra.cpp b/Cassiopee/XCore/XCore/AdaptMesh/Tetra.cpp index e9f1da270..7f6961dae 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/Tetra.cpp +++ b/Cassiopee/XCore/XCore/AdaptMesh/Tetra.cpp @@ -1,3 +1,21 @@ +/* + Copyright 2013-2024 Onera. + + This file is part of Cassiopee. + + Cassiopee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Cassiopee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Cassiopee. If not, see . +*/ #include "Tetra.h" const Int normalIn_T[4] = {1, 0, 1, 0}; diff --git a/Cassiopee/XCore/XCore/AdaptMesh/Tetra.h b/Cassiopee/XCore/XCore/AdaptMesh/Tetra.h index 9e3d5be08..ccde96199 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/Tetra.h +++ b/Cassiopee/XCore/XCore/AdaptMesh/Tetra.h @@ -1,3 +1,21 @@ +/* + Copyright 2013-2024 Onera. + + This file is part of Cassiopee. + + Cassiopee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Cassiopee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Cassiopee. If not, see . +*/ #pragma once #include "../common/common.h" diff --git a/Cassiopee/XCore/XCore/AdaptMesh/Tri.cpp b/Cassiopee/XCore/XCore/AdaptMesh/Tri.cpp index 3b8793bf0..2dc5a8852 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/Tri.cpp +++ b/Cassiopee/XCore/XCore/AdaptMesh/Tri.cpp @@ -1,3 +1,21 @@ +/* + Copyright 2013-2024 Onera. + + This file is part of Cassiopee. + + Cassiopee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Cassiopee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Cassiopee. If not, see . +*/ #include "Tri.h" void refine_tri(Int tri, Mesh *M) diff --git a/Cassiopee/XCore/XCore/AdaptMesh/Tri.h b/Cassiopee/XCore/XCore/AdaptMesh/Tri.h index 8848883e9..f2bb15dcc 100644 --- a/Cassiopee/XCore/XCore/AdaptMesh/Tri.h +++ b/Cassiopee/XCore/XCore/AdaptMesh/Tri.h @@ -1,3 +1,21 @@ +/* + Copyright 2013-2024 Onera. + + This file is part of Cassiopee. + + Cassiopee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Cassiopee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Cassiopee. If not, see . +*/ #pragma once #include "../common/common.h"