Skip to content

Commit

Permalink
Merge branch 'main' into version-0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisrichardson committed Apr 26, 2022
2 parents ccf3c49 + 523282c commit 24ec6f2
Show file tree
Hide file tree
Showing 17 changed files with 390 additions and 90 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,9 @@ joss/paper.pdf
*.egg-info
_skbuild
dist

*.png
*.jpg
*.svg
!joss/img/*.png
!joss/img/*.svg
2 changes: 1 addition & 1 deletion cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ add_feature_info(BUILD_SHARED_LIBS BUILD_SHARED_LIBS "Build Basix with shared li
option(DOWNLOAD_XTENSOR_LIBS "Download xtl and xtensor. Requires git." OFF)
add_feature_info(DOWNLOAD_XTENSOR_LIBS DOWNLOAD_XTENSOR_LIBS "Download xtl and xtensor. Requires git.")

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

Expand Down
12 changes: 6 additions & 6 deletions cpp/basix/finite-element.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ class FiniteElement
FiniteElement& operator=(FiniteElement&& element) = default;

/// Check if two elements are the same
/// @note This operator compares the element properties, e.g. family,
/// @note This operator compares the element properties, eg family,
/// degree, etc, and not computed numerical data
/// @return True if elements are the same
bool operator==(const FiniteElement& e) const;
Expand Down Expand Up @@ -275,7 +275,7 @@ class FiniteElement
/// @return The basis functions (and derivatives). The shape is
/// (derivative, point, basis fn index, value index).
/// - The first index is the derivative, with higher derivatives are
/// stored in triangular (2D) or tetrahedral (3D) ordering, i.e. for
/// stored in triangular (2D) or tetrahedral (3D) ordering, ie for
/// the (x,y) derivatives in 2D: (0,0), (1,0), (0,1), (2,0), (1,1),
/// (0,2), (3,0)... The function basix::indexing::idx can be used to find the
/// appropriate derivative.
Expand All @@ -299,7 +299,7 @@ class FiniteElement
/// value_size). The function `FiniteElement::tabulate_shape` can be
/// used to get the required shape.
/// - The first index is the derivative, with higher derivatives are
/// stored in triangular (2D) or tetrahedral (3D) ordering, i.e. for
/// stored in triangular (2D) or tetrahedral (3D) ordering, ie for
/// the (x,y) derivatives in 2D: (0,0), (1,0), (0,1), (2,0), (1,1),
/// (0,2), (3,0)... The function basix::indexing::idx can be used to
/// find the appropriate derivative.
Expand All @@ -321,7 +321,7 @@ class FiniteElement
/// @return Polynomial degree
int degree() const;

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

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

// Shape function coefficient of expansion sets on cell. If shape
// function is given by @f$\psi_i = \sum_{k} \phi_{k}
// \alpha^{i}_{k}@f$, then _coeffs(i, j) = @f$\alpha^i_k@f$. i.e.,
// \alpha^{i}_{k}@f$, then _coeffs(i, j) = @f$\alpha^i_k@f$. ie
// _coeffs.row(i) are the expansion coefficients for shape function i
// (@f$\psi_{i}@f$).
xt::xtensor<double, 2> _coeffs;
Expand Down
2 changes: 1 addition & 1 deletion cpp/basix/lattice.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ enum class simplex_method
/// optionally including the outer surface points
///
/// For a given celltype, this creates a set of points on a regular grid
/// which covers the cell, e.g. for a quadrilateral, with n=2, the points are:
/// which covers the cell, eg for a quadrilateral, with n=2, the points are:
/// [0,0],[0.5,0],[1,0],[0,0.5],[0.5,0.5],[1,0.5],[0,1],[0.5,1],[1,1]
/// If the parameter exterior is set to false, the points lying on the external
/// boundary are omitted, in this case for a quadrilateral with n=2, the points
Expand Down
4 changes: 2 additions & 2 deletions cpp/basix/loguru.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ bool add_file(const char* path_in, FileMode mode, Verbosity verbosity)
Any logging message with a verbosity lower or equal to
the given verbosity will be included.
This works for Unix like systems (i.e. Linux/Mac)
This works for Unix like systems (ie Linux/Mac)
There is no current implementation for Windows (as I don't know the
equivalent calls or have a way to test them). If you know please
add and send a pull request.
Expand Down Expand Up @@ -2026,7 +2026,7 @@ EcEntryBase::~EcEntryBase() { get_thread_ec_head_ref() = _previous; }
Text ec_to_text(const char* value)
{
// Add quotes around the string to make it obvious where it begin and ends.
// This is great for detecting erroneous leading or trailing spaces in e.g. an
// This is great for detecting erroneous leading or trailing spaces in eg an
// identifier.
auto str = "\"" + std::string(value) + "\"";
return Text{STRDUP(str.c_str())};
Expand Down
14 changes: 7 additions & 7 deletions cpp/basix/loguru.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ struct Message
/* Everything with a verbosity equal or greater than g_stderr_verbosity will be
written to stderr. You can set this in code or via the -v argument.
Set to loguru::Verbosity_OFF to write nothing to stderr.
Default is 0, i.e. only log ERROR, WARNING and INFO are written to stderr.
Default is 0, ie only log ERROR, WARNING and INFO are written to stderr.
*/
LOGURU_EXPORT extern Verbosity g_stderr_verbosity;
LOGURU_EXPORT extern bool g_colorlogtostderr; // True by default.
Expand Down Expand Up @@ -530,7 +530,7 @@ void init(int& argc, char* argv[], const Options& options = {});
LOGURU_EXPORT
void shutdown();

// What ~ will be replaced with, e.g. "/home/your_user_name/"
// What ~ will be replaced with, eg "/home/your_user_name/"
LOGURU_EXPORT
const char* home_dir();

Expand All @@ -553,19 +553,19 @@ const char* current_dir();
LOGURU_EXPORT
const char* filename(const char* path);

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

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

// Helper: thread-safe version strerror
LOGURU_EXPORT
Text errno_as_text();

/* Given a prefix of e.g. "~/loguru/" this might return
/* Given a prefix of eg "~/loguru/" this might return
"/home/your_username/loguru/app_name/20151017_161503.123.log"
where "app_name" is a sanitized version of argv[0].
Expand Down Expand Up @@ -1132,14 +1132,14 @@ some.cpp:
namespace loguru {
Text ec_to_text(MySmallType small_value)
{
// Called only when needed, i.e. on a crash.
// Called only when needed, ie on a crash.
std::string str = small_value.as_string(); // Format
'small_value' here somehow. return Text{STRDUP(str.c_str())};
}
Text ec_to_text(const MyBigType* big_value)
{
// Called only when needed, i.e. on a crash.
// Called only when needed, ie on a crash.
std::string str = big_value->as_string(); // Format
'big_value' here somehow. return Text{STRDUP(str.c_str())};
}
Expand Down
Loading

0 comments on commit 24ec6f2

Please sign in to comment.