Loading...
Searching...
No Matches
lattice.h
// Copyright (c) 2020-2022 Chris Richardson and Garth N. Wells
// FEniCS Project
// SPDX-License-Identifier: MIT
#pragma once
#include "cell.h"
#include <array>
#include <concepts>
#include <utility>
#include <vector>
namespace basix::lattice
{
enum class type
{
equispaced = 0,
gll = 1,
chebyshev = 2,
gl = 4,
chebyshev_plus_endpoints
= 10,
gl_plus_endpoints
= 11,
};
enum class simplex_method
{
none = 0,
warp = 1,
isaac = 2,
centroid = 3,
};
template <std::floating_point T>
std::pair<std::vector<T>, std::array<std::size_t, 2>>
create(cell::type celltype, int n, lattice::type type, bool exterior,
lattice::simplex_method simplex_method = lattice::simplex_method::none);
} // namespace basix::lattice
basix::cell::type
type
Cell type.
Definition cell.h:21
basix::lattice
Lattices of points.
Definition lattice.h:15
basix::lattice::type
type
The type of point spacing to be used in a lattice.
Definition lattice.h:21
basix::lattice::type::equispaced
@ equispaced
Definition lattice.h:22
basix::lattice::type::gll
@ gll
Definition lattice.h:23
basix::lattice::type::chebyshev
@ chebyshev
Definition lattice.h:24
basix::lattice::type::chebyshev_plus_endpoints
@ chebyshev_plus_endpoints
Definition lattice.h:26
basix::lattice::type::gl_plus_endpoints
@ gl_plus_endpoints
Definition lattice.h:28
basix::lattice::type::gl
@ gl
Definition lattice.h:25
basix::lattice::simplex_method
simplex_method
The method used to generate points inside simplices.
Definition lattice.h:34
basix::lattice::simplex_method::centroid
@ centroid
Definition lattice.h:42
basix::lattice::simplex_method::none
@ none
Definition lattice.h:35
basix::lattice::simplex_method::isaac
@ isaac
Definition lattice.h:39
basix::lattice::simplex_method::warp
@ warp
Definition lattice.h:37
basix::lattice::create
std::pair< std::vector< T >, std::array< std::size_t, 2 > > create(cell::type celltype, int n, lattice::type type, bool exterior, lattice::simplex_method simplex_method=lattice::simplex_method::none)
Create a lattice of points on a reference cell optionally including the outer surface points.
Definition lattice.cpp:783