~ubuntu-branches/ubuntu/wily/rheolef/wily

« back to all changes in this revision

Viewing changes to nfem/plib/field_seq_put_vtk.cc

  • Committer: Package Import Robot
  • Author(s): Pierre Saramito, Pierre Saramito, Sylvestre Ledru
  • Date: 2013-04-30 11:29:51 UTC
  • mfrom: (1.2.1) (11.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130430112951-g69nuqin77t75dek
Tags: 6.4-1
[ Pierre Saramito ]
* New upstream release 6.4 (major changes):
  - new powerful c++ expressions for FEM specifications
  - configure script improved (portability increased)
  - minor bug fixes
* control:
  - all architectures are considered (armel & armhf are back)
  - no more circular-dependency librheolef-dev <--> rheolef
* rules: add security compiler flags (hardening and -W,-l,relro)
* watch: include an updated version, thanks to B. Martens <bartm@debian.org>
* copyright: various file format fixes

[ Sylvestre Ledru ]
*  Standards-Version updated to 3.9.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
//
28
28
#include "rheolef/field.h"
29
29
#include "rheolef/field_expr_ops.h"
 
30
#include "rheolef/field_nonlinear_expr_ops.h"
 
31
#include "rheolef/interpolate.h"
30
32
#include "rheolef/piola.h"
31
33
#include "rheolef/rheostream.h"
32
34
#include "rheolef/iorheo.h"
119
121
  for (size_type i_comp = 0; i_comp < n_comp; i_comp++) {
120
122
    uh_comp[i_comp] = uh[i_comp];
121
123
  }
122
 
  put_vtk_scalar_values (ods, norm(uh), name+"_norm", put_header);
 
124
  space_basic<T,sequential> Xh (uh.get_geo(), uh.get_approx());
 
125
  field_basic<T,sequential> norm_uh = interpolate (Xh, norm(uh));
 
126
  put_vtk_scalar_values (ods, norm_uh, name+"_norm", put_header);
123
127
  vtk << setprecision(numeric_limits<T>::digits10)
124
128
      << "VECTORS " << name << " float" << endl;
125
129
  std::vector<T> u_dof (n_comp);
143
147
{
144
148
  typedef typename field_basic<T,sequential>::size_type size_type;
145
149
  ostream& vtk = ods.os();
146
 
  put_vtk_scalar_values (ods, norm(tau_h), name+"_norm", put_header);
 
150
  space_basic<T,sequential> Xh (tau_h.get_geo(), tau_h.get_approx());
 
151
  field_basic<T,sequential> norm_tau_h = interpolate (Xh, norm(tau_h));
 
152
  put_vtk_scalar_values (ods, norm_tau_h, name+"_norm", put_header);
147
153
  vtk << setprecision(numeric_limits<T>::digits10)
148
154
      << "TENSORS " << name << " float" << endl;
149
155
  size_type d = tau_h.get_geo().dimension();
198
204
    if (put_geo) {
199
205
      geo_put_vtk (ods, vh.get_geo(), order, vh.get_geo().get_nodes(), false);
200
206
    }
201
 
  } else if (order <= degree && ! uh.get_space().get_numbering().is_discontinuous()) {
 
207
  } else if (order <= degree && ! uh.get_space().get_numbering().has_compact_support_inside_element()) {
202
208
    vh = uh;
203
209
    if (put_geo) {
204
210
      geo_put_vtk (ods, vh.get_geo(), degree, vh.get_space().get_xdofs(), false);
206
212
  } else { // order > degree or discontinuous
207
213
    // re-interpolate uh on the finer mesh lattice (eg P1d field on a P2 mesh)
208
214
    std::string approx = "P" + itos(order);
209
 
    if (uh.get_space().get_numbering().is_discontinuous()) approx += "d";
 
215
    if (uh.get_space().get_numbering().has_compact_support_inside_element()) approx += "d";
210
216
    space_basic<T,sequential> Vh (uh.get_geo(), approx, uh.get_space().valued());
211
217
    vh = interpolate (Vh, uh);
212
218
    if (put_geo) {