FEI Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
fei_Factory.cpp
Go to the documentation of this file.
1/*--------------------------------------------------------------------*/
2/* Copyright 2005 Sandia Corporation. */
3/* Under the terms of Contract DE-AC04-94AL85000, there is a */
4/* non-exclusive license for use of this work by or on behalf */
5/* of the U.S. Government. Export of this program may require */
6/* a license from the United States Government. */
7/*--------------------------------------------------------------------*/
8
9#include <fei_macros.hpp>
10
11#include <fei_Factory.hpp>
12#include <fei_LogManager.hpp>
13#include <fei_LogFile.hpp>
14#include <fei_ParameterSet.hpp>
15
17#include <fei_FEI_Impl.hpp>
18
19//----------------------------------------------------------------------------
21{
22 int numProcs = 1, localProc = 0;
23#ifndef FEI_SER
24 MPI_Comm_size(comm, &numProcs);
25 MPI_Comm_rank(comm, &localProc);
26#endif
28}
29
30//----------------------------------------------------------------------------
32{
35}
36
37//----------------------------------------------------------------------------
39{
40 const fei::Param* param = paramset.get("FEI_OUTPUT_PATH");
41 fei::Param::ParamType ptype = param != NULL ?
43 if (ptype == fei::Param::STRING) {
45 log_manager.setOutputPath(param->getStringValue().c_str());
46 }
47
48 param = paramset.get("debugOutput");
49 ptype = param != NULL ? param->getType() : fei::Param::BAD_TYPE;
50 if (ptype == fei::Param::STRING) {
52 log_manager.setOutputPath(param->getStringValue().c_str());
53 }
54
55 param = paramset.get("FEI_OUTPUT_LEVEL");
56 ptype = param != NULL ? param->getType() : fei::Param::BAD_TYPE;
57 if (ptype == fei::Param::STRING) {
59 log_manager.setOutputLevel(param->getStringValue().c_str());
60 }
61}
62
63//----------------------------------------------------------------------------
66 MPI_Comm comm)
67{
68 //fei::SharedPtr<FEI> fei(new fei::FEI_Impl(wrapper, comm));
69 fei::SharedPtr<FEI> fei(new FEI_Implementation(wrapper, comm));
70
71 return(fei);
72}
73
74//----------------------------------------------------------------------------
77{
78 fei::SharedPtr<FEI> fei(new fei::FEI_Impl(this, comm));
79
80 return(fei);
81}
82
83//----------------------------------------------------------------------------
84
virtual fei::SharedPtr< FEI > createFEI(fei::SharedPtr< LibraryWrapper > wrapper, MPI_Comm comm)
Definition: fei_Factory.cpp:65
virtual ~Factory()
Definition: fei_Factory.cpp:31
virtual void parameters(const fei::ParameterSet &paramset)
Definition: fei_Factory.cpp:38
void closeOutputStream()
Definition: fei_LogFile.cpp:62
static LogFile & getLogFile()
Definition: fei_LogFile.cpp:68
void setOutputLevel(OutputLevel olevel)
static LogManager & getLogManager()
void setOutputPath(const std::string &opath)
void setNumProcs(int nprocs, int localproc)
const std::string & getStringValue() const
Definition: fei_Param.hpp:104
ParamType getType() const
Definition: fei_Param.hpp:98
const Param * get(const char *name) const
#define MPI_Comm
Definition: fei_mpi.h:56
#define FEI_Implementation
Definition: fei_version.h:66
int localProc(MPI_Comm comm)
@ NONE
Definition: fei_fwd.hpp:87
int numProcs(MPI_Comm comm)