FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
power_vector.hpp
1// FEAT3: Finite Element Analysis Toolbox, Version 3
2// Copyright (C) 2010 by Stefan Turek & the FEAT group
3// FEAT3 is released under the GNU General Public License version 3,
4// see the file 'copyright.txt' in the top level directory for details.
5
6#pragma once
7
8// includes, FEAT
9#include <kernel/lafem/meta_element.hpp>
10#include <kernel/lafem/container.hpp>
11
12
13// includes, system
14#include <iostream>
15
16namespace FEAT
17{
18 namespace LAFEM
19 {
35 template<
36 typename SubType_,
37 int count_>
39 {
40 private:
41 // Note: the case = 1 is specialized below
42 static_assert(count_ > 1, "invalid block size");
43
44 // declare this class template as a friend for recursive inheritance
45 template<typename, int>
46 friend class PowerVector;
47
49 typedef PowerVector<SubType_, count_ - 1> RestClass;
50
52 void _read_from_binary(std::istream& file)
53 {
54 //process first
55 _first.read_from(FileMode::fm_binary, file);
56
57 // append rest
59 }
60
62 void _write_out_binary(std::ostream& file) const
63 {
64 //process first
65 _first.write_out(FileMode::fm_binary, file);
66
67 // append rest
69 }
70
71 public:
73 typedef SubType_ SubVectorType;
75 typedef typename SubVectorType::DataType DataType;
77 typedef typename SubVectorType::IndexType IndexType;
79 template <typename DT2_ = DataType, typename IT2_ = IndexType>
81
83 template <typename DataType2_, typename IndexType2_>
85
87 static constexpr int num_blocks = count_;
88
89 protected:
94
95 public:
98 {
99 }
100
107 explicit PowerVector(Index sub_size) :
108 _first(sub_size),
109 _rest(sub_size)
110 {
111 }
112
122 explicit PowerVector(Index sub_size, DataType value) :
123 _first(sub_size, value),
124 _rest(sub_size, value)
125 {
126 }
127
129 explicit PowerVector(SubVectorType&& the_first, RestClass&& the_rest) :
130 _first(std::move(the_first)),
131 _rest(std::move(the_rest))
132 {
133 }
134
137 _first(std::move(other._first)),
138 _rest(std::move(other._rest))
139 {
140 }
141
144 {
145 if(this != &other)
146 {
147 _first = std::move(other._first);
148 _rest = std::move(other._rest);
149 }
150 return *this;
151 }
152
154 PowerVector(const PowerVector&) = delete;
157
159 virtual ~PowerVector()
160 {
161 }
162
171 {
172 return PowerVector(_first.clone(mode), _rest.clone(mode));
173 }
174
182 void clone(const PowerVector& other, CloneMode clone_mode)
183 {
184 _first.clone(other._first, clone_mode);
185 _rest.clone(other._rest, clone_mode);
186 }
187
194 void clone(const PowerVector& other)
195 {
196 _first.clone(other._first);
197 _rest.clone(other._rest);
198 }
199
209 template<int i_>
211 {
212 static_assert((0 <= i_) && (i_ < count_), "invalid sub-vector index");
214 }
215
217 template<int i_>
218 const SubVectorType& at() const
219 {
220 static_assert((0 <= i_) && (i_ < count_), "invalid sub-vector index");
222 }
223
234 {
235 XASSERTM((0 <= i) && (i < count_), "invalid sub-vector index");
236 return (i == 0) ? _first : _rest.get(i-1);
237 }
238
240 const SubVectorType& get(int i) const
241 {
242 XASSERTM((0 <= i) && (i < count_), "invalid sub-vector index");
243 return (i == 0) ? _first : _rest.get(i-1);
244 }
245
247 std::uint64_t get_checkpoint_size(SerialConfig& config)
248 {
249 return sizeof(std::uint64_t) + _first.get_checkpoint_size(config) + _rest.get_checkpoint_size(config); //sizeof(std::uint64_t) bits needed to store lenght of checkpointed _first
250 }
251
253 void restore_from_checkpoint_data(std::vector<char> & data)
254 {
255 std::uint64_t isize = *(std::uint64_t*) data.data(); //get size of checkpointed _first
256 std::vector<char>::iterator start = std::begin(data) + sizeof(std::uint64_t);
257 std::vector<char>::iterator last_of_first = std::begin(data) + sizeof(std::uint64_t) + (int) isize;
258 std::vector<char> buffer_first(start, last_of_first);
259 _first.restore_from_checkpoint_data(buffer_first);
260
261 data.erase(std::begin(data), last_of_first);
263 }
264
266 std::uint64_t set_checkpoint_data(std::vector<char>& data, SerialConfig& config)
267 {
268 std::size_t old_size = data.size();
269 data.insert(std::end(data), sizeof(std::uint64_t), 0); //add placeholder
270 std::uint64_t ireal_size = _first.set_checkpoint_data(data, config); //add data of _first to the overall checkpoint and save its size
271 char* csize = reinterpret_cast<char*>(&ireal_size);
272 for(std::size_t i(0) ; i < sizeof(std::uint64_t) ; ++i) //overwrite the guessed datalength
273 {
274 data[old_size +i] = csize[i];
275 }
276
277 return sizeof(std::uint64_t) + ireal_size + _rest.set_checkpoint_data(data, config); //generate and add checkpoint data for the _rest
278 }
279
281 SubVectorType& first()
282 {
283 return _first;
284 }
285
286 const SubVectorType& first() const
287 {
288 return _first;
289 }
290
291 RestClass& rest()
292 {
293 return _rest;
294 }
295
296 const RestClass& rest() const
297 {
298 return _rest;
299 }
301
303 Index size() const
304 {
305 return _first.size() + _rest.size();
306 }
307
310 {
311 return _first.size_raw() + _rest.size_raw();
312 }
313
315 int blocks() const
316 {
317 return num_blocks;
318 }
319
326 void format()
327 {
328 first().format();
329 rest().format();
330 }
331
332 void format(DataType value)
333 {
334 first().format(value);
335 rest().format(value);
336 }
337
345 void format(Random & rng, DataType min, DataType max)
346 {
347 first().format(rng, min, max);
348 rest().format(rng, min, max);
349 }
350
352 void clear()
353 {
354 first().clear();
355 rest().clear();
356 }
357
359 static String name()
360 {
361 return String("PowerVector<") + SubVectorType::name() + "," + stringify(count_) + ">";
362 }
363
370 template<typename SubType2_>
371 void copy(const PowerVector<SubType2_, count_>& x, bool full = false)
372 {
373 first().copy(x.first(), full);
374 rest().copy(x.rest(), full);
375 }
376
389 void axpy(const PowerVector& x, DataType alpha = DataType(1))
390 {
391 first().axpy(x.first(), alpha);
392 rest().axpy(x.rest(), alpha);
393 }
394
401 void component_product(const PowerVector & x, const PowerVector & y)
402 {
403 first().component_product(x.first(), y.first());
404 rest().component_product(x.rest(), y.rest());
405 }
406
417 {
418 first().component_invert(x.first(), alpha);
419 rest().component_invert(x.rest(), alpha);
420 }
421
431 void scale(const PowerVector& x, DataType alpha)
432 {
433 first().scale(x.first(), alpha);
434 rest().scale(x.rest(), alpha);
435 }
436
443 DataType dot(const PowerVector& x) const
444 {
445 return first().dot(x.first()) + rest().dot(x.rest());
446 }
447
451 DataType triple_dot(const PowerVector& x, const PowerVector& y) const
452 {
453 return first().triple_dot(x.first(), y.first())
454 + rest().triple_dot(x.rest(), y.rest());
455 }
456
461 {
462 return first().norm2sqr() + rest().norm2sqr();
463 }
464
469 {
470 return Math::sqrt(norm2sqr());
471 }
472
479 {
480 return Math::max(first().max_abs_element(), rest().max_abs_element());
481 }
482
489 {
490 return Math::min(first().min_abs_element(), rest().min_abs_element());
491 }
492
499 {
500 return Math::max(first().max_element(), rest().max_element());
501 }
502
509 {
510 return Math::min(first().min_element(), rest().min_element());
511 }
512
520 {
521 return Math::max(first().max_rel_diff(x.first()), rest().max_rel_diff(x.rest()));
522 }
523
532 bool same_layout(const PowerVector& x) const
533 {
534 return (first().same_layout(x.first())) && (rest().same_layout(x.rest()));
535 }
536
539 Index get_values(DataType * const pval_set) const
540 {
541 Index n = this->first().get_values(pval_set);
542 return this->rest().get_values(pval_set + n) + n;
543 }
544
546 Index set_values(const DataType * const pval_set)
547 {
548 Index n = this->first().set_values(pval_set);
549 return this->rest().set_values(pval_set + n) + n;
550 }
552
560 template<typename SubType2_>
562 {
563 this->first().convert(other.first());
564 this->rest().convert(other.rest());
565 }
566
568 std::size_t bytes() const
569 {
570 return _first.bytes() + _rest.bytes();
571 }
572
579 void read_from(FileMode mode, const String& filename)
580 {
581 std::ifstream file(filename.c_str(), std::ifstream::in | std::ifstream::binary);
582 if (! file.is_open())
583 XABORTM("Unable to open Vector file " + filename);
584 read_from(mode, file);
585 file.close();
586 }
587
594 void read_from(FileMode mode, std::istream& file)
595 {
596 switch(mode)
597 {
599 {
600 std::uint64_t magic; // magic_number
601 file.read((char *)&magic, (long)(sizeof(std::uint64_t)));
602 if (magic != 100)
603 XABORTM("Given file or file component is no PowerVector!");
604 std::uint64_t count; // subvector count
605 file.read((char *)&count, (long)(sizeof(std::uint64_t)));
606 if (count != count_)
607 XABORTM("PowerVector file read in component count mismatch: class has " + stringify(count_) + "- " + stringify(count) + " read in!");
608
609 _read_from_binary(file);
610 break;
611 }
612 default:
613 XABORTM("Filemode not supported!");
614 }
615 }
616
623 void write_out(FileMode mode, const String& filename) const
624 {
625 std::ofstream file(filename.c_str(), std::ofstream::out | std::ofstream::binary);
626 if (! file.is_open())
627 XABORTM("Unable to open Vector file " + filename);
628 write_out(mode, file);
629 file.close();
630 }
631
638 void write_out(FileMode mode, std::ostream& file) const
639 {
640 switch(mode)
641 {
643 {
644 size_t gsize(2 * sizeof(std::uint64_t)); // magic_number and subvector count
645 std::vector<char> result(gsize);
646 char * array(result.data());
647 std::uint64_t * uiarray(reinterpret_cast<std::uint64_t *>(array));
648 uiarray[0] = 100;
649 uiarray[1] = count_;
650
651 file.write(result.data(), long(result.size()));
652
653 _write_out_binary(file);
654 break;
655 }
656 default:
657 XABORTM("Filemode not supported!");
658 }
659 }
660 }; // class PowerVector<...>
661
663
668 template<typename SubType_>
669 class PowerVector<SubType_, 1>
670 {
671 private:
672
673 template<typename, int>
674 friend class PowerVector;
675
677 void _read_from_binary(std::istream& file)
678 {
679 //process first
680 _first.read_from(FileMode::fm_binary, file);
681 }
682
684 void _write_out_binary(std::ostream& file) const
685 {
686 //process first
687 _first.write_out(FileMode::fm_binary, file);
688 }
689
690 public:
691 typedef SubType_ SubVectorType;
692
693 typedef typename SubVectorType::DataType DataType;
694 typedef typename SubVectorType::IndexType IndexType;
695 template <typename DT2_ = DataType, typename IT2_ = IndexType>
696 using ContainerType = PowerVector<typename SubType_::template ContainerType<DT2_, IT2_>, Index(1)>;
697
699 template <typename DataType2_, typename IndexType2_>
700 using ContainerTypeByDI = ContainerType<DataType2_, IndexType2_>;
701
702 static constexpr int num_blocks = 1;
703
704 protected:
706
707 public:
708 PowerVector()
709 {
710 }
711
712 explicit PowerVector(Index sub_size)
713 : _first(sub_size)
714 {
715 }
716
717 explicit PowerVector(Index sub_size, DataType value)
718 : _first(sub_size, value)
719 {
720 }
721
722 explicit PowerVector(SubVectorType&& the_first) :
723 _first(std::move(the_first))
724 {
725 }
726
727 PowerVector(PowerVector&& other) :
728 _first(std::move(other._first))
729 {
730 }
731
732 PowerVector& operator=(PowerVector&& other)
733 {
734 if(this != &other)
735 {
736 _first = std::move(other._first);
737 }
738 return *this;
739 }
740
742 PowerVector(const PowerVector&) = delete;
744 PowerVector& operator=(const PowerVector&) = delete;
745
746 virtual ~PowerVector()
747 {
748 }
749
757 PowerVector clone(LAFEM::CloneMode mode = LAFEM::CloneMode::Weak) const
758 {
759 return PowerVector(_first.clone(mode));
760 }
761
769 void clone(const PowerVector& other, CloneMode clone_mode)
770 {
771 _first.clone(other._first, clone_mode);
772 }
773
780 void clone(const PowerVector& other)
781 {
782 _first.clone(other._first);
783 }
784
785 template<int i>
787 {
788 static_assert(i == 0, "invalid sub-vector index");
789 return _first;
790 }
791
792 template<int i>
793 const SubVectorType& at() const
794 {
795 static_assert(i == 0, "invalid sub-vector index");
796 return _first;
797 }
798
799 SubVectorType& get(int i)
800 {
801 XASSERTM(i == 0, "invalid sub-vector index");
802 return _first;
803 }
804
805 const SubVectorType& get(int i) const
806 {
807 XASSERTM(i == 0, "invalid sub-vector index");
808 return _first;
809 }
810
811 SubVectorType& first()
812 {
813 return _first;
814 }
815
816 const SubVectorType& first() const
817 {
818 return _first;
819 }
820
822 std::uint64_t get_checkpoint_size(SerialConfig& config)
823 {
824 return _first.get_checkpoint_size(config);
825 }
826
828 void restore_from_checkpoint_data(std::vector<char> & data)
829 {
830 _first.restore_from_checkpoint_data(data);
831 }
832
834 std::uint64_t set_checkpoint_data(std::vector<char>& data, SerialConfig& config)
835 {
836 return _first.set_checkpoint_data(data, config);
837 }
838
840 Index size() const
841 {
842 return _first.size();
843 }
844
846 Index size_raw() const
847 {
848 return _first.size_raw();
849 }
850
851 int blocks() const
852 {
853 return 1;
854 }
855
856 void format()
857 {
858 _first.format();
859 }
860
861 void format(DataType value)
862 {
863 _first.format(value);
864 }
865
866 void format(Random & rng, DataType min, DataType max)
867 {
868 first().format(rng, min, max);
869 }
870
871 void clear()
872 {
873 first().clear();
874 }
875
876 static String name()
877 {
878 return String("PowerVector<") + SubVectorType::name() + ",1>";
879 }
880
881 template<typename SubType2_>
882 void copy(const PowerVector<SubType2_, 1>& x, bool full = false)
883 {
884 first().copy(x.first(), full);
885 }
886
887 void axpy(const PowerVector& x, DataType alpha = DataType(1))
888 {
889 first().axpy(x.first(), alpha);
890 }
891
892 void component_product(const PowerVector & x, const PowerVector & y)
893 {
894 first().component_product(x.first(), y.first());
895 }
896
897 void component_invert(const PowerVector& x, DataType alpha = DataType(1))
898 {
899 first().component_invert(x.first(), alpha);
900 }
901
902 void scale(const PowerVector& x, DataType alpha)
903 {
904 first().scale(x.first(), alpha);
905 }
906
907 DataType dot(const PowerVector& x) const
908 {
909 return first().dot(x.first());
910 }
911
912 DataType triple_dot(const PowerVector& x, const PowerVector& y) const
913 {
914 return first().triple_dot(x.first(), y.first());
915 }
916
917 DataType triple_dot_i(const PowerVector& x, const PowerVector& y) const
918 {
919 return first().triple_dot_i(x.first(), y.first());
920 }
921
922 DataType norm2sqr() const
923 {
924 return first().norm2sqr();
925 }
926
927 DataType norm2() const
928 {
929 return Math::sqrt(norm2sqr());
930 }
931
933 {
934 return first().max_abs_element();
935 }
936
938 {
939 return first().min_abs_element();
940 }
941
942 DataType max_element() const
943 {
944 return first().max_element();
945 }
946
947 DataType min_element() const
948 {
949 return first().min_element();
950 }
951
952 DataType max_rel_diff(const PowerVector & x) const
953 {
954 return first().max_rel_diff(x.first());
955 }
956
957 Index get_values(DataType * const pval_set) const
958 {
959 return this->first().get_values(pval_set);
960 }
961
962 Index set_values(const DataType * const pval_set)
963 {
964 return this->first().set_values(pval_set);
965 }
966
974 template<typename SubType2_>
975 void convert(const PowerVector<SubType2_, 1>& other)
976 {
977 this->first().convert(other.first());
978 }
979
981 std::size_t bytes() const
982 {
983 return _first.bytes();
984 }
985
992 void read_from(FileMode mode, const String& filename)
993 {
994 switch(mode)
995 {
997 read_from_binary(filename);
998 break;
999 default:
1000 XABORTM("Filemode not supported!");
1001 }
1002 }
1003
1010 void read_from(FileMode mode, std::istream& file)
1011 {
1012 switch(mode)
1013 {
1015 read_from_binary(file);
1016 break;
1017 default:
1018 XABORTM("Filemode not supported!");
1019 }
1020 }
1021
1027 void read_from_binary(const String& filename)
1028 {
1029 std::ifstream file(filename.c_str(), std::ifstream::in | std::ifstream::binary);
1030 if (! file.is_open())
1031 XABORTM("Unable to open Vector file " + filename);
1032 read_from_binary(file);
1033 file.close();
1034 }
1035
1041 void read_from_binary(std::istream& file)
1042 {
1043 std::uint64_t magic; // magic_number
1044 file.read((char *)&magic, (long)(sizeof(std::uint64_t)));
1045 if (magic != 100)
1046 XABORTM("Given file or file component is no PowerVector!");
1047 std::uint64_t count; // subvector count
1048 file.read((char *)&count, (long)(sizeof(std::uint64_t)));
1049 if (count != 1)
1050 XABORTM("PowerVector file read in component count mismatch: class has 1 - " + stringify(count) + " read in!");
1051
1052 _read_from_binary(file);
1053 }
1054
1061 void write_out(FileMode mode, const String& filename) const
1062 {
1063 switch(mode)
1064 {
1066 write_out_binary(filename);
1067 break;
1068 default:
1069 XABORTM("Filemode not supported!");
1070 }
1071 }
1072
1079 void write_out(FileMode mode, std::ostream& file) const
1080 {
1081 switch(mode)
1082 {
1084 write_out_binary(file);
1085 break;
1086 default:
1087 XABORTM("Filemode not supported!");
1088 }
1089 }
1090
1096 void write_out_binary(const String& filename) const
1097 {
1098 std::ofstream file(filename.c_str(), std::ofstream::out | std::ofstream::binary);
1099 if (! file.is_open())
1100 XABORTM("Unable to open Vector file " + filename);
1101 write_out_binary(file);
1102 file.close();
1103 }
1104
1112 void write_out_binary(std::ostream& file) const
1113 {
1114 size_t gsize(2 * sizeof(std::uint64_t)); // magic_number and subvector count
1115 std::vector<char> result(gsize);
1116 char * array(result.data());
1117 std::uint64_t * uiarray(reinterpret_cast<std::uint64_t *>(array));
1118 uiarray[0] = 100;
1119 uiarray[1] = 1; //fixed count_ for power vector specialization
1120
1121 file.write(result.data(), long(result.size()));
1122
1123 _write_out_binary(file);
1124 }
1125 }; // class PowerVector<...,1>
1126
1127 template <typename SubType_, Index count_>
1128 inline void dump_power_vector(std::ostream & os, const PowerVector<SubType_, count_>& x)
1129 {
1130 os << "," << x.first();
1131 dump_power_vector(os, x.rest());
1132 }
1133
1134 template <typename SubType_>
1135 inline void dump_power_vector(std::ostream & os, const PowerVector<SubType_, 1>& x)
1136 {
1137 os << x.first();
1138 }
1139
1140 template <typename SubType_, Index count_>
1141 inline std::ostream& operator<< (std::ostream & os, const PowerVector<SubType_, count_>& x)
1142 {
1143 os << "[";
1144 dump_power_vector(os, x);
1145 os << "]";
1146 return os;
1147 }
1149 } // namespace LAFEM
1150} // namespace FEAT
#define XABORTM(msg)
Abortion macro definition with custom message.
Definition: assertion.hpp:192
#define XASSERTM(expr, msg)
Assertion macro definition with custom message.
Definition: assertion.hpp:263
Power-Vector meta class template.
PowerVector & operator=(const PowerVector &)=delete
deleted copy-assign operator
Index size() const
Returns the total size of this tuple-vector.
void _write_out_binary(std::ostream &file) const
write binary data of _first and _rest to file.
void convert(const PowerVector< SubType2_, count_ > &other)
Conversion method.
void write_out(FileMode mode, const String &filename) const
Write out vector to file.
DataType norm2sqr() const
Returns the squared euclid norm of this vector.
bool same_layout(const PowerVector &x) const
Checks if the structural layout of this vector matches that of another vector. This excludes comparis...
SubType_ SubVectorType
sub-vector type
const SubVectorType & get(int i) const
Returns a sub-vector block.
PowerVector(SubVectorType &&the_first, RestClass &&the_rest)
base-class constructor; for internal use only
static String name()
Returns a descriptive string for this container.
PowerVector(PowerVector &&other)
move CTOR
PowerVector(const PowerVector &)=delete
deleted copy-ctor
void scale(const PowerVector &x, DataType alpha)
Performs .
SubVectorType::IndexType IndexType
sub-vector index type
DataType min_abs_element() const
Retrieve the absolute minimum value of this vector.
PowerVector(Index sub_size, DataType value)
Constructor.
static constexpr int num_blocks
number of vector blocks
ContainerType< DataType2_, IndexType2_ > ContainerTypeByDI
this typedef lets you create a vector container with different Data and Index types
RestClass _rest
the remaining part
PowerVector< typename SubType_::template ContainerType< DT2_, IT2_ >, count_ > ContainerType
Our 'base' class type.
void clone(const PowerVector &other)
Turns this vector into a clone of other.
void copy(const PowerVector< SubType2_, count_ > &x, bool full=false)
Performs .
void restore_from_checkpoint_data(std::vector< char > &data)
Extract object from checkpoint.
void axpy(const PowerVector &x, DataType alpha=DataType(1))
Performs .
void component_invert(const PowerVector &x, DataType alpha=DataType(1))
Performs .
PowerVector clone(LAFEM::CloneMode mode=LAFEM::CloneMode::Weak) const
Creates and returns a copy of this vector.
const SubVectorType & at() const
Returns a sub-vector block.
void write_out(FileMode mode, std::ostream &file) const
Write out vector to file.
DataType min_element() const
Retrieve the minimum value of this vector.
void clear()
Free all allocated arrays.
int blocks() const
Returns the number of blocks in this power-vector.
PowerVector< SubType_, count_ - 1 > RestClass
base-class typedef
std::uint64_t set_checkpoint_data(std::vector< char > &data, SerialConfig &config)
SubVectorType::DataType DataType
sub-vector data type
std::uint64_t get_checkpoint_size(SerialConfig &config)
Calculate size.
void format()
Reset all elements of the container to a given value or zero if missing.
SubVectorType _first
the first sub-vector
DataType max_abs_element() const
Retrieve the absolute maximum value of this vector.
DataType max_element() const
Retrieve the maximum value of this vector.
void _read_from_binary(std::istream &file)
read binary data of _first and _rest to file.
DataType triple_dot(const PowerVector &x, const PowerVector &y) const
Calculate .
DataType max_rel_diff(const PowerVector &x) const
Retrieve the maximum relative difference of this vector and another one y.max_rel_diff(x) returns .
PowerVector & operator=(PowerVector &&other)
move-assign operator
std::size_t bytes() const
Returns the total amount of bytes allocated.
void format(Random &rng, DataType min, DataType max)
Reset all elements of the container to random values.
void read_from(FileMode mode, const String &filename)
Read in vector from file.
SubVectorType & at()
Returns a sub-vector block.
Index size_raw() const
Returns the total size of this tuple-vector.
SubVectorType & get(int i)
Returns a sub-vector block.
PowerVector(Index sub_size)
Constructor.
void read_from(FileMode mode, std::istream &file)
Read in vector from stream.
DataType norm2() const
Returns the euclid norm of this vector.
void component_product(const PowerVector &x, const PowerVector &y)
Performs .
DataType dot(const PowerVector &x) const
Returns the dot-product of this vector and another vector.
void clone(const PowerVector &other, CloneMode clone_mode)
Turns this vector into a clone of other.
virtual ~PowerVector()
virtual destructor
Config class for serialize parameter.
Definition: container.hpp:50
Pseudo-Random Number Generator.
Definition: random.hpp:54
String class implementation.
Definition: string.hpp:47
@ other
generic/other permutation strategy
T_ sqrt(T_ x)
Returns the square-root of a value.
Definition: math.hpp:300
T_ min(T_ a, T_ b)
Returns the minimum of two values.
Definition: math.hpp:123
T_ max(T_ a, T_ b)
Returns the maximum of two values.
Definition: math.hpp:137
@ rest
restriction (multigrid)
FEAT namespace.
Definition: adjactor.hpp:12
String stringify(const T_ &item)
Converts an item into a String.
Definition: string.hpp:993
@ value
specifies whether the space should supply basis function values
std::uint64_t Index
Index data type.
Power container element helper class template.