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

« back to all changes in this revision

Viewing changes to Tools/StressCalculator/InteractionToStressConverter.h

  • 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:
53
53
      typedef StressTensorCollection<ContactPtTensorCalculator> StressTensorCollection;
54
54
      typedef StressTensorCollection::StressCalculator          StressTensorCalculator;
55
55
 
56
 
      InteractionToStressConverter(double stdDeviation=0.4);
 
56
      InteractionToStressConverter(const BoundingBox &box, double gridSpacing);
57
57
 
58
58
      /**
59
59
       * Reads RAW2 interaction data from the specified stream and converts
71
71
       * Writes VTK StructuredGrid XML format file of
72
72
       * eigenvalue point-data to the specified output-stream.
73
73
       * The irregular point data
74
 
       * is converted to a regular grid specified by
75
 
       * bBox and gridSpacing parameters.
76
 
       *
77
 
       * @see getRegularGrid
 
74
       * is converted to a regular grid using the
 
75
       * bounding-box and grid-spacing values of this object.
 
76
       *
 
77
       * @param oStream vtx xml written to this stream.
 
78
       *
 
79
       * @see getDevRegularGrid
78
80
       */
79
 
      void writeVtkStructuredXml
80
 
      (
81
 
        std::ostream &oStream,
82
 
        const BoundingBox &bBox,
83
 
        double gridSpacing
84
 
      );
 
81
      void writeVtkStructuredXml(std::ostream &oStream);
85
82
 
86
 
#if 0
87
 
      /**
88
 
       * Converts irregular grid of (\sigma_{max}-\sigma_{min})
89
 
       * calculated from tensor data to a regular grid using
90
 
       * a Gaussian (normal distribution) weighting/smoothing.
91
 
       *
92
 
       * @param bBox - regular grid is restricted to this bounding box
93
 
       *               (all irregular point data are considered even if
94
 
       *               they are outside this bounding box.
95
 
       * @param gridSpacing - distance between regular grid points
96
 
       *                      (x, y and z dimensions).
97
 
       * @param stdDeviation - standard deviation value for the Gaussian
98
 
       *                       weight calculations.
99
 
       */
100
 
      DoubleGrid getDevRegularGrid
101
 
      (
102
 
        const BoundingBox &bBox,
103
 
        double gridSpacing,
104
 
        double stdDeviation
105
 
      );
106
 
#endif
 
83
      StressTensorPtrGrid &getTensorIrregularGrid();
 
84
      void calcTensorIrregularGrid();
107
85
 
108
86
      /**
109
87
       * Converts irregular grid of average particle stress tensors (\sigma_{ij})
115
93
       * @param gridSpacing - distance between regular grid points
116
94
       *                      (x, y and z dimensions).
117
95
       */
118
 
      TensorGrid getTensorRegularGrid
119
 
      (
120
 
        const BoundingBox &bBox,
121
 
        double gridSpacing
122
 
      );
 
96
      TensorGrid &getTensorRegularGrid();
 
97
 
 
98
      void calcTensorRegularGrid();
123
99
 
124
100
      /**
125
101
       * Converts irregular grid of average particle stress tensor data
133
109
       * @param gridSpacing - distance between regular grid points
134
110
       *                      (x, y and z dimensions).
135
111
       */
136
 
      DoubleGrid getDevRegularGrid
137
 
      (
138
 
        const BoundingBox &bBox,
139
 
        double gridSpacing
140
 
      );
 
112
      DoubleGrid &getDevRegularGrid();
 
113
 
 
114
      void calcDevRegularGrid();
141
115
 
142
116
      /**
143
117
       * Writes "x y z \sigma_{max}-\sigma_{min})" records
147
121
       *
148
122
       * @see getRegularGrid
149
123
       */      
150
 
      void writeFlatStructured
151
 
      (
152
 
        std::ostream &oStream,
153
 
        const BoundingBox &bBox,
154
 
        double gridSpacing
155
 
      );
 
124
      void writeFlatStructured(std::ostream &oStream);
156
125
 
157
126
      /**
158
127
       * Writes "x y z r \sigma_{max}-\sigma_{min})" records
175
144
       */
176
145
      void writeUnstructuredDx(std::ostream &oStream);
177
146
 
 
147
      double getMaxRadius();
 
148
 
178
149
    protected:
179
150
      double getRealDevStress(const Tensor &stressTensor) const;
180
151
      double getNormDevStress(const Tensor &stressTensor) const;
181
152
 
182
153
      bool is3d() const;
183
 
 
 
154
      
184
155
    private:
 
156
      double                 m_gridSpacing;
 
157
      BoundingBox            m_bBox;
185
158
      StressTensorCalculator m_stressCalculator;
186
159
      StressTensorCollection m_stressTensorCollection;
187
 
      double                 m_stdDeviation;
 
160
      TensorGrid             m_regTensorGrid;
 
161
      DoubleGrid             m_regDevStressGrid;
 
162
      StressTensorPtrGrid    m_irrStressTensorGrid;
188
163
    };
189
164
  }
190
165
}