Unverified Commit 320be3bc authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

undo changes to poems library and package as they fail regression testing

parent 72797b30
Loading
Loading
Loading
Loading
+48 −51
Original line number Diff line number Diff line
@@ -19,9 +19,7 @@
#define POEMSCHAIN_H_

#include "poemslist.h"
#include <iostream>

namespace POEMS {
struct ChildRingData {
	List<int> * childRing;
	int entranceNodeId;
@@ -46,14 +44,14 @@ struct POEMSChain{
	void printTreeStructure(int tabs){
		for(int i = 0; i < tabs; i++)
		{
    std::cout << "\t";
			cout << "\t";
		}
 std::cout << "Chain: ";
		cout << "Chain: ";
		for(int i = 0; i < listOfNodes.GetNumElements(); i++)
		{
    std::cout << *(listOfNodes(i)) << " ";
			cout << *(listOfNodes(i)) << " ";
		}
 std::cout << std::endl;
		cout << endl;
		for(int i = 0; i < childChains.GetNumElements(); i++)
		{
			childChains(i)->printTreeStructure(tabs + 1);
@@ -73,5 +71,4 @@ struct POEMSChain{
		}
	}
};
}
#endif
+218 −221
Original line number Diff line number Diff line
@@ -17,12 +17,10 @@

#ifndef _SYS_PROCESSOR_H_
#define _SYS_PROCESSOR_H_
#include <iostream>
#include "poemslist.h"
#include "poemstree.h"
#include "POEMSChain.h"

namespace POEMS {

struct POEMSNode {
	List<POEMSNode> links;
@@ -143,7 +141,7 @@ POEMSChain * SystemProcessor::AddNewChain(POEMSNode * currentNode){
		tmp = new int;
		*tmp = currentNode->idNumber;
		newChain->listOfNodes.Append(tmp);	//append the current node to the chain & mark as visited
                //std::cout << "Appending node " << currentNode->idNumber << " to chain" << std::endl;
		//cout << "Appending node " << currentNode->idNumber << " to chain" << endl;
		nextNode = currentNode->links.GetHeadElement()->value;	//the next node is the first or second value stored in the links array
																//of the current node.  We get the first value...
		if(!setLinkVisited(currentNode, nextNode))					//...and see if it points back to where we came from. If it does...
@@ -225,7 +223,7 @@ bool SystemProcessor::setLinkVisited(POEMSNode * firstNode, POEMSNode * secondNo
//value for that particular link.  Because each link is represented twice, (once at each node in the link), both of the boolean values need
//to be set in the event that the link has to be set as visited.
{
        //std::cout << "Checking link between nodes " << firstNode->idNumber << " and " << secondNode->idNumber << "... ";
	//cout << "Checking link between nodes " << firstNode->idNumber << " and " << secondNode->idNumber << "... ";
	ListElement<POEMSNode> * tmp = firstNode->links.GetHeadElement();	//get the head element of the list of pointers for node 1
	ListElement<bool> * tmp2 = firstNode->taken.GetHeadElement();		//get the head element of the list of bool isVisited flags for node 1
	while(tmp->value != NULL || tmp2->value != NULL)					//go through untill we reach the end of the lists
@@ -234,7 +232,7 @@ bool SystemProcessor::setLinkVisited(POEMSNode * firstNode, POEMSNode * secondNo
		{
			if(*(tmp2->value) == true)							//if the link has already been visited
			{
                                 //std::cout << "visited already" << std::endl;
				 //cout << "visited already" << endl;
				return false;									//return false to indicate that the link has been visited before this attempt
			}
			else												//otherwise, visit it
@@ -256,7 +254,7 @@ bool SystemProcessor::setLinkVisited(POEMSNode * firstNode, POEMSNode * secondNo
		{
			if(*(tmp2->value) == true)					//and it has already been visited, then signal an error; this shouldnt ever happen
			{
                                std::cout << "Error in parsing structure! Should never reach this condition! \n" <<
				cout << "Error in parsing structure! Should never reach this condition! \n" << 
						"Record of visited links out of synch between two adjacent nodes.\n";
				return false;
			}
@@ -269,7 +267,7 @@ bool SystemProcessor::setLinkVisited(POEMSNode * firstNode, POEMSNode * secondNo
		tmp = tmp->next;
		tmp2 = tmp2->next;
	}
        //std::cout << "not visited" << std::endl;
	//cout << "not visited" << endl;
	return true;										//return true to indicate that this is the first time the link has been visited
}

@@ -286,5 +284,4 @@ int SystemProcessor::getNumberOfHeadChains(void) //This function isnt implemente
{
	return 0;
}
}
#endif
+3 −12
Original line number Diff line number Diff line
@@ -15,19 +15,10 @@
 *      CONTACT:        anderk5@rpi.edu                                    *
 *_________________________________________________________________________*/
 
#include <iostream>

#include "body.h"
#include "inertialframe.h"
#include "mat3x3.h"
#include "particle.h"
#include "poemslist.h"
#include "bodies.h"
#include "point.h"
#include "rigidbody.h"
#include "vect3.h"

using namespace std;
using namespace POEMS;

Body::Body()
{
@@ -131,7 +122,7 @@ void Body::AddPoint(Point* point){
// global body functions
//

Body* POEMS::NewBody(int type){
Body* NewBody(int type){
  switch( BodyType(type) )
    {
      case INERTIALFRAME :  // The inertial reference frame
+12 −11
Original line number Diff line number Diff line
@@ -19,13 +19,14 @@
#ifndef BODY_H
#define BODY_H

#include <iostream>
#include "poemslist.h"
#include <iostream>
#include "poemsobject.h"
#include "mat3x3.h"
#include "vect3.h"

namespace POEMS {
#include "matrices.h"



// emumerated type
enum BodyType {
  INERTIALFRAME = 0,
@@ -35,7 +36,7 @@ enum BodyType {
  
class Point;
class Joint;

class CompBody;

class Body : public POEMSObject {
public:
@@ -76,5 +77,5 @@ public:

// global body functions
Body* NewBody(int type);
}

#endif
+7 −10
Original line number Diff line number Diff line
@@ -15,20 +15,17 @@
 *      CONTACT:        anderk5@rpi.edu                                    *
 *_________________________________________________________________________*/
 
#include <iostream>

#include "body23joint.h"
#include "point.h"
#include "matrixfun.h"
#include "body.h"
#include "colmatrix.h"
#include "eulerparameters.h"
#include "fastmatrixops.h"
#include "mat3x3.h"
#include "matrixfun.h"
#include "point.h"
#include "vect3.h"
#include "virtualmatrix.h"
#include "norm.h"
#include "eulerparameters.h"
#include "matrices.h"
#include <iomanip>

using namespace std;
using namespace POEMS;

Body23Joint::Body23Joint(){
  DimQandU(4,2);
Loading