Commit 2837b3fb authored by Philippe Delandmeter's avatar Philippe Delandmeter
Browse files

interface3D. Fix after rebase

parent 0454d624
......@@ -7,6 +7,7 @@ set(SCRIPTS
......@@ -32,4 +33,5 @@ foreach(SCRIPT ${SCRIPTS})
configure_file("" ${CMAKE_CURRENT_BINARY_DIR}/
configure_file( ${CMAKE_BINARY_DIR}/ COPYONLY)
configure_file( ${CMAKE_BINARY_DIR}/ COPYONLY)
configure_file( ${CMAKE_BINARY_DIR}/ COPYONLY)
from dgpy import *
import numpy as np
from scipy import spatial
from . import slim_private
def _is_string(s) :
if sys.version_info >= (3, 0):
return isinstance(s, str)
else :
return isinstance(s, basestring)
def distance (mesh, physicalTags, outputName="dist", nPoints=2, evaluationPoints=None):
......@@ -18,7 +23,7 @@ def distance (mesh, physicalTags, outputName="dist", nPoints=2, evaluationPoints
first = True
if nPoints <2:
Msg.Fatal("There must be at least 2 points by edge")
if slim_private._is_string(physicalTags):
if _is_string(physicalTags):
physicalTags = [physicalTags]
# the nodes belonging to the physical tag(s) are stocked in an array
import dgpy
import slim_private
from dgpy.scripts import slim3d_private
from dgpy.scripts import slim_private
class Domain :
"""Create the slim3d Domain"""
......@@ -228,7 +229,7 @@ class Loop:
self._restart_ind = index
def setup(self):
slimSolver = self._slimSolver
if dgpy.Msg.GetCommRank() == 0:
if not slim_private.path.exists(self._odir):
......@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
import dgpy
import slim_private
from dgpy.scripts import slim_private
import numpy
def slim3d_setup(loop):
......@@ -17,7 +17,7 @@ def slim3d_setup(loop):
if eq._gotm_option_file:
slimSolver.turbulenceSetupFile = 'eq._gotm_option_file'
gotmFileStr = slim_private.slim3d_setup.gotmOptionFile
gotmFileStr = gotmOptionFile
f = open('gotmturb.nml', 'w')
......@@ -76,7 +76,6 @@
import dgpy
from dgpy.scripts import slim_private
from dgpy.scripts import distance
import numpy as np
class Mesh :
......@@ -838,7 +837,7 @@ def get_distance(region, physical_tags):
vector containing the physical tags from which the minimum distance will be computed
xyz = region.coordinates
dist = distance.distance(region._mesh, physical_tags, evaluationPoints=xyz)
dist = slim_private.distance.distance(region._mesh, physical_tags, evaluationPoints=xyz)
return np.array(dist)
def extrude(mesh_file_name, bath_file_name, nb_layers=None, z_layers=None, layers_function=None, mesh_file_name_out='', factor_show=0, periodicity=None):
......@@ -4,14 +4,14 @@ import calendar
import numpy as np
import math
import sys
from . import dgftp
from os import path, makedirs, remove
import shutil
import dgpy.mesh as mesh
import dgpy.extrude as extrude
import dgpy.periodicMap as periodicMap
import dgpy.extrudePeriodic as extrudePeriodic
from dgpy.slim3d_setup import slim3d_setup
from dgpy.scripts import dgftp
from dgpy.scripts import mesh
from dgpy.scripts import extrude
from dgpy.scripts import periodicMap
from dgpy.scripts import extrudePeriodic
from dgpy.scripts import distance
import time
class _velocity_extractor :
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