Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #include "Albany_MORFacadeImpl.hpp"
00008
00009 #include "MOR_DefaultReducedBasisFactory.hpp"
00010 #include "MOR_DefaultSampleDofListProviders.hpp"
00011 #include "MOR_TruncatedReducedBasisSource.hpp"
00012
00013 #include "Albany_StkEpetraMVSource.hpp"
00014 #include "Albany_DiscretizationDofListProvider.hpp"
00015
00016 namespace Albany {
00017
00018 MORFacadeImpl::MORFacadeImpl(
00019 const Teuchos::RCP<STKDiscretization> &disc,
00020 const Teuchos::RCP<Teuchos::ParameterList> ¶ms) :
00021 basisFactory_(MOR::defaultReducedBasisFactoryNew(*disc->getMap())),
00022 samplingFactory_(MOR::defaultSampleDofListFactoryNew(disc->getMap())),
00023 spaceFactory_(new MOR::ReducedSpaceFactory(basisFactory_, samplingFactory_)),
00024 modelFactory_(new MOR::ReducedOrderModelFactory(spaceFactory_, params)),
00025 observerFactory_(new MOR::ObserverFactory(spaceFactory_, params))
00026 {
00027
00028 const Teuchos::RCP<MOR::EpetraMVSource> stkMVSource(new StkEpetraMVSource(disc));
00029 basisFactory_->extend("Stk", Teuchos::rcp(new MOR::DefaultTruncatedReducedBasisSource(stkMVSource)));
00030
00031
00032 samplingFactory_->extend("Stk", Teuchos::rcp(new DiscretizationSampleDofListProvider(disc)));
00033 }
00034
00035 Teuchos::RCP<MOR::ReducedOrderModelFactory> MORFacadeImpl::modelFactory() const
00036 {
00037 return modelFactory_;
00038 }
00039
00040 Teuchos::RCP<MOR::ObserverFactory> MORFacadeImpl::observerFactory() const
00041 {
00042 return observerFactory_;
00043 }
00044
00045
00046 Teuchos::RCP<MORFacade> createMORFacade(
00047 const Teuchos::RCP<AbstractDiscretization> &disc,
00048 const Teuchos::RCP<Teuchos::ParameterList> ¶ms)
00049 {
00050 const Teuchos::RCP<STKDiscretization> disc_actual =
00051 Teuchos::rcp_dynamic_cast<STKDiscretization>(disc);
00052 return Teuchos::rcp(new MORFacadeImpl(disc_actual, params));
00053 }
00054
00055 }