~esys-p-dev/esys-particle/trunk

« back to all changes in this revision

Viewing changes to Tools/StressCalculatorTest/Raw2InteractionReaderTest.cpp

  • Committer: slatham
  • Date: 2004-12-08 07:29:43 UTC
  • Revision ID: svn-v4:1ddc92f8-1f06-0410-a909-b11019f1b28a:lsmtrunk:553
Added copy-constructor and assignment operator for VertexBox. Removed std-deviation parameter and removed redundant computations from the raw2tostress converter.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
        m_pos2(pos2),
43
43
        m_forcePos(forcePos),
44
44
        m_force(force),
45
 
        m_rad1(0),
46
 
        m_rad2(0)
 
45
        m_rad1(1),
 
46
        m_rad2(1)
47
47
    {
48
48
    }
49
49
 
52
52
        m_pos2(data.getCentrePos2()),
53
53
        m_forcePos(data.getForcePos()),
54
54
        m_force(data.getForce()),
55
 
        m_rad1(0),
56
 
        m_rad2(0)        
 
55
        m_rad1(1),
 
56
        m_rad2(1)        
57
57
    {
58
58
    }
59
59
 
193
193
 
194
194
    CPPUNIT_ASSERT(!reader.hasNext());
195
195
  }
196
 
  
 
196
 
197
197
  void Raw2InteractionReaderTest::testInteractionToStressConverter()
198
198
  {
199
199
    std::stringstream oStream;
203
203
      << "\n"
204
204
      << (m_implPtr->m_interactionVector[1]);
205
205
 
206
 
      InteractionToStressConverter converter;
207
 
      
 
206
      InteractionToStressConverter converter =
 
207
        InteractionToStressConverter(
 
208
          BoundingBox(Vec3(-10, -10, -10), Vec3(10, 10, 10)),
 
209
          1
 
210
        );
 
211
 
208
212
      converter.addRaw2Interactions(iStream);
209
 
      converter.writeVtkStructuredXml(
210
 
        oStream,
211
 
        BoundingBox(Vec3(-10, -10, -10), Vec3(10, 10, 10)),
212
 
        1
213
 
      );
 
213
      CPPUNIT_ASSERT_EQUAL(1.0, converter.getMaxRadius());
 
214
      converter.writeVtkStructuredXml(oStream);
214
215
      CPPUNIT_ASSERT(oStream.str().size() > 0);
215
216
      //std::cout << oStream.str() << std::endl;
216
217
  }