From: admin Date: Wed, 24 Oct 2007 12:39:15 +0000 (+0000) Subject: This commit was generated by cvs2git to create tag 'trio_trio_coupling'. X-Git-Tag: trio_trio_coupling X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c49efa3010fd4eecaf98bbaa4b68beb9139b27e1;p=tools%2Fmedcoupling.git This commit was generated by cvs2git to create tag 'trio_trio_coupling'. Sprout from BR_MEDPARA 2007-10-24 12:39:14 UTC vbd '*** empty log message ***' Cherrypick from BR_MEDPARA 2007-08-03 08:48:21 UTC ndjinga 'adding tests for 2D interp': src/INTERP_KERNEL/test_INTERPOL_2D.cxx src/INTERP_KERNEL/test_InterpolationUtils.cxx Delete: src/INTERP_KERNEL/doc/Doxyfile src/INTERP_KERNEL/testUnitTetra.cxx --- diff --git a/src/INTERP_KERNEL/doc/Doxyfile b/src/INTERP_KERNEL/doc/Doxyfile deleted file mode 100644 index 6a13ed9a2..000000000 --- a/src/INTERP_KERNEL/doc/Doxyfile +++ /dev/null @@ -1,277 +0,0 @@ -# Doxyfile 1.4.4 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = INTERP_KERNEL -PROJECT_NUMBER = -OUTPUT_DIRECTORY = /home/fsalome4/ronnas/MEDPARA/SRC_DOC/MED_SRC/src/INTERP_KERNEL/doc -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = /home/fsalome4/ronnas/MEDPARA/SRC_DOC/MED_SRC/src/INTERP_KERNEL/doc/ -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -DISTRIBUTE_GROUP_DOC = NO -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = YES -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = /home/fsalome4/ronnas/MEDPARA/SRC_DOC/MED_SRC/src/INTERP_KERNEL -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.C \ - *.CC \ - *.C++ \ - *.II \ - *.I++ \ - *.H \ - *.HH \ - *.H++ \ - *.CS \ - *.PHP \ - *.PHP3 \ - *.M \ - *.MM -RECURSIVE = YES -EXCLUDE = Test/Interpolation3DTest.cxx \ - Test/Interpolation3DTest.hxx \ - TransformedTriangle_inline.hxx \ - Intersector3D.hxx \ - Test/CppUnitTest.hxx \ - Test/CppUnitTest.cxx \ - Intersector.hxx \ - Test/TestingUtils.hxx -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = YES -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = YES -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1024 -MAX_DOT_GRAPH_DEPTH = 1000 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/src/INTERP_KERNEL/testUnitTetra.cxx b/src/INTERP_KERNEL/testUnitTetra.cxx deleted file mode 100644 index 8ff191984..000000000 --- a/src/INTERP_KERNEL/testUnitTetra.cxx +++ /dev/null @@ -1,56 +0,0 @@ -#include "MEDMEM_Mesh.hxx" -#include "Interpolation3D.hxx" - -#include - -using namespace MEDMEM; -using namespace std; - -double sumVolume(const IntersectionMatrix& m) -{ - double vol = 0.0; - - for(IntersectionMatrix::const_iterator iter = m.begin() ; iter != m.end() ; ++iter) - { - for(map::const_iterator iter2 = iter->begin() ; iter2 != iter->end() ; ++iter2) - { - vol += std::abs(iter2->second); - } - } - - - - return vol; -} - -// simple test to see if a certain mesh is diagonal when intersected with itself - -void dumpIntersectionMatrix(const IntersectionMatrix& m) -{ - int i = 0; - std::cout << "Intersection matrix is " << endl; - for(IntersectionMatrix::const_iterator iter = m.begin() ; iter != m.end() ; ++iter) - { - for(map::const_iterator iter2 = iter->begin() ; iter2 != iter->end() ; ++iter2) - { - - std::cout << "V(" << i << ", " << iter2->first << ") = " << iter2->second << endl; - - } - ++i; - } - std::cout << "Sum of volumes = " << sumVolume(m) << std::endl; -} - - - -int main() -{ - MEDMEM::MESH mesh1(MED_DRIVER,"/home/vb144235/resources/DividedUnitTetraSimpler.med","DividedUnitTetraSimpler"); - MEDMEM::MESH mesh2(MED_DRIVER,"/home/vb144235/resources/DividedUnitTetraSimpler.med","DividedUnitTetraSimpler"); - Interpolation3D interpolator; - vector > matrix = interpolator.interpolateMeshes(mesh1,mesh2); - - // dump - dumpIntersectionMatrix(matrix); -} diff --git a/src/INTERP_KERNEL/test_INTERPOL_2D.cxx b/src/INTERP_KERNEL/test_INTERPOL_2D.cxx new file mode 100644 index 000000000..a2f9e7b3e --- /dev/null +++ b/src/INTERP_KERNEL/test_INTERPOL_2D.cxx @@ -0,0 +1,12 @@ +#include "Interpolation2D.hxx" +#include "MEDMEM_Mesh.hxx" + +int main() +{ + MEDMEM::MESH source(MED_DRIVER,"/home/vb144235/resources/square128000.med","Mesh_1"); + MEDMEM::MESH target(MED_DRIVER,"/home/vb144235/resources/square30000.med","Mesh_1"); + + MEDMEM::Interpolation2D interp; + // interp.setOptions(1e-6,1,2); + interp.interpol_maillages(source,target); +} diff --git a/src/INTERP_KERNEL/test_InterpolationUtils.cxx b/src/INTERP_KERNEL/test_InterpolationUtils.cxx new file mode 100644 index 000000000..a68579ea2 --- /dev/null +++ b/src/INTERP_KERNEL/test_InterpolationUtils.cxx @@ -0,0 +1,337 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : testUUnit.cxx +// Module : MED + +#include "InterpolationUtils.hxx" +using namespace std; + +int main () +{ + cerr<< endl; + cerr<< " ************ Test 1 ************ "<< endl; + + const double Losange1[12]= + { + 1,0,0, + 0,1,0, + -1,0,0, + 0,-1,0 + }; + + const double Losange2[12]= + { + 2,0,0, + 1,1,0, + 0,0,0, + 1,-1,0 + }; + + deque< double > resultat_test1 = INTERP_UTILS::intersect_convex_polygons(Losange1,Losange2,4,4,1,1e-6); + + cerr<< " Test1: Résultat théorique" << endl; + cerr<< 0.5 << " ,"<< -0.5 << " ," << 0 << endl; + cerr<< 0 << " ,"<< 0 << " ,"<< 0 << endl; + cerr<< 0.5 << " ,"<< 0.5 << " ,"<< 0 << endl; + cerr<< 1 << " ," << 0 << " ," << 0 << endl; + + cerr<< " Test1: Résultat obtenu" << endl; + for (int i=0; i resultat_test2 = INTERP_UTILS::intersect_convex_polygons(Losange1,Losange3,4,4,1,1e-6); + + cerr<< " Test2: Résultat théorique" << endl; +// cerr<< 0.5 << " ,"<< 0.5 << " ," << 0 << endl; +// cerr<< 1 << " ,"<< 0 << " ," << 0 << endl; + + cerr<< " Test2: Résultat obtenu" << endl; + for (int i=0; i resultat_test3 = INTERP_UTILS::intersect_convex_polygons( Carre1, Carre2,4,4,1,1e-6); + + cerr<< " Test3: Résultat théorique" << endl; + cerr<< 0 << " ,"<< 0.25 << " ," << 0 << endl; + cerr<< 0 << " ,"<< -0.25 << " ," << 0 << endl; + cerr<< 1 << " ,"<< -0.25 << " ,"<< 0 << endl; + cerr<< 1 << " ,"<< 0.25 << " ," << 0 << endl; + + cerr<< " Test3: Résultat obtenu" << endl; + for (int i=0; i resultat_test4 = INTERP_UTILS::intersect_convex_polygons( Losange1, Losange4,4,4,1,1e-6); + + cerr<< " Test4: Résultat théorique" << endl; + cerr<< 1 << " ,"<< 0 << " ,"<< 0 << endl; + + cerr<< " Test4: Résultat obtenu" << endl; + for (int i=0; i resultat_test5 = INTERP_UTILS::intersect_convex_polygons( Carre1, Carre1,4,4,1,1e-6); + + cerr<< " Test5: Résultat théorique" << endl; + cerr<< -1 << " ,"<< 1 << " ," << 0 << endl; + cerr<< -1 << " ,"<< -1 << " ," << 0 << endl; + cerr<< 1 << " ,"<< -1 << " ," << 0 << endl; + cerr<< 1 << " ,"<< 1 << " ," << 0 << endl; + + cerr<< " Test5: Résultat obtenu" << endl; + for (int i=0; i resultat_test6 = INTERP_UTILS::intersect_convex_polygons( Carre1, Losange5,4,4,1,1e-6); + + cerr<< " Test6: Résultat théorique" << endl; + cerr<< 1 << " ,"<< -0.5 << " ," << 0 << endl; + cerr<< 0.5 << " ,"<< -1 << " ," << 0 << endl; + cerr<< -0.5 << " ,"<< -1 << " ," << 0 << endl; + cerr<< -1 << " ,"<< -0.5 << " ," << 0 << endl; + cerr<< -1 << " ,"<< 0.5 << " ," << 0 << endl; + cerr<< -0.5 << " ,"<< 1 << " ," << 0 << endl; + cerr<< 0.5 << " ,"<< 1 << " ,"<< 0 << endl; + cerr<< 1 << " ,"<< 0.5 << " ," << 0 << endl; + + cerr<< " Test6: Résultat obtenu" << endl; + for (int i=0; i resultat_test7 = INTERP_UTILS::intersect_convex_polygons( Losange1, Carre1,4,4,1,1e-6); + + cerr<< " Test7: Résultat théorique" << endl; + cerr<< 0 << " ,"<< -1 << " ," << 0 << endl; + cerr<< -1 << " ,"<< 0 << " ," << 0 << endl; + cerr<< 0 << " ,"<< 1 << " ,"<< 0 << endl; + cerr<< 1 << " ,"<< 0 << " ," << 0 << endl; + + cerr<< " Test7: Résultat obtenu" << endl; + for (int i=0; i resultat_test8 = INTERP_UTILS::intersect_convex_polygons(Losange6,Losange7,6,5,1,1e-6); + + cerr<< " Test8: Résultat théorique" << endl; + cerr<< 0.5 << " ,"<< -0.5 << " ," << 0 << endl; + cerr<< 0 << " ,"<< 0 << " ,"<< 0 << endl; + cerr<< 0.5 << " ,"<< 0.5 << " ,"<< 0 << endl; + cerr<< 1 << " ," << 0 << " ," << 0 << endl; + + cerr<< " Test8: Résultat obtenu" << endl; + for (int i=0; i resultat_test9 = INTERP_UTILS::intersect_convex_polygons(Carre4,Carre3,4,5,1,1e-6); + + cerr<< " Test9: Résultat théorique" << endl; + cerr<< -0.5 << " ,"<< -1 << " ," << 0 << endl; + cerr<< -0.5 << " ,"<< 1 << " ," << 0 << endl; + cerr<< 1 << " ,"<< 1 << " ," << 0 << endl; + cerr<< 1 << " ,"<< -1 << " ," << 0 << endl; + + cerr<< " Test9: Résultat obtenu" << endl; + for (int i=0; i resultat_test10 = INTERP_UTILS::intersect_convex_polygons(Losange8,Carre5,4,5,1,1e-6); + cerr<< " Test10: Résultat théorique" << endl; + cerr<< 0 << " ,"<< 1 << " ," << 0 << endl; + cerr<< -0.5 << " ,"<< -1 << " ," << 0 << endl; + cerr<< 1 << " ,"<< -1 << " ," << 0 << endl; + + cerr<< " Test10: Résultat obtenu" << endl; + for (int i=0; i resultat_test11 = INTERP_UTILS::intersect_convex_polygons(Losange1,Losange9,4,4,1,1e-6); + + cerr<< " Test11: Résultat théorique" << endl; + cerr<< 0 << " ,"<< -1 << " ," << 0 << endl; + cerr<< -1 << " ,"<< 0 << " ,"<< 0 << endl; + cerr<< 0 << " ,"<< 1 << " ,"<< 0 << endl; + cerr<< 0.5 << " ," << 0 << " ," << 0 << endl; + + cerr<< " Test11: Résultat obtenu" << endl; + for (int i=0; i