Thyra
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
core
src
support
operator_vector
adapter_support
Thyra_DefaultSpmdVectorSpaceFactory_decl.hpp
1
// @HEADER
2
// *****************************************************************************
3
// Thyra: Interfaces and Support for Abstract Numerical Algorithms
4
//
5
// Copyright 2004 NTESS and the Thyra contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
10
#ifndef THYRA_SPMD_VECTOR_SPACE_FACTORY_STD_DECL_HPP
11
#define THYRA_SPMD_VECTOR_SPACE_FACTORY_STD_DECL_HPP
12
13
#include "Thyra_VectorSpaceFactoryBase.hpp"
14
15
namespace
Teuchos
{
template
<
typename
Ordinal>
class
Comm
; }
16
17
namespace
Thyra {
18
34
template
<
class
Scalar>
35
class
DefaultSpmdVectorSpaceFactory
:
public
VectorSpaceFactoryBase
<Scalar> {
36
public
:
37
39
Teuchos::RCP<const Teuchos::Comm<Ordinal>
>
getComm
()
const
;
40
43
60
Teuchos::RCP<const VectorSpaceBase<Scalar>
>
createVecSpc
(
int
dim)
const
;
61
63
64
private
:
65
66
Teuchos::RCP<const Teuchos::Comm<Ordinal>
> comm_;
67
68
public
:
69
71
DefaultSpmdVectorSpaceFactory
(
72
const
Teuchos::RCP
<
const
Teuchos::Comm<Ordinal>
> &comm = Teuchos::null
73
);
74
75
};
// end class DefaultSpmdVectorSpaceFactory
76
77
90
template
<
class
Scalar>
91
RCP<DefaultSpmdVectorSpaceFactory<Scalar>
>
92
defaultSpmdVectorSpaceFactory
(
93
const
Teuchos::RCP
<
const
Teuchos::Comm<Ordinal>
> &comm = Teuchos::null
94
)
95
{
96
return
Teuchos::rcp
(
new
DefaultSpmdVectorSpaceFactory<Scalar>
(comm));
97
}
98
99
100
// ///////////////////////////
101
// Inline members
102
103
104
template
<
class
Scalar>
105
inline
106
Teuchos::RCP<const Teuchos::Comm<Ordinal>
>
107
DefaultSpmdVectorSpaceFactory<Scalar>::getComm
()
const
108
{
109
return
comm_;
110
}
111
112
}
// end namespace Thyra
113
114
#endif
// THYRA_SPMD_VECTOR_SPACE_FACTORY_STD_DECL_HPP
Teuchos::Comm
Teuchos::RCP
Thyra::DefaultSpmdVectorSpaceFactory::createVecSpc
Teuchos::RCP< const VectorSpaceBase< Scalar > > createVecSpc(int dim) const
Create a new locally-replicated DefaultSpmdVectorSpace object given its dimension!
Definition
Thyra_DefaultSpmdVectorSpaceFactory_def.hpp:28
Thyra::DefaultSpmdVectorSpaceFactory::getComm
Teuchos::RCP< const Teuchos::Comm< Ordinal > > getComm() const
Return the Spmd communicator.
Definition
Thyra_DefaultSpmdVectorSpaceFactory_decl.hpp:107
Thyra::DefaultSpmdVectorSpaceFactory::defaultSpmdVectorSpaceFactory
RCP< DefaultSpmdVectorSpaceFactory< Scalar > > defaultSpmdVectorSpaceFactory(const Teuchos::RCP< const Teuchos::Comm< Ordinal > > &comm=Teuchos::null)
Construct with a Teuchos::Comm object.
Definition
Thyra_DefaultSpmdVectorSpaceFactory_decl.hpp:92
Thyra::DefaultSpmdVectorSpaceFactory::DefaultSpmdVectorSpaceFactory
DefaultSpmdVectorSpaceFactory(const Teuchos::RCP< const Teuchos::Comm< Ordinal > > &comm=Teuchos::null)
Depreciated .
Definition
Thyra_DefaultSpmdVectorSpaceFactory_def.hpp:20
Thyra::VectorSpaceFactoryBase
Abstract interface for objects that can create vector spaces of a specified dimension.
Definition
Thyra_VectorSpaceFactoryBase.hpp:30
Teuchos
Teuchos::rcp
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Generated by
1.17.0