28#include "rheolef/field.h"
29#include "rheolef/piola_util.h"
30#include "rheolef/rheostream.h"
31#include "rheolef/iorheo.h"
32#include "rheolef/field_evaluate.h"
33#include "rheolef/space_component.h"
34#include "rheolef/field_expr.h"
44 if (name ==
"") { name = uh.
get_space().valued(); }
46 gmsh << setprecision(numeric_limits<T>::digits10);
48 "gmsh: unsupported " << uh.
get_space().get_basis().name() <<
" approximation");
50 "gmsh: unsupported geo order > 1");
79 gmsh <<
"View \"" << name <<
"\" {" << endl;
93 for (
size_type ie = 0, ne = omega.size(); ie < ne; ie++) {
96 for (
size_type iloc = 0, nloc = K.
size(); iloc < nloc; iloc++) {
98 for (
size_type i_comp = 0; i_comp < 3; i_comp++) {
100 if (i_comp != 2)
gmsh <<
",";
102 if (iloc != nloc-1)
gmsh <<
",";
105 for (
size_type iloc = 0, nloc = K.
size(); iloc < nloc; iloc++) {
107 if (iloc != nloc-1)
gmsh <<
",";
109 gmsh <<
"};" << endl;
126 for (
size_type i_comp = 0; i_comp <
d; i_comp++) {
127 for (
size_type j_comp = 0; j_comp <
d; j_comp++) {
128 uh_comp[i_comp][j_comp].proxy_assign(uh(i_comp,j_comp));
132#define HAVE_ID_DEFAULT_TENSOR
133#ifdef HAVE_ID_DEFAULT_TENSOR
135 value (0,0) = value (1,1) = value (2,2) = 1;
137 for (
size_type ie = 0, ne = omega.size(); ie < ne; ie++) {
140 for (
size_type iloc = 0, nloc = K.
size(); iloc < nloc; iloc++) {
142 for (
size_type i_comp = 0; i_comp < 3; i_comp++) {
144 if (i_comp != 2)
gmsh <<
",";
146 if (iloc != nloc-1)
gmsh <<
",";
149 for (
size_type iloc = 0, nloc = K.
size(); iloc < nloc; iloc++) {
152 for (
size_type i_comp = 0; i_comp <
d; i_comp++) {
153 for (
size_type j_comp = 0; j_comp <
d; j_comp++) {
154 value(i_comp,j_comp) = uh (i_comp,j_comp).
dof (inod);
156 for (
size_type i_comp = 0; i_comp < 3; i_comp++) {
157 for (
size_type j_comp = 0; j_comp < 3; j_comp++) {
158 gmsh << value(i_comp,j_comp);
159 if (i_comp != 2 || j_comp != 2 || iloc != nloc-1)
gmsh <<
",";
162 gmsh <<
"};" << endl;
166 default:
error_macro (
"put_gmsh: do not known how to print " << uh.
valued() <<
"-valued field");
168 gmsh <<
"};" << endl;
field::size_type size_type
const geo_type & get_geo() const
const space_type & get_space() const
const std::string & valued() const
generic mesh with rerefence counting
see the geo_element page for the full documentation
variant_type variant() const
odiststream: see the diststream page for the full documentation
static const variant_type H
static const variant_type q
static const variant_type e
static const variant_type max_variant
static const variant_type p
static const variant_type T
static const variant_type P
static const variant_type t
#define error_macro(message)
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
verbose clean transpose logscale grid shrink ball stereo iso volume skipvtk deformation fastfieldload lattice reader_on_stdin color format format format format format format gmsh
This file is part of Rheolef.
odiststream & field_put_gmsh_pos(odiststream &, const field_basic< T, sequential > &)
template odiststream & field_put_gmsh_pos< Float >(odiststream &, const field_basic< Float, sequential > &, std::string)