fix rotational/translational solver bugs in cylce detection and mapping
This commit is contained in:
parent
98d81ed483
commit
7fe1d94a21
|
@ -85,5 +85,4 @@ void ConstraintGroup::init(ItemAssembly* ass) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -211,9 +211,7 @@ void ItemAssembly::init(boost::shared_ptr<Solver> parent) {
|
|||
//no signals for subsystems, we need to extract the placement by hand
|
||||
void ItemAssembly::finish(boost::shared_ptr<Solver> parent) {
|
||||
|
||||
Base::Console().Message("finish\n");
|
||||
if(parent) {
|
||||
Base::Console().Message("set product placement\n");
|
||||
Base::Placement p = m_solver->getTransformation<Base::Placement>();
|
||||
this->Placement.setValue(p);
|
||||
}
|
||||
|
|
|
@ -438,15 +438,15 @@ struct Kernel {
|
|||
void setAccess(ParameterType t) {
|
||||
|
||||
if(t==complete) {
|
||||
new(&Jacobi) VectorMap(&m_jacobi(0,0),m_eqns,m_params,DynStride(m_eqns,1));
|
||||
new(&Jacobi) MatrixMap(&m_jacobi(0,0),m_eqns,m_params,DynStride(m_eqns,1));
|
||||
new(&Parameter) VectorMap(&m_parameter(0),m_params,DynStride(1,1));
|
||||
} else if(t==rotation) {
|
||||
int num = m_param_trans_offset;
|
||||
new(&Jacobi) VectorMap(&m_jacobi(0,0),m_eqns,num,DynStride(m_eqns,1));
|
||||
new(&Jacobi) MatrixMap(&m_jacobi(0,0),m_eqns,num,DynStride(m_eqns,1));
|
||||
new(&Parameter) VectorMap(&m_parameter(0),num,DynStride(1,1));
|
||||
} else if(t==general) {
|
||||
int num = m_params - m_param_trans_offset;
|
||||
new(&Jacobi) VectorMap(&m_jacobi(0,m_param_trans_offset),m_eqns,num,DynStride(m_eqns,1));
|
||||
new(&Jacobi) MatrixMap(&m_jacobi(0,m_param_trans_offset),m_eqns,num,DynStride(m_eqns,1));
|
||||
new(&Parameter) VectorMap(&m_parameter(m_param_trans_offset),num,DynStride(1,1));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -29,8 +29,12 @@
|
|||
|
||||
#include <boost/graph/adjacency_list.hpp>
|
||||
#include <boost/graph/depth_first_search.hpp>
|
||||
#include <boost/graph/undirected_dfs.hpp>
|
||||
#include <boost/exception/errinfo_errno.hpp>
|
||||
|
||||
#include "Base/Console.h"
|
||||
#include <boost/graph/graphviz.hpp>
|
||||
|
||||
namespace dcm {
|
||||
namespace details {
|
||||
|
||||
|
@ -374,10 +378,12 @@ void SystemSolver<Sys>::solveCluster(boost::shared_ptr<Cluster> cluster, Sys& sy
|
|||
cycle_dedector cd(has_cycle);
|
||||
//create te needed property map, fill it and run the test
|
||||
property_map<vertex_index_prop, Cluster> vi_map(cluster);
|
||||
property_map<vertex_color_prop, Cluster> vc_map(cluster);
|
||||
property_map<edge_color_prop, Cluster> ec_map(cluster);
|
||||
cluster->initIndexMaps();
|
||||
boost::depth_first_search(*cluster.get(), boost::visitor(cd).vertex_index_map(vi_map));
|
||||
|
||||
bool done = false;
|
||||
boost::undirected_dfs(*cluster.get(), boost::visitor(cd).vertex_index_map(vi_map).vertex_color_map(vc_map).edge_color_map(ec_map));
|
||||
|
||||
bool done = false;
|
||||
if(!has_cycle) {
|
||||
#ifdef USE_LOGGING
|
||||
BOOST_LOG(log)<< "non-cyclic system dedected"
|
||||
|
|
Loading…
Reference in New Issue
Block a user