Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit 81c29abd authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1443 LoadPrepartitionedGodOfDof test: add another case with a mesh with...

#1443 LoadPrepartitionedGodOfDof test: add another case with a mesh with quadrangles... which does not pass yet.
parent 1eab000d
......@@ -3145,6 +3145,8 @@
BE1EBB0F1CA0A59600EC0EAA /* Model.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Model.cpp; path = Coloring/Model.cpp; sourceTree = "<group>"; };
BE1EBB101CA0A59600EC0EAA /* Model.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Model.hpp; path = Coloring/Model.hpp; sourceTree = "<group>"; };
BE1EBB111CA0A59600EC0EAA /* Model.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Model.hxx; path = Coloring/Model.hxx; sourceTree = "<group>"; };
BE1F505D247EB299009F2184 /* main_quad.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main_quad.cpp; sourceTree = "<group>"; };
BE1F505E247EB2BB009F2184 /* demo_quad.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = demo_quad.lua; sourceTree = "<group>"; };
BE2241BC19FA5FDE00B90563 /* InterfaceSpecialization.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InterfaceSpecialization.cpp; sourceTree = "<group>"; };
BE2241BD19FA5FDE00B90563 /* InterfaceSpecialization.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = InterfaceSpecialization.hpp; sourceTree = "<group>"; };
BE2241BE19FA5FDE00B90563 /* InterfaceSpecialization.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = InterfaceSpecialization.hxx; sourceTree = "<group>"; };
......@@ -4754,13 +4756,13 @@
BEF9B615231EA652009A680D /* GetRankDirectory.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = GetRankDirectory.hpp; sourceTree = "<group>"; };
BEFAB78E245B08FB00E9C1B5 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
BEFAB790245B08FB00E9C1B5 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
BEFAB791245B08FB00E9C1B5 /* demo.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = demo.lua; sourceTree = "<group>"; };
BEFAB791245B08FB00E9C1B5 /* demo_tri.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = demo_tri.lua; sourceTree = "<group>"; };
BEFAB792245B08FB00E9C1B5 /* Model.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Model.hpp; sourceTree = "<group>"; };
BEFAB793245B08FB00E9C1B5 /* InputData.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = InputData.hpp; sourceTree = "<group>"; };
BEFAB794245B08FB00E9C1B5 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
BEFAB795245B08FB00E9C1B5 /* Model.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Model.hxx; sourceTree = "<group>"; };
BEFAB796245B08FB00E9C1B5 /* Model.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Model.cpp; sourceTree = "<group>"; };
BEFAB797245B08FB00E9C1B5 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
BEFAB797245B08FB00E9C1B5 /* main_tri.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main_tri.cpp; sourceTree = "<group>"; };
BEFC32DC1CB53C3B00C8903C /* RefFEltInLocalOperator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RefFEltInLocalOperator.cpp; sourceTree = "<group>"; };
BEFC32DD1CB53C3B00C8903C /* RefFEltInLocalOperator.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = RefFEltInLocalOperator.hpp; sourceTree = "<group>"; };
BEFC32DE1CB53C3B00C8903C /* RefFEltInLocalOperator.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = RefFEltInLocalOperator.hxx; sourceTree = "<group>"; };
......@@ -10624,9 +10626,11 @@
children = (
BEFAB794245B08FB00E9C1B5 /* README */,
BEFAB790245B08FB00E9C1B5 /* CMakeLists.txt */,
BEFAB791245B08FB00E9C1B5 /* demo.lua */,
BEFAB791245B08FB00E9C1B5 /* demo_tri.lua */,
BE1F505E247EB2BB009F2184 /* demo_quad.lua */,
BEFAB793245B08FB00E9C1B5 /* InputData.hpp */,
BEFAB797245B08FB00E9C1B5 /* main.cpp */,
BEFAB797245B08FB00E9C1B5 /* main_tri.cpp */,
BE1F505D247EB299009F2184 /* main_quad.cpp */,
BEFAB796245B08FB00E9C1B5 /* Model.cpp */,
BEFAB792245B08FB00E9C1B5 /* Model.hpp */,
BEFAB795245B08FB00E9C1B5 /* Model.hxx */,
add_executable(MoReFEMTestLoadPrepartitionedGodOfDof
${CMAKE_CURRENT_LIST_DIR}/InputData.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.cpp
${CMAKE_CURRENT_LIST_DIR}/Model.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hxx
${CMAKE_CURRENT_LIST_DIR}/main.cpp
)
target_link_libraries(MoReFEMTestLoadPrepartitionedGodOfDof
add_library(MoReFEMTestLoadPrepartitionedGodOfDof_lib ${LIBRARY_TYPE} "")
target_sources(MoReFEMTestLoadPrepartitionedGodOfDof_lib
PRIVATE
${CMAKE_CURRENT_LIST_DIR}/Model.cpp /
PUBLIC
${CMAKE_CURRENT_LIST_DIR}/InputData.hpp /
${CMAKE_CURRENT_LIST_DIR}/Model.hpp /
${CMAKE_CURRENT_LIST_DIR}/Model.hxx
)
target_link_libraries(MoReFEMTestLoadPrepartitionedGodOfDof_lib
${ALL_LOAD_BEGIN_FLAG}
${MOREFEM_TEST_TOOLS}
)
${ALL_LOAD_END_FLAG})
add_executable(MoReFEMTestLoadPrepartitionedGodOfDof_triangles
${CMAKE_CURRENT_LIST_DIR}/main_tri.cpp
)
target_link_libraries(MoReFEMTestLoadPrepartitionedGodOfDof_triangles
MoReFEMTestLoadPrepartitionedGodOfDof_lib
)
add_executable(MoReFEMTestLoadPrepartitionedGodOfDof_quadrangles
${CMAKE_CURRENT_LIST_DIR}/main_quad.cpp
)
target_link_libraries(MoReFEMTestLoadPrepartitionedGodOfDof_quadrangles
MoReFEMTestLoadPrepartitionedGodOfDof_lib
)
add_test(LoadPrepartitionedGodOfDof
add_test(LoadPrepartitionedGodOfDof_triangles
${OPEN_MPI_INCL_DIR}/../bin/mpirun
--oversubscribe
-np 4 MoReFEMTestLoadPrepartitionedGodOfDof
-np 4 MoReFEMTestLoadPrepartitionedGodOfDof_triangles
--
${MOREFEM_ROOT}
${MOREFEM_TEST_OUTPUT_DIR})
set_tests_properties(LoadPrepartitionedGodOfDof PROPERTIES TIMEOUT 20)
add_test(LoadPrepartitionedGodOfDof_quadrangles
${OPEN_MPI_INCL_DIR}/../bin/mpirun
--oversubscribe
-np 4 MoReFEMTestLoadPrepartitionedGodOfDof_quadrangles
--
${MOREFEM_ROOT}
${MOREFEM_TEST_OUTPUT_DIR})
set_tests_properties(LoadPrepartitionedGodOfDof_triangles PROPERTIES TIMEOUT 20)
set_tests_properties(LoadPrepartitionedGodOfDof_quadrangles PROPERTIES TIMEOUT 20)
-- Comment lines are introduced by "--".
-- In a section (i.e. within braces), all entries must be separated by a comma.
transient = {
-- Time at the beginning of the code (in seconds).
-- Expected format: VALUE
-- Constraint: v >= 0.
init_time = 0.,
-- Time step between two iterations, in seconds.
-- Expected format: VALUE
-- Constraint: v > 0.
timeStep = 0.1,
-- Maximum time, if set to zero run a static case.
-- Expected format: VALUE
-- Constraint: v >= 0.
timeMax = .1
} -- transient
Mesh1 = {
-- Path of the mesh file to use.
-- Expected format: "VALUE"
mesh = "${MOREFEM_ROOT}/Data/Mesh/TwoCubes.mesh",
-- Format of the input mesh.
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'Ensight', 'Medit'})
format = "Medit",
-- Highest dimension of the input mesh. This dimension might be lower than the one effectively read in the
-- mesh file; in which case Coords will be reduced provided all the dropped values are 0. If not, an
-- exception is thrown.
-- Expected format: VALUE
-- Constraint: v <= 3 and v > 0
dimension = 3,
-- Space unit of the mesh.
-- Expected format: VALUE
space_unit = 1.
} -- Mesh1
Domain1 = {
-- Index of the geometric mesh upon which the domain is defined (as defined in the present file). Might be
-- left empty if domain not limited to one mesh; at most one value is expected here.
-- Expected format: {VALUE1, VALUE2, ...}
mesh_index = { 1 },
-- List of dimensions encompassed by the domain. Might be left empty if no restriction at all upon
-- dimensions.
-- Expected format: {VALUE1, VALUE2, ...}
-- Constraint: value_in(v, {0, 1, 2, 3})
dimension_list = { 3 },
-- List of mesh labels encompassed by the domain. Might be left empty if no restriction at all upon mesh
-- labels. This parameter does not make sense if no mesh is defined for the domain.
-- Expected format: {VALUE1, VALUE2, ...}
mesh_label_list = {},
-- List of geometric element types considered in the domain. Might be left empty if no restriction upon
-- these. No constraint is applied at LuaOptionFile level, as some geometric element types could be added after
-- generation of current input data file. Current list is below; if an incorrect value is put there it
-- will be detected a bit later when the domain object is built.
-- The known types when this file was generated are:
-- . Point1
-- . Segment2, Segment3
-- . Triangle3, Triangle6
-- . Quadrangle4, Quadrangle8, Quadrangle9
-- . Tetrahedron4, Tetrahedron10
-- . Hexahedron8, Hexahedron20, Hexahedron27.
-- Expected format: {"VALUE1", "VALUE2", ...}
geometric_element_type_list = {}
} -- Domain1
Domain11 = {
-- Index of the geometric mesh upon which the domain is defined (as defined in the present file). Might be
-- left empty if domain not limited to one mesh; at most one value is expected here.
-- Expected format: {VALUE1, VALUE2, ...}
mesh_index = { 11 },
-- List of dimensions encompassed by the domain. Might be left empty if no restriction at all upon
-- dimensions.
-- Expected format: {VALUE1, VALUE2, ...}
-- Constraint: value_in(v, {0, 1, 2, 3})
dimension_list = { 3 },
-- List of mesh labels encompassed by the domain. Might be left empty if no restriction at all upon mesh
-- labels. This parameter does not make sense if no mesh is defined for the domain.
-- Expected format: {VALUE1, VALUE2, ...}
mesh_label_list = {},
-- List of geometric element types considered in the domain. Might be left empty if no restriction upon
-- these. No constraint is applied at LuaOptionFile level, as some geometric element types could be added after
-- generation of current input data file. Current list is below; if an incorrect value is put there it
-- will be detected a bit later when the domain object is built.
-- The known types when this file was generated are:
-- . Point1
-- . Segment2, Segment3
-- . Triangle3, Triangle6
-- . Quadrangle4, Quadrangle8, Quadrangle9
-- . Tetrahedron4, Tetrahedron10
-- . Hexahedron8, Hexahedron20, Hexahedron27.
-- Expected format: {"VALUE1", "VALUE2", ...}
geometric_element_type_list = {}
} -- Domain11
Unknown1 = {
-- Name of the unknown (used for displays in output).
-- Expected format: "VALUE"
name = "scalar",
-- Index of the god of dof into which the finite element space is defined.
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'scalar', 'vectorial'})
nature = "scalar"
} -- Unknown1
Unknown2 = {
-- Name of the unknown (used for displays in output).
-- Expected format: "VALUE"
name = "vectorial",
-- Index of the god of dof into which the finite element space is defined.
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'scalar', 'vectorial'})
nature = "vectorial"
} -- Unknown2
NumberingSubset1 = {
-- Name of the numbering subset (not really used; at the moment I just need one input parameter to ground
-- the possible values to choose elsewhere).
-- Expected format: "VALUE"
name = "scalar",
-- Whether a vector defined on this numbering subset might be used to compute a movemesh. If true, a
-- FEltSpace featuring this numbering subset will compute additional quantities to enable fast computation.
-- This should be false for most numbering subsets, and when it's true the sole unknown involved should be a
-- displacement.
-- Expected format: 'true' or 'false' (without the quote)
do_move_mesh = false
} -- NumberingSubset1
NumberingSubset2 = {
-- Name of the numbering subset (not really used; at the moment I just need one input parameter to ground
-- the possible values to choose elsewhere).
-- Expected format: "VALUE"
name = "vectorial",
-- Whether a vector defined on this numbering subset might be used to compute a movemesh. If true, a
-- FEltSpace featuring this numbering subset will compute additional quantities to enable fast computation.
-- This should be false for most numbering subsets, and when it's true the sole unknown involved should be a
-- displacement.
-- Expected format: 'true' or 'false' (without the quote)
do_move_mesh = false
} -- NumberingSubset2
NumberingSubset3 = {
-- Name of the numbering subset (not really used; at the moment I just need one input parameter to ground
-- the possible values to choose elsewhere).
-- Expected format: "VALUE"
name = "mixed",
-- Whether a vector defined on this numbering subset might be used to compute a movemesh. If true, a
-- FEltSpace featuring this numbering subset will compute additional quantities to enable fast computation.
-- This should be false for most numbering subsets, and when it's true the sole unknown involved should be a
-- displacement.
-- Expected format: 'true' or 'false' (without the quote)
do_move_mesh = false
} -- NumberingSubset3
FiniteElementSpace1 = {
-- Index of the god of dof into which the finite element space is defined.
-- Expected format: VALUE
god_of_dof_index = 1,
-- Index of the domain onto which the finite element space is defined. This domain must be unidimensional.
-- Expected format: VALUE
domain_index = 1,
-- List of all unknowns defined in the finite element space. Unknowns here must be defined in this file as
-- an 'Unknown' block; expected name/identifier is the name given there.
-- Expected format: {"VALUE1", "VALUE2", ...}
unknown_list = { "scalar", "vectorial" },
-- List of the shape function to use for each unknown;
-- Expected format: {"VALUE1", "VALUE2", ...}
shape_function_list = { "Q2", "Q1" },
-- List of the numbering subset to use for each unknown;
-- Expected format: { VALUE1, VALUE2, ...}
numbering_subset_list = { 1, 2 }
} -- FiniteElementSpace1
FiniteElementSpace2 = {
-- Index of the god of dof into which the finite element space is defined.
-- Expected format: VALUE
god_of_dof_index = 1,
-- Index of the domain onto which the finite element space is defined. This domain must be unidimensional.
-- Expected format: VALUE
domain_index = 1,
-- List of all unknowns defined in the finite element space. Unknowns here must be defined in this file as
-- an 'Unknown' block; expected name/identifier is the name given there.
-- Expected format: {"VALUE1", "VALUE2", ...}
unknown_list = { "scalar", "vectorial" },
-- List of the shape function to use for each unknown;
-- Expected format: {"VALUE1", "VALUE2", ...}
shape_function_list = { "Q2", "Q1" },
-- List of the numbering subset to use for each unknown;
-- Expected format: { VALUE1, VALUE2, ...}
numbering_subset_list = { 3, 3 }
} -- FiniteElementSpace2
Petsc1 = {
-- Absolute tolerance
-- Expected format: VALUE
-- Constraint: v > 0.
absoluteTolerance = 1e-50,
-- gmresStart
-- Expected format: VALUE
-- Constraint: v >= 0
gmresRestart = 200,
-- Maximum iteration
-- Expected format: VALUE
-- Constraint: v > 0
maxIteration = 1000,
-- Preconditioner to use. Must be lu for any direct solver.
-- Expected format: "VALUE"
-- Constraint: value_in(v, {'lu', 'none'})
preconditioner = 'lu',
-- Relative tolerance
-- Expected format: VALUE
-- Constraint: v > 0.
relativeTolerance = 1e-9,
-- Step size tolerance
-- Expected format: VALUE
-- Constraint: v > 0.
stepSizeTolerance = 1e-8,
-- Solver to use.
-- Expected format: "VALUE"
-- Constraint: value_in(v, { 'Mumps', 'Umfpack', 'Gmres' })
solver = 'Mumps'
} -- Petsc1
Result = {
-- Directory in which all the results will be written. This path may use the environment variable
-- MOREFEM_RESULT_DIR, which is either provided in user's environment or automatically set to
-- '/Volumes/Data/${USER}/MoReFEM/Results' in MoReFEM initialization step. Please do not read this value
-- directly: it might have been extended in MoReFEMData class! Rather call the GetResultDirectory() from
-- this class.
-- Expected format: "VALUE"
output_directory = '${MOREFEM_TEST_OUTPUT_DIR}/Test/LoadPrepartitionedGodOfDof',
-- Enables to skip some printing in the console. Can be used to WriteSolution every n time.
-- Expected format: VALUE
-- Constraint: v > 0
display_value = 1,
-- Defines the solutions output format. Set to false for ascii or true for binary.
-- Expected format: VALUE
binary_output = false
} -- Result
PrepartitionedData = {
-- Directory in which prepartitioned data are stored. Leave it empty if irrelevant.
-- Expected format: "VALUE"
directory = "${MOREFEM_TEST_OUTPUT_DIR}/PrepartionedData/Test/LoadPrepartitionedGodOfDof",
-- If True, the program runs to generate prepartition data and will stop once it's done. If False, mode
-- will be run with pre-computed prepartitioned data (if directory is not empty) or will not use them (and
-- compute them on the fly if parallel mode).
-- Expected format: 'true' or 'false' (without the quote)
is_prepartition_run = false
} -- PrepartitionedData
/*!
// \file
//
//
// Created by Sebastien Gilles <sebastien.gilles@inria.fr> on the Fri, 26 Apr 2013 12:18:22 +0200
// Copyright (c) Inria. All rights reserved.
//
*/
#include <cstdlib>
#define BOOST_TEST_MODULE load_god_of_dof_prepartitioned_data_quad
#include "ThirdParty/IncludeWithoutWarning/Boost/Test.hpp"
#include "Utilities/Exceptions/PrintAndAbort.hpp"
#include "Core/MoReFEMData/MoReFEMData.hpp"
#include "Test/FiniteElementSpace/LoadPrepartitionedGodOfDof/InputData.hpp"
#include "Test/FiniteElementSpace/LoadPrepartitionedGodOfDof/Model.hpp"
#include "Test/Tools/Fixture/Model.hpp"
using namespace MoReFEM;
namespace // anonymous
{
struct LuaFile
{
static std::string GetPath();
};
using fixture_type =
TestNS::FixtureNS::Model
<
TestNS::LoadPrepartitionedGodOfDofNS::Model,
LuaFile
>;
} // namespace anonymous
PRAGMA_DIAGNOSTIC(push)
#ifdef __clang__
#include "Utilities/Warnings/Internal/IgnoreWarning/disabled-macro-expansion.hpp"
#endif // # __clang__
BOOST_FIXTURE_TEST_CASE(load_god_of_dof_from_prepartitioned, fixture_type)
{
try
{
decltype(auto) model = GetModel();
model.LoadGodOfDofFromPrepartionedData();
}
catch(const ExceptionNS::GracefulExit& ) // TMP #1443
{
}
}
BOOST_FIXTURE_TEST_CASE(check_processor_wise_node_bearer_list, fixture_type)
{
try
{
decltype(auto) model = GetModel();
model.CheckProcessorWiseNodeBearerList();
}
catch(const ExceptionNS::GracefulExit& ) // TMP #1443
{
}
}
BOOST_FIXTURE_TEST_CASE(check_ghost_node_bearer_list, fixture_type)
{
try
{
decltype(auto) model = GetModel();
model.CheckGhostNodeBearerList();
}
catch(const ExceptionNS::GracefulExit& ) // TMP #1443
{
}
}
BOOST_FIXTURE_TEST_CASE(check_dof_list_in_god_of_dof, fixture_type)
{
try
{
decltype(auto) model = GetModel();
model.CheckDofListInGodOfDof();
}
catch(const ExceptionNS::GracefulExit& ) // TMP #1443
{
}
}
BOOST_FIXTURE_TEST_CASE(check_dof_list_in_god_of_dof_scalar_numbering_subset, fixture_type)
{
try
{
using namespace TestNS::LoadPrepartitionedGodOfDofNS;
decltype(auto) model = GetModel();
model.CheckDofListInGodOfDofForNumberingSubset(NumberingSubsetIndex::scalar);
}
catch(const ExceptionNS::GracefulExit& ) // TMP #1443
{
}
}
BOOST_FIXTURE_TEST_CASE(check_dof_list_in_god_of_dof_vectorial_numbering_subset, fixture_type)
{
try