COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
utest-lss-solvetrilinosdefault.cpp
Go to the documentation of this file.
1 // Copyright (C) 2010-2013 von Karman Institute for Fluid Dynamics, Belgium
2 //
3 // This software is distributed under the terms of the
4 // GNU Lesser General Public License version 3 (LGPLv3).
5 // See doc/lgpl.txt and doc/gpl.txt for the license text.
6 
7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Test module for the SolveLSS action"
9 
10 #include <boost/assign/std/vector.hpp>
11 #include <boost/test/unit_test.hpp>
12 
13 #include "common/Core.hpp"
14 
17 
18 #include "math/LSS/System.hpp"
19 
20 using namespace boost::assign;
21 
22 using namespace cf3;
23 using namespace cf3::common;
24 using namespace cf3::common::PE;
25 using namespace cf3::math;
26 
27 BOOST_AUTO_TEST_SUITE( SolveSystemTrilinosSuite )
28 
29 
31 // Solve a linear system using the trilinos default settings
32 BOOST_AUTO_TEST_CASE( TestSolveTrilinosDefault )
33 {
34  Comm::instance().init(boost::unit_test::framework::master_test_suite().argc, boost::unit_test::framework::master_test_suite().argv);
35 
36  Component& root = Core::instance().root();
38  lss->options().set("matrix_builder", std::string("cf3.math.LSS.TrilinosCrsMatrix"));
39  lss->read_native(URI(boost::unit_test::framework::master_test_suite().argv[1]));
40  lss->solution_strategy()->options().set("compute_residual", true);
41  lss->solve();
42 
43  Comm::instance().finalize();
44 }
45 
47 
48 BOOST_AUTO_TEST_SUITE_END()
49 
50 
Handle< LSS::SolutionStrategy > solution_strategy()
Accessor to the solution strategy.
Definition: System.hpp:154
This header collects all the headers needed for the linear system solver, also including configure-ti...
Basic Classes for Mathematical applications used by COOLFluiD.
Parallel Communication Pattern. This class provides functionality to collect communication. For efficiency it works such a way that you submit your request via the constructor or the add/remove/move magic triangle and then call setup to modify the commpattern. The data needed to be kept synchronous can be registered via the insert function. The word node here means any kind of "point of storage", in this context it is not directly related with the computational mesh.
tuple root
Definition: coolfluid.py:24
void read_native(const common::URI &filename)
Read a linear system from file.
Definition: System.cpp:356
Top-level namespace for coolfluid.
Definition: Action.cpp:18
Classes offering a MPI interface for COOLFluiD.
Definition: all_gather.hpp:39
BOOST_AUTO_TEST_CASE(TestSolveTrilinosDefault)
OptionList & options()
Definition: Component.cpp:856
Base class for defining CF components.
Definition: Component.hpp:82
void set(const std::string &pname, const boost::any &val)
Definition: OptionList.cpp:132
Handle< Component > create_component(const std::string &name, const std::string &builder)
Build a (sub)component of this component using the extended type_name of the component.
Definition: Component.cpp:568
Most basic kernel library.
Definition: Action.cpp:19
Send comments to:
COOLFluiD Web Admin