| 67 | and std::is_convertible_v<std::remove_cvref_t<W>, |
| 68 | std::vector<std::int64_t>> |
| 69 | Geometry( |
| 70 | std::shared_ptr<const common::IndexMap> index_map, U&& dofmaps, |
| 71 | const std::vector<fem::CoordinateElement< |
| 72 | typename std::remove_reference_t<typename V::value_type>>>& elements, |
| 73 | V&& x, int dim, W&& input_global_indices) |
| 74 | : _dim(dim), _dofmaps(std::forward<U>(dofmaps)), |
| 75 | _index_map(std::move(index_map)), _cmaps(elements), |
| 76 | _x(std::forward<V>(x)), |
| 77 | _input_global_indices(std::forward<W>(input_global_indices)) |
| 78 | { |
| 79 | assert(_x.size() % 3 == 0); |
| 80 | if (_x.size() / 3 != _input_global_indices.size()) |
| 81 | throw std::runtime_error("Geometry size mismatch."); |
| 82 | |
| 83 | if (_dofmaps.size() != _cmaps.size()) |
| 84 | { |
| 85 | throw std::runtime_error("Geometry number of dofmaps not equal to the " |
| 86 | "number of coordinate elements."); |
| 87 | } |
| 88 | |
| 89 | // TODO: check that elements dim == number of dofmap columns |
| 90 | } |
| 91 | |
| 92 | /// Copy constructor |
| 93 | Geometry(const Geometry&) = default; |