Skip to content

Commit 84e247a

Browse files
authored
Document polyset order (#443)
* Consistent stylisation of eg and ie (following Guardian style guide) * Start documenting polyset order * link to docs * Write test that ensure what demo says about polysets is true * fix #442 * update docs with reverse order * flake * only flip order for polynomial numbering idx * Prisms
1 parent 83aed93 commit 84e247a

File tree

14 files changed

+373
-90
lines changed

14 files changed

+373
-90
lines changed

cpp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ add_feature_info(BUILD_SHARED_LIBS BUILD_SHARED_LIBS "Build Basix with shared li
2626
option(DOWNLOAD_XTENSOR_LIBS "Download xtl and xtensor. Requires git." OFF)
2727
add_feature_info(DOWNLOAD_XTENSOR_LIBS DOWNLOAD_XTENSOR_LIBS "Download xtl and xtensor. Requires git.")
2828

29-
# Enable xtensor with target-specific optimization, i.e. -march=native
29+
# Enable xtensor with target-specific optimization, ie -march=native
3030
option(XTENSOR_OPTIMIZE "Enable xtensor target-specific optimization" OFF)
3131
add_feature_info(XTENSOR_OPTIMIZE XTENSOR_OPTIMIZE "Enable architecture-specific optimizations as defined by xtensor.")
3232

cpp/basix/finite-element.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ class FiniteElement
245245
FiniteElement& operator=(FiniteElement&& element) = default;
246246

247247
/// Check if two elements are the same
248-
/// @note This operator compares the element properties, e.g. family,
248+
/// @note This operator compares the element properties, eg family,
249249
/// degree, etc, and not computed numerical data
250250
/// @return True if elements are the same
251251
bool operator==(const FiniteElement& e) const;
@@ -275,7 +275,7 @@ class FiniteElement
275275
/// @return The basis functions (and derivatives). The shape is
276276
/// (derivative, point, basis fn index, value index).
277277
/// - The first index is the derivative, with higher derivatives are
278-
/// stored in triangular (2D) or tetrahedral (3D) ordering, i.e. for
278+
/// stored in triangular (2D) or tetrahedral (3D) ordering, ie for
279279
/// the (x,y) derivatives in 2D: (0,0), (1,0), (0,1), (2,0), (1,1),
280280
/// (0,2), (3,0)... The function basix::indexing::idx can be used to find the
281281
/// appropriate derivative.
@@ -299,7 +299,7 @@ class FiniteElement
299299
/// value_size). The function `FiniteElement::tabulate_shape` can be
300300
/// used to get the required shape.
301301
/// - The first index is the derivative, with higher derivatives are
302-
/// stored in triangular (2D) or tetrahedral (3D) ordering, i.e. for
302+
/// stored in triangular (2D) or tetrahedral (3D) ordering, ie for
303303
/// the (x,y) derivatives in 2D: (0,0), (1,0), (0,1), (2,0), (1,1),
304304
/// (0,2), (3,0)... The function basix::indexing::idx can be used to
305305
/// find the appropriate derivative.
@@ -321,7 +321,7 @@ class FiniteElement
321321
/// @return Polynomial degree
322322
int degree() const;
323323

324-
/// The element value tensor shape, e.g. returning {} for scalars, {3}
324+
/// The element value tensor shape, eg returning {} for scalars, {3}
325325
/// for vectors in 3D, {2, 2} for a rank-2 tensor in 2D.
326326
/// @return Value shape
327327
const std::vector<int>& value_shape() const;
@@ -693,7 +693,7 @@ class FiniteElement
693693
void apply_inverse_dof_transformation_to_transpose(
694694
const xtl::span<T>& data, int block_size, std::uint32_t cell_info) const;
695695

696-
/// Return the interpolation points, i.e. the coordinates on the
696+
/// Return the interpolation points, ie the coordinates on the
697697
/// reference element where a function need to be evaluated in order
698698
/// to interpolate it in the finite element space.
699699
/// @return Array of coordinate with shape `(num_points, tdim)`
@@ -895,7 +895,7 @@ class FiniteElement
895895

896896
// Shape function coefficient of expansion sets on cell. If shape
897897
// function is given by @f$\psi_i = \sum_{k} \phi_{k}
898-
// \alpha^{i}_{k}@f$, then _coeffs(i, j) = @f$\alpha^i_k@f$. i.e.,
898+
// \alpha^{i}_{k}@f$, then _coeffs(i, j) = @f$\alpha^i_k@f$. ie
899899
// _coeffs.row(i) are the expansion coefficients for shape function i
900900
// (@f$\psi_{i}@f$).
901901
xt::xtensor<double, 2> _coeffs;

cpp/basix/lattice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ enum class simplex_method
6767
/// optionally including the outer surface points
6868
///
6969
/// For a given celltype, this creates a set of points on a regular grid
70-
/// which covers the cell, e.g. for a quadrilateral, with n=2, the points are:
70+
/// which covers the cell, eg for a quadrilateral, with n=2, the points are:
7171
/// [0,0],[0.5,0],[1,0],[0,0.5],[0.5,0.5],[1,0.5],[0,1],[0.5,1],[1,1]
7272
/// If the parameter exterior is set to false, the points lying on the external
7373
/// boundary are omitted, in this case for a quadrilateral with n=2, the points

cpp/basix/loguru.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ bool add_file(const char* path_in, FileMode mode, Verbosity verbosity)
989989
Any logging message with a verbosity lower or equal to
990990
the given verbosity will be included.
991991
992-
This works for Unix like systems (i.e. Linux/Mac)
992+
This works for Unix like systems (ie Linux/Mac)
993993
There is no current implementation for Windows (as I don't know the
994994
equivalent calls or have a way to test them). If you know please
995995
add and send a pull request.
@@ -2026,7 +2026,7 @@ EcEntryBase::~EcEntryBase() { get_thread_ec_head_ref() = _previous; }
20262026
Text ec_to_text(const char* value)
20272027
{
20282028
// Add quotes around the string to make it obvious where it begin and ends.
2029-
// This is great for detecting erroneous leading or trailing spaces in e.g. an
2029+
// This is great for detecting erroneous leading or trailing spaces in eg an
20302030
// identifier.
20312031
auto str = "\"" + std::string(value) + "\"";
20322032
return Text{STRDUP(str.c_str())};

cpp/basix/loguru.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ struct Message
392392
/* Everything with a verbosity equal or greater than g_stderr_verbosity will be
393393
written to stderr. You can set this in code or via the -v argument.
394394
Set to loguru::Verbosity_OFF to write nothing to stderr.
395-
Default is 0, i.e. only log ERROR, WARNING and INFO are written to stderr.
395+
Default is 0, ie only log ERROR, WARNING and INFO are written to stderr.
396396
*/
397397
LOGURU_EXPORT extern Verbosity g_stderr_verbosity;
398398
LOGURU_EXPORT extern bool g_colorlogtostderr; // True by default.
@@ -530,7 +530,7 @@ void init(int& argc, char* argv[], const Options& options = {});
530530
LOGURU_EXPORT
531531
void shutdown();
532532

533-
// What ~ will be replaced with, e.g. "/home/your_user_name/"
533+
// What ~ will be replaced with, eg "/home/your_user_name/"
534534
LOGURU_EXPORT
535535
const char* home_dir();
536536

@@ -553,19 +553,19 @@ const char* current_dir();
553553
LOGURU_EXPORT
554554
const char* filename(const char* path);
555555

556-
// e.g. "foo/bar/baz.ext" will create the directories "foo/" and "foo/bar/"
556+
// eg "foo/bar/baz.ext" will create the directories "foo/" and "foo/bar/"
557557
LOGURU_EXPORT
558558
bool create_directories(const char* file_path_const);
559559

560-
// Writes date and time with millisecond precision, e.g. "20151017_161503.123"
560+
// Writes date and time with millisecond precision, eg "20151017_161503.123"
561561
LOGURU_EXPORT
562562
void write_date_time(char* buff, unsigned buff_size);
563563

564564
// Helper: thread-safe version strerror
565565
LOGURU_EXPORT
566566
Text errno_as_text();
567567

568-
/* Given a prefix of e.g. "~/loguru/" this might return
568+
/* Given a prefix of eg "~/loguru/" this might return
569569
"/home/your_username/loguru/app_name/20151017_161503.123.log"
570570
571571
where "app_name" is a sanitized version of argv[0].
@@ -1132,14 +1132,14 @@ some.cpp:
11321132
namespace loguru {
11331133
Text ec_to_text(MySmallType small_value)
11341134
{
1135-
// Called only when needed, i.e. on a crash.
1135+
// Called only when needed, ie on a crash.
11361136
std::string str = small_value.as_string(); // Format
11371137
'small_value' here somehow. return Text{STRDUP(str.c_str())};
11381138
}
11391139
11401140
Text ec_to_text(const MyBigType* big_value)
11411141
{
1142-
// Called only when needed, i.e. on a crash.
1142+
// Called only when needed, ie on a crash.
11431143
std::string str = big_value->as_string(); // Format
11441144
'big_value' here somehow. return Text{STRDUP(str.c_str())};
11451145
}

0 commit comments

Comments
 (0)