Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into test_augmented_lagr…
Browse files Browse the repository at this point in the history
…angians
  • Loading branch information
bakpaul committed Nov 12, 2024
2 parents 129be9a + f9afdf6 commit 9816f41
Show file tree
Hide file tree
Showing 1,161 changed files with 9,281 additions and 7,521 deletions.
3 changes: 3 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = CHANGELOG.md
ignore-words-list = Sensable,SensAble,Datas,offsetT,dOut,*/extlibs/*,doubleClick,findOut,inForce,optionA
73 changes: 0 additions & 73 deletions .github/workflows/post-agenda-sofa-dev-meeting.yml

This file was deleted.

9 changes: 8 additions & 1 deletion .github/workflows/post-announcements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v2
if: ( github.event.discussion.category.name == 'Announcement' ) || ( github.event.discussion.category.name == 'Share your achievements' )

- name: Set up python
uses: actions/setup-python@v5
if: ( github.event.discussion.category.name == 'Announcement' ) || ( github.event.discussion.category.name == 'Share your achievements' )
with:
python-version: '3.12'

- name: Install dependencies
- name: Install pip packages
if: ( github.event.discussion.category.name == 'Announcement' ) || ( github.event.discussion.category.name == 'Share your achievements' )
run: |
pip install python-graphql-client
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/post-github-activity-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- name: Install dependencies
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install pip packages
run: |
pip install python-graphql-client
pip install python-dateutil
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/post-github-activity-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- name: Install dependencies
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install pip packages
run: |
pip install python-graphql-client
pip install python-dateutil
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/post-github-activity-star.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- name: Install dependencies
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install pip packages
run: |
pip install python-graphql-client
pip install python-dateutil
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/post-pending-discussions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.10' # Use the desired Python version
python-version: '3.12'

- name: Install dependencies
- name: Install pip packages
run: |
pip install python-graphql-client
pip install python-dateutil
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- name: Install dependencies
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install pip packages
run: |
pip install python-graphql-client
pip install python-dateutil
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/stale_github_discussions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.10' # Use the desired Python version
python-version: '3.12'

- name: Install dependencies
- name: Install pip packages
run: |
pip install python-graphql-client
pip install python-dateutil
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ if(SOFA_BUILD_RELEASE_PACKAGE)
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${EXTRA_INSTALL_COMMAND}")
set(CPACK_NSIS_MENU_LINKS
"https://www.sofa-framework.org/documentation/" "SOFA User Documentation"
"https://www.sofa-framework.org/api/" "SOFA Developper API"
"https://www.sofa-framework.org/api/" "SOFA Developer API"
"https://github.com/sofa-framework/sofa/discussions" "SOFA Support")
endif()
#######################
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ For more information on forks and pull request, check out [this GitHub guide](ht

### SOFA Developer Certificate Of Origin (DCO)

SOFA is using the [mechanism of the linux project](https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin) to track and secure all issues related to copyrights: the Developper Certificate of Origin (DCO). If you are contributing code or documentation to the SOFA project, and using the git signed-off-by mechanism, you are agreeing to this certificate. This DCO essentially means that:
SOFA is using the [mechanism of the linux project](https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin) to track and secure all issues related to copyrights: the Developer Certificate of Origin (DCO). If you are contributing code or documentation to the SOFA project, and using the git signed-off-by mechanism, you are agreeing to this certificate. This DCO essentially means that:

- you offer the changes under the same license agreement as the project, and
- you have the right to do that,
Expand Down
2 changes: 1 addition & 1 deletion GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
### Base rules
The base rules are in Google C++ Style Guide: https://google.github.io/styleguide/cppguide.html
All rules below **replace** the corresponding base rules.
For any subject not mentionned below, please refer to the base.
For any subject not mentioned below, please refer to the base.

### Commit message
A correct commit message must therefore be structured as:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ ConstraintAnimationLoop::ConstraintAnimationLoop() :
, d_doCollisionsFirst(initData(&d_doCollisionsFirst, false, "doCollisionsFirst","Compute the collisions first (to support penality-based contacts)"))
, d_doubleBuffer( initData(&d_doubleBuffer, false, "doubleBuffer","Double the buffer dedicated to the constraint problem to make it accessible to another thread"))
, d_scaleTolerance( initData(&d_scaleTolerance, true, "scaleTolerance","Scale the error tolerance with the number of constraints"))
, d_allVerified( initData(&d_allVerified, false, "allVerified","All contraints must be verified (each constraint's error < tolerance)"))
, d_allVerified( initData(&d_allVerified, false, "allVerified","All constraints must be verified (each constraint's error < tolerance)"))
, d_sor( initData(&d_sor, 1.0_sreal, "sor","Successive Over Relaxation parameter (0-2)"))
, d_schemeCorrection( initData(&d_schemeCorrection, false, "schemeCorrection","Apply new scheme where compliance is progressively corrected"))
, d_realTimeCompensation( initData(&d_realTimeCompensation, false, "realTimeCompensation","If the total computational time T < dt, sleep(dt-T)"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class SOFA_COMPONENT_ANIMATIONLOOP_API ConstraintAnimationLoop : public sofa::si
Data<bool> d_doCollisionsFirst; ///< Compute the collisions first (to support penality-based contacts)
Data<bool> d_doubleBuffer; ///< Double the buffer dedicated to the constraint problem to make it accessible to another thread
Data<bool> d_scaleTolerance; ///< Scale the error tolerance with the number of constraints
Data<bool> d_allVerified; ///< All contraints must be verified (each constraint's error < tolerance)
Data<bool> d_allVerified; ///< All constraints must be verified (each constraint's error < tolerance)
Data<SReal> d_sor; ///< Successive Over Relaxation parameter (0-2)
Data<bool> d_schemeCorrection; ///< Apply new scheme where compliance is progressively corrected
Data<bool> d_realTimeCompensation; ///< If the total computational time T < dt, sleep(dt-T)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
namespace sofa::component::collision::detection::algorithm
{

int BVHNarrowPhaseClass = core::RegisterObject("Narrow phase collision detection based on boundary volume hierarchy")
.add< BVHNarrowPhase >()
;
void registerBVHNarrowPhase(sofa::core::ObjectFactory* factory)
{
factory->registerObjects(core::ObjectRegistrationData("Narrow phase collision detection based on boundary volume hierarchy.")
.add< BVHNarrowPhase >());
}

BVHNarrowPhase::BVHNarrowPhase() : core::collision::NarrowPhaseDetection()
{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
namespace sofa::component::collision::detection::algorithm
{

int BruteForceBroadPhaseClass = core::RegisterObject("Broad phase collision detection using extensive pair-wise tests")
.add< BruteForceBroadPhase >()
;
void registerBruteForceBroadPhase(sofa::core::ObjectFactory* factory)
{
factory->registerObjects(core::ObjectRegistrationData("Broad phase collision detection using extensive pair-wise tests.")
.add< BruteForceBroadPhase >());
}

BruteForceBroadPhase::BruteForceBroadPhase()
: d_box(initData(&d_box, "box", "if not empty, objects that do not intersect this bounding-box will be ignored"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
namespace sofa::component::collision::detection::algorithm
{

int BruteForceDetectionClass = core::RegisterObject(
"Combination of brute force broad phase and BVH narrow phase collision detection")
.add<BruteForceDetection>();
void registerBruteForceDetection(sofa::core::ObjectFactory* factory)
{
factory->registerObjects(core::ObjectRegistrationData("Combination of brute force broad phase and BVH narrow phase collision detection.")
.add<BruteForceDetection>());
}

void BruteForceDetection::init()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace sofa::component::collision::detection::algorithm

/**
*x and y value are used to identify this pair, the order is not important but the order of elem1_ and elem2_ is because
*when using intersect funcion we run inter->intersect(elem1,elem2,output), so the intersect method must handle the order you give.
*when using intersect function we run inter->intersect(elem1,elem2,output), so the intersect method must handle the order you give.
*/
CollidingPair(const core::CollisionElementIterator & elem1_,const core::CollisionElementIterator & elem2_,core::collision::ElementIntersector * /*inter*/) :
elem1(elem1_),elem2(elem2_)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,17 @@ using namespace core::objectmodel;
using namespace core::collision;
using namespace sofa::defaulttype;

int CollisionPipelineClass = core::RegisterObject("The default collision detection and modeling pipeline")
.add< CollisionPipeline >()
.addAlias("DefaultPipeline")
;
void registerCollisionPipeline(sofa::core::ObjectFactory* factory)
{
factory->registerObjects(core::ObjectRegistrationData("The default collision detection and modeling pipeline.")
.add< CollisionPipeline >());
}

const int CollisionPipeline::defaultDepthValue = 6;

CollisionPipeline::CollisionPipeline()
: d_doPrintInfoMessage(initData(&d_doPrintInfoMessage, false, "verbose",
"Display extra informations at each computation step. (default=false)"))
"Display extra information at each computation step. (default=false)"))
, d_doDebugDraw(initData(&d_doDebugDraw, false, "draw",
"Draw the detected collisions. (default=false)"))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@

namespace sofa::component::collision::detection::algorithm
{
int DirectSAPClass = core::RegisterObject("Collision detection using sweep and prune")
.add< DirectSAP >();

void registerDirectSAP(sofa::core::ObjectFactory* factory)
{
factory->registerObjects(core::ObjectRegistrationData("Collision detection using sweep and prune.")
.add< DirectSAP >());
}

void DirectSAP::init()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ void DirectSAPNarrowPhase::narrowCollisionDetectionFromSortedEndPoints()
SCOPED_TIMER_VARNAME(scopeTimer, "Direct SAP intersection");
int nbInvestigatedPairs{ 0 };

std::list<int> activeBoxes;//active boxes are the one that we encoutered only their min (end point), so if there are two boxes b0 and b1,
std::list<int> activeBoxes;//active boxes are the one that we encountered only their min (end point), so if there are two boxes b0 and b1,
//if we encounter b1_min as b0_min < b1_min, on the current axis, the two boxes intersect : b0_min--------------------b0_max
// b1_min---------------------b1_max
//once we encouter b0_max, b0 will not intersect with nothing (trivial), so we delete it from active_boxes.
//once we encounter b0_max, b0 will not intersect with nothing (trivial), so we delete it from active_boxes.
//so the rule is : -every time we encounter a box min end point, we check if it is overlapping with other active_boxes and add the owner (a box) of this end point to
// the active boxes.
// -every time we encounter a max end point of a box, we are sure that we encountered min end point of a box because _end_points is sorted,
Expand Down Expand Up @@ -449,11 +449,10 @@ inline void DSAPBox::show()const
<<"MAX "<<cube.maxVect() ;
}

using namespace sofa::defaulttype;
using namespace collision;

int DirectSAPNarrowPhaseClass = core::RegisterObject("Collision detection using sweep and prune")
.add< DirectSAPNarrowPhase >()
;
void registerDirectSAPNarrowPhase(sofa::core::ObjectFactory* factory)
{
factory->registerObjects(core::ObjectRegistrationData("Narrow phase of the collision detection using sweep and prune.")
.add< DirectSAPNarrowPhase >());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace sofa::component::collision::detection::algorithm

/**
* This class is an implementation of sweep and prune in its "direct" version, i.e. at each step
* it sorts all the primitives along an axis (not checking the moving ones) and computes overlaping pairs without
* it sorts all the primitives along an axis (not checking the moving ones) and computes overlapping pairs without
* saving it. But the memory used to save these primitives is created just once, the first time we add CollisionModels.
*/
class SOFA_COMPONENT_COLLISION_DETECTION_ALGORITHM_API DirectSAPNarrowPhase : public core::collision::NarrowPhaseDetection
Expand All @@ -53,7 +53,7 @@ class SOFA_COMPONENT_COLLISION_DETECTION_ALGORITHM_API DirectSAPNarrowPhase : pu
/** \brief Returns the axis number which have the greatest variance for the primitive end points.
*
* This axis is used when updating and sorting end points. The greatest variance means
* that this axis have the most chance to eliminate a maximum of not overlaping SAPBox pairs
* that this axis have the most chance to eliminate a maximum of not overlapping SAPBox pairs
* because along this axis, SAPBoxes are the sparsest.
*/
int greatestVarianceAxis() const;
Expand Down
Loading

0 comments on commit 9816f41

Please sign in to comment.