Commit 449b603f authored by teo's avatar teo
Browse files

I'm wrong,

I modified these files in the last commit in errors,
parent e1576bef
# -*- makefile -*-
#
#
#
# Copyright (C) 2004 Christophe Prud'homme (christophe.prudhomme@epfl.ch)
#
# Distributed under the GPL(GNU Public License):
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
SUFFIXES = .cpp .hpp .idl .c .h .f .F .o .moc
include $(top_srcdir)/testsuite/Makefile.testsuite
check_HEADERS = cylinder_1flux.hpp
check_PROGRAMS = test_cylinder_1flux
test_cylinder_1flux_SOURCES = main.cpp cylinder_1flux.cpp
EXTRA_DIST = data testsuite.at
link:
test -a data || ln -s $(srcdir)/data
test -a Mesh || ln -s $(top_srcdir)/testsuite/data/mesh/inria/ Mesh
MOSTLYCLEANFILES = *.vct *.scl *.case *.geo *.m *.res* *.map
clean-results:
for dustfile in $(MOSTLYCLEANFILES); do \
!( \test -e $$dustfile ) || \rm $$dustfile; \
done
# -*- makefile -*-
#
#
#
# Copyright (C) 2004 Christophe Prud'homme (christophe.prudhomme@epfl.ch)
#
# Distributed under the GPL(GNU Public License):
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
SUFFIXES = .cpp .hpp .idl .c .h .f .F .o .moc
include $(top_srcdir)/testsuite/Makefile.testsuite
check_HEADERS = cylinder.hpp
check_PROGRAMS = test_cylinder
test_cylinder_SOURCES = main.cpp cylinder.cpp
EXTRA_DIST = data testsuite.at
link:
test -a data || ln -s $(srcdir)/data
test -a Mesh || ln -s $(top_srcdir)/testsuite/data/mesh/inria/ Mesh
MOSTLYCLEANFILES = *.vct *.scl *.case *.geo *.m *.res* *.map
clean-results:
for dustfile in $(MOSTLYCLEANFILES); do \
!( \test -e $$dustfile ) || \rm $$dustfile; \
done
This diff is collapsed.
/* -*- mode: c++ -*-
This file is part of the LifeV Applications.
Author(s): Christophe Prud'homme <christophe.prudhomme@epfl.ch>
Date: 2005-04-16
Copyright (C) 2005 EPFL
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program 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
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
*/
/**
\file main.cpp
\author Christophe Prud'homme <christophe.prudhomme@epfl.ch>
\date 2005-04-16
*/
#ifdef TWODIM
#error test_cylinder_1flux cannot be compiled in 2D
#endif
#include <Epetra_ConfigDefs.h>
#ifdef EPETRA_MPI
#include <Epetra_MpiComm.h>
#else
#include <Epetra_SerialComm.h>
#endif
#include <boost/program_options.hpp>
#include <life/lifecore/life.hpp>
#include <life/lifecore/application.hpp>
#include <life/lifealg/IfpackPreconditioner.hpp>
#include <life/lifealg/MLPreconditioner.hpp>
#include "cylinder_1flux.hpp"
#include <mpi.h>
LifeV::AboutData
makeAbout()
{
LifeV::AboutData about( "life_cylinder" ,
"life_cylinder" ,
"0.1",
"3D cylinder test case",
LifeV::AboutData::License_GPL,
"Copyright (c) 2005 EPFL");
about.addAuthor("Gilles Fourestey", "developer", "gilles.fourestey@epfl.ch", "");
return about;
}
using namespace LifeV;
std::set<UInt> parseList( const std::string& list )
{
std::string stringList = list;
std::set<UInt> setList;
if ( list == "" )
{
return setList;
}
UInt commaPos = 0;
while ( commaPos != std::string::npos )
{
commaPos = stringList.find( "," );
setList.insert( atoi( stringList.substr( 0, commaPos ).c_str() ) );
stringList = stringList.substr( commaPos+1 );
}
setList.insert( atoi( stringList.c_str() ) );
return setList;
}
namespace LifeV
{
namespace
{
static bool regIF = (PRECFactory::instance().registerProduct( "Ifpack", &createIfpack ));
static bool regML = (PRECFactory::instance().registerProduct( "ML", &createML ));
}
}
int
main( int argc, char** argv )
{
#ifdef HAVE_MPI
MPI_Init(&argc, &argv);
#endif
//**************** cylinder
// MPI_Init(&argc,&argv);
LifeV::po::options_description desc("Specific options");
desc.add_options()("file,f", LifeV::po::value<std::string>()->default_value( "data" ), "data file name");
Cylinder cyl( argc, argv, makeAbout(), desc );
cyl.run();
#ifdef HAVE_MPI
MPI_Finalize();
#endif
return( EXIT_SUCCESS );
}
/* -*- mode: c++ -*-
This file is part of the LifeV Applications.
Author(s): Christophe Prud'homme <christophe.prudhomme@epfl.ch>
Date: 2005-04-16
Copyright (C) 2005 EPFL
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program 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
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
*/
/**
\file main.cpp
\author Christophe Prud'homme <christophe.prudhomme@epfl.ch>
\date 2005-04-16
*/
#ifdef TWODIM
#error test_cylinder cannot be compiled in 2D
#endif
#include <Epetra_ConfigDefs.h>
#ifdef EPETRA_MPI
#include <Epetra_MpiComm.h>
#else
#include <Epetra_SerialComm.h>
#endif
#include <boost/program_options.hpp>
#include <life/lifecore/life.hpp>
#include <life/lifecore/application.hpp>
#include <life/lifealg/IfpackPreconditioner.hpp>
#include <life/lifealg/MLPreconditioner.hpp>
#include "cylinder.hpp"
#include <mpi.h>
LifeV::AboutData
makeAbout()
{
LifeV::AboutData about( "life_cylinder" ,
"life_cylinder" ,
"0.1",
"3D cylinder test case",
LifeV::AboutData::License_GPL,
"Copyright (c) 2005 EPFL");
about.addAuthor("Gilles Fourestey", "developer", "gilles.fourestey@epfl.ch", "");
return about;
}
using namespace LifeV;
std::set<UInt> parseList( const std::string& list )
{
std::string stringList = list;
std::set<UInt> setList;
if ( list == "" )
{
return setList;
}
UInt commaPos = 0;
while ( commaPos != std::string::npos )
{
commaPos = stringList.find( "," );
setList.insert( atoi( stringList.substr( 0, commaPos ).c_str() ) );
stringList = stringList.substr( commaPos+1 );
}
setList.insert( atoi( stringList.c_str() ) );
return setList;
}
namespace LifeV
{
namespace
{
static bool regIF = (PRECFactory::instance().registerProduct( "Ifpack", &createIfpack ));
static bool regML = (PRECFactory::instance().registerProduct( "ML", &createML ));
}
}
int
main( int argc, char** argv )
{
#ifdef HAVE_MPI
MPI_Init(&argc, &argv);
#endif
//**************** cylinder
// MPI_Init(&argc,&argv);
LifeV::po::options_description desc("Specific options");
desc.add_options()("file,f", LifeV::po::value<std::string>()->default_value( "data" ), "data file name");
Cylinder cyl( argc, argv, makeAbout(), desc );
cyl.run();
#ifdef HAVE_MPI
MPI_Finalize();
#endif
return( EXIT_SUCCESS );
}
# -*- mode: m4 -*-
#
# This file is part of the LifeV library
#
# Author(s): Christophe Prud'homme <christophe.prudhomme@epfl.ch>
# Date: 2004-08-29
#
# Copyright (C) 2004 EPFL, INRIA and Politecnico di Milano
#
# 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, or (at your option) any later version.
#
# 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
#
# \file testsuite.at
# \author Christophe Prud'homme <christophe.prudhomme@epfl.ch>
# \date 2004-08-29
#
AT_SETUP([test_cylinder_1flux])
AT_KEYWORDS([test_cylinder_1flux fluid])
AT_DATA([data],[[# -*- getpot -*- (GetPot mode activation for emacs)
#----------------------------------------------------------------
# Data file for cylinder test with Navier-Stokes IP Solver
#----------------------------------------------------------------
[exporter]
multimesh = false
start = 0
save = 1
[fluid]
[./physics]
density = 1.0 # density [kg/m^3]
viscosity = 0.035 # viscosity [kg/m/s]
[../time_discretization]
initialtime = 0.
endtime = 0.80
timestep = 0.01
BDF_order = 1
[../space_discretization]
mesh_dir = ./
mesh_file = cyltetra.mesh
mesh_type = .mesh
verbose = 0 # verbose during mesh-reading
<<<<<<< testsuite.at
vel_order = P2 # P1, P1Bubble, P2
=======
linearized = 0
diagonalize = 1 # weight, 0=off
div_beta_u_v = 1 # 1=on, 0=off
vel_order = P2 # P1, P1Bubble, P2
>>>>>>> 1.10
press_order = P1 # P1, P2
[../miscellaneous]
verbose = 1
steady = 0
[../prec]
prectype = Ifpack # Ifpack or ML
displayList = true
[./ML]
analyze_smoother = false
default_parameter_list = DD-ML # for ML precond, SA, DD, DD-ML, maxwell, NSSA, DD-ML-LU, DD-LU
[./smoother]
# smoother type
# Aztec, IFPACK, Jacobi, ML symmetric Gauss-Seidel, symmetric Gauss-Seidel,
# ML Gauss-Seidel, Gauss-Seidel, Chebyshev, MLS, Hiptmair, Amesos-KLU,
# Amesos-Superlu, Amesos-UMFPACK, Amesos-Superludist, Amesos-MUMPS,
# user-defined, SuperLU, IFPACK-Chebyshev, self, do-nothing,
# IC, ICT, ILU, ILUT
type = IFPACK
pre_or_post = pre
sweeps = 3
damping_factor = 1
[../coarse]
type = Amesos-UMFPACK
#type = Amesos-KLU
sweeps = 1
pre_or_post = both
max_size = 200
[../repartition]
enable = 1
partitioner = ParMETIS
max_min_ration = 1.3
min_per_proc = 500
[../energy_minimization]
enable = true
type = 3
[../]
# ifpack
[../ifpack]
overlap = 2
[./fact]
ilut_level-of-fill = 1
drop_tolerance = 1.e-5
relax_value = 0
[../amesos]
solvertype = Amesos_Umfpack # Amesos_KLU or Amesos_Umfpack
[../partitioner]
overlap = 2
[../schwarz]
reordering_type = none #metis, rcm, none
filter_singletons = true
[../]
[../]
[../solver]
solver = gmres
scaling = none
output = all # none
conv = rhs
max_iter = 100
reuse = true
max_iter_reuse = 80
kspace = 100
tol = 1.e-10 # AztecOO tolerance
[../ipstab]
gammaBeta = 0.125
gammaDiv = 0.125
gammaPress = 0.03125
reuse = true
max_iter_reuse = 20
<<<<<<< testsuite.at
=======
[../boundary_conditions]
list = 'Inlet Outlet Wall Ring' # use apex to create the list; use spaces to separe members
#list = 'InletXY InletZ Outlet Wall Ring' # use apex to create the list; use spaces to separe members
[./Inlet]
type = Essential
flag = 2
mode = Full
component = 3
function = '(0., 0., 3*0.03*(1/4-(x^2+y^2)))' # Poiseuille - viscosity = 0.03
[../InletXY]
type = Essential
flag = 2
mode = Component
component = '1 2' # use apex to create the list; use spaces to separe members
function = '(0., 0., 0.)'
[../InletZ]
type = Essential
flag = 2
mode = Component
component = 3
function = '(0., 0., 3*0.03*(1/4-(x^2+y^2)))' # Poiseuille - viscosity = 0.03
[../Outlet]
type = Natural
flag = 3
mode = Full
component = 3
function = '(0., 0., 0.)'
[../Wall]
type = Essential
flag = 1
mode = Full
component = 3
function = '(0., 0., 0.)'
[../Ring]
type = Essential
flag = 20
mode = Full
component = 3
function = '(0., 0., 0.)'
>>>>>>> 1.10
]])
AT_CHECK([ln -sf ../../data/mesh/inria/tube20.mesh;
mpirun -np 2 ../../test_cylinder_1flux/test_cylinder_1flux -c],[0],[ignore],[ignore])
AT_CLEANUP([out_res_solid iter num_iter out_iter_solid res])
# -*- mode: m4 -*-
#
# This file is part of the LifeV library
#
# Author(s): Christophe Prud'homme <christophe.prudhomme@epfl.ch>
# Date: 2004-08-29
#
# Copyright (C) 2004 EPFL, INRIA and Politecnico di Milano
#
# 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, or (at your option) any later version.
#
# 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
#
# \file testsuite.at
# \author Christophe Prud'homme <christophe.prudhomme@epfl.ch>
# \date 2004-08-29
#
AT_SETUP([test_cylinder])
AT_KEYWORDS([test_cylinder fluid])
AT_DATA([data],[[# -*- getpot -*- (GetPot mode activation for emacs)
#----------------------------------------------------------------
# Data file for cylinder test with Navier-Stokes IP Solver
#----------------------------------------------------------------
[exporter]
multimesh = false
start = 0
save = 1
[fluid]
[./physics]
density = 1.0 # density [kg/m^3]
viscosity = 0.03 # viscosity [kg/m/s]
[../time_discretization]
initialtime = 0.
endtime = 0.001
timestep = 0.0001
BDF_order = 1
[../space_discretization]
mesh_dir = ./
mesh_file = tube20.mesh
mesh_type = .mesh
verbose = 0 # verbose during mesh-reading
linearized = 0
diagonalize = 1 # weight, 0=off
div_beta_u_v = 1 # 1=on, 0=off
vel_order = P2 # P1, P1Bubble, P2
press_order = P1 # P1, P2
[../miscellaneous]
verbose = 1
steady = 0
[../prec]
prectype = Ifpack # Ifpack or ML
displayList = true
[./ML]
analyze_smoother = false
default_parameter_list = DD-ML # for ML precond, SA, DD, DD-ML, maxwell, NSSA, DD-ML-LU, DD-LU
[./smoother]
# smoother type
# Aztec, IFPACK, Jacobi, ML symmetric Gauss-Seidel, symmetric Gauss-Seidel,
# ML Gauss-Seidel, Gauss-Seidel, Chebyshev, MLS, Hiptmair, Amesos-KLU,
# Amesos-Superlu, Amesos-UMFPACK, Amesos-Superludist, Amesos-MUMPS,
# user-defined, SuperLU, IFPACK-Chebyshev, self, do-nothing,