XdmfArray.hpp 40.5 KB
Newer Older
Kenneth Leiter's avatar
Kenneth Leiter committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
/*****************************************************************************/
/*                                    XDMF                                   */
/*                       eXtensible Data Model and Format                    */
/*                                                                           */
/*  Id : XdmfArray.hpp                                                       */
/*                                                                           */
/*  Author:                                                                  */
/*     Kenneth Leiter                                                        */
/*     kenneth.leiter@arl.army.mil                                           */
/*     US Army Research Laboratory                                           */
/*     Aberdeen Proving Ground, MD                                           */
/*                                                                           */
/*     Copyright @ 2011 US Army Research Laboratory                          */
/*     All Rights Reserved                                                   */
/*     See Copyright.txt for details                                         */
/*                                                                           */
/*     This software is distributed WITHOUT ANY WARRANTY; without            */
/*     even the implied warranty of MERCHANTABILITY or FITNESS               */
/*     FOR A PARTICULAR PURPOSE.  See the above copyright notice             */
/*     for more information.                                                 */
/*                                                                           */
/*****************************************************************************/

Ken Leiter (Civ ARL/CISD) kleiter's avatar
Ken Leiter (Civ ARL/CISD) kleiter committed
24 25 26
#ifndef XDMFARRAY_HPP_
#define XDMFARRAY_HPP_

27
// Forward Declarations
28
class XdmfArrayType;
29
class XdmfHeavyDataController;
30

Ken Leiter (Civ ARL/CISD) kleiter's avatar
Ken Leiter (Civ ARL/CISD) kleiter committed
31
// Includes
32
#include "XdmfCore.hpp"
Ken Leiter (Civ ARL/CISD) kleiter's avatar
Ken Leiter (Civ ARL/CISD) kleiter committed
33
#include "XdmfItem.hpp"
34
#include <boost/shared_array.hpp>
Ken Leiter (Civ ARL/CISD) kleiter's avatar
Ken Leiter (Civ ARL/CISD) kleiter committed
35 36
#include <boost/variant.hpp>

37
/**
38 39
 * @brief Provides storage for data values that are read in or will be
 * written to heavy data on disk.
40
 *
41 42 43 44 45
 * XdmfArray provides a single interface for storing a variety of data
 * types.  The data type stored is determined by the type initially
 * inserted into the array.  An array can be initialized with a
 * specific data type before insertion of values by calling
 * initialize().
46 47 48
 *
 * An XdmfArray is associated with heavy data files on disk through an
 * XdmfHeavyDataController. When an Xdmf file is read from disk,
49 50 51 52 53 54 55 56
 * XdmfHeavyDataControllers are attached to all created XdmfArrays
 * that contain values stored in heavy data. These values are not read
 * into memory when the Xdmf file is parsed. The array is
 * uninitialized and the return value of isInitialized() is false.  In
 * order to read the heavy data values into memory, read() must be
 * called. This will cause the array to ask for values to be read from
 * disk using the XdmfHeavyDataController. After the values have been
 * read from heavy data on disk, isInitialized() will return true.
57
 *
58 59
 * XdmfArray allows for insertion and retrieval of data in two
 * fundamental ways:
60 61 62
 *
 * By Copy:
 *
63 64 65 66
 *   getValue
 *   getValues
 *   insert
 *   pushBack
67
 *
68 69 70
 * XdmfArray stores its own copy of the data.  Modifications to the
 * data stored in the XdmfArray will not change values stored in the
 * original array.
71 72 73
 *
 * By Shared Reference:
 *
74 75
 *   getValuesInternal
 *   setValuesInternal
76
 *
77 78 79 80
 * XdmfArray shares a reference to the data.  No copy is
 * made. XdmfArray holds a shared pointer to the original data.
 * Modifications to the data stored in the XdmfArray also causes
 * modification to values stored in the original array.
81 82
 *
 * Xdmf supports the following datatypes:
83 84 85 86 87 88 89 90 91
 *   Int8
 *   Int16
 *   Int32
 *   Int64
 *   Float32
 *   Float64
 *   UInt8
 *   UInt16
 *   UInt32
92
 *   String
93
 */
94
class XDMFCORE_EXPORT XdmfArray : public XdmfItem {
95

96
public:
97 98 99 100

  /**
   * Create a new XdmfArray.
   *
101 102 103 104
   * Example of use:
   *
   * C++
   *
105 106
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline New
107 108 109
   *
   * Python
   *
110 111
   * @dontinclude XdmfExampleArray.py
   * @skipline New
112
   *
113 114
   * @return constructed XdmfArray.
   */
115
  static shared_ptr<XdmfArray> New();
116 117 118 119

  virtual ~XdmfArray();

  LOKI_DEFINE_VISITABLE(XdmfArray, XdmfItem);
120
  XDMF_CHILDREN(XdmfArray, XdmfHeavyDataController, HeavyDataController, Name);
121 122 123 124
  static const std::string ItemTag;

  /**
   * Remove all values from this array.
125 126 127 128 129
   *
   * Example of use:
   *
   * C++
   *
130 131 132
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline clear
133 134 135
   *
   * Python
   *
136 137 138
   * @dontinclude XdmfExampleArray.py
   * @skipline Assuming
   * @skipline clear
139 140 141 142 143
   */
  void clear();

  /**
   * Remove a value from this array.
144 145 146 147 148
   *
   * Example of use:
   *
   * C++
   *
149 150 151 152 153
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skip exampleInternalPointerConst
   * @skipline //
   * @until ]
154 155 156
   *
   * Python
   *
157 158 159 160
   * @dontinclude XdmfExampleArray.py
   * @skip exampleArray.insertAsFloat64(newIndex, newValue)
   * @skipline contains
   * @until ]
161 162 163
   */
  void erase(const unsigned int index);

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






  /**
   * Evaluates an expression based on the list of variables provided.
   * A list of valid operations is retrievable from the getSupportedOperations static method.
   * None of the XdmfArrays provided are modified during the evaluation process.
   *
   * Example of Use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline maximum
   * @skipline main
   * @skipline addOperation
   * @skipline addFunction
   * @skipline valueMap
   * @until }
   * @skipline maximum
   * @until else
   * @skipline {
   * @until returnArray;
   * @skipline }
   * @until }
   * @skipline prepend
   * @until }
   *
   * Python
   *
   * @dontinclude XdmfExampleArray.py
   * @skipline maximum
   * @until else
   * @skipline maxVal
   * @until pushBackAsFloat
   * @skipline return
   * @skipline prepend
   * @until val2.getSize
   * @skipline return
   * @skipline __main__
   * @skipline addOperation
   * @skipline addFunction
   * @skipline valueMap
   * @until evaluateExpression
   *
   * @param	expression	a string containing the expresion to be evaluated
   * @param	variables	a map of strings to their XdmfArray equivalent
   * @return			a shared pointer to the XdmfArray resulting from the expression
   */
  static shared_ptr<XdmfArray> evaluateExpression(std::string expression, std::map<std::string, shared_ptr<XdmfArray> > variables);

  /**
   * Evaluates the operation specified using the two shared pointers to XdmfArrays provided.
   * A list of valid operations is retrievable from the getSupportedOperations static method.
   * None of the XdmfArrays provided are modified during the evaluation process.
   *
   * Example of Use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline prepend
   * @skipline main
   * @skipline answerArray
   * @skipline addOperation
   * @until evaluateOperation
   * @skipline return
   * @until }
   * @skipline prepend
   * @until }
   *
   * Python
   *
   * @dontinclude XdmfExampleArray.py
   * @skipline prepend
   * @until val2.getSize
   * @skipline return
   * @skipline __main__
   * @skipline addOperation
   * @until evaluateOperation
   *
   * @param	val1		the first array being evaluated
   * @param	val2		the second array being evaluated
   * @param	operation	a character specifying the operation performed
   * @return			a shared pointer to the Xdmf Array that results from the calculation
   */
  static shared_ptr<XdmfArray> evaluateOperation(shared_ptr<XdmfArray> val1, shared_ptr<XdmfArray> val2, char operation);

  /**
   * Adds an operation to the list of viable operators.
   *
   * Example of Use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline prepend
   * @skipline main
   * @skipline addOperation
   * @skipline return
   * @until }
   * @skipline prepend
   * @until }
   *
   * Python
   *
   * @dontinclude XdmfExampleArray.py
   * @skipline prepend
   * @until val2.getSize
   * @skipline return
   * @skipline __main__
   * @skipline addOperation
   *
   * @param	newoperator	the character to be associated with the provided binary operation
   * @param	functionref	a pointer to the function to be associated with the provided operator
   * @param	priority	used to determine order of operations the higher the value the earlier it is evaluated
   */
  static int addOperation(char newoperator, shared_ptr<XdmfArray>(*functionref)(shared_ptr<XdmfArray>, shared_ptr<XdmfArray>), int priority);

  /**
   * Joins the two provided arrays together end to end.
   *
   * Example of Use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline valueArray1
   * @until (6)
   * @skipline chunk
   *
   * Python
   *
   * @dontinclude XdmfExampleArray.py
   * @skipline valueArray1
   * @until (6)
   * @skipline chunk
   *
   * @param     val1            the first array being evaluated
   * @param     val2            the second array being evaluated
   * @return			the arrays joined end to end
   */
  static shared_ptr<XdmfArray> chunk(shared_ptr<XdmfArray>, shared_ptr<XdmfArray>);

  /**
   * Joins the two provided arrays while interspercing their values evenly.
   * Example of Use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline valueArray1
   * @until (6)
   * @skipline interlace
   *
   * Python
   *
   * @dontinclude XdmfExampleArray.py
   * @skipline valueArray1
   * @until (6)
   * @skipline interlace
   *
   * @param     val1            the first array being evaluated
   * @param     val2            the second array being evaluated
   * @return                    the interlaced arrays
   */
  static shared_ptr<XdmfArray> interlace(shared_ptr<XdmfArray>, shared_ptr<XdmfArray>);

  /**
   * Evaluates the function specified using the vector of XdmfArrays provided.
   * None of the XdmfArrays provided are modified during the evaluation process.
   * 
   * C++
   *
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline maximum
   * @skipline main
   * @skipline addFunction
   * @until evaluateFunction
   * @skipline return
   * @until }
   * @skipline maximum
   * @until else
   * @skipline {
   * @until returnArray;
   * @skipline }
   * @until }
   *
   * Python
   *
   * @dontinclude XdmfExampleArray.py
   * @skipline maximum
   * @until else
   * @skipline maxVal
   * @until pushBackAsFloat
   * @skipline return
   * @skipline __main__
   * @skipline addFunction
   * @until evaluateFunction
   *
   * @param	valueVector	a vector containing the arrays to be used
   * @param	functionName	the string associated with the function being called
   * @return			the result of the function being called, a scalar will be returned as an XdmfArray with one value
   */
  static shared_ptr<XdmfArray> evaluateFunction(std::vector<shared_ptr<XdmfArray> > valueVector, std::string functionName);

  /*
   * adds a specified function to the list of functions used while evaluating strings
   *
   * C++
   *
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline maximum
   * @skipline main
   * @skipline addFunction
   * @skipline return
   * @until }
   * @skipline maximum
   * @until else
   * @skipline {
   * @until returnArray;
   * @skipline }
   * @until }
   *
   * Python
   *
   * @dontinclude XdmfExampleArray.py
   * @skipline maximum
   * @until else
   * @skipline maxVal
   * @until pushBackAsFloat
   * @skipline return
   * @skipline __main__
   * @skipline addFunction
   *
   * @param	name		A string to be associated with the provided function during string evaluation
   * @param	functionref	A pointer to the function to be associated with the given string
   * @return			The total number of functions currently associated
   */
  static int addFunction(std::string name, shared_ptr<XdmfArray>(*functionref)(std::vector<shared_ptr<XdmfArray> >));

  /**
   * Adds together all the values contained in the provided arrays.
   *
   * C++
   *
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline valueArray1
   * @until valueVector
   * @skipline valueArray1
   * @until valueArray2
   * @skipline sum
   *
   * Python
   *
   * @dontinclude XdmfExampleArray.py
   * @skipline valueArray1
   * @until valueVector
   * @skipline valueArray1
   * @until valueArray2
   * @skipline sum
   *
   * @param	values	a vector containing the arrays to be used
   * @return		an XdmfArray containing one value which is the total of all the values contained within the provided arrays
   */
  static shared_ptr<XdmfArray> sum(std::vector<shared_ptr<XdmfArray> > values);

  /**
   * Averages the values contained in all the provided arrays.
   *
   * C++
   *
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline valueArray1
   * @until valueVector
   * @skipline valueArray1
   * @until valueArray2
   * @skipline ave
   *
   * Python
   *
   * @dontinclude XdmfExampleArray.py
   * @skipline valueArray1
   * @until valueVector
   * @skipline valueArray1
   * @until valueArray2
   * @skipline ave
   *
   * @param	values	a vector containing the arrays to be used
   * @return		an XdmfArray containing  one value which is the average of all values contained within the provided arrays
   */
  static shared_ptr<XdmfArray> ave(std::vector<shared_ptr<XdmfArray> > values);







466 467 468
  /**
   * Get the data type of this array.
   *
469 470 471 472
   * Example of use:
   *
   * C++
   *
473 474 475
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline getArrayType
476 477 478
   *
   * Python
   *
479 480 481
   * @dontinclude XdmfExampleArray.py
   * @skipline Assuming
   * @skipline getArrayType
482
   *
483 484
   * @return a XdmfArrayType containing the data type for the array.
   */
485
  shared_ptr<const XdmfArrayType> getArrayType() const;
486 487

  /**
488 489
   * Get the capacity of this array, the number of values the array
   * can store without reallocation.
490
   *
491 492 493 494
   * Example of use:
   *
   * C++
   *
495 496 497
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline getCapacity
498 499 500
   *
   * Python
   *
501 502 503
   * @dontinclude XdmfExampleArray.py
   * @skipline Assuming
   * @skipline getCapacity
504
   *
505 506 507 508 509
   * @return the capacity of this array.
   */
  unsigned int getCapacity() const;

  /**
510
   * Get the dimensions of the array.
511
   *
512 513 514 515
   * Example of use:
   *
   * C++
   *
516 517 518
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline exampleDimensions
519 520 521
   *
   * Python
   *
522 523 524
   * @dontinclude XdmfExampleArray.py
   * @skipline Assuming
   * @skipline exampleDimensions
525
   *
526 527
   * @return the dimensions of the array.
   */
528 529 530 531 532
  std::vector<unsigned int> getDimensions() const;

  /**
   * Get the dimensions of the array as a string.
   *
533 534 535 536
   * Example of use:
   *
   * C++
   *
537 538 539
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline exampleDimensionString
540 541 542
   *
   * Python
   *
543 544 545
   * @dontinclude XdmfExampleArray.py
   * @skipline Assuming
   * @skipline exampleDimensionString
546
   *
547 548 549
   * @return the dimensions of the array as a string.
   */
  std::string getDimensionsString() const;
550 551 552 553 554 555 556 557

  std::map<std::string, std::string> getItemProperties() const;

  std::string getItemTag() const;

  /**
   * Get the name of the array.
   *
558 559 560 561
   * Example of use:
   *
   * C++
   *
562 563 564
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline exampleName
565 566 567
   *
   * Python
   *
568 569 570
   * @dontinclude XdmfExampleArray.py
   * @skipline Assuming
   * @skipline exampleName
571
   *
572 573 574 575
   * @return a string containing the name of the array.
   */
  std::string getName() const;

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




  /**
   * Gets the priority of operation whose associated character is provided. Returns -1 if the operation is not supported.
   * The higher the value the earlier that operation is evaluated during evaluateExpression.
   *
   * Example of Use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline getOperationPriority
   *
   * Python
   *
   * @dontinclude XdmfExampleArray.py
   * @skipline getOperationPriority
   *
   * @param	operation	the character associated with the operation to be checked
   * @return			the priority of the operation
   */
  static int getOperationPriority(char operation);







607 608 609
  /**
   * Get the number of values stored in this array.
   *
610 611 612 613
   * Example of use:
   *
   * C++
   *
614 615 616
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline exampleSize
617 618 619
   *
   * Python
   *
620 621 622
   * @dontinclude XdmfExampleArray.py
   * @skipline Assuming
   * @skipline exampleSize
623
   *
624 625 626 627
   * @return the number of values stored in this array.
   */
  unsigned int getSize() const;

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




  /**
   * Gets a string that contains all the characters of the supported operations.
   * Parenthesis are included for grouping purposes in expressions.
   *
   * Example of Use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline getSupportedOperations
   *
   * Python
   *
   * @dontinclude XdmfExampleArray.py
   * @skipline getSupportedOperations
   *
   * @return	a string containing the characters for all supported operations
   */
  static const std::string getSupportedOperations();

  /**
   * Gets a string that contains all the characters of the supported operations.
   * Parenthesis are included for grouping purposes in expressions.
   *
   * Example of Use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline getSupportedFunctions
   *
   * Python
   *
   * @dontinclude XdmfExampleArray.py
   * @skipline getSupportedFunctions
   *
   * @return    a vector containing the strings associated with all valid functions
   */
  static const std::vector<std::string> getSupportedFunctions();

  /**
   * Gets a string that contains all strings that are viable for use when mapping
   * to shared pointers of XdmfArrays for the evaluateExpression function.
   *
   * Example of Use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline getValidVariableChars
   *
   * Python
   *
   * @dontinclude XdmfExampleArray.py
   * @skipline getValidVariableChars
   *
   * @return	a string containing all valid variable characters
   */
  static const std::string getValidVariableChars();

  /**
   * Gets a string that contains all strings that are viable for use when mapping
   * to scalars (which are stored in XdmfArrays of size 1) for the evaluateExpression function.
   *
   * Example of Use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline getValidDigitChars
   *
   * Python
   *
   * @dontinclude XdmfExampleArray.py
   * @skipline getValidDigitChars
   *
   * @return    a string containing all valid variable characters
   */
  static const std::string getValidDigitChars();





716 717 718
  /**
   * Get a copy of a single value stored in this array.
   *
719 720 721 722
   * Example of use:
   *
   * C++
   *
723 724 725
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skip XdmfHeavyDataController
726
   * @skipline if
727
   * @until index
728 729 730
   *
   * Python
   *
731 732
   * @dontinclude XdmfExampleArray.py
   * @skipline Assuming
733
   * @skip [0,
734 735
   * @skipline 7]
   * @until Variations
736
   *
737 738 739 740 741 742 743 744
   * @return the requested value.
   */
  template <typename T>
  T getValue(const unsigned int index) const;

  /**
   * Get a copy of the values stored in this array
   *
745 746 747 748
   * Example of use:
   *
   * C++
   *
749 750 751 752 753
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline New
   * @skipline initArray
   * @skipline exampleArray
   * @until {0,2,4,6,8,5,3,7,4,9}
754
   *
755 756 757 758 759 760 761
   * Python: This function is not supported in Python, it is replaced by the getNumpyArray function
   *
   * @dontinclude XdmfExampleArray.py
   * @skipline New
   * @skipline initArray
   * @skipline exampleArray
   * @skipline getNumpyArray	
762
   *
763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780
   * @param startIndex the index in this array to begin copying from.
   * @param valuesPointer a pointer to an array to copy into.
   * @param numValues the number of values to copy.
   * @param arrayStride number of values to stride in this array between each
   * copy.
   * @param valuesStride number of values to stride in the pointer between each
   * copy.
   */
  template <typename T> void
  getValues(const unsigned int startIndex,
            T * const valuesPointer,
            const unsigned int numValues = 1,
            const unsigned int arrayStride = 1,
            const unsigned int valuesStride = 1) const;

  /**
   * Get a smart pointer to the internal values stored in this array.
   *
781 782 783 784
   * Example of use:
   *
   * C++
   *
785 786 787 788 789
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skip getValuesString
   * @skipline //
   * @until exampleInternalVector
790 791 792 793
   *
   * Python:
   * Python does not support this version of the getValuesInternal function, it defaults to the version that returns a void pointer
   *
794 795
   * @return a smart pointer to the internal vector of values stored
   * in this array.
796 797
   */
  template <typename T>
798
  shared_ptr<std::vector<T> > getValuesInternal();
799 800 801 802

  /**
   * Get a pointer to the internal values stored in this array.
   *
803 804 805 806
   * Example of use:
   *
   * C++
   *
807 808 809
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline exampleInternalPointer
810 811 812
   *
   * Python
   *
813 814 815 816
   * @dontinclude XdmfExampleArray.py
   * @skipline Assuming
   * @skipline getValuesInternal
   * @until used
817
   *
818 819 820 821 822
   * @return a void pointer to the first value stored in this array.
   */
  void * getValuesInternal();

  /**
823 824
   * Get a pointer to the internal values stored in this array (const
   * version).
825
   *
826 827
   * Example of use:
   *
828 829 830
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline exampleInternalPointerConst
831 832 833 834
   *
   * Python:
   * Python does not support this version of the getValuesInternal function, it defaults to the version that returns a void pointer
   *
835 836 837 838 839 840 841
   * @return a void pointer to the first value stored in this array.
   */
  const void * getValuesInternal() const;

  /**
   * Get the values stored in this array as a string.
   *
842 843 844 845
   * Example of use:
   *
   * C++
   *
846 847 848
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline getValuesString
849 850 851
   *
   * Python
   *
852 853 854 855
   * @dontinclude XdmfExampleArray.py
   * @skipline Assuming
   * @skipline exampleValueString
   * @until contained
856
   *
857 858 859 860 861
   * @return a string containing the contents of the array.
   */
  std::string getValuesString() const;

  /**
862 863 864 865 866 867
   * Initialize the array to a specific size.
   *
   * Example of use:
   *
   * C++
   *
868 869 870 871
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline newSize
   * @skipline exampleVector
872 873
   *
   * Python: Does not support this version of initialize
874 875 876
   *
   * @param size the number of values in the initialized array.
   *
877 878
   * @return a smart pointer to the internal vector of values
   * initialized in this array.
879 880
   */
  template <typename T>
881
  shared_ptr<std::vector<T> > initialize(const unsigned int size = 0);
882

883
  /**
884 885 886 887 888 889
   * Initialize the array to specific dimensions.
   *
   * Example of use:
   *
   * C++
   *
890 891 892 893
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline newSizeVector
   * @until exampleVector
894 895
   *
   * Python: Does not support this version of initialize
896 897 898 899 900 901 902
   *
   * @param dimensions the dimensions of the initialized array.
   *
   * @return a smart pointer to the internal vector of values
   * initialized in this array.
   */
  template <typename T>
903
  shared_ptr<std::vector<T> >
904 905
  initialize(const std::vector<unsigned int> & dimensions);

906
  /**
907 908 909 910 911 912
   * Initialize the array to contain a specified amount of a particular type.
   *
   * Example of use:
   *
   * C++
   *
913 914 915 916
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline newSize
   * @skipline XdmfArrayType
917 918 919
   *
   * Python
   *
920 921 922 923
   * @dontinclude XdmfExampleArray.py
   * @skipline Assuming
   * @skipline newSize
   * @skipline XdmfArrayType
924 925 926 927
   *
   * @param arrayType the type of array to initialize.
   * @param size the number of values in the initialized array.
   */
928
  void initialize(const shared_ptr<const XdmfArrayType> arrayType,
929 930
                  const unsigned int size = 0);

931
  /**
932 933 934 935 936 937
   * Initialize the array with specified dimensions to contain a particular type.
   *
   * Example of use:
   *
   * C++
   *
938 939 940 941 942
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline newSizeVector
   * @until 5
   * @skipline XdmfArrayType
943 944 945
   *
   * Python
   *
946 947
   * @dontinclude XdmfExampleArray.py
   * @skipline Assuming
948
   * @skipline UInt32Vector
949
   * @until initialize
950 951 952 953
   *
   * @param arrayType the type of array to initialize.
   * @param dimensions the number dimensions of the initialized array.
   */
954
  void initialize(const shared_ptr<const XdmfArrayType> arrayType,
955 956
                  const std::vector<unsigned int> & dimensions);

957 958
  using XdmfItem::insert;

959 960 961
  /**
   * Insert value into this array
   *
962 963 964 965
   * Example of use:
   *
   * C++
   *
966 967 968 969 970
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline New
   * @skipline newIndex
   * @until newValue
   * @skipline insert
971 972 973
   *
   * Python
   *
974 975 976 977
   * @dontinclude XdmfExampleArray.py
   * @skipline New
   * @skipline newIndex
   * @until insertAsInt32
978
   *
979 980 981 982 983 984 985 986 987 988
   * @param index the index in this array to insert.
   * @param value the value to insert
   */
  template<typename T>
  void insert(const unsigned int index,
              const T & value);

  /**
   * Insert values from an XdmfArray into this array.
   *
989 990 991 992
   * Example of use:
   *
   * C++
   *
993 994 995 996 997 998
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline New
   * @skipline initArray
   * @until insert
   * @skipline tempArray
   * @until {0,2,4,6,8,5,3,7,4,9}
999 1000 1001
   *
   * Python
   *
1002 1003 1004 1005
   * @dontinclude XdmfExampleArray.py
   * @skipline New
   * @skipline initArray
   * @until {0,2,4,6,8,5,3,7,4,9}
1006
   *
1007 1008 1009 1010 1011 1012 1013 1014 1015 1016
   * @param startIndex the index in this array to begin insertion.
   * @param values a shared pointer to an XdmfArray to copy into this array.
   * @param valuesStartIndex the index in the XdmfArray to begin copying.
   * @param numValues the number of values to copy into this array.
   * @param arrayStride number of values to stride in this array between each
   * copy.
   * @param valuesStride number of values to stride in the XdmfArray between
   * each copy.
   */
  void insert(const unsigned int startIndex,
1017
              const shared_ptr<const XdmfArray> values,
1018
              const unsigned int valuesStartIndex = 0,
1019 1020 1021 1022 1023 1024 1025
              const unsigned int numValues = 1,
              const unsigned int arrayStride = 1,
              const unsigned int valuesStride = 1);

  /**
   * Insert values into this array.
   *
1026 1027 1028 1029
   * Example of use:
   *
   * C++
   *
1030 1031 1032 1033 1034
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline New
   * @skipline initArray
   * @skipline insert
   * @until {0,2,4,6,8,5,3,7,4,9}
1035 1036 1037
   *
   * Python
   *
1038 1039 1040 1041 1042
   * @dontinclude XdmfExampleArray.py
   * @skipline New
   * @skipline initArray
   * @skipline insertAsInt32
   * @until Sublists
1043
   *
1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054
   * @param startIndex the index in this array to begin insertion.
   * @param valuesPointer a pointer to the values to copy into this array.
   * @param numValues the number of values to copy into this array.
   * @param arrayStride number of values to stride in this array between each
   * copy.
   * @param valuesStride number of values to stride in the pointer between
   * each copy.
   */
  template<typename T>
  void insert(const unsigned int startIndex,
              const T * const valuesPointer,
1055
              const unsigned int numValues,
1056 1057 1058 1059
              const unsigned int arrayStride = 1,
              const unsigned int valuesStride = 1);

  /**
1060 1061
   * Returns whether the array is initialized (contains values in
   * memory).
1062 1063 1064 1065 1066
   *
   * Example of use:
   *
   * C++
   *
1067 1068 1069 1070
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline isInitialized
   * @until }
1071 1072 1073
   *
   * Python
   *
1074 1075 1076 1077
   * @dontinclude XdmfExampleArray.py
   * @skipline Assuming
   * @skipline isInitialized
   * @until read
1078 1079 1080 1081 1082
   */
  bool isInitialized() const;

  /**
   * Copy a value to the back of this array
1083 1084 1085 1086 1087
   *
   * Example of use;
   *
   * C++
   *
1088 1089 1090 1091
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline New
   * @skipline newValue
   * @skipline pushBack
1092 1093 1094
   *
   * Python
   *
1095 1096 1097 1098
   * @dontinclude XdmfExampleArray.py
   * @skipline New
   * @skipline newValue
   * @until pushBackAsFloat64
1099 1100 1101 1102
   */
  template <typename T>
  void pushBack(const T & value);

1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166
  /**
   * Get the first heavy data controller attached to this array.
   *
   * Example of use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline exampleController
   *
   * Python
   *
   * @dontinclude XdmfExampleArray.py
   * @skipline Assuming
   * @skipline exampleController
   *
   * @return the heavy data controller attached to this array.
   */
  shared_ptr<XdmfHeavyDataController>
  getHeavyDataController();

  /**
   * Get the first heavy data controller attached to this array. (const version)
   *
   * Example of use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline exampleControllerConst
   *
   * Python: Doesn't support a constant version of this function
   *
   * @return the heavy data controller attached to this array.
   */
  shared_ptr<const XdmfHeavyDataController>
  getHeavyDataController() const;

  /**
   * Replace all controllers attached to this array with the controller provided.
   *
   * Example of use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline exampleController
   * @until setHeaveyDataController
   *
   * Python
   *
   * @dontinclude XdmfExampleArray.py
   * @skipline Assuming
   * @skipline exampleController
   * @until setHeaveyDataController
   *
   * @param newController the heavy data controller to attach to this array.
   */
  void
  setHeavyDataController(shared_ptr<XdmfHeavyDataController> newController);

1167 1168
  /**
   * Read data from disk into memory.
1169 1170 1171 1172 1173
   *
   * Example of use:
   *
   * C++
   *
1174 1175 1176 1177
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline !exampleArray
   * @until }
1178 1179 1180
   *
   * Python
   *
1181 1182 1183 1184
   * @dontinclude XdmfExampleArray.py
   * @skipline Assuming
   * @skipline isInitialized
   * @until read
1185 1186
   */
  void read();
1187

1188 1189
  /**
   * Release all data currently held in memory.
1190 1191 1192 1193 1194
   *
   * Example of use:
   *
   * C++
   *
1195 1196 1197
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline Assuming
   * @skipline release
1198 1199 1200
   *
   * Python
   *
1201 1202 1203
   * @dontinclude XdmfExampleArray.py
   * @skipline Assuming
   * @skipline release
1204 1205 1206 1207 1208 1209
   */
  void release();

  /**
   * Set the capacity of the array to at least size.
   *
1210 1211 1212 1213
   * Example of use:
   *
   * C++
   *
1214 1215 1216 1217
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline New
   * @skipline newSize
   * @skipline reserve
1218 1219 1220
   *
   * Python
   *
1221 1222 1223 1224
   * @dontinclude XdmfExampleArray.py
   * @skipline New
   * @skipline newSize
   * @skipline reserve
1225
   *
1226 1227 1228 1229 1230
   * @param size the capacity to set this array to.
   */
  void reserve(const unsigned int size);

  /**
1231 1232 1233 1234
   * Resizes the array to contain a number of values. If numValues is
   * larger than the current size, values are appended to the end of
   * the array equal to value. If numValues is less than the current
   * size, values at indices larger than numValues are removed.
1235
   *
1236 1237 1238 1239
   * Example of use:
   *
   * C++
   *
1240 1241 1242 1243 1244
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline New
   * @skipline newSize
   * @skipline initArray
   * @skipline insert 
1245
   * @until //
1246 1247
   * @skipline newSize
   * @until 4}
1248 1249 1250
   *
   * Python
   *
1251 1252 1253 1254 1255 1256 1257
   * @dontinclude XdmfExampleArray.py
   * @skipline New
   * @skipline initArray
   * @skipline insert
   * @until #
   * @skipline newSize
   * @until resizeAsFloat64
1258
   *
1259 1260 1261 1262 1263 1264 1265
   * @param numValues the number of values to resize this array to.
   * @param value the number to initialize newly created values to, if needed.
   */
  template<typename T>
  void resize(const unsigned int numValues,
              const T & value = 0);

1266 1267 1268 1269 1270 1271 1272
  /**
   * Resizes the array to specified dimensions. If the number of
   * values specified by the dimensions is larger than the current
   * size, values are appended to the end of the array equal to
   * value. If numValues is less than the current size, values at
   * indices larger than numValues are removed.
   *
1273 1274 1275 1276
   * Example of use:
   * 
   * C++
   *
1277 1278 1279 1280 1281 1282 1283 1284 1285 1286
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline New
   * @skipline newSizeVector
   * @until push_back(5)
   * @skipline initArray
   * @skipline insert
   * @until //
   * @skip resize
   * @skipline newSizeVector
   * @until 4}
1287 1288 1289
   *
   * Python
   *
1290 1291 1292 1293 1294 1295 1296
   * @dontinclude XdmfExampleArray.py
   * @skipline New
   * @skipline initArray
   * @skipline insertAsInt32
   * @until #
   * @skipline newSizeArray
   * @until resizeAsFloat64
1297 1298
   *
   * @param dimensions the dimensions to resize the array to.
1299 1300 1301 1302 1303 1304
   * @param value the number to intialize newly created values to, if needed.
   */
  template<typename T>
  void resize(const std::vector<unsigned int> & dimensions,
              const T & value = 0);

1305 1306 1307
  /**
   * Set the name of the array.
   *
1308 1309 1310 1311
   * Example of use:
   *
   * C++
   *
1312 1313 1314 1315
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline New
   * @skipline newName
   * @until setName
1316 1317 1318
   *
   * Python
   *
1319 1320 1321 1322
   * @dontinclude XdmfExampleArray.py
   * @skipline New
   * @skipline newName
   * @until setName
1323
   *
1324 1325 1326 1327 1328
   * @param name of the array to set.
   */
  void setName(const std::string & name);

  /**
1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341
   * Sets the values of this array to the values stored in the
   * arrayPointer array. No copy is made. Modifications to the array
   * are not permitted through the XdmfArray API. Any calls through
   * the XdmfArray API to modify the array (i.e. any non-const
   * function) will result in the array being copied into internal
   * storage. The internal copy is then modified.  This prevents
   * situations where a realloc of the pointer could cause other
   * references to become invalid. The caller of this method can
   * continue to modify the values stored in arrayPointer on its
   * own. This function is meant for applications that have their own
   * array data structures that merely use Xdmf to output the data, an
   * operation that should not require a copy. Other applications that
   * use Xdmf for in memory data storage should avoid this function.
1342
   *
1343 1344 1345 1346
   * Example of use:
   *
   * C++
   *
1347 1348 1349
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline initArray
   * @skipline setValuesInternal
1350 1351 1352
   *
   * Python: does not support setValuesInternal
   *
1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363
   * @param arrayPointer a pointer to an array to store in this XdmfArray.
   * @param numValues the number of values in the array.
   * @param transferOwnership whether to transfer responsibility for deletion
   * of the array to XdmfArray.
   */
  template<typename T>
  void setValuesInternal(const T * const arrayPointer,
                         const unsigned int numValues,
                         const bool transferOwnership = 0);

  /**
1364 1365 1366 1367
   * Sets the values of this array to the values stored in the
   * vector. No copy is made. The caller of this method retains
   * ownership of the data and must ensure that the array is still
   * valid for the entire time Xdmf needs it.
1368
   *
1369 1370 1371 1372
   * Example of use:
   *
   * C++
   *
1373 1374 1375 1376
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline New
   * @skipline initVector
   * @skipline setValuesInternal
1377 1378 1379
   *
   * Python: does not support setValuesInternal
   *
1380 1381 1382 1383 1384 1385 1386 1387 1388
   * @param array a vector to store in this XdmfArray.
   * @param transferOwnership whether to transfer responsibility for deletion
   * of the array to XdmfArray.
   */
  template<typename T>
  void setValuesInternal(std::vector<T> & array,
                         const bool transferOwnership = 0);

  /**
1389 1390 1391
   * Sets the values of this array to the values stored in the
   * vector. No copy is made. This array shares ownership with other
   * references to the smart pointer.
1392
   *
1393 1394 1395 1396
   * Example of use:
   *
   * C++
   *
1397 1398 1399 1400 1401 1402
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline New
   * @skipline initVector
   * @until push_back(5)
   * @skipline storeVector
   * @until setValuesInternal
1403 1404 1405
   *
   * Python: does not support setValuesInternal
   *
1406 1407 1408
   * @param array a smart pointer to a vector to store in this array.
   */
  template<typename T>
1409
  void setValuesInternal(const shared_ptr<std::vector<T> > array);
1410 1411

  /**
1412 1413
   * Exchange the contents of the vector with the contents of this
   * array. No copy is made. The internal arrays are swapped.
1414
   *
1415 1416 1417 1418
   * Example of use
   *
   * C++
   *
1419 1420 1421 1422 1423 1424 1425 1426
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline New
   * @skipline initArray
   * @skipline insert
   * @skipline initVector
   * @until push_back(5)
   * @skipline //
   * @until //
1427 1428 1429
   *
   * Python: The Python version only supports swapping XdmfArrays
   *
1430 1431 1432 1433 1434 1435 1436
   * @param array a vector to exchange values with.
   * @return bool whether the swap was successful.
   */
  template<typename T>
  bool swap(std::vector<T> & array);

  /**
1437 1438
   * Exchange the contents of the vector with the contents of this
   * array. No copy is made. The internal arrays are swapped.
1439
   *
1440 1441 1442 1443
   * Example of use
   *
   * C++
   *
1444 1445 1446 1447 1448 1449 1450 1451 1452
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline New
   * @skipline initArray
   * @skipline insert
   * @skipline initVector
   * @until push_back(5)
   * @skipline //
   * @skipline storeSwapSucceded
   * @until //
1453 1454 1455
   *
   * Python: The Python version only supports swapping XdmfArrays
   *
1456 1457 1458 1459
   * @param array a smart pointer to a vector to exchange values with.
   * @return bool whether the swap was successful.
   */
  template<typename T>
1460
  bool swap(const shared_ptr<std::vector<T> > array);
1461 1462

  /**
1463 1464
   * Exchange the contents of an XdmfArray with the contents of this
   * array. No copy is made. The internal arrays are swapped.
1465
   *
1466 1467 1468 1469
   * Example of use
   *
   * C++
   *
1470 1471 1472 1473 1474 1475 1476
   * @dontinclude ExampleXdmfArray.cpp
   * @skipline New
   * @skipline initArray
   * @skipline insert
   * @skipline swapArray
   * @until exampleArray
   * @skipline //
1477 1478 1479
   *
   * Python
   *
1480 1481 1482 1483 1484 1485 1486
   * @dontinclude XdmfExampleArray.py
   * @skipline New
   * @skipline initArray
   * @skipline insert
   * @skipline swapArray
   * @until exampleArray
   * @skipline #
1487
   *
1488 1489
   * @param array a smart pointer to a vector to exchange values with.
   */
1490
  void swap(const shared_ptr<XdmfArray> array);
1491

1492
protected:
1493 1494 1495 1496 1497

  XdmfArray();

  virtual void
  populateItem(const std::map<std::string, std::string> & itemProperties,
1498
               const std::vector<shared_ptr<XdmfItem> > & childItems,
1499 1500
               const XdmfCoreReader * const reader);

1501
private:
1502 1503 1504 1505 1506 1507 1508 1509 1510

  XdmfArray(const XdmfArray &);  // Not implemented.
  void operator=(const XdmfArray &);  // Not implemented.

  // Variant Visitor Operations
  class Clear;
  class Erase;
  class GetArrayType;
  class GetCapacity;
1511
  template <typename T> class GetValue;
1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524
  template <typename T> class GetValues;
  class GetValuesPointer;
  class GetValuesString;
  template <typename T> class Insert;
  class InsertArray;
  class InternalizeArrayPointer;
  struct NullDeleter;
  template <typename T> class PushBack;
  class Reserve;
  template <typename T> class Resize;
  class Size;

  /**
1525 1526 1527 1528 1529 1530
   * After setValues() is called, XdmfArray stores a pointer that is
   * not allowed to be modified through the XdmfArray API. If the user
   * desires to modify the contents of the pointer, they must do so
   * without calling any non-const functions of XdmfArray. If they do
   * call non-const functions of XdmfArray, we attempt to accommodate
   * by copying the array pointer into internal data structures.
1531 1532 1533 1534
   */
  void internalizeArrayPointer();

  typedef boost::variant<
1535
    boost::blank,
1536 1537 1538 1539 1540 1541 1542 1543
    shared_ptr<std::vector<char> >,
    shared_ptr<std::vector<short> >,
    shared_ptr<std::vector<int> >,
    shared_ptr<std::vector<long> >,
    shared_ptr<std::vector<float> >,
    shared_ptr<std::vector<double> >,
    shared_ptr<std::vector<unsigned char> >,
    shared_ptr<std::vector<unsigned short> >,
1544
    shared_ptr<std::vector<unsigned int> >,
1545
    shared_ptr<std::vector<std::string> >,
1546 1547 1548 1549 1550 1551 1552 1553
    boost::shared_array<const char>,
    boost::shared_array<const short>,
    boost::shared_array<const int>,
    boost::shared_array<const long>,
    boost::shared_array<const float>,
    boost::shared_array<const double>,
    boost::shared_array<const unsigned char>,
    boost::shared_array<const unsigned short>,
1554 1555
    boost::shared_array<const unsigned int>  > ArrayVariant;
  
1556 1557
  ArrayVariant mArray;
  unsigned int mArrayPointerNumValues;
1558
  std::vector<unsigned int> mDimensions;
1559 1560
  std::string mName;
  unsigned int mTmpReserveSize;
1561 1562 1563 1564 1565 1566 1567 1568

  static std::string mSupportedOperations;
  static const std::string mValidVariableChars;
  static const std::string mValidDigitChars;
  static int mOperationPriority[];

  static std::map<std::string, shared_ptr<XdmfArray>(*)(std::vector<shared_ptr<XdmfArray> >)> arrayFunctions;
  static std::map<char, shared_ptr<XdmfArray>(*)(shared_ptr<XdmfArray>, shared_ptr<XdmfArray>)> operations;
Ken Leiter (Civ ARL/CISD) kleiter's avatar
Ken Leiter (Civ ARL/CISD) kleiter committed
1569 1570
};

1571 1572
#include "XdmfArray.tpp"

1573
#ifdef _WIN32
1574
XDMFCORE_TEMPLATE template class XDMFCORE_EXPORT
1575
shared_ptr<const XdmfArrayType>;
1576
XDMFCORE_TEMPLATE template class XDMFCORE_EXPORT
1577
shared_ptr<XdmfHeavyDataController>;
1578
XDMFCORE_TEMPLATE template class XDMFCORE_EXPORT
1579
shared_ptr<const XdmfHeavyDataController>;
1580
XDMFCORE_TEMPLATE template class XDMFCORE_EXPORT
1581
shared_ptr<Loki::BaseVisitor>;
1582
XDMFCORE_TEMPLATE template class XDMFCORE_EXPORT
1583
Loki::Visitor<shared_ptr<XdmfArray>, shared_ptr<XdmfItem> >;
1584 1585
#endif

Ken Leiter (Civ ARL/CISD) kleiter's avatar
Ken Leiter (Civ ARL/CISD) kleiter committed
1586
#endif /* XDMFARRAY_HPP_ */