Anmerkung! Jacob mach mal!
This commit is contained in:
parent
bfc112e9f3
commit
81f4796eeb
@ -20,7 +20,12 @@ void Integratoren2d_forceless::Set1_Euler(Rod2d &rod2D, Simulation &sim) {
|
|||||||
//translation
|
//translation
|
||||||
Eigen::Vector2d rand = {sim.getNorm(std), sim.getNorm(std)}; //gaussian noise
|
Eigen::Vector2d rand = {sim.getNorm(std), sim.getNorm(std)}; //gaussian noise
|
||||||
Eigen::Vector2d trans_part = rod2D.getDiff_Sqrt() * rand; //translation vector in Particle System
|
Eigen::Vector2d trans_part = rod2D.getDiff_Sqrt() * rand; //translation vector in Particle System
|
||||||
Eigen::Vector2d trans_lab = rod2D.getE_Base_matrix() * trans_part;
|
Eigen::Vector2d trans_lab = rod2D.getE_Base_matrix() * trans_part;
|
||||||
|
/* TODO
|
||||||
|
|
||||||
|
Statt Zeile 22 und 23 kannst du trans_lab = paralleler_matrix_eintrag * e plus senkrechter_matrix_eintrag * ortho(e);
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
//rotation
|
//rotation
|
||||||
double rot = sim.getNorm(std) * rod2D.getDRot_Sqrt();// rotationsmatrix verwenden.
|
double rot = sim.getNorm(std) * rod2D.getDRot_Sqrt();// rotationsmatrix verwenden.
|
||||||
@ -41,6 +46,15 @@ void Integratoren2d_forceless::Set2_Heun(Rod2d &rod2D, Simulation &sim) {
|
|||||||
Eigen::Vector2d trans_part = rod2D.getDiff_Sqrt() * rand; //translation vector in Particle System
|
Eigen::Vector2d trans_part = rod2D.getDiff_Sqrt() * rand; //translation vector in Particle System
|
||||||
Eigen::Vector2d trans_lab = rod2D.getE_Base_matrix() * trans_part;
|
Eigen::Vector2d trans_lab = rod2D.getE_Base_matrix() * trans_part;
|
||||||
Eigen::Vector2d pos_predictor = rod2D.getPos() + trans_lab;
|
Eigen::Vector2d pos_predictor = rod2D.getPos() + trans_lab;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
TODO
|
||||||
|
|
||||||
|
Siehe Set_1: Hier auch über e und orth(e)
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
//rotation
|
//rotation
|
||||||
double rot_predict = sim.getNorm(std) * rod2D.getDRot_Sqrt();// rotationsmatrix verwenden.
|
double rot_predict = sim.getNorm(std) * rod2D.getDRot_Sqrt();// rotationsmatrix verwenden.
|
||||||
Eigen::Vector2d e = rod2D.getE();
|
Eigen::Vector2d e = rod2D.getE();
|
||||||
@ -67,6 +81,12 @@ void Integratoren2d_forceless::Set3_Exact(Rod2d &rod2D, Simulation &sim) {
|
|||||||
Eigen::Vector2d trans_part = rod2D.getDiff_Sqrt() * rand; //translation vector in Particle System
|
Eigen::Vector2d trans_part = rod2D.getDiff_Sqrt() * rand; //translation vector in Particle System
|
||||||
Eigen::Vector2d trans_lab = rod2D.getE_Base_matrix() * trans_part;
|
Eigen::Vector2d trans_lab = rod2D.getE_Base_matrix() * trans_part;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
TODO: Siehe Set1
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
//rotation
|
//rotation
|
||||||
double rot = sim.getNorm(std) * rod2D.getDRot_Sqrt();
|
double rot = sim.getNorm(std) * rod2D.getDRot_Sqrt();
|
||||||
Eigen::Vector2d e = rod2D.getE();
|
Eigen::Vector2d e = rod2D.getE();
|
||||||
@ -74,6 +94,10 @@ void Integratoren2d_forceless::Set3_Exact(Rod2d &rod2D, Simulation &sim) {
|
|||||||
|
|
||||||
Eigen::Vector2d delta_e = correction * e + rot * ortho(e);
|
Eigen::Vector2d delta_e = correction * e + rot * ortho(e);
|
||||||
|
|
||||||
|
/*
|
||||||
|
TODO Warum hier kBT definiert?
|
||||||
|
*/
|
||||||
|
|
||||||
//apply
|
//apply
|
||||||
rod2D.setPos(rod2D.getPos() + trans_lab);
|
rod2D.setPos(rod2D.getPos() + trans_lab);
|
||||||
rod2D.setE((e + delta_e).normalized());
|
rod2D.setE((e + delta_e).normalized());
|
||||||
@ -91,10 +115,20 @@ void Integratoren2d_forceless::Set4_BDAS(Rod2d &rod2D, Simulation &sim) {
|
|||||||
Eigen::Rotation2D rotMat(acos(unitVec.dot(rod2D.getE())));
|
Eigen::Rotation2D rotMat(acos(unitVec.dot(rod2D.getE())));
|
||||||
auto trans_lab = rotMat * trans_part;
|
auto trans_lab = rotMat * trans_part;
|
||||||
|
|
||||||
|
/*
|
||||||
|
TODO: Warum hier nicht die Matrix von oben?
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
auto rot = Eigen::Rotation2D<double>(sim.getNorm(std) * rod2D.getDRot_Sqrt());
|
auto rot = Eigen::Rotation2D<double>(sim.getNorm(std) * rod2D.getDRot_Sqrt());
|
||||||
Eigen::Rotation2Dd rotation(rot);
|
Eigen::Rotation2Dd rotation(rot);
|
||||||
auto e_new = (rotation.toRotationMatrix() * rod2D.getE()).normalized();
|
auto e_new = (rotation.toRotationMatrix() * rod2D.getE()).normalized();
|
||||||
|
|
||||||
|
/*
|
||||||
|
TODO Warum Normierung? Ist der Fehler so gros? Wie siehts mit einer Winkelvariable aus,
|
||||||
|
dann musst du den Winkel nicht jedesmal berechnen?
|
||||||
|
*/
|
||||||
|
|
||||||
// Normalisation should not be necessary if a proper angular representation is used.
|
// Normalisation should not be necessary if a proper angular representation is used.
|
||||||
// But with vector e it is done in case of numerical errors
|
// But with vector e it is done in case of numerical errors
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user