~ubuntu-branches/ubuntu/raring/rheolef/raring-proposed

« back to all changes in this revision

Viewing changes to nfem/plib/field_seq_visu_vtk_mayavi.cc

  • Committer: Package Import Robot
  • Author(s): Pierre Saramito, Pierre Saramito, Sylvestre Ledru
  • Date: 2012-05-14 14:02:09 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120514140209-dzbdlidkotyflf9e
Tags: 6.1-1
[ Pierre Saramito ]
* New upstream release 6.1 (minor changes):
  - support arbitrarily polynomial order Pk
  - source code supports g++-4.7 (closes: #671996)

[ Sylvestre Ledru ]
* update of the watch file

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
// ----------------------------------------------------------------------------
37
37
// python utils
38
38
// ----------------------------------------------------------------------------
 
39
template<class T>
39
40
static
40
41
std::string
41
 
python (const point& x, size_t d=3)
 
42
python (const point_basic<T>& x, size_t d=3)
42
43
{
43
44
    std::ostringstream os;
44
45
    os << "(" << x[0];
88
89
  Float vscale = iorheo::getvectorscale(os);
89
90
  size_type n_isovalue = iorheo::getn_isovalue(os);
90
91
  size_type n_isovalue_negative = iorheo::getn_isovalue_negative(os);
91
 
  point origin  = iofem::getorigin(os);
92
 
  point normal  = iofem::getnormal(os);
 
92
  point_basic<float_type> origin  = iofem::getorigin(os);
 
93
  point_basic<float_type> normal  = iofem::getnormal(os);
93
94
  if (black_and_white) {
94
95
    fill = false;
95
96
  }
107
108
  size_type ne      = omega.sizes().ownership_by_dimension[map_dim].size();
108
109
 
109
110
  const numbering<float_type,sequential>& fem = uh.get_space().get_numbering();
110
 
  basis_on_nodal_basis b (fem.get_basis(), omega.get_piola_basis());
 
111
  basis_on_pointset<float_type> b (fem.get_basis(), omega.get_piola_basis());
111
112
  //
112
113
  // 2) output data
113
114
  //
227
228
  string tmp = get_tmpdir() + "/";
228
229
  if (!clean) tmp = "";
229
230
#ifdef TO_CLEAN
230
 
  point origin  = iofem::getorigin(os);
231
 
  point normal  = iofem::getnormal(os);
 
231
  point_basic<float_type> origin  = iofem::getorigin(os);
 
232
  point_basic<float_type> normal  = iofem::getnormal(os);
232
233
#endif // TO_CLEAN
233
234
  //
234
235
  // 2) output data
319
320
      case 2: {
320
321
        // project in 1D space
321
322
        gamma_cut.set_dimension (1);
322
 
        point_basic<T> tangent = point(normal[1], -normal[0]);
 
323
        point_basic<T> tangent = point_basic<T>(normal[1], -normal[0]);
323
324
        array<node_type,sequential> node = gamma_cut.get_nodes();
324
325
        for (size_type i = 0, n = node.size(); i < n; i++) {
325
326
          node[i] = point_basic<T> (dot(node[i], tangent), 0);
329
330
      }
330
331
      case 3: {
331
332
        gamma_cut.set_dimension (2);
332
 
        point_basic<T> t1 = point(1, 0, 0);
333
 
        if (norm(vect(t1, normal)) == Float(0)) t1 = point(0, 1, 0);
 
333
        point_basic<T> t1 = point_basic<T>(1, 0, 0);
 
334
        if (norm(vect(t1, normal)) == Float(0)) t1 = point_basic<T>(0, 1, 0);
334
335
        t1 = t1 - dot(t1,normal)*normal;
335
336
        t1 = t1 / norm(t1);
336
337
        point_basic<T> t2 = vect(normal,t1);
337
338
        array<node_type,sequential> node = gamma_cut.get_nodes();
338
339
        for (size_type i = 0, n = node.size(); i < n; i++) {
339
 
          node[i] = point (dot(node[i] - origin, t1), dot(node[i] - origin, t2), 0);
 
340
          node[i] = point_basic<T> (dot(node[i] - origin, t1), dot(node[i] - origin, t2), 0);
340
341
        }
341
342
        gamma_cut.set_nodes (node); 
342
343
        break;