Commit 963b58cc authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

rename to seamsh

parent ebc42ddb
Pipeline #7884 failed with stages
in 29 seconds
......@@ -19,16 +19,16 @@
# along with this program (see COPYING and COPYING.LESSER files). If not,
# see <http://www.gnu.org/licenses/>.
mseabuild-linux :
image : immc/msea-build:v0.1
seamshbuild-linux :
image : immc/seamsh-build:v0.1
stage : build
script:
- cd msealib
- cd seamshlib
- mkdir build
- cd build/
- cmake .. -DCMAKE_BUILD_TYPE=Release
- make
- cp libmsea.so ../../msea
- cp libseamsh.so ../../seamesh
- cd ../..
- python3 setup.py bdist_wheel --plat-name=manylinux1_x86_64
artifacts:
......@@ -36,29 +36,29 @@ mseabuild-linux :
- dist
expire_in: 1 day
mseabuild-windows :
image : immc/msea-build:v0.1
seamshbuild-windows :
image : immc/seamsh-build:v0.1
stage : build
script:
- cd msealib
- cd seamshlib
- mkdir build-mingw
- cd build-mingw
- cmake .. -DCMAKE_TOOLCHAIN_FILE=/cmake-mingw -DCMAKE_BUILD_TYPE=Release
- make
- mv *.dll *.dll.a ../../msea
- mv *.dll *.dll.a ../../seamsh
- cd ../..
- python3 setup.py bdist_wheel --plat-name=win_amd64
mseabuild-osx :
image : immc/msea-build:v0.1
seamshbuild-osx :
image : immc/seamsh-build:v0.1
stage : build
script:
- cd msealib
- cd seamshlib
- mkdir build-osxcross
- cd build-osxcross
- $(osxcross-conf) && cmake .. -DCMAKE_TOOLCHAIN_FILE=/osxcross/target/toolchain.cmake -DCMAKE_BUILD_TYPE=Release
- make
- mv *.dylib ../../msea
- mv *.dylib ../../seamsh
- cd ../../
- python3 setup.py bdist_wheel --plat-name=macosx_10_9_x86_64
artifacts:
......@@ -66,8 +66,8 @@ mseabuild-osx :
- dist
expire_in: 1 day
mseatest :
image : immc/msea-valid:v0.1
seamshtest :
image : immc/seamsh-valid:v0.1
stage : test
script:
- pip3 install --user dist/*manylinux1_x86_64*
......@@ -76,7 +76,7 @@ mseatest :
- python3 testshp.py
mfdeploy-test :
image : immc/msea-build:v0.1
image : immc/seamsh-build:v0.1
stage : deploy
rules :
- if: '$CI_COMMIT_TAG =~ /^w-.*$/'
......@@ -86,7 +86,7 @@ mfdeploy-test :
mfdeploy :
image : immc/msea-build:v0.1
image : immc/seamsh-build:v0.1
stage : deploy
rules :
- if: '$CI_COMMIT_TAG =~ /^v-.*$/'
......
......@@ -17,7 +17,7 @@ sys.path.insert(0, os.path.abspath('..'))
# -- Project information -----------------------------------------------------
project = 'msea'
project = 'seamsh'
copyright = '2020, Jonathan Lambrechts'
author = 'Jonathan Lambrechts'
......
Welcome to msea's documentation!
================================
Welcome to seamsh's documentation!
===================================
.. include:: modules.rst
......
......@@ -4,4 +4,4 @@ msea
.. toctree::
:maxdepth: 4
msea
seamsh
msea.geometry module
seamsh.field module
====================
.. automodule:: msea.geometry
.. automodule:: seamsh.field
:members:
:undoc-members:
:show-inheritance:
msea.gmsh module
=====================
seamsh.geometry module
=======================
.. automodule:: msea.gmsh
.. automodule:: seamsh.geometry
:members:
:undoc-members:
:show-inheritance:
msea.field module
=================
seamsh.gmsh module
===================
.. automodule:: msea.field
.. automodule:: seamsh.gmsh
:members:
:undoc-members:
:show-inheritance:
......@@ -4,6 +4,6 @@ msea package
.. toctree::
:maxdepth: 4
msea.field
msea.gmsh
msea.geometry
seamsh.field
seamsh.gmsh
seamsh.geometry
......@@ -12,11 +12,11 @@ import typing
libdir = os.path.dirname(os.path.realpath(__file__))
if platform.system() == "Windows":
libpath = os.path.join(libdir, "msea.dll")
libpath = os.path.join(libdir, "seamsh.dll")
elif platform.system() == "Darwin":
libpath = os.path.join(libdir, "libmsea.dylib")
libpath = os.path.join(libdir, "libseamsh.dylib")
else:
libpath = os.path.join(libdir, "libmsea.so")
libpath = os.path.join(libdir, "libseamsh.so")
lib = c.CDLL(libpath)
......
cmake_minimum_required(VERSION 3.9)
project(msea C)
add_library(msea SHARED
msea.c
project(seamsh C)
add_library(seamsh SHARED
seamsh.c
)
......@@ -16,7 +16,7 @@ if commit_tag and (commit_tag.startswith("v-") or commit_tag.startswith("w-")):
setuptools.setup(
name="msea",
name="seamsh",
version=version,
author="Jonathan Lambrechts",
author_email="jonathan.lambrechts@uclouvain.be",
......@@ -25,11 +25,11 @@ setuptools.setup(
long_description_content_type="text/markdown",
include_package_data=True,
url="https://www.migflow.be",
packages=["msea"],
package_dir={"msea":"msea"},
#ext_modules=[CMakeExtension("msealib")],
#ext_modules=[setuptools.Extension("seameshlib",["seamesh.c"])],
package_data={"msea":["*.so","*.dll","*.dll.a","*.dylib"]},
packages=["seamsh"],
package_dir={"seamsh":"seamsh"},
#ext_modules=[CMakeExtension("seamshlib")],
#ext_modules=[setuptools.Extension("seamshlib",["seamsh.c"])],
package_data={"seamsh":["*.so","*.dll","*.dll.a","*.dylib"]},
classifiers=[
"Environment :: Console",
"Development Status :: 4 - Beta",
......
......@@ -2,13 +2,13 @@ import os
import urllib.request
import tarfile
if not os.path.isdir("data") :
urllib.request.urlretrieve("ftp://braque.mema.ucl.ac.be/msea/data-test-1.tar.gz", "data-test-1.tar.gz")
urllib.request.urlretrieve("ftp://braque.mema.ucl.ac.be/seamsh/data-test-1.tar.gz", "data-test-1.tar.gz")
f = tarfile.open("data-test-1.tar.gz","r:*")
f.extractall()
import msea
from msea.geometry import CurveType
import msea.geometry
import seamsh
from seamsh.geometry import CurveType
import seamsh.geometry
import numpy as np
from osgeo import osr
......@@ -22,20 +22,20 @@ domain_srs = osr.SpatialReference()
domain_srs.ImportFromEPSG(32631)
#domain_srs.ImportFromProj4("+proj=utm +ellps=WGS84 +zone=31")
domain = msea.geometry.Domain(domain_srs)
domain = seamsh.geometry.Domain(domain_srs)
domain.add_boundary_curves_shp("data/data_no_duplicate.shp","physical",CurveType.POLYLINE)
#domain.add_interior_curves_shp("data/interior.shp",None,CurveType.STRICTPOLYLINE)
#domain.add_interior_points_shp("data/interior.shp")
bath_field = msea.field.Raster("data/medit.tiff")
dist_coast_field = msea.field.Distance(domain,100,["coast","island"])
dist_porquerolles_field = msea.field.Distance(domain,20,["porquerolles"])
#coarse = msea.geometry.coarsen_boundaries(domain,(8e5,4.68e6),domain_srs,mesh_size,20)
msea.gmsh.mesh(domain,"test.msh",mesh_size,intermediate_file_name="log")
msea.gmsh.convert_to_gis("test.msh",domain_srs,"test.gpkg")
bath_field = seamsh.field.Raster("data/medit.tiff")
dist_coast_field = seamsh.field.Distance(domain,100,["coast","island"])
dist_porquerolles_field = seamsh.field.Distance(domain,20,["porquerolles"])
#coarse = seamsh.geometry.coarsen_boundaries(domain,(8e5,4.68e6),domain_srs,mesh_size,20)
seamsh.gmsh.mesh(domain,"test.msh",mesh_size,intermediate_file_name="log")
seamsh.gmsh.convert_to_gis("test.msh",domain_srs,"test.gpkg")
msea.gmsh.gmsh.model.add("test")
msea.gmsh.gmsh.open("test.msh")
tag,nodes = msea.gmsh.gmsh.model.mesh.getElementsByType(2)
seamsh.gmsh.gmsh.model.add("test")
seamsh.gmsh.gmsh.open("test.msh")
tag,nodes = seamsh.gmsh.gmsh.model.mesh.getElementsByType(2)
ntri = len(tag)
print("ntri",ntri)
assert(ntri>40000 and ntri<41000)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment