FEI Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
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>
48
52
54
55#undef fei_file
56#define fei_file "fei_test_plugins.cpp"
57#include <fei_ErrMacros.hpp>
58
59
60//--------------------------------------------------
61// main
62//--------------------------------------------------
63int 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
73
75 pset.add(fei::Param("LPM_EpetraBasic", true));
76 factory->parameters(pset);
77
79
80 ftester.factory_test1(factory);
81
83
84 fei::SharedPtr<fei::Vector> fei_vec = vtester.create_vector(factory);
85
86 vtester.vector_test1(fei_vec);
87
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
void add(const Param &param, bool maintain_unique_keys=true)
void factory_test1(fei::SharedPtr< fei::Factory > factory)
fei::SharedPtr< fei::Matrix > create_matrix(fei::SharedPtr< fei::Factory > factory)
void matrix_test1(fei::SharedPtr< fei::Matrix > mat)
fei::SharedPtr< fei::Vector > create_vector(fei::SharedPtr< fei::Factory > factory)
Definition: test_Vector.cpp:58
void vector_test1(fei::SharedPtr< fei::Vector > fei_vec)
Definition: test_Vector.cpp:80
#define ERReturn(a)
#define CHK_ERR(a)
#define FEI_ENDL
#define FEI_COUT
#define MPI_SUCCESS
Definition: fei_mpi.h:62
#define MPI_COMM_WORLD
Definition: fei_mpi.h:58
int main(int argc, char **argv)
const char * version()
Definition: fei_utils.hpp:53
int initialize_mpi(int argc, char **argv, int &localProc, int &numProcs)