FEI Package Browser (Single Doxygen Collection)
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
test
fei_test_plugins.cpp
Go to the documentation of this file.
1
/*
2
// @HEADER
3
// ************************************************************************
4
// FEI: Finite Element Interface to Linear Solvers
5
// Copyright (2005) Sandia Corporation.
6
//
7
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the
8
// U.S. Government retains certain rights in this software.
9
//
10
// Redistribution and use in source and binary forms, with or without
11
// modification, are permitted provided that the following conditions are
12
// met:
13
//
14
// 1. Redistributions of source code must retain the above copyright
15
// notice, this list of conditions and the following disclaimer.
16
//
17
// 2. Redistributions in binary form must reproduce the above copyright
18
// notice, this list of conditions and the following disclaimer in the
19
// documentation and/or other materials provided with the distribution.
20
//
21
// 3. Neither the name of the Corporation nor the names of the
22
// contributors may be used to endorse or promote products derived from
23
// this software without specific prior written permission.
24
//
25
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
//
37
// Questions? Contact Alan Williams (william@sandia.gov)
38
//
39
// ************************************************************************
40
// @HEADER
41
*/
42
43
44
#include <
fei_iostream.hpp
>
45
46
#include <
fei_utils.hpp
>
47
#include <
test_utils/fei_test_utils.hpp
>
48
49
#include <
test_utils/test_Factory.hpp
>
50
#include <
test_utils/test_Vector.hpp
>
51
#include <
test_utils/test_Matrix.hpp
>
52
53
#include <
fei_Factory_Trilinos.hpp
>
54
55
#undef fei_file
56
#define fei_file "fei_test_plugins.cpp"
57
#include <
fei_ErrMacros.hpp
>
58
59
60
//--------------------------------------------------
61
// main
62
//--------------------------------------------------
63
int
main
(
int
argc,
char
** argv) {
64
65
int
numProcs, localProc;
66
CHK_ERR
(
fei_test_utils::initialize_mpi
(argc, argv, localProc, numProcs) );
67
68
if
(localProc == 0) {
69
FEI_COUT
<<
"FEI version: "
<<
fei::utils::version
() <<
FEI_ENDL
;
70
}
71
72
fei::SharedPtr<fei::Factory>
factory(
new
Factory_Trilinos
(
MPI_COMM_WORLD
));
73
74
fei::ParameterSet
pset;
75
pset.
add
(
fei::Param
(
"LPM_EpetraBasic"
,
true
));
76
factory->parameters(pset);
77
78
test_Factory
ftester(
MPI_COMM_WORLD
);
79
80
ftester.
factory_test1
(factory);
81
82
test_Vector
vtester(
MPI_COMM_WORLD
);
83
84
fei::SharedPtr<fei::Vector>
fei_vec = vtester.
create_vector
(factory);
85
86
vtester.
vector_test1
(fei_vec);
87
88
test_Matrix
mtester(
MPI_COMM_WORLD
);
89
90
fei::SharedPtr<fei::Matrix>
fei_mat = mtester.
create_matrix
(factory);
91
92
mtester.
matrix_test1
(fei_mat);
93
94
#ifndef FEI_SER
95
if
(MPI_Finalize() !=
MPI_SUCCESS
)
ERReturn
(-1);
96
#endif
97
98
return
(0);
99
}
100
Factory_Trilinos
Definition
fei_Factory_Trilinos.hpp:76
fei::Param
Definition
fei_Param.hpp:23
fei::ParameterSet
Definition
fei_ParameterSet.hpp:46
fei::ParameterSet::add
void add(const Param ¶m, bool maintain_unique_keys=true)
Definition
fei_ParameterSet.hpp:235
fei::SharedPtr
Definition
fei_SharedPtr.hpp:65
test_Factory
Definition
test_Factory.hpp:44
test_Factory::factory_test1
void factory_test1(fei::SharedPtr< fei::Factory > factory)
Definition
test_Factory.cpp:90
test_Matrix
Definition
test_Matrix.hpp:24
test_Matrix::create_matrix
fei::SharedPtr< fei::Matrix > create_matrix(fei::SharedPtr< fei::Factory > factory)
Definition
test_Matrix.cpp:320
test_Matrix::matrix_test1
void matrix_test1(fei::SharedPtr< fei::Matrix > mat)
Definition
test_Matrix.cpp:356
test_Vector
Definition
test_Vector.hpp:26
test_Vector::create_vector
fei::SharedPtr< fei::Vector > create_vector(fei::SharedPtr< fei::Factory > factory)
Definition
test_Vector.cpp:58
test_Vector::vector_test1
void vector_test1(fei::SharedPtr< fei::Vector > fei_vec)
Definition
test_Vector.cpp:80
fei_ErrMacros.hpp
ERReturn
#define ERReturn(a)
Definition
fei_ErrMacros.hpp:37
CHK_ERR
#define CHK_ERR(a)
Definition
fei_ErrMacros.hpp:26
fei_Factory_Trilinos.hpp
fei_iostream.hpp
FEI_ENDL
#define FEI_ENDL
Definition
fei_iostream.hpp:34
FEI_COUT
#define FEI_COUT
Definition
fei_iostream.hpp:33
MPI_SUCCESS
#define MPI_SUCCESS
Definition
fei_mpi.h:62
MPI_COMM_WORLD
#define MPI_COMM_WORLD
Definition
fei_mpi.h:58
main
int main(int argc, char **argv)
Definition
fei_test_plugins.cpp:63
fei_test_utils.hpp
fei_utils.hpp
fei::utils::version
const char * version()
Definition
fei_utils.hpp:53
fei_test_utils::initialize_mpi
int initialize_mpi(int argc, char **argv, int &localProc, int &numProcs)
Definition
fei_test_utils.cpp:65
test_Factory.hpp
test_Matrix.hpp
test_Vector.hpp
Generated by
1.17.0