Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions recipes/lielab/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sources:
"0.5.1":
url: "https://github.com/sandialabs/Lielab/archive/refs/tags/v0.5.1.tar.gz"
sha256: "5a7545a675f630418634d9827e8db5035949bf8ae165f17600c03bf5a6da35af"
"0.5.2":
url: "https://github.com/sandialabs/Lielab/archive/refs/tags/v0.5.2.tar.gz"
sha256: "D98DDF93FA317165891B69944C5FFAB48C3955FD7C1C9428B06A0452F8FCA453"
6 changes: 6 additions & 0 deletions recipes/lielab/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ class LielabConan(ConanFile):
license = "MIT"
options = {
"fPIC": [True, False],
"with_assertions": [True, False],
}
default_options = {
"fPIC": True,
"with_assertions": True,
}

def config_options(self):
Expand All @@ -31,6 +33,7 @@ def config_options(self):

def requirements(self):
self.requires("eigen/[>=5.0.0 <6]", transitive_headers=True)
self.requires("fmt/[>=12.0.0 <13]")

def validate(self):
check_min_cppstd(self, 20)
Expand All @@ -47,6 +50,8 @@ def layout(self):

def generate(self):
tc = CMakeToolchain(self)
if "with_assertions" in self.options:
tc.variables["LIELAB_WITH_ASSERTIONS"] = self.options.with_assertions
tc.variables["LIELAB_INSTALL_LIBRARY"] = True
tc.variables["LIELAB_BUILD_TESTS"] = False
tc.variables["LIELAB_BUILD_PYTHON"] = False
Expand All @@ -61,6 +66,7 @@ def build(self):

def package(self):
copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
copy(self, "SCR", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
cmake = CMake(self)
cmake.configure()
cmake.install()
Expand Down
27 changes: 9 additions & 18 deletions recipes/lielab/all/test_package/test_package.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,18 @@


int main(void) {
Lielab::domain::so u(3);
Lielab::domain::so v(3);
Lielab::domain::so w(3);
Lielab::domain::so ansso(3);
Lielab::domain::SO Gso(3);
using Lielab::domain::so;
using Lielab::domain::SO;
using Lielab::functions::exp;
using Lielab::functions::Ad;

Eigen::VectorXd xx(3);
xx << 1.0, 0.0, 0.0;
Eigen::VectorXd yy(3);
yy << 0.0, 1.0, 0.0;
Eigen::VectorXd zz(3);
zz << 0.0, 0.0, 1.0;
Eigen::MatrixXd truthso(3,3);
const so u = so::from_vector({1.0, 0.0, 0.0});
const so v = so::from_vector({0.0, 1.0, 0.0});
const so w = so::from_vector({0.0, 0.0, 1.0});

u.set_vector(xx);
v.set_vector(yy);
w.set_vector(zz);
Gso = Lielab::functions::exp(v);
const SO g = exp(v);
const so x = Ad(g, u);

// GuG^-1
ansso = Lielab::functions::Ad(Gso, u);
std::cout << "Lielab v" << Lielab::VERSION << std::endl;
std::cout << Lielab::AUTHOR << std::endl;
std::cout << Lielab::LOCATION << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion recipes/lielab/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
versions:
"0.5.1":
"0.5.2":
folder: "all"