Skip to content

Commit

Permalink
Merge pull request #61 from ctlee/development
Browse files Browse the repository at this point in the history
Prepping for v2.0.8
  • Loading branch information
ctlee authored Nov 15, 2023
2 parents 726de48 + f684c67 commit 0b01bda
Show file tree
Hide file tree
Showing 26 changed files with 374 additions and 20,583 deletions.
6 changes: 4 additions & 2 deletions .github/scripts/blender_pyversion_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
import sys

bver_to_pyver = {
"2.79": '3.5',
# "2.79": '3.5',
"2.83": '3.7',
"2.93": '3.9'
"2.93": '3.9',
"3.3": "3.10",
"3.6": "3.10",
}

if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
blender: [2.79, 2.83, 2.93]
blender: [2.83, 2.93, 3.3, 3.6]
runs-on: ${{ matrix.os }}
defaults:
run:
Expand Down
4 changes: 2 additions & 2 deletions cmake/blenderexec.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ f = open('@CMAKE_CURRENT_BINARY_DIR@/found_blender_info', 'w')
f.write('{}\n'.format(str(bpy.app.version[0]) + '.' + str(bpy.app.version[1]) + '.' + str(bpy.app.version[2])))
f.write('{}\n'.format(bpy.utils.script_path_user()))
f.write('{}\n'.format('.'.join(str(v) for v in sys.version_info[0:3])));
f.write('{}\n'.format(bpy.app.binary_path_python))
f.write('{}\n'.format(sys.executable))
f.write('{}\n'.format(struct.calcsize('@P')))
f.close()
f.close()
14 changes: 10 additions & 4 deletions include/gamer/SurfaceMesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#pragma once

#include <iostream>
#include <limits>
#include <memory>
#include <stdexcept>
#include <string>
Expand Down Expand Up @@ -52,6 +53,8 @@ struct SMGlobal {
bool useVolumeConstraint;
/// Flag that determines if the mesh represents a hole or not
bool ishole;
/// Region point
Eigen::Vector3d regionPoint;

/**
* @brief Default constructor
Expand All @@ -65,7 +68,10 @@ struct SMGlobal {
SMGlobal(int marker = -1, float volumeConstraint = -1,
bool useVolumeConstraint = false, bool ishole = false)
: marker(marker), volumeConstraint(volumeConstraint),
useVolumeConstraint(useVolumeConstraint), ishole(ishole) {}
useVolumeConstraint(useVolumeConstraint), ishole(ishole),
regionPoint(std::numeric_limits<double>::max(),
std::numeric_limits<double>::max(),
std::numeric_limits<double>::max()) {}
};

struct SMVertex : Vertex {
Expand Down Expand Up @@ -545,7 +551,7 @@ void selectFlipEdges(
// faces. "
// << "Returning..." << std::endl;
gamer_runtime_error("SurfaceMesh is not pseudomanifold. Found "
"an edge connected to more than 2 faces.");
"an edge connected to more than 2 faces.");
} else if (up.size() < 2) // Edge is a boundary
{
// std::cerr << "This edge participates in fewer than 2
Expand Down Expand Up @@ -1102,9 +1108,9 @@ std::vector<std::unique_ptr<SurfaceMesh>> splitSurfaces(SurfaceMesh &mesh);

/**
* @brief Cache face and vertex normals
*
*
* A zero vector normal will be stored instead of raising an error
*
*
* @param mesh Surface mesh of interest
*/
void cacheNormals(SurfaceMesh &mesh);
Expand Down
23 changes: 22 additions & 1 deletion include/gamer/TetMesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ struct TMVertexProperties {
struct TMVertex : Vertex, TMVertexProperties {
TMVertex() : TMVertex(Vertex(), TMVertexProperties()) {}
template <typename... Args>
TMVertex(Args &&... args) : TMVertex(Vertex(std::forward<Args>(args)...)) {}
TMVertex(Args &&...args) : TMVertex(Vertex(std::forward<Args>(args)...)) {}
TMVertex(Vertex v) : TMVertex(v, TMVertexProperties(-1)) {}
TMVertex(Vertex v, TMVertexProperties p) : Vertex(v), TMVertexProperties(p) {}

Expand Down Expand Up @@ -323,6 +323,16 @@ makeTetMesh(const std::vector<SurfaceMesh const *> &surfmeshes,
*/
std::unique_ptr<SurfaceMesh> extractSurface(const TetMesh &mesh);

/**
* @brief Extracts the boundary surfaces of a tetrahedral mesh from
* boundary markers
*
* @param[in] mesh The mesh
*
* @return Bounding surface meshes
*/
std::unique_ptr<SurfaceMesh> extractSurfaceFromBoundary(const TetMesh &mesh);

/**
* @brief Laplacian smoothing of tetrahedral mesh
*
Expand Down Expand Up @@ -382,4 +392,15 @@ void writeTriangle(const std::string &filename, const TetMesh &mesh);
* @return Tetrahedral mesh
*/
std::unique_ptr<TetMesh> readDolfin(const std::string &filename);

/**
* @brief Compute curvatures and write them to dolfin file
*
* @param filename The filename
* @param mesh The mesh
* @param tetmesh Tetrahedral mesh
*/
void curvatureMDSBtoDolfin(const std::string &filename, const SurfaceMesh &mesh,
const TetMesh &tetmesh);

} // end namespace gamer
3 changes: 2 additions & 1 deletion include/gamer/gamer.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ void throw_runtime_error(const char *function, const char *file, const int line,
T &&...ts) {
std::stringstream ss;
ss << "Error: ";
int dummy[] = {0, ((ss << std::forward<T>(ts)), 0)...};
// https://stackoverflow.com/questions/25680461/variadic-template-pack-expansion/25683817#25683817
int dummy[] = {0, ((ss << std::forward<T>(ts) << " "), 0)...};
static_cast<void>(dummy); // Avoid warning for unused variable
ss << " in function " << function << " at " << file << ":" << line;
throw std::runtime_error(ss.str());
Expand Down
2 changes: 1 addition & 1 deletion libraries/tetgen/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)

project(Tetgen VERSION 1.6.0)

Expand Down
62 changes: 0 additions & 62 deletions libraries/triangle/A.poly

This file was deleted.

99 changes: 0 additions & 99 deletions libraries/triangle/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 0b01bda

Please sign in to comment.