/usr/lib/python2.7/dist-packages/dolfin/cpp/io.py is in python-dolfin 1.3.0+dfsg-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.11
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (3,0,0):
new_instancemethod = lambda func, inst, cls: _io.SWIG_PyInstanceMethod_New(func)
else:
from new import instancemethod as new_instancemethod
if version_info >= (2,6,0):
def swig_import_helper():
from os.path import dirname
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_io', [dirname(__file__)])
except ImportError:
import _io
return _io
if fp is not None:
try:
_mod = imp.load_module('_io', fp, pathname, description)
finally:
fp.close()
return _mod
_io = swig_import_helper()
del swig_import_helper
else:
import _io
del version_info
try:
_swig_property = property
except NameError:
pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "thisown"): return self.this.own(value)
if (name == "this"):
if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value)
if (not static):
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self,class_type,name,value):
return _swig_setattr_nondynamic(self,class_type,name,value,0)
def _swig_getattr(self,class_type,name):
if (name == "thisown"): return self.this.own()
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
raise AttributeError(name)
def _swig_repr(self):
try: strthis = "proxy of " + self.this.__repr__()
except: strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
try:
_object = object
_newclass = 1
except AttributeError:
class _object : pass
_newclass = 0
def _swig_setattr_nondynamic_method(set):
def set_attr(self,name,value):
if (name == "thisown"): return self.this.own(value)
if hasattr(self,name) or (name == "this"):
set(self,name,value)
else:
raise AttributeError("You cannot add attributes to %s" % self)
return set_attr
try:
import weakref
weakref_proxy = weakref.proxy
except:
weakref_proxy = lambda x: x
SHARED_PTR_DISOWN = _io.SHARED_PTR_DISOWN
import ufc
def _attach_base_to_numpy_array(*args):
return _io._attach_base_to_numpy_array(*args)
_attach_base_to_numpy_array = _io._attach_base_to_numpy_array
def dolfin_swigversion(*args):
return _io.dolfin_swigversion(*args)
dolfin_swigversion = _io.dolfin_swigversion
tmp = hex(dolfin_swigversion())
__swigversion__ = "%d.%d.%d"%(tuple(map(int, [tmp[-5], tmp[-3], tmp[-2:]])))
del tmp, dolfin_swigversion
def has_petsc4py(*args):
return _io.has_petsc4py(*args)
has_petsc4py = _io.has_petsc4py
import common
import la
class HierarchicalMeshFunctionUInt(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
_io.HierarchicalMeshFunctionUInt_swiginit(self,_io.new_HierarchicalMeshFunctionUInt(*args))
__swig_destroy__ = _io.delete_HierarchicalMeshFunctionUInt
HierarchicalMeshFunctionUInt.depth = new_instancemethod(_io.HierarchicalMeshFunctionUInt_depth,None,HierarchicalMeshFunctionUInt)
HierarchicalMeshFunctionUInt.has_parent = new_instancemethod(_io.HierarchicalMeshFunctionUInt_has_parent,None,HierarchicalMeshFunctionUInt)
HierarchicalMeshFunctionUInt.has_child = new_instancemethod(_io.HierarchicalMeshFunctionUInt_has_child,None,HierarchicalMeshFunctionUInt)
HierarchicalMeshFunctionUInt._parent = new_instancemethod(_io.HierarchicalMeshFunctionUInt__parent,None,HierarchicalMeshFunctionUInt)
HierarchicalMeshFunctionUInt._child = new_instancemethod(_io.HierarchicalMeshFunctionUInt__child,None,HierarchicalMeshFunctionUInt)
HierarchicalMeshFunctionUInt._root_node = new_instancemethod(_io.HierarchicalMeshFunctionUInt__root_node,None,HierarchicalMeshFunctionUInt)
HierarchicalMeshFunctionUInt._leaf_node = new_instancemethod(_io.HierarchicalMeshFunctionUInt__leaf_node,None,HierarchicalMeshFunctionUInt)
HierarchicalMeshFunctionUInt.set_parent = new_instancemethod(_io.HierarchicalMeshFunctionUInt_set_parent,None,HierarchicalMeshFunctionUInt)
HierarchicalMeshFunctionUInt.clear_child = new_instancemethod(_io.HierarchicalMeshFunctionUInt_clear_child,None,HierarchicalMeshFunctionUInt)
HierarchicalMeshFunctionUInt.set_child = new_instancemethod(_io.HierarchicalMeshFunctionUInt_set_child,None,HierarchicalMeshFunctionUInt)
HierarchicalMeshFunctionUInt._debug = new_instancemethod(_io.HierarchicalMeshFunctionUInt__debug,None,HierarchicalMeshFunctionUInt)
HierarchicalMeshFunctionUInt_swigregister = _io.HierarchicalMeshFunctionUInt_swigregister
HierarchicalMeshFunctionUInt_swigregister(HierarchicalMeshFunctionUInt)
class HierarchicalMeshFunctionInt(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
_io.HierarchicalMeshFunctionInt_swiginit(self,_io.new_HierarchicalMeshFunctionInt(*args))
__swig_destroy__ = _io.delete_HierarchicalMeshFunctionInt
HierarchicalMeshFunctionInt.depth = new_instancemethod(_io.HierarchicalMeshFunctionInt_depth,None,HierarchicalMeshFunctionInt)
HierarchicalMeshFunctionInt.has_parent = new_instancemethod(_io.HierarchicalMeshFunctionInt_has_parent,None,HierarchicalMeshFunctionInt)
HierarchicalMeshFunctionInt.has_child = new_instancemethod(_io.HierarchicalMeshFunctionInt_has_child,None,HierarchicalMeshFunctionInt)
HierarchicalMeshFunctionInt._parent = new_instancemethod(_io.HierarchicalMeshFunctionInt__parent,None,HierarchicalMeshFunctionInt)
HierarchicalMeshFunctionInt._child = new_instancemethod(_io.HierarchicalMeshFunctionInt__child,None,HierarchicalMeshFunctionInt)
HierarchicalMeshFunctionInt._root_node = new_instancemethod(_io.HierarchicalMeshFunctionInt__root_node,None,HierarchicalMeshFunctionInt)
HierarchicalMeshFunctionInt._leaf_node = new_instancemethod(_io.HierarchicalMeshFunctionInt__leaf_node,None,HierarchicalMeshFunctionInt)
HierarchicalMeshFunctionInt.set_parent = new_instancemethod(_io.HierarchicalMeshFunctionInt_set_parent,None,HierarchicalMeshFunctionInt)
HierarchicalMeshFunctionInt.clear_child = new_instancemethod(_io.HierarchicalMeshFunctionInt_clear_child,None,HierarchicalMeshFunctionInt)
HierarchicalMeshFunctionInt.set_child = new_instancemethod(_io.HierarchicalMeshFunctionInt_set_child,None,HierarchicalMeshFunctionInt)
HierarchicalMeshFunctionInt._debug = new_instancemethod(_io.HierarchicalMeshFunctionInt__debug,None,HierarchicalMeshFunctionInt)
HierarchicalMeshFunctionInt_swigregister = _io.HierarchicalMeshFunctionInt_swigregister
HierarchicalMeshFunctionInt_swigregister(HierarchicalMeshFunctionInt)
class HierarchicalMeshFunctionDouble(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
_io.HierarchicalMeshFunctionDouble_swiginit(self,_io.new_HierarchicalMeshFunctionDouble(*args))
__swig_destroy__ = _io.delete_HierarchicalMeshFunctionDouble
HierarchicalMeshFunctionDouble.depth = new_instancemethod(_io.HierarchicalMeshFunctionDouble_depth,None,HierarchicalMeshFunctionDouble)
HierarchicalMeshFunctionDouble.has_parent = new_instancemethod(_io.HierarchicalMeshFunctionDouble_has_parent,None,HierarchicalMeshFunctionDouble)
HierarchicalMeshFunctionDouble.has_child = new_instancemethod(_io.HierarchicalMeshFunctionDouble_has_child,None,HierarchicalMeshFunctionDouble)
HierarchicalMeshFunctionDouble._parent = new_instancemethod(_io.HierarchicalMeshFunctionDouble__parent,None,HierarchicalMeshFunctionDouble)
HierarchicalMeshFunctionDouble._child = new_instancemethod(_io.HierarchicalMeshFunctionDouble__child,None,HierarchicalMeshFunctionDouble)
HierarchicalMeshFunctionDouble._root_node = new_instancemethod(_io.HierarchicalMeshFunctionDouble__root_node,None,HierarchicalMeshFunctionDouble)
HierarchicalMeshFunctionDouble._leaf_node = new_instancemethod(_io.HierarchicalMeshFunctionDouble__leaf_node,None,HierarchicalMeshFunctionDouble)
HierarchicalMeshFunctionDouble.set_parent = new_instancemethod(_io.HierarchicalMeshFunctionDouble_set_parent,None,HierarchicalMeshFunctionDouble)
HierarchicalMeshFunctionDouble.clear_child = new_instancemethod(_io.HierarchicalMeshFunctionDouble_clear_child,None,HierarchicalMeshFunctionDouble)
HierarchicalMeshFunctionDouble.set_child = new_instancemethod(_io.HierarchicalMeshFunctionDouble_set_child,None,HierarchicalMeshFunctionDouble)
HierarchicalMeshFunctionDouble._debug = new_instancemethod(_io.HierarchicalMeshFunctionDouble__debug,None,HierarchicalMeshFunctionDouble)
HierarchicalMeshFunctionDouble_swigregister = _io.HierarchicalMeshFunctionDouble_swigregister
HierarchicalMeshFunctionDouble_swigregister(HierarchicalMeshFunctionDouble)
class HierarchicalMeshFunctionBool(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
_io.HierarchicalMeshFunctionBool_swiginit(self,_io.new_HierarchicalMeshFunctionBool(*args))
__swig_destroy__ = _io.delete_HierarchicalMeshFunctionBool
HierarchicalMeshFunctionBool.depth = new_instancemethod(_io.HierarchicalMeshFunctionBool_depth,None,HierarchicalMeshFunctionBool)
HierarchicalMeshFunctionBool.has_parent = new_instancemethod(_io.HierarchicalMeshFunctionBool_has_parent,None,HierarchicalMeshFunctionBool)
HierarchicalMeshFunctionBool.has_child = new_instancemethod(_io.HierarchicalMeshFunctionBool_has_child,None,HierarchicalMeshFunctionBool)
HierarchicalMeshFunctionBool._parent = new_instancemethod(_io.HierarchicalMeshFunctionBool__parent,None,HierarchicalMeshFunctionBool)
HierarchicalMeshFunctionBool._child = new_instancemethod(_io.HierarchicalMeshFunctionBool__child,None,HierarchicalMeshFunctionBool)
HierarchicalMeshFunctionBool._root_node = new_instancemethod(_io.HierarchicalMeshFunctionBool__root_node,None,HierarchicalMeshFunctionBool)
HierarchicalMeshFunctionBool._leaf_node = new_instancemethod(_io.HierarchicalMeshFunctionBool__leaf_node,None,HierarchicalMeshFunctionBool)
HierarchicalMeshFunctionBool.set_parent = new_instancemethod(_io.HierarchicalMeshFunctionBool_set_parent,None,HierarchicalMeshFunctionBool)
HierarchicalMeshFunctionBool.clear_child = new_instancemethod(_io.HierarchicalMeshFunctionBool_clear_child,None,HierarchicalMeshFunctionBool)
HierarchicalMeshFunctionBool.set_child = new_instancemethod(_io.HierarchicalMeshFunctionBool_set_child,None,HierarchicalMeshFunctionBool)
HierarchicalMeshFunctionBool._debug = new_instancemethod(_io.HierarchicalMeshFunctionBool__debug,None,HierarchicalMeshFunctionBool)
HierarchicalMeshFunctionBool_swigregister = _io.HierarchicalMeshFunctionBool_swigregister
HierarchicalMeshFunctionBool_swigregister(HierarchicalMeshFunctionBool)
class HierarchicalMeshFunctionSizet(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
_io.HierarchicalMeshFunctionSizet_swiginit(self,_io.new_HierarchicalMeshFunctionSizet(*args))
__swig_destroy__ = _io.delete_HierarchicalMeshFunctionSizet
HierarchicalMeshFunctionSizet.depth = new_instancemethod(_io.HierarchicalMeshFunctionSizet_depth,None,HierarchicalMeshFunctionSizet)
HierarchicalMeshFunctionSizet.has_parent = new_instancemethod(_io.HierarchicalMeshFunctionSizet_has_parent,None,HierarchicalMeshFunctionSizet)
HierarchicalMeshFunctionSizet.has_child = new_instancemethod(_io.HierarchicalMeshFunctionSizet_has_child,None,HierarchicalMeshFunctionSizet)
HierarchicalMeshFunctionSizet._parent = new_instancemethod(_io.HierarchicalMeshFunctionSizet__parent,None,HierarchicalMeshFunctionSizet)
HierarchicalMeshFunctionSizet._child = new_instancemethod(_io.HierarchicalMeshFunctionSizet__child,None,HierarchicalMeshFunctionSizet)
HierarchicalMeshFunctionSizet._root_node = new_instancemethod(_io.HierarchicalMeshFunctionSizet__root_node,None,HierarchicalMeshFunctionSizet)
HierarchicalMeshFunctionSizet._leaf_node = new_instancemethod(_io.HierarchicalMeshFunctionSizet__leaf_node,None,HierarchicalMeshFunctionSizet)
HierarchicalMeshFunctionSizet.set_parent = new_instancemethod(_io.HierarchicalMeshFunctionSizet_set_parent,None,HierarchicalMeshFunctionSizet)
HierarchicalMeshFunctionSizet.clear_child = new_instancemethod(_io.HierarchicalMeshFunctionSizet_clear_child,None,HierarchicalMeshFunctionSizet)
HierarchicalMeshFunctionSizet.set_child = new_instancemethod(_io.HierarchicalMeshFunctionSizet_set_child,None,HierarchicalMeshFunctionSizet)
HierarchicalMeshFunctionSizet._debug = new_instancemethod(_io.HierarchicalMeshFunctionSizet__debug,None,HierarchicalMeshFunctionSizet)
HierarchicalMeshFunctionSizet_swigregister = _io.HierarchicalMeshFunctionSizet_swigregister
HierarchicalMeshFunctionSizet_swigregister(HierarchicalMeshFunctionSizet)
class HierarchicalMesh(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
_io.HierarchicalMesh_swiginit(self,_io.new_HierarchicalMesh(*args))
__swig_destroy__ = _io.delete_HierarchicalMesh
HierarchicalMesh.depth = new_instancemethod(_io.HierarchicalMesh_depth,None,HierarchicalMesh)
HierarchicalMesh.has_parent = new_instancemethod(_io.HierarchicalMesh_has_parent,None,HierarchicalMesh)
HierarchicalMesh.has_child = new_instancemethod(_io.HierarchicalMesh_has_child,None,HierarchicalMesh)
HierarchicalMesh._parent = new_instancemethod(_io.HierarchicalMesh__parent,None,HierarchicalMesh)
HierarchicalMesh._child = new_instancemethod(_io.HierarchicalMesh__child,None,HierarchicalMesh)
HierarchicalMesh._root_node = new_instancemethod(_io.HierarchicalMesh__root_node,None,HierarchicalMesh)
HierarchicalMesh._leaf_node = new_instancemethod(_io.HierarchicalMesh__leaf_node,None,HierarchicalMesh)
HierarchicalMesh.set_parent = new_instancemethod(_io.HierarchicalMesh_set_parent,None,HierarchicalMesh)
HierarchicalMesh.clear_child = new_instancemethod(_io.HierarchicalMesh_clear_child,None,HierarchicalMesh)
HierarchicalMesh.set_child = new_instancemethod(_io.HierarchicalMesh_set_child,None,HierarchicalMesh)
HierarchicalMesh._debug = new_instancemethod(_io.HierarchicalMesh__debug,None,HierarchicalMesh)
HierarchicalMesh_swigregister = _io.HierarchicalMesh_swigregister
HierarchicalMesh_swigregister(HierarchicalMesh)
import mesh
class HierarchicalFunctionSpace(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
_io.HierarchicalFunctionSpace_swiginit(self,_io.new_HierarchicalFunctionSpace(*args))
__swig_destroy__ = _io.delete_HierarchicalFunctionSpace
HierarchicalFunctionSpace.depth = new_instancemethod(_io.HierarchicalFunctionSpace_depth,None,HierarchicalFunctionSpace)
HierarchicalFunctionSpace.has_parent = new_instancemethod(_io.HierarchicalFunctionSpace_has_parent,None,HierarchicalFunctionSpace)
HierarchicalFunctionSpace.has_child = new_instancemethod(_io.HierarchicalFunctionSpace_has_child,None,HierarchicalFunctionSpace)
HierarchicalFunctionSpace._parent = new_instancemethod(_io.HierarchicalFunctionSpace__parent,None,HierarchicalFunctionSpace)
HierarchicalFunctionSpace._child = new_instancemethod(_io.HierarchicalFunctionSpace__child,None,HierarchicalFunctionSpace)
HierarchicalFunctionSpace._root_node = new_instancemethod(_io.HierarchicalFunctionSpace__root_node,None,HierarchicalFunctionSpace)
HierarchicalFunctionSpace._leaf_node = new_instancemethod(_io.HierarchicalFunctionSpace__leaf_node,None,HierarchicalFunctionSpace)
HierarchicalFunctionSpace.set_parent = new_instancemethod(_io.HierarchicalFunctionSpace_set_parent,None,HierarchicalFunctionSpace)
HierarchicalFunctionSpace.clear_child = new_instancemethod(_io.HierarchicalFunctionSpace_clear_child,None,HierarchicalFunctionSpace)
HierarchicalFunctionSpace.set_child = new_instancemethod(_io.HierarchicalFunctionSpace_set_child,None,HierarchicalFunctionSpace)
HierarchicalFunctionSpace._debug = new_instancemethod(_io.HierarchicalFunctionSpace__debug,None,HierarchicalFunctionSpace)
HierarchicalFunctionSpace_swigregister = _io.HierarchicalFunctionSpace_swigregister
HierarchicalFunctionSpace_swigregister(HierarchicalFunctionSpace)
class HierarchicalFunction(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
_io.HierarchicalFunction_swiginit(self,_io.new_HierarchicalFunction(*args))
__swig_destroy__ = _io.delete_HierarchicalFunction
HierarchicalFunction.depth = new_instancemethod(_io.HierarchicalFunction_depth,None,HierarchicalFunction)
HierarchicalFunction.has_parent = new_instancemethod(_io.HierarchicalFunction_has_parent,None,HierarchicalFunction)
HierarchicalFunction.has_child = new_instancemethod(_io.HierarchicalFunction_has_child,None,HierarchicalFunction)
HierarchicalFunction._parent = new_instancemethod(_io.HierarchicalFunction__parent,None,HierarchicalFunction)
HierarchicalFunction._child = new_instancemethod(_io.HierarchicalFunction__child,None,HierarchicalFunction)
HierarchicalFunction._root_node = new_instancemethod(_io.HierarchicalFunction__root_node,None,HierarchicalFunction)
HierarchicalFunction._leaf_node = new_instancemethod(_io.HierarchicalFunction__leaf_node,None,HierarchicalFunction)
HierarchicalFunction.set_parent = new_instancemethod(_io.HierarchicalFunction_set_parent,None,HierarchicalFunction)
HierarchicalFunction.clear_child = new_instancemethod(_io.HierarchicalFunction_clear_child,None,HierarchicalFunction)
HierarchicalFunction.set_child = new_instancemethod(_io.HierarchicalFunction_set_child,None,HierarchicalFunction)
HierarchicalFunction._debug = new_instancemethod(_io.HierarchicalFunction__debug,None,HierarchicalFunction)
HierarchicalFunction_swigregister = _io.HierarchicalFunction_swigregister
HierarchicalFunction_swigregister(HierarchicalFunction)
import function
import fem
def interactive(*args):
"""
Make the current plots interactive. If really is set, the interactive
mode is entered even if 'Q' has been pressed.
"""
return _io.interactive(*args)
def plot(*args):
"""
**Overloaded versions**
* plot\ (Variable>, title="", mode="auto")
Plot variable (shared_ptr version)
* plot\ (Variable&, parameters)
Plot variable (parameter version)
* plot\ (Variable>, parameters)
Plot variable (parameter, shared_ptr version)
* plot\ (expression, mesh, title="", mode="auto")
Plot expression
* plot\ (expression, mesh, title="", mode="auto")
Plot expression (shared_ptr version)
* plot\ (expression, mesh, parameters)
Plot expression (parameter version)
* plot\ (expression, mesh, parameters)
Plot expression (parameter, shared_ptr version)
"""
return _io.plot(*args)
class VTKPlotter(common.Variable):
"""
This class enables visualization of various DOLFIN entities.
It supports visualization of meshes, functions, expressions, boundary
conditions and mesh functions. It can plot data wrapped in classes
conforming to the GenericVTKPlottable interface.
The plotter has several parameters that the user can set and adjust to
affect the appearance and behavior of the plot.
A plotter can be created and used in the following way:
Mesh mesh = ...;
VTKPlotter plotter(mesh);
plotter.plot();
Parameters can be adjusted at any time and will take effect on the next
call to the plot() method. The following parameters exist:
============== ============ ================ ====================================
Name Value type Default value Description
============== ============ ================ ====================================
mode String "auto" For vector valued functions,
this parameter may be set to
"glyphs" or "displacement".
Scalars may be set to "warp" in
2D only. A value of "color" is
valid in all cases; for vectors,
the norms are used. See below for
a summary of default modes,
used when set to "auto".
interactive Boolean False Enable/disable interactive mode
for the rendering window.
For repeated plots of the same
object (animated plots), this
parameter should be set to false.
wireframe Boolean True for Enable/disable wireframe
meshes, else rendering of the object.
false
title String Inherited The title of the rendering
from the window
name/label of
the object
scale Double 1.0 Adjusts the scaling of the
warping and glyphs
scalarbar Boolean False for Hide/show the colormapping bar
meshes, else
true
axes Boolean False Show X-Y-Z axes.
rescale Boolean True Enable/disable recomputation
of the scalar to color mapping
on every iteration when performing
repeated/animated plots of the same
data. If both range_min and
range_max are set, this parameter
is ignored.
range_min Double Set lower range of data values.
Disables automatic (re-)computation
of the lower range.
range_max Double Set upper range of data values.
Disables automatic (re-)computation
of the upper range.
elevate Double -65.0 for 2D Set camera elevation.
warped scalars,
0.0 otherwise
prefix String "dolfin_plot_" Filename prefix used when
saving plots to file in
interactive mode. An integer
counter is appended after the
prefix.
helptext Boolean True Enable/disable the hover-over
help-text in interactive
mode
window_width Integer 600 The width of the plotting window
in pixels
window_height Integer 400 The height of the plotting window
in pixels
tile_windows Boolean True Automatically tile plot windows.
key String Key (id) of the plot window, used to
decide if a new plotter should be
created or a current one updated
when called through the static
plot() interface (in plot.h).
If not set, the object's unique
id (Variable::id) is used.
input_keys String "" Synthesize key presses, as if these
keys are pressed by the user in
the plot window.
For example: "ww++m" shows the data
as large points on a wireframe
mesh.
hide_above Double If either of these are set, scalar
hide_below Double values above or below will not be
shown in the plot.
============== ============ ================ ====================================
The default visualization mode for the different plot types are as follows:
========================= ============================ =====================
Plot type Default visualization mode Alternatives
========================= ============================ =====================
Meshes Wireframe rendering None
2D scalar functions Scalar warping Color mapping
3D scalar functions Color mapping None
2D/3D vector functions Glyphs (vector arrows) Displacements,
Color mapping (norm)
========================= ============================ =====================
Expressions and boundary conditions are also visualized according to the
above table.
"""
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
**Overloaded versions**
* VTKPlotter\ (Variable>, NULL)
Create plotter for a variable. If a widget is supplied, this widget
will be used for drawing, instead of a new top-level widget. Ownership
is transferred.
* VTKPlotter\ (expression, mesh, NULL)
Create plotter for an Expression with associated Mesh. If a widget is
supplied, this widget will be used for drawing, instead of a new
top-level widget. Ownership is transferred.
"""
_io.VTKPlotter_swiginit(self,_io.new_VTKPlotter(*args))
__swig_destroy__ = _io.delete_VTKPlotter
def default_parameters(*args):
"""
Default parameter values
"""
return _io.VTKPlotter_default_parameters(*args)
default_parameters = staticmethod(default_parameters)
def plot(self, *args):
"""
Plot the object
"""
return _io.VTKPlotter_plot(self, *args)
def interactive(self, *args):
"""
Make the current plot interactive
"""
return _io.VTKPlotter_interactive(self, *args)
def write_png(self, *args):
"""
Save plot to PNG file (file suffix appended automatically, filename
optionally built from prefix)
"""
return _io.VTKPlotter_write_png(self, *args)
def write_pdf(self, *args):
"""
Save plot to PDF file (file suffix appended automatically, filename
optionally built from prefix)
"""
return _io.VTKPlotter_write_pdf(self, *args)
def key(self, *args):
"""
Return key (i.e., plotter id) of the object to plot
"""
return _io.VTKPlotter_key(self, *args)
def set_key(self, *args):
"""
Set the key (plotter id)
"""
return _io.VTKPlotter_set_key(self, *args)
def to_key(*args):
"""
Return default key (plotter id) of a Variable (object to plot).
"""
return _io.VTKPlotter_to_key(*args)
to_key = staticmethod(to_key)
def azimuth(self, *args):
"""
Camera control
"""
return _io.VTKPlotter_azimuth(self, *args)
def all_interactive(*args):
"""
Make all plot windows interactive. If really is set, the interactive
mode is entered even if 'Q' has been pressed.
"""
return _io.VTKPlotter_all_interactive(*args)
all_interactive = staticmethod(all_interactive)
SHIFT = _io.VTKPlotter_SHIFT
ALT = _io.VTKPlotter_ALT
CONTROL = _io.VTKPlotter_CONTROL
VTKPlotter.is_compatible = new_instancemethod(_io.VTKPlotter_is_compatible,None,VTKPlotter)
VTKPlotter.plot = new_instancemethod(_io.VTKPlotter_plot,None,VTKPlotter)
VTKPlotter.update = new_instancemethod(_io.VTKPlotter_update,None,VTKPlotter)
VTKPlotter.interactive = new_instancemethod(_io.VTKPlotter_interactive,None,VTKPlotter)
VTKPlotter.write_png = new_instancemethod(_io.VTKPlotter_write_png,None,VTKPlotter)
VTKPlotter.write_pdf = new_instancemethod(_io.VTKPlotter_write_pdf,None,VTKPlotter)
VTKPlotter.key = new_instancemethod(_io.VTKPlotter_key,None,VTKPlotter)
VTKPlotter.set_key = new_instancemethod(_io.VTKPlotter_set_key,None,VTKPlotter)
VTKPlotter.azimuth = new_instancemethod(_io.VTKPlotter_azimuth,None,VTKPlotter)
VTKPlotter.elevate = new_instancemethod(_io.VTKPlotter_elevate,None,VTKPlotter)
VTKPlotter.dolly = new_instancemethod(_io.VTKPlotter_dolly,None,VTKPlotter)
VTKPlotter.zoom = new_instancemethod(_io.VTKPlotter_zoom,None,VTKPlotter)
VTKPlotter.set_viewangle = new_instancemethod(_io.VTKPlotter_set_viewangle,None,VTKPlotter)
VTKPlotter.set_min_max = new_instancemethod(_io.VTKPlotter_set_min_max,None,VTKPlotter)
VTKPlotter.add_polygon = new_instancemethod(_io.VTKPlotter_add_polygon,None,VTKPlotter)
VTKPlotter.key_pressed = new_instancemethod(_io.VTKPlotter_key_pressed,None,VTKPlotter)
VTKPlotter.get_widget = new_instancemethod(_io.VTKPlotter_get_widget,None,VTKPlotter)
VTKPlotter_swigregister = _io.VTKPlotter_swigregister
VTKPlotter_swigregister(VTKPlotter)
def VTKPlotter_default_parameters(*args):
"""
Default parameter values
"""
return _io.VTKPlotter_default_parameters(*args)
def VTKPlotter_to_key(*args):
"""
Return default key (plotter id) of a Variable (object to plot).
"""
return _io.VTKPlotter_to_key(*args)
def VTKPlotter_all_interactive(*args):
"""
Make all plot windows interactive. If really is set, the interactive
mode is entered even if 'Q' has been pressed.
"""
return _io.VTKPlotter_all_interactive(*args)
class GenericFile(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
Constructor
"""
_io.GenericFile_swiginit(self,_io.new_GenericFile(*args))
__swig_destroy__ = _io.delete_GenericFile
GenericFile.__rshift__ = new_instancemethod(_io.GenericFile___rshift__,None,GenericFile)
GenericFile.__lshift__ = new_instancemethod(_io.GenericFile___lshift__,None,GenericFile)
GenericFile.read = new_instancemethod(_io.GenericFile_read,None,GenericFile)
GenericFile.write = new_instancemethod(_io.GenericFile_write,None,GenericFile)
GenericFile.name = new_instancemethod(_io.GenericFile_name,None,GenericFile)
GenericFile_swigregister = _io.GenericFile_swigregister
GenericFile_swigregister(GenericFile)
class File(object):
"""
A File represents a data file for reading and writing objects.
Unless specified explicitly, the format is determined by the
file name suffix.
A list of objects that can be read/written to file can be found in
GenericFile.h. Compatible file formats include:
* Binary (.bin)
* RAW (.raw)
* SVG (.svg)
* XD3 (.xd3)
* XDMF (.xdmf)
* XML (.xml)
* XYZ (.xyz)
* VTK (.pvd)
"""
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
x3d = _io.File_x3d
xdmf = _io.File_xdmf
xml = _io.File_xml
vtk = _io.File_vtk
raw = _io.File_raw
xyz = _io.File_xyz
binary = _io.File_binary
svg = _io.File_svg
def __init__(self, *args):
"""
**Overloaded versions**
* File\ (filename, encoding="ascii")
Create a file with given name
*Arguments*
filename (str)
Name of file.
encoding (str)
Optional argument specifying encoding, ascii is default.
*Example*
.. note::
No example code available for this function.
* File\ (filename, type, encoding="ascii")
Create a file with given name and type (format)
*Arguments*
filename (str)
Name of file.
type (Type)
File format.
encoding (str)
Optional argument specifying encoding, ascii is default.
*Example*
.. note::
No example code available for this function.
* File\ (outstream)
Create an outfile object writing to stream
*Arguments*
outstream (std::ostream)
The stream.
"""
_io.File_swiginit(self,_io.new_File(*args))
__swig_destroy__ = _io.delete_File
def exists(*args):
"""
Check if file exists
*Arguments*
filename (str)
Name of file.
*Returns*
bool
True if the file exists.
"""
return _io.File_exists(*args)
exists = staticmethod(exists)
def create_parent_path(*args):
"""
*Arguments*
filename (str)
Name of file / path.
"""
return _io.File_create_parent_path(*args)
create_parent_path = staticmethod(create_parent_path)
def __rshift__(self, *args):
"""
Read from file
"""
return _io.File___rshift__(self, *args)
def __lshift__(self, *args):
"""
**Overloaded versions**
* operator<<\ (Mesh*, mesh)
Write Mesh to file with time
*Example*
.. note::
No example code available for this function.
* operator<<\ (MeshFunction<int>*, f)
Write MeshFunction to file with time
*Example*
.. note::
No example code available for this function.
* operator<<\ (f)
Write MeshFunction to file with time
*Example*
.. note::
No example code available for this function.
* operator<<\ (MeshFunction<double>*, f)
Write MeshFunction to file with time
*Example*
.. note::
No example code available for this function.
* operator<<\ (MeshFunction<bool>*, f)
Write MeshFunction to file with time
*Example*
.. note::
No example code available for this function.
* operator<<\ (Function*, u)
Write Function to file with time
*Example*
.. note::
No example code available for this function.
* operator<<\ (t)
Write object to file
"""
return _io.File___lshift__(self, *args)
File.__rshift__ = new_instancemethod(_io.File___rshift__,None,File)
File.__lshift__ = new_instancemethod(_io.File___lshift__,None,File)
File_swigregister = _io.File_swigregister
File_swigregister(File)
def File_exists(*args):
"""
Check if file exists
*Arguments*
filename (str)
Name of file.
*Returns*
bool
True if the file exists.
"""
return _io.File_exists(*args)
def File_create_parent_path(*args):
"""
*Arguments*
filename (str)
Name of file / path.
"""
return _io.File_create_parent_path(*args)
class XDMFFile(GenericFile,common.Variable):
"""
This class supports the output of meshes and functions in XDMF
(http://www.xdmf.org) format. It creates an XML file that describes
the data and points to a HDF5 file that stores the actual problem
data. Output of data in parallel is supported.
XDMF is not suitable for checkpointing as it may decimate
some data.
"""
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
Constructor
"""
_io.XDMFFile_swiginit(self,_io.new_XDMFFile(*args))
__swig_destroy__ = _io.delete_XDMFFile
def __lshift__(self, *args):
"""
**Overloaded versions**
* operator<<\ (mesh)
Save a mesh for visualisation, with e.g. ParaView. Creates a HDF5
file to store the mesh, and a related XDMF file with metadata.
* operator<<\ (u)
Save a Function to XDMF/HDF5 files for visualisation.
* operator<<\ (Function*, ut)
Save Function + time stamp to file
* operator<<\ (meshfunction)
Save MeshFunction to file
"""
return _io.XDMFFile___lshift__(self, *args)
def __rshift__(self, *args):
"""
**Overloaded versions**
* operator>>\ (mesh)
Read in a mesh from the associated HDF5 file
* operator>>\ (meshfunction)
Read first MeshFunction from file
"""
return _io.XDMFFile___rshift__(self, *args)
XDMFFile.__lshift__ = new_instancemethod(_io.XDMFFile___lshift__,None,XDMFFile)
XDMFFile.__rshift__ = new_instancemethod(_io.XDMFFile___rshift__,None,XDMFFile)
XDMFFile_swigregister = _io.XDMFFile_swigregister
XDMFFile_swigregister(XDMFFile)
class HDF5File(common.Variable):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
Constructor. file_mode should "a" (append), "w" (write) or "r"
(read).
"""
_io.HDF5File_swiginit(self,_io.new_HDF5File(*args))
__swig_destroy__ = _io.delete_HDF5File
def close(self, *args):
"""
Close file
"""
return _io.HDF5File_close(self, *args)
def write(self, *args):
"""
**Overloaded versions**
* write\ (x, name)
Write Vector to file in a format suitable for re-reading
* write\ (mesh, name)
Write Mesh to file in a format suitable for re-reading
* write\ (mesh, cell_dim, name)
Write Mesh of given cell dimension to file in a format
suitable for re-reading
* write\ (u, name)
Write Function to file in a format suitable for re-reading
* write\ (u, name, timestamp)
Write Function to file with a timestamp
* write\ (meshfunction, name)
Write MeshFunction to file in a format suitable for re-reading
* write\ (meshfunction, name)
Write MeshFunction to file in a format suitable for re-reading
* write\ (meshfunction, name)
Write MeshFunction to file in a format suitable for re-reading
* write\ (meshfunction, name)
Write MeshFunction to file in a format suitable for re-reading
* write\ (mesh_values, name)
Write MeshValueCollection to file
* write\ (mesh_values, name)
Write MeshValueCollection to file
* write\ (mesh_values, name)
Write MeshValueCollection to file
"""
return _io.HDF5File_write(self, *args)
def read(self, *args):
"""
**Overloaded versions**
* read\ (x, dataset_name, true)
Read vector from file
* read\ (u, name)
Read Function from file and distribute data according to
the Mesh and dofmap associated with the Function
* read\ (mesh, name)
Read Mesh from file
* read\ (meshfunction, name)
Read MeshFunction from file
* read\ (meshfunction, name)
Read MeshFunction from file
* read\ (meshfunction, name)
Read MeshFunction from file
* read\ (meshfunction, name)
Read MeshFunction from file
* read\ (mesh_values, name)
Read MeshValueCollection from file
* read\ (mesh_values, name)
Read MeshValueCollection from file
* read\ (mesh_values, name)
Read MeshValueCollection from file
"""
return _io.HDF5File_read(self, *args)
def has_dataset(self, *args):
"""
Check if dataset exists in HDF5 file
"""
return _io.HDF5File_has_dataset(self, *args)
def flush(self, *args):
"""
Flush buffered I/O to disk
"""
return _io.HDF5File_flush(self, *args)
HDF5File.close = new_instancemethod(_io.HDF5File_close,None,HDF5File)
HDF5File.write = new_instancemethod(_io.HDF5File_write,None,HDF5File)
HDF5File.read = new_instancemethod(_io.HDF5File_read,None,HDF5File)
HDF5File.has_dataset = new_instancemethod(_io.HDF5File_has_dataset,None,HDF5File)
HDF5File.attributes = new_instancemethod(_io.HDF5File_attributes,None,HDF5File)
HDF5File.flush = new_instancemethod(_io.HDF5File_flush,None,HDF5File)
HDF5File_swigregister = _io.HDF5File_swigregister
HDF5File_swigregister(HDF5File)
class HDF5Attribute(object):
"""
HDF5Attribute gives access to the attributes of a dataset
via set() and get() methods
"""
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
Constructor
"""
_io.HDF5Attribute_swiginit(self,_io.new_HDF5Attribute(*args))
__swig_destroy__ = _io.delete_HDF5Attribute
def exists(self, *args):
"""
Check for the existence of an attribute on a dataset
"""
return _io.HDF5Attribute_exists(self, *args)
def set(self, *args):
"""
**Overloaded versions**
* set\ (attribute_name, value)
Set the value of a double attribute in the HDF5 file
* set\ (attribute_name, value)
Set the value of a double attribute in the HDF5 file
* set\ (attribute_name, value)
Set the value of an array of float attribute in the HDF5 file
* set\ (attribute_name, value)
Set the value of an array of float attribute in the HDF5 file
* set\ (attribute_name, value)
Set the value of a string attribute in the HDF5 file
"""
return _io.HDF5Attribute_set(self, *args)
def get(self, *args):
"""
**Overloaded versions**
* get\ (attribute_name, value)
Set the value of a double attribute in the HDF5 file
* get\ (attribute_name, value)
Get the value of a vector double attribute in the HDF5 file
* get\ (attribute_name, value)
Set the value of a double attribute in the HDF5 file
* get\ (attribute_name, value)
Get the value of a vector double attribute in the HDF5 file
* get\ (attribute_name, value)
Get the value of an attribute in the HDF5 file as a string
"""
return _io.HDF5Attribute_get(self, *args)
def type_str(self, *args):
"""
Get the type of the attribute "string", "float", "int"
"vectorfloat", "vectorint" or "unsupported"
"""
return _io.HDF5Attribute_type_str(self, *args)
def str(self, *args):
"""
**Overloaded versions**
* str\ (attribute_name)
Get the value of the attribute in the HDF5 file
as a string representation
* str\ ()
Get the names of all the attributes on this dataset
"""
return _io.HDF5Attribute_str(self, *args)
def __getitem__(self, key):
attr_type = self.type_str(key)
if attr_type=="string":
return self.str(key)
elif attr_type=="float":
return float(self.str(key))
elif attr_type=="int":
return int(self.str(key))
elif attr_type=="vectorfloat":
return [float(x) for x in self.str(key).split(",")]
elif attr_type=="vectorint":
return [int(x) for x in self.str(key).split(",")]
return None
HDF5Attribute.exists = new_instancemethod(_io.HDF5Attribute_exists,None,HDF5Attribute)
HDF5Attribute.set = new_instancemethod(_io.HDF5Attribute_set,None,HDF5Attribute)
HDF5Attribute.get = new_instancemethod(_io.HDF5Attribute_get,None,HDF5Attribute)
HDF5Attribute.type_str = new_instancemethod(_io.HDF5Attribute_type_str,None,HDF5Attribute)
HDF5Attribute.str = new_instancemethod(_io.HDF5Attribute_str,None,HDF5Attribute)
HDF5Attribute.__setitem__ = new_instancemethod(_io.HDF5Attribute___setitem__,None,HDF5Attribute)
HDF5Attribute_swigregister = _io.HDF5Attribute_swigregister
HDF5Attribute_swigregister(HDF5Attribute)
|