File: GeneralIntegratorInsertionSortCollider.hpp

package info (click to toggle)
yade 2026.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,448 kB
  • sloc: cpp: 97,645; python: 52,173; sh: 677; makefile: 162
file content (41 lines) | stat: -rw-r--r-- 1,336 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// 2014 Burak ER <burak.er@btu.edu.tr>

#pragma once
#include <pkg/common/InsertionSortCollider.hpp>

namespace yade { // Cannot have #include directive inside.

/*!
	Adaptive Integration Sort Collider:

	Changing the Integrator dependence from Newton Integrator to Arbitrary Integrators. Arbitrary integrators should use the Integrator interface. 

*/


#ifdef ISC_TIMING
#define ISC_CHECKPOINT(cpt) timingDeltas->checkpoint(cpt)
#else
#define ISC_CHECKPOINT(cpt)
#endif

class Integrator;

class GeneralIntegratorInsertionSortCollider : public InsertionSortCollider {
	// we need this to find out about current maxVelocitySq
	shared_ptr<Integrator> integrator;
	// if False, no type of striding is used

public:
	bool isActivated() override; //override this function to change NewtonIntegrator dependency.

	void action() override; //override this function to change behaviour with the NewtonIntegrator dependency.

	// clang-format off
	YADE_CLASS_BASE_DOC(GeneralIntegratorInsertionSortCollider,InsertionSortCollider," This class is the adaptive version of the InsertionSortCollider and changes the NewtonIntegrator dependency of the collider algorithms to the Integrator interface which is more general.");
	// clang-format on
	DECLARE_LOGGER;
};
REGISTER_SERIALIZABLE(GeneralIntegratorInsertionSortCollider);

} // namespace yade